2018-10-23 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blob367e60f4c6b05da2058193daf425b73de0c57aae
1 2018-10-23  Richard Biener  <rguenther@suse.de>
3         PR tree-optimization/87105
4         PR tree-optimization/87608
5         * passes.def (pass_all_early_optimizations): Add early phi-opt
6         after dce.
7         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
8         addition to debug stmts.
9         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
10         and abs replacement early.
11         * tree-cfg.c (gimple_empty_block_p): Likewise.
13 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
15         PR target/86383
16         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
17         specified to configure.
18         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
20 2018-10-23  Richard Biener  <rguenther@suse.de>
22         PR tree-optimization/87700
23         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
25 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
27         PR target/87674
28         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
29         second argument from __mmask16 to __mmask8.
30         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
31         _mm_mask_packs_epi32): Likewise.
32         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
33         Likewise.
34         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
36 2018-10-23  Richard Biener  <rguenther@suse.de>
38         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
40 2018-10-23  Richard Biener  <rguenther@suse.de>
42         PR tree-optimization/86144
43         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
44         over simd attribute.
46 2018-10-23  Richard Biener  <rguenther@suse.de>
48         PR tree-optimization/87693
49         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
50         the case we do not find the taken edge.
52 2018-10-22  Paul Koning  <ni1d@arrl.net>
54         * symtab.c (symtab_node::increase_alignment): Correct max
55         alignment check.
57 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
59         PR tree-optimization/87633
60         * match.pd: Do not generate unordered integer comparisons.
62 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
64         PR rtl-optimization/87600
65         * combine.c: Add include of expr.h.
66         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
67         register to a pseudo.
68         (make_more_copies): New function, add a copy to a new pseudo after
69         the moves from hard registers into pseudos.
70         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
71         later.  Call make_more_copies.
73 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
75         * lra-constraints.c (process_alt_operands): New local array,
76         matching_early_clobber.  Check matching_early_clobber before
77         decrementing reject, and set matching_early_clobber after.
79 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
81         PR target/87598
82         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
83         call output_addr_const and hope for the best.
85 2018-10-22  Richard Biener  <rguenther@suse.de>
87         * gimple-ssa-evrp-analyze.c
88         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
89         smarter about what ranges to use.
90         * tree-vrp.c (add_assert_info): Dump here.
91         (register_edge_assert_for_2): Instead of here at multiple but
92         not all places.
94         * gcc.dg/tree-ssa/evrp12.c: New testcase.
95         * gcc.dg/predict-6.c: Adjust.
96         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
97         * gcc.dg/tree-ssa/vrp02.c: Likewise.
98         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
100 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
101         Richard Biener  <rguenther@suse.de>
103         * bitmap.h: Update data structure documentation, including a
104         description of bitmap views as either linked-lists or splay trees.
105         (struct bitmap_element_def): Update comments for splay tree bitmaps.
106         (struct bitmap_head_def): Likewise.
107         (bitmap_list_view, bitmap_tree_view): New prototypes.
108         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
109         tree_form fields.
110         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
111         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
112         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
113         released bitmap element here.
114         (bitmap_element_free): Remove.
115         (bitmap_elt_clear_from): Work on splay tree bitmaps.
116         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
117         this function similar ones such that linked-list bitmap implementation
118         functions are grouped.
119         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
120         and moved for grouping.
121         (bitmap_list_insert_element_after): Renamed from
122         bitmap_elt_insert_after, and moved for grouping.
123         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
124         (bitmap_tree_link_left, bitmap_tree_link_right,
125         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
126         bitmap_tree_link_element, bitmap_tree_unlink_element,
127         bitmap_tree_find_element): New functions for splay-tree bitmap
128         implementation.
129         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
130         Renamed and moved, see above entries.
131         (bitmap_tree_listify_from): New function to convert part of a splay
132         tree bitmap to a linked-list bitmap.
133         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
134         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
135         (bitmap_find_bit): Remove.
136         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
137         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
138         Handle splay tree bitmaps.
139         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
140         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
141         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
142         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
143         bitmap_intersect_compl_p, bitmap_ior_and_compl,
144         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
145         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
146         corresponding changes to use linked-list specific bitmap_element
147         manipulation functions as applicable for efficiency.
148         (bitmap_tree_to_vec): New function.
149         (debug_bitmap_elt_file): New function split out from ...
150         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
151         (bitmap_print): Likewise.
153         PR tree-optimization/63155
154         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
155         SSA edge worklists.
156         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
157         in tree-view.
159 2018-10-22  Martin Liska  <mliska@suse.cz>
161         PR tree-optimization/87686
162         Revert
163         2018-08-29  Martin Liska  <mliska@suse.cz>
165         * tree-switch-conversion.c (switch_conversion::expand):
166         Strenghten assumption about gswitch statements.
168 2018-10-22  Martin Liska  <mliska@suse.cz>
170         * ipa-icf.c (sem_item::compare_attributes): Remove.
171         (sem_item::compare_referenced_symbol_properties): Use
172         attribute_list_equal instead.
173         (sem_function::equals_wpa): Likewise.
174         * ipa-icf.h: Remove compare_attributes.
176 2018-10-22  Richard Biener  <rguenther@suse.de>
178         PR middle-end/87682
179         * mem-stats.h (mem_usage::operator==): Fix pasto.
181 2018-10-22  Richard Biener  <rguenther@suse.de>
183         PR tree-optimization/87640
184         * tree-vrp.c (set_value_range_with_overflow): Decompose
185         incomplete result.
186         (extract_range_from_binary_expr_1): Adjust.
188 2018-10-22  Martin Jambor  <mjambor@suse.cz>
190         * tree-eh.h (stmt_could_throw_p): Add function parameter.
191         (stmt_can_throw_external): Likewise.
192         (stmt_can_throw_internal): Likewise.
193         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
194         (lower_eh_constructs_2): Likewise.
195         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
196         (stmt_can_throw_external): Likewise.
197         (stmt_can_throw_internal): Likewise.
198         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
199         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
200         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
201         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
202         (pass_lower_eh_dispatch::execute): Pass cfun to
203         stmt_can_throw_external.
204         (cleanup_empty_eh): Likewise.
205         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
206         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
207         stmt_can_throw_external instead of pushing it to cfun.
208         (symbol_table::create_edge): Likewise.
209         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
210         stmt_can_throw_internal.
211         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
212         to stmt_could_throw_p.
213         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
214         stmt_can_throw_internal.
215         (pass_store_merging::execute): Likewise.
216         * gimple-ssa-strength-reduction.c
217         (find_candidates_dom_walker::before_dom_children): Pass cfun to
218         stmt_could_throw_p.
219         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
220         stmt_can_throw_internal.
221         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
222         to stmt_can_throw_external.
223         (check_stmt): Pass cfun to stmt_could_throw_p.
224         (check_stmt): Pass cfun to stmt_can_throw_external.
225         (pass_nothrow::execute): Likewise.
226         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
227         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
228         stmt_can_throw_internal.
229         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
230         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
231         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
232         * tree-complex.c (expand_complex_libcall): Pass cfun to
233         stmt_could_throw_p and to stmt_can_throw_internal.
234         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
235         * tree-inline.c (copy_edges_for_bb): Likewise.
236         (maybe_move_debug_stmts_to_successors): Likewise.
237         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
238         stmt_could_throw_p.
239         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
240         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
241         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
242         stmt_can_throw_internal.
243         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
244         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
245         stmt_could_throw_p.
246         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
247         stmt_can_throw_internal.
248         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
249         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
250         stmt_could_throw_p.
251         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
252         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
253         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
254         (convert_mult_to_fma_1): Likewise.
255         (convert_to_divmod): Likewise.
256         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
257         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
258         * tree-ssa-propagate.c
259         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
260         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
261         (maybe_optimize_range_tests): Likewise.
262         (linearize_expr_tree): Likewise.
263         (reassociate_bb): Likewise.
264         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
265         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
266         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
267         (handle_char_store): Likewise.
268         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
269         stmt_can_throw_internal.
270         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
271         stmt_could_throw_p.
272         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
273         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
274         (vectorizable_simd_clone_call): Likewise.
275         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
276         (gimple_stringop_fixed_value): Likewise.
278 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
280         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
281         literal pool references.
282         (s390_check_qrst_address): Adapt to the new behavior of
283         s390_loadrelative_operand_p ().
285 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
287         PR target/72782
288         * config/i386/sse.md (*andnot<mode>3_bcst): New.
290 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
292         PR target/72782
293         * config/i386/sse.md (*<code><mode>3_bcst): New.
295 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
297         PR target/72782
298         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
299         V4DI, V16SI and V8DI.
300         (*sub<mode>3<mask_name>_bcst): New.
301         (*add<mode>3<mask_name>_bcst): Likewise.
303 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
305         PR target/72782
306         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
307         __builtin_ia32_vfnmsubpd512_mask.
308         (_mm512_mask_fnmsub_round_pd): Likewise.
309         (_mm512_fnmsub_pd): Likewise.
310         (_mm512_mask_fnmsub_pd): Likewise.
311         (_mm512_maskz_fnmsub_round_pd): Use
312         __builtin_ia32_vfnmsubpd512_maskz.
313         (_mm512_maskz_fnmsub_pd): Likewise.
314         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
315         (_mm512_mask_fnmsub_round_ps): Likewise.
316         (_mm512_fnmsub_ps): Likewise.
317         (_mm512_mask_fnmsub_ps): Likewise.
318         (_mm512_maskz_fnmsub_round_ps): Use
319         __builtin_ia32_vfnmsubps512_maskz.
320         (_mm512_maskz_fnmsub_ps): Likewise.
321         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
322         __builtin_ia32_vfnmsubpd256_mask.
323         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
324         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
325         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
326         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
327         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
328         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
329         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
330         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
331         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
332         __builtin_ia32_vfnmsubpd.
333         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
334         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
335         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
336         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
337         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
338         * config/i386/i386-builtin.def: Add
339         __builtin_ia32_vfnmsubpd256_mask,
340         __builtin_ia32_vfnmsubpd256_maskz,
341         __builtin_ia32_vfnmsubpd128_mask,
342         __builtin_ia32_vfnmsubpd128_maskz,
343         __builtin_ia32_vfnmsubps256_mask,
344         __builtin_ia32_vfnmsubps256_maskz,
345         __builtin_ia32_vfnmsubps128_mask,
346         __builtin_ia32_vfnmsubps128_maskz,
347         __builtin_ia32_vfnmsubpd512_mask,
348         __builtin_ia32_vfnmsubpd512_maskz,
349         __builtin_ia32_vfnmsubps512_mask,
350         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
351         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
352         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
353         __builtin_ia32_vfnmsubpd256.
354         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
355         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
356         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
357         Likewise.
358         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
359         Likewise.
360         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
361         Likewise.
362         (fmai_vmfnmsub_<mode><round_name>): Likewise.
364 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
366         PR target/72782
367         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
368         __builtin_ia32_vfnmaddpd512_mask.
369         (_mm512_mask_fnmadd_round_pd): Likewise.
370         (_mm512_fnmadd_pd): Likewise.
371         (_mm512_mask_fnmadd_pd): Likewise.
372         (_mm512_maskz_fnmadd_round_pd): Use
373         __builtin_ia32_vfnmaddpd512_maskz.
374         (_mm512_maskz_fnmadd_pd): Likewise.
375         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
376         (_mm512_mask_fnmadd_round_ps): Likewise.
377         (_mm512_fnmadd_ps): Likewise.
378         (_mm512_mask_fnmadd_ps): Likewise.
379         (_mm512_maskz_fnmadd_round_ps): Use
380         __builtin_ia32_vfnmaddps512_maskz.
381         (_mm512_maskz_fnmadd_ps): Likewise.
382         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
383         __builtin_ia32_vfnmaddpd256_mask.
384         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
385         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
386         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
387         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
388         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
389         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
390         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
391         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
392         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
393         __builtin_ia32_vfnmaddpd.
394         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
395         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
396         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
397         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
398         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
399         * config/i386/i386-builtin.def: Add
400         __builtin_ia32_vfnmaddpd256_mask,
401         __builtin_ia32_vfnmaddpd256_maskz,
402         __builtin_ia32_vfnmaddpd128_mask,
403         __builtin_ia32_vfnmaddpd128_maskz,
404         __builtin_ia32_vfnmaddps256_mask,
405         __builtin_ia32_vfnmaddps256_maskz,
406         __builtin_ia32_vfnmaddps128_mask,
407         __builtin_ia32_vfnmaddps128_maskz,
408         __builtin_ia32_vfnmaddpd512_mask,
409         __builtin_ia32_vfnmaddpd512_maskz,
410         __builtin_ia32_vfnmaddps512_mask,
411         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
412         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
413         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
414         __builtin_ia32_vfnmaddpd256.
415         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
416         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
417         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
418         Likewise.
419         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
420         Likewise.
421         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
422         Likewise.
423         (fmai_vmfnmadd_<mode><round_name>): Likewise.
425 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
427         PR target/72782
428         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
429         __builtin_ia32_vfmsubpd512_mask.
430         (_mm512_mask_fmsub_round_pd): Likewise.
431         (_mm512_fmsub_pd): Likewise.
432         (_mm512_mask_fmsub_pd): Likewise.
433         (_mm512_maskz_fmsub_round_pd): Use
434         __builtin_ia32_vfmsubpd512_maskz.
435         (_mm512_maskz_fmsub_pd): Likewise.
436         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
437         (_mm512_mask_fmsub_round_ps): Likewise.
438         (_mm512_fmsub_ps): Likewise.
439         (_mm512_mask_fmsub_ps): Likewise.
440         (_mm512_maskz_fmsub_round_ps): Use
441         __builtin_ia32_vfmsubps512_maskz.
442         (_mm512_maskz_fmsub_ps): Likewise.
443         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
444         __builtin_ia32_vfmsubpd256_mask.
445         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
446         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
447         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
448         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
449         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
450         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
451         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
452         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
453         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
454         __builtin_ia32_vfmsubpd.
455         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
456         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
457         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
458         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
459         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
460         * config/i386/i386-builtin.def: Add
461         __builtin_ia32_vfmsubpd256_mask,
462         __builtin_ia32_vfmsubpd256_maskz,
463         __builtin_ia32_vfmsubpd128_mask,
464         __builtin_ia32_vfmsubpd128_maskz,
465         __builtin_ia32_vfmsubps256_mask,
466         __builtin_ia32_vfmsubps256_maskz,
467         __builtin_ia32_vfmsubps128_mask,
468         __builtin_ia32_vfmsubps128_maskz,
469         __builtin_ia32_vfmsubpd512_mask,
470         __builtin_ia32_vfmsubpd512_maskz,
471         __builtin_ia32_vfmsubps512_mask,
472         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
473         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
474         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
475         __builtin_ia32_vfmsubpd256.
476         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
477         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
478         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
479         Likewise.
480         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
481         Likewise.
482         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
483         Likewise.
484         (fmai_vmfmsub_<mode><round_name>): Likewise.
486 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
488         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
489         Remove plus.  Renamed to ...
490         (*sub<mode>3<mask_name>_bcst): This.
491         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
492         (*add<mode>3<mask_name>_bcst): This.
494 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
496         PR target/72782
497         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
499 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
501         PR target/87662
502         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
503         (_mm_or_epi32): Likewise.
504         (_mm256_xor_epi32): Likewise.
505         (_mm_xor_epi32): Likewise.
506         (_mm256_or_epi64): Likewise.
507         (_mm_or_epi64): Likewise.
508         (_mm256_xor_epi64): Likewise.
509         (_mm_xor_epi64): Likewise.
511 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
513         PR target/72782
514         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
516 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
518         PR middle-end/87647
519         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
521 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
523         * doc/ux.texi: Move @section directly after @node.
525 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
527         PR middle-end/85488
528         PR middle-end/87649
529         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
530         depend closely nested inside of loop with ordered clause with
531         a parameter.
533 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
535         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
536         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
537         * doc/ux.texi: New file.
539 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
541         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
542         be the first CR field allocated.
544 2018-10-19  Richard Biener  <rguenther@suse.de>
546         PR target/87657
547         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
548         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
550 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
552         PR target/72782
553         * config/i386/sse.md
554         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
555         (*add<mode>3<mask_name>_bcst_2): Likewise.
557 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
559         * config/i386/sse.md
560         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
561         Replace nonimmediate_operand with register_operand.
562         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
563         Likewise.
564         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
565         Likewise.
567 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
569         PR rtl-optimization/87596
570         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
571         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
572         for instructions in FROM..TO range.
574 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
576         * cfgexpand.c (expand_one_var): Use specific wording in error message
577         for non-local frame variables.
578         * stor-layout.c (layout_decl): Do not issue a warning for them.
580 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
582         * haifa-sched.c (priority): Add force_recompute parameter.
583         (apply_replacement): Call priority () with force_recompute = true.
584         (restore_pattern): Likewise.
586 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
588         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
589         HOST_BITS_PER_WIDE_INT.
590         (test_vector_ops_duplicate): Likewise.
592 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
594         PR target/72782
595         * config/i386/sse.md (VF_AVX512): New.
596         (avx512bcst): Likewise.
597         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
598         Likewise.
599         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
600         Likewise.
601         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
602         Likewise.
604 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
606         * doc/invoke.texi (-dumpversion): Improve grammar.
607         (-dumpfullversion): Make more consistent with -dumpversion.
609 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
611         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
612         Set JUMP_LABEL to the jump insn.
613         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
614         Predict emitted jump and add label to jump insn.
616 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
618         PR tree-optimization/87562
619         * input.c (get_substring_ranges_for_loc): Use
620         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
621         getting the linemap for the endpoint.  Verify that it's either
622         in the same linemap as the start point's spelling location, or
623         at least in the same file.
625 2018-10-18  Richard Biener  <rguenther@suse.de>
627         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
628         feed width-specific load/store costs through ix86_vec_cost.
629         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
630         (k8_cost): Likewise.
631         (bdver_cost): Likewise.
632         (znver1_cost): Likewise.
633         (btver1_cost): Likewise.
634         (btver2_cost): Likewise.
636 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
638         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
639         to simplify subreg of vec_merge.
641 2018-10-18  Richard Biener  <rguenther@suse.de>
643         * config/i386/i386.c: Fix costing of vector FMA.
645 2018-10-18  Richard Biener  <rguenther@suse.de>
647         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
648         and argument.
649         (ix86_builtin_vectorization_cost): For vec_construct properly
650         cost insertion into SSE regs.
651         (...): Adjust calls to ix86_vec_cost.
653 2018-10-18  Richard Biener  <rguenther@suse.de>
655         PR middle-end/87087
656         Revert
657         2018-02-07  Richard Biener  <rguenther@suse.de>
659         PR tree-optimization/84204
660         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
661         this place.
663 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
665         PR target/87537
666         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
667         of vec_duplicate.
668         (test_vector_ops_duplicate): Add test for a scalar subreg of a
669         VEC_MERGE of a VEC_DUPLICATE.
671 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
673         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
674         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
675         * doc/standards.texi (C Language): Document C2X.
676         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
677         (rl78_option_override): Handle "GNU C2X" language name.
679 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
681         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
682         Document C17 as published in 2018.
684 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
686         PR middle-end/87623
687         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
688         bail out if both sides do not have the same storage order.
690 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
692         * bitmap.c (bitmap_head::dump): New.
693         * bitmap.h (bitmap_head): Add dump().
694         * gimple-ssa-evrp-analyze.c
695         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
696         (evrp_range_analyzer::set_ssa_range_info): Same.
697         (evrp_range_analyzer::record_ranges_from_phis): Same.
698         (evrp_range_analyzer::record_ranges_from_stmt): Same.
699         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
700         * gimple-ssa-sprintf.c (get_int_range): Same.
701         (format_integer): Same.
702         (sprintf_dom_walker::handle_gimple_call): Same.
703         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
704         (ipcp_vr_lattice::top_p): Same.
705         (ipcp_vr_lattice::bottom_p): Same.
706         (ipcp_vr_lattice::set_to_bottom): Same.
707         (ipa_vr_operation_and_type_effects): Same.
708         (propagate_vr_across_jump_function): Same.
709         (ipcp_store_vr_results): Same.
710         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
711         (ipa_print_node_jump_functions_for_edge): Same.
712         (ipa_get_value_range): Same.
713         (ipa_compute_jump_functions_for_edge): Same.
714         (ipa_write_jump_function): Same.
715         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
716         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
717         Same.
718         * vr-values.c (set_value_range_to_nonnegative): Same.
719         (set_value_range_to_truthvalue): Same.
720         (vr_values::get_value_range): Same.
721         (vr_values::set_defs_to_varying): Same.
722         (vr_values::update_value_range): Same.
723         (symbolic_range_based_on_p): Same.
724         (vr_values::op_with_boolean_value_range_p): Same.
725         (vr_values::extract_range_for_var_from_comparison_expr): Same.
726         (vr_values::extract_range_from_ssa_name): Same.
727         (vr_values::extract_range_from_binary_expr): Same.
728         (vr_values::extract_range_from_unary_expr): Same.
729         (vr_values::extract_range_from_cond_expr): Same.
730         (vr_values::extract_range_from_comparison): Same.
731         (vr_values::check_for_binary_op_overflow): Same.
732         (vr_values::extract_range_basic): Same.
733         (vr_values::extract_range_from_assignment): Same.
734         (compare_ranges): Same.
735         (compare_range_with_value): Same.
736         (vr_values::adjust_range_with_scev): Same.
737         (vrp_valueize): Same.
738         (vrp_valueize_1): Same.
739         (vr_values::get_vr_for_comparison): Same.
740         (vr_values::compare_name_with_value): Same.
741         (vr_values::compare_names): Same.
742         (vr_values::vrp_evaluate_conditional): Same.
743         (find_case_label_ranges): Same.
744         (vr_values::vrp_visit_switch_stmt): Same.
745         (vr_values::extract_range_from_phi_node): Same.
746         (vr_values::simplify_div_or_mod_using_ranges): Same.
747         (vr_values::simplify_bit_ops_using_ranges): Same.
748         (test_for_singularity): Same.
749         (range_fits_type_p): Same.
750         (vr_values::simplify_cond_using_ranges_1): Same.
751         (vr_values::simplify_switch_using_ranges): Same.
752         (vr_values::simplify_float_conversion_using_ranges): Same.
753         (vr_values::two_valued_val_range_p): Same.
754         (vr_values::add_equivalence): Move to value_range::equiv_add.
755         * vr-values.h (vr_values::add_equivalence): Remove.
756         (VR_INITIALIZER): Remove.
757         * tree-vrp.c (value_range::set): New.
758         (value_range::equiv_add): New.
759         (value_range::value_range): New.
760         (value_range::deep_copy): New.
761         (value_range::check): New.
762         (value_range::equal_p): New.
763         (value_range::ignore_equivs_equal_p): New.
764         (value_range::operator==): New.
765         (value_range::operator!=): New.
766         (value_range::symbolic_p): New.
767         (value_range::numeric_p): New.
768         (value_range::set_undefined): New.
769         (value_range::set_varying): New.
770         (value_range::may_contain_p): New.
771         (value_range::equiv_clear): New.
772         (value_range::singleton_p): New.
773         (value_range::intersect): New.
774         (value_range::dump): New.
775         (value_range::set_and_canonicalize): New.
776         (set_value_range): Adjust for value_range API.
777         (set_value_range_to_undefined): Same.
778         (set_value_range_to_varying): Same.
779         (set_and_canonicalize_value_range): Same.
780         (set_value_range_to_nonnull): Same.
781         (set_value_range_to_null): Same.
782         (range_is_null): Same.
783         (range_is_nonnull): Same.
784         (range_int_cst_p): Same.
785         (range_int_cst_singleton_p): Same.
786         (symbolic_range_p): Same.
787         (range_includes_zero_p): Same.
788         (value_range_constant_singleton): Same.
789         (vrp_set_zero_nonzero_bits): Same.
790         (ranges_from_anti_range): Same.
791         (extract_range_into_wide_ints): Same.
792         (extract_range_from_multiplicative_op): Same.
793         (set_value_range_with_overflow): Same.
794         (extract_range_from_binary_expr_1): Same.
795         (extract_range_from_unary_expr): Same.
796         (dump_value_range): Same.
797         (debug_value_range): Same.
798         (vrp_prop::check_array_ref): Same.
799         (vrp_prop::check_mem_ref): Same.
800         (vrp_prop::vrp_initialize): Same.
801         (vrp_prop::visit_stmt): Same.
802         (intersect_ranges): Same.
803         (vrp_prop::visit_phi): Same.
804         (vrp_prop::vrp_finalize): Same.
805         (determine_value_range_1): Same.
806         (determine_value_range): Same.
807         (vrp_intersect_ranges_1): Rename to...
808         (vrp_intersect_1): this.
809         (vrp_intersect_ranges): Rename to...
810         (value_range::intersect_helper): ...this.
811         (vrp_meet_1): Rename to...
812         (value_range::union_helper): ...this.
813         (vrp_meet): Rename to...
814         (value_range::union_): ...this.
815         (copy_value_range): Remove.
816         * tree-vrp.h (struct value_range): Rewrite into a proper class.
817         (value_range::vrtype): New.
818         (value_range::type): New.
819         (value_range::equiv): New.
820         (value_range::min): New.
821         (value_range::max): New.
822         (value_range::varying_p): New.
823         (value_range::undefined_p): New.
824         (value_range::null_p): New.
825         (value_range::equiv_add): New.
826         (copy_value_range): Remove.
828 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
830         * Makefile.in (SELFTEST_TARGETS): New.
831         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
832         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
833         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
834         c/Make-lang.in.
835         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
836         (selftest-c++-gdb, selftest-c++-valgrind): Move to
837         cp/Make-lang.in.
838         * configure: Regenerate.
839         * configure.ac (selftest_languages): New.
841 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
843         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
844         overflow wraps argument.
845         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
846         wide_int_range_multiplicative_op.
847         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
848         overflow wraps argument.
849         (wide_int_range_multiplicative_op): Same.
850         (wide_int_range_lshift): Same.
851         (wide_int_range_div): Same.
852         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
853         (wide_int_range_lshift): Same.
854         (wide_int_range_div): Same.
856 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
858         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
859         use sign as argument.
860         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
861         wide_int_range_shift_undefined_p.
863 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
865         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
866         Rename to...
867         (@despeculate_copy<ALLI_TI:mode>): ... This.
868         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
869         switch statement.
871 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
873         * config.gcc: Obsolete *-*-solaris2.10*.
874         * doc/install.texi (Specific, *-*-solaris2*): Document it.
876 2018-10-12  Jeff Law  <law@redhat.com>
878         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
879         reg + sym +- const_int addressing modes.
881 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
883         * common.opt (fdiagnostics-minimum-margin-width=): New option.
884         * diagnostic-show-locus.c (layout::layout): Apply the minimum
885         margin width.
886         (layout::start_annotation_line): Only print up to 3 of the
887         margin character, to avoid touching the left-hand side.
888         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
889         minimum margin width, as set by test_diagnostic_context's ctor.
890         (selftest::test_fixit_insert_containing_newline): Likewise.
891         (selftest::test_fixit_insert_containing_newline_2): Likewise.
892         (selftest::test_line_numbers_multiline_range): Clear
893         dc.min_margin_width.
894         * diagnostic.c (diagnostic_initialize): Initialize
895         min_margin_width.
896         * diagnostic.h (struct diagnostic_context): Add field
897         "min_margin_width".
898         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
899         * opts.c (common_handle_option): Handle
900         OPT_fdiagnostics_minimum_margin_width_.
901         * selftest-diagnostic.c
902         (selftest::test_diagnostic_context::test_diagnostic_context):
903         Initialize min_margin_width to 6.
904         * toplev.c (general_init): Initialize global_dc->min_margin_width.
906 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
908         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
909         Fix usage of "error_at_rich_loc" in the comment.
911 2018-10-15  Renlin Li  <renlin.li@arm.com>
913         PR target/87563
914         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
915         if-conversioned loop when it contains ifn with types not
916         supported by backend.
917         * internal-fn.c (expand_direct_optab_fn): Add an assert.
918         (direct_internal_fn_supported_p): New helper function.
919         * internal-fn.h (direct_internal_fn_supported_p): Declare.
921 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
923         PR target/87572
924         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
925         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
926         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
928 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
930         PR tree-optimization/87022
931         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
932         bits in dist vector rather than the first one.
934 2018-10-15  Richard Biener  <rguenther@suse.de>
936         PR middle-end/87610
937         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
938         (visit_loadstore): When a used restrict tag escaped verify that
939         the points-to solution of "other" pointers do not include
940         escaped.
941         (compute_dependence_clique): If a used restrict tag escaped
942         communicated that down to visit_loadstore.
944 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
946         * config/s390/s390.c (s390_expand_vec_init): Force vector element
947         into reg if it isn't a general operand.
949 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
951         PR target/87599
952         * config/i386/sse.md (*vec_dupv2di): Add register source to
953         movddup.
955 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
957         PR target/87572
958         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
959         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
960         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
961         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
963 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
965         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
966         (notice_args_size): Set it in the current trace if no insn that can
967         throw internally has been seen yet.
968         (connect_traces): When connecting args_size between traces, allow the
969         incoming values not to match if there is an insn setting it before the
970         first insn that can throw internally; in that case, force the creation
971         of a CFI note on this latter insn.
973 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
975         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
976         the base class, because using the injected-class-name was not clearly
977         specified until DR 176.
979 2018-10-12  Paul Koning  <ni1d@arrl.net>
981         * config/pdp11/pdp11.md (doloop_end): New expander.
982         (doloop_end_insn): renamed from "doloop_end".
983         (addqi3): New pattern.
984         (subqi3): New pattern.
985         * config/pdp11/predicates.md (incdec_operand): New predicate.
987 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
989         PR middle-end/81376
990         * real.c (format_helper::can_represent_integral_type_p): New function
991         * real.h (format_helper::can_represent_integral_type_p): Ditto.
992         * match.pd: New pattern.
994 2018-10-12  Alexandre Oliva <oliva@adacore.com>
996         * configure.ac: Introduce --enable-large-address-aware
997         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
998         * doc/install.texi: Document it.
999         * configure, config.in: Rebuilt.
1000         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1001         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1002         (LINK_SPEC): Insert it.
1003         * config/i386/mingw-264.h: Likewise.
1005         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1007 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
1009         PR rtl-optimization/87600
1010         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1012 2018-10-12  Paul Koning  <ni1d@arrl.net>
1014         * doc/md.texi (doloop_end): Document that the pattern code may
1015         need to check operand mode.
1017 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
1019         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1020         to zero-extend between int and floating-point registers.
1021         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1022         ldp into floating-point registers.  Add type and arch attributes.
1023         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1024         Use f_loads for type attribute.
1026 2018-10-11  Martin Sebor  <msebor@redhat.com>
1028         * doc/extend.texi (attribute packed): Correct typos.
1030 2018-10-11  Martin Sebor  <msebor@redhat.com>
1032         * doc/extend.texi (attribute flatten): Mention interaction with
1033         noinline.
1035 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
1037         PR target/87156
1038         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1039         Set new_decl virtual flag to zero.
1041 2018-10-11  Martin Sebor  <msebor@redhat.com>
1043         PR middle-end/87593
1044         * doc/extend.texi (attribute format_arg): Discuss using multiple
1045         attributes on a single function.
1047 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1049         PR tree-optimization/86829
1050         * match.pd (sin (atan (x))): New simplification rules.
1051         (cos (atan (x))): Likewise.
1052         * real.c (build_sinatan_real): New function.
1053         * real.h (build_sinatan_real): Prototype.
1055 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
1057         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1058         function.
1059         (fold_mergeeo_helper): New helper function.
1060         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1061         intrinsics.  Correct some whitespace indentation issues.
1063 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
1065         PR target/87511
1066         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1067         Use HOST_WIDE_INT_1U for shift.
1069 2018-10-11  Doug Rupp  <rupp@adacore.com>
1070             Olivier Hainque  <hainque@adacore.com>
1072         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1073         Pass --relax to the linker for RTPs.
1074         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1076 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
1077             Jan Hubicka  <jh@suse.cz>
1078             Martin Jambor  <mjambor@suse.cz>
1080         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1081         the same elements are repeated rather than printing all of them.
1082         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1083         "repeated" elements.
1084         * read-rtl-function.c (test_loading_repeat): New function.
1085         (read_rtl_function_c_tests): Call test_loading_repeat.
1086         * rtl-tests.c (test_dumping_repeat): New function.
1087         (rtl_tests_c_tests): Call test_dumping_repeat.
1089 2018-10-11  Richard Biener  <rguenther@suse.de>
1091         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1092         bdver?_cost): Unify to ...
1093         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1094         * config/i386/i386.c (processor_cost_table): Adjust.
1096 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
1098         PR middle-end/87574
1099         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1100         the thunk when expanding to GIMPLE.
1102 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1104         * varasm.c (mergeable_string_section): Don't try to move zero-length
1105         strings to the merge section.
1107 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
1109         PR target/87573
1110         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1112 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
1114         PR target/87550
1115         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1116         to special_args set.
1118 2018-10-10  Richard Biener  <rguenther@suse.de>
1120         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1121         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1122         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1123         and recursing and pattern terminating the recursion on SSE
1124         vector width using ix86_expand_reduc.
1125         (reduc_sminmax_scal_<mode>): Split into part reducing to half
1126         width and recursing and SSE2 vector variant doing the final
1127         reduction with ix86_expand_reduc.
1128         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1129         with terminating the recursion at AVX level, splitting that
1130         to SSE there.
1132 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
1134         * genmatch.c (error_cb): Rename to...
1135         (diagnostic_cb): ...this, converting int params to enums.
1136         (fatal_at): Update for renaming.
1137         (warning_at): Likewise.
1138         (main): Likewise.
1139         * input.c (selftest::ebcdic_execution_charset::apply):
1140         Update for renaming of...
1141         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1142         to...
1143         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1144         converting level and reason to enums.
1145         (class selftest::lexer_error_sink): Rename to...
1146         (class selftest::lexer_test_options): ...this, renaming field
1147         "m_errors" to "m_diagnostics".
1148         (selftest::lexer_test_options::apply): Update for renaming of...
1149         (selftest::lexer_test_options::on_error): ...this, renaming to...
1150         (selftest::lexer_test_options::on_diagnostic): ...this
1151         converting level and reason to enums.
1152         (selftest::test_lexer_string_locations_raw_string_unterminated):
1153         Update for renamings.
1154         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1155         "reason".
1157 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
1159         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1160         * config/rs6000/pmmintrin.h: New file.
1162 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1164         PR tree-optimization/86659
1165         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1167 2018-10-09  Richard Biener  <rguenther@suse.de>
1169         PR tree-optimization/63155
1170         * tree-ssa-structalias.c: Include tree-ssa.h.
1171         (get_constraint_for_ssa_var): For undefs return nothing_id.
1172         (find_func_aliases): Cleanup PHI handling.
1174 2018-10-09  Richard Biener  <rguenther@suse.de>
1176         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1177         replacements.
1179 2018-10-09  Martin Liska  <mliska@suse.cz>
1181         * asan.c (asan_emit_stack_protection): If a stack variable
1182         is located in a same file as current function, then emit
1183         line info into variable definition string.
1185 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1187         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1188         information.
1190 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1192         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1193         on the thunk.
1195 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1197         PR tree-optimization/86659
1198         * gimple-match.h (struct gimple_match_op): Add reverse field.
1199         (gimple_match_op::set_op): New overloaded method.
1200         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1201         the REF_REVERSE_STORAGE_ORDER flag on the value.
1202         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1203         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1204         
1205 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
1207         PR middle-end/63155
1208         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1209         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1211 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
1213         PR target/87517
1214         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1215         Defined with __builtin_ia32_vfmaddsubpd512_mask.
1217 2018-10-08  Richard Biener  <rguenther@suse.de>
1219         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1220         cost the same as AVX128 ones.
1222 2018-10-08  Paul Koning  <ni1d@arrl.net>
1224         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1225         (expand_block_move): New function.
1226         * config/pdp11/pdp11.c (output_block_move): Remove.
1227         (expand_block_move): New function.
1228         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1229         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1230         (*movmemhi1): Remove.
1232 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
1234         * config/s390/2827.md: Increase latencies for some FP instructions.
1236 2018-10-08  Richard Biener  <rguenther@suse.de>
1238         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1239         Open a dump scope.
1240         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1241         * tree-vectorizer.h (dump_stmt_cost): Adjust.
1242         (add_stmt_cost): Dump return value of the hook.
1244 2018-10-08  Richard Biener  <rguenther@suse.de>
1246         PR tree-optimization/63155
1247         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1248         (ssa_propagation_engine::ssa_propagate): Remove redundant
1249         bitmap bit clearing.
1251 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
1253         PR rtl-optimization/86939
1254         PR rtl-optimization/87479
1255         * ira.h (non_conflicting_reg_copy_p): New prototype.
1256         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1257         (make_hard_regno_dead): Don't add conflicts for register
1258         ignore_reg_for_conflicts.
1259         (make_object_dead): Likewise.
1260         (non_conflicting_reg_copy_p): New function.
1261         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1262         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1263         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1264         (make_hard_regno_dead): Don't add conflicts for register
1265         ignore_reg_for_conflicts.  Remove special conflict handling of
1266         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
1267         check_pic_pseudo_p and update callers.
1268         (mark_pseudo_dead): Don't add conflicts for register
1269         ignore_reg_for_conflicts.
1270         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1272 2018-10-05  Andrew Waterman  <andrew@sifive.com>
1273             Jim Wilson  <jimw@sifive.com>
1275         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1276         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
1277         new pattern using HONOR_SNANS that emits one extra instruction.
1279 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1281         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1282         patterns): Merge SI and DI patterns to a GPR pattern.
1283         (unnamed define_insn and define_split for record form of that): Merge
1284         to a single define_insn_and_split pattern.
1286 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
1288         PR c++/56856
1289         * input.c (expand_location_to_spelling_point): Add param "aspect"
1290         and use rather than hardcoding LOCATION_ASPECT_CARET.
1291         (get_substring_ranges_for_loc): Handle the case of a single token
1292         within a macro expansion.
1293         * input.h (expand_location_to_spelling_point): Add "aspect" param,
1294         defaulting to LOCATION_ASPECT_CARET.
1296 2018-10-05  Paul Koning  <ni1d@arrl.net>
1298         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1299         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1300         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1301         (pdp11_guard_type): New function.
1303 2018-10-05  Paul Koning  <ni1d@arrl.net>
1305         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1306         * config/pdp11/pdp11.opt (mfloat32): Remove.
1307         (mfloat64): Remove.
1308         * doc/invoke.texi (pdp11 -mfloat32): Remove:
1309         (pdp11 -mfloat64): Remove.
1311 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1313         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1314         (*cmp<mode>_cc_i387): Ditto.
1315         (*cmpu<mode>_cc_i387): Ditto.
1316         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1317         * config/i386/i386.c (ix86_expand_fp_compare): Remove
1318         "scratch" argument.
1319         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1320         Emit x86_sahf_1 pattern.
1321         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1322         (ix86_expand_carry_flag_compare): Ditto.
1324 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1326         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1327         to reg_or_0_operand.  Add "C" constraint.
1328         (*cmpxf_cc_i387): Ditto.
1329         (*cmp<mode>_i387): Change operand 2 predicate
1330         to nonimm_or_0_operand.  Add "C" constraint.
1331         (*cmp<mode>_cc_i387): Ditto.
1332         (*cmp<mode>_0_i387): Remove insn pattern.
1333         (*cmp<mode>_0_cc_i387): Ditto.
1335 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1337         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1338         * config/i386/predicates.md (nonimm_or_0_operand): Rename
1339         from vector_move_operand.  Update all uses.
1341 2018-10-05  Martin Sebor  <msebor@redhat.com>
1343         PR tree-optimization/87490
1344         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1345         consistently.
1347 2018-10-05  Richard Biener  <rguenther@suse.de>
1349         PR tree-optimization/63155
1350         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1351         vertical space in dumpfiles.
1352         * tree-ssa-propagate.h
1353         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1354         * tree-ssa-propagate.c (cfg_blocks_back): New global.
1355         (ssa_edge_worklist_back): Likewise.
1356         (curr_order): Likewise.
1357         (cfg_blocks_get): Remove abstraction.
1358         (cfg_blocks_add): Likewise.
1359         (cfg_blocks_empty_p): Likewise.
1360         (add_ssa_edge): Add to current or next worklist based on
1361         RPO index.
1362         (add_control_edge): Likewise.
1363         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1364         into ...
1365         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
1366         iteration from CFG and SSA edge worklist so we process
1367         everything in RPO order, prioritizing forward progress
1368         over iteration.
1369         (ssa_prop_init): Allocate new worklists, do not dump
1370         immediate uses.
1371         (ssa_prop_fini): Free new worklists.
1373 2018-10-05  Richard Biener  <rguenther@suse.de>
1375         * tree-core.h (tree_block::abstract_flag): Remove.
1376         (tree_block::block_num): Make full 32bits.
1377         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1378         * tree.h (BLOCK_ABSTRACT): Remove.
1379         * dwarf2out.c (gen_lexical_block_die): Remove dead code
1380         resulting from BLOCK_ABSTRACT being always false.
1381         (gen_inlined_subroutine_die): Likewise.
1382         (gen_block_die): Likewise.
1383         * tree.c (block_ultimate_origin): Likewise.
1384         * tree-pretty-print.c (dump_block_node): Remove code dealing
1385         with BLOCK_ABSTRACT.
1386         * tree-ssa-live.c (dump_scope_block): Likewise.
1387         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
1388         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
1390 2018-10-05   Richard Biener  <rguenther@suse.de>
1392         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
1393         is asked for initialize mode to the component mode of the
1394         vector type.
1396 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
1398         PR target/87522
1399         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
1400         assembler for -mavx.
1401         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
1403 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1405         PR target/87509
1406         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
1407         RS6000_BTM_DFP.
1408         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
1409         to be DImode.  When using mffscrn, force the operand to a register.
1411 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
1413         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
1414         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
1415         X87MODEF mode iterator.
1416         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
1417         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
1418         X87MODEF mode iterator.
1420 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
1422         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
1423         -Wno-prio-ctor-dtor.
1425 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1427         * Makefile.in (OBJS): Add opt-problem.o.
1428         * dump-context.h: Include "selftest.h.
1429         (selftest::temp_dump_context): New forward decl.
1430         (class dump_context): Make friend of class
1431         selftest::temp_dump_context.
1432         (dump_context::dump_loc_immediate): New decl.
1433         (class dump_pretty_printer): Move here from dumpfile.c.
1434         (class temp_dump_context): Move to namespace selftest.
1435         (temp_dump_context::temp_dump_context): Add param
1436         "forcibly_enable_dumping".
1437         (selftest::verify_dumped_text):
1438         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
1439         (selftest::verify_item):
1440         (ASSERT_IS_TEXT): Move here from dumpfile.c.
1441         (ASSERT_IS_TREE): Likewise.
1442         (ASSERT_IS_GIMPLE): Likewise.
1443         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
1444         to...
1445         (dump_context::dump_loc_immediate): ...this new function.
1446         (class dump_pretty_printer): Move to dump-context.h.
1447         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
1448         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
1449         (temp_dump_context::temp_dump_context): Move to "selftest"
1450         namespace.  Add param "forcibly_enable_dumping", and use it to
1451         conditionalize the use of m_pp;
1452         (selftest::verify_dumped_text): Make non-static.
1453         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
1454         (selftest::verify_item): Make non-static.
1455         (ASSERT_IS_TEXT): Move to dump-context.h.
1456         (ASSERT_IS_TREE): Likewise.
1457         (ASSERT_IS_GIMPLE): Likewise.
1458         (selftest::test_capture_of_dump_calls): Pass "true" for new
1459         param of temp_dump_context.
1460         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
1461         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
1462         TDF_COMPARE_DEBUG.
1463         * opt-problem.cc: New file.
1464         * opt-problem.h: New file.
1465         * optinfo-emit-json.cc
1466         (selftest::test_building_json_from_dump_calls): Pass "true" for
1467         new param of temp_dump_context.
1468         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
1469         (optinfo::emit_for_opt_problem): New function.
1470         (optinfo::emit): Clarity which emit_item is used.
1471         * optinfo.h (optinfo::get_dump_location): New accessor.
1472         (optinfo::emit_for_opt_problem): New decl.
1473         (optinfo::emit): Make const.
1474         * selftest-run-tests.c (selftest::run_tests): Call
1475         selftest::opt_problem_cc_tests.
1476         * selftest.h (selftest::opt_problem_cc_tests): New decl.
1477         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
1478         bool to opt_result, converting fprintf messages to
1479         opt_result::failure_at calls.  Add "stmt" param for use by the
1480         failure_at calls.
1481         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
1482         (runtime_alias_check_p): Convert return type from bool to
1483         opt_result, converting dump_printf calls to
1484         opt_result::failure_at, using the statement DDR_A for their
1485         location.
1486         (find_data_references_in_stmt): Convert return type from bool to
1487         opt_result, converting "return false" to opt_result::failure_at
1488         with a new message.
1489         * tree-data-ref.h: Include "opt-problem.h".
1490         (dr_analyze_innermost): Convert return type from bool to opt_result,
1491         and add a const gimple * param.
1492         (find_data_references_in_stmt): Convert return type from bool to
1493         opt_result.
1494         (runtime_alias_check_p): Likewise.
1495         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
1496         dr_analyze_innermost.
1497         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
1498         Convert return type from bool to opt_result, adding a message for
1499         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
1500         (vect_analyze_data_ref_dependence): Convert return type from bool
1501         to opt_result.  Change sense of return type from "false"
1502         effectively meaning "no problems" to "false" meaning a problem,
1503         so that "return false" becomes "return opt_result::success".
1504         Convert "return true" calls to opt_result::failure_at, using
1505         the location of statement A rather than vect_location.
1506         (vect_analyze_data_ref_dependences): Convert return type from bool
1507         to opt_result.
1508         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
1509         calls to opt_result::failure_at, using the stmt location rather
1510         than vect_location.
1511         (vect_verify_datarefs_alignment): Convert return type from bool
1512         to opt_result.
1513         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
1514         into multiple more-tightly-scoped copies.
1515         (vect_analyze_data_refs_alignment): Convert return type from bool
1516         to opt_result.
1517         (vect_analyze_data_ref_accesses): Likewise, converting a
1518         "return false" to a "return opt_result::failure_at", adding a
1519         new message.
1520         (vect_prune_runtime_alias_test_list): Convert return type from
1521         bool to opt_result, converting dump_printf_loc to
1522         opt_result::failure_at.  Add a %G to show the pertinent statement,
1523         and use the stmt's location rather than vect_location.
1524         (vect_find_stmt_data_reference): Convert return type from
1525         bool to opt_result, converting dump_printf_loc to
1526         opt_result::failure_at, using stmt's location.
1527         (vect_analyze_data_refs):  Convert return type from bool to
1528         opt_result.  Convert "return false" to "return
1529         opt_result::failure_at", adding messages as needed.
1530         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
1531         type from bool to opt_result.
1532         (vect_determine_vf_for_stmt): Likewise.
1533         (vect_determine_vectorization_factor): Likewise, converting
1534         dump_printf_loc to opt_result::failure_at, using location of phi
1535         rather than vect_location.
1536         (vect_analyze_loop_form_1): Convert return type from bool to
1537         opt_result, converting dump_printf_loc calls, retaining the use of
1538         vect_location.
1539         (vect_analyze_loop_form): Convert return type from loop_vec_info
1540         to opt_loop_vec_info.
1541         (vect_analyze_loop_operations): Convert return type from bool to
1542         opt_result, converting dump_printf_loc calls, using the location
1543         of phi/stmt rather than vect_location where available.  Convert
1544         various "return false" to "return opt_result::failure_at" with
1545         "unsupported phi" messages.
1546         (vect_get_datarefs_in_loop): Convert return type from bool to
1547         opt_result.  Add a message for the
1548         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
1549         (vect_analyze_loop_2): Convert return type from bool to
1550         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
1551         each "goto again;", adding new messages where needed.
1552         Add "unsupported grouped {store|load}" messages.
1553         (vect_analyze_loop): Convert return type from loop_vec_info to
1554         opt_loop_vec_info.
1555         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
1556         bool to opt_result.
1557         * tree-vect-stmts.c (process_use): Likewise, converting
1558         dump_printf_loc call and using stmt location, rather than
1559         vect_location.
1560         (vect_mark_stmts_to_be_vectorized): Likeise.
1561         (vect_analyze_stmt): Likewise, adding a %G.
1562         (vect_get_vector_types_for_stmt): Convert return type from bool to
1563         opt_result, converting dump_printf_loc calls and using stmt
1564         location, rather than vect_location.
1565         (vect_get_mask_type_for_stmt): Convert return type from tree to
1566         opt_tree, converting dump_printf_loc calls and using stmt location.
1567         * tree-vectorizer.c: Include "opt-problem.h.
1568         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
1569         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
1570         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
1571         enabled, use it to report at the top level "couldn't vectorize
1572         loop" followed by the problem.
1573         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
1574         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
1575         to opt_result.
1576         (vect_analyze_stmt): Likewise.
1577         (vect_get_vector_types_for_stmt): Likewise.
1578         (tree vect_get_mask_type_for_stmt): Likewise.
1579         (vect_analyze_data_ref_dependences): Likewise.
1580         (vect_enhance_data_refs_alignment): Likewise.
1581         (vect_analyze_data_refs_alignment): Likewise.
1582         (vect_verify_datarefs_alignment): Likewise.
1583         (vect_analyze_data_ref_accesses): Likewise.
1584         (vect_prune_runtime_alias_test_list): Likewise.
1585         (vect_find_stmt_data_reference): Likewise.
1586         (vect_analyze_data_refs): Likewise.
1587         (vect_analyze_loop): Convert return type from loop_vec_info to
1588         opt_loop_vec_info.
1589         (vect_analyze_loop_form): Likewise.
1590         (vect_analyze_slp): Convert return type from bool to opt_result.
1592 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1594         * doc/invoke.texi (-fopt-info): Document new "internals"
1595         sub-option.
1596         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
1597         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
1598         MSG_ALL_KINDS.
1599         (optinfo_verbosity_options): Add "internals".
1600         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
1601         (dump_context::apply_dump_filter_p): New member function.
1602         (dump_context::dump_loc): Use apply_dump_filter_p rather than
1603         explicitly masking the dump_kind.
1604         (dump_context::begin_scope): Increment the scope depth first.  Use
1605         apply_dump_filter_p rather than explicitly masking the dump_kind.
1606         (dump_context::emit_item): Use apply_dump_filter_p rather than
1607         explicitly masking the dump_kind.
1608         (dump_dec): Likewise.
1609         (dump_hex): Likewise.
1610         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
1611         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
1612         (opt_info_switch_p): Update handling of default
1613         MSG_OPTIMIZED_LOCATIONS to cope with default of
1614         MSG_PRIORITY_USER_FACING.
1615         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
1616         masking the dump_kind.
1617         (selftest::test_capture_of_dump_calls): Update test_dump_context
1618         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
1619         than MSG_ALL.  Generalize scope test to be run at all four
1620         combinations of with/without MSG_PRIORITY_USER_FACING and
1621         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
1622         for each of the two values.
1623         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
1624         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
1625         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
1626         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
1627         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
1628         with MSG_PRIORITY_*.
1629         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
1630         dump messages as MSG_PRIORITY_USER_FACING.
1631         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
1632         about the interaction with MSG_PRIORITY_*.
1634 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1636         * varasm.c (output_constant): Add new parameter merge_strings.
1637         Make strings properly zero terminated in merge string sections.
1638         (mergeable_string_section): Don't fail if the last char is non-zero.
1639         (assemble_variable_contents): Handle merge string sections.
1640         (assemble_variable): Likewise.
1641         (assemble_constant_contents): Likewise.
1642         (output_constant_def_contents): Likewise.
1643         (output_constructor_array_range,
1644         output_constructor_regular_field): Adjust call to output_constant.
1645         (output_object_block): Adjust call to assemble_constant_contents
1646         and assemble_variable_contents.
1648 2018-10-04  Martin Liska  <mliska@suse.cz>
1650         PR c/87483
1651         * cgraphunit.c (process_function_and_variable_attributes):
1652         Warn about a function with alias attribute and a body.
1654 2018-10-04  Martin Liska  <mliska@suse.cz>
1656         PR ipa/82625
1657         * multiple_target.c (redirect_to_specific_clone): New function.
1658         (ipa_target_clone): Use it.
1659         * tree-inline.c: Fix comment.
1661 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1663         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
1664         fields.
1665         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
1666         (gcc::dump_manager::register_pass): New member function, adapted
1667         from loop body in gcc::pass_manager::register_pass, adding a
1668         call to update_dfi_for_opt_info.
1669         (gcc::dump_manager::opt_info_enable_passes): Store the
1670         -fopt-info options into the new fields.  Move the loop
1671         bodies into...
1672         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
1673         function.
1674         * dumpfile.h (struct opt_pass): New forward decl.
1675         (gcc::dump_manager::register_pass): New decl.
1676         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
1677         (class gcc::dump_manager): Add fields "m_optgroup_flags",
1678         "m_optinfo_flags", and "m_optinfo_filename".
1679         * passes.c (gcc::pass_manager::register_pass): Move all of the
1680         dump-handling code to gcc::dump_manager::register_pass.
1682 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
1684         PR rtl-optimization/87466
1685         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
1686         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
1687         * doc/tm.texi: Regenerate.
1688         * ira-lives.c (process_bb_node_lives): Use the new target hook.
1689         * lra-lives.c (process_bb_lives): Likewise.
1690         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
1691         Define.
1693 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
1695         * params.c (add_params): Fix initialization.
1697 2018-10-04  Martin Liska  <mliska@suse.cz>
1699         PR gcov-profile/84107
1700         * tree-profile.c (init_ic_make_global_vars):
1701         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
1702         Come up with new ic_tuple* variables.  Emit
1703         __gcov_indirect_call{,_topn} variables.
1704         (gimple_gen_ic_profiler): Access the variable
1705         and emit gimple.
1706         (gimple_gen_ic_func_profiler): Access
1707         __gcov_indirect_call.callee field.
1708         (gimple_init_gcov_profiler): Use ptr_type_node.
1709         * value-prof.c (gimple_ic): Use ptr_type_node.
1711 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1713         PR tree-optimization/85787
1714         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
1715         into this function and add support for detecting multiple phis.
1716         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
1718 2018-10-04  Martin Liska  <mliska@suse.cz>
1720         PR ipa/87491
1721         * ipa-inline.c (inline_to_all_callers_1):
1722         Call ultimate_alias_target for node being inlined.
1724 2018-10-03  Jeff Law  <law@redhat.com>
1726         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
1727         target's wchar_t.
1728         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
1729         * tree.h (get_typenode_from_name): Prototype.
1731 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1733         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1734         Change operand 2 predicate to nonimmediate_operand.
1735         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1737 2018-10-03  Martin Sebor  <msebor@redhat.com>
1738             Jeff Law  <law@redhat.com>
1740         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
1741         initialize it.
1742         (get_string_length): Detect unterminated arrays.
1743         (format_string): Same.
1744         (format_directive): Warn about unterminated arrays.
1745         (handle_gimple_call): Mark statements with no_warning as needed.
1747 2018-10-03  Jim Wilson  <jimw@sifive.com>
1749         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
1750         also define __riscv_abi_rve.  Delete trailing white space.
1752 2018-10-03  Paul Koning  <ni1d@arrl.net>
1754         Enable LRA register allocator for PDP11.
1755         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
1756         (R): Likewise.
1757         (D): Likewise.
1758         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
1759         * config/pdp11/pdp11.opt (-mlra): New option.
1760         * doc/invoke.texi (PDP-11 Options): Document -mlra.
1762 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1764         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
1765         (*<absneg:code>extend<mode>xf2): Ditto.
1767 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1769         PR tree-optimization/87415
1770         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
1771         precision fields.
1773 2018-10-02  Jeff Law  <law@redhat.com>
1775         * gimple-fold.c (get_range_strlen): Only set *nonstr when
1776         an unterminated string is discovered.  Bubble up range
1777         even for unterminated strings.
1778         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
1779         indicates the string was not terminated via NONSTR.
1781 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1783         * tree-vrp.c (extract_range_from_unary_expr): Special case all
1784         pointer conversions.
1785         Do not do anything special for anti-ranges.
1787 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
1789         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
1790         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
1792 2018-10-03  Martin Liska  <mliska@suse.cz>
1794         PR gcov-profile/86109
1795         * coverage.c (coverage_begin_function): Do not
1796         mark lambdas as artificial.
1797         * tree-core.h (struct GTY): Remove tm_clone_flag
1798         and introduce new lambda_function.
1799         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
1801 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1803         PR target/87474
1804         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
1805         P8_VECTOR and VSX are enabled.
1807 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1809         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
1810         0x3907 as CPU model number.
1812 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1814         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
1815         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
1816         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
1817         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
1818         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
1819         * config/s390/s390.md: Likewise. Rename also the cpu attribute
1820         value from arch12 to z14.
1822 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1824         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
1825         (isinfxf2): Ditto.
1826         (isinf<mode>2): Ditto.
1828 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1830         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1831         before emitting fxam.  Perform calculations in XFmode.
1833 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1835         * match.pd (((X /[ex] A) +- B) * A): New transformation.
1837 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1839         PR middle-end/87319
1840         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1841         * tree.c (signed_or_unsigned_type_for): Handle complex.
1843 2018-10-02  Jeff Law  <law@redhat.com>
1845         * gimple-fold.c (get_range_strlen): Remove dead code.
1847 2018-10-02  Martin Sebor  <msebor@redhat.com>
1848             Jeff Law  <law@redhat.com>
1850         * builtins.c (unterminated_array): Add new arguments.
1851         If argument is not terminated, bubble up size and exact
1852         state to callers.
1853         (expand_builtin_strnlen): Detect, avoid expanding
1854         and diagnose unterminated arrays.
1855         (c_strlen): Fill in offset of start of unterminated strings.
1856         * builtins.h (unterminated_array): Update prototype.
1858 2018-10-02  Richard Biener  <rguenther@suse.de>
1860         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1861         of haddv4df, first reduce to SSE width and exploit the fact
1862         that we only need element zero with the reduction result.
1863         (reduc_plus_scal_v2df): Likewise.
1865 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1867         * dojump.h (do_jump): Delete.
1868         (do_jump_1): Likewise.
1869         (split_comparison): Move around.
1870         * dojump.c (do_jump): Make static.
1871         (do_jump_1): Likewise.
1872         (jumpifnot): Move around.
1873         (jumpifnot_1): Likewise.
1874         (jumpif): Likewise.
1875         (jumpif_1): Likewise.
1876         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1878 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1880         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1881         insns in the delay slot and add_insn_after for the jump insn.
1883 2018-10-02  Richard Biener  <rguenther@suse.de>
1885         * tree-inline.c (expand_call_inline): Use the location of
1886         the callee declaration for the inline-entry marker.
1887         * final.c (notice_source_line): Remove special-casing of
1888         NOTE_INSN_INLINE_ENTRY.
1890 2018-10-01  Carl Love  <cel@us.ibm.com>
1892         PR 69431
1893         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1894         (__builtin_mtfsb0): New.
1895         (__builtin_mtfsb1): New.
1896         ( __builtin_set_fpscr_rn): New.
1897         (__builtin_set_fpscr_drn): New.
1898         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1899         (rs6000_expand_set_fpscr_rn_builtin): Add.
1900         (rs6000_expand_set_fpscr_drn_builtin): Add.
1901         (rs6000_expand_builtin): Add case statement entries for
1902         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1903         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1904         RS6000_BUILTIN_MFFSL.
1905         (rs6000_init_builtins): Add ftype initialization and def_builtin
1906         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1907         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1908         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1909         rs6000_mffscdrn): Add define_insn.
1910         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1911         * doc/extend.texi: Add documentation for the builtins.
1913 2018-10-01  Richard Biener  <rguenther@suse.de>
1915         PR tree-optimization/87465
1916         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1917         causing branch miscounts.
1919 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1921         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1922         aarch64_option_default_param):  New.
1923         (params.h): Include.
1924         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1925         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1926         stack-clash protection validation code.
1928 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1930         * params.c (validate_param): New.
1931         (add_params): Use it.
1932         (set_param_value): Refactor param validation into validate_param.
1933         (diagnostic.h): Include.
1934         * diagnostic.h (diagnostic_ready_p): New.
1936 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1938         * params.c (set_param_value):
1939         Add index of parameter being validated.
1940         * common/common-target.def (option_validate_param): New.
1941         * common/common-targhooks.h (default_option_validate_param): New.
1942         * common/common-targhooks.c (default_option_validate_param): New.
1943         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1944         * doc/tm.texi: Regenerate.
1946 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1948         PR target/86486
1949         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1950         Add validation for stack-clash parameters and set defaults.
1952 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1954         PR target/86486
1955         * configure.ac: Add stack-clash-protection-guard-size.
1956         * doc/install.texi: Document it.
1957         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1958         * params.def: Update comment for guard-size.
1959         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1960         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1961         * configure: Regenerate.
1963 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1965         PR target/86486
1966         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1967         STACK_DYNAMIC_OFFSET): New.
1968         * config/aarch64/aarch64.c (aarch64_layout_frame):
1969         Update outgoing args size.
1970         (aarch64_stack_clash_protection_alloca_probe_range,
1971         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1973 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1975         PR target/86486
1976         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1977         probe ranges.
1978         * target.def (stack_clash_protection_alloca_probe_range): New.
1979         (stack_clash_protection_final_dynamic_probe): Remove.
1980         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1981         (default_stack_clash_protection_final_dynamic_probe): Remove.
1982         * targhooks.c: Likewise.
1983         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1984         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1985         * doc/tm.texi: Regenerate.
1987 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1989         PR target/86486
1990         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1991         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1992         aarch64_clamp_to_uimm12_shift): New.
1993         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1994         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1996 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1998         PR target/86486
1999         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2001 2018-10-01  Jeff Law  <law@redhat.com>
2002             Richard Sandiford <richard.sandiford@linaro.org>
2003             Tamar Christina  <tamar.christina@arm.com>
2005         PR target/86486
2006         * config/aarch64/aarch64.md
2007         (probe_stack_range): Add k (SP) constraint.
2008         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2009         STACK_CLASH_MAX_UNROLL_PAGES): New.
2010         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2011         stack probes for stack clash.
2012         (aarch64_allocate_and_probe_stack_space): New.
2013         (aarch64_expand_prologue): Use it.
2014         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2015         (aarch64_sub_sp): Add emit_move_imm optional param.
2017 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
2019         PR tree-optimization/87261
2020         * match.pd: Remove trailing whitespace.
2021         Add (x & y) | ~(x | y) -> ~(x ^ y),
2022         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2024 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2026         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2027         constraints.
2028         (ashlsi3_insn): Update instruction constraints.
2029         (ashrsi3_insn): Likewise.
2030         (rotrsi3): Likewise.
2031         (add_shift): Likewise.
2032         * config/arc/constraints.md (Csz): New 32 bit constraint. It
2033         avoids placing in the limm field small constants which, otherwise,
2034         could end into a small instruction.
2036 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2038         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2039         destination register is not odd-even.
2040         (umaddsidi4_split): Likewise.
2042 2018-10-01  Richard Biener  <rguenther@suse.de>
2044         * tree-inline.c (expand_call_inline): Store origin of fn
2045         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2046         * tree.c (block_ultimate_origin): Simplify and do some
2047         checking.
2049 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
2051         * config/i386/mmx.md (EMMS): New int iterator.
2052         (emms): New int attribute.
2053         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2054         EMMS int iterator.  Explicitly declare clobbers.
2055         (mmx_emms): Remove expander.
2056         (mmx_femms): Ditto.
2057         * config/i386/predicates.md (emms_operation): Remove predicate.
2058         (vzeroall_pattern): New predicate.
2059         (vzeroupper_pattern): Rename from vzeroupper_operation.
2060         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2061         vzeroupper_pattern and vzeroall_pattern predicates.
2063 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
2065         PR rtl-optimization/86939
2066         * ira-lives.c (make_hard_regno_born): Rename from this...
2067         (make_hard_regno_live): ... to this.  Remove update to conflict
2068         information.  Update function comment.
2069         (make_hard_regno_dead): Add conflict information update.  Update
2070         function comment.
2071         (make_object_born): Rename from this...
2072         (make_object_live): ... to this.  Remove update to conflict information.
2073         Update function comment.
2074         (make_object_dead):  Add conflict information update.  Update function
2075         comment.
2076         (mark_pseudo_regno_live): Call make_object_live.
2077         (mark_pseudo_regno_subword_live): Likewise.
2078         (mark_hard_reg_dead): Update function comment.
2079         (mark_hard_reg_live): Call make_hard_regno_live.
2080         (process_bb_node_lives): Likewise.
2081         * lra-lives.c (make_hard_regno_born): Rename from this...
2082         (make_hard_regno_live): ... to this.  Remove update to conflict
2083         information.  Remove now uneeded check_pic_pseudo_p argument.
2084         Update function comment.
2085         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2086         to conflict information.  Update function comment.
2087         (mark_pseudo_live): Remove update to conflict information.  Update
2088         function comment.
2089         (mark_pseudo_dead): Add conflict information update.
2090         (mark_regno_live): Call make_hard_regno_live.
2091         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2092         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2094 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
2096         PR target/87370
2097         * config/i386/i386.c (construct_container): Use TImode for
2098         BLKmode values in 2 integer registers.
2100 2018-09-29  Jeff Law  <law@redhat.com>
2102         * builtins.c (unterminated_array): Pass in c_strlen_data * to
2103         c_strlen rather than just a tree *.
2104         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2105         Update recursive calls appropriately.  If caller did not provide a
2106         suitable data pointer, create a local one.  When a non-terminated
2107         string is discovered, bubble up information about the string via the
2108         c_strlen_data object.
2109         * builtins.h (c_strlen): Update prototype.
2110         (c_strlen_data): New structure.
2111         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2112         For a type 2 call, if c_strlen indicates a non-terminated string
2113         use the length of the non-terminated string.
2114         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2116 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
2118         PR target/87467
2119         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2120         __m512d type for __A argument rather than __m512.
2122 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
2124         * match.pd (simple_comparison): Don't optimize if either operand is
2125         a function pointer when target needs function pointer canonicalization.
2127 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2129         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2130         power5 .. power9 to remove indirection.
2131         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2132         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2133         ASM_CPU_476_SPEC): Delete.
2134         (ASM_CPU_SPEC): Adjust.
2135         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2136         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2138 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2140         * config.in: Delete HAVE_AS_DCI.
2141         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2142         * config/rs6000/rs6000.h: Ditto.
2143         * configure.ac: Delete HAVE_AS_DCI.
2144         * configure: Regenerate.
2146 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2148         * config.in (HAVE_AS_LWSYNC): Delete.
2149         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2150         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2151         do it as a .long .
2152         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2153         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2154         as a .long .
2155         * configure.ac: Delete HAVE_AS_LWSYNC.
2156         * configure: Regenerate.
2158 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2159             Pierre-Marie de Rodat  <derodat@adacore.com>
2161         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2162         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2163         (cgraph_node::create_thunk): Add indirect_offset parameter.
2164         (thunk_adjust): Likewise.
2165         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2166         and initialize the corresponding field with it.
2167         (cgraph_node::dump): Dump indirect_offset field.
2168         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2169         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2170         (thunk_adjust): Add indirect_offset parameter and deal with it.
2171         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2172         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
2173         or if the thunk is external or local.  Fix formatting.  Do not chain
2174         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
2175         if any, in the GIMPLE representation.
2176         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2177         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2178         (input_node): Read indirect_offset field.
2179         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2180         call to thunk_adjust.
2181         * tree-nested.c (struct nesting_info): Add thunk_p field.
2182         (create_nesting_tree): Set it.
2183         (convert_all_function_calls): Copy static chain from targets to thunks.
2184         (finalize_nesting_tree_1): Return early for thunks.
2185         (unnest_nesting_tree_1): Do not finalize thunks.
2186         (gimplify_all_functions): Do not gimplify thunks.
2188 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2190         * opt-suggestions.c (option_proposer::build_option_suggestions):
2191         Release "option_values".
2193 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2195         * coverage.c (get_coverage_counts): Convert problem-reporting dump
2196         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2197         * dumpfile.c (kind_as_string): New function.
2198         (dump_loc): Rather than a hardcoded prefix of "note: ", use
2199         kind_as_string to vary the prefix based on dump_kind.
2200         (selftest::test_capture_of_dump_calls): Update for above.
2202 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2204         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2205         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
2207 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2209         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2210         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2211         INVALID_REGNUM instead of FPSR_REG.
2212         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2213         * config/i386/i386.md: Update comment of FP compares.
2214         (fldenv): Do not clobber FPSR_REG.
2216 2018-09-28  Richard Biener  <rguenther@suse.de>
2218         * tree.h (BLOCK_ORIGIN): New.
2219         * omp-expand.c (grid_expand_target_grid_body): Assign
2220         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2221         * tree-inline.c (remap_block): Likewise.
2222         * auto-profile.c (get_function_decl_from_block): Simplify
2223         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2224         * langhooks.c (lhd_print_error_function): Likewise.
2225         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2226         Likewise.
2227         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2228         * tree.c (block_nonartificial_location): Likewise.
2229         (block_ultimate_origin): Likewise.
2230         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
2231         no longer needed LTO case.
2233 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
2234             Jan Hubicka  <jh@suse.cz>
2235             Martin Jambor  <mjambor@suse.cz>
2237         * simplify-rtx.c (simplify_merge_mask): New function.
2238         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2239         same masks are used in op1 or op2.
2240         (test_vec_merge): New function.
2241         (test_vector_ops): Call test_vec_merge.
2243 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2245         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2246         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2247         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2248         (cypress_costs): Set it.
2249         (supersparc_costs): Likewise.
2250         (hypersparc_costs): Likewise.
2251         (leon_cost): Likewise.
2252         (leon3_costs): Likewise.
2253         (sparclet_costs): Likewise.
2254         (ultrasparc_costs): Likewise.
2255         (ultrasparc_costs): Likewise.
2256         (niagara_costs): Likewise.
2257         (niagara2_costs): Likewise.
2258         (niagara3_costs): Likewise.
2259         (niagara4_costs): Likewise.
2260         (niagara7_costs): Likewise.
2261         (m8_costs): Likewise.
2262         (TARGET_CAN_FOLLOW_JUMP): Define.
2263         (pass_work_around_errata::gate): Minor tweak.
2264         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2265         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2266         Automaitcally clear MASK_FSMULD mask for V7 processors.
2267         (sparc_can_follow_jump): New static function.
2268         (output_ubranch): Deal with CROSSING_JUMP_P.
2269         (sparc_use_sched_lookahead): Rewrite using switch statement.
2270         (sparc_issue_rate): Reorder.
2271         (sparc_branch_cost): New function.
2273 2018-09-27  Martin Sebor  <msebor@redhat.com>
2275         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2276         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2277         (int_fits_type_p): Same.
2279 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
2281         * config/i386/i386.md (FPCR_REG): Remove.
2282         (UNSPEC_FLDCW): Remove.
2283         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2284         (x86_fldcw_1): Remove insn pattern.
2285         (fnstenv): Do not clobber FPCR_REG.
2286         (fldenv): Ditto.
2287         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2288         (CALL_USED_REGISTERS): Ditto.
2289         (REG_ALLOC_ORDER): Ditto.
2290         (REG_CLASS_CONTENTS): Ditto.
2291         (HI_REGISTER_NAMES): Ditto.
2292         (ADDITIONAL_REGISTER_NAMES): Use defines instead
2293         of numerical constants.
2294         * config/i386/i386.c (regclass_map): Remove fpsr register.
2295         (dbx_register_map): Ditto.
2296         (dbx64_register_map): Ditto.
2297         (svr4_dbx_register_map): Ditto.
2298         (print_reg): Do not handle FPCR_REG.
2300 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
2302         PR target/87149
2303         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2304         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2305         Delete, always treat as true.
2306         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2307         Ditto.  Simplify remaining code.
2308         * config/powerpcspe/powerpcspe.h: Ditto.
2309         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2310         Simplify remaining code.
2311         (rs6000_expand_builtin): Ditto.
2312         * config/rs6000/rs6000.h: Ditto.
2313         * configure.ac: Ditto.
2314         * configure: Regenerate.
2316 2018-09-27  Martin Liska  <mliska@suse.cz>
2318         * coverage.c (get_coverage_counts): Revert the formatting
2319         of missing profile opt info.
2321 2018-09-27  Richard Biener  <rguenther@suse.de>
2323         PR debug/37801
2324         PR debug/87440
2325         * dwarf2out.c (set_block_origin_self): Do not mark outermost
2326         block as we do not output that.
2327         (gen_inlined_subroutine_die): Elide the originally outermost
2328         block, matching what we do for concrete instances.
2329         (decls_for_scope): Add parameter specifying whether to recurse
2330         to subblocks.
2332 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
2333             Tom de Vries  <tom@codesourcery.com>
2335         PR 82089
2337         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2338         STORE_FLAG_VALUE == 1.
2340 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
2342         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2343         constant definitions.
2344         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2345         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2346         ("speculation_barrier"): New expander definition.
2348 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
2350         PR gcov-profile/86957
2351         * common.opt: New warning option -Wmissing-profile.
2352         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2353         * doc/invoke.texi: Document -Wmissing-profile.
2355 2018-09-26  Jim Wilson  <jimw@sifive.com>
2357         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2358         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2360 2018-09-26  Martin Sebor  <msebor@redhat.com>
2362         * tree.c (zerop): Change return type to bool.
2363         (integer_zerop, integer_onep, integer_each_onep): Same.
2364         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2365         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2366         (real_onep, real_minus_onep, chain_index): Same.
2367         (print_type_hash_statistics, type_list_equal): Same.
2368         * tree.h (zerop): Same.
2369         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2370         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2371         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2372         (real_onep, real_minus_onep, chain_index): Same.
2373         (print_type_hash_statistics, type_list_equal): Same.
2375 2018-09-26  Jim Wilson  <jimw@sifive.com>
2377         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2379 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
2381         PR target/87414
2382         * config/i386/i386.c: Include debug.h and dwarf2out.h.
2383         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2384         call.
2386 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
2388         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
2390 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2392         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
2393         and FP_SECOND_SSE_REGS.
2394         (REG_CLASS_NAMES): Ditto.
2395         (REG_CLASS_CONTENTS): Ditto.
2396         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
2397         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
2398         (ix86_preferred_output_reload_class): Ditto.
2399         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
2400         clobber constraint to "=&f".
2401         (fix_truncdi_i387): Ditto.
2402         (lrintxfdi2): Ditto.
2403         (fistdi2_<rounding>): Ditto.
2404         (fpremxf4_i387): Change "=u" constraint to "=f".
2405         (fprem1xf4_i387): Ditto.
2406         (sincosxf3): Ditto.
2407         (fptanxf4_i387): Ditto.
2408         (fxtractxf3_i387): Ditto.
2409         (fscalexf4_i387): Ditto.
2410         (atan2xf3): Change "u" constraint to "f".
2411         (fyl2xxf3_i387): Ditto.
2412         (fyl2xp1xf3_i387): Ditto.
2414 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2416         PR target/87439
2417         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
2418         for removed I387_MASK_PM entity.
2421 2018-09-26  Jeff Law  <law@redhat.com>
2422         Revert
2423         2018-09-26  Alexey Neyman  <stilor@att.net>
2425         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2426         headers are no longer pulled in by <isl/val.h>.
2428 2018-09-26  Richard Biener  <rguenther@suse.de>
2430         PR debug/87443
2431         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
2432         or concrete instance DIE to the tree.  Create abstract origin
2433         attributes also for concrete instances.
2435 2018-09-26  Alexey Neyman  <stilor@att.net>
2437         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2438         headers are no longer pulled in by <isl/val.h>.
2440 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
2442         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
2443         Use new helper functions.
2444         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
2445         Use new helper functions.
2446         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
2447         aarch_mm_needs_release): New declarations.
2448         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
2449         aarch_mm_needs_release): New.
2451 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2453         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
2454         (arm32_output_mi_thunk): Deal with long calls.
2456 2018-09-26  Richard Biener  <rguenther@suse.de>
2458         PR debug/87428
2459         PR debug/87362
2460         * tree-inline.c (expand_call_inline): When the location
2461         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2462         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2463         the inserted BLOCK to make inlined_function_outer_scope_p
2464         recognize it.
2465         * dwarf2out.c (add_call_src_coords_attributes): Do not add
2466         coords for reserved locations.
2468 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2470         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
2471         (*call_indirect_nonlocal_sysv<mode>): Ditto.
2472         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
2473         (*sibcall_nonlocal_sysv<mode>): Ditto.
2474         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
2475         (<bd>_<mode>): Ditto.
2476         (<bd>tf_<mode>): Ditto.
2478 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2480         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
2481         control string as a list of templates instead of as C code.
2482         (*altivec_movti): Ditto.
2483         * config/rs6000/darwin.md (movdf_low_di): Ditto.
2485 2018-09-25  Jim Wilson  <jimw@sifive.com>
2487         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
2488         when target symbol is weak.
2490 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2492         PR c/87387
2493         * builtins.c (unterminated_array): Simplify.
2494         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
2495         where pointer arithmetic is safe.
2497 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2499         PR target/86987
2500         * config/rs6000/altivec.md (altivec_vspltb): Use
2501         const_0_to_15_operand instead of u5bit_cint_operand.
2502         (*altivec_vspltb_internal): Ditto.
2503         (altivec_vspltb_direct): Ditto.
2504         (altivec_vsplth): Use const_0_to_7_operand instead of
2505         u5bit_cint_operand.
2506         (*altivec_vsplth_internal): Ditto.
2507         (altivec_vsplth_direct): Ditto.
2508         (altivec_vspltw): Use const_0_to_3_operand instead of
2509         u5bit_cint_operand.
2510         (*altivec_vspltw_internal): Ditto.
2511         (altivec_vspltw_direct): Ditto.
2512         (altivec_vspltsf): Ditto.
2513         (*altivec_vspltsf_internal): Ditto.
2514         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
2515         various splats with the proper size immediate.  Reorder the various
2516         cases by ascending size of immediate, and put all such together.
2518 2018-09-25  Richard Biener  <rguenther@suse.de>
2520         PR debug/83941
2521         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
2522         GC-ification.
2523         (maybe_create_die_with_external_ref): Do not create
2524         DW_TAG_imported_unit here.
2525         (add_abstract_origin_attribute): Handle external BLOCK refs.
2526         (dwarf2out_abstract_function): Simplify LTO case.
2527         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
2528         rather than using maybe_create_die_with_external_ref.
2530 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
2532         PR target/71278
2533         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
2534         (frndintxf2_mask_pm_i387): Ditto.
2535         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
2536         Enable for !flag_trapping_math.
2537         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
2538         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
2539         Change operand 1 predicate to nonimmediate_operand.
2540         (attr "i387_cw"): Remove mask_pm.
2541         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
2542         (enum ix86_entity): Remove I387_MASK_PM.
2543         * config/i386/i386.c (ix86_i387_mode_needed): Do not
2544         handle I387_MASK_PM.
2545         (ix86_mode_needed): Ditto.
2546         (ix86_mode_after): Ditto.
2547         (ix86_mode_entry): Ditto.
2548         (ix86_mode_exit): Ditto.
2549         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
2551 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
2553         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
2554         to_update_switch_stmts to vNULL instead of calling create on them
2555         immediately.
2557 2018-09-25  Richard Biener  <rguenther@suse.de>
2559         PR tree-optimization/87402
2560         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
2561         (visit_phi): Re-instantiate handling of supposed to be VARYING
2562         but non-VARYING backedge value.
2564 2018-09-25  Richard Biener  <rguenther@suse.de>
2566         PR debug/83941
2567         * dwarf2out.c (struct sym_off_pair): New.
2568         (external_die_map): New global.
2569         (lookup_decl_die): When in LTO create DIEs lazily from the
2570         external_die_map.
2571         (lookup_block_die): New function, create DIEs lazily in LTO.
2572         (equate_block_to_die): New function.
2573         (dwarf2out_die_ref_for_decl): During WPA get the association
2574         from the external DIE map.
2575         (dwarf2out_register_external_die): Record mapping into the
2576         external DIE map.
2577         (maybe_create_die_with_external_ref): New function split out from
2578         DIE generation part of old dwarf2out_register_external_die.
2579         (add_abstract_origin_attribute): Do not return the DIE.  When
2580         in LTO reference externals directly.
2581         (dwarf2out_abstract_function): When in LTO ignore calls for
2582         decls with external DIEs (already present abstract instances).
2583         (gen_call_site_die): Adjust.
2584         (add_high_low_attributes): Likewise.
2585         (gen_lexical_block_die): Likewise.
2586         (gen_inlined_subroutine_die): Likewie.
2587         (gen_block_die): Likewise.
2588         (dwarf2out_inline_entry): Likewise.
2589         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
2590         DIEs.
2592 2018-09-25  Martin Liska  <mliska@suse.cz>
2594         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
2595         integers and not by a float value.
2597 2018-09-25  Martin Liska  <mliska@suse.cz>
2599         PR fortran/87394
2600         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
2601         instead of NULL.
2602         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
2603         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
2604         * godump.c (go_format_type): Remove extra parenthesis.
2606 2018-09-25  Martin Liska  <mliska@suse.cz>
2608         * alias.c (set_dest_equal_p): Remove unused function.
2609         * config/i386/i386.c (def_builtin_pure2): Likewise.
2610         * diagnostic-show-locus.c (class layout): Remove
2611         unused field.
2612         (layout::layout): Likewise here.
2613         * dump-context.h (class temp_dump_context): Likewise.
2614         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
2615         (add_AT_loclistsptr): Likewise.
2616         (add_AT_offset): Likewise.
2617         (get_AT_hi_pc): Likewise.
2618         (is_comdat_die): Likewise.
2619         (type_is_enum): Likewise.
2620         (ceiling): Likewise.
2621         (add_AT_vms_delta): Likewise.
2622         (is_class_die): Likewise.
2623         * edit-context.c (class line_event): Remove unused field.
2624         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
2625         unused function.
2626         * ipa-cp.c (ipa_get_vr_lat): Likewise.
2627         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
2628         (ok_for_base_p_nonstrict): Likewise.
2629         * tree-chrec.c (is_not_constant_evolution): Likewise.
2630         (chrec_fold_poly_cst): Likewise.
2631         * tree-if-conv.c (has_pred_critical_p): Likewise.
2632         * tree-ssa-coalesce.c (print_exprs): Likewise.
2633         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
2634         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
2635         * tree-vrp.c (value_ranges_intersect_p): Likewise.
2636         (value_range_nonnegative_p): Likewise.
2638 2018-09-25  Martin Liska  <mliska@suse.cz>
2640         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2641         Do not handle "GNU Pascal".
2642         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2643         Likewise.
2644         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
2645         from documentation. Likewise.
2646         * dbxout.c (dbxout_range_type): Likewise.
2647         * doc/cpp.texi: Likewise.
2648         * doc/extend.texi: Likewise.
2649         * doc/frontends.texi: Likewise.
2650         * doc/invoke.texi: Remove Pascal entry.
2651         * tree.def (CLEANUP_POINT_EXPR): Likewise.
2652         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
2654 2018-09-25  Martin Liska  <mliska@suse.cz>
2656         PR middle-end/86078
2657         * doc/invoke.texi: Document all parameters and remove default
2658         of the parameters.
2660 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2662         PR bootstrap/87417
2663         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
2664         contains HOST_WIDE_INTs when computing its size.
2666 2018-09-24  Jim Wilson  <jimw@sifive.com>
2668         PR target/87391
2669         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
2670         not TARGET_RVE.
2671         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
2673 2018-09-24  Andrew Pinski  <apinski@marvell.com>
2675         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2676         access prev before checking it for NULLness in the
2677         AARCH64_FUSE_CMP_BRANCH case.
2679 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
2681         PR target/82699
2682         * config/i386/i386.c (rest_of_insert_endbranch): Set
2683         endbr_queued_at_entrance to true and don't insert ENDBR if
2684         x86_function_profiler will be called.
2685         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2686         is true.
2687         * config/i386/i386.h (machine_function): Add
2688         endbr_queued_at_entrance.
2690 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2692         * genattrtab.c (mk_attr_alt): Use alternative_mask.
2693         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
2694         types.
2695         (check_attr_test): Use alternative_mask.
2696         (get_attr_value): Likewise.
2697         (compute_alternative_mask): Use alternative_mask and XWINT.
2698         (make_alternative_compare): Use alternative_mask.
2699         (attr_alt_subset_p): Use XWINT.
2700         (attr_alt_subset_of_compl_p): Likewise.
2701         (attr_alt_intersection): Use alternative_mask and XWINT.
2702         (attr_alt_union): Likewise.
2703         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
2704         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
2705         (simplify_test_exp): Use alternative_mask and XWINT.
2706         (write_test_expr): Use alternative_mask and XWINT, adjust bit
2707         number calculation to support 64 bits.  Generate code that
2708         checks 64-bit masks.
2709         (main): Use alternative_mask.
2710         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2712 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2714         PR target/80080
2715         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
2716         RETURN+USE when returning via %r14.
2718 2018-09-24  Martin Liska  <mliska@suse.cz>
2720         * gcov.c (output_lines): Print colorization legend
2721         for both flag_use_colors and flag_use_hotness_colors.
2722         Reword the help.
2724 2018-09-24  Martin Liska  <mliska@suse.cz>
2726         * coverage.c (get_coverage_counts): Use warning_at
2727         with current_function_decl location. Use %qD in warning
2728         message.
2730 2018-09-24  Martin Liska  <mliska@suse.cz>
2732         * memory-block.h (memory_block_pool::release): Annotate with
2733         valgrind that the memory is not accessible.
2735 2018-09-24  Martin Liska  <mliska@suse.cz>
2737         PR sanitizer/85774
2738         * asan.c: Make asan_handled_variables extern.
2739         * asan.h: Likewise.
2740         * cfgexpand.c (expand_stack_vars): Make sure
2741         a representative is unpoison if another
2742         variable in the partition is handled by
2743         use-after-scope sanitization.
2745 2018-09-24  Richard Biener  <rguenther@suse.de>
2747         PR tree-optimization/63155
2748         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2749         the worklist when the edge of the respective argument isn't
2750         executable.
2752 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2754         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
2755         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
2756         (MASK_CLASS_P): Update for rename.
2757         (MAYBE_MASK_CLASS_P): Ditto.
2758         (REG_CLASS_NAMES): Update.
2759         (REG_CLASS_CONTENT): Update.
2760         * config/i386/i386.c (regclass_map): Update for MASK_REG
2761         and ALL_MASK_REGS rename.
2762         * config/i386/constraints.md (Yk): Update for rename.
2763         (k): Ditto.
2765 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2767         * config/i386/i386.h (enum reg_class): Remove
2768         EVEX_SSE_REGS and MOD4_SSE_REGS.
2769         (REG_CLASS_NAMES): Update.
2770         (REG_CLASS_CONTENT): Update.
2771         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
2772         registers as ALL_SSE_REGS.
2773         (ix86_additional_allocno_class_p): Remove.
2774         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
2775         (ix86_register_priority): Lower priority of EVEX SSE registers.
2776         Use IN_RANGE macro where appropriate.
2777         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
2778         AVX-5124VNNIW checks.
2779         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
2780         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
2781         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
2782         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
2783         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
2784         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
2785         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
2786         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
2787         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
2788         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
2789         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
2790         * config/i386/constraints.md (Yh): Remove.
2792 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2794         * config/i386/i386.c (regclass_map): Declare integer REX registers
2795         as GENERAL_REGS.
2797 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
2799         * doc/service.texi (Service): Switch the fsf.org link to https.
2801 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2803         PR target/86798
2804         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2805         Define to speculation_safe_value_not_needed.
2807 2018-09-21  Florian Weimer  <fweimer@redhat.com>
2809         PR middle-end/81035
2810         * doc/extend.texi (Common Function Attributes): Mention that
2811         noreturn suppresses tail call optimization.
2813 2018-09-21  Jeff Law  <law@redhat.com>
2815         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
2816         vr_values::cleanup_edges_and_switches.
2817         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
2818         vr_values class.
2819         (identify_jump_threads): Remove EDGE_IGNORE handling.
2820         (execute_vrp): Move handling of to_remove_edges and
2821         to_update_switch_stmts into vr_values class member functions.
2822         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
2823         (to_update_switch_stmts): Likewise.
2824         * vr-values.c: Include cfghooks.h.
2825         (vr_values::vr_values): Initialize to_remove_edges and
2826         to_update_switch_stmts.
2827         (vr_values::~vr_values): Verify to_remove_edges and
2828         to_update_switch_stmts are empty.
2829         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2830         (vr_values::cleanup_edges_and_switches): New member function.
2831         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2832         function.  Add new data members.
2834 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
2836         PR tree-optimization/87309
2837         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2838         calls with pflags and alt_flags.
2839         (selftest::test_capture_of_dump_calls): Add test of interaction of
2840         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2842 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2844         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2846 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2848         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2850 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2852         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2853         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2854         (VXWORKS_LIBS_RTP): Minor reordering.
2856 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2858         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2859         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2861 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2863         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2864         (PTRDIFF_TYPE): Likewise.
2866 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2868         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2869         triplet, similar to support for VxWorks7.
2870         * config/vxworks-dummy.h: Provide a default definition
2871         of TARGET_VXWORKS64 to 0.
2873 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2875         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2876         * config/vxworks-dummy.h: here.
2878 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2880         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2882 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
2883             Bo Zhou  <zbo.zhou@hisilicon.com>
2885         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2886         * config/aarch64/aarch64-tune.md: Regenerated.
2887         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2888         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2889         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2891 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
2892             Julian Brown  <julian@codesourcery.com>
2894         * builtins.c (get_builtin_sync_mem): Handle address spaces.
2896 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2898         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2899         if the call takes a static chain.
2901 2018-09-21  Martin Liska  <mliska@suse.cz>
2903         * auto-profile.c (autofdo_source_profile::read): Do not
2904         set sum_all.
2905         (read_profile): Do not add working sets.
2906         (read_autofdo_file): Remove sum_all.
2907         (afdo_callsite_hot_enough_for_early_inline): Remove const
2908         qualifier.
2909         * coverage.c (struct counts_entry): Remove gcov_summary.
2910         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2911         do not support GCOV_TAG_PROGRAM_SUMMARY.
2912         (get_coverage_counts): Remove summary and expected
2913         arguments.
2914         * coverage.h (get_coverage_counts): Likewise.
2915         * doc/gcov-dump.texi: Remove -w option.
2916         * gcov-dump.c (dump_working_sets): Remove.
2917         (main): Do not support '-w' option.
2918         (print_usage): Likewise.
2919         (tag_summary): Likewise.
2920         * gcov-io.c (gcov_write_summary): Do not dump
2921         histogram.
2922         (gcov_read_summary): Likewise.
2923         (gcov_histo_index): Remove.
2924         (gcov_histogram_merge): Likewise.
2925         (compute_working_sets): Likewise.
2926         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2927         it not obsolete.
2928         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2929         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2930         (GCOV_HISTOGRAM_SIZE): Remove.
2931         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2932         (struct gcov_summary): Simplify rapidly just
2933         to runs and sum_max fields.
2934         (gcov_histo_index): Remove.
2935         (NUM_GCOV_WORKING_SETS): Likewise.
2936         (compute_working_sets): Likewise.
2937         * gcov-tool.c (print_overlap_usage_message): Remove
2938         trailing empty line.
2939         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2940         (output_lines): Remove program related line.
2941         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2942         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2943         histogram.
2944         (input_profile_summary): Do not read it.
2945         (merge_profile_summaries): And do not merge it.
2946         (input_symtab): Do not call removed function.
2947         * modulo-sched.c (sms_schedule): Do not print sum_max.
2948         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2949         removed when histogram method was invented.
2950         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2951         mode.
2952         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2953         GCOV coding style.
2954         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2955         and dump selected value.
2956         * profile.c (add_working_set): Remove.
2957         (get_working_sets): Likewise.
2958         (find_working_set): Likewise.
2959         (get_exec_counts): Do not work with working sets.
2960         (read_profile_edge_counts): Do not inform as sum_max is removed.
2961         (compute_branch_probabilities): Likewise.
2962         (compute_value_histograms): Remove argument for call of
2963         get_coverage_counts.
2964         * profile.h: Do not make gcov_summary const.
2966 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
2968         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2970 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2972         PR tree-optimization/86990
2973         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2974         Check that the entire merged store group is made of constants only for
2975         overlapping stores.
2977 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2979         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2980         (VTABLE_VERIFICATION_SPEC): Likewise.
2981         (SANITIZER_EARLY_SPEC): Likewise.
2982         (SANITIZER_SPEC): Likewise.
2983         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2984         * doc/invoke.texi (Link Options): Document -r.
2986 2018-09-20  Richard Biener <rguenther@suse.de>
2988         PR middle-end/87054
2989         * gimplify.c (gimplify_expr): Retain alignment of
2990         addressable lvalue in dereference.
2992 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
2994         PR bootstrap/87013
2995         * configure.ac: Check for .loc is_stmt support.
2996         * configure, config.in: Rebuilt.
2997         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2998         if not supported.
3000 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3002         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3003         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3004         -misel=no.
3006 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3008         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3009         VECTOR_OTHER.
3010         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3011         case VECTOR_OTHER.
3013 2018-09-20  Marek Polacek  <polacek@redhat.com>
3015         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3017 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3019         PR tree-optimization/87288
3020         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3021         into account when determining PEELING_FOR_NITERS.
3023 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3025         PR tree-optimization/86877
3026         * tree-vect-loop.c (vect_analyze_loop_2): Call
3027         vect_verify_datarefs_alignment.
3029 2018-09-19  Marek Polacek  <polacek@redhat.com>
3031         * doc/invoke.texi: Document -Wclass-conversion.
3033 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
3035         * config/pa/pa.c (pa_adjust_priority): Delete.
3036         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3038         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3039         (atomic_storehi): Likewise.
3040         (atomic_storesi): Likewise.
3041         (atomic_loaddi): Restore compare and swap exchange loop code.
3043 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
3045         PR rtl-optimization/86902
3046         * combine.c (try_combine): When changing the CC mode used, don't change
3047         an unrelated mode in other_insn to that new CC mode.
3049 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
3051         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3052         with %T in place of calls to dump_generic_expr.
3053         (prune_runtime_alias_test_list): Likewise.
3054         (create_runtime_alias_checks): Likewise.
3055         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3056         (vect_analyze_data_ref_dependence): Likewise.
3057         (vect_slp_analyze_data_ref_dependence): Likewise.
3058         (vect_record_base_alignment): Likewise.  Use %G in place of call
3059         to dump_gimple_stmt.
3060         (vect_compute_data_ref_alignment): Likewise.
3061         (verify_data_ref_alignment): Likewise.
3062         (vect_find_same_alignment_drs): Likewise.
3063         (vect_analyze_group_access_1): Likewise.
3064         (vect_analyze_data_ref_accesses): Likewise.
3065         (dependence_distance_ge_vf): Likewise.
3066         (dump_lower_bound): Likewise.
3067         (vect_prune_runtime_alias_test_list): Likewise.
3068         (vect_find_stmt_data_reference): Likewise.
3069         (vect_analyze_data_refs): Likewise.
3070         (vect_create_addr_base_for_vector_ref): Likewise.
3071         (vect_create_data_ref_ptr): Likewise.
3072         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3073         (vect_can_advance_ivs_p): Likewise.
3074         (vect_update_ivs_after_vectorizer): Likewise.
3075         (vect_gen_prolog_loop_niters): Likewise.
3076         (vect_prepare_for_masked_peels): Likewise.
3077         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3078         (vect_determine_vectorization_factor): Likewise.
3079         (vect_is_simple_iv_evolution): Likewise.
3080         (vect_analyze_scalar_cycles_1): Likewise.
3081         (vect_analyze_loop_operations): Likewise.
3082         (report_vect_op): Likewise.
3083         (vect_is_slp_reduction): Likewise.
3084         (check_reduction_path): Likewise.
3085         (vect_is_simple_reduction): Likewise.
3086         (vect_create_epilog_for_reduction): Likewise.
3087         (vect_finalize_reduction:): Likewise.
3088         (vectorizable_induction): Likewise.
3089         (vect_transform_loop_stmt): Likewise.
3090         (vect_transform_loop): Likewise.
3091         (optimize_mask_stores): Likewise.
3092         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3093         (vect_split_statement): Likewise.
3094         (vect_recog_over_widening_pattern): Likewise.
3095         (vect_recog_average_pattern): Likewise.
3096         (vect_determine_min_output_precision_1): Likewise.
3097         (vect_determine_precisions_from_range): Likewise.
3098         (vect_determine_precisions_from_users): Likewise.
3099         (vect_mark_pattern_stmts): Likewise.
3100         (vect_pattern_recog_1): Likewise.
3101         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3102         (vect_record_max_nunits): Likewise.
3103         (vect_build_slp_tree_1): Likewise.
3104         (vect_build_slp_tree_2): Likewise.
3105         (vect_print_slp_tree): Likewise.
3106         (vect_analyze_slp_instance): Likewise.
3107         (vect_detect_hybrid_slp_stmts): Likewise.
3108         (vect_detect_hybrid_slp_1): Likewise.
3109         (vect_slp_analyze_operations): Likewise.
3110         (vect_slp_analyze_bb_1): Likewise.
3111         (vect_transform_slp_perm_load): Likewise.
3112         (vect_schedule_slp_instance): Likewise.
3113         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3114         (vect_mark_stmts_to_be_vectorized): Likewise.
3115         (vect_init_vector_1): Likewise.
3116         (vect_get_vec_def_for_operand): Likewise.
3117         (vect_finish_stmt_generation_1): Likewise.
3118         (vect_check_load_store_mask): Likewise.
3119         (vectorizable_call): Likewise.
3120         (vectorizable_conversion): Likewise.
3121         (vectorizable_operation): Likewise.
3122         (vectorizable_load): Likewise.
3123         (vect_analyze_stmt): Likewise.
3124         (vect_is_simple_use): Likewise.
3125         (vect_get_vector_types_for_stmt): Likewise.
3126         (vect_get_mask_type_for_stmt): Likewise.
3127         * tree-vectorizer.c (increase_alignment): Likewise.
3129 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
3131         * doc/rtl.texi: Adjust vec_select description.
3132         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3133         non-constant selectors.
3135 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
3137         * config/aarch64/aarch64-protos.h
3138         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3139         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3140         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3141         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3142         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3143         (AARCH64_FL_PROFILE): Move index so flags are ordered.
3144         (AARCH64_ISA_RCPC8_4): New flag.
3145         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3146         to aarch64_offset_9bit_signed_unscaled_p.
3147         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3148         and use stlur.
3149         * config/aarch64/constraints.md (Ust): New constraint.
3150         * config/aarch64/predicates.md.
3151         (aarch64_9bit_offset_memory_operand): New predicate.
3152         (aarch64_rcpc_memory_operand): New predicate.
3154 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3156         PR rtl-optimization/87361
3157         * rtlanal.c (nonzero_bits1): Revert accidental change.
3159 2018-09-19  Richard Biener  <rguenther@suse.de>
3161         PR tree-optimization/87349
3162         PR tree-optimization/87342
3163         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3165 2018-09-18  Marek Polacek  <polacek@redhat.com>
3167         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3168         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3170 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3172         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3174 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3176         PR rtl-optimization/86882
3177         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3179 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
3181         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3182         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3184 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
3186         PR other/87353
3187         * doc/invoke.texi (Link Options): Fix formatting and grammar.
3189 2018-09-18  Richard Biener  <rguenther@suse.de>
3191         PR middle-end/63155
3192         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3193         (compute_samebase_partition_bases): Likewise.
3194         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3195         (gimple_can_coalesce_p): Simplify.
3197 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
3199         Handle a library implementation of ffs calling __builtin_ffs.
3200         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3201         (mmix_init_libfuncs): New function: make __builtin_ffs expand
3202         to __ffsdi2.
3204 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3206         * diagnostic-show-locus.c (class layout_range): Add field
3207         "m_original_idx".
3208         (layout_range::layout_range): Add "original_idx" param and use it
3209         to initialize new field.
3210         (make_range): Use 0 for original_idx.
3211         (layout::layout): Pass in index to calls to
3212         maybe_add_location_range.
3213         (layout::maybe_add_location_range): Add param "original_idx" and
3214         pass it on to layout_range.
3215         (layout::print_any_labels): Pass on range->m_original_idx to
3216         get_text call.
3217         (gcc_rich_location::add_location_if_nearby): Use 0 for
3218         original_idx.
3219         * gcc-rich-location.h (text_range_label::get_text): Update for new
3220         param.
3221         (range_label_for_type_mismatch::get_text): Likewise.
3223 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3225         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3227 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3229         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3230         format_string_diagnostic_t.
3231         (fmtwarn_n): Likewise.
3232         * substring-locations.c
3233         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3234         (format_warning_n_va): Convert to...
3235         (format_string_diagnostic_t::emit_warning_n_va): ...this.
3236         (format_warning_va): Convert to...
3237         (format_string_diagnostic_t::emit_warning_va): ...this.
3238         (format_warning_at_substring): Convert to...
3239         (format_string_diagnostic_t::emit_warning): ...this.
3240         (format_warning_at_substring_n): Convert to...
3241         (format_string_diagnostic_t::emit_warning_n): ...this.
3242         * substring-locations.h (class format_string_diagnostic_t): New
3243         class.
3244         (format_warning_va): Convert to
3245         format_string_diagnostic_t::emit_warning_va.
3246         (format_warning_n_va): Convert to
3247         format_string_diagnostic_t::emit_warning_n_va.
3248         (format_warning_at_substring): Convert to
3249         format_string_diagnostic_t::emit_warning.
3250         (format_warning_at_substring_n): Convert to
3251         format_string_diagnostic_t::emit_warning_n.
3253 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
3254             Bernd Schmidt <bernds_cb1@t-online.de>
3256         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3257         SImode args.
3259 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3261         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3262         operand 0 predicate to nonimmediate operand.
3263         (rint<mode>2_frndint): Remove insn pattern.
3264         (rint<mode>2): Change operand 1 predicate to general_operand.
3265         Extend operand 1 to XFmode and generate rintxf2 insn.
3266         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3267         Do not use X87MODEF mode macro.
3268         (frndintxf2_<rounding>_i387): Rename from
3269         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
3270         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3271         to XFmode and generate significandxf3 insn.
3273 2018-09-17  Richard Biener  <rguenther@suse.de>
3275         PR tree-optimization/87328
3276         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3277         visiting unexecutable backedges when not iterating.
3278         (do_rpo_vn): Mark all edges not executable even when not
3279         iterating.
3281 2018-09-17  Martin Jambor  <mjambor@suse.cz>
3283         PR c/63886
3284         * doc/invoke.texi (Warning Options): Likewise.
3286 2018-09-17  Richard Biener  <rguenther@suse.de>
3288         PR tree-optimization/87301
3289         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3290         clean EH info from leftover copy assignments.
3292 2018-09-17  Martin Liska  <mliska@suse.cz>
3294         PR gcov-profile/85871
3295         * gcov.c (output_intermediate_file): Fix out of bounds
3296         access.
3298 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
3300         * config/arc/arc.c: Object attributes for core4 not reflected
3301         correctly.
3302         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3303         core3).
3305 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
3307         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3309 2018-09-17  Martin Liska  <mliska@suse.cz>
3311         * doc/gcov.texi: Document new option --use-hotness-colors.
3312         * gcov.c (struct source_info): Declare new field.
3313         (source_info::source_info): Set default for maximum_count.
3314         (print_usage): Add new -q option.
3315         (process_args): Process it.
3316         (accumulate_line_info): Save src->maximum_count.
3317         (output_line_beginning): Make color line number if
3318         flag_use_hotness_colors is set.
3319         (output_line_details): Pass default argument value.
3320         (output_lines): Pass src->maximum_count.
3322 2018-09-17  Martin Liska  <mliska@suse.cz>
3324         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3325         Use processor_names table.
3326         * config/i386/i386.c (ix86_default_align): Use
3327         processor_cost_table for alignment values.
3328         (ix86_option_override_internal): Use processor_names.
3329         (ix86_function_specific_print): Likewise.
3330         * config/i386/i386.h (struct processor_costs):
3331         Add alignment values.
3332         (struct ptt): Remove and replace with const char *.
3333         * config/i386/x86-tune-costs.h (struct processor_costs):
3334         Declare default alignments for all costs.
3336 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
3338         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3339         symbolics or VR_VARYING ranges for ABS_EXPR.
3340         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3341         when range will wrap.
3343 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
3345         PR middle-end/86864
3346         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3347         before and after a JUMP_TABLE_DATA.
3349 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
3351         PR middle-end/87188
3352         * dojump.c (do_compare_and_jump): Canonicalize function pointers
3353         when one operand is a function pointer.  Use POINTER_TYPE_P and
3354         FUNC_OR_METHOD_TYPE_P.
3355         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3356         * fold-const.c (build_range_check): Likewise.
3357         * match.pd (simple_comparison): Likewise.
3359 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
3361         PR c/82967
3362         * spellcheck.c (get_edit_distance_cutoff): New function.
3363         (selftest::test_edit_distance_unit_test_oneway): Rename to...
3364         (selftest::test_get_edit_distance_one_way): ...this.
3365         (selftest::test_get_edit_distance_unit): Rename to...
3366         (selftest::test_get_edit_distance_both_ways): ...this.
3367         (selftest::test_edit_distances): Move tests to this new function,
3368         and test some more pairs of strings.  Update for above renaming.
3369         (selftest::get_old_cutoff): New function.
3370         (selftest::test_get_edit_distance_cutoff): New function.
3371         (selftest::assert_suggested_for): New function.
3372         (ASSERT_SUGGESTED_FOR): New macro.
3373         (selftest::assert_not_suggested_for): New function.
3374         (ASSERT_NOT_SUGGESTED_FOR): New macro.
3375         (selftest::test_suggestions): New function.
3376         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3377         tests to selftest::test_edit_distances and call it.  Add calls to
3378         selftest::test_get_edit_distance_cutoff and
3379         selftest::test_suggestions.
3380         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3381         (best_match::consider): Replace hard-coded cutoff calculation with
3382         a call to...
3383         (best_match::get_cutoff): New declaration.
3384         (best_match::get_best_meaningful_candidate): Likewise.
3386 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3388         * builtins.c (fold_builtin_strlen): Remove TODO comment.
3390 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3392         revert:
3393         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3395         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3396         terminated string literal.
3398 2018-09-14  Martin Sebor  <msebor@redhat.com>
3400         * builtins.c (unterminated_array): Handle ARRAY_REF.
3401         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
3402         * builtins.h (unterminated_array): Declare extern.
3403         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
3404         arrays.
3405         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
3406         calls.
3408 2018-09-14  Martin Sebor  <msebor@redhat.com>
3409             Jeff Law  <law@redhat.com>
3411         * builtins.c (unterminated_array): New.
3412         (expand_builtin_strcpy): Adjust.
3413         (expand_builtin_strcpy_args): Detect unterminated arrays.
3414         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
3415         unterminated arrays.
3416         * gimple-fold.h (get_maxval_strlen): Add argument.
3417         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
3419         * gimple-fold.c (get_range_strlen): Add argument.
3420         (get_maxval_strlen): Adjust.
3421         * gimple-fold.h (get_range_strlen): Add argument.
3423 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
3425         * config/i386/movdirintrin.h: Fix copyright year.
3427 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
3429         * reg-stack.c: Include regs.h.
3430         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
3431         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
3432         FIRST_STACK_REG, not DFmode.
3433         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
3434         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
3435         (change stack): Default register mode to the reg_raw_mode of
3436         FIRST_STACK_REG, not DFmode.
3437         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
3438         (*swapxf): Rename from swapxf.
3440 2018-09-14  Carl Love  <cel@us.ibm.com>
3442         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
3443         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
3445 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
3447         PR target/87224
3448         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
3449         alternatives.
3451 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
3453         PR target/85628
3454         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
3456 2018-09-14  Jason Merrill  <jason@redhat.com>
3458         Fix --enable-gather-detailed-mem-stats.
3459         * hash-table.c (hash_table_usage): Change from variable to function.
3460         * hash-table.h: Adjust.
3461         * Makefile.in: Add missing dependencies on hash-table.h.
3463 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3465         PR tree-optimization/87259
3466         PR lto/87283
3467         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
3468         execute_cse_reciprocals_1 has tried transforming.
3470 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
3472         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
3473         VR_VARYING for PLUS/MINUS_EXPR.
3475 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
3477         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
3478         formatting.
3480 2018-09-14  Richard Biener  <rguenther@suse.de>
3482         PR middle-end/63155
3483         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
3484         bits for the merged partition.
3486 2018-09-13  Martin Sebor  <msebor@redhat.com>
3487             Bernd Edlinger  <bernd.edlinger@hotmail.de>
3489         * builtins.h (c_srlen): Add argument.
3490         * builtins.c (warn_string_no_nul): New function.
3491         (c_strlen): Add argument and use it.  Update recursive calls.
3492         Pass DECL argument to string_constant to get info on non
3493         terminated strings.  Update *NONSTR as needed.
3494         (fold_builtin_strlen): Add argument to calls to c_strlen.
3495         Warn for unterminated arrays.
3496         (warn_string_no_null): Add prototype.
3497         * expr.c (string_constant): Update arguments.  Update recursive
3498         calls appropriately.  Detect missing NUL terminator and outermost
3499         declaration its missing in.
3500         Improve checks for arrays with nonzero lower bound or elements
3501         that are not a single byte.  Simplify offset computation.
3502         Simplify checks for non-NUL terminated strings.
3503         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
3504         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
3506 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3508         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
3509         correctly.
3510         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
3511         argument.  Fix range checks.
3512         * fold-const.h (c_getstr): Adjust protoype.
3513         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
3514         string is constant but contains no NUL byte.
3516         * expr.c (string_constant): Adjust function comment.
3517         Remove bogus check for zero termination.
3519         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
3521         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
3522         (get_constant_size): Don't make STRING_CSTs larger than they are.
3523         (check_string_literal): New check function for STRING_CSTs.
3524         (output_constant): Use it.
3526 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3528         PR target/86812
3529         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
3531 2018-09-13  Richard Biener  <rguenther@suse.de>
3533         PR tree-optimization/87263
3534         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
3535         (struct unwind_state): Add max_rpo field.
3536         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
3537         Compute max_rpo, the max RPO number a block can be backwards reached
3538         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
3539         separating it from the iterating mode.
3541 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
3543         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
3544         (rfs_decision): New scheduling decision.
3546 2018-09-13  Richard Biener  <rguenther@suse.de>
3548         PR bootstrap/87134
3549         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
3550         (vn_nary_op_insert_pieces_predicated): Do not write useless
3551         valid_dominated_by_p entry outside of the allocated storage.
3553 2018-09-13  Omar Sandoval  <osandov@osandov.com>
3554             Tom de Vries  <tdevries@suse.de>
3556         PR debug/86985
3557         * dwarf2out.c (is_c): New function.
3558         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
3560 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
3562         PR target/85628
3563         * config/aarch64/aarch64.md (*aarch64_bfxil):
3564         Define.
3565         * config/aarch64/constraints.md (Ulc): Define.
3566         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
3567         Define.
3568         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
3569         New function.
3571 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
3573         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
3574         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
3575         aarch64_layout_frame call.
3576         (aarch64_expand_epilogue): Likewise.
3577         (aarch64_initial_elimination_offset): Likewise.
3578         (aarch64_get_separate_components): Likewise.
3579         (aarch64_use_return_insn_p): Likewise.
3580         (aarch64_layout_frame): Remove unneeded check.
3582 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3584         * configure.ac: Only append
3585         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
3586         gcc_config_arguments if it was never reconfigured or last reconfigure
3587         was with different arguments.
3588         * configure: Regenerated.
3590 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3591             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3593         PR middle-end/87290
3594         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
3595         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
3597 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3599         PR tree-optimization/87287
3600         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
3601         X % C == 0 to X % (unsigned) C == 0 optimization to ...
3602         * match.pd (X % C == 0): ... here.  New optimization.
3604 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3606         PR middle-end/82853
3607         * expr.h (maybe_optimize_mod_cmp): Declare.
3608         * expr.c (mod_inv): New function.
3609         (maybe_optimize_mod_cmp): New function.
3610         (do_store_flag): Use it.
3611         * cfgexpand.c (expand_gimple_cond): Likewise.
3613 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
3614             Julian Brown  <julian@codesourcery.com>
3616         PR middle-end/86336
3617         * gimplify.c (gimplify_scan_omp_clauses): Set
3618         target_firstprivatize_array_bases in OpenACC parallel and kernels
3619         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
3620         OpenACC data regions.
3622 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
3624         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
3625         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
3627 2018-09-12  Richard Biener  <rguenther@suse.de>
3629         PR tree-optimization/87280
3630         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
3631         edge but unreachable target.
3632         (do_rpo_vn): For conservatively handling a PHI only mark
3633         the backedge executable but not the block reachable.
3635 2018-09-12  Richard Biener  <rguenther@suse.de>
3637         PR tree-optimization/87266
3638         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
3639         visited blocks.
3641 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
3643         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3644         constants.
3645         ("trunc<BFP:mode><DFP_ALL:mode>2")
3646         ("trunc<DFP_ALL:mode><BFP:mode>2")
3647         ("extend<BFP:mode><DFP_ALL:mode>2")
3648         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3649         according to the target operand type.
3651 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3652             Andreas Krebbel  <krebbel@linux.ibm.com>
3654         PR tree-optimization/86844
3655         * gimple-ssa-store-merging.c
3656         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
3657         there are any overlapping stores in between them, make sure they are
3658         also coalesced or we give up completely.
3660 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3662         PR middle-end/87248
3663         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3664         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
3666 2018-09-12  Tom de Vries  <tdevries@suse.de>
3668         * common.opt (gdescribe-dies): Add option.
3669         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
3670         attribute for artifical and nameless decls.
3671         (dwarf2out_register_external_die): Add description attribute to
3672         external reference die.
3673         (add_desc_attribute): New functions.
3674         (gen_subprogram_die): Add description attribute to
3675         DW_TAG_call_site_parameter.
3676         * tree-pretty-print.c (print_generic_expr_to_str): New function.
3677         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
3678         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
3679         -gno-describe-dies.
3680         (@item -gdescribe-dies): Add.
3682 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3684         * tree-vrp.c (vrp_shift_undefined_p): Remove.
3685         (extract_range_from_binary_expr_1: Call
3686         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
3687         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
3688         depend on sign.
3690 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3692         * gimple-ssa-warn-alloca.c
3693         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
3694         field for ALLOCA_BOUND_*_LARGE.
3696 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3698         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
3700 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3702         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
3703         for clobbers.  Remove obsolete comment.
3705 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3707         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
3708         mpxchk, mpxld and mpxst types.
3709         (define_attr length_immediate): Remove all processing of mpx types.
3710         (define_attr prefix_0f): Ditto.
3711         (define_attr memory): Ditto.
3713 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3715         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
3716         (log<mode>2): Change operand 1 predicate to general_operand.
3717         Extend operand 1 to XFmode and generate logxf3 insn.
3718         (log10<mode>2): Change operand 1 predicate to general_operand.
3719         Extend operand 1 to XFmode and generate log10xf3 insn.
3720         (log2<mode>2): Change operand 1 predicate to general_operand.
3721         Extend operand 1 to XFmode and generate log2xf3 insn.
3722         (fyl2xp1_extend<mode>xf3_i387): Remove.
3723         (log1p<mode>2): Change operand 1 predicate to general_operand.
3724         Extend operand 1 to XFmode and generate log1pxf3 insn.
3725         (fxtract_extend<mode>xf3_i387): Remove.
3726         (logb<mode>2): Change operand 1 predicate to general_operand.
3727         Extend operand 1 to XFmode and generate logbxf3 insn.
3728         (ilogb<mode>2): Change operand 1 predicate to general_operand.
3729         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
3730         (significand<mode>2): Change operand 1 predicate to general_operand.
3731         Extend operand 1 to XFmode and generate significandxf3 insn.
3733 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3735         * gcc.c (perror_with_name, pfatal_with_name): Delete.
3736         (load_specs): Use fatal_error.
3737         (DELETE_IF_ORDINARY, process_command): Use error.
3738         (execute, run_attempt): Use fatal_error.
3740 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
3742         * diagnostic-core.h (sorry_at): New prototype.
3743         * diagnostic.c (sorry_at): New function.
3745 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
3747         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
3748         by zero as VR_UNDEFINED.
3750 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3752         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
3753         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
3754         (<sincos>mode2): New expander.
3755         (sincos_extend<mode>xf3_i387): Remove insn pattern.
3756         (sincos -> sin, cos splitters): Remove splitter patterns.
3757         (sincos<mode>3): Change operand 2 predicate to general_operand.
3758         Extend operand 2 to XFmode and generate sincosxf3 insn.
3759         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
3760         Change operand 3 predicate to const1_operand.
3761         (fptan_extend<mode>xf4_i387): Remove insn pattern.
3762         (tanxf2): Update operands in the call to fptanxf4_i387.
3763         (tan<mode>2): Change operand 1 predicate to general_operand.
3764         Extend operand 1 to XFmode and generate tanxf3 insn.
3765         (atan2xf3): Rename from *fpatanxf3_i387.
3766         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
3767         (atan2xf3): Remove expander.
3768         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
3769         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
3770         (atan<mode>2): Change operand 1 predicate to general_operand.
3771         Extend operand 1 to XFmode and generate atanxf3 insn.
3773 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3775         * config/i386/i386.md (x87/SSE constant load splitter): Use
3776         memory_operand instead of nonimmediate_operand for input operand
3777         predicate.
3779 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
3781         * config/i386/i386.md (float partial SSE register stall splitter): Move
3782         splitter near its instruction pattern.
3783         (float_extend partial SSE register stall splitter): Ditto.
3784         (float_truncate partial SSE register stall splitter): Ditto.
3786 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
3788         PR target/86794
3789         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3790         to speculation_safe_value_not_needed.
3792         PR target/85666
3793         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3794         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3795         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3796         leaf_function_p, instead use has_hard_reg_initial_val.
3798 2018-09-09  Nathan Sidwell  <nathan@acm.org>
3800         * gcc.h (pfatal_with_name): Don't declare here.
3801         * gcc.c (pfatal_with_name): Make static.
3803 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3805         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
3806         earlyclobber.
3808 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
3810         PR rtl-optimization/85458
3811         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
3812         priority hook to reduce the priority of EXPR.
3814 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
3816         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
3817         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
3818         with X87_ENABLE_FLOAT.  Remove preparation code.
3819         (*float<SWI48:mode><MODEF:mode>2): Rename from
3820         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
3821         math using "enabled" attribute.
3822         (*floatdi<MODEF:mode>2_i387): Rename from
3823         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
3824         enable for 32bit targets only.
3825         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
3826         splitter.
3827         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3828         as operand 1 predicate.  Rewrite as define_insn_and_split.
3829         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3831 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3833         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3834         to fallthru to FLOAT case.
3836 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3838         PR target/86731
3839         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3840         around folding of vec_sl to handle out of range shift values.
3842 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3844         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3845         Update callers to gen_fix_trunc<mode>_i387_fisttp
3846         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3847         nonimmediate_operand.
3848         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3849         and corresponding splitters.
3850         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3851         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3852         (fix_truncdi_i387_with_temp): Remove insn pattern
3853         and corresponding splitters.
3854         (fix_trunc<mode>_i387): Change operand 0 predicate to
3855         nonimmediate_operand.
3856         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3857         and corresponding splitters.
3858         (*fistdi2_1): Remove.
3859         (fistdi2): Ditto.
3860         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3861         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
3862         (*fist<mode>2_1): Remove.
3863         (fist<mode>2): Ditto.
3864         (fist<mode>2_with_temp): Remove insn pattern and corresponding
3865         splitters.
3866         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
3867         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3868         (fistdi2_<rounding>): Change operand 0 predicate to
3869         nonimmediate_operand.
3870         (fistdi2_<rounding>_with_temp): Remove insn pattern
3871         and corresponding splitters.
3872         (fist<mode>2_<rounding>): Change operand 0 predicate to
3873         nonimmediate_operand.
3874         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3875         and corresponding splitters.
3877         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3879 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3881         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3882         the init value.
3884 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3886         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3887         early gimple folding of vec_splat().
3888         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3889         * gimple-fold.h: Add an extern define for tree_vec_extract().
3891 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3893         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3894         wrappers around TREE_TYPE comparisons.
3896 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3898         PR target/80080
3899         * config/s390/predicates.md: Add nonsym_memory_operand.
3900         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3901         contains a SYMBOL_REF, load it into an intermediate pseudo.
3902         (s390_emit_compare_and_swap): Legitimize operand.
3903         * config/s390/s390.md: Use the new nonsym_memory_operand
3904         with UNSPECV_CAS patterns.
3906 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3908         PR target/80080
3909         * config/s390/s390-passes.def: New file.
3910         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3911         declaration.
3912         (make_pass_s390_early_mach): Add declaration.
3913         * config/s390/s390.c (make_pass_s390_early_mach):
3914         (s390_option_override): Remove dynamic registration.
3915         * config/s390/t-s390: Add s390-passes.def.
3917 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3919         * config/s390/s390.c (s390_decompose_constant_pool_ref):
3920         Remove UNSPEC_LTREL_BASE check.
3921         (annotate_constant_pool_refs): Likewise.
3922         (find_constant_pool_ref): Likewise.
3923         (find_ltrel_base): Removed.
3924         (replace_ltrel_base): Removed.
3925         (s390_mainpool_finish): Remove replace_ltrel_base call.
3926         (s390_chunkify_start): Remove pending LTREL_BASE logic.
3927         (s390_chunkify_finish): Remove replace_ltrel_base call.
3928         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3930 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
3932         PR target/86779
3933         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3934         to speculation_safe_value_not_needed.
3936 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
3937             Bernd Schmidt  <bernds_cb1@t-online.de>
3939         * config/nvptx/nvptx-opts.h: New file.
3940         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3941         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3942         (ASM_SPEC): Define.
3943         (TARGET_SM35): New macro.
3944         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3945         correct predicate.
3946         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3947         values.
3948         (misa=): New option.
3949         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3951 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
3953         * config/i386/i386.md (truncdfsf2): Remove expander.
3954         (truncdfsf2_with_temp): Ditto.
3955         (truncxf<mode>2): Ditto.
3956         (*truncdfsf_fast_mixed): Remove insn pattern.
3957         (*truncdfsf_fast_i387): Ditto.
3958         (*truncdfsf_mixed): Ditto.
3959         (*truncdfsf_i387): Ditto.
3960         (*truncdfsf2_i387_1): Ditto.
3961         (*truncxfsf2_mixed): Ditto.
3962         (*truncxfdf2_mixed): Ditto.
3963         (*truncxf<mode>2_i387_noop): Ditto. Update callers
3964         to call gen_truncxf<mode>2 instead.
3965         (*truncxf<mode>2_i387): Remove.
3966         (reg->reg splitters): Remove splitter pattern.
3967         (reg->mem splitters): Ditto.
3969         (truncdfsf2): New insn pattern.
3970         (truncxf<mode>2): Ditto.
3972 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3974         * tree-ssa-math-opts.c (is_mult_by): New function.
3975         (is_square_of): Use the above.
3976         (optimize_recip_sqrt): New function.
3977         (pass_cse_reciprocals::execute): Use the above.
3979 2018-09-05  Richard Biener  <rguenther@suse.de>
3981         PR bootstrap/87134
3982         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3983         to zero-init the emplaced vec.
3985 2018-09-05  Martin Liska  <mliska@suse.cz>
3987         PR tree-optimization/87205
3988         * tree-switch-conversion.c (pass_lower_switch::execute):
3989         Group cases for switch statements.
3991 2018-09-05  Richard Biener  <rguenther@suse.de>
3993         PR tree-optimization/87217
3994         * tree-ssa-sccvn.c (vuse_valueize): New.
3995         (vn_reference_lookup_pieces): Use it.
3996         (vn_reference_lookup): Likewise.
3998 2018-09-05  Nathan Sidwell  <nathan@acm.org>
4000         PR c++/87137
4001         * stor-layout.c (place_field): Scan forwards to check last
4002         bitfield when ms_bitfield_placement is in effect.
4004 2018-09-05  Richard Biener  <rguenther@suse.de>
4006         PR bootstrap/87225
4007         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4008         return.
4010 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4011             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4013         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4014         * config.gcc (extra_objs): Build it.
4015         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4016         Likewise.
4017         * config/aarch64/aarch64-passes.def
4018         (pass_tag_collision_avoidance): New pass.
4019         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4020         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4021         (aarch64_classify_address): Remove static qualifier.
4022         (aarch64_address_info, aarch64_address_type): Move to...
4023         * config/aarch64/aarch64-protos.h: ... here.
4024         (make_pass_tag_collision_avoidance): New function.
4025         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4026         New tuning flag.
4028 2018-09-05  Martin Liska  <mliska@suse.cz>
4030         * doc/gcov.texi: Update documentation of humar
4031         readable mode.
4032         * gcov.c (format_count): Print one decimal place, it provides
4033         more fine number of situations like '1G' vs. '1.4G'.
4035 2018-09-05  Martin Liska  <mliska@suse.cz>
4037         PR target/87164
4038         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4039         * optc-gen.awk: Allow 'Var' for Deprecated options in order
4040         to generate a MASK value.
4042 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
4044         PR debug/86593
4045         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4046         if frame pointer isn't used.
4047         (compute_frame_pointer_to_fb_displacement): Likewise.
4049 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
4051         PR target/87198
4052         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4053         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4054         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4055         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4056         and OPTION_MASK_ISA_XSAVEC_UNSET.
4058 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
4060         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4061         XOR operations in NAND case.
4063 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4065         * wide-int-range.cc (wide_int_range_convert): New.
4066         * wide-int-range.h (wide_int_range_convert): New.
4067         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4068         code into wide_int_range_convert.
4069         (extract_range_into_wide_ints): Do not munge anti range constants
4070         into the entire domain.  Just return the range back.
4072 2018-09-04  Martin Liska  <mliska@suse.cz>
4074         * genmatch.c (output_line_directive): Add new argument
4075         fnargs.
4076         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4078 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4080         * doc/invoke.texi (Option Summary): Add whitespace.
4082         * doc/invoke.texi (Option Summary): Add -Waligned-new.
4084 2018-09-04  Richard Biener  <rguenther@suse.de>
4086         PR tree-optimization/87211
4087         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4088         backedge value we're supposed to treat as VARYING also number
4089         the PHI to VARYING in case it got a different value-number already.
4091 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4093         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4094         (extract_range_from_binary_expr_1): Do not call
4095         vrp_can_optimize_bit_op.
4096         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4097         static.
4098         (wide_int_range_get_mask_and_bounds): New.
4099         (wide_int_range_optimize_bit_op): New.
4100         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4101         (wide_int_range_bit_and): Same.
4102         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4103         (wide_int_range_optimize_bit_op): New.
4104         (wide_int_range_get_mask_and_bounds): New.
4106 2018-09-04  Richard Biener  <rguenther@suse.de>
4108         PR tree-optimization/87176
4109         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4110         variable.  When value-numbering a virtual PHI node make sure
4111         to not value-number to the backedge value.
4113 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4115         * doc/extend.texi (Long Long, Hex Floats): Document support for
4116         long long and hex floats in more recent versions of ISO C++.
4118 2018-09-03  Richard Biener  <rguenther@suse.de>
4120         PR tree-optimization/87177
4121         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4122         cleanup.
4124 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4126         * bb-reorder.c (edge_order): Convert to C-qsort-style
4127         tri-state comparator.
4128         (reorder_basic_blocks_simple): Change std::stable_sort to
4129         gcc_stablesort.
4131 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4133         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4134         tri-state comparator.
4135         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4137 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4139         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
4140         (mergesort): ... here as maximum count for using netsort.
4141         (gcc_qsort): Set nlim to 3 if stable sort is requested.
4142         (gcc_stablesort): New.
4143         * system.h (gcc_stablesort): Declare.
4145 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4147         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4148         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
4149         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
4151 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
4153         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4154         lxsdx and stxsdx alternatives.
4155         (*mov<mode>_hardfloat64): Ditto.
4156         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4158 2018-09-03  Richard Biener  <rguenther@suse.de>
4160         PR tree-optimization/87200
4161         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4162         simplify result.
4164 2018-09-03  Martin Liska  <mliska@suse.cz>
4166         PR tree-optimization/87201
4167         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4168         Fix parenthesis in an expression.
4170 2018-09-03  Richard Biener  <rguenther@suse.de>
4172         PR tree-optimization/87197
4173         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4174         visited.  CSE the VN_INFO hashtable lookup.
4176         PR tree-optimization/87169
4177         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4178         iterating make sure there's no extra backedges from irreducible
4179         regions feeding the header.  Mark the destination block
4180         executable.
4182 2018-09-03  Martin Liska  <mliska@suse.cz>
4184         PR driver/83193
4185         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4186         * common/common-targhooks.c (default_get_valid_option_values):
4187         New function.
4188         * common/common-targhooks.h (default_get_valid_option_values):
4189         Likewise.
4190         * common/config/i386/i386-common.c: Move processor_target_table
4191         from i386.c.
4192         (ix86_get_valid_option_values): New function.
4193         (TARGET_GET_VALID_OPTION_VALUES): New macro.
4194         * config/i386/i386.c (struct ptt): Move to i386-common.c.
4195         (PTA_*): Move all defined masks into i386-common.c.
4196         (ix86_function_specific_restore): Use new processor_cost_table.
4197         * config/i386/i386.h (struct ptt): Moved from i386.c.
4198         (struct pta): Likewise.
4199         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4200         * doc/tm.texi.in: Likewise.
4201         * opt-suggestions.c (option_proposer::suggest_option):
4202         Pass prefix to build_option_suggestions.
4203         (option_proposer::get_completions): Likewise.
4204         (option_proposer::build_option_suggestions): Use the new target
4205         hook.
4206         * opts.c (struct option_help_tuple): New struct.
4207         (print_filtered_help): Use the new target hook.
4209 2018-09-03  Martin Liska  <mliska@suse.cz>
4211         PR middle-end/59521
4212         * predict.c (set_even_probabilities): Add likely_edges
4213         argument and handle cases where we have precisely one
4214         likely edge.
4215         (combine_predictions_for_bb): Catch also likely_edges.
4216         (tree_predict_by_opcode): Handle gswitch statements.
4217         * tree-cfg.h (find_case_label_for_value): New declaration.
4218         (find_taken_edge_switch_expr): Likewise.
4219         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4220         Find pivot in decision tree based on probabily, not by number of
4221         nodes.
4223 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
4225         * doc/standards.texi (Standards): Update Objective-C reference.
4227 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4229         * doc/install.texi (Prerequisites): Update link for MPC.
4231 2018-09-01  Michael Matz  <matz@suse.de>
4233         PR tree-optimization/87074
4234         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4235         PHIs for outer-loop uses.
4237 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4239         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4240         * doc/invoke.texi (C Dialect Options): Ditto.
4242 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4244         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4246 2018-08-31  Richard Biener  <rguenther@suse.de>
4248         PR tree-optimization/87168
4249         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4250         (rpo_elim::eliminate_avail): When OP was not visited it must
4251         be available.
4253 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
4255         * tree-vrp.c (copy_value_range): Convert param "from" from
4256         "value_range *" to "const value_range *".
4257         (range_is_null): Likewise for param "vr".
4258         (range_int_cst_p): Likewise.
4259         (range_int_cst_singleton_p): Likewise.
4260         (symbolic_range_p): Likewise.
4261         (value_ranges_intersect_p): Likewise for both params.
4262         (value_range_nonnegative_p): Likewise for param "vr".
4263         (value_range_constant_singleton): Likewise.
4264         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4265         (extract_range_into_wide_ints): Likewise for param "vr".
4266         (extract_range_from_multiplicative_op): Likewise for params "vr0"
4267         and "vr1".
4268         (vrp_can_optimize_bit_op): Likewise.
4269         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4270         "vr1_".
4271         (extract_range_from_unary_expr): Likewise.
4272         (debug_value_range): Likewise for param "vr".
4273         (value_range::dump): Add "const" qualifier.
4274         (vrp_prop::check_array_ref): Convert local "vr" from
4275         "value_range *" to "const value_range *".
4276         (vrp_prop::check_mem_ref): Likewise.
4277         (vrp_prop::visit_stmt): Likewise for local "old_vr".
4278         (vrp_intersect_ranges_1): Likewise for param "vr_1".
4279         (vrp_intersect_ranges): Likewise.
4280         (simplify_stmt_for_jump_threading): Likewise for local "vr".
4281         (vrp_prop::vrp_finalize): Likewise.
4282         * tree-vrp.h (value_range::dump): Add "const" qualifier.
4283         (vrp_intersect_ranges): Add "const" qualifier to params as above.
4284         (extract_range_from_unary_expr): Likewise.
4285         (value_range_constant_singleton): Likewise.
4286         (symbolic_range_p): Likewise.
4287         (copy_value_range): Likewise.
4288         (extract_range_from_binary_expr_1): Likewise.
4289         (range_int_cst_p): Likewise.
4290         (vrp_set_zero_nonzero_bits): Likewise.
4291         (range_int_cst_singleton_p): Likewise.
4293 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
4295         * config/aarch64/arm_neon.h (vabsd_s64): New.
4296         (vnegd_s64): Likewise.
4298 2018-08-31  Martin Jambor  <mjambor@suse.cz>
4300         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4302 2018-08-31  Martin Liska  <mliska@suse.cz>
4304         * ipa-icf.c (sem_item::add_type): Use
4305         sem_item::m_type_hash_cache.
4306         * ipa-icf.h: Move the cache from sem_item_optimizer
4307         to sem_item.
4309 2018-08-31  Nathan Sidwell  <nathan@acm.org>
4311         * doc/extend.texi (Backwards Compatibility): Remove implicit
4312         extern C leeway of () being (...).
4314 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4316         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4318 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
4320         PR target/86684
4321         PR target/87149
4322         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4324 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
4326         PR middle-end/87138
4327         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4328         gen_int_mode.  Formatting fixes.
4330 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
4332         * target.def (custom_function_descriptors): Improve documentation.
4333         * doc/tm.texi.in (Trampolines): Expand discussion of function
4334         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4335         beginning of the section.
4336         * doc/tm.texi: Regenerated.
4338 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
4340         * cfg.h (class auto_edge_flag): Spell out the template-id of the
4341         base class in the initializer list.  This is a workaround for
4342         building with older GCC.
4343         (class auto_bb_flag): Likewise.
4345 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
4347         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4348         (altivec_vcmpequ<VI_char>_p): Remove star.
4349         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4350         vector load modes.
4351         (expand_strncmp_vec_sequence): New function.
4352         (emit_final_str_compare_vec): New function.
4353         (expand_strn_compare): Add support for vector strncmp.
4354         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4355         length specification to bytes.
4356         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4357         (vcmpnezb_p): New pattern.
4358         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4359         for option -mstring-compare-inline-limit.
4361 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
4363         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4364         (PTA_SKYLAKE): Add PTA_AES.
4365         (PTA_GOLDMONT): Likewise.
4367 2018-08-29  Jan Hubicka  <jh@suse.cz>
4369         PR lto/86517
4370         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4371         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4373 2018-08-29  Jan Hubicka  <jh@suse.cz>
4375         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4376         TYPE_STUB_DECL.
4377         (hash_tree): Do not visit TYPE_STUB_DECL.
4378         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4379         stream TYPE_STUB_DECL.
4380         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4381         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4382         after free_lang_data.
4383         (type_in_anonymous_namespace_p): Likewise.
4385 2018-08-29  Jan Hubicka  <jh@suse.cz>
4387         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4388         comment that it has to be even number.
4389         (class sreal): Change m_sig type to int32_t.
4390         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4391         int64_t for temporary calculations.
4392         (sreal_verify_basics): Drop one bit from minimum and maximum.
4394 2018-08-30  Richard Biener  <rguenther@suse.de>
4396         PR tree-optimization/87147
4397         * tree-ssa-sccvn.c (SSA_VISITED): New function.
4398         (visit_phi): When the degenerate result is from the backedge and
4399         we didn't visit its definition yet drop to VARYING.
4400         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
4402 2018-08-29  Jan Hubicka  <jh@suse.cz>
4404         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
4405         DECL_VINDEX.
4406         (hash_tree): Likewise.
4408 2018-08-29  Jan Hubicka  <jh@suse.cz>
4410         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
4411         and TYPE_NEXT_REF_TO.
4413 2018-08-29  Jan Hubicka  <jh@suse.cz>
4415         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4416         comment that it has to be even number.
4417         (class sreal): Change m_sig type to int32_t.
4418         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4419         int64_t for temporary calculations.
4420         (sreal_verify_basics): Drop one bit from minimum and maximum.
4422 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
4424         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
4426 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
4428         PR middle-end/86995
4429         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
4430         if to_add is negative.
4432 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4434         PR middle-end/87053
4435         * builtins.c (c_strlen): Improve range checks.
4437 2018-08-29  Martin Sebor  <msebor@redhat.com>
4438             Jeff Law  <law@redhat.com>
4440         PR tree-optimization/86714
4441         PR tree-optimization/86711
4442         * builtins.c (c_strlen): Add arguments to call to string_constant.
4443         * expr.c (string_constant): Add argument.  Detect missing nul
4444         terminator and outermost declaration it's missing in.
4445         * expr.h (string_constant): Add argument.
4446         * fold-const.c (read_from_constant_string): Add arguments to call to
4447         string_constant.
4448         (c_getstr): Likewise.
4449         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4450         to string_constant.
4451         * tree-ssa-strlen.c (get_stridx): Likewise.
4453 2018-08-29  Jan Hubicka  <jh@suse.cz>
4455         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
4456         Do not stream DECL_VINDEX.
4457         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
4458         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
4459         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
4461 2018-08-29  Richard Biener  <rguenther@suse.de>
4463         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
4464         virtual operands that are not default defs to honor region
4465         boundaries.
4466         (rpo_vn_valueize): Remove ineffective code here.
4468 2018-08-29  Richard Biener  <rguenther@suse.de>
4470         PR tree-optimization/87132
4471         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
4472         when skipping defs reachable over backedges.
4474 2018-08-29  Richard Biener  <rguenther@suse.de>
4476         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
4477         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
4478         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
4479         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
4480         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
4481         (vn_reference_lookup_3): Remove use of const_parms.
4482         (free_rpo_vn): Do not free const_parms.
4483         (do_rpo_vn): Do not call init_const_parms.
4484         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
4485         SSA_NAME_POINTS_TO_READONLY_MEMORY.
4486         (call_may_clobber_ref_p_1): Likewise.
4488 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
4490         PR other/86726
4491         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
4492         (-O): Ditto.
4493         (-ftree-scev-cprop): Document.
4495 2018-08-29  Jan Hubicka  <jh@suse.cz>
4497         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
4498         parameters.
4499         (sreal constructor): Update.
4500         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
4501         sreal:operator/): Update.
4503 2018-08-29  Martin Liska  <mliska@suse.cz>
4505         * tree-switch-conversion.c (switch_conversion::expand):
4506         Strenghten assumption about gswitch statements.
4508 2018-08-29  Richard Biener  <rguenther@suse.de>
4510         PR tree-optimization/87117
4511         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
4512         re-value-number released SSA VDEFs.
4514 2018-08-29  Richard Biener  <rguenther@suse.de>
4516         PR tree-optimization/87126
4517         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
4519 2018-08-28  Jim Wilson  <jimw@sifive.com>
4521         * config/riscv/pic.md: Rewrite.
4522         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
4523         invalid address.
4524         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
4525         (SOFTF, default_load, softload, softstore): New.
4527 2018-08-28  Jeff Law  <law@redhat.com>
4529         * fold-const.c (fold_binary_loc): Remove recently added assert.
4531 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
4533         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
4534         to OP parmeter of generated function.
4536 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
4538         PR tree-optimization/87009
4539         * match.pd: Add boolean optimizations.
4541 2018-08-28  Martin Sebor  <msebor@redhat.com>
4543         PR middle-end/86631
4544         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
4545         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
4546         (pass_walloca::gate): Use it.
4547         (alloca_call_type): Same.
4548         (pass_walloca::execute): Same.
4549         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
4551 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
4553         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
4554         GCC_VERSION for usage of "__gcc_dump_printf__" format from
4555         >= 3005 to >= 9000.
4557 2018-08-28  Richard Biener  <rguenther@suse.de>
4559         PR tree-optimization/87124
4560         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
4561         constants before looking up avail.
4563 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
4565         PR middle-end/87099
4566         * calls.c (maybe_warn_nonstring_arg): Punt early if
4567         warn_stringop_overflow is zero.  Don't call get_range_strlen
4568         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
4569         Swap comparison operands to have constants on rhs.  Only use
4570         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
4571         increment lenrng[0].
4573 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
4575         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
4576         use of tree_to_shwi.  Remove duplicated test for the size being
4577         a whole number of bytes.
4579 2018-08-28  Richard Biener  <rguenther@suse.de>
4581         PR tree-optimization/87117
4582         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
4583         Handle removed stmt without LHS (GIMPLE_NOP).
4585 2018-08-28  Richard Biener  <rguenther@suse.de>
4587         PR tree-optimization/87117
4588         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
4589         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
4591 2018-08-28  Richard Biener  <rguenther@suse.de>
4593         PR tree-optimization/87117
4594         * tree-ssa-pre.c (compute_avail): Do not make expressions
4595         with predicated values available.
4596         (get_expr_value_id): Assert we do not run into predicated value
4597         expressions.
4599 2018-08-28  Richard Biener  <rguenther@suse.de>
4601         PR tree-optimization/87117
4602         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
4603         get virtual operands.
4604         (get_expr_operands): Handle STRING_CST like other decls.
4606 2018-08-28  Martin Liska  <mliska@suse.cz>
4608         * tree.h: Update documentation of fndecl_built_in_p
4609         functions.
4612 2018-08-27  Jeff Law  <law@redhat.com>
4613         PR tree-optimization/87110
4614         * tree-ssa-dse.c (compute_trims): Handle non-constant
4615         TYPE_SIZE_UNIT.
4617 2018-08-27  Martin Sebor  <msebor@redhat.com>
4619         PR tree-optimization/86914
4620         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
4622 2018-08-27  Martin Sebor  <msebor@redhat.com>
4624         PR tree-optimization/87112
4625         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
4626         the type of the bound argument.
4628 2018-08-27  Jeff Law  <law@redhat.com>
4630         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
4631         type does not have a TYPE_SIZE_UNIT.
4633 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
4635         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
4636         with include of backend.h.
4638 2018-08-27  Richard Biener  <rguenther@suse.de>
4640         PR tree-optimization/86927
4641         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
4642         use const cond reduction code.
4644 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
4646         PR tree-optimization/85758
4647         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
4649 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4651         PR c++/87091
4652         * diagnostic-show-locus.c (class layout_range): Update for
4653         conversion of show_caret_p to a tri-state.
4654         (layout_range::layout_range): Likewise.
4655         (make_range): Likewise.
4656         (layout::maybe_add_location_range): Likewise.
4657         (layout::should_print_annotation_line_p): Don't show annotation
4658         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
4659         (layout::get_state_at_point): Update for conversion of
4660         show_caret_p to a tri-state.  Bail out early for
4661         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
4662         underlining or source colorization.
4663         (gcc_rich_location::add_location_if_nearby): Update for conversion
4664         of show_caret_p to a tri-state.
4665         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
4666         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
4667         Likewise.
4668         (selftest::test_one_liner_labels): Likewise.
4669         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
4670         conversion of show_caret_p to a tri-state.
4671         * pretty-print.c (text_info::set_location): Likewise.
4672         * pretty-print.h (text_info::set_location): Likewise.
4673         * substring-locations.c (format_warning_n_va): Likewise.
4674         * tree-diagnostic.c (default_tree_printer): Likewise.
4675         * tree-pretty-print.c (newline_and_indent): Likewise.
4677 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4679         PR c++/87091
4680         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
4681         line above for line-insertion fix-it hints.
4682         (selftest::test_fixit_insert_containing_newline): Update the
4683         expected results, and add a test with line-numbering enabled.
4685 2018-08-27  Martin Liska  <mliska@suse.cz>
4687         PR sanitizer/86962
4688         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
4689         params with DECL_HAS_VALUE_EXPR_P.
4691 2018-08-27  Martin Liska  <mliska@suse.cz>
4693         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4694         selected expansion strategy.
4696 2018-08-27  Martin Liska  <mliska@suse.cz>
4698         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
4699         * builtins.c (is_builtin_fn): Likewise.
4700         * attribs.c (diag_attr_exclusions): Use new function
4701         fndecl_built_in_p and remove check for FUNCTION_DECL if
4702         possible.
4703         (builtin_mathfn_code): Likewise.
4704         (fold_builtin_expect): Likewise.
4705         (fold_call_expr): Likewise.
4706         (fold_builtin_call_array): Likewise.
4707         (fold_call_stmt): Likewise.
4708         (set_builtin_user_assembler_name): Likewise.
4709         (is_simple_builtin): Likewise.
4710         * calls.c (gimple_alloca_call_p): Likewise.
4711         (maybe_warn_nonstring_arg): Likewise.
4712         * cfgexpand.c (expand_call_stmt): Likewise.
4713         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
4714         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
4715         (cgraph_node::verify_node): Likewise.
4716         * cgraphclones.c (build_function_decl_skip_args): Likewise.
4717         (cgraph_node::create_clone): Likewise.
4718         * config/arm/arm.c (arm_insert_attributes): Likewise.
4719         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
4720         * dse.c (scan_insn): Likewise.
4721         * expr.c (expand_expr_real_1): Likewise.
4722         * fold-const.c (operand_equal_p): Likewise.
4723         (fold_binary_loc): Likewise.
4724         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4725         * gimple-low.c (lower_stmt): Likewise.
4726         * gimple-pretty-print.c (dump_gimple_call): Likewise.
4727         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
4728         Likewise.
4729         * gimple.c (gimple_build_call_from_tree): Likewise.
4730         (gimple_call_builtin_p): Likewise.
4731         (gimple_call_combined_fn): Likewise.
4732         * gimplify.c (gimplify_call_expr): Likewise.
4733         (gimple_boolify): Likewise.
4734         (gimplify_modify_expr): Likewise.
4735         (gimplify_addr_expr): Likewise.
4736         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
4737         * ipa-cp.c (determine_versionability): Likewise.
4738         * ipa-fnsummary.c (compute_fn_summary): Likewise.
4739         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
4740         * ipa-split.c (visit_bb): Likewise.
4741         (split_function): Likewise.
4742         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4743         * lto-cgraph.c (input_node): Likewise.
4744         * lto-streamer-out.c (write_symbol): Likewise.
4745         * omp-low.c (setjmp_or_longjmp_p): Likewise.
4746         (lower_omp_1): Likewise.
4747         * predict.c (strip_predict_hints): Likewise.
4748         * print-tree.c (print_node): Likewise.
4749         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
4750         * trans-mem.c (is_tm_irrevocable): Likewise.
4751         (is_tm_load): Likewise.
4752         (is_tm_simple_load): Likewise.
4753         (is_tm_store): Likewise.
4754         (is_tm_simple_store): Likewise.
4755         (is_tm_abort): Likewise.
4756         (tm_region_init_1): Likewise.
4757         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
4758         * tree-cfg.c (verify_gimple_call): Likewise.
4759         (move_stmt_r): Likewise.
4760         (stmt_can_terminate_bb_p): Likewise.
4761         * tree-eh.c (lower_eh_constructs_2): Likewise.
4762         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
4763         * tree-inline.c (remap_gimple_stmt): Likewise.
4764         (copy_bb): Likewise.
4765         (estimate_num_insns): Likewise.
4766         (fold_marked_statements): Likewise.
4767         * tree-sra.c (scan_function): Likewise.
4768         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
4769         (optimize_stack_restore): Likewise.
4770         (pass_fold_builtins::execute): Likewise.
4771         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
4772         (mark_all_reaching_defs_necessary_1): Likewise.
4773         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
4774         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4775         (pass_forwprop::execute): Likewise.
4776         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4777         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4778         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
4779         * tree-ssa-strlen.c (get_string_length): Likewise.
4780         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
4781         (find_func_aliases_for_call): Likewise.
4782         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
4783         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
4784         * tree-tailcall.c (find_tail_calls): Likewise.
4785         * tree.c (need_assembler_name_p): Likewise.
4786         (free_lang_data_in_decl): Likewise.
4787         (get_call_combined_fn): Likewise.
4788         * ubsan.c (is_ubsan_builtin_p): Likewise.
4789         * varasm.c (incorporeal_function_p): Likewise.
4790         * tree.h (DECL_BUILT_IN): Remove and replace with
4791         fndecl_built_in_p.
4792         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
4793         (fndecl_built_in_p): New.
4795 2018-08-27  Martin Liska  <mliska@suse.cz>
4797         PR tree-optimization/86847
4798         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
4799         Dump also subtree probability.
4800         (switch_decision_tree::do_jump_if_equal): New function.
4801         (switch_decision_tree::emit_case_nodes): Handle special
4802         situations in balanced tree that can be emitted much simpler.
4803         Fix calculation of probabilities that happen in tree expansion.
4804         * tree-switch-conversion.h (struct cluster): Add
4805         is_single_value_p.
4806         (struct simple_cluster): Likewise.
4807         (struct case_tree_node): Add new function has_child.
4808         (do_jump_if_equal): New.
4810 2018-08-27  Martin Liska  <mliska@suse.cz>
4812         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
4813         Add new argument to bit_test_cluster constructor.
4814         (bit_test_cluster::emit): Set bits really number of values
4815         handlel by a test.
4816         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
4817         probability argument.
4818         * tree-switch-conversion.h (struct bit_test_cluster):
4819         Add m_handles_entire_switch.
4821 2018-08-27  Martin Liska  <mliska@suse.cz>
4823         PR tree-optimization/86702
4824         * tree-switch-conversion.c (jump_table_cluster::emit):
4825         Make probabilities even for values in jump table
4826         according to number of cases handled.
4827         (switch_decision_tree::compute_cases_per_edge): Pass
4828         argument to reset_out_edges_aux function.
4829         (switch_decision_tree::analyze_switch_statement): Likewise.
4830         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4831         Make it static.
4833 2018-08-27  Martin Liska  <mliska@suse.cz>
4835         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4836         cfun argument explicitly.
4837         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4838         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4839         function gimple_switch_default_bb.
4840         (convert_switch_statements):
4841         (expand_builtins):
4842         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4843         * stmt.c (label_to_block_fn): Use label_to_block and pass
4844         cfun argument explicitly and use gimple_switch_label_bb.
4845         (expand_case): Likewise.
4846         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4847         cfun argument explicitly. Likewise.
4848         (make_edges_bb): Likewise.
4849         (make_cond_expr_edges): Likewise.
4850         (get_cases_for_edge): Likewise.
4851         (make_gimple_switch_edges): Likewise.
4852         (label_to_block_fn): Likewise.
4853         (label_to_block): Likewise.
4854         (make_goto_expr_edges): Likewise.
4855         (make_gimple_asm_edges): Likewise.
4856         (main_block_label): Likewise.
4857         (group_case_labels_stmt): Likewise.
4858         (find_taken_edge_computed_goto): Likewise.
4859         (find_taken_edge_switch_expr): Likewise.
4860         (gimple_verify_flow_info): Likewise.
4861         (gimple_redirect_edge_and_branch): Likewise.
4862         (gimple_switch_label_bb): New function.
4863         (gimple_switch_default_bb): Likewise.
4864         (gimple_switch_edge): Likewise.
4865         (gimple_switch_default_edge): Likewise.
4866         * tree-cfg.h (label_to_block_fn): Remove and replace ...
4867         (label_to_block): ... with this.
4868         (gimple_switch_label_bb): New.
4869         (gimple_switch_default_bb): Likewise.
4870         (gimple_switch_edge): Likewise.
4871         (gimple_switch_default_edge): Likewise.
4872         * tree-cfgcleanup.c (convert_single_case_switch): Use
4873         new gimple functions and pass new argument to label_to_block.
4874         (cleanup_control_flow_bb):
4875         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4876         cfun argument explicitly.
4877         (make_eh_edges): Likewise.
4878         (redirect_eh_dispatch_edge): Likewise.
4879         (lower_resx): Likewise.
4880         (lower_eh_dispatch): Likewise.
4881         (maybe_remove_unreachable_handlers): Likewise.
4882         (unsplit_eh): Likewise.
4883         (cleanup_empty_eh): Likewise.
4884         (verify_eh_edges): Likewise.
4885         (verify_eh_dispatch_edge): Likewise.
4886         * tree-ssa-dom.c (record_edge_info): Likewise.
4887         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4888         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4889         (thread_through_normal_block): Likewise.
4890         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4891         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4892         * tree-switch-conversion.c (switch_conversion::collect): Use new
4893         gimple functions.
4894         (switch_conversion::check_final_bb): Likewise.
4895         (switch_conversion::gather_default_values): Pass new argument
4896         to label_to_block.
4897         (switch_conversion::build_constructors): Likewise.
4898         (switch_decision_tree::compute_cases_per_edge): Use new
4899         gimple_switch_edge function.
4900         (switch_decision_tree::analyze_switch_statement): Pass new argument
4901         to label_to_block.
4902         (switch_decision_tree::try_switch_expansion): Use
4903         gimple_switch_default_edge.
4904         * tree-vrp.c (find_switch_asserts): Pass new argument
4905         to label_to_block.
4906         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4907         (vr_values::simplify_switch_using_ranges): Likewise.
4909 2018-08-27  Richard Biener  <rguenther@suse.de>
4911         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4912         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4914         * tree-ssa-sccvn.h (struct vn_pval): New structure.
4915         (struct vn_nary_op_s): Add unwind_to member.  Add
4916         predicated_values flag and put result into a union together
4917         with a linked list of vn_pval.
4918         (struct vn_ssa_aux): Add name member to make maintaining
4919         a map of SSA name to vn_ssa_aux possible.  Remove no longer
4920         needed info, dfsnum, low, visited, on_sccstack, use_processed
4921         and range_info_anti_range_p members.
4922         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4923         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4924         New functions.
4925         (vn_valueize): New global.
4926         (vn_context_bb): Likewise.
4927         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4928         VN_INFO_PTR_INFO): Remove.
4929         * tree-ssa-sccvn.c: ... (rewrite)
4930         (pass_fre::execute): For -O2+ initialize loops and run
4931         RPO VN in optimistic mode (iterating).  For -O1 and -Og
4932         run RPO VN in non-optimistic mode.
4933         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4934         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4935         * doc/invoke.texi (sccvn-max-scc-size): Remove.
4936         (rpo-vn-max-loop-depth): Document.
4937         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4938         when valuezing the VUSE signals we walked out of the region.
4939         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4940         (phi_translate): Set VN context block to use for availability
4941         lookup.
4942         (compute_avail): Likewise.
4943         (pre_valueize): New function.
4944         (pass_pre::execute): Adjust to the RPO VN API.
4946         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4947         (propagate_constants_for_unrolling): Remove.
4948         (tree_unroll_loops_completely): Perform value-numbering
4949         on the unrolled bodies loop parent.
4951 2018-08-27  Richard Biener  <rguenther@suse.de>
4953         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4954         for partial antic compute.
4956 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
4958         PR rtl-optimization/87065
4959         * combine.c (simplify_if_then_else): Formatting fix.
4960         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4961         check.
4962         (known_cond): Don't return const_true_rtx for vector modes.  Use
4963         CONST0_RTX instead of const0_rtx.  Formatting fixes.
4965 2018-08-27  Martin Liska  <mliska@suse.cz>
4967         PR gcov-profile/87069
4968         * gcov.c (process_file): Record files already processed
4969         and warn about a file being processed multiple times.
4971 2018-08-27  Martin Liska  <mliska@suse.cz>
4973         PR driver/83193
4974         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4975         Set default values for x_aarch64_*_string strings.
4976         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4977         prefix.  For -mabi do not print '=ABI' in help and use
4978         <option_value> format for -msve-vector-bits and -moverride
4979         options.
4981 2018-08-26  Jeff Law  <law@redhat.com>
4983         * config/mips/frame-header-opt.c: Include "backend.h" rather than
4984         "cfg.h"
4986 2018-08-26  Marek Polacek  <polacek@redhat.com>
4988         PR c++/87029, Implement -Wredundant-move.
4989         * doc/invoke.texi: Document -Wredundant-move.
4991 2018-08-25  Martin Sebor  <msebor@redhat.com>
4993         PR tree-optimization/87059
4994         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4995         to the same type as the other.
4996         * fold-const.c (fold_binary_loc): Assert expectation.
4998 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
5000         * config/darwin.c (machopic_legitimize_pic_address): Clean up
5001         extraneous parentheses, dead code section and formatting.
5003 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
5005         PR c++/87091
5006         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5007         wide enough for jumps in the line-numbering to be visible.
5008         (layout::print_gap_in_line_numbering): New member function.
5009         (layout::calculate_line_spans): When using line numbering, merge
5010         line spans that are only 1 line apart.
5011         (diagnostic_show_locus): When printing line numbers, show gaps in
5012         line numbering directly, rather than printing headers.
5013         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5014         line-numbering with multiple line spans.
5015         (selftest::test_fixit_insert_containing_newline_2): Add test of
5016         line-numbering, in which the spans are close enough to be merged.
5018 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5020         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5021         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
5022         * tree-vrp.c (range_is_nonnull): Remove.
5023         (range_includes_zero_p): Accept value_range instead of min/max.
5024         (extract_range_from_binary_expr_1): Do not early bail on
5025         POINTER_PLUS_EXPR.
5026         Use range_includes_zero_p instead of range_is_nonnull.
5027         (extract_range_from_unary_expr): Use range_includes_zero_p instead
5028         of range_is_nonnull.
5029         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
5030         special case VR_ANTI_RANGE.
5031         (vrp_finalize): Same.
5032         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5033         instead of min/max.
5034         (range_is_nonnull): Remove.
5035         * vr-values.c (vrp_stmt_computes_nonzero): Use
5036         range_includes_zero_p instead of range_is_nonnull.
5037         (extract_range_basic): Pass value_range to range_includes_zero_p
5038         instead of range_is_nonnull.
5040 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
5042         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5043         * emit-rtl.h (rtl_data): Remove return_bnd.
5044         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5045         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5046         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5047         (POINTER_BOUNDS_MODE): Remove definition.
5048         (make_pointer_bounds_mode): Remove.
5049         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5050         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5051         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5052         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5053         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5054         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5055         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5057         * config/i386/i386-modes.def (BND32, BND64): Remove.
5058         * config/i386/i386.c (dbx_register_map): Remove bound registers.
5059         (dbx64_register_map): Ditto.
5060         (svr4_dbx_register_map): Ditto.
5061         (indirect_thunk_bnd_needed): Remove.
5062         (indirect_thunks_bnd_used): Ditto.
5063         (indirect_return_bnd_needed): Ditto.
5064         (indirect_return_via_cx_bnd): Ditto.
5065         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5066         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5067         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
5068         (output_indirect_thunk_function): Remove handling of
5069         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5070         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5071         (ix86_save_reg): Remove handling of crtl->return_bnd.
5072         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5073         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5074         and UNSPEC_BNDLX_ADDR.
5075         (ix86_output_indirect_branch_via_reg): Remove handling of
5076         indirect_thunk_prefix_bnd.
5077         (ix86_output_indirect_branch_via_push): Ditto.
5078         (ix86_output_function_return): Ditto.
5079         (ix86_output_indirect_function_return): Ditto.
5080         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5081         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5082         (CALL_USED_REGISTERS): Ditto.
5083         (REG_ALLOC_ORDER): Update for removal of bound registers.
5084         (HI_REGISTER_NAMES): Ditto.
5085         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5086         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5087         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5088         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5089         (FIRST_PSEUDO_REG): Update.
5090         (BND): Remove mode iterator.
5091         * config/i386/predicates.md (bnd_mem_operator): Remove.
5093 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5095         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5096         vectors.
5098 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5100         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5101         the case in which the permute needs only a single element and
5102         repeats for every vector of the result.  Extend that case to
5103         handle variable-length vectors.
5104         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5106 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
5108         PR debug/79342
5109         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5110         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5112 2018-08-24  Richard Biener  <rguenther@suse.de>
5114         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5115         bb_flags_allocated members.
5116         (auto_flag): New RAII class for allocating flags.
5117         (auto_edge_flag): New RAII class for allocating edge flags.
5118         (auto_bb_flag): New RAII class for allocating bb flags.
5119         * cfgloop.c (verify_loop_structure): Allocate temporary edge
5120         flag dynamically.
5121         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5122         in favor of temporarily allocated BB flag.
5123         * hsa-brig.c: Re-order includes.
5124         * hsa-dump.c: Likewise.
5125         * hsa-regalloc.c: Likewise.
5126         * print-rtl.c: Likewise.
5127         * profile-count.c: Likewise.
5129 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
5131         PR target/86989
5132         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5133         the TOC register.
5135 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5137         PR 87073/bootstrap
5138         * wide-int-range.cc (wide_int_range_div): Do not ignore result
5139         from wide_int_range_multiplicative_op.
5141 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5143         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5144         "permutaion".
5146 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
5148         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5149         to 'expanded'.
5151 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
5153         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5154         full GENERIC expression used for replacement.
5156 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
5158         * tree-vrp.c (abs_extent_range): Remove.
5159         (extract_range_into_wide_ints): Pass wide ints by reference.
5160         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5161         Pass wide ints by reference in all calls to
5162         extract_range_into_wide_ints.
5163         * wide-int-range.cc (wide_int_range_div): New.
5164         * wide-int-range.h (wide_int_range_div): New.
5165         (wide_int_range_includes_zero_p): New.
5166         (wide_int_range_zero_p): New.
5168 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
5170         * config/aarch64/aarch64.md (arches): New enum.
5171         (arch): New enum attr.
5172         (arch_enabled): New attr.
5173         (enabled): Now uses arch_enabled only.
5174         (simd, sve, fp16): Removed attribute.
5175         (fp): Attr now defined in terms of 'arch'.
5176         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5177         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5178         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5179         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5180         attributes into 'arch'.
5181         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5182         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5183         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5184         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5185         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5186         'simd' attribute into 'arch'.
5187         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5188         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5189         Convert use of 'fp' attribute to 'arch'.
5190         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5191         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5192         into 'arch'.
5193         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5194         (different modes) Merge 'fp' and 'simd' into 'arch'.
5195         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5196         'simd' into 'arch'.
5198 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
5200         PR rtl-optimization/87026
5201         * expmed.c (canonicalize_comparison): If we can no longer create
5202         pseudoregisters, don't.
5204 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
5206         PR target/86951
5207         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5208         prototype.
5209         * config/arm/arm.c (speculation_barrier_libfunc): New static
5210         variable.
5211         (arm_init_libfuncs): Initialize it.
5212         (arm_emit_speculation_barrier): New function.
5213         * config/arm/arm.md (speculation_barrier): Call
5214         arm_emit_speculation_barrier for architectures that do not have
5215         DSB or ISB.
5216         (speculation_barrier_insn): Only match on Armv7 or later.
5218 2018-08-23  Richard Biener  <rguenther@suse.de>
5220         PR middle-end/87024
5221         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5222         calls.
5224 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5226         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5227         of single-vector TBLs.
5228         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5229         one input is given.
5231 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5233         PR target/85910
5234         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5235         aarch64_evpc_tbl guard.
5237 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5239         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5240         behaviour.
5242 2018-08-22  Martin Sebor  <msebor@redhat.com>
5244         PR middle-end/87052
5245         * tree-pretty-print.c (pretty_print_string): Add argument.
5246         (dump_generic_node): Call to pretty_print_string with string size.
5248 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
5250         PR rtl-optimization/86771
5251         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5252         of two SETs into those two SETs, one to be placed at i2, if that SETs
5253         destination is modified between i2 and i3.
5255 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5257         PR tree-optimization/86725
5258         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5259         function.
5260         (vect_analyze_scalar_cycles_1): Check it.
5262 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5264         PR tree-optimization/86725
5265         * tree-vect-loop.c (vect_is_simple_reduction): When treating
5266         an outer loop phi as a double reduction, make sure that the
5267         single user of the phi result is an inner loop phi.
5269 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5271         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5272         grouped stores with gaps to a strided group.
5274 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5276         * tree-vect-stmts.c (get_group_load_store_type)
5277         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5278         first statement in a group.
5280 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5282         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5283         the sequence used in gcc/gcc.c.
5285 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5287         PR other/704
5288         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5289         building it.
5291 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5293         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5294         Darwin10-specific unwinder-shim.
5295         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5296         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5297         New to cater for Darwin10 Rosetta.
5299 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5301         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5302         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5304 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5306         PR bootstrap/81033
5307         PR target/81733
5308         PR target/52795
5309         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5310         (dwarf2out_switch_text_section): Generate a local label for the
5311         second function sub-section and apply it as the second FDE start
5312         label.
5313         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5314         second sub-section start.
5316 2018-08-22  Richard Biener  <rguenther@suse.de>
5318         PR tree-optimization/86988
5319         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5321 2018-08-22  Richard Biener  <rguenther@suse.de>
5323         PR tree-optimization/86945
5324         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5326 2018-08-22  Alexandre Oliva <oliva@adacore.com>
5328         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5329         a comment about how uses of r2 for .sdata2 come about.
5331 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
5333         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5335 2018-08-21  Marek Polacek  <polacek@redhat.com>
5337         PR c++/86981, Implement -Wpessimizing-move.
5338         * doc/invoke.texi: Document -Wpessimizing-move.
5340 2018-08-21  Jan Hubicka  <jh@suse.cz>
5342         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5343         * tree.h (is_redundant_typedef): Remove.
5344         * dwarf2out.c (is_redundant_typedef): Turn into static function.
5346 2018-08-21  Jan Hubicka  <jh@suse.cz>
5348         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5349         when possible.
5351 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
5353         * expmed.c (extract_low_bits): Reject invalid subregs early.
5355 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5357         PR middle-end/86121
5358         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5359         behaviour.
5361 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5363         * config/vxworks.h: Guard vxworks_asm_out_constructor and
5364         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5365         * config/vxworks.c: Likewise.
5367 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5369         * config/vxworks.c: Set targetm.have_ctors_dtors
5370         if HAVE_INITFINI_ARRAY_SUPPORT.
5371         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5372         if HAVE_INITFINI_ARRAY_SUPPORT.
5374 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5376         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5377         default search path for VxWorks < 7.
5379 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5381         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5382         (get_format_string): Refer to c_getstr.
5384 2018-08-21  Tom de Vries  <tdevries@suse.de>
5386         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5387         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5388         (debuginfo_early_stop): Declare.
5389         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5390         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5391         (debuginfo_early_stop): New function.
5392         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
5393         and debuginfo_early_stop.
5394         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
5395         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
5396         (general_init): Call debuginfo_early_init.
5397         (finalize): Call debuginfo_fini.
5398         (do_compile): Call debuginfo_init.
5399         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
5400         -fdump-early-debug.
5401         (@item -fdump-debug, @item -fdump-earlydebug): Add.
5403 2018-08-21  Tom de Vries  <tdevries@suse.de>
5405         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
5406         flag_dump_noaddr and flag_dump_unnumbered.
5408 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
5410         * wide-int-range.cc (wide_int_range_abs): New.
5411         (wide_int_range_order_set): Rename from wide_int_range_min_max.
5412         * wide-int-range.h (wide_int_range_abs): New.
5413         (wide_int_range_min_max): New.
5414         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
5415         case to call wide_int_range_abs.
5416         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
5417         (extract_range_from_abs_expr): Delete.
5419 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
5421         PR target/87033
5422         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
5423         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
5424         for indexed loads.
5426 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5427             Jeff Law <law@redhat.com>
5429         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
5430         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
5432 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
5434         PR other/84889
5435         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
5436         (decl_attributes): Likewise.
5437         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
5438         instance.
5439         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5440         * diagnostic-core.h (class auto_diagnostic_group): New class.
5441         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
5442         (diagnostic_report_diagnostic): Handle the first diagnostics within
5443         a group.
5444         (emit_diagnostic): Add auto_diagnostic_group instance.
5445         (inform): Likewise.
5446         (inform_n): Likewise.
5447         (warning): Likewise.
5448         (warning_at): Likewise.
5449         (warning_n): Likewise.
5450         (pedwarn): Likewise.
5451         (permerror): Likewise.
5452         (error): Likewise.
5453         (error_n): Likewise.
5454         (error_at): Likewise.
5455         (sorry): Likewise.
5456         (fatal_error): Likewise.
5457         (internal_error): Likewise.
5458         (internal_error_no_backtrace): Likewise.
5459         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
5460         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
5461         * diagnostic.h (struct diagnostic_context): Add fields
5462         "diagnostic_group_nesting_depth",
5463         "diagnostic_group_emission_count", "begin_group_cb",
5464         "end_group_cb".
5465         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
5466         Add auto_diagnostic_group instance(s).
5467         (find_explicit_erroneous_behavior): Likewise.
5468         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
5469         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
5470         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
5471         (gimplify_va_arg_expr): Likewise.
5472         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
5473         (HSA_SORRY_AT): Likewise.
5474         * ipa-devirt.c (compare_virtual_tables): Likewise.
5475         (warn_odr): Likewise.
5476         * multiple_target.c (expand_target_clones): Likewise.
5477         * opts-common.c (cmdline_handle_error): Likewise.
5478         * reginfo.c (globalize_reg): Likewise.
5479         * substring-locations.c (format_warning_n_va): Likewise.
5480         * tree-inline.c (expand_call_inline): Likewise.
5481         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
5482         * tree-ssa-loop-niter.c
5483         (do_warn_aggressive_loop_optimizations): Likewise.
5484         * tree-ssa-uninit.c (warn_uninit): Likewise.
5485         * tree.c (warn_deprecated_use): Likewise.
5487 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
5489         PR target/87014
5490         * config/i386/i386.md (eh_return): Always update EH return
5491         address in word_mode.
5493 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
5495         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
5496         TARGET_SPLIT_COMPLEX_ARG is defined.
5498 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5500         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
5502 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5504         PR target/86984
5505         * expr.c (expand_assignment): Assert that bitpos is positive.
5506         (store_field): Likewise
5507         (expand_expr_real_1): Make sure that bitpos is positive.
5508         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
5509         integer overflow.
5511 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5513         * Makefile.in (CPP_ID_DATA_H): Delete.
5514         (CPP_INTERNAL_H): Don't add it.
5515         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
5516         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
5518 2018-08-20  Richard Biener  <rguenther@suse.de>
5520         PR tree-optimization/78655
5521         * tree-vrp.c (extract_range_from_binary_expr_1): Make
5522         pointer + offset nonnull if either operand is nonnull work.
5524 2018-08-20  Tom de Vries  <tdevries@suse.de>
5526         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
5527         unless the referenced die describes the added property using
5528         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
5529         Otherwise, add a DW_AT_location to the referenced die.
5531 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
5533         PR target/86994
5534         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
5535         register_operand when calling ix86_set_reg_reg_cost.
5536         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
5537         Set *total to 0 for operands that satisfy x86_64_immediate_operand
5538         predicate and to 1 otherwise.
5540 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
5542         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
5543         emit a diagnostic that it is not supported and reset the option.
5544         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
5545         supported and consume the option.  (ASM_FINAL_SPEC): New.
5547 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
5549         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
5550         a sentence.
5552 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
5554         C-SKY port: Documentation
5556         * doc/extend.texi (C-SKY Function Attributes): New section.
5557         * doc/invoke.texi (Option Summary): Add C-SKY options.
5558         (C-SKY Options): New section.
5559         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
5561 2018-08-17  Jojo  <jijie_rong@c-sky.com>
5562             Huibin Wang  <huibin_wang@c-sky.com>
5563             Sandra Loosemore  <sandra@codesourcery.com>
5564             Chung-Lin Tang  <cltang@codesourcery.com>
5566         C-SKY port: Backend implementation
5568         * config/csky/*: New.
5569         * common/config/csky/*: New.
5571 2018-08-17  Jojo  <jijie_rong@c-sky.com>
5572             Huibin Wang  <huibin_wang@c-sky.com>
5573             Sandra Loosemore  <sandra@codesourcery.com>
5574             Chung-Lin Tang  <cltang@codesourcery.com>
5575             Andrew Jenner  <andrew@codesourcery.com>
5577         C-SKY port: Configury
5579         * config.gcc (csky-*-*): New.
5580         * configure.ac: Add csky to targets for dwarf2 debug_line support.
5581         * configure: Regenerated.
5583 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
5585         * dump-context.h: Include "dumpfile.h".
5586         (dump_context::dump_printf_va): Convert final param from va_list
5587         to va_list *.  Convert from ATTRIBUTE_PRINTF to
5588         ATTRIBUTE_GCC_DUMP_PRINTF.
5589         (dump_context::dump_printf_loc_va): Likewise.
5590         * dumpfile.c: Include "stringpool.h".
5591         (make_item_for_dump_printf_va): Delete.
5592         (make_item_for_dump_printf): Delete.
5593         (class dump_pretty_printer): New class.
5594         (dump_pretty_printer::dump_pretty_printer): New ctor.
5595         (dump_pretty_printer::emit_items): New member function.
5596         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
5597         function.
5598         (dump_pretty_printer::emit_item): New member function.
5599         (dump_pretty_printer::stash_item): New member function.
5600         (dump_pretty_printer::format_decoder_cb): New member function.
5601         (dump_pretty_printer::decode_format): New member function.
5602         (dump_context::dump_printf_va): Reimplement in terms of
5603         dump_pretty_printer.
5604         (dump_context::dump_printf_loc_va): Convert final param from va_list
5605         to va_list *.
5606         (dump_context::begin_scope): Reimplement call to
5607         make_item_for_dump_printf.
5608         (dump_printf): Update for change to dump_printf_va.
5609         (dump_printf_loc): Likewise.
5610         (selftest::test_capture_of_dump_calls): Convert "stmt" from
5611         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
5612         with %T, %E, and %G.
5613         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
5614         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
5615         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
5616         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
5617         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
5618         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
5619         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
5620         within a dump_printf_loc call to "%wu".
5621         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
5622         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
5623         missing space after "=".
5624         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
5625         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
5626         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
5627         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
5628         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
5629         duplicate "vectorized" from message.
5631 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5633         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
5634         polyNxK_t element's TYPE_STRING_FLAG.
5636 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
5638         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
5639         (they were unnamed before).  Fix comments.
5641 2018-08-17  Nathan Sidwell  <nathan@acm.org>
5643         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
5645 2018-08-17  Richard Biener  <rguenther@suse.de>
5647         PR tree-optimization/86841
5648         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
5650 2018-08-17  Martin Liska  <mliska@suse.cz>
5652         * common.opt: Remove Warn, Init and Report for options with
5653         Ignore/Deprecated flag. Warning is done automatically for
5654         Deprecated flags.
5655         * config/i386/i386.opt: Likewise.
5656         * config/ia64/ia64.opt: Likewise.
5657         * config/rs6000/rs6000.opt: Likewise.
5658         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
5659         Remove usage of flag_check_pointer_bounds.
5660         * lto-wrapper.c (merge_and_complain): Do not handle
5661         OPT_fcheck_pointer_bounds.
5662         (append_compiler_options): Likewise.
5663         * opt-functions.awk: Do not handle Deprecated.
5664         * optc-gen.awk: Check that Var, Report and Init are not
5665         used for an option with Ignore/Deprecated flag.
5666         * opts-common.c (decode_cmdline_option): Do not report
5667         CL_ERR_DEPRECATED.
5668         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
5669         options.
5670         * opts.h (struct cl_option): Remove cl_deprecated flag.
5671         (CL_ERR_DEPRECATED): Remove error enum value.
5673 2018-08-17  Richard Biener  <rguenther@suse.de>
5675         PR middle-end/86505
5676         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
5677         across a va-arg-pack using call adjust its return value accordingly.
5679 2018-08-16  Martin Sebor  <msebor@redhat.com>
5681         PR tree-optimization/86853
5682         * gimple-ssa-sprintf.c (struct format_result): Rename member.
5683         (struct fmtresult): Add member and initialize it in ctors.
5684         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
5685         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
5686         (format_directive): Set POSUNDER4K when MAYFAIL is set.
5687         (parse_directive): Handle %C same as %c.
5688         (sprintf_dom_walker::compute_format_length): Adjust.
5689         (is_call_safe): Adjust.
5691 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5693         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
5694         for determining how to count the elements.
5695         * builtins.h (c_strlen): Adjust prototype.
5696         * expr.c (string_constant): Add new parameter mem_size.
5697         Set *mem_size appropriately.
5698         * expr.h (string_constant): Adjust protoype.
5699         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
5700         * gimple-fold.h (get_range_strlen): Adjust prototype.
5701         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
5702         (format_string): Call get_string_length with eltsize.
5704 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5706         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
5707         to emit the span, rather than setting it as the prefix.
5709 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5711         * diagnostic-show-locus.c (layout::start_annotation_line): Add
5712         "margin_char" parameter, defaulting to space.  Use it in place
5713         of pp_space for the initial part of the margin.
5714         (layout::print_leading_fixits): Use '+' when filling the margin
5715         of line-insertion fix-it hints.
5717 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5719         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
5720         Delete.
5722 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5724         * config/rs6000/altivec.md: Don't set length attribute to the default
5725         value.
5726         * config/rs6000/darwin.md: Ditto.
5727         * config/rs6000/dfp.md: Ditto.
5728         * config/rs6000/htm.md: Ditto.
5729         * config/rs6000/rs6000.md: Ditto.
5730         * config/rs6000/sync.md: Ditto.
5731         * config/rs6000/vsx.md: Ditto.
5733 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5735         * config/rs6000/altivec.md: Don't set length attribute to the default
5736         value, for branch instructions.
5737         * config/rs6000/darwin.md: Ditto.
5738         * config/rs6000/rs6000.md: Ditto.
5740 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5742         * config/rs6000/rs6000.md (length): Always define as const_int 4.
5743         (unnamed conditional branch define_insn): Set length to 4 or 8
5744         depending on offset.
5745         (<bd>_<mode>): Similar, for alternative 0.
5746         (<bd>tf_<mode>): Ditto.
5748 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5750         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5752 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
5754         * doc/rtl.texi: Replace old RTX class names with new names.
5757 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
5759         * expmed.h (canonicalize_comparison): New declaration.
5760         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5761         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
5762         * optabs.c (prepare_cmp_insn): Likewise.
5763         * rtl.h (unsigned_condition_p): New function which checks if a
5764         comparison operator is unsigned.
5766 2018-08-16  Nathan Sidwell  <nathan@acm.org>
5768         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
5769         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
5771 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5773         PR target/84711
5774         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
5775         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
5776         (mov<mov>): ..this and enable unconditionally.
5778 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5780         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
5782 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
5784         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
5785         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
5786         "Common" with "Target".
5788 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5790         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
5791         * doc/invoke.texi (mmitigate-rop): Remove.
5792         * config/i386/i386.c: Do not include "regrename.h".
5793         (ix86_rop_should_change_byte_p, reg_encoded_number)
5794         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
5795         Remove.
5796         (ix86_reorg): Remove call to ix86_mitigate_rop.
5797         * config/i386/i386.md (attr "modrm_class"): Remove.
5798         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
5799         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
5800         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
5802 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
5804         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
5805         allow folding of mergeh() and mergel() for the float and double types.
5806         (fold_mergehl_helper): Rework to handle building a permute tree
5807         for float vectors.
5809 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5811         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
5812         for TARGET_SSE.
5814 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
5816         * common.opt (fdiagnostics-show-labels): New option.
5817         * diagnostic-show-locus.c (class layout_range): Add field
5818         "m_label".
5819         (class layout): Add field "m_show_labels_p".
5820         (layout_range::layout_range): Add param "label" and use it to
5821         initialize m_label.
5822         (make_range): Pass in NULL for new "label" param of layout_range's
5823         ctor.
5824         (layout::layout): Initialize m_show_labels_p.
5825         (layout::maybe_add_location_range): Pass in loc_range->m_label
5826         when constructing layout_range instances.
5827         (struct line_label): New struct.
5828         (layout::print_any_labels): New member function.
5829         (layout::print_line): Call it if label-printing is enabled.
5830         (selftest::test_one_liner_labels): New test.
5831         (selftest::test_diagnostic_show_locus_one_liner): Call it.
5832         * diagnostic.c (diagnostic_initialize): Initialize
5833         context->show_labels_p.
5834         * diagnostic.h (struct diagnostic_context): Add field
5835         "show_labels_p".
5836         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5837         -fno-diagnostics-show-labels.
5838         * dwarf2out.c (gen_producer_string): Add
5839         OPT_fdiagnostics_show_labels to the ignored options.
5840         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5841         param.
5842         (gcc_rich_location::maybe_add_expr): Likewise.
5843         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5844         label" param, defaulting to NULL.
5845         (gcc_rich_location::add_expr): Add "label" param.
5846         (gcc_rich_location::maybe_add_expr): Likewise.
5847         (class text_range_label): New class.
5848         (class range_label_for_type_mismatch): New class.
5849         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5850         of format_warning_va.
5851         (fmtwarn_n): Likewise for new params of format_warning_n_va.
5852         * lto-wrapper.c (merge_and_complain): Add
5853         OPT_fdiagnostics_show_labels to the "pick one setting" options.
5854         (append_compiler_options): Likewise to the dropped options.
5855         (append_diag_options): Likewise to the passed-on options.
5856         * opts.c (common_handle_option): Handle the new option.
5857         * selftest-diagnostic.c
5858         (test_diagnostic_context::test_diagnostic_context): Enable
5859         show_labels_p.
5860         * substring-locations.c: Include "gcc-rich-location.h".
5861         (format_warning_n_va): Add "fmt_label" and "param_label" params
5862         and use them as appropriate.
5863         (format_warning_va): Add "fmt_label" and "param_label" params,
5864         passing them on to format_warning_n_va.
5865         (format_warning_at_substring): Likewise.
5866         (format_warning_at_substring_n): Likewise.
5867         * substring-locations.h (format_warning_va): Add "fmt_label" and
5868         "param_label" params.
5869         (format_warning_n_va): Likewise.
5870         (format_warning_at_substring): Likewise.
5871         (format_warning_at_substring_n): Likewise.
5872         * toplev.c (general_init): Initialize global_dc->show_labels_p.
5874 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
5876         PR testsuite/86519
5877         * builtins.c (expand_builtin_memcmp): Do not expand the call
5878         when overflow is detected.
5880 2018-08-15  Martin Sebor  <msebor@redhat.com>
5882         PR tree-optimization/71625
5883         * config/aarch64/aarch64-builtins.c
5884         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5886 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
5888         * config/s390/s390.c (s390_reorg): Remove loop.
5890 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5892         * config/darwin.c
5893          (darwin_function_switched_text_sections): Delete.
5894         * gcc/config/darwin.h
5895          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5897 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5899         PR target/81685
5900         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5901         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
5902         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5904 2018-08-15  Martin Liska  <mliska@suse.cz>
5906         PR tree-optimization/86925
5907         * predict.c (expr_expected_value_1): When taking
5908         later predictor, assign also probability.
5909         Use fold_build2_initializer_loc in order to fold
5910         the expression in -frounding-math.
5912 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
5914         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5915         patterns.
5916         (expand_vec_perm_1): Try the new method.
5918 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
5920         PR target/86547
5921         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5922         Check whether lra_live_max_point is 0 before dividing.
5924 2018-08-14  Martin Sebor  <msebor@redhat.com>
5926         PR tree-optimization/86650
5927         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5928         (vrp_prop::check_mem_ref): Same.
5930 2018-08-13  Liu Hao <lh_mouse@126.com>
5932         * pretty-print.c (eat_esc_sequence): Swap the foreground and
5933         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5934         and clear it thereafter, as it only works for DBCS.
5936 2018-08-13  Liu Hao <lh_mouse@126.com>
5938         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5939         handle returned by _get_osf_handle().
5941 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5943         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5944         for folding vec_perm.
5946 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5948         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5949         Add support for gimple-folding of vec_pack() and vec_unpack()
5950         intrinsics.
5952 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
5954         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5955         vec_xst variants to the list.
5956         (rs6000_gimple_fold_builtin): Add support for folding unaligned
5957         vector loads and stores.
5959 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
5961         * config.gcc (rs6000-ibm-aix4.x): Delete.
5962         (rs6000-ibm-aix5.1): Delete.
5963         (rs6000-ibm-aix5.2): Delete.
5964         (rs6000-ibm-aix5.3): Delete.
5965         * config/rs6000/aix43.h: Delete.
5966         * config/rs6000/aix51.h: Delete.
5967         * config/rs6000/aix52.h: Delete.
5968         * config/rs6000/t-aix43: Delete.
5970 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
5972         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5973         New function.
5974         (s390_decompose_address): Factor out constant pool ref
5975         decomposition.
5977 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5979         * config/nds32/nds32-predicates.c
5980         (nds32_can_use_bclr_p): Change return type as bool.
5981         (nds32_can_use_bset_p): Ditto.
5982         (nds32_can_use_btgl_p): Ditto.
5983         (nds32_can_use_bitci_p): Ditto.
5984         * config/nds32/nds32-protos.h
5985         (nds32_can_use_bclr_p): Change declaration.
5986         (nds32_can_use_bset_p): Ditto.
5987         (nds32_can_use_btgl_p): Ditto.
5988         (nds32_can_use_bitci_p): Ditto.
5990 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5992         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5993         Support -msched-prolog-epilog option.
5994         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5996 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5998         * common/config/nds32/nds32-common.c
5999         (nds32_option_optimization_table): Enalbe -malways-align.
6001 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6003         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6004         extra_headers.
6005         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6006         OPT_misr_secure_ case.
6007         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6008         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6009         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6010         secure attribute.
6011         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6012         (nds32_isr_info): New field security_level.
6013         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6014         * config/nds32/nds32.md (return_internal): Consider critical attribute.
6015         * config/nds32/nds32.opt (misr-secure): New option.
6016         * config/nds32/nds32_init.inc: New file.
6017         * config/nds32/nds32_isr.h: New file.
6019 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
6021         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6022         Update comment for atomic instructions.
6023         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6024         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6025         Remove.
6026         (atomic_loaddi): Revise fence expansion to only emit fence prior to
6027         load for __ATOMIC_SEQ_CST model.
6028         (atomic_loaddi_1): Remove float register target.
6029         (atomic_storedi): Handle CONST_INT values.
6030         (atomic_storedi_1): Remove float register source.  Add special case
6031         for zero value.
6032         (memory_barrier): New expander and insn.
6034 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
6036         PR tree-optimization/86835
6037         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6038         new_stmt after def_gsi, make sure to insert new_square_stmt after
6039         that stmt, not 2 stmts before it.
6041 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
6043         PR target/82418
6044         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6045         instead of SWI48.
6047 2018-08-10  Martin Liska  <mliska@suse.cz>
6049         PR target/83610
6050         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6051         function type.
6052         * builtins.c (expand_builtin_expect_with_probability):
6053         New function.
6054         (expand_builtin_expect_with_probability): New function.
6055         (build_builtin_expect_predicate): Add new argumnet probability
6056         for BUILT_IN_EXPECT_WITH_PROBABILITY.
6057         (fold_builtin_expect):
6058         (fold_builtin_2):
6059         (fold_builtin_3):
6060         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6061         * builtins.h (fold_builtin_expect): Set new argument.
6062         * doc/extend.texi: Document __builtin_expect_with_probability.
6063         * doc/invoke.texi: Likewise.
6064         * gimple-fold.c (gimple_fold_call): Pass new argument.
6065         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6066         also BUILT_IN_EXPECT_WITH_PROBABILITY.
6067         * predict.c (get_predictor_value): New function.
6068         (expr_expected_value): Add new argument probability. Assume
6069         that predictor and probability are always non-null.
6070         (expr_expected_value_1): Likewise.  For __builtin_expect and
6071         __builtin_expect_with_probability set probability.  Handle
6072         combination in binary expressions.
6073         (tree_predict_by_opcode): Simplify code by simply calling
6074         get_predictor_value.
6075         (pass_strip_predict_hints::execute): Add handling of
6076         BUILT_IN_EXPECT_WITH_PROBABILITY.
6077         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6078         new predictor.
6079         * tree.h (DECL_BUILT_IN_P): New function.
6081 2018-08-10  Martin Liska  <mliska@suse.cz>
6083         PR tree-optimization/85799
6084         * passes.def: Add argument for pass_strip_predict_hints.
6085         * predict.c (class pass_strip_predict_hints): Add new argument
6086         early_p.
6087         (strip_predictor_early): New function.
6088         (pass_strip_predict_hints::execute): Call the function to
6089         strip predictors.
6090         (strip_predict_hints): New function.
6091         * predict.def: Fix comment.
6093 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
6095         * Makefile.in: Clarify which tm.texi to copy over to assert the
6096         right to grant a GFDL license for all.
6098 2018-08-09  Jeff Law  <law@redhat.com>
6100         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6101         unused variable.
6103 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
6105         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6106         prototype.
6108 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6110         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6111         reductions for variable-length vectors.
6113 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
6115         PR other/84889
6116         * common.opt (fdiagnostics-show-line-numbers): New option.
6117         * diagnostic-show-locus.c (class layout): Add fields
6118         "m_show_line_numbers_p" and "m_linenum_width";
6119         (num_digits): New function.
6120         (test_num_digits): New function.
6121         (layout::layout): Initialize new fields.  Update m_x_offset
6122         logic to handle any left margin.
6123         (layout::print_source_line): Print line number when requested.
6124         (layout::start_annotation_line): New member function.
6125         (layout::print_annotation_line): Call it.
6126         (layout::print_leading_fixits): Likewise.
6127         (layout::print_trailing_fixits): Likewise.  Update calls to
6128         move_to_column for new parameter.
6129         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6130         it to potentially call start_annotation_line.
6131         (layout::show_ruler): Call start_annotation_line.
6132         (selftest::test_line_numbers_multiline_range): New selftest.
6133         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6134         and selftest::test_line_numbers_multiline_range.
6135         * diagnostic.c (diagnostic_initialize): Initialize
6136         show_line_numbers_p.
6137         * diagnostic.h (struct diagnostic_context): Add field
6138         "show_line_numbers_p".
6139         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6140         -fno-diagnostics-show-line-numbers.
6141         * dwarf2out.c (gen_producer_string): Add
6142         OPT_fdiagnostics_show_line_numbers to the ignored options.
6143         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6144         one setting" options.
6145         (append_compiler_options): Likewise to the dropped options.
6146         (append_diag_options): Likewise to the passed-on options.
6147         * opts.c (common_handle_option): Handle the new option.
6148         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6150 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6152         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6153         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
6154         third argument of type "const signed char" to descriptions of
6155         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6156         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6157         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6158         __builtin_bcdsub_ov functions.
6160 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6162         PR tree-optimization/86858
6163         * tree-vect-loop.c (vect_is_simple_reduction): Restore
6164         flow_bb_inside_loop_p calls.
6166 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6168         PR tree-optimization/86871
6169         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6170         instead of gimple_assign_lhs.
6172 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
6174         PR target/86887
6175         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6176         register constraint to operand 0.
6177         (add<mode>3_carryinC): Likewise.
6178         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6180 2018-08-09  Martin Liska  <mliska@suse.cz>
6182         PR c/86895
6183         * common.opt: Remove extra line.
6185 2018-08-09  Martin Liska  <mliska@suse.cz>
6187         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6188         at the end of a line, make first letter capital and end up
6189         a sentence with a dot.
6190         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6191         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6192         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6193         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6194         (PARAM_MAX_ISL_OPERATIONS): Likewise.
6195         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6196         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6197         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6198         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6199         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6200         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6201         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6202         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6203         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6204         (PARAM_TREE_REASSOC_WIDTH): Likewise.
6205         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6206         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6207         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6209 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
6211         PR target/84332
6212         * config/s390/s390.c (s390_option_override_internal): Reduce the
6213         stack-clash-protection-probe-interval param if it would be too big
6214         for z900.
6216 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
6218         PR target/46179
6219         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6220         * config/m68k/m68k.c (handle_move_double): Don't call
6221         m68k_final_prescan_insn.
6222         (m68k_adjust_decorated_operand): Renamed from
6223         m68k_final_prescan_insn, remove first and third operand and
6224         simplify.
6225         (print_operand): Call it.
6226         (print_operand_address): Call it.
6228 2018-08-08  Nathan Sidwell  <nathan@acm.org>
6230         * diagnostic.c (diagnostic_report_current_module): Use
6231         linemap_included_from & linemap_included_from_linemap.
6233 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
6235         * config/aarch64/aarch64-cores.def: Add phecda core.
6236         * config/aarch64/aarch64-tune.md: Regenerate.
6237         * doc/invoke.texi: Add phecda core.
6239 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6241         PR target/85295
6242         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6243         definitions.
6244         * config/s390/s390.md ("movti"): Add more alternatives for
6245         constant to GPR copies.
6247 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6249         * config/s390/s390.c: Fix whitespace damage throughout the file.
6250         * config/s390/s390.h: Likewise.
6251         * config/s390/tpf.h: Likewise.
6253 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6255         * config/s390/s390.c (s390_loadrelative_operand_p):
6256         Remove TARGET_CPU_ZARCH usages.
6257         (s390_rtx_costs): Likewise.
6258         (s390_legitimate_constant_p): Likewise.
6259         (s390_cannot_force_const_mem): Likewise.
6260         (legitimate_reload_constant_p): Likewise.
6261         (s390_preferred_reload_class): Likewise.
6262         (legitimize_pic_address): Likewise.
6263         (legitimize_tls_address): Likewise.
6264         (s390_split_branches): Removed.
6265         (s390_add_execute): Removed.
6266         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6267         (s390_mainpool_start): Likewise.
6268         (s390_mainpool_finish): Likewise.
6269         (s390_mainpool_cancel): Removed.
6270         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6271         (s390_chunkify_cancel): Likewise.
6272         (s390_return_addr_rtx): Likewise.
6273         (s390_register_info): Remove split_branches_pending_p uages.
6274         (s390_optimize_register_info): Likewise.
6275         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6276         split_branches_pending_p usages.
6277         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6278         (s390_load_got): Likewise.
6279         (s390_expand_split_stack_prologue): Likewise.
6280         (output_asm_nops): Likewise.
6281         (s390_function_profiler): Likewise.
6282         (s390_emit_call): Likewise.
6283         (s390_conditional_register_usage): Likewise.
6284         (s390_optimize_prologue): Likewise.
6285         (s390_reorg): Remove TARGET_CPU_ZARCH and
6286         split_branches_pending_p usages.
6287         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6288         usages.
6289         (s390_output_indirect_thunk_function): Likewise.
6290         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6291         (TARGET_CPU_ZARCH_P): Removed.
6292         (struct machine_function): Remove split_branches_pending_p.
6293         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6295 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6297         * common/config/s390/s390-common.c (processor_flags_table):
6298         Remove flags.
6299         * config.gcc: Remove with_arch/with_tune support.
6300         * config/s390/2064.md: Remove cpu attribute comparisons.
6301         * config/s390/driver-native.c (s390_host_detect_local_cpu):
6302         Remove MTN.
6303         * config/s390/linux.h (ASM_SPEC):
6304         Remove -march support.
6305         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6306         Use a table to get an arch level.
6307         * config/s390/s390-opts.h (enum processor_type):
6308         Remove enum values.
6309         * config/s390/s390.c
6310         (processor_table): Remove entries, add arch_level values.
6311         (s390_issue_rate): Remove cases.
6312         (s390_option_override): Adjust
6313         s390_option_override_internal() call.
6314         (s390_option_override_internal): Remove deprecation warning.
6315         (s390_valid_target_attribute_tree): Adjust
6316         s390_option_override_internal() call.
6317         * config/s390/s390.h (struct s390_processor):
6318         Share with s390-c.c, add arch_level field.
6319         * config/s390/s390.md:
6320         Remove occurrences in cpu attribute.
6321         * config/s390/s390.opt: Remove -march/-mtune support.
6322         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6323         * doc/invoke.texi: Remove deprecation warning.
6325 2018-08-08  Luis Machado  <luis.machado@linaro.org>
6327         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6328         global.
6329         (qdf24xx_tunings): Set vector cost structure to
6330         qdf24xx_vector_cost.
6332         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6333         <register_sextend>: Set to 3.
6335 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
6337         PR target/86838
6338         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6339         * config/aarch64/aarch64-simd.md
6340         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6341         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6342         (aarch64_frecpx<mode>): ...this new pattern.
6343         * config/aarch64/aarch64-simd-builtins.def: Remove comment
6344         about aarch64_frecp<FRECP:frecp_suffix><mode>.
6346 2018-08-07  Martin Liska  <mliska@suse.cz>
6348         PR middle-end/83023
6349         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6350         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6351         * predict.def (PRED_MALLOC_NONNULL): New predictor.
6352         * doc/extend.texi: Document that malloc attribute adds
6353         hit to compiler.
6355 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
6357         PR target/86785
6358         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6359         Define to speculation_safe_value_not_needed.
6361 2018-08-06  Jeff Law  <law@redhat.com>
6363         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6364         the vr_values instance to cprop_into_stmt.
6365         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6366         (cprop_operand): Also query EVRP to determine if OP is a constant.
6368 2018-08-06  Nathan Sidwell  <nathan@acm.org>
6370         * diagnostic.c (diagnostic_report_current_module): Reroll
6371         included-at loop.  Translate text.
6373 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
6375         * function-tests.c (selftest::test_expansion_to_rtl): Call
6376         free_after_compilation.
6378 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6380         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6382 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
6384         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
6385         loops with memory block operations from getting unrolled.
6387 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
6389         PR target/86807
6390         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6391         Define to speculation_safe_value_not_needed.
6393 2018-08-06  Jeff Law  <law@redhat.com>
6395         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
6396         assert.
6398 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6400         PR target/86662
6401         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
6402         with all enabled __intN types.
6404         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
6406 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6408         * alias.c (record_set): Check for clobber high.
6409         * cfgexpand.c (expand_gimple_stmt): Likewise.
6410         * combine-stack-adj.c (single_set_for_csa): Likewise.
6411         * combine.c (find_single_use_1): Likewise.
6412         (set_nonzero_bits_and_sign_copies): Likewise.
6413         (get_combine_src_dest): Likewise.
6414         (is_parallel_of_n_reg_sets): Likewise.
6415         (try_combine): Likewise.
6416         (record_dead_and_set_regs_1): Likewise.
6417         (reg_dead_at_p_1): Likewise.
6418         (reg_dead_at_p): Likewise.
6419         * dce.c (deletable_insn_p): Likewise.
6420         (mark_nonreg_stores_1): Likewise.
6421         (mark_nonreg_stores_2): Likewise.
6422         * df-scan.c (df_find_hard_reg_defs): Likewise.
6423         (df_uses_record): Likewise.
6424         (df_get_call_refs): Likewise.
6425         * dwarf2out.c (mem_loc_descriptor): Likewise.
6426         * haifa-sched.c (haifa_classify_rtx): Likewise.
6427         * ira-build.c (create_insn_allocnos): Likewise.
6428         * ira-costs.c (scan_one_insn): Likewise.
6429         * ira.c (equiv_init_movable_p): Likewise.
6430         (rtx_moveable_p): Likewise.
6431         (interesting_dest_for_shprep): Likewise.
6432         * jump.c (mark_jump_label_1): Likewise.
6433         * postreload-gcse.c (record_opr_changes): Likewise.
6434         * postreload.c (reload_cse_simplify): Likewise.
6435         (struct reg_use): Add source expr.
6436         (reload_combine): Check for clobber high.
6437         (reload_combine_note_use): Likewise.
6438         (reload_cse_move2add): Likewise.
6439         (move2add_note_store): Likewise.
6440         * print-rtl.c (print_pattern): Likewise.
6441         * recog.c (decode_asm_operands): Likewise.
6442         (store_data_bypass_p): Likewise.
6443         (if_test_bypass_p): Likewise.
6444         * regcprop.c (kill_clobbered_value): Likewise.
6445         (kill_set_value): Likewise.
6446         * reginfo.c (reg_scan_mark_refs): Likewise.
6447         * reload1.c (maybe_fix_stack_asms): Likewise.
6448         (eliminate_regs_1): Likewise.
6449         (elimination_effects): Likewise.
6450         (mark_not_eliminable): Likewise.
6451         (scan_paradoxical_subregs): Likewise.
6452         (forget_old_reloads_1): Likewise.
6453         * reorg.c (find_end_label): Likewise.
6454         (try_merge_delay_insns): Likewise.
6455         (redundant_insn): Likewise.
6456         (own_thread_p): Likewise.
6457         (fill_simple_delay_slots): Likewise.
6458         (fill_slots_from_thread): Likewise.
6459         (dbr_schedule): Likewise.
6460         * resource.c (update_live_status): Likewise.
6461         (mark_referenced_resources): Likewise.
6462         (mark_set_resources): Likewise.
6463         * rtl.c (copy_rtx): Likewise.
6464         * rtlanal.c (reg_referenced_p): Likewise.
6465         (single_set_2): Likewise.
6466         (noop_move_p): Likewise.
6467         (note_stores): Likewise.
6468         * sched-deps.c (sched_analyze_reg): Likewise.
6469         (sched_analyze_insn): Likewise.
6471 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6473         * cse.c (invalidate_reg): New function extracted from...
6474         (invalidate): ...here.
6475         (canonicalize_insn): Check for clobber high.
6476         (invalidate_from_clobbers): invalidate clobber highs.
6477         (invalidate_from_sets_and_clobbers): Likewise.
6478         (count_reg_usage): Check for clobber high.
6479         (insn_live_p): Likewise.
6480         * cselib.c (cselib_expand_value_rtx_1):Likewise.
6481         (cselib_invalidate_regno): Check for clobber in setter.
6482         (cselib_invalidate_rtx): Pass through setter.
6483         (cselib_invalidate_rtx_note_stores):
6484         (cselib_process_insn): Check for clobber high.
6485         * cselib.h (cselib_invalidate_rtx): Add operand.
6487 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6489         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
6490         (mark_not_eliminable): Likewise.
6491         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
6492         * lra-lives.c (process_bb_lives): Check for clobber high.
6493         * lra.c (new_insn_reg): Remember clobber highs.
6494         (collect_non_operand_hard_regs): Check for clobber high.
6495         (lra_set_insn_recog_data): Likewise.
6496         (add_regs_to_insn_regno_info): Likewise.
6497         (lra_update_insn_regno_info): Likewise.
6499 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6501         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
6502         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
6504 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6506         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
6507         (copy_insn_1): Likewise.
6508         (gen_hard_reg_clobber_high): New gen function.
6509         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
6510         * genemit.c (gen_exp): Likewise.
6511         (gen_emit_seq): Pass through info.
6512         (gen_insn): Check for CLOBBER_HIGH.
6513         (gen_expand): Pass through info.
6514         (gen_split): Likewise.
6515         (output_add_clobbers): Likewise.
6516         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
6517         (remove_clobbers): Likewise.
6518         * rtl.h (gen_hard_reg_clobber_high): New declaration.
6520 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6522         * doc/rtl.texi (clobber_high): Add.
6523         (parallel): Add in clobber high
6524         * rtl.c (rtl_check_failed_code3): Add function.
6525         * rtl.def (CLOBBER_HIGH): Add expression.
6526         * rtl.h (RTL_CHECKC3): Add macro.
6527         (rtl_check_failed_code3): Add declaration.
6528         (XC3EXP): Add macro.
6530 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
6532         PR target/86386
6533         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
6534         cfun->machine->max_used_stack_alignment if needed.
6536 2018-08-04  Martin Sebor  <msebor@redhat.com>
6538         PR tree-optimization/86571
6539         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
6540         NaN output to 4.
6542 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
6544         PR target/86799
6545         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6546         Define.
6548 2018-08-03  Jeff Law  <law@redhat.com>
6550         PR target/86795
6551         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6552         Define to speculation_safe_value_not_needed.
6554 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
6556         * doc/gcov.texi (-x): Remove duplicate "to".
6557         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
6558         (-Wif-not-aligned): Remove duplicate "is".
6559         (-flto): Remove duplicate "the".
6560         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
6561         duplicate "v5.00.b".
6562         (MSP430 Options): Remove duplicate "and" from the description
6563         of "-mgprel-sec=regexp".
6564         (x86 Options): Remove duplicate copies of "vmldLog102" and
6565         vmlsLog104 from description of "-mveclibabi=type".
6567 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
6569         * internal-fn.h (first_commutative_argument): Declare.
6570         * internal-fn.c (first_commutative_argument): New function.
6571         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
6572         restrictions for pattern statements.  Use first_commutative_argument
6573         to look for commutative operands in calls to internal functions.
6575 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
6577         * Makefile.in (wide-int-range.o): New.
6578         * tree-vrp.c: Move all the wide_int_* functions to...
6579         * wide-int-range.cc: ...here.
6580         * tree-vrp.h: Move all the wide_int_* prototypes to...
6581         * wide-int-range.h: ...here.
6583 2018-08-03  Tom de Vries  <tdevries@suse.de>
6585         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
6586         UI_NONE.
6587         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
6588         * except.c (output_function_exception_table): Do early exit if
6589         targetm_common.except_unwind_info (&global_options) == UI_NONE.
6591 2018-08-03  Martin Liska  <mliska@suse.cz>
6593         * predict.c (dump_prediction): Change to 2 digits
6594         in fraction part.
6596 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6598         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
6599         neon_dup_q to...
6600         (falkor_am_1_gtov_gtov): ... a new insn reservation.
6602 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
6604         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
6605         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
6606         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
6607         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
6608         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
6610 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
6612         * diagnostic-show-locus.c (diagnostic_show_locus): Use
6613         pp_take_prefix when saving the existing prefix.
6614         * diagnostic.c (diagnostic_append_note): Likewise.
6615         * langhooks.c (lhd_print_error_function): Likewise.
6616         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
6617         param's type.  Free the existing prefix.
6618         (pp_take_prefix): New function.
6619         (pretty_printer::pretty_printer): Drop the prefix parameter.
6620         Rename the length parameter to match the comment.
6621         (pretty_printer::~pretty_printer): Free the prefix.
6622         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
6623         parameter.
6624         (struct pretty_printer): Drop the "const" from "prefix" field's
6625         type and clarify memory management.
6626         (pp_set_prefix): Drop the "const" from the 2nd param.
6627         (pp_take_prefix): New decl.
6629 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
6631         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
6632         for word_mode_ok here instead of passing as argument.
6633         (expand_block_compare): Change select_block_compare_mode() call.
6634         (expand_strncmp_gpr_sequence): New function.
6635         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
6637 2018-08-02  Jeff Law  <law@redhat.com>
6639         PR target/86790
6640         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6641         Define to speculation_safe_value_not_needed.
6643         PR target/86784
6644         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6645         Define to speculation_safe_value_not_needed.
6647 2018-08-02  Tom de Vries  <tdevries@suse.de>
6649         PR target/86660
6650         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
6651         function.  Return UI_TARGET unconditionally.
6652         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
6653         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
6655 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6657         * genemit.c (print_overload_test): Fix typo.
6659 2018-08-02  Richard Biener  <rguenther@suse.de>
6661         PR tree-optimization/86816
6662         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
6663         which checks for value availability before querying it.
6664         (gvn_uses_equal): Use it.
6665         (same_succ_hash): Likewise.
6666         (gimple_equal_p): Likewise.
6668 2018-08-02  Nick Clifton  <nickc@redhat.com>
6670         PR target/86813
6671         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6672         Define to speculation_safe_value_not_needed.
6674         PR target/86810
6675         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6676         Define to speculation_safe_value_not_needed.
6678         PR target/86810
6679         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6680         Define to speculation_safe_value_not_needed.
6682         PR target/86803
6683         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6684         Define to speculation_safe_value_not_needed.
6686         PR target/86797
6687         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6688         Define to speculation_safe_value_not_needed.
6690         PR target/86791
6691         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6692         Define to speculation_safe_value_not_needed.
6694         PR target/86789
6695         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6696         Define to speculation_safe_value_not_needed.
6698         PR target/86787
6699         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6700         Define to speculation_safe_value_not_needed.
6702         PR target/86782
6703         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6704         speculation_safe_value_not_needed.
6706         PR target/86781
6707         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
6708         to speculation_safe_value_not_needed.
6710 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6712         * doc/md.texi: Expand the documentation of instruction names
6713         to mention port-local uses.  Document '@' in pattern names.
6714         * read-md.h (overloaded_instance, overloaded_name): New structs.
6715         (mapping): Declare.
6716         (md_reader::handle_overloaded_name): New member function.
6717         (md_reader::get_overloads): Likewise.
6718         (md_reader::m_first_overload): New member variable.
6719         (md_reader::m_next_overload_ptr): Likewise.
6720         (md_reader::m_overloads_htab): Likewise.
6721         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
6722         m_next_overload_ptr and m_overloads_htab.
6723         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
6724         (get_mode_token, get_code_token, get_int_token): New functions.
6725         (map_attr_string): Add an optional argument that passes back
6726         the associated iterator.
6727         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
6728         (md_reader::handle_overloaded_name, add_overload_instance): New
6729         functions.
6730         (apply_iterators): Handle '@' names.  Report an error if '@'
6731         is used without iterators.
6732         (initialize_iterators): Initialize the new iterator_group fields.
6733         * genopinit.c (handle_overloaded_code_for)
6734         (handle_overloaded_gen): New functions.
6735         (main): Use them to print declarations of maybe_code_for_* and
6736         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
6737         * genemit.c (print_overload_arguments, print_overload_test)
6738         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
6739         (main): Use it to print definitions of maybe_code_for_* and
6740         maybe_gen_* functions.
6741         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
6742         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
6743         instead of explicit mode checks.
6744         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
6745         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
6746         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
6747         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
6748         (aarch64_expand_compare_and_swap): Likewise
6749         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
6750         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
6751         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
6752         (aarch64_constant_pool_reload_icode): Delete.
6753         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
6754         instead of aarch64_constant_pool_reload_icode.  Use
6755         code_for_aarch64_reload_mov instead of explicit mode checks.
6756         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
6757         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
6758         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
6759         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
6760         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
6761         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
6762         (aarch64_atomic_load_op_code): Delete.
6763         (aarch64_emit_atomic_load_op): Likewise.
6764         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
6765         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
6766         instead of aarch64_emit_atomic_load_op.
6767         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
6768         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
6769         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
6770         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
6771         character before the pattern name.
6772         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6773         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
6774         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
6775         (aarch64_frecps<mode>): Likewise.
6776         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
6777         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
6778         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
6779         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
6780         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
6782 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6784         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
6785         Allow HFmode constants if TARGET_FP_F16INST.
6787 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
6789         PR target/86014
6790         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
6791         No longer check last store for clobber of address register.
6793 2018-08-02  Martin Liska  <mliska@suse.cz>
6795         PR gcov-profile/86817
6796         * gcov.c (process_all_functions): New function.
6797         (main): Call it.
6798         (process_file): Move functions processing to
6799         process_all_functions.
6801 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
6803         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
6804         "const" to the "gimple *" and "rtx_insn *" parameters.
6805         * dumpfile.h (dump_user_location_t::dump_user_location_t):
6806         Likewise.
6807         (dump_location_t::dump_location_t): Likewise.
6809 2018-08-01  Martin Sebor  <msebor@redhat.com>
6811         PR tree-optimization/86650
6812         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
6813         rather than a "gcall *".  Directly pass the data of interest
6814         to percent_K_format, rather than building a temporary CALL_EXPR
6815         to hold it.
6816         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
6817         (gimple_fold_builtin_strncat): Adjust.
6818         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
6819         gcall* argument with gimple*.
6820         * gimple-ssa-warn-restrict.c (check_call): Same.
6821         (wrestrict_dom_walker::before_dom_children): Same.
6822         (builtin_access::builtin_access): Same.
6823         (check_bounds_or_overlap): Same
6824         (maybe_diag_overlap): Same.
6825         (maybe_diag_offset_bounds): Same.
6826         * tree-diagnostic.c (default_tree_printer): Move usage of
6827         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6828         to this callsite.
6829         * tree-pretty-print.c (percent_K_format): Add argument.
6830         * tree-pretty-print.h: Add argument.
6831         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6832         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6833         (maybe_diag_stxncpy_trunc): Same.
6834         (handle_builtin_stxncpy): Same.
6835         (handle_builtin_strcat): Same.
6837 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6839         * match.pd: Optimise pointer range checks.
6841 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6843         PR tree-optimization/86758
6844         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6845         to remove pattern statements.
6847 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6849         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6850         result of dfs_enumerate_from when constructing stmt_vec_infos,
6851         instead of additionally calling get_loop_body.
6853 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6855         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6856         parameter.
6857         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6858         When creating an iv, assert that the step is not known to be zero.
6859         (vect_setup_realignment): Update call accordingly.
6860         * tree-vect-stmts.c (vectorizable_store): Likewise.
6861         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
6863 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6865         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6866         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6867         (vectorizable_reduction): Likewise.
6868         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6869         (vect_detect_hybrid_slp_stmts): Likewise.
6870         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6872 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
6874         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6875         (wide_int_set_zero_nonzero_bits): ...this.
6876         (zero_nonzero_bits_from_vr): Rename to...
6877         (vrp_set_zero_nonzero_bits): ...this.
6878         (extract_range_from_multiplicative_op_1): Abstract wide int
6879         code...
6880         (wide_int_range_multiplicative_op): ...here.
6881         (extract_range_from_binary_expr_1): Extract wide int binary
6882         operations into their own functions.
6883         (wide_int_range_lshift): New.
6884         (wide_int_range_can_optimize_bit_op): New.
6885         (wide_int_range_shift_undefined_p): New.
6886         (wide_int_range_bit_xor): New.
6887         (wide_int_range_bit_ior): New.
6888         (wide_int_range_bit_and): New.
6889         (wide_int_range_trunc_mod): New.
6890         (extract_range_into_wide_ints): New.
6891         (vrp_shift_undefined_p): New.
6892         (extract_range_from_multiplicative_op): New.
6893         (vrp_can_optimize_bit_op): New.
6894         * tree-vrp.h (value_range::dump): New.
6895         (wide_int_range_multiplicative_op): New.
6896         (wide_int_range_lshift):New.
6897         (wide_int_range_shift_undefined_p): New.
6898         (wide_int_range_bit_xor): New.
6899         (wide_int_range_bit_ior): New.
6900         (wide_int_range_bit_and): New.
6901         (wide_int_range_trunc_mod): New.
6902         (zero_nonzero_bits_from_bounds): Rename to...
6903         (wide_int_set_zero_nonzero_bits): ...this.
6904         (zero_nonzero_bits_from_vr): Rename to...
6905         (vrp_set_zero_nonzero_bits): ...this.
6906         (range_easy_mask_min_max): Rename to...
6907         (wide_int_range_can_optimize_bit_op): this.
6908         * vr-values.c (simplify_bit_ops_using_ranges): Rename
6909         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6911 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6913         * tree-vectorizer.h (vect_orig_stmt): New function.
6914         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6915         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6916         (vect_create_epilog_for_reduction): Likewise.
6917         (vectorizable_live_operation): Likewise.
6918         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6919         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6920         * tree-vect-stmts.c (vectorizable_call): Likewise.
6921         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6923 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6925         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6926         argument.
6927         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6928         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6929         (vect_transform_loop): Likewise.
6930         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6932 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6934         * tree-vectorizer.h (vect_schedule_slp): Return void.
6935         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6936         (vect_schedule_slp): Likewise.
6938 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6940         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6941         argument.
6942         (vect_transform_loop): Update calls accordingly.  Schedule SLP
6943         instances before the main loop, if any exist.
6945 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6947         PR tree-optimization/86749
6948         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6949         If the lhs is used in a COND_EXPR, check that it is being used
6950         as the "then" or "else" value.
6952 2018-08-01  Tom de Vries  <tdevries@suse.de>
6954         PR target/86800
6955         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6956         speculation_safe_value_not_needed.
6958 2018-08-01  Richard Biener  <rguenther@suse.de>
6960         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6961         as base and offset.
6963 2018-08-01  Martin Liska  <mliska@suse.cz>
6965         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6966         format how successful transformation is dumped.
6967         (gimple_mod_pow2_value_transform): Likewise.
6968         (gimple_mod_subtract_transform): Likewise.
6969         (gimple_stringops_transform): Likewise.
6971 2018-08-01  Martin Liska  <mliska@suse.cz>
6973         PR value-prof/35543
6974         * value-prof.c (interesting_stringop_to_profile_p):
6975         Simplify the code and add BUILT_IN_MEMMOVE.
6976         (gimple_stringops_transform): Likewise.
6978 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
6980         * config/aarch64/aarch64-simd.md
6981         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6982         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6983         use GPI iterator instead of SI mode.
6985 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6987         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6988         rs6000_speculation_barrier.
6989         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6990         new barrier pattern name.
6992 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6994         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6995         (speculation_barrier): New insn.
6997 2018-08-01  Richard Biener  <rguenther@suse.de>
6999         PR bootstrap/86724
7000         * graphite.h: Include isl/id.h and isl/space.h to allow build
7001         with ISL 0.20.
7003 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
7005         PR target/86651
7006         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7007         mode for COFF targets.
7008         * defaults.h (TARGET_COFF): Define.
7009         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7010         TARGET_COFF): Define.
7011         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7012         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7013         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7015 2018-07-31  Alexandre Oliva <oliva@adacore.com>
7017         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7018         * gimple-streamer-out.c (output_bb): Save it.
7019         * lto-streamer-in.c (input_struct_function_base): Restore
7020         instance discriminator if available.  Create map on demand.
7021         * lto-streamer-out.c (output_struct_function_base): Save it if
7022         available.
7023         * final.c (decl_to_instance_map): Document LTO strategy.
7025 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
7026             Olivier Hainque  <hainque@adacore.com>
7028         * debug.h (decl_to_instance_map_t): New type.
7029         (decl_to_instance_map): Declare.
7030         (maybe_create_decl_to_instance_map): New inline function.
7031         * final.c (bb_discriminator, last_bb_discriminator): New statics,
7032         to track basic block discriminators.
7033         (final_start_function_1): Initialize them.
7034         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7035         bb_discriminator.
7036         (decl_to_instance_map): New variable.
7037         (map_decl_to_instance, maybe_set_discriminator): New functions.
7038         (notice_source_line): Set discriminator.
7040 2018-07-31  Ian Lance Taylor  <iant@golang.org>
7042         * targhooks.c (default_have_speculation_safe_value): Add
7043         ATTRIBUTE_UNUSED.
7045 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7047         * dump-context.h: Include "pretty-print.h".
7048         (dump_context::refresh_dumps_are_enabled): New decl.
7049         (dump_context::emit_item): New decl.
7050         (class dump_context): Add fields "m_test_pp" and
7051         "m_test_pp_flags".
7052         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7053         (temp_dump_context::get_dumped_text): New decl.
7054         (class temp_dump_context): Add field "m_pp".
7055         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7056         (dump_context::refresh_dumps_are_enabled): ...and add a test for
7057         m_test_pp.
7058         (set_dump_file): Update for above change.
7059         (set_alt_dump_file): Likewise.
7060         (dump_loc): New overload, taking a pretty_printer *.
7061         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
7062         to any test pretty-printer.
7063         (make_item_for_dump_gimple_stmt): New function, adapted from
7064         optinfo::add_gimple_stmt.
7065         (dump_context::dump_gimple_stmt): Call it, and use the result,
7066         eliminating the direct usage of dump_file and alt_dump_file in
7067         favor of indirectly using them via emit_item.
7068         (make_item_for_dump_gimple_expr): New function, adapted from
7069         optinfo::add_gimple_expr.
7070         (dump_context::dump_gimple_expr): Call it, and use the result,
7071         eliminating the direct usage of dump_file and alt_dump_file in
7072         favor of indirectly using them via emit_item.
7073         (make_item_for_dump_generic_expr): New function, adapted from
7074         optinfo::add_tree.
7075         (dump_context::dump_generic_expr): Call it, and use the result,
7076         eliminating the direct usage of dump_file and alt_dump_file in
7077         favor of indirectly using them via emit_item.
7078         (make_item_for_dump_printf_va): New function, adapted from
7079         optinfo::add_printf_va.
7080         (make_item_for_dump_printf): New function.
7081         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7082         and use the result, eliminating the direct usage of dump_file and
7083         alt_dump_file in favor of indirectly using them via emit_item.
7084         (make_item_for_dump_dec): New function.
7085         (dump_context::dump_dec): Call it, and use the result,
7086         eliminating the direct usage of dump_file and alt_dump_file in
7087         favor of indirectly using them via emit_item.
7088         (make_item_for_dump_symtab_node): New function, adapted from
7089         optinfo::add_symtab_node.
7090         (dump_context::dump_symtab_node): Call it, and use the result,
7091         eliminating the direct usage of dump_file and alt_dump_file in
7092         favor of indirectly using them via emit_item.
7093         (dump_context::begin_scope): Reimplement, avoiding direct usage
7094         of dump_file and alt_dump_file in favor of indirectly using them
7095         via emit_item.
7096         (dump_context::emit_item): New member function.
7097         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7098         Set up test pretty-printer on the underlying context.  Call
7099         refresh_dumps_are_enabled.
7100         (temp_dump_context::~temp_dump_context): Call
7101         refresh_dumps_are_enabled.
7102         (temp_dump_context::get_dumped_text): New member function.
7103         (selftest::verify_dumped_text): New function.
7104         (ASSERT_DUMPED_TEXT_EQ): New macro.
7105         (selftest::test_capture_of_dump_calls): Run all tests twice, with
7106         and then without optinfo enabled.  Add uses of
7107         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
7108         * dumpfile.h: Update comment for the dump_* API.
7109         * optinfo-emit-json.cc
7110         (selftest::test_building_json_from_dump_calls): Update for new
7111         param for temp_dump_context ctor.
7112         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7113         and "m_owned" field.
7114         (optinfo_item::~optinfo_item): Likewise.
7115         (optinfo::add_item): New member function.
7116         (optinfo::emit): Update comment.
7117         (optinfo::add_string): Delete.
7118         (optinfo::add_printf): Delete.
7119         (optinfo::add_printf_va): Delete.
7120         (optinfo::add_gimple_stmt): Delete.
7121         (optinfo::add_gimple_expr): Delete.
7122         (optinfo::add_tree): Delete.
7123         (optinfo::add_symtab_node): Delete.
7124         (optinfo::add_dec): Delete.
7125         * optinfo.h (class dump_context): New forward decl.
7126         (optinfo::add_item): New decl.
7127         (optinfo::add_string): Delete.
7128         (optinfo::add_printf): Delete.
7129         (optinfo::add_printf_va): Delete.
7130         (optinfo::add_gimple_stmt): Delete.
7131         (optinfo::add_gimple_expr): Delete.
7132         (optinfo::add_tree): Delete.
7133         (optinfo::add_symtab_node): Delete.
7134         (optinfo::add_dec): Delete.
7135         (optinfo::add_poly_int): Delete.
7136         (optinfo_item::optinfo_item): Remove "owned" param.
7137         (class optinfo_item): Remove field "m_owned".
7139 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7141         PR middle-end/86705
7142         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7143         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7144         requested variable alignment.
7145         (expand_one_ssa_partition): Likewise.
7146         (expand_one_var): Likewise.
7148 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7150         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7151         to speculation_safe_value_not_needed.
7153 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7155         * targhooks.h (speculation_safe_value_not_needed): New prototype.
7156         * targhooks.c (speculation_safe_value_not_needed): New function.
7157         * target.def (have_speculation_safe_value): Update documentation.
7158         * doc/tm.texi: Regenerated.
7160 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7162         * config/aarch64/iterators.md (ALLI_TI): New iterator.
7163         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7164         expand.
7165         (despeculate_copy<ALLI:mode>_insn): New insn.
7166         (despeculate_copyti_insn): New insn.
7167         (despeculate_simple<ALLI:mode>): New insn
7168         (despeculate_simpleti): New insn.
7169         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7170         function.
7171         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7172         aarch64_speculation_safe_value.
7173         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7175 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7177         * config/aarch64/aarch64-speculation.cc: New file.
7178         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7179         before pass_reorder_blocks.
7180         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7181         prototype.
7182         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7183         X14 and X15 when tracking speculation.
7184         * config/aarch64/aarch64.md (register name constants): Add
7185         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7186         (unspec): Add UNSPEC_SPECULATION_TRACKER.
7187         (speculation_barrier): New insn attribute.
7188         (cmp<mode>): Allow SP in comparisons.
7189         (speculation_tracker): New insn.
7190         (speculation_barrier): Add speculation_barrier attribute.
7191         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7192         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7193         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7195 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7197         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7198         aarch64_track_speculation is true.
7199         (tb<optab><mode>1): Likewise.
7200         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7201         generate CB[N]Z when tracking speculation.
7202         (aarch64_split_compare_and_swap): Likewise.
7203         (aarch64_split_atomic_op): Likewise.
7205 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7207         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7209 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7211         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7212         (speculation_barrier): New insn.
7214 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7216         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7217         * config/arm/arm.md (speculation_barrier): New expand.
7218         (speculation_barrier_insn): New pattern.
7220 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7222         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7223         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7224         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7225         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7226         list.
7227         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7228         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7229         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7230         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7231         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7232         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7233         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7234         * builtins.c (expand_speculation_safe_value): New function.
7235         (expand_builtin): Call it.
7236         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7237         * doc/extend.texi: Document __builtin_speculation_safe_value.
7238         * doc/md.texi: Document "speculation_barrier" pattern.
7239         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7240         TARGET_HAVE_SPECULATION_SAFE_VALUE.
7241         * doc/tm.texi: Regenerated.
7242         * target.def (have_speculation_safe_value, speculation_safe_value): New
7243         hooks.
7244         * targhooks.c (default_have_speculation_safe_value): New function.
7245         (default_speculation_safe_value): New function.
7246         * targhooks.h (default_have_speculation_safe_value): Add prototype.
7247         (default_speculation_safe_value): Add prototype.
7249 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7251         * dump-context.h (dump_context::dump_loc): New decl.
7252         * dumpfile.c (dump_context::dump_loc): New member function.
7253         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7254         and dump_gimple_stmt.
7255         (dump_context::dump_gimple_expr_loc): Likewise, using
7256         dump_gimple_expr.
7257         (dump_context::dump_generic_expr_loc): Likewise, using
7258         dump_generic_expr.
7259         (dump_context::dump_printf_loc_va): Likewise, using
7260         dump_printf_va.
7261         (dump_context::begin_scope): Explicitly using the global function
7262         "dump_loc", rather than the member function.
7264 2018-07-31  Martin Sebor  <msebor@redhat.com>
7266         PR tree-optimization/86741
7267         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7269 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
7271         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7272         depend on whether prefetch instructions will be emitted or not.
7273         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7274         will be emitted or not.
7275         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7276         (TARGET_SETMEM_PFD): New macros.
7278 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7280         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7281         (NULL_STMT_VEC_INFO): Delete.
7282         (stmt_vec_info::operator*): Likewise.
7283         (stmt_vec_info::operator gimple *): Likewise.
7284         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7285         of NULL_STMT_VEC_INFO.
7286         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7287         (vect_reassociating_reduction_p): Likewise.
7288         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7289         (vectorizable_store): Likewise.
7290         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7291         (vec_info::free_stmt_vec_infos): Likewise.
7293 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7295         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7296         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7298 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7300         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7301         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7302         (vec_info::free_stmt_vec_info): New private member functions.
7303         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7304         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7305         * tree-parloops.c (gather_scalar_reductions): Remove calls to
7306         set_stmt_vec_info_vec and free_stmt_vec_infos.
7307         * tree-vect-loop.c (_loop_vec_info): Remove call to
7308         set_stmt_vec_info_vec.
7309         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7310         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7311         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7312         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7313         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
7314         assignments in {vec_info::,}new_stmt_vec_info that are redundant
7315         with the clearing in the xcalloc.
7316         (stmt_vec_info_vec): Delete.
7317         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7318         (vectorize_loops): Likewise.
7319         (vec_info::~vec_info): Remove argument from call to
7320         free_stmt_vec_infos.
7321         (vec_info::add_stmt): Remove vinfo argument from call to
7322         new_stmt_vec_info.
7324 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7326         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7327         rather than a gimple stmt.
7328         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
7329         information for pattern statements when passed the original
7330         statement; instead wait to be passed the pattern statement itself.
7331         Don't call set_vinfo_for_stmt here.
7332         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7333         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7334         stmt_vec_infos here.
7335         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7336         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7337         stmt_vec_infos entry.
7339 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7341         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7342         * tree-vectorizer.c (vec_info::replace_stmt): New function.
7343         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7344         * tree-vect-stmts.c (vectorizable_call): Likewise.
7345         (vectorizable_simd_clone_call): Likewise.
7347 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7349         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7350         * tree-vectorizer.c (vec_info::remove_stmt): New function.
7351         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7352         * tree-vect-loop.c (vect_transform_loop): Likewise.
7353         * tree-vect-slp.c (vect_schedule_slp): Likewise.
7354         * tree-vect-stmts.c (vect_remove_stores): Likewise.
7356 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7358         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7359         (vect_dr_stmt): Delete.
7360         * tree-vectorizer.c (vec_info::lookup_dr): New function.
7361         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7362         of DR_VECT_AUX.
7363         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7364         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7365         (vect_verify_datarefs_alignment, vect_peeling_supportable)
7366         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7367         (vect_analyze_data_refs): Likewise.
7368         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
7369         argument.
7370         (vect_find_same_alignment_drs): Likewise.
7371         (vect_slp_analyze_node_dependences): Update calls accordingly.
7372         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7373         instead of DR_VECT_AUX.
7374         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7375         of a vector data references.  Use vec_info::lookup_dr instead of
7376         DR_VECT_AUX.
7377         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7378         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7379         instead of DR_VECT_AUX.
7381 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7383         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
7384         dr_vec_info.
7385         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7386         accordingly.
7387         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7388         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7389         (vect_gen_prolog_loop_niters): Likewise.
7391 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7393         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
7394         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
7395         (vect_known_alignment_in_bytes, vect_dr_behavior)
7396         (vect_get_scalar_dr_size): Take references as dr_vec_infos
7397         instead of data_references.  Update calls to other routines for
7398         which the same change has been made.
7399         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
7400         dr_vec_infos instead of stmt_vec_infos.
7401         (vect_analyze_data_ref_dependence): Update call accordingly.
7402         (vect_slp_analyze_data_ref_dependence)
7403         (vect_record_base_alignments): Use DR_VECT_AUX.
7404         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
7405         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
7406         (vector_alignment_reachable_p, vect_get_data_access_cost)
7407         (vect_peeling_supportable, vect_analyze_group_access_1)
7408         (vect_analyze_group_access, vect_analyze_data_ref_access)
7409         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
7410         (vect_compile_time_alias, vect_small_gap_p)
7411         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
7412         (vect_supportable_dr_alignment): Take references as dr_vec_infos
7413         instead of data_references.  Update calls to other routines for
7414         which the same change has been made.
7415         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
7416         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7417         (vect_slp_analyze_and_verify_node_alignment)
7418         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7419         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7420         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
7421         above changes.
7422         (_vect_peel_info::dr): Replace with...
7423         (_vect_peel_info::dr_info): ...this new field.
7424         (vect_peeling_hash_get_most_frequent)
7425         (vect_peeling_hash_choose_best_peeling): Update accordingly.
7426         (vect_peeling_hash_get_lowest_cost):
7427         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
7428         routines for which the same change has been made.
7429         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
7430         data_reference.
7431         * tree-vect-loop-manip.c (get_misalign_in_elems)
7432         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
7433         above changes.
7434         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7435         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
7436         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
7437         (get_group_load_store_type, get_negative_load_store_type)
7438         (vect_get_data_ptr_increment, vectorizable_store)
7439         (vectorizable_load): Likewise.
7440         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
7441         Update calls to other routines for which the same change has been made.
7443 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7445         * tree-vectorizer.h (vec_info::move_dr): New member function.
7446         (dataref_aux): Rename to...
7447         (dr_vec_info): ...this and add "dr" and "stmt" fields.
7448         (_stmt_vec_info::dr_aux): Update accordingly.
7449         (_stmt_vec_info::data_ref_info): Delete.
7450         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
7451         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
7452         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
7453         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
7454         of data_ref.
7455         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
7456         (STMT_VINFO_DR_INFO): New macro.
7457         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
7458         (set_dr_misalignment): Update after rename of dataref_aux.
7459         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
7460         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
7461         initialization of STMT_VINFO_DATA_REF.
7462         * tree-vectorizer.c (vec_info::move_dr): New function.
7463         * tree-vect-patterns.c (vect_recog_bool_pattern)
7464         (vect_recog_mask_conversion_pattern)
7465         (vect_recog_gather_scatter_pattern): Use it.
7466         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
7467         the "dr" and "stmt" fields of dr_vec_info instead of
7468         STMT_VINFO_DATA_REF.
7470 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7472         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
7473         (is_pattern_stmt_p): Use it.
7474         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
7475         on pattern statements.
7477 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7479         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
7480         original stmt as a stmt_vec_info rather than a gimple stmt.
7481         (vect_pattern_recog_1): Take the statement directly as a
7482         stmt_vec_info, rather than via a gimple_stmt_iterator.
7483         Update call to vect_mark_pattern_stmts.
7484         (vect_pattern_recog): Update calls accordingly.
7486 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7488         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
7489         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
7490         a vect_def_type for the first argument.
7491         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
7492         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
7493         operand if it isn't defined by a vectorized statement.
7494         (vect_build_gather_load_calls): Remove the mask_dt argument and
7495         update calls to vect_get_vec_def_for_stmt_copy.
7496         (vectorizable_bswap): Likewise the dt argument.
7497         (vectorizable_call): Update calls to vectorizable_bswap and
7498         vect_get_vec_def_for_stmt_copy.
7499         (vectorizable_simd_clone_call, vectorizable_assignment)
7500         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
7501         (vectorizable_comparison): Update calls to
7502         vect_get_vec_def_for_stmt_copy.
7503         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
7504         vect_is_simple_use.
7505         (vect_get_loop_based_defs): Remove dt argument and update call
7506         to vect_get_vec_def_for_stmt_copy.
7507         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
7508         and vect_get_vec_def_for_stmt_copy.
7509         (vectorizable_load): Update calls to vect_build_gather_load_calls
7510         and vect_get_vec_def_for_stmt_copy.
7511         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7512         (vectorizable_reduction, vectorizable_live_operation): Update calls
7513         to vect_get_vec_def_for_stmt_copy.
7515 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7517         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
7518         and gimple stmt arguments with a stmt_vec_info.
7519         (vect_record_base_alignments): Update calls accordingly.
7520         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
7521         and gimple stmt arguments with a stmt_vec_info.
7522         (vect_build_slp_tree_1): Remove vinfo argument and update call
7523         to vect_record_max_nunits.
7524         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
7525         and vect_record_max_nunits.
7527 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7529         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
7530         file and take a stmt_vec_info instead of a gimple stmt.
7531         (supportable_widening_operation, vect_finish_replace_stmt)
7532         (vect_finish_stmt_generation, vect_get_store_rhs)
7533         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
7534         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
7535         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
7536         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
7537         (vect_create_data_ref_ptr, bump_vector_ptr)
7538         (vect_permute_store_chain, vect_setup_realignment)
7539         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
7540         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
7541         (vectorizable_reduction, vectorizable_induction)
7542         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
7543         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
7544         than gimple stmts as arguments.
7545         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
7546         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
7547         (can_group_stmts_p, vect_check_gather_scatter)
7548         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7549         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
7550         (vect_permute_load_chain, vect_shift_permute_load_chain)
7551         (vect_transform_grouped_load)
7552         (vect_record_grouped_load_vectors): Likewise.
7553         * tree-vect-loop.c (vect_fixup_reduc_chain)
7554         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
7555         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
7556         (vectorizable_reduction, vectorizable_induction)
7557         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
7558         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
7559         (vect_get_load_store_mask): Likewise.
7560         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
7561         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
7562         * tree-vect-stmts.c (vect_mark_relevant)
7563         (is_simple_and_all_uses_invariant)
7564         (exist_non_indexing_operands_for_use_p, process_use)
7565         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
7566         (vect_get_vec_def_for_operand, vect_get_vec_defs)
7567         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
7568         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
7569         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
7570         (get_negative_load_store_type, get_load_store_type)
7571         (vect_check_load_store_mask, vect_check_store_rhs)
7572         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
7573         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7574         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7575         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7576         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
7577         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
7578         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
7579         (supportable_widening_operation): Likewise.
7581 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7583         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
7584         a stmt_vec_info instead of a gcall.
7585         (vect_check_gather_scatter): Update call accordingly.
7586         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
7587         of a gphi.
7588         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
7589         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
7590         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
7591         instead of a gimple stmt.
7592         (vect_transform_loop): Update calls accordingly.
7593         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
7594         stmt_vec_infos instead of gimple stmts.
7595         (vect_analyze_slp_instance): Update use accordingly.
7596         * tree-vect-stmts.c (read_vector_array, write_vector_array)
7597         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
7598         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
7599         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
7600         (vect_gen_widened_results_half, vect_get_loop_based_defs)
7601         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
7602         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
7603         down to subroutines.
7605 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7607         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
7608         of the worklist from a vector of gimple stmts to a vector of
7609         stmt_vec_infos.
7610         * tree-vect-stmts.c (vect_mark_relevant, process_use)
7611         (vect_mark_stmts_to_be_vectorized): Likewise
7613 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7615         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
7616         statement before passing it to vect_analyze_stmt.
7617         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
7618         the chain of phi vector definitions.  Track the exit phi via its
7619         stmt_vec_info.
7620         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
7621         STMT_VINFO_REDUC_DEF.
7622         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
7623         stmt_vec_infos to handle the statement chains.
7624         (vect_get_slp_defs): Record the first statement in the node
7625         using a stmt_vec_info.
7626         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
7627         statements here and pass their stmt_vec_info down to subroutines.
7628         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
7629         down to vect_finish_stmt_generation.
7630         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
7631         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
7632         stmt_vec_infos to subroutines.
7633         (vect_remove_stores): Use stmt_vec_infos to handle the statement
7634         chains.
7636 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7638         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
7639         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
7640         (vect_permute_store_chain, vect_setup_realignment)
7641         (vect_permute_load_chain, vect_shift_permute_load_chain)
7642         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
7643         stmts internally, and when passing values to other vectorizer routines.
7644         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7645         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
7646         (vect_analyze_loop_operations, get_initial_def_for_reduction)
7647         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
7648         (vectorizable_reduction, vectorizable_induction)
7649         (vectorizable_live_operation, vect_transform_loop_stmt)
7650         (vect_transform_loop): Likewise.
7651         * tree-vect-patterns.c (vect_reassociating_reduction_p)
7652         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
7653         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
7654         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7655         (vect_slp_analyze_node_operations_1): Likewise.
7656         * tree-vect-stmts.c (vect_mark_relevant, process_use)
7657         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
7658         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
7659         (vect_finish_stmt_generation_1, get_group_load_store_type)
7660         (get_load_store_type, vect_build_gather_load_calls)
7661         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7662         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7663         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7664         (vectorizable_store, vectorizable_load, vectorizable_condition)
7665         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
7666         (supportable_widening_operation): Likewise.
7667         (vect_get_vector_types_for_stmt): Likewise.
7668         * tree-vectorizer.h (vect_dr_behavior): Likewise.
7670 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7672         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7673         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
7674         (vect_permute_store_chain, vect_permute_load_chain)
7675         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
7676         repeated stmt_vec_info lookups.
7677         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7678         (vect_update_ivs_after_vectorizer): Likewise.
7679         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
7680         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7681         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
7682         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7683         (vect_bb_slp_scalar_cost): Likewise.
7684         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
7686 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7688         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
7689         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
7690         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
7691         to get gassigns and gcalls, rather than operating on generc gimple
7692         stmts.
7693         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
7694         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
7695         (vectorizable_load, vect_analyze_stmt): Likewise.
7696         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
7698 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7700         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
7701         return stmt_vec_infos rather than gimple stmts.  Do not accept
7702         null arguments.
7703         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7704         of a gimple stmt.
7705         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7706         Update use of get_later_stmt.
7707         (vect_get_constant_vectors): Update call accordingly.
7708         (vect_schedule_slp_instance): Likewise
7709         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
7710         (vect_slp_analyze_instance_dependence): Likewise.
7711         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
7713 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7715         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
7716         (stmt_info_for_cost::stmt_info): ...this new field.
7717         (add_stmt_costs): Update accordingly.
7718         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7719         (vect_get_known_peeling_cost): Likewise.
7720         (vect_estimate_min_profitable_iters): Likewise.
7721         * tree-vect-stmts.c (record_stmt_cost): Likewise.
7723 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7725         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
7726         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7727         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7728         accordingly.
7729         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
7731 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7733         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
7734         a gimple stmt to a stmt_vec_info.
7735         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7737 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7739         * tree-vectorizer.h (vec_info::grouped_stores): Change from
7740         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7741         (_loop_vec_info::reduction_chains): Likewise.
7742         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
7743         accordingly.
7744         * tree-vect-slp.c (vect_analyze_slp): Likewise.
7746 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7748         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
7749         a gimple stmt to a stmt_vec_info.
7750         (_stmt_vec_info::next_element): Likewise.
7751         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
7752         (vect_slp_analyze_and_verify_node_alignment)
7753         (vect_analyze_group_access_1, vect_analyze_group_access)
7754         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
7755         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
7756         (vect_supportable_dr_alignment): Update accordingly.
7757         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
7758         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
7759         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
7760         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7761         * tree-vect-slp.c (vect_build_slp_tree_1)
7762         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
7763         (vect_split_slp_store_group, vect_analyze_slp_instance)
7764         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
7765         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
7766         (get_group_load_store_type, get_load_store_type)
7767         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
7768         (vect_transform_stmt, vect_remove_stores): Likewise.
7770 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7772         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
7773         than a gimple stmt.
7774         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7775         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
7776         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
7777         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
7778         (vector_alignment_reachable_p, vect_get_data_access_cost)
7779         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
7780         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
7781         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7782         (vect_analyze_group_access_1, vect_analyze_group_access)
7783         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
7784         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
7785         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
7786         result of vect_dr_stmt and use the stmt_vec_info instead of
7787         the associated gimple stmt.
7788         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7789         (vect_gen_prolog_loop_niters): Likewise.
7790         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7792 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7794         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
7795         to a vec<stmt_vec_info>.
7796         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
7797         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
7798         vec<stmt_vec_info>.
7799         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
7800         to a vec<stmt_vec_info>.
7801         (bst_traits::value_type, bst_traits::value_type): Likewise.
7802         (bst_traits::hash): Update accordingly.
7803         (vect_get_and_check_slp_defs): Change the stmts parameter from
7804         a vec<gimple *> to a vec<stmt_vec_info>.
7805         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
7806         (vect_build_slp_tree): Likewise.
7807         (vect_build_slp_tree_2): Likewise.  Update uses of
7808         SLP_TREE_SCALAR_STMTS.
7809         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
7810         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
7811         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
7812         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
7813         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
7814         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
7815         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
7816         (vect_get_constant_vectors, vect_get_slp_defs)
7817         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
7818         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
7819         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
7820         instead of gimple stmts.
7821         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
7822         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
7823         (vect_slp_analyze_instance_dependence): Update uses of
7824         SLP_TREE_SCALAR_STMTS.
7825         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7826         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7827         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7828         (get_initial_defs_for_reduction): Likewise.
7829         (vect_create_epilog_for_reduction): Likewise.
7830         (vectorize_fold_left_reduction): Likewise.
7831         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7832         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7833         (can_vectorize_live_stmts): Likewise.
7835 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7837         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7838         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7839         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7840         than gimple stmts.
7841         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7842         of a gimple stmt.
7843         (gather_scalar_reductions): Update after above interface changes.
7844         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7845         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7846         than gimple stmts.
7847         (vect_force_simple_reduction): Likewise.
7848         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7849         LOOP_VINFO_REDUCTIONS.
7850         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7852 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7854         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7855         a gimple stmt to a stmt_vec_info.
7856         * tree-vect-loop.c (vect_active_double_reduction_p)
7857         (vect_force_simple_reduction, vectorizable_reduction): Update
7858         accordingly.
7860 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7862         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7863         vec<gimple *> to a vec<stmt_vec_info>.
7864         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7865         the reduction_phis argument from a vec<gimple *> to a
7866         vec<stmt_vec_info>.
7867         (vectorizable_reduction): Likewise the phis local variable that
7868         is passed to vect_create_epilog_for_reduction.  Update for new type
7869         of SLP_TREE_VEC_STMTS.
7870         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7871         (vectorizable_live_operation): Likewise.
7872         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7873         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7875 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7877         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7878         a gimple stmt to a stmt_vec_info.
7879         (vectorizable_condition, vectorizable_live_operation)
7880         (vectorizable_reduction, vectorizable_induction): Pass back the
7881         vectorized statement as a stmt_vec_info.
7882         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7883         use of STMT_VINFO_VEC_STMT.
7884         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7885         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7886         as stmt_vec_infos rather than gimple stmts.
7887         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7888         to a stmt_vec_info.
7889         (vectorizable_live_operation): Likewise.
7890         (vectorizable_reduction, vectorizable_induction): Likewise,
7891         updating use of STMT_VINFO_VEC_STMT.
7892         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7893         of STMT_VINFO_VEC_STMT.
7894         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7895         (vectorizable_simd_clone_call, vectorizable_conversion)
7896         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7897         (vectorizable_store, vectorizable_load, vectorizable_condition)
7898         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7899         from a gimple stmt to a stmt_vec_info.
7900         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
7901         pointer to a stmt_vec_info to the vectorizable_* routines.
7903 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7905         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7906         a gimple stmt to a stmt_vec_info.
7907         (is_pattern_stmt_p): Update accordingly.
7908         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7909         (vect_record_grouped_load_vectors): Likewise.
7910         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7911         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7912         (vect_model_reduction_cost): Likewise.
7913         (vect_create_epilog_for_reduction): Likewise.
7914         (vectorizable_reduction, vectorizable_induction): Likewise.
7915         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7916         Return the stmt_vec_info for the pattern statement.
7917         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7918         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7919         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7920         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7921         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7922         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7923         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7924         (free_stmt_vec_info, vect_is_simple_use): Likewise.
7926 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7928         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7929         (vect_finish_stmt_generation): Likewise.
7930         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7931         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7932         (vect_build_gather_load_calls): Use the return value of the above
7933         functions instead of a separate call to vinfo_for_stmt.  Use narrow
7934         scopes for the input gimple stmt and wider scopes for the associated
7935         stmt_vec_info.  Use vec_info::lookup_def when setting these
7936         stmt_vec_infos from an SSA_NAME definition.
7937         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7938         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7939         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7940         (vectorizable_store, vectorizable_load, vectorizable_condition)
7941         (vectorizable_comparison): Likewise.
7942         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7943         (vectorizable_reduction): Likewise.
7945 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7947         * tree-vectorizer.h (vect_is_simple_use): Add an optional
7948         stmt_vec_info * parameter before the optional gimple **.
7949         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7950         (process_use, vect_get_vec_def_for_operand_1): Update callers.
7951         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7952         * tree-vect-loop.c (vectorizable_reduction): Likewise.
7953         (vectorizable_live_operation): Likewise.
7954         * tree-vect-patterns.c (type_conversion_p): Likewise.
7955         (vect_look_through_possible_promotion): Likewise.
7956         (vect_recog_rotate_pattern): Likewise.
7957         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7959 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7961         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7962         a typedef to a wrapper class.
7963         (NULL_STMT_VEC_INFO): New macro.
7964         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7965         (stmt_vec_info::operator*): New function.
7966         (stmt_vec_info::operator gimple *): Likewise.
7967         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7968         (add_stmt_costs): Likewise.
7969         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7970         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7971         (vect_get_known_peeling_cost): Likewise.
7972         (vect_estimate_min_profitable_iters): Likewise.
7973         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7974         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7975         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7976         (vectorizable_store, free_stmt_vec_infos): Likewise.
7977         (new_stmt_vec_info): Change return type of xcalloc to
7978         _stmt_vec_info *.
7980 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7982         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7983         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7984         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7985         a single_imm_use-based sequence.
7986         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7988 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7990         * tree-vectorizer.h (vec_info::lookup_def): Declare.
7991         * tree-vectorizer.c (vec_info::lookup_def): New function.
7992         * tree-vect-patterns.c (vect_get_internal_def): Use it.
7993         (vect_widened_op_tree): Likewise.
7994         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7995         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7996         (vectorizable_reduction): Likewise.
7997         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7998         of a gimple *.
7999         (vect_is_slp_reduction): Update calls accordingly.  Use
8000         vec_info::lookup_def.
8001         (vect_is_simple_reduction): Likewise
8002         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8004 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8006         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8007         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8008         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8009         of vinfo_for_stmt.
8010         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8011         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8012         (vect_update_vf_for_slp, vect_analyze_loop_operations)
8013         (vect_is_slp_reduction, vectorizable_induction)
8014         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8015         * tree-vect-patterns.c (vect_init_pattern_stmt):
8016         (vect_determine_min_output_precision_1, vect_determine_precisions)
8017         (vect_pattern_recog): Likewise.
8018         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8019         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8020         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8021         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8022         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8023         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
8024         info field from a loop to a loop_vec_info.
8026 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8028         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8029         (vec_info::add_stmt): Declare.
8030         * tree-vectorizer.c (vec_info::add_stmt): New function.
8031         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8032         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8033         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8034         (vectorizable_induction): Likewise.
8035         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8036         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8037         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8038         (vectorizable_load): Likewise.
8039         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8040         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8041         (vect_recog_gather_scatter_pattern): Likewise.
8042         (append_pattern_def_seq): Likewise.  Remove a check that is
8043         performed by add_stmt itself.
8045 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8047         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8048         which make_ssa_name was called with new_stmt before new_stmt
8049         had been created.
8051 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8053         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8054         split out from...
8055         (vect_is_slp_reduction): ...here...
8056         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
8057         that are already known to be false.
8059 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8061         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8062         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
8063         STMT_VINFO_NUM_SLP_USES when it's true.
8064         (vect_free_slp_instance): Add a final_p parameter and pass it to
8065         vect_free_slp_tree.
8066         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8067         (vect_analyze_slp_instance): Likewise.
8068         (vect_slp_analyze_operations): Likewise.
8069         (vect_slp_analyze_bb_1): Likewise.
8070         * tree-vectorizer.c (vec_info): Likewise.
8071         * tree-vect-loop.c (vect_transform_loop): Likewise.
8073 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8075         * tree-vect-loop.c (vectorizable_reduction): Assert that the
8076         function is not called for second and subsequent members of
8077         a reduction group.
8079 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8081         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8082         cases for nested loops from here to ...
8083         (vect_create_epilog_for_reduction): ...here.  Only call
8084         vect_is_simple_use for inner-loop reductions.
8086 2018-07-31  Martin Liska  <mliska@suse.cz>
8088         PR gcov-profile/85338
8089         PR gcov-profile/85350
8090         PR gcov-profile/85372
8091         * profile.c (struct location_triplet): New.
8092         (struct location_triplet_hash): Likewise.
8093         (output_location): Do not output a BB that
8094         is already recorded for a line.
8095         (branch_prob): Use streamed_locations.
8097 2018-07-31  Martin Liska  <mliska@suse.cz>
8099         PR gcov-profile/85370
8100         * coverage.c (coverage_begin_function): Do not mark target
8101         clones as artificial functions.
8103 2018-07-31  Martin Liska  <mliska@suse.cz>
8105         PR gcov-profile/83813
8106         PR gcov-profile/84758
8107         PR gcov-profile/85217
8108         PR gcov-profile/85332
8109         * profile.c (branch_prob): Do not record GOTO expressions
8110         for GIMPLE statements which locations are already streamed.
8112 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8114         * gcc.c (handle_spec_function): Accept a soft_matched_part
8115         argument, as do_spec_1.  Pass it down to ...
8116         (eval_spec_function): Accept a soft_matched_part argument,
8117         and pass it down to ...
8118         (do_spec_2): Accept a soft_matched_part argument, and pass
8119         it down to do_spec_1.
8120         (do_spec_1): Pass soft_matched_part to handle_spec_function.
8121         (handle_braces): Update call to handle_spec_function.
8122         (driver::set_up_specs): Update calls to do_spec_2.
8123         (compare_debug_dump_opt_spec_function): Likewise.
8124         (compare_debug_self_opt_spec_function): Likewise.
8126 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8128         * common.opt (nolibc): New option.
8129         * doc/invoke.texi (Link Options): Document it.
8130         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8131         * config/alpha/linux.h: Likewise.
8132         * config/arc/elf.h: Likewise.
8133         * config/arm/uclinux-elf.h: Likewise.
8134         * config/arm/unknown-elf.h: Likewise.
8135         * config/avr/avrlibc.h: Likewise.
8136         * config/bfin/bfin.h: Likewise.
8137         * config/bfin/linux.h: Likewise.
8138         * config/bfin/uclinux.h: Likewise.
8139         * config/darwin.h: Likewise.
8140         * config/darwin10.h: Likewise.
8141         * config/darwin12.h: Likewise.
8142         * config/gnu-user.h: Likewise.
8143         * config/lm32/uclinux-elf.h: Likewise.
8144         * config/pa/pa-hpux11.h: Likewise.
8145         * config/pa/pa64-hpux.h: Likewise.
8146         * config/sparc/sparc.h: Likewise.
8148 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8150         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8151         undefined variables.
8153 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8155         PR target/86640
8156         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8157         instead of GEN_INT.
8159 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8161         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8162         terminated string literal.
8164 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8166         PR rtl-optimization/85160
8167         * combine.c (is_just_move): New function.
8168         (try_combine): Allow combining two instructions into two if neither of
8169         the original instructions was a move.
8171 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
8173         PR target/86673
8174         * doc/extend.texi (Global Register Variables): Discourage use of type
8175         qualifiers.
8176         (Local Register Variables): Likewise.
8178 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
8180         PR tree-optimization/86506
8181         * hwint.h (ceil_log2): Resync with hwint.c implementation.
8183 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
8185         PR target/86547
8186         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8187         hard_regno, make sure no insn between `from` and `to` clobbers it.
8189 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
8190             Tom de Vries  <tdevries@suse.de>
8192         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8193         (PTX_DEFAULT_RUNTIME_DIM): ... this.
8194         (nvptx_goacc_validate_dims): Set default worker and gang dims to
8195         PTX_DEFAULT_RUNTIME_DIM.
8196         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8198 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
8200         * config/pa/pa.c (pa_output_addr_vec): Align address table.
8201         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8202         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8204 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
8206         * config/rs6000/constraints.md (wG constraint): Delete, no longer
8207         used.
8208         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8209         predicate to reflect toc fusion has been deleted.
8210         (toc_fusion_mem_raw): Delete, no longer used.
8211         (toc_fusion_mem_wrapped): Likewise.
8212         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8213         fusion mask bit.
8214         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8215         Delete, no longer used.
8216         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8217         meant to be used for toc fusion.
8218         (rs6000_debug_print_mode): Delete toc fusion debugging.
8219         (rs6000_debug_reg_global): Likewise.
8220         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8221         fusion and secondary reload support that were never used.
8222         (rs6000_option_override_internal): Delete TOC fusion, that was only
8223         partially defined, and it did not work unless you also used the
8224         -mcmodel= switch.
8225         (rs6000_legitimate_address_p): Delete TOC fusion support.
8226         (rs6000_opt_masks): Likewise.
8227         (fusion_wrap_memory_address): Delete function, no longer used.
8228         (fusion_split_address); Delete TOC fusion support.
8229         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8230         longer used with toc fusion being deleted.
8231         (TARGET_TOC_FUSION_FP): Likewise.
8232         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8233         UNSPEC.
8234         (toc fusion spliter): Delete TOC fusion support.
8235         (toc_fusionload_<mode>): Likewise.
8236         (toc_fusionload_di): Likewise.
8237         (fusion_gpr_load_<mode>): Delete generator function, this insn no
8238         longer needs to be named.  Rename predicate to delete TOC fusion.
8239         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8240         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8241         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8242         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8243         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8245 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8247         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8248         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
8249         __int128 in built-in function prototypes.
8250         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8251         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8253 2018-07-27  Martin Sebor  <msebor@redhat.com>
8255         PR tree-optimization/86696
8256         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8257         types, including enums.
8258         (handle_char_store): Be prepared for the above function to fail.
8260 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
8262         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8263         when optimization level is lower than 2 or optimize for size.
8265 2018-07-26  Martin Sebor  <msebor@redhat.com>
8267         PR tree-optimization/86043
8268         PR tree-optimization/86042
8269         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8270         (get_string_cst_length): Rename...
8271         (get_min_string_length): ...to this.  Add argument.
8272         (handle_char_store): Extend to handle multi-character stores by
8273         MEM_REF.
8274         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
8275         * tree.h (initializer_zerop): Add argument.
8277 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
8279         PR middle-end/86660
8280         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8281         declare target to variables if they have always,{to,from,tofrom} map
8282         kinds.
8284 2018-07-26  Martin Liska  <mliska@suse.cz>
8286         PR lto/86548
8287         * lto-wrapper.c: Add linker_output as prefix
8288         for ltrans_output_file.
8290 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
8292         PR rtl-optimization/85805
8293         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8294         value for hard registers if that was written in the same mode.
8296 2018-07-26  Martin Liska  <mliska@suse.cz>
8298         PR gcov-profile/86536
8299         * gcov.c (format_gcov): Use printf format %.*f directly
8300         and do not handle special values.
8302 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8304         * common/config/arc/arc-common.c (arc_option_optimization_table):
8305         Update default optimizations for size.
8307 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8309         * config/arc/arc.md (movsf_insn): Add short instruction selection.
8310         * config/arc/constraints.md (CfZ): New constraint.
8311         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8312         (subsf3_fpu): Likewise.
8313         (cmpsf_fpu): Likewise.
8314         (cmpsf_fpu_uneq): Likewise.
8316 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8318         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8319         accesses as well.
8320         (arc_is_uncached_mem_p): uncached applies to both the variable and
8321         the pointer.
8323 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8325         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8326         register names.
8328 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
8330         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8331         field "m_scopes" from vec to auto_vec.
8333 2018-07-25  Martin Liska  <mliska@suse.cz>
8335         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8336         return type.
8338 2018-07-25  Richard Biener  <rguenther@suse.de>
8340         PR debug/86654
8341         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8342         special wrt context_die late.
8343         (gen_subprogram_die): Re-use DIEs in local scope.
8345 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
8347         PR tree-optimization/86644
8348         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
8350 2018-07-25  Martin Liska  <mliska@suse.cz>
8352         PR middle-end/86645
8353         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8354         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8356 2018-07-25  Martin Liska  <mliska@suse.cz>
8358         PR sanitizer/79635
8359         * params.def: Explain ASan abbreviation and provide
8360         a documentation link.
8362 2018-07-24  Martin Sebor  <msebor@redhat.com>
8364         PR tree-optimization/86622
8365         PR tree-optimization/86532
8366         * builtins.h (string_length): Declare.
8367         * builtins.c (c_strlen): Correct handling of non-constant offsets.
8368         (check_access): Be prepared for non-constant length ranges.
8369         (string_length): Make extern.
8370         * expr.c (string_constant): Only handle the minor non-constant
8371         array index.  Use string_constant to compute the length of
8372         a generic string constant.
8374 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
8376         PR tree-optimization/86618
8377         * tree-vect-stmts.c (vectorizable_call): Don't take the address
8378         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8380 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
8382         PR tree-optimization/86636
8383         * json.cc (json::object::set): Fix comment.  Add assertions.
8384         (json::array::append): Move here from json.h.  Add comment and an
8385         assertion.
8386         (json::string::string): Likewise.
8387         * json.h (json::array::append): Move to json.cc.
8388         (json::string::string): Likewise.
8389         * optinfo-emit-json.cc
8390         (optrecord_json_writer::impl_location_to_json): Assert that we
8391         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
8392         wrapper around it.  Expand the location once, rather than three
8393         times.
8394         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
8395         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
8396         wrappers.
8397         (optrecord_json_writer::optinfo_to_json): Likewise, in four
8398         places.  Fix some overlong lines.
8400 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
8402         * config/aarch64/aarch64-simd.md
8403         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
8404         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
8405         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
8406         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
8407         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
8408         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
8409         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
8410         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
8411         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
8413 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
8415         PR middle-end/86627
8416         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
8417         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
8418         and abs_d == d, do the power of two handling if profitable.
8420 2018-07-24  Richard Biener  <rguenther@suse.de>
8422         * match.pd: Add BIT_FIELD_REF canonicalizations.
8424 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8426         PR c/86617
8427         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
8429 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8431         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
8432         terminated STRING_CST object.
8434 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8436         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
8438 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8440         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
8441         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
8442         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
8443         the elements into a register.
8444         (rs6000_split_v4si_init_di_reg): Delete.
8445         (rs6000_split_v4si_init): Delete.
8446         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
8447         (vsx_init_v4si): Rewrite as a define_expand.
8449 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8451         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
8452         zero_extend argument from memory): New.
8454 2018-07-22  Martin Sebor  <msebor@redhat.com>
8456         PR bootstrap/86621
8457         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
8458         diagnosing calls with unknown arguments unless -Walloca-larger-than
8459         is restricted to less than PTRDIFF_MAX bytes.
8461 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
8463         * doc/gcov.texi (Invoking Gcov): Editorial changes.
8465 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
8467         * pretty-print.c (text_info::set_location): Remove redundant
8468         "line_table" parameter from call to rich_location::set_range.
8470 2018-07-20  Martin Sebor  <msebor@redhat.com>
8472         PR middle-end/82063
8473         * builtins.c (expand_builtin_alloca): Adjust.
8474         * calls.c (alloc_max_size): Simplify.
8475         * cgraphunit.c (cgraph_node::expand): Adjust.
8476         * common.opt (larger_than_size, warn_frame_larger_than): Remove
8477         variables.
8478         (frame_larger_than_size): Same.
8479         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
8480         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
8481         Initialize.
8482         * doc/invoke.texi (GCC Command Options): Document option arguments.
8483         Explain byte-size arguments and suffixes.
8484         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
8485         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
8486         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
8487         * doc/options.texi (UInteger): Expand.
8488         (Host_Wide_Int, ByteSize): Document new properties.
8489         * final.c (final_start_function_1): Include sizes in an error message.
8490         * function.c (frame_offset_overflow): Same.
8491         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
8492         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
8493         Diagnose unbounded alloca calls only for limits of less than
8494         PTRDIFF_MAX.
8495         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
8496         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
8497         for alloca(0).
8498         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
8499         only for limits of less than PTRDIFF_MAX.
8500         * langhooks-def.h (lhd_handle_option): Change function argument
8501         to HOST_WIDE_INT.
8502         * langhooks.c (lhd_handle_option): Same.
8503         * langhooks.h (handle_option): Same.
8504         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
8505         ByteSize flags.
8506         (var_type, var_type_struct): Same.
8507         (var_set): Handle ByteSize flag.
8508         * optc-gen.awk: Add comments to output to ease debugging.  Make
8509         use of HOST_WIDE_INT where appropriate.
8510         * opts-gen-save.awk:  Use %lx to format unsigned long.
8511         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
8512         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
8513         arguments.  Parse bytes-size suffixes.
8514         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
8515         (enum_value_to_arg): Same.
8516         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
8517         (handle_option): Adjust.
8518         (generate_option): Change function argument to HOST_WIDE_INT.
8519         (cmdline_handle_error): Adjust.
8520         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
8521         (set_option): Change function argument to HOST_WIDE_INT.
8522         (option_enabled): Handle cl_host_wide_int.
8523         (get_option_state): Handle CLVC_SIZE.
8524         (control_warning_option): Same.
8525         * opts.c (common_handle_option): Change function argument to
8526         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
8527         OPT_Wvla_larger_than_.
8528         * opts.h (enum cl_var_type): Add an enumerator.
8529         * stor-layout.c (layout_decl): Print a more meaningful warning.
8530         * toplev.c (output_stack_usage): Adjust.
8532 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
8534         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
8535         call to inline_expand_builtin_string_cmp.
8536         (expand_builtin_strcmp): Likewise.
8537         (expand_builtin_strncmp): Likewise.
8538         (inline_string_cmp): Delete the last parameter, change char_type_node
8539         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
8540         two operands.
8541         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
8542         the inlining expansion on target where the type of the call has same or
8543         narrower precision than unsigned char.
8545 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
8547         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
8548         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
8549         * common.opt (fsave-optimization-record): New option.
8550         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
8551         * doc/invoke.texi (-fsave-optimization-record): New option.
8552         * dumpfile.c: Include "optinfo-emit-json.h".
8553         (struct kv_pair): Move to coretypes.h.
8554         (optgroup_options): Make non-static.
8555         (dump_context::end_scope): Call
8556         optimization_records_maybe_pop_dump_scope.
8557         * dumpfile.h (optgroup_options): New decl.
8558         * json.cc: New file.
8559         * json.h: New file.
8560         * optinfo-emit-json.cc: New file.
8561         * optinfo-emit-json.h: New file.
8562         * optinfo.cc: Include "optinfo-emit-json.h".
8563         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
8564         (optinfo_enabled_p): Check optimization_records_enabled_p.
8565         (optinfo_wants_inlining_info_p): Likewise.
8566         * optinfo.h: Update comment.
8567         * profile-count.c (profile_quality_as_string): New function.
8568         * profile-count.h (profile_quality_as_string): New decl.
8569         (profile_count::quality): New accessor.
8570         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
8571         and optinfo_emit_json_cc_tests.
8572         * selftest.h (selftest::json_cc_tests): New decl.
8573         (selftest::optinfo_emit_json_cc_tests): New decl.
8574         * toplev.c: Include "optinfo-emit-json.h".
8575         (compile_file): Call optimization_records_finish.
8576         (do_compile): Call optimization_records_start.
8577         * tree-ssa-live.c: Include optinfo.h.
8578         (remove_unused_scope_block_p): Retain inlining information if
8579         optinfo_wants_inlining_info_p returns true.
8581 2018-07-20  Richard Biener  <rguenther@suse.de>
8583         PR debug/86585
8584         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
8585         to cover -flto-partition=none.
8587 2018-07-20  Martin Liska  <mliska@suse.cz>
8589         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
8590         (get_decl_source_range): Remove unused function.
8592 2018-07-20  Richard Biener  <rguenther@suse.de>
8594         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
8595         (struct vn_phi_s): Likewise.
8596         (struct vn_reference_s): Likewise.
8597         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
8598         for searching the slot of an entry known to be in the hash itself.
8599         (vn_phi_hasher::equal): Likewise.
8600         (vn_reference_hasher::equal): Likewise.
8601         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
8602         globals.
8603         (optimistic_info, current_info): Remove, keeping only valid_info.
8604         (vn_reference_lookup_1): Remove fallback lookup.
8605         (vn_reference_lookup_2): Likewise.
8606         (vn_nary_op_lookup_1): Likewise.
8607         (vn_phi_lookup): Likewise.
8608         (vn_nary_build_or_lookup_1): Make sure to not chain the built
8609         hash element.
8610         (vn_reference_insert): Adjust, chain the inserted hash element
8611         at last_inserted_ref.
8612         (vn_reference_insert_pieces): Likewise.
8613         (visit_reference_op_call): Likewise.
8614         (vn_nary_op_insert_into): Chain the inserted hash element at
8615         last_inserted_nary.
8616         (vn_nary_op_insert_pieces): Adjust.
8617         (vn_nary_op_insert): Likewise.
8618         (vn_nary_op_insert_stmt): Likewise.
8619         (vn_phi_insert): Adjust, chain the inserted hash element at
8620         last_inserted_phi.
8621         (process_scc): Remove clearing and copying the optimistic
8622         table.  Instead remove elements inserted during an optimistic
8623         iteration from the single table we maintain.
8624         (init_scc_vn): Adjust.
8625         (free_scc_vn): Likewise.
8626         (sccvn_dom_walker::record_cond): Likewise.
8627         (sccvn_dom_walker::after_dom_children): Likewise.
8629 2018-07-19  Martin Sebor  <msebor@redhat.com>
8631         PR tree-optimization/84047
8632         PR tree-optimization/83776
8633         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
8634         (check_array_bounds): Call it.
8636 2018-07-19  Martin Sebor  <msebor@redhat.com>
8638         * align.h (align_flags): Use member initialization.
8640 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
8642         * Makefile.in (OBJS): Add optinfo.o.
8643         * coretypes.h (class symtab_node): New forward decl.
8644         (struct cgraph_node): New forward decl.
8645         (class varpool_node): New forward decl.
8646         * dump-context.h: New file.
8647         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
8648         "tree-pass.h".
8649         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
8650         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
8651         (set_alt_dump_file): Likewise.
8652         (dump_context::~dump_context): New dtor.
8653         (dump_gimple_stmt): Move implementation to...
8654         (dump_context::dump_gimple_stmt): ...this new member function.
8655         Add the stmt to any pending optinfo, creating one if need be.
8656         (dump_gimple_stmt_loc): Move implementation to...
8657         (dump_context::dump_gimple_stmt_loc): ...this new member function.
8658         Start a new optinfo and add the stmt to it.
8659         (dump_gimple_expr): Move implementation to...
8660         (dump_context::dump_gimple_expr): ...this new member function.
8661         Add the stmt to any pending optinfo, creating one if need be.
8662         (dump_gimple_expr_loc): Move implementation to...
8663         (dump_context::dump_gimple_expr_loc): ...this new member function.
8664         Start a new optinfo and add the stmt to it.
8665         (dump_generic_expr): Move implementation to...
8666         (dump_context::dump_generic_expr): ...this new member function.
8667         Add the tree to any pending optinfo, creating one if need be.
8668         (dump_generic_expr_loc): Move implementation to...
8669         (dump_context::dump_generic_expr_loc): ...this new member
8670         function.  Add the tree to any pending optinfo, creating one if
8671         need be.
8672         (dump_printf): Move implementation to...
8673         (dump_context::dump_printf_va): ...this new member function.  Add
8674         the text to any pending optinfo, creating one if need be.
8675         (dump_printf_loc): Move implementation to...
8676         (dump_context::dump_printf_loc_va): ...this new member function.
8677         Start a new optinfo and add the stmt to it.
8678         (dump_dec): Move implementation to...
8679         (dump_context::dump_dec): ...this new member function.  Add the
8680         value to any pending optinfo, creating one if need be.
8681         (dump_context::dump_symtab_node): New member function.
8682         (dump_context::get_scope_depth): New member function.
8683         (dump_context::begin_scope): New member function.
8684         (dump_context::end_scope): New member function.
8685         (dump_context::ensure_pending_optinfo): New member function.
8686         (dump_context::begin_next_optinfo): New member function.
8687         (dump_context::end_any_optinfo): New member function.
8688         (dump_context::s_current): New global.
8689         (dump_context::s_default): New global.
8690         (dump_scope_depth): Delete global.
8691         (dumpfile_ensure_any_optinfo_are_flushed): New function.
8692         (dump_symtab_node): New function.
8693         (get_dump_scope_depth): Reimplement in terms of dump_context.
8694         (dump_begin_scope): Likewise.
8695         (dump_end_scope): Likewise.
8696         (selftest::temp_dump_context::temp_dump_context): New ctor.
8697         (selftest::temp_dump_context::~temp_dump_context): New dtor.
8698         (selftest::verify_item): New function.
8699         (ASSERT_IS_TEXT): New macro.
8700         (ASSERT_IS_TREE): New macro.
8701         (ASSERT_IS_GIMPLE): New macro.
8702         (selftest::test_capture_of_dump_calls): New test.
8703         (selftest::dumpfile_c_tests): Call it.
8704         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
8705         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
8706         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
8707         descriptive comment.
8708         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
8709         (dump_node, dump_bb): Move these unrelated decls.
8710         (class dump_manager): Add leading comment.
8711         * optinfo.cc: New file.
8712         * optinfo.h: New file.
8714 2018-07-19  Michael Collison  <michael.collison@arm.com>
8715             Richard Henderson <rth@redhat.com>
8717         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
8718         (subti): Handle op1 zero.
8719         (subvti4, usub4ti4): New.
8720         (*sub<GPI>3_compare1_imm): New.
8721         (sub<GPI>3_carryinCV): New.
8722         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
8723         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
8725 2018-07-19  Michael Collison  <michael.collison@arm.com>
8726             Richard Henderson <rth@redhat.com>
8728         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
8729         (addti3): Create simpler code if low part is already known to be 0.
8730         (addvti4, uaddvti4): New.
8731         (*add<GPI>3_compareC_cconly_imm): New.
8732         (*add<GPI>3_compareC_cconly): New.
8733         (*add<GPI>3_compareC_imm): New.
8734         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
8735         handle constants within this pattern..
8736         (*add<GPI>3_compareV_cconly_imm): New.
8737         (*add<GPI>3_compareV_cconly): New.
8738         (*add<GPI>3_compareV_imm): New.
8739         (add<GPI>3_compareV): New.
8740         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
8741         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
8742         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
8743         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
8744         with 'comparison' operator.
8745         (*add<GPI>3_compareV_cconly_imm): Ditto.
8746         (*add<GPI>3_compareV_cconly): Ditto.
8747         (*add<GPI>3_compareV_imm): Ditto.
8748         (add<GPI>3_compareV): Ditto.
8749         (add<mode>3_carryinC): Ditto.
8750         (*add<mode>3_carryinC_zero): Ditto.
8751         (*add<mode>3_carryinC): Ditto.
8752         (add<mode>3_carryinV): Ditto.
8753         (*add<mode>3_carryinV_zero): Ditto.
8754         (*add<mode>3_carryinV): Ditto.
8756 2018-07-19  Michael Collison  <michael.collison@arm.com>
8757             Richard Henderson <rth@redhat.com>
8759         * config/aarch64/aarch64-modes.def (CC_V): New.
8760         * config/aarch64/aarch64-protos.h
8761         (aarch64_addti_scratch_regs): Declare
8762         (aarch64_subvti_scratch_regs): Declare.
8763         (aarch64_expand_subvti): Declare.
8764         (aarch64_gen_unlikely_cbranch): Declare
8765         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
8766         for signed overflow using CC_Vmode.
8767         (aarch64_get_condition_code_1): Handle CC_Vmode.
8768         (aarch64_gen_unlikely_cbranch): New function.
8769         (aarch64_addti_scratch_regs): New function.
8770         (aarch64_subvti_scratch_regs): New function.
8771         (aarch64_expand_subvti): New function.
8773 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8775         * config/aarch64/aarch64-option-extensions.def: New entry for profile
8776         extension.
8777         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
8778         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
8779         extension.
8781 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8783         PR target/83009
8784         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8785         address check not strict.
8787 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8789         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
8790         Umq with Umn.
8791         (store_pair_lanes<mode>): Likewise.
8792         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
8793         enum value 'ADDR_QUERY_LDP_STP_N'.
8794         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
8795         (aarch64_print_address_internal): Add declaration.
8796         (aarch64_print_ldpstp_address): Remove.
8797         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
8798         (aarch64_print_operand): Change printing of 'y'.
8799         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
8800         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
8801         'true' rather than '1'.
8802         * config/aarch64/constraints.md (Uml): Likewise.
8803         (Uml): Rename to Umn.
8804         (Umq): Remove.
8806 2018-07-19  Richard Biener  <rguenther@suse.de>
8808         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
8809         a trailing array.
8810         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
8811         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
8812         (vn_reference_hasher): Likewise.
8813         (struct vn_tables_s): Remove obstack and alloc-pool members.
8814         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
8815         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
8816         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
8817         (vn_reference_insert_pieces): Likewise.
8818         (alloc_vn_nary_op_noinit): Adjust.
8819         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
8820         (vn_phi_eq): Adjust.
8821         (shared_lookup_phiargs): Remove.
8822         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
8823         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
8824         (visit_reference_op_call): Likewise.
8825         (copy_nary, copy_phi, copy_reference): Remove.
8826         (process_scc): Rewind the obstack when iterating.  Do not
8827         copy the elements to valid_info but just move them from one
8828         hashtable to the other.
8829         (allocate_vn_table): Adjust.
8830         (free_vn_table): Likewise.
8831         (init_scc_vn): Likewise.
8832         (free_scc_vn): Likewise.
8834 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
8836         PR target/86560
8837         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8838         indirect_return as function type attribute.
8839         (ix86_attribute_table): Change indirect_return to function
8840         type attribute.
8841         * doc/extend.texi: Update indirect_return attribute.
8843 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
8845         * wide-int.h (widest2_int): New.
8846         * gimple-fold.c (arith_overflowed_p): Use it.
8847         * tree.h (widest2_int_cst): New.
8848         * tree-vrp.c (wide_int_binop_overflow): Rename from
8849         vrp_int_const_binop.
8850         Rewrite to work on trees.
8851         (extract_range_from_multiplicative_op_1): Abstract code to...
8852         (wide_int_range_min_max): ...here.
8853         (wide_int_range_cross_product): ...and here.
8854         (extract_range_from_binary_expr_1): Abstract overflow code to...
8855         (wide_int_range_mult_wrapping): ...here.
8856         * tree-vrp.h (wide_int_range_cross_product): New.
8857         (wide_int_range_mult_wrapping): New.
8859 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
8860             Julia Koval  <julia.koval@intel.com>
8862         * config/i386/x86-tune-costs.h (skylake_memcpy,
8863         skylake_memset): Replace rep_prefix with unrolling for size 512.
8865 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
8867         PR middle-end/86544
8868         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8869         comparision with EQ_EXPR in last stmt.
8871 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8873         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8874         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8875         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8876         previously known as "PowerPC AltiVec Built-in Functions".  Move
8877         some material to new subsubsections "PowerPC AltiVec Built-in
8878         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8879         ISA 2.07".
8880         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8881         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8882         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8883         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8885 2018-07-18  Richard Biener  <rguenther@suse.de>
8887         PR tree-optimization/86557
8888         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8889         EXACT_DIV_EXPR.
8891 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
8893         * config/s390/s390.c (s390_function_profiler): Generate CFI.
8895 2018-07-17  Jeff Law  <law@redhat.com>
8897         * config/arm/arm.c (get_label_padding): Update for recent
8898         changes to label_to_alignment.
8900         PR tree-optimization/86010
8901         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8903         * config/mips/mips.c (vr4130_align_insns): Update for recent
8904         changes to label_to_alignment.
8906         * config/frv/frv.c (frv_label_align): Update for recent changes
8907         to label_to_alignment.
8909         * config/nios2/nios2.c (nios2_label_align): Update for recent
8910         changes which dropped ALIGN_LABELS_LOG.
8912 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
8914         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8915         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8917 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
8919         * config/arc/arc.c (arc_label_align): Use align_labels instead of
8920         deprecated align_labels_log.
8922 2018-07-17  Richard Biener  <rguenther@suse.de>
8924         PR lto/86456
8925         * dwarf2out.c (init_sections_and_labels): Always generate
8926         a debug_line_str_section for early LTO debug.
8927         (dwarf2out_finish): Reset debug_line_str_hash output early.
8928         Bump counter for extra dwarf5 .debug_loc labels to not conflict
8929         with fat LTO part.
8930         (dwarf2out_early_finish): Output debug_line_str.
8932 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8934         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8935         index register on z196 or later.
8937 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8939         * config/s390/s390.c (s390_default_align): Set default function
8940         alignment to 16.
8941         (s390_override_options_after_change): Call s390_default align.
8942         (s390_option_override_internal): Call s390_default_align.
8943         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8945 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8947         PR middle-end/86542
8948         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8949         to _looptemp_ clauses, other than the first two.
8951 2018-07-17  Martin Liska  <mliska@suse.cz>
8953         * opts.c: Do not enable OPT_falign_* for -Os.
8955 2018-07-17  Martin Liska  <mliska@suse.cz>
8957         * align.h (MAX_CODE_ALIGN): New.
8958         (MAX_CODE_ALIGN_VALUE): New.
8959         * common/config/i386/i386-common.c (ix86_handle_option):
8960         (MAX_CODE_ALIGN): Moved to align.h.
8961         * final.c (MAX_CODE_ALIGN): Likewise.
8962         * opts.c (parse_and_check_align_values):
8963         (MAX_CODE_ALIGN): Likewise.
8964         (MAX_CODE_ALIGN_VALUE): Likewise.
8966 2018-07-17  Martin Liska  <mliska@suse.cz>
8968         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8969         in order to fulfil coding style.
8970         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8971         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8972         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8973         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8974         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8975         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8976         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8977         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8978         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8980 2018-07-17  Martin Liska  <mliska@suse.cz>
8982         * align.h: New file.
8983         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8984         directly.
8985         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8986         align_flags of label_to_alignment.
8987         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8988         align_flags class.
8989         * config/m68k/m68k.c: Do not use removed align_labels_value and
8990         align_loops_value.
8991         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8992         (LOOP_ALIGN): Likewise.
8993         (LABEL_ALIGN): Likewise.
8994         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8995         Remove not used macro.
8996         (rs6000_loop_align): Change return type to align_flags.
8997         (rs6000_loop_align_max_skip): Remove.
8998         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8999         Change return type to align_flags.
9000         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9001         Remove not used macro.
9002         (rs6000_loop_align):  Change return type to align_flags.
9003         (rs6000_loop_align_max_skip): Remove.
9004         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9005         * config/rx/rx-protos.h (rx_align_for_label): Make it
9006         static function.
9007         * config/rx/rx.c (rx_align_for_label): Change return type
9008         to align_flags.
9009         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9010         macro definitions.
9011         into align_flags class.
9012         (LABEL_ALIGN): Likewise.
9013         (LOOP_ALIGN): Likewise.
9014         * config/s390/s390.c (s390_label_align): Use align_flags
9015         class member.
9016         (s390_asm_output_function_label): Likewise.
9017         * config/sh/sh.c (sh_override_options_after_change):
9018         Use align_flags class directly without macros.
9019         (find_barrier): Likewise.
9020         (barrier_align): Likewise.
9021         (sh_loop_align): Likewise.
9022         * config/spu/spu.c (spu_option_override):
9023         Use align_flags_tuple::get_value instead of removed macros.
9024         (spu_sched_init): Likewise.
9025         * config/spu/spu.h (GTY): Likewise.
9026         * config/visium/visium.c (visium_option_override):
9027         Set "8" as default secondary alignment.
9028         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9029         in order to guarantee secondary alignment of 8.
9030         * coretypes.h: Include align.h header file.
9031         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9032         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9033         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9034         * doc/tm.texi.in: Likewise.
9035         * final.c (struct label_alignment): Remove not used structure.
9036         (LABEL_ALIGN): Change type to align_flags.
9037         (LOOP_ALIGN): Likewise.
9038         (JUMP_ALIGN): Likewise.
9039         (default_loop_align_max_skip): Remove.
9040         (default_label_align_max_skip): Likewise.
9041         (default_jump_align_max_skip): Likewise.
9042         (default_label_align_after_barrier_max_skip):
9043         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9044         (LABEL_TO_MAX_SKIP): Remove.
9045         (label_to_alignment): Return align_flags type instead of integer.
9046         (label_to_max_skip): Remove.
9047         (align_fuzz): Use align_flags type.
9048         (compute_alignments): Use align_flags type and use align_flags::max
9049         to combine multiple alignments.
9050         (grow_label_align): Grow vec instead of C array.
9051         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9052         (shorten_branches):  Use align_flags type and use align_flags::max
9053         to combine multiple alignments.
9054         (final_scan_insn_1): Remove usage of secondary alignment that comes
9055         from label alignment, but instead use proper secondary alignment
9056         which is computed in grow_label_align.
9057         * flags.h (struct align_flags_tuple): Move to align.h.
9058         (struct align_flags): Likewise.
9059         (state_align_loops): Rename to align_loops.
9060         (state_align_jumps): Rename to align_jumps.
9061         (state_align_labels): Rename to align_labels.
9062         (state_align_functions): Rename to align_functions.
9063         (align_loops_log): Remove.
9064         (align_jumps_log): Remove.
9065         (align_labels_log): Remove.
9066         (align_functions_log): Remove.
9067         (align_loops_max_skip): Remove.
9068         (align_jumps_max_skip): Remove.
9069         (align_labels_max_skip): Remove.
9070         (align_functions_max_skip): Remove.
9071         (align_loops_value): Remove.
9072         (align_jumps_value): Remove.
9073         (align_labels_value): Remove.
9074         (align_functions_value): Remove.
9075         * output.h (label_to_alignment): Change return type to align_flags.
9076         (label_to_max_skip): Remove.
9077         * target.def: Remove loop_align_max_skip, label_align_max_skip,
9078         jump_align_max_skip macros.
9079         * targhooks.h (default_loop_align_max_skip): Remove.
9080         (default_label_align_max_skip): Likewise.
9081         (default_jump_align_max_skip): Likewise.
9082         (default_label_align_after_barrier_max_skip): Remove.
9083         * toplev.c (read_log_maxskip): Use ::normalize function.
9084         (parse_N_M): Remove not used argument and also call ::normalize.
9085         (parse_alignment_opts): Do not pass unused arguments.
9086         * varasm.c (assemble_start_function): Use directly align_functions
9087         instead of removed macros.
9088         * system.h: Do not poison removed macros.
9090 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
9092         PR middle-end/86539
9093         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9094         and cond temporaries don't have reference type if iterator has
9095         pointer type.  For init use &for_pre_body instead of pre_p if
9096         for_pre_body is non-empty.
9098 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9100         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9101         double-double modes to SFmode directly directly.
9102         (trunc<mode>sf2_fprs): Delete.
9104 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9106         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9107         for conversions between IFmode and the decimal floating point modes.
9108         (init_float128_ieee): Use the correct names for conversions between
9109         KFmode and the decimal floating point modes.
9111 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9113         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9114         for the conversions between TDmode and IFmode.
9115         (init_float128_ieee): Use more correct names for the conversions
9116         between TDmode and KFmode.
9118 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
9120         PR tree-optimization/86526
9121         * builtins.c (expand_builtin_memcmp): Formatting fixes.
9122         (inline_expand_builtin_string_cmp): Likewise.
9123         (inline_string_cmp): Likewise.  Use c_readstr instead of
9124         builtin_memcpy_read_str.  Add unit_mode temporary.
9126 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9128         PR middle-end/86528
9129         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9130         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9132 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9134         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9135         Alphabetize prototypes of built-in functions, separating out
9136         built-in functions that are listed in this section but should be
9137         described elsewhere.
9139 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
9141         PR target/86511
9142         * expmed.c (emit_store_flag): Do not emit setcc followed by a
9143         conditional move when trapping comparison was split to a
9144         non-trapping one (and vice versa).
9146 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9148         * config/s390/s390.c (s390_function_profiler): Generate nops
9149         instead of profiler call sequences.
9150         * config/s390/s390.opt: Add the new option.
9152 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9154         * config/s390/s390.c (s390_function_profiler): Generate
9155         __mcount_loc section.
9156         * config/s390/s390.opt: Add the new option.
9158 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9160         * common.opt: Add the new warning.
9161         * config/s390/s390.c (s390_function_profiler): Emit "brasl
9162         %r0,__fentry__" when -mfentry is specified.
9163         (s390_option_override_internal): Disallow -mfentry for 31-bit
9164         CPUs.
9165         * config/s390/s390.opt: Add the new option.
9167 2018-07-16  Richard Biener  <rguenther@suse.de>
9169         PR lto/86523
9170         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9171         for function-local FUNCTION_DECL and RESULT_DECL immediately.
9173 2018-07-16  Martin Liska  <mliska@suse.cz>
9175         PR ipa/86529
9176         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9177         to ::get_create.
9179 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9181         * config/arc/arcHS.md: Update ARCHS scheduling rules.
9183 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9185         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9186         for ARCHS4x.
9187         * config/arc/arc-cpus.def (hs4x): New cpu.
9188         (hs4xd): Likewise.
9189         * config/arc/arc-tables.opt: Regenerate.
9190         * config/arc/arc.c (arc_sched_issue_rate): New function.
9191         (TARGET_SCHED_ISSUE_RATE): Define.
9192         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9193         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9194         fpu_cvt.
9195         (attr tune): Add ARCHS4x tune values.
9196         (attr tune_dspmpy): Define.
9197         (*tst): Correct instruction type.
9198         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9199         * config/arc/arcHS4x.md: New file.
9200         * config/arc/fpu.md: Update instruction type attributes.
9201         * config/arc/t-multilib: Regenerate.
9203 2018-07-16  Tom de Vries  <tdevries@suse.de>
9205         PR debug/86455
9206         * var-tracking.c (vt_initialize): Fix pre_dec handling.
9208 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9210         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9211         early clobber.
9213 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
9215         PR tree-optimization/86514
9216         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9217         conversion to a boolean type from a type with greater precision.
9219 2018-07-16  Tom de Vries  <tdevries@suse.de>
9221         * var-tracking.c (vt_initialize): Print adjusted insn slim if
9222         dump_flags request TDF_SLIM.
9224 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
9226         * fold-const.c (int_const_binop_1): Abstract...
9227         (wide_int_binop): ...wide int code here.
9228         (poly_int_binop): ...poly int code here.
9229         Abstract the rest of int_const_binop_1 into int_const_binop.
9230         * fold-const.h (wide_int_binop): New.
9231         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9232         Remove useless PLUS/MINUS_EXPR case.
9233         (zero_nonzero_bits_from_vr): Move wide int code...
9234         (zero_nonzero_bits_from_bounds): ...here.
9235         (extract_range_from_binary_expr_1): Move mask optimization code...
9236         (range_easy_mask_min_max): ...here.
9237         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9238         (range_easy_mask_min_max): New.
9240 2018-07-15  Jeff Law  <law@redhat.com>
9242         PR target/85993
9243         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9244         block.
9246 2018-07-14  Jim Wilson  <jimw@sifive.com>
9248         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9250 2018-07-14  Paul Koning  <ni1d@arrl.net>
9252         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9254 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
9256         * lto-streamer-out.c (copy_function_or_variable): Dump info about
9257         copying section.
9259 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
9260             Steve Munroe  <munroesj52@gmail.com>
9262         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9263         (_mm_andnot_si128): Likewise.
9264         (_mm_or_si128): Likewise.
9265         (_mm_xor_si128): Likewise.
9267 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
9269         PR middle-end/78809
9270         * builtins.c (expand_builtin_memcmp): Inline the calls first
9271         when result_eq is false.
9272         (expand_builtin_strcmp): Inline the calls first.
9273         (expand_builtin_strncmp): Likewise.
9274         (inline_string_cmp): New routine. Expand a string compare
9275         call by using a sequence of char comparison.
9276         (inline_expand_builtin_string_cmp): New routine. Inline expansion
9277         a call to str(n)cmp/memcmp.
9278         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9279         New option.
9280         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9282 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
9284         * config/arm/driver-arm.c: Include arm-native.h.
9285         (host_detect_local_cpu): Use auto-generated data tables.
9286         (vendors, arm_cpu_table): Delete.  Move part information to ...
9287         * config/arm/arm-cpus.in: ... here.
9288         * config/arm/parsecpu.awk (gen_native): New function.
9289         (vendor, part): New CPU fields.
9290         (END): Add support for building the native CPU detection tables.
9291         * config/arm/t-arm (arm-native.h): Add build rule.
9292         (driver-arm.o): Add dependency on arm-native.h.
9294 2018-07-13  Richard Biener  <rguenther@suse.de>
9296         PR middle-end/85974
9297         * match.pd (addr1 - addr2): Allow either of the operand to
9298         have a conversion.
9300 2018-07-13  Tom de Vries  <tdevries@suse.de>
9302         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9303         in remap_ssa_name.
9305 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
9307         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9308         arrays instead of numbered variables.
9310 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9312         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9313         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9315 2018-07-13  Richard Biener  <rguenther@suse.de>
9317         PR debug/86452
9318         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9319         instead of get_context_die.
9321 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
9322             Richard Biener  <rguenther@suse.de>
9324         PR middle-end/86489
9325         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9326         that the loop latch destination where phi is defined.
9328 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
9330         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9331         (riscv_expand_epilogue): Add assertion to check interrupt mode.
9332         (riscv_set_current_function): Extract getting interrupt type to new
9333         function.
9334         (riscv_get_interrupt_type): New function.
9335         (riscv_merge_decl_attributes): New function, checking interrupt type is
9336         same.
9337         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9339 2018-07-12  Paul Koning  <ni1d@arrl.net>
9341         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9342         directive.
9344 2018-07-12  Paul Koning  <ni1d@arrl.net>
9346         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9347         zero reference, add doloop_end instead.
9348         * doc/md.texi (decrement_and_branch_until_zero): Remove.
9349         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
9350         detail for doloop_end.
9352 2018-07-12  Martin Sebor  <msebor@redhat.com>
9354         PR c/86453
9355         * attribs.c (decl_attributes): Reject conflicting attributes before
9356         calling attribute handlers.
9358 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
9360         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9361          parameter.
9362         (gcc::dump_manager::get_dump_file_name): likewise.
9363         (dump_begin): Likewise.
9364         * dumpfile.h (dump_begin): Update prototype.
9365         (gcc::dump_manager::get_dump_file_name,
9366         gcc::dump_manager::get_dump_file_name): Update prototype.
9368 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9370         * internal-fn.h (vectorizable_internal_fn_p): New function.
9371         * tree-vect-slp.c (compatible_calls_p): Likewise.
9372         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
9373         to internal functions.
9374         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9376 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9378         * fold-const.h (inverse_conditions_p): Declare.
9379         * fold-const.c (inverse_conditions_p): New function.
9380         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
9381         that test the inverse condition of a conditional internal function.
9382         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9383         * internal-fn.c (internal_fn_mask_index): Handle conditional
9384         internal functions.
9385         (vectorized_internal_fn_supported_p): New function.
9386         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
9387         (any_pred_load_store): Replace with...
9388         (need_to_predicate): ...this new variable.
9389         (redundant_ssa_names): New variable.
9390         (ifcvt_can_use_mask_load_store): Move initial checks to...
9391         (ifcvt_can_predicate): ...this new function.  Handle tree codes
9392         for which a conditional internal function exists.
9393         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
9394         instead of ifcvt_can_use_mask_load_store.  Update after variable
9395         name change.
9396         (predicate_load_or_store): New function, split out from
9397         predicate_mem_writes.
9398         (check_redundant_cond_expr): New function.
9399         (value_available_p): Likewise.
9400         (predicate_rhs_code): Likewise.
9401         (predicate_mem_writes): Rename to...
9402         (predicate_statements): ...this.  Use predicate_load_or_store
9403         and predicate_rhs_code.
9404         (combine_blocks, tree_if_conversion): Update after above name changes.
9405         (ifcvt_local_dce): Handle redundant_ssa_names.
9406         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
9407         general conditional functions.
9408         * tree-vect-stmts.c (vectorizable_call): Likewise.
9410 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9411             Alan Hayward  <alan.hayward@arm.com>
9412             David Sherwood  <david.sherwood@arm.com>
9414         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
9415         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
9416         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
9417         plus and minus and convert them into IFN_COND_FMA-based sequences.
9418         (convert_mult_to_fma): Handle conditional plus and minus.
9420 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9422         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
9423         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
9424         (cond_fnms_optab): New optabs.
9425         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
9426         internal functions.
9427         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
9428         * internal-fn.h (get_conditional_internal_fn): Declare.
9429         (get_unconditional_internal_fn): Likewise.
9430         * internal-fn.c (cond_ternary_direct): New macro.
9431         (expand_cond_ternary_optab_fn): Likewise.
9432         (direct_cond_ternary_optab_supported_p): Likewise.
9433         (FOR_EACH_COND_FN_PAIR): Likewise.
9434         (get_conditional_internal_fn): New function.
9435         (get_unconditional_internal_fn): Likewise.
9436         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
9437         (gimple_match_op::gimple_match_op): Add a new overload for 5
9438         operands.
9439         (gimple_match_op::set_op): Likewise.
9440         (gimple_resimplify5): Declare.
9441         * genmatch.c (decision_tree::gen): Generate simplifications for
9442         5 operands.
9443         * gimple-match-head.c (gimple_simplify): Define an overload for
9444         5 operands.  Handle calls with 5 arguments in the top-level overload.
9445         (convert_conditional_op): Handle conversions from unconditional
9446         internal functions to conditional ones.
9447         (gimple_resimplify5): New function.
9448         (build_call_internal): Pass a fifth operand.
9449         (maybe_push_res_to_seq): Likewise.
9450         (try_conditional_simplification): Try converting conditional
9451         internal functions to unconditional internal functions.
9452         Handle 3-operand unconditional forms.
9453         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
9454         Define ternary equivalents of the current rules for binary conditional
9455         internal functions.
9456         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
9457         ternary operations.
9458         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
9459         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
9460         (optab): Handle them.
9461         (SVE_COND_FP_TERNARY): New int iterator.
9462         (sve_fmla_op, sve_fmad_op): New int attributes.
9463         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
9464         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
9465         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
9467 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9469         * target.def (preferred_else_value): New target hook.
9470         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
9471         * doc/tm.texi: Regenerate.
9472         * targhooks.h (default_preferred_else_value): Declare.
9473         * targhooks.c (default_preferred_else_value): New function.
9474         * internal-fn.h (conditional_internal_fn_code): Declare.
9475         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
9476         (get_conditional_internal_fn): Use it.
9477         (conditional_internal_fn_code): New function.
9478         * gimple-match.h (gimple_match_cond): New struct.
9479         (gimple_match_op): Add a cond member function.
9480         (gimple_match_op::gimple_match_op): Update all forms to take a
9481         gimple_match_cond.
9482         * genmatch.c (expr::gen_transform): Use the same condition as res_op
9483         for the suboperation, but don't specify a particular else_value.
9484         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
9485         (visit_nary_op, visit_reference_op_load): Pass
9486         gimple_match_cond::UNCOND to the gimple_match_op constructor.
9487         * gimple-match-head.c: Include tree-eh.h
9488         (convert_conditional_op): New function.
9489         (maybe_resimplify_conditional_op): Likewise.
9490         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
9491         (gimple_resimplify2): Likewise.
9492         (gimple_resimplify3): Likewise.
9493         (gimple_resimplify4): Likewise.
9494         (maybe_push_res_to_seq): Return null for conditional operations.
9495         (try_conditional_simplification): New function.
9496         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
9497         constructor.
9498         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
9499         IFN_COND_* call.
9500         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
9501         function.
9502         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
9504 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
9506         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
9507         DECL_FCONTEXT
9508         (hash_tree): Do not hash DECL_FCONTEXT
9509         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
9510         Do not stream DECL_FCONTEXT.
9511         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
9512         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
9514 2018-07-12  Richard Biener  <rguenther@suse.de>
9516         PR debug/86462
9517         * dwarf2out.c (gen_block_die): Only output blocks when they have
9518         at least one !DECL_IGNORED_P variable.
9520 2018-07-12  Richard Biener  <rguenther@suse.de>
9522         PR target/84829
9523         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
9524         Remove -mieee-fp handling.
9526 2018-07-12  Richard Biener  <rguenther@suse.de>
9528         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
9529         left-over from last patch.
9531 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
9533         PR tree-optimization/86492
9534         * gimple-ssa-store-merging.c
9535         (imm_store_chain_info::coalesce_immediate_stores): Call
9536         check_no_overlap even for the merge_overlapping case.  Formatting fix.
9538 2018-07-12  Richard Biener  <rguenther@suse.de>
9540         PR middle-end/86479
9541         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
9542         move possibly trapping operations into the conditional.
9544 2018-07-12  Richard Biener  <rguenther@suse.de>
9546         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
9547         (vn_lookup_simplify_result): Remove recursion limit applied
9548         here.
9549         (vn_nary_build_or_lookup_1): Adjust.
9550         (try_to_simplify): Likewise.
9551         * gimple-match-head.c (gimple_resimplify1): Instead apply one
9552         here.
9553         (gimple_resimplify2): Likewise.
9554         (gimple_resimplify3): Likewise.
9555         (gimple_resimplify4): Likewise.
9557 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
9559         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
9560         Use __mmask64 type instead of __mmask8 for __M argument.
9561         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
9562         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
9563         __U argument.
9564         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
9565         __mmask16 for __M argument.
9566         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
9567         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
9568         to __mmask16 instead of __mmask8.
9569         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
9570         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
9571         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
9572         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
9573         instead of __mmask16 for __U argument.
9574         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
9575         __mmask16 instead of __mmask8 for __U argument.
9576         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
9577         __U argument.
9578         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
9579         __mmask16.
9580         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
9581         argument.
9582         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
9583         __U argument.
9584         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
9585         __mmask16.
9586         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
9587         of __mmask16.
9588         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
9589         __U argument.
9590         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
9591         __U argument.
9592         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
9593         __U argument.
9594         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
9595         __U argument.
9596         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
9597         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
9598         return type as well as __M argument type and all casts from __mmask8
9599         to __mmask32.
9600         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
9601         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
9602         return type as well as __M argument type and all casts from __mmask8
9603         to __mmask16.
9604         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
9605         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
9606         return type as well as __M argument type and all casts from __mmask8
9607         to __mmask32.
9608         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
9609         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
9610         return type as well as __M argument type and all casts from __mmask8
9611         to __mmask16.
9612         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
9613         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
9614         __mmask16.
9616 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
9618         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
9619         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
9620         for __U argument.
9622 2018-07-11  Paul Koning  <ni1d@arrl.net>
9624         * doc/md.texi (define_subst): Document how multiple occurrences of
9625         the same argument in the replacement pattern are handled.
9627 2018-07-11  Paul Koning  <ni1d@arrl.net>
9629         * doc/extend.texi (Common Variable Attributes): Move "mode" into
9630         alphabetical order.
9631         (Common Type Attributes): Add "mode" attribute.
9633 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
9635         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
9636         stream DECL_ORIGINAL_TYPE.
9637         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
9638         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
9639         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
9640         Do not walk original type.
9641         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
9642         external decls.
9643         (write_ts_decl_non_common_tree_pointers): Do not stream
9644         DECL_ORIGINAL_TYPE
9645         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
9646         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
9648 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9650         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
9651         thread twice from the same starting edge.
9653 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9655         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
9656         * gimple.c (gimple_call_nonnull_result_p): ...here...
9657         (gimple_call_nonnull_arg): ...and here.
9658         * gimple.h (gimple_call_nonnull_result_p): New.
9659         (gimple_call_nonnull_arg): New.
9661 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
9663         * config/arm/arm-cpus.in: Move information from fpu field of each
9664         cpu definition to the isa field.
9665         * config/arm/parsecpu.awk (fpu): Delete match rule.
9666         (gen_comm_data): Don't add bits from the CPU's FPU entry.
9668 2018-07-11  Richard Biener  <rguenther@suse.de>
9670         PR debug/86457
9671         * dwarf2out.c (init_sections_and_labels): Use
9672         output_asm_line_debug_info consistently.
9673         (dwarf2out_early_finish): Likewise.
9674         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
9675         type units.
9677 2018-07-11  Richard Biener  <rguenther@suse.de>
9679         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
9680         Rework father_bb setting in a way to avoid propagating constants
9681         multiple times on a loop body.
9683 2018-07-10  Mark Wielaard  <mark@klomp.org>
9685         PR debug/86459
9686         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
9688 2018-07-10  Richard Biener  <rguenther@suse.de>
9690         * hash-map.h (hash_map::iterator::operator*): Return
9691         references to key and value.
9693 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
9695         PR c++/86443
9696         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
9697         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
9698         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
9699         (gimplify_omp_for): For composite loops, move outer
9700         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
9701         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
9702         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
9703         TREE_LIST for both the original class iterator and the "last" helper
9704         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
9705         loop, remember has_decl_expr from outer composite loops for the
9706         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
9708 2018-07-09  Martin Sebor  <msebor@redhat.com>
9710         PR middle-end/77357
9711         PR middle-end/86428
9712         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
9713         accessing implicitly initialized array elements.
9714         * expr.c (string_constant): Handle string initializers of
9715         character arrays within aggregates.
9716         * gimple-fold.c (fold_array_ctor_reference): Add argument.
9717         Store element offset.  As a special case, handle zero size.
9718         (fold_nonarray_ctor_reference): Same.
9719         (fold_ctor_reference): Add argument.  Store subobject offset.
9720         * gimple-fold.h (fold_ctor_reference): Add argument.
9722 2018-07-09  Paul Koning  <ni1d@arrl.net>
9724         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
9725         (pdp11_insn_cost): New function.
9726         (pdp11_md_asm_adjust): New function.
9727         (TARGET_INVALID_WITHIN_DOLOOP): Define.
9728         (pdp11_rtx_costs): Update to match machine better.
9729         (output_addr_const_pdp11): Correct format mismatch warnings.
9730         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
9731         * config/pdp11/pdp11.md: General change to add base_cost and/or
9732         length attributes for use by new pdp11_insn_cost function.
9733         (MIN_BRANCH): Correct definition.
9734         (MIN_SOB): Ditto.
9735         (doloop_end): Use standard pattern name for looping pattern.
9736         (doloop_end_nocc): New.
9737         (movsf): Add another constraint alternative.
9738         (zero_extendqihi2): Add constraint alternatives for not in place
9739         extend.
9740         (zero_extendhisi2): Remove.
9741         (shift patterns): Add CC handling variants.
9742         (bswaphi2): New.
9743         (bswapsi2): New.
9744         (rothi3): New.
9745         (define_peephole2): New peephole to recognize mov that sets CC for
9746         subsequent test.
9748 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9750         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
9751         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
9752         wi::add.
9754 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
9756         PR c/86420
9757         * real.c (real_nextafter): Return true if result is denormal.
9759 2018-07-09  Martin Liska  <mliska@suse.cz>
9761         * common.opt: Add back wrongly removed attribute.
9763 2018-07-09  Richard Biener  <rguenther@suse.de>
9765         PR debug/86413
9766         * dwarf2out.c (gen_block_die): For an early generated DIE
9767         always output high/low PC attributes.
9769 2018-07-09  Tom de Vries  <tdevries@suse.de>
9771         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
9772         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
9773         onto VAR_DECL with abstract origin.
9775 2018-07-07  Jim Wilson  <jimw@sifive.com>
9777         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
9779 2018-07-07  Tom de Vries  <tdevries@suse.de>
9781         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
9783 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
9785         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
9786         overflow_type.
9787         (combine_bound): Use wide-int overflow calculation instead of
9788         rolling our own.
9789         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
9790         overflow_type.
9791         * fold-const.c (int_const_binop_2): Same.
9792         (extract_muldiv_1): Same.
9793         (fold_div_compare): Same.
9794         (fold_abs_const): Same.
9795         * match.pd: Same.
9796         * poly-int.h (add): Same.
9797         (sub): Same.
9798         (neg): Same.
9799         (mul): Same.
9800         * predict.c (predict_iv_comparison): Same.
9801         * profile-count.c (slow_safe_scale_64bit): Same.
9802         * simplify-rtx.c (simplify_const_binary_operation): Same.
9803         * tree-chrec.c (tree_fold_binomial): Same.
9804         * tree-data-ref.c (split_constant_offset_1): Same.
9805         * tree-if-conv.c (idx_within_array_bound): Same.
9806         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
9807         * tree-ssa-phiopt.c (minmax_replacement): Same.
9808         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
9809         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
9810         * vr-values.c (vr_values::adjust_range_with_scev): Same.
9811         * wide-int.cc (wi::add_large): Same.
9812         (wi::mul_internal): Same.
9813         (wi::sub_large): Same.
9814         (wi::divmod_internal): Same.
9815         * wide-int.h: Change overflow type to overflow_type for neg, add,
9816         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
9817         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
9818         mul_internal, divmod_internal.
9819         (overflow_type): New enum.
9820         (accumulate_overflow): New.
9822 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9824         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
9825         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9827 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9829         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9830         argument is checked for zero before entering loop, avoid checking again.
9832 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9834         * gimplify.h (generic_expr_could_trap_p): Set as global function.
9835         * gimplify.h (generic_expr_could_trap_p): Likwise.
9836         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9838 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
9840         PR tree-optimization/86401
9841         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9842         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9843         (fold_bit_and_mask): ... here.  New helper function for match.pd.
9844         * fold-const.h (fold_bit_and_mask): Declare.
9845         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9847 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
9849         PR target/86324
9850         * target.def (translate_mode_attribute): New hook.
9851         * targhooks.h (default_translate_mode_attribute): Declare.
9852         * targhooks.c (default_translate_mode_attribute): New function.
9853         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9854         * doc/tm.texi: Regenerate.
9855         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9856         (rs6000_translate_mode_attribute): New function.
9858 2018-07-06  Paul Koning  <ni1d@arrl.net>
9860         * doc/md.texi (define_split): Document DONE and FAIL.
9861         (define_peephole2): Ditto.
9863 2018-07-05  Jeff Law  <law@redhat.com>
9865         PR tree-optimization/86010
9866         * tree-ssa-dse.c (compute_trims): More aggressively trim at
9867         both the head and tail of mem* and str* calls.
9869 2018-07-05  Jim Wilson  <jimw@sifive.com>
9871         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9873 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
9875         * config/aarch64/aarch64-simd.md: correct flags text for
9876         MIN_EXPR replacement.
9878 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
9880         * configure: Regenerated.
9882 2018-07-05  Carl Love  <cel@us.ibm.com>
9884         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9885         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9886         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9887         VSX_BUILTIN_DOUBLEL_V4SF.
9889 2018-07-05  Martin Sebor  <msebor@redhat.com>
9891         PR c++/86400
9892         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9893         than its domain to compute its the upper bound of a char array.
9895 2018-07-05  Nathan Sidwell  <nathan@acm.org>
9897         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9898         * doc/cpp.texi: Update comment.
9899         * doc/tm.texi: Rebuilt.
9900         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9901         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9902         * doc/extend.texi (Backwards Compatibility): Clarify it is system
9903         headers affected by extern "C".
9904         * system.h: Poison NO_IMPLICIT_EXTERN_C.
9905         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9906         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9907         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9908         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9909         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9910         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9911         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9912         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9913         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9914         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9915         config/sparc/sp64-elf.h, config/spu/spu.h,
9916         config/stormy16/stormy16.h, config/v850/v850.h,
9917         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9918         define NO_IMPLICIT_EXTERN_C.
9919         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9921 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9923         PR target/84711
9924         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9925         instead of GET_MODE_SIZE when comparing Units.
9927 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9929         PR target/84711
9930         * rtlanal.c (set_noop_p): Constrain on mode change,
9931         include hard-reg-set.h
9933 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9935         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9937 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
9939         Revert
9940         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9942         PR sanitizer/84250
9943         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9944         libasan.
9945         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9947 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9949         PR sanitizer/84250
9950         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9951         libasan.
9952         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9954 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
9956         PR middle-end/86380
9957         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9959 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
9961         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9962         neg_*_op* variables.
9964 2018-07-04  Martin Liska  <mliska@suse.cz>
9966         * tree-switch-conversion.c: Define
9967         max_ratio_for_speed and max_ratio_for_size constants.
9969 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9970             Martin Liska  <mliska@suse.cz>
9972         PR middle-end/66240
9973         PR target/45996
9974         PR c/84100
9975         * common.opt: Rename align options with 'str_' prefix.
9976         * common/config/i386/i386-common.c (set_malign_value): New
9977         function.
9978         (ix86_handle_option): Use it to set -falign-* options/
9979         * config/aarch64/aarch64-protos.h (struct tune_params): Change
9980         type from int to string.
9981         * config/aarch64/aarch64.c: Update default values from int
9982         to string.
9983         * config/alpha/alpha.c (alpha_override_options_after_change):
9984         Likewise.
9985         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9986         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9987         max skip conditionally.
9988         * config/i386/freebsd.h (SUBALIGN_LOG): New.
9989         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9990         max skip conditionally.
9991         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9992         max skip conditionally.
9993         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9994         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9995         max skip conditionally.
9996         * config/i386/i386.c (struct ptt): Change type from int to
9997         string.
9998         (ix86_default_align): Set default values.
9999         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10000         max skip conditionally.
10001         * config/i386/iamcu.h (SUBALIGN_LOG): New.
10002         (ASM_OUTPUT_MAX_SKIP_ALIGN):
10003         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10004         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10005         max skip conditionally.
10006         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10007         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10008         * config/i386/x86-64.h (SUBALIGN_LOG): New.
10009         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10010         max skip conditionally.
10011         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10012         * config/ia64/ia64.c (ia64_option_override): Set default values
10013         for alignment options.
10014         * config/m68k/m68k.c: Handle new str_align_* options.
10015         * config/mips/mips.c (mips_set_compression_mode): Change
10016         type of constants.
10017         (mips_option_override): Set default values for options.
10018         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10019         Likewise.
10020         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10021         Likewise.
10022         * config/rx/rx.c (rx_option_override): Likewise.
10023         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10024         (LABEL_ALIGN): Use align_labels_log.
10025         (LOOP_ALIGN): Use align_loops_align.
10026         * config/s390/s390.c (s390_asm_output_function_label): Use new
10027         macros.
10028         * config/sh/sh.c (sh_override_options_after_change):
10029         Change type of constants.
10030         * config/spu/spu.c (spu_sched_init): Likewise.
10031         * config/sparc/sparc.c (sparc_option_override): Set default
10032         values for options.
10033         * config/visium/visium.c (visium_option_override): Likewise.
10034         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10035         emit p2align format with last argument if it's not needed.
10036         * doc/invoke.texi: Document extended format of -falign-*.
10037         * final.c: Use align_labels alignment.
10038         * flags.h (struct target_flag_state): Change type to use
10039         align_flags.
10040         (struct align_flags_tuple): New.
10041         (struct align_flags): Likewise.
10042         (align_loops_log): Redefine macro to use new types.
10043         (align_loops_max_skip): Redefine macro to use new types.
10044         (align_jumps_log): Redefine macro to use new types.
10045         (align_jumps_max_skip): Redefine macro to use new types.
10046         (align_labels_log): Redefine macro to use new types.
10047         (align_labels_max_skip): Redefine macro to use new types.
10048         (align_functions_log): Redefine macro to use new types.
10049         (align_loops): Redefine macro to use new types.
10050         (align_jumps): Redefine macro to use new types.
10051         (align_labels): Redefine macro to use new types.
10052         (align_functions): Redefine macro to use new types.
10053         (align_functions_max_skip): Redefine macro to use new types.
10054         (align_loops_value): New macro.
10055         (align_jumps_value): New macro.
10056         (align_labels_value): New macro.
10057         (align_functions_value): New macro.
10058         * function.c (invoke_set_current_function_hook): Propagate
10059         alignment values from flags to global variables default in
10060         topleev.h.
10061         * ipa-icf.c (sem_function::equals_wpa): Use
10062         cl_optimization_option_eq instead of memcmp.
10063         * lto-streamer.h (cl_optimization_stream_out): Support streaming
10064         of string types.
10065         (cl_optimization_stream_in): Likewise.
10066         * optc-save-gen.awk: Support strings in cl_optimization.
10067         * opth-gen.awk: Likewise.
10068         * opts.c (finish_options): Remove error checking of invalid
10069         value ranges.
10070         (MAX_CODE_ALIGN): Remove.
10071         (MAX_CODE_ALIGN_VALUE): Likewise.
10072         (parse_and_check_align_values): New function.
10073         (check_alignment_argument): Likewise.
10074         (common_handle_option): Use check_alignment_argument.
10075         * opts.h (parse_and_check_align_values): Declare.
10076         * toplev.c (init_alignments): Remove.
10077         (read_log_maxskip): New.
10078         (parse_N_M): Likewise.
10079         (parse_alignment_opts): Likewise.
10080         (backend_init_target): Remove usage of init_alignments.
10081         * toplev.h (parse_alignment_opts): Declare.
10082         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10083         argument.
10084         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10085         * tree.c (cl_option_hasher::equal): New.
10086         * varasm.c: Use new global macros.
10088 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
10090         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10091         Use a simpler align directive also if MAXSKIP = ALIGN-1.
10092         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10093         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10094         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10095         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10096         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10097         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10098         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10099         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10100         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10101         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10102         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10104 2018-07-04  Martin Liska  <mliska@suse.cz>
10105             Jonathan Wakely  <jwakely@redhat.com>
10107         * coverage.c: Use correct type.
10108         * doc/invoke.texi: Language correction.
10110 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
10112         PR target/85620
10113         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10114         ENDBRANCH for non-tail call which may return via indirect branch.
10115         * doc/extend.texi: Document indirect_return attribute.
10117 2018-07-03  Martin Sebor  <msebor@redhat.com>
10119         PR tree-optimization/86274
10120         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10121         precondition.
10122         (format_floating): Correct handling of infinities and NaNs.
10124 2018-07-03  Martin Sebor  <msebor@redhat.com>
10126         * print-tree.c (print_real_cst): New function.
10127         (print_node_brief): Call it.
10128         (print_node): Ditto.
10130 2018-07-03  Jeff Law  <law@redhat.com>
10132         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10133         into a single pattern.
10135         * config/h8300/h8300.md (ors code_iterator): New.
10136         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10137         a single pattern and single splitter.
10138         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10139         (iorqi3_1, xorqi3_1): Likewise.
10140         (iorqi3, xorqi3 expanders): Similarly.
10142         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10143         (movmd_internal) into a single pattern using the P mode iterator.
10144         (movmd splitters): Similarly.
10145         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10146         (movsd splitters): Similarly.
10148         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10149         ADDB, ADDW and ADDL into a single ADD attribute which selects the
10150         right table based on the size of the operand.
10151         * config/h8300/h8300.md (length_table): Corresponding changes. All
10152         references to "addb", "addw" and "addl" changed to "add".
10153         (btst patterns): Merge two variants into a single pattern.
10154         (tstqi, tsthi): Likewise.
10155         (addhi3_incdec, addsi3_incdec): Likewise.
10156         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10157         (mulhi3, mulsi3): Likewise.
10158         (udivhi3, udivsi3): Likewise.
10159         (divhi3, divsi3): Likewise.
10160         (andorqi3, andorhi3, andorsi3): Likewise.
10162 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
10164         PR target/85694
10165         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10166         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10168 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10170         PR tree-optimization/85694
10171         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10172         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10173         UNSPEC_URHADD.
10174         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10175         (<u>avg<mode>3_ceil): New patterns.
10177 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
10179         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10180         scan-tree-dump directive.
10181         * gcc.dg/vect/slp-perm-2.c: Likewise.
10182         * gcc.dg/vect/slp-perm-3.c: Likewise.
10183         * gcc.dg/vect/slp-perm-5.c: Likewise.
10184         * gcc.dg/vect/slp-perm-6.c: Likewise.
10185         * gcc.dg/vect/slp-perm-7.c: Likewise.
10186         * gcc.dg/vect/slp-perm-8.c: Likewise.
10188 2018-07-03  Marek Polacek  <polacek@redhat.com>
10190         PR middle-end/86202
10191         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10193 2018-07-03  Richard Biener  <rguenther@suse.de>
10195         PR ipa/86389
10196         * tree-ssa-structalias.c (find_func_clobbers): Properly
10197         handle indirect calls.
10199 2018-07-03  Jeff Law  <law@redhat.com>
10201         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10202         (shifts): New code iterator.
10203         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10204         expander.  Fix HImode handling on H8/SX.
10205         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10206         (subqi3, subhi3, subsi3 expanders): Likewise.
10207         (andqi3, andhi3, andsi3 expanders): Likewise.
10208         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10209         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10210         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10211         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10212         (zero_extendqihi2, zero_extendqisi2): Likewise.
10213         (extendqihi2, extendqisi2): Likewise.
10214         (rotlqi3, rotlhi3, rotlsi3): Likewise.
10215         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10216         (rotlqi3_1, rotlhi3_1): Likewise.
10217         (logicalhi3_sn, logicalsi3_sn): Likewise.
10218         (logicalhi3, logicalsi3): Likewise.
10220 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10222         * tree-vect-patterns.c (vect_recog_rotate_pattern)
10223         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10224         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10225         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10226         type to append_pattern_def_seq instead of creating a stmt_vec_info
10227         directly.
10228         (build_mask_conversion): Likewise.  Remove vinfo argument.
10229         (vect_add_conversion_to_patterm): Likewise, renaming to...
10230         (vect_add_conversion_to_pattern): ...this.
10231         (vect_recog_mask_conversion_pattern): Update call to
10232         build_mask_conversion.  Pass the vector type to
10233         append_pattern_def_seq here too.
10234         (vect_recog_gather_scatter_pattern): Update call to
10235         vect_add_conversion_to_pattern.
10237 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10239         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10240         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10241         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10242         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10243         STMT_VINFO_PATTERN_DEF_SEQ to null here.
10244         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10245         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10246         append_pattern_def_seq instead of new_pattern_def_seq.
10247         (vect_recog_divmod_pattern): Do both of the above.
10248         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10249         is null.
10251 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10253         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10254         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10255         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10256         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10257         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10258         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10259         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10260         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10261         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10262         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10263         parameter with a single stmt_vec_info.
10264         (vect_recog_func_ptr): Likewise.
10265         (vect_recog_gather_scatter_pattern): Likewise, folding in...
10266         (vect_try_gather_scatter_pattern): ...this.
10267         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10268         the stmt_vec_info of the statement to be matched.  Don't clear
10269         STMT_VINFO_RELATED_STMT.
10270         (vect_pattern_recog): Update call accordingly.
10272 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10274         PR tree-optimization/85694
10275         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10276         (uavgM3_ceil): Document new optabs.
10277         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10278         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10279         functions.
10280         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10281         (savg_ceil_optab): New optabs.
10282         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10283         (vect_vect_recog_func_ptrs): Add it.
10284         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10285         constant directly from the associated lhs.
10287 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10289         * tree-vect-patterns.c (vect_split_statement): New function.
10290         (vect_convert_input): Use it to try to split an existing cast.
10292 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10294         * poly-int.h (print_hex): New function.
10295         * dumpfile.h (dump_dec, dump_hex): Declare.
10296         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10297         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10298         min_input_precision, operation_precision and operation_sign.
10299         * tree-vect-patterns.c (vect_get_range_info): New function.
10300         (vect_same_loop_or_bb_p, vect_single_imm_use)
10301         (vect_operation_fits_smaller_type): Delete.
10302         (vect_look_through_possible_promotion): Add an optional
10303         single_use_p parameter.
10304         (vect_recog_over_widening_pattern): Rewrite to use new
10305         stmt_vec_info infomration.  Handle one operation at a time.
10306         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10307         (vect_truncatable_operation_p, vect_set_operation_type)
10308         (vect_set_min_input_precision): New functions.
10309         (vect_determine_min_output_precision_1): Likewise.
10310         (vect_determine_min_output_precision): Likewise.
10311         (vect_determine_precisions_from_range): Likewise.
10312         (vect_determine_precisions_from_users): Likewise.
10313         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10314         (vect_vect_recog_func_ptrs): Put over_widening first.
10315         Add cast_forwprop.
10316         (vect_pattern_recog): Call vect_determine_precisions.
10318 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10320         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10321         statements that have been replaced by further pattern statements.
10322         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10324 2018-07-03  Richard Biener  <rguenther@suse.de>
10326         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10327         always set *dt.  Dump vectype in vectype overload.
10328         * dumpfile.h (dump_gimple_expr): New function.
10329         (dump_gimple_expr_loc): Likewise.
10330         * dumpfile.c (dump_gimple_expr): New function.
10331         (dump_gimple_expr_loc): Likewise.
10333 2018-07-02  Jeff Law  <law@redhat.com>
10335         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10336         the H8/300, H8/300H and H8/S variants into a single pattern.
10337         (movhi_h8300, movqi_h8300hs): Similarly.
10338         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10339         (QHI mode iterator): New.
10341         * config/h8300/h8300.md: Remove trailing whitespace.
10343 2018-07-02  Jim Wilson  <jimw@sifive.com>
10345         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10346         instead of emit_insn for interrupt returns.
10347         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10348         (riscv_sret, riscv_uret): Likewise.
10350 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10352         * pretty-print.c (selftest::test_pp_format): Move save and restore
10353         of quotes to class auto_fix_quotes, and add an instance.
10354         * selftest.c: Include "intl.h".
10355         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10356         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10357         * selftest.h (selftest::auto_fix_quotes): New class.
10359 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
10361         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10362         (aarch64_sve_prepare_conditional_op): Remove.
10363         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10364         Allow aarch64_simd_reg_or_zero as select operand; remove
10365         the aarch64_sve_prepare_conditional_op call.
10366         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10367         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10368         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10369         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10370         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10371         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10372         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10373         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10374         and a splitters to match all of the *_any patterns.
10375         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10377         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10378         (SVE_COND_FP_BINARY_REV): Remove.
10379         (sve_int_op_rev, sve_fp_op_rev): New.
10380         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10381         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10382         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10383         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
10384         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
10385         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
10386         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
10387         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
10388         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
10390         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
10391         Remove match_dup 1 from the inner unspec.
10392         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10394         * config/aarch64/aarch64.md (movprfx): New attr.
10395         (length): Default movprfx to 8.
10396         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
10397         (*madd<SVE_I>, *msub<SVE_I): Likewise.
10398         (*<su>mul<SVE_I>3_highpart): Likewise.
10399         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
10400         (*v<ASHIFT><SVE_I>3): Likewise.
10401         (*<su><MAXMIN><SVE_I>3): Likewise.
10402         (*<su><MAXMIN><SVE_F>3): Likewise.
10403         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
10404         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
10405         (*div<SVE_F>4): Likewise.
10407 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
10409         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
10410         in dump string.
10412 2018-07-02  Richard Biener  <rguenther@suse.de>
10414         PR tree-optimization/86363
10415         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
10416         memset argument refers to a non-variable address.
10418 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10420         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
10421         {PLUS,MINUS}_EXPR code to...
10422         (adjust_symbolic_bound): ...here,
10423         (combine_bound): ...here,
10424         (set_value_range_with_overflow): ...and here.
10426 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10428         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
10429         code...
10430         (extract_range_from_abs_expr): ...here.
10432 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10434         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
10435         -fno-omit-frame-pointer when not optimizing.
10437 2018-07-02  Martin Liska  <mliska@suse.cz>
10439         PR ipa/86279
10440         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
10441         (propagate_nothrow): Likewise.
10443 2018-07-02  Martin Liska  <mliska@suse.cz>
10445         PR ipa/86323
10446         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
10448 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10450         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
10451         function in r262149, changing "loc" param from source_location to
10452         const dump_location_t &.
10453         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
10454         declaration, as above.
10456 2018-07-01  Paul Koning  <ni1d@arrl.net>
10458         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10459         -munit-asm, -mgnu-asm, -mdec-asm.
10460         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
10461         (pdp11_output_labelref): New.
10462         (pdp11_output_def): New.
10463         (pdp11_output_addr_vec_elt): New.
10464         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
10465         %# and %@ format codes.
10466         (pdp11_option_override): New.
10467         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
10468         (pdp11_output_ident): New.
10469         (pdp11_asm_named_section): New.
10470         (pdp11_asm_init_sections): New.
10471         (pdp11_file_start): New.
10472         (pdp11_file_end): New.
10473         (output_ascii): Use .ascii/.asciz for -mdec-asm.
10474         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
10475         %o, like %c but octal.
10476         (pdp11_option_override): New.
10477         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
10478         -mdec-asm.
10479         (DATA_SECTION_ASM_OP): Ditto.
10480         (READONLY_DATA_SECTION_ASM_OP): New.
10481         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
10482         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
10483         (ASM_OUTPUT_LABELREF): Ditto.
10484         (ASM_OUTPUT_DEF): Ditto.
10485         (ASM_OUTPUT_EXTERNAL): New.
10486         (ASM_OUTPUT_SOURCE_FILENAME): New.
10487         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
10488         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
10489         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
10490         %# and %@ format codes.
10491         * config/pdp11/pdp11.opt (mgnu-asm): New.
10492         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
10493         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
10494         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
10496 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
10498         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
10499         dereferencing path[] beyond its length.
10500         (debug_path): New.
10501         (debug_all_paths): New.
10502         (rewire_first_differing_edge): New.
10503         (adjust_paths_after_duplication): New.
10504         (duplicate_thread_path): Call adjust_paths_after_duplication.
10505         Add new argument.
10506         (thread_through_all_blocks): Add new argument to
10507         duplicate_thread_path.
10509 2018-06-30  Jim Wilson  <jimw@sifive.com>
10511         * config/riscv/predicates.md (p2m1_shift_operand): New.
10512         (high_mask_shift_operand): New.
10513         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
10514         pattern using p2m1_shift_operand.
10515         (lshsi3_zero_extend_3+2): New combiner pattern using
10516         high_mask_shift_operand.
10518 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10520         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
10521         split out from...
10522         (vect_recog_rotate_pattern): ...here.
10523         (vect_convert_input): Try to insert casts of invariants in the
10524         preheader.
10525         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
10526         preheader to be empty.
10528 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10530         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
10531         vector type.  If given, install it in the new statement's
10532         STMT_VINFO_VECTYPE.
10533         (vect_element_precision): New function.
10534         (vect_unpromoted_value): New struct.
10535         (vect_unpromoted_value::vect_unpromoted_value): New function.
10536         (vect_unpromoted_value::set_op): Likewise.
10537         (vect_look_through_possible_promotion): Likewise.
10538         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
10539         (vect_widened_op_tree, vect_convert_input): Likewise.
10540         (vect_convert_inputs, vect_convert_output): Likewise.
10541         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
10542         to handle the optional cast of the multiplication result and
10543         vect_widened_op_tree to detect the widened multiplication itself.
10544         Do not require the input and output of promotion casts to have
10545         the same sign, but base the signedness of the operation on the
10546         input rather than the result.  If the pattern includes two
10547         promotions, check that those promotions have the same sign.
10548         Do not restrict the MULT_EXPR handling to a double-width result;
10549         handle quadruple-width results and wider.  Use vect_convert_inputs
10550         to convert the inputs to the common type.
10551         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
10552         to handle the optional cast of the ABS result.  Also allow a sign
10553         change or a sign extension between the ABS and MINUS.
10554         Use vect_widened_op_tree to detect the widened subtraction and use
10555         vect_convert_inputs to convert the inputs to the common type.
10556         (vect_handle_widen_op_by_const): Delete.
10557         (vect_recog_widen_op_pattern): New function.
10558         (vect_recog_widen_mult_pattern): Use it.
10559         (vect_recog_widen_shift_pattern): Likewise.
10560         (vect_recog_widen_sum_pattern): Use
10561         vect_look_through_possible_promotion to handle the promoted
10562         PLUS_EXPR operand.
10564 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10566         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
10567         the containing gimple_seq *.
10568         * gimple-iterator.h (gsi_for_stmt): Declare it.
10569         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
10570         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
10571         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10572         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10573         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
10574         checks.
10575         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
10576         split out from...
10577         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
10578         statement being replaced is part of an existing pattern
10579         definition sequence, inserting the new pattern statements before
10580         the original one.
10581         (vect_pattern_recog_1): Don't return a bool.  If the statement
10582         is already part of a pattern, instead apply pattern matching
10583         to the pattern definition statements.  Don't clear the
10584         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
10585         (vect_pattern_recog): Don't break after the first match;
10586         continue processing the pattern definition statements instead.
10587         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
10589 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10591         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10592         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10593         (vect_recog_widen_sum_pattern): Use it.
10595 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10597         * tree-vect-loop.c (vectorizable_reduction): Assert that the
10598         phi is not a pattern statement and has not been replaced by
10599         a pattern statement.
10600         * tree-vect-patterns.c (type_conversion_p): Don't check
10601         STMT_VINFO_IN_PATTERN_P.
10602         (vect_recog_vector_vector_shift_pattern): Likewise.
10603         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
10604         the pattern statement rather than the original statement; check
10605         directly for a WIDEN_MULT_EXPR here.
10606         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
10607         vect_is_simple_use to return the pattern statement rather
10608         than the original statement; use is_pattern_stmt_p to check
10609         for such a pattern statement.
10610         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
10611         to return the pattern statement rather than the original statement;
10612         don't do the same transformation here.
10613         (vect_is_simple_use): If the defining statement has been replaced
10614         by a pattern statement, return the pattern statement instead.
10615         Remove the corresponding (local) transformation from the vectype
10616         overload.
10618 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10620         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
10621         end and default to null.
10622         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10623         (vectorizable_reduction): Update calls accordingly, dropping the
10624         gimple ** argument if the passed-back statement isn't needed.
10625         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
10626         (vect_recog_rotate_pattern): Likewise.
10627         (vect_recog_mask_conversion_pattern): Likewise.
10628         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10629         (vect_mask_constant_operand_p): Likewise.
10630         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
10631         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
10632         (get_group_load_store_type, get_load_store_type): Likewise.
10633         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
10634         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
10635         (vectorizable_conversion, vectorizable_assignment): Likewise.
10636         (vectorizable_shift, vectorizable_operation): Likewise.
10637         (vectorizable_store, vect_is_simple_cond): Likewise.
10638         (vectorizable_condition, vectorizable_comparison): Likewise.
10639         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
10640         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
10641         and move it to the end.  Cope with null def_stmt_outs.
10643 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10645         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
10647 2018-06-29  Jeff Law  <law@redhat.com>
10649         * config/v850/v850.c (v850_legitimate_address_p): Handle large
10650         displacements for TARGET_V850E2V3 and newer.
10651         (TARGET_LRA_P): Remove.  Defaults to LRA now.
10652         * config/v850/v850.md (sign23byte_load): Remove.
10653         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
10654         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
10656 2018-06-29  Martin Liska  <mliska@suse.cz>
10658         PR lto/85759
10659         * coverage.c (coverage_init): Mangle full path name.
10660         * doc/invoke.texi: Document the change.
10661         * gcov-io.c (mangle_path): New.
10662         * gcov-io.h (mangle_path): Likewise.
10663         * gcov.c (mangle_name): Use mangle_path for path mangling.
10665 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10667         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
10668         if starting source register is not even.
10670 2018-06-29  Martin Liska  <mliska@suse.cz>
10672         PR tree-optimization/86263
10673         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
10674         Make edge redirection.
10676 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
10678         * dumpfile.c (dump_loc): Add indentation based on scope depth.
10679         (dump_scope_depth): New variable.
10680         (get_dump_scope_depth): New function.
10681         (dump_begin_scope): New function.
10682         (dump_end_scope): New function.
10683         * dumpfile.h (get_dump_scope_depth): New declaration.
10684         (dump_begin_scope): New declaration.
10685         (dump_end_scope): New declaration.
10686         (class auto_dump_scope): New class.
10687         (AUTO_DUMP_SCOPE): New macro.
10688         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
10689         AUTO_DUMP_SCOPE.
10691 2018-06-29  Richard Biener  <rguenther@suse.de>
10693         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
10694         compute_all_dependences succeeds.
10695         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
10696         exceed --param loop-max-datarefs-for-datadeps.
10698 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
10700         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
10702 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
10704         PR target/86348
10705         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
10706         alternative 0 in preferred_for_speed attribute.
10708 2018-06-28  Paul Koning  <ni1d@arrl.net>
10710         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
10711         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
10712         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
10713         * config/pdp11/pdp11.md: Correct "length" attribute calculation
10714         for shift insn patterns.
10716 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
10718         * cgraph.c (cgraph_node::get_body): Replace assignments to
10719         "dump_file" with calls to set_dump_file.
10720         * dumpfile.c (alt_dump_file): Make static, and group with...
10721         (alt_flags): ...this definition.
10722         (dumps_are_enabled): New variable.
10723         (refresh_dumps_are_enabled): New function.
10724         (set_dump_file): New function.
10725         (set_alt_dump_file): New function.
10726         (gcc::dump_manager::dump_start): Replace assignments to
10727         "dump_file" and "alt_dump_file" with calls to set_dump_file and
10728         set_alt_dump_file.
10729         (gcc::dump_manager::dump_finish): Likewise.
10730         * dumpfile.h (alt_dump_file): Delete decl.
10731         (dumps_are_enabled): New variable decl.
10732         (set_dump_file): New function decl.
10733         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
10734         global.
10735         * tree-nested.c (lower_nested_functions): Replace assignments to
10736         "dump_file" with calls to set_dump_file.
10738 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10740         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
10741         goto_locus of each outgoing edge of each basic block.
10743 2018-06-28  Richard Biener  <rguenther@suse.de>
10745         * dwarf2out.c (decl_scope_table): Remove.
10746         (push_decl_scope): Likewise.
10747         (pop_decl_scope): Likewise.
10748         (gen_type_die_for_member): Do not call push/pop_decl_scope.
10749         (gen_struct_or_union_type_die): Likewise.
10750         (gen_tagged_type_die): Likewise.
10751         (dwarf2out_init): Do not initialize decl_scope_table.
10752         (dwarf2out_c_finalize): Do not free it.
10754 2018-06-28  Richard Biener  <rguenther@suse.de>
10756         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
10757         deciding whether to not re-use a DIE.
10759 2018-06-28  Richard Biener  <rguenther@suse.de>
10761         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
10762         DW_AT_abstract_origin attribute.
10764 2018-06-28  Martin Liska  <mliska@suse.cz>
10766         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10767         Use newly introduced constants.
10768         * tree-switch-conversion.h (struct jump_table_cluster):
10769         Define max_ratio_for_size and max_ratio_for_speed.
10771 2018-06-28  Martin Liska  <mliska@suse.cz>
10773         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10774         Add new checking assert to catch invalid state.
10775         (jump_table_cluster::can_be_handled): Handle single case
10776         clusters.
10777         (jump_table_cluster::is_beneficial): Bail out for such case.
10778         (bit_test_cluster::find_bit_tests):
10779         Add new checking assert to catch invalid state.
10780         (bit_test_cluster::can_be_handled): Handle single case
10781         clusters.
10782         (bit_test_cluster::is_beneficial): Bail out for such case.
10783         (switch_decision_tree::analyze_switch_statement):
10784         Fix comment.
10786 2018-06-28  Martin Liska  <mliska@suse.cz>
10788         * common.opt: Introduce -completion option.
10789         * gcc.c (driver_handle_option): Handle it.
10790         (driver::main): Print completions if completion
10791         is set.
10792         * opt-suggestions.c (option_proposer::get_completions):
10793         New function.
10794         (option_proposer::suggest_completion): Likewise.
10795         (option_proposer::find_param_completions): Likewise.
10796         (verify_autocompletions): Likewise.
10797         (test_completion_valid_options): Likewise.
10798         (test_completion_valid_params): Likewise.
10799         (in_completion_p): Likewise.
10800         (empty_completion_p): Likewise.
10801         (test_completion_partial_match): Likewise.
10802         (test_completion_garbage): Likewise.
10803         (opt_proposer_c_tests): Likewise.
10804         * opt-suggestions.h: Declare new functions.
10805         * opts.c (common_handle_option): Handle OPT__completion_.
10806         * selftest-run-tests.c (selftest::run_tests): Add
10807         opt_proposer_c_tests.
10808         * selftest.c (assert_str_startswith): New.
10809         * selftest.h (assert_str_startswith): Likewise.
10810         (opt_proposer_c_tests): New.
10811         (ASSERT_STR_STARTSWITH): Likewise.
10813 2018-06-28  Martin Liska  <mliska@suse.cz>
10815         * Makefile.in: Add opt-suggestions.o.
10816         * gcc-main.c: Include opt-suggestions.h.
10817         * gcc.c (driver::driver): Likewise.
10818         (driver::~driver): Remove m_option_suggestions.
10819         (driver::build_option_suggestions): Moved to option_proposer.
10820         (driver::suggest_option): Likewise.
10821         (driver::handle_unrecognized_options): Use option_proposer.
10822         * gcc.h (class driver): Add new memver m_option_proposer.
10823         * opt-suggestions.c: New file.
10824         * opt-suggestions.h: New file.
10826 2018-06-28  Martin Liska  <mliska@suse.cz>
10828         * vec.h (class auto_string_vec): New (moved from auto_argvec).
10829         (auto_string_vec::~auto_string_vec): Likewise.
10831 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10833         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10834         prevent_decl_creation_for_types fields up and add reset_location field.
10835         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10836         statement if id->reset_location is true.
10837         (copy_edges_for_bb): Do not set goto_locus on the new edges if
10838         id->reset_location is true.
10839         (copy_phis_for_bb): Force input_location on the arguments if
10840         id->reset_location is true.
10841         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10842         is set on the function to be inlined.
10844 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
10846         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10848 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
10850         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10851         registers for Pmode.
10852         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10853         hard registers for the clobbered pseudo.
10855 2018-06-27  Paul Koning  <ni1d@arrl.net>
10857         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10858         mutually exclusive options.
10859         * config/pdp11/constraints.md (h): New constraint.
10860         (O): Update definition to match shift code generation.
10861         (D): New constraint.
10862         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10863         (CCFP): Remove.
10864         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10865         function.
10866         (output_jump): Change arguments.
10867         (pdp11_fixed_cc_regs): New function.
10868         (pdp11_cc_mode): Ditto.
10869         (pdp11_expand_shift): Ditto.
10870         (pdp11_assemble_shift): Ditto.
10871         (pdp11_small_shift): Ditto.
10872         (pdp11_branch_cost): Remove.
10873         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10874         from output.
10875         (pdp11_register_move_cost): Update for CC registers.
10876         (pdp11_rtx_costs): Add case for LSHIFTRT.
10877         (pdp11_output_jump): Add CCNZ mode conditional branches.
10878         (notice_update_cc_on_set): Remove.
10879         (pdp11_cc_mode): New function.
10880         (simple_memory_operand): Correct pre/post decrement case.
10881         (no_side_effect_operand): New function.
10882         (pdp11_regno_reg_class): Add CC_REGS class.
10883         (pdp11_fixed_cc_regs): New function.
10884         (pdp11_small_shift): New function.
10885         (pdp11_expand_shift): New function to expand shift insns.
10886         (pdp11_assemble_shift): New function to output shifts.
10887         (pdp11_branch_cost): Remove.
10888         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10889         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10890         (WCHAR_TYPE): Ditto.
10891         (PTRDIFF_TYPE): Ditto.
10892         (ADJUST_INSN_LENGTH): New macro.
10893         (FIXED_REGISTERS): Add CC registers.
10894         (CALL_USED_REGISTERS): Ditto.
10895         (reg_class): Ditto.
10896         (REG_CLASS_NAMES): Ditto.
10897         (REG_CLASS_CONTENTS): Ditto.
10898         (SELECT_CC_MODE): Use new function.
10899         (TARGET_FLAGS_REGNUM): New macro.
10900         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10901         (cc0_reg_rtx): Remove.
10902         (CC_STATUS_MDEP): Remove.
10903         (CC_STATUS_MDEFP_INIT): Remove.
10904         (CC_IN_FPU): Remove.
10905         (NOTICE_UPDATE_CC): Remove.
10906         (REGISTER_NAMES): Add CC registers.
10907         (BRANCH_COST): Change to constant 1.
10908         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10909         handling.
10910         * config/pdp11/pdp11.opt (mbcopy): Remove.
10911         (mbcopy-builtin): Remove.
10912         (mbranch-cheap): Remove.
10913         (mbranch-expensive): Remove.
10914         * config/pdp11/predicates.md (expand_shift_operand): Update to
10915         match shift code generation.
10916         (ccnz_operator): New predicate.
10917         * doc/invoke.texi (PDP-11 Options): Remove deleted options
10918         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10919         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
10920         exclusive options.
10921         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
10922         description of O constraint.
10924 2018-06-27  Jeff Law  <law@redhat.com>
10925             Austin Law  <austinklaw@gmail.com>
10927         * config/v850/v850.md (addsi3_set_flags): New pattern.
10928         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10929         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10930         (zero_extendhisi2_v850_set_flags): Likewise.
10931         (zero_extendqisi2_v850_set_flags): Likewise.
10932         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10933         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10934         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10936         * config/v850/v850-protos.h (notice_update_cc): Remove.
10937         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10938         (v850_print_operand): Handle 'D' and "d".
10939         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10940         Add handling of arithmetic/logical operations compared against zero.
10941         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10942         Do not look at v850_compare_op, instead get mode from last argument.
10943         (v850_gen_compare): Remove
10944         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10945         after reload for prologue insns.
10946         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10947         patterns.
10948         (construct_save_jarl): Likewise.
10949         (TARGET_FLAGS_REGNUM): Define.
10950         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10951         (NOTICE_UPDATE_CC): Remove.
10952         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10953         than cc0.  Conditionalize on reload_completed.
10954         (cmpsi_insn, setfcc_insn): Likewise.
10955         (tst1 splitter): Turn into define_and_split which sets the flags
10956         after reload.
10957         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10958         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10959         (cstoresf4, cstoredf4): Clobber the flags.
10960         (cmpsi, cmpsf, cmpdf): Remove expanders.
10961         (setf_insn): Remove pattern.
10962         (addsi3): Turn into define_and_split which clobbers the flags after
10963         reload and a suitable pattern (addsi3_clobber_flags) for use after
10964         reload.
10965         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10966         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10967         (ashrsi3, ashrsi3_v850e2): Likewise.
10968         (bins): Clobber the flags.
10969         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10970         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10971         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10972         (call_value_internal_short, call_value_internal_long): Likewise.
10973         (callt_save_interrupt, callt_return_interrupt): Likewise.
10974         (save_interrupt, return_interrupt): Likewise.
10975         (callt_save_all_interrupt, save_all_interrupt): Likewise.
10976         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10977         (restore_all_interrupt, _restore_all_interrupt): Likewise.
10978         (All FP comparisons): Only allow after reload has completed.
10979         (trfsr): Likewise.
10980         (divh, divhu): Tweak output template.
10981         (branch_z_normal, branch_z_invert): Remove
10982         (branch_nz_normal, branch_nz_invert): Likewise.
10983         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10985         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10986         * config/v850/v850.c (notice_update_cc): Remove.
10987         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
10988         (CC_NO_CARRY): Likewise.
10989         (NOTICE_UPDATE_CC): Define to nothing.
10990         * config/v850/v850.md: Remove block comment on cc0 handling
10991         Remove "cc" attribute from all patterns.  Remove cc_status handling
10992         from all patterns.  Minor formatting fixes.
10994 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10996         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10997         (cortex-a76.cortex-a55): Likewise.
10998         * config/aarch64/aarch64-tune.md: Regenerate.
10999         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11000         cortex-a76.cortex-a55.
11002 2018-06-27  Jeff Law  <law@redhat.com>
11004         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11005         (MULTILIB_DIRNAMES): Similarly.
11007 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
11009         * gimple.h (gimple_return_retbnd): Delete.
11010         (gimple_return_set_retbnd): Likewise.
11011         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11012         gimple_return_set_retbnd.
11013         * gimple-pretty-print.c (dump_gimple_return): Remove call to
11014         gimple_return_retbnd and adjust.
11015         * tree-inline.h (struct copy_body_data): Remove retbnd field.
11016         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11017         Explicitly return NULL in a couple more cases.  Move assertion
11018         on debug statements and remove unreachable code.
11019         (reset_debug_binding): Do not test id->retbnd.
11020         (expand_call_inline): Do not set it.
11022 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11024         * configure.ac: Add --disable-gcov option.
11025         * configure: Regenerate.
11026         * Makefile.in: Honour @enable_gcov@.
11027         * doc/install.texi: Document --disable-gcov.
11029 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11031         * config/arm/arm-cpus.in (cortex-a76): New entry.
11032         (cortex-a76.cortex-a55): Likewise.
11033         * config/arm/arm-tables.opt: Regenerate.
11034         * config/arm/arm-tune.md: Likewise.
11035         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11036         * doc/invoke.texi (ARM Options): Document cortex-a76 and
11037         cortex-a76.cortex-a55.
11039 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
11041         PR target/85769
11042         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11044 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
11046         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11047         comment.
11048         (EPILOGUE_USES): Likewise.
11050 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
11052         * tree-inline.c (remap_location): New function extracted from...
11053         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
11054         (copy_phis_for_bb): ...here.  Call remap_location.
11055         (copy_cfg_body): Adjust call to copy_edges_for_bb.
11057 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
11059         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11060         unaligned vsx for 16B memset.
11062 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
11064         PR target/86285
11065         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11066         ieee128_float_type_node to long_double_type_node unless
11067         TARGET_LONG_DOUBLE_128 is set.
11069 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
11071         * cfgloop.c (get_loop_location): Convert return type from
11072         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11073         by implicit construction from rtx_insn *, and using
11074         dump_user_location_t::from_function_decl for the fallback case.
11075         * cfgloop.h (get_loop_location): Convert return type from
11076         location_t to dump_user_location_t.
11077         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11078         dump_printf_loc to pass in a dump_location_t rather than a
11079         location_t, via the gimple stmt.
11080         * coverage.c (get_coverage_counts): Update calls to
11081         dump_printf_loc to pass in dump_location_t rather than a
11082         location_t.
11083         * doc/optinfo.texi (Dump types): Convert example of
11084         dump_printf_loc from taking "locus" to taking "insn".  Update
11085         description of the "_loc" calls to cover dump_location_t.
11086         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11087         "selftest.h".
11088         (dump_user_location_t::dump_user_location_t): New constructors,
11089         from gimple *stmt and rtx_insn *.
11090         (dump_user_location_t::from_function_decl): New function.
11091         (dump_loc): Make static.
11092         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11093         const dump_location_t &.
11094         (dump_generic_expr_loc): Delete.
11095         (dump_printf_loc): Convert param "loc" from location_t to
11096         const dump_location_t &.
11097         (selftest::test_impl_location): New function.
11098         (selftest::dumpfile_c_tests): New function.
11099         * dumpfile.h: Include "profile-count.h".
11100         (class dump_user_location_t): New class.
11101         (struct dump_impl_location_t): New struct.
11102         (class dump_location_t): New class.
11103         (dump_printf_loc): Convert 2nd param from source_location to
11104         const dump_location_t &.
11105         (dump_generic_expr_loc): Delete.
11106         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11107         const dump_location_t &.
11108         * gimple-fold.c (fold_gimple_assign): Update call to
11109         dump_printf_loc to pass in a dump_location_t rather than a
11110         location_t, via the gimple stmt.
11111         (gimple_fold_call): Likewise.
11112         * gimple-loop-interchange.cc
11113         (loop_cand::analyze_iloop_reduction_var): Update for change to
11114         check_reduction_path.
11115         (tree_loop_interchange::interchange): Update for change to
11116         find_loop_location.
11117         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11118         change in return-type of find_loop_location.
11119         (graphite_regenerate_ast_isl): Likewise.
11120         * graphite-optimize-isl.c (optimize_isl): Likewise.
11121         * graphite.c (graphite_transform_loops): Likewise.
11122         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11123         pass in a dump_location_t rather than a location_t, via the
11124         gimple stmt.
11125         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11126         * ipa.c (walk_polymorphic_call_targets): Likewise.
11127         * loop-unroll.c (report_unroll): Convert "locus" param from
11128         location_t to dump_location_t.
11129         (decide_unrolling): Update for change to get_loop_location's
11130         return type.
11131         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11132         location_t to dump_user_location_t.
11133         (grid_find_single_omp_among_assignments_1): Updates calls to
11134         dump_printf_loc to pass in a dump_location_t rather than a
11135         location_t, via the gimple stmt.
11136         (grid_parallel_clauses_gridifiable): Convert "tloc" from
11137         location_t to dump_location_t.  Updates calls to dump_printf_loc
11138         to pass in a dump_location_t rather than a location_t, via the
11139         gimple stmt.
11140         (grid_inner_loop_gridifiable_p): Likewise.
11141         (grid_dist_follows_simple_pattern): Likewise.
11142         (grid_gfor_follows_tiling_pattern): Likewise.
11143         (grid_target_follows_gridifiable_pattern): Likewise.
11144         (grid_attempt_target_gridification): Convert initialization
11145         of local "grid" from memset to zero-initialization; FIXME: does
11146         this require C++11?  Update call to dump_printf_loc to pass in a
11147         optinfo_location rather than a location_t, via the gimple stmt.
11148         * profile.c (read_profile_edge_counts): Updates call to
11149         dump_printf_loc to pass in a dump_location_t rather than a
11150         location_t
11151         (compute_branch_probabilities): Likewise.
11152         * selftest-run-tests.c (selftest::run_tests): Call
11153         dumpfile_c_tests.
11154         * selftest.h (dumpfile_c_tests): New decl.
11155         * tree-loop-distribution.c (pass_loop_distribution::execute):
11156         Update for change in return type of find_loop_location.
11157         * tree-parloops.c (parallelize_loops): Likewise.
11158         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11159         "locus" from location_t to dump_user_location_t.
11160         (canonicalize_loop_induction_variables): Likewise.
11161         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11162         for change in return type of find_loop_location.
11163         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11164         to dump_printf_loc to pass in a dump_location_t rather than a
11165         location_t, via the stmt.
11166         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11167         Likewise.
11168         * tree-vect-loop-manip.c (find_loop_location): Convert return
11169         type from source_location to dump_user_location_t.
11170         (vect_do_peeling): Update for above change.
11171         (vect_loop_versioning): Update for change in type of
11172         vect_location.
11173         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11174         from location_t to dump_user_location_t.
11175         (vect_estimate_min_profitable_iters): Update for change in type
11176         of vect_location.
11177         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11178         location_t to dump_location_t.
11179         (vect_slp_bb): Update for change in type of vect_location.
11180         * tree-vectorizer.c (vect_location): Convert from source_location
11181         to dump_user_location_t.
11182         (try_vectorize_loop_1): Update for change in vect_location's type.
11183         (vectorize_loops): Likewise.
11184         (increase_alignment): Likewise.
11185         * tree-vectorizer.h (vect_location): Convert from source_location
11186         to dump_user_location_t.
11187         (find_loop_location): Convert return type from source_location to
11188         dump_user_location_t.
11189         (check_reduction_path): Convert 1st param from location_t to
11190         dump_user_location_t.
11191         * value-prof.c (check_counter): Update call to dump_printf_loc to
11192         pass in a dump_user_location_t rather than a location_t; update
11193         call to error_at for change in type of "locus".
11194         (check_ic_target): Update call to dump_printf_loc to
11195         pass in a dump_user_location_t rather than a location_t, via the
11196         call_stmt.
11198 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
11200         * config/s390/s390.h (enum processor_flags): Do not use
11201         default tune parameter when -march was specified.
11203 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
11205         PR target/86314
11206         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11207         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11208         operands.
11210 2018-06-26  Richard Biener  <rguenther@suse.de>
11212         PR tree-optimization/86287
11213         PR bootstrap/86316
11214         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11215         (vect_analyze_loop): Initialize n_stmts.
11217 2018-06-26  Richard Biener  <rguenther@suse.de>
11219         PR middle-end/86271
11220         * fold-const.c (fold_convertible_p): Pointer extension
11221         isn't valid.
11223 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
11225         PR debug/86064
11226         * dwarf2out.c (loc_list_has_views): Adjust comments.
11227         (dw_loc_list): Split single cross-partition range with
11228         nonzero locview.
11230 2018-06-25  Jeff Law  <law@redhat.com>
11232         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11233         on -mbig-switch by default.
11235         * config/v850/predicates.md (const_float_1_operand): Fix match_code
11236         test.
11237         (const_float_0_operand): Remove unused predicate.
11238         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11239         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11240         (recipsf2): New expander.  Original pattern now called
11241         (recipsf2_insn).
11242         (recipdf2, recipdf2_insn): Similarly.
11243         (rsqrtsf2, rsqrtsf2_insn): Similarly
11244         (rsqrtdf2, rsqrtdf2_insn): Similarly
11246 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
11248         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11249         Simplify logic for FreeBSD (twice).
11251 2018-06-25  Martin Sebor  <msebor@redhat.com>
11253         PR tree-optimization/86204
11254         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11255         a strnlen result if it's less than the length of the string.
11257 2018-06-25  Martin Sebor  <msebor@redhat.com>
11259         PR tree-optimization/85700
11260         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11261         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11262         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11264 2018-06-25  Martin Sebor  <msebor@redhat.com>
11266         * doc/extend.texi (Zero-length arrays): Update and clarify.
11268 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
11270         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11271         added IEEE/IBM long double multilib support on PowerPC little
11272         endian Linux systems.
11273         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11274         (MULTILIB_DEFAULTS): Likewise.
11275         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11276         Likewise.
11277         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11278         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11279         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11281 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
11283         PR middle-end/86311
11284         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11285         (REORDER_45): Likewise.
11287 2018-06-25  Jeff Law  <law@redhat.com>
11289         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11290         dividend to 32 bits.  Adjust length.
11291         (udivmodhi4): Cleanup output template.  Fix length.
11293 2018-06-25  Carl Love  <cel@us.ibm.com>
11295         * config/rs6000/vsx.md: Change word selector to prefered location.
11297 2018-06-25  Richard Biener  <rguenther@suse.de>
11299         PR tree-optimization/86304
11300         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11301         epilogue-if-converted loops as well.
11303 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
11305         * lto-section-out.c (lto_begin_section): Do not print section
11306         name for noaddr and unnumbered dumps.
11308 2018-06-25  Richard Biener  <rguenther@suse.de>
11310         * tree-vectorizer.h (struct vec_info_shared): New structure
11311         with parts split out from struct vec_info and loop_nest from
11312         struct _loop_vec_info.
11313         (struct vec_info): Adjust accordingly.
11314         (struct _loop_vec_info): Likewise.
11315         (LOOP_VINFO_LOOP_NEST): Adjust.
11316         (LOOP_VINFO_DATAREFS): Likewise.
11317         (LOOP_VINFO_DDRS): Likewise.
11318         (struct _bb_vec_info): Likewise.
11319         (BB_VINFO_DATAREFS): Likewise.
11320         (BB_VINFO_DDRS): Likewise.
11321         (struct _stmt_vec_info): Add dr_aux member.
11322         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11323         (DR_MISALIGNMENT_UNINITIALIZED): New.
11324         (set_dr_misalignment): Adjust.
11325         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11326         (vect_analyze_loop): Adjust prototype.
11327         (vect_analyze_loop_form): Likewise.
11328         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11329         Compute dependences lazily.
11330         (vect_record_base_alignments): Use shared datarefs/ddrs.
11331         (vect_verify_datarefs_alignment): Likewise.
11332         (vect_analyze_data_refs_alignment): Likewise.
11333         (vect_analyze_data_ref_accesses): Likewise.
11334         (vect_analyze_data_refs): Likewise.
11335         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11336         constructor parameter for shared part.
11337         (vect_analyze_loop_form): Pass in shared part and adjust.
11338         (vect_analyze_loop_2): Pass in storage for the number of
11339         stmts.  Move loop nest finding to the caller.  Compute
11340         datarefs lazily.
11341         (vect_analyze_loop): Pass in shared part.
11342         (vect_transform_loop): Verify shared datarefs are unchanged.
11343         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11344         constructor parameter for shared part.
11345         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11346         (vect_slp_bb): Verify shared datarefs are unchanged before
11347         transform.
11348         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11349         change.
11350         (new_stmt_vec_info): Initialize DR_AUX misalignment to
11351         DR_MISALIGNMENT_UNINITIALIZED.
11352         * tree-vectorizer.c (vec_info::vec_info): Add constructor
11353         parameter for shared part.
11354         (vec_info::~vec_info): Adjust.
11355         (vec_info_shared::vec_info_shared): New.
11356         (vec_info_shared::~vec_info_shared): Likewise.
11357         (vec_info_shared::save_datarefs): Likewise.
11358         (vec_info_shared::check_datarefs): Likewise.
11359         (try_vectorize_loop_1): Construct shared part live for analyses
11360         of a single loop for multiple vector sizes.
11361         * tree-parloops.c (gather_scalar_reductions): Adjust.
11363 2018-06-25  Richard Biener  <rguenther@suse.de>
11365         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11366         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11367         (vect_analyze_data_refs): Remove similar code from here and
11368         simplify accordingly.
11370 2018-06-25  Richard Biener  <rguenther@suse.de>
11372         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11373         for reverse storage order accesses rather than asserting
11374         they cannot happen here.
11376 2018-06-25  Tom de Vries  <tdevries@suse.de>
11378         PR debug/86257
11379         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11380         Use data16 instead of .byte for insn prefix.
11382 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
11384         PR C++/86082
11385         * parser.c (make_char_string_pack): Pass this literal chars
11386         through cpp_interpret_string.
11387         (cp_parser_userdef_numeric_literal): Check the result of
11388         make_char_string_pack.
11390 2018-06-24  Maya Rashish  <coypu@sdf.org>
11392         * ginclude/stddef.h: Simplify conditions around avoiding
11393         re-definition of __size_t.
11395 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11397         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
11398         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
11400 2018-06-22  Maya Rashish  <coypu@sdf.org>
11402         * doc/invoke.texi (mno-fancy-math-387): Update for changes
11403         made to OpenBSD and NetBSD through the years.
11405 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11407         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11408         behavior of vec_pack (vector double, vector double) to match
11409         behavior of vec_float2 (vector double, vector double).
11411 2018-06-22  Olivier Hainque  <hainque@adacore.com>
11413         * gimplify.c (gimplify_function_tree): Prevent creation
11414         of a trampoline for the address of the current function
11415         passed to entry/exit instrumentation hooks.
11417 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
11419         PR target/86222
11420         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
11421         correctly.
11423 2018-06-22  Martin Liska  <mliska@suse.cz>
11425         PR tree-optimization/86263
11426         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11427         Bail out if is_enabled is false.
11428         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
11429         New declaration.
11430         (jump_table_cluster::is_enabled): New function.
11432 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11434         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11435         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
11436         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
11437         (lto_input_ts_binfo_tree_pointers): Likewise.
11438         * tree-streamer-out.c (streamer_write_tree_bitfields,
11439         write_ts_binfo_tree_pointers): Likewise.
11440         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
11442 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11444         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
11446 2018-06-22  Martin Liska  <mliska@suse.cz>
11448         * symbol-summary.h (get): Make it pure and inline move
11449         functionality from ::get function.
11450         (get): Remove and inline into ::get and ::get_create.
11451         (get_create): Move code from ::get function.
11453 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11455         PR target/85994
11456         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
11457         -x assembler-with-cpp.
11459 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11461         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
11462         _FILE_OFFSET_BITS=64 for C++.
11464 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
11466         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
11467         conversion insn that shows up when pr85657-3.c is compiled using
11468         IEEE 128-bit long double.
11469         (neg<mode>2_internal): Use the correct mode to check whether the
11470         mode is IBM extended.
11471         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
11472         multiply and divide external functions from being created more
11473         than once.
11475 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11477         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
11478         functions.
11479         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
11480         the edge can be forwarded.
11481         (cfg_layout_merge_blocks): Likewise.
11483 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11485         * except.c (finish_eh_generation): Commit edge insertions only after
11486         the EH edges have been redirected from post-landing to landing pads.
11488 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11490         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
11491         create_tmp_var_for to create the FRAME decl.
11492         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
11494 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11496         * tree-inline.c (copy_edges_for_bb): Minor tweak.
11497         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
11498         debug statement when resetting its value.
11499         (expand_call_inline): Copy the locus of the call onto the assignment
11500         of the return value, if any.  Use local variable in more cases.
11502 2018-06-21  Martin Liska  <mliska@suse.cz>
11504         * ipa-pure-const.c (propagate_nothrow): Use
11505         funct_state_summaries->get.
11506         (dump_malloc_lattice): Likewise.
11507         (propagate_malloc): Likewise.
11509 2018-06-21  Richard Biener  <rguenther@suse.de>
11511         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
11512         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
11513         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
11514         comment.
11515         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
11516         BLOCK_ABSTRACT_ORIGIN unconditionally.
11518 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
11520         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
11521         deleting it.
11522         * ipa-reference.c (ipa_reference_c_finalize): Delete
11523         ipa_ref_opt_sum_summaries and set it to NULL.
11525 2018-06-21  Tom de Vries  <tdevries@suse.de>
11527         PR tree-optimization/85859
11528         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
11529         test with comment from bb_no_side_effects_p.
11531 2018-06-21  Richard Biener  <rguenther@suse.de>
11533         PR tree-optimization/86232
11534         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
11535         max for constant niter.
11537 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11539         * config/aarch64/aarch64-simd.md
11540         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
11542 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11544         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
11545         Make opernads of the unspec commutative.
11547 2018-06-21  Richard Biener  <rguenther@suse.de>
11549         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
11550         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
11551         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
11552         (vect_analyze_data_ref_dependence): Re-order checks to deal with
11553         NULL DR_STEP.
11554         (vect_record_base_alignments): Do not record base alignment
11555         for gathers or scatters.
11556         (vect_compute_data_ref_alignment): Drop return value that is always
11557         true.  Bail out early for gathers or scatters.
11558         (vect_enhance_data_refs_alignment): Bail out early for gathers
11559         or scatters.
11560         (vect_find_same_alignment_drs): Likewise.
11561         (vect_analyze_data_refs_alignment): Remove dead code.
11562         (vect_slp_analyze_and_verify_node_alignment): Likewise.
11563         (vect_analyze_data_refs): For possible gathers or scatters do
11564         not create an alternate DR, just check their possible validity
11565         and mark them.  Adjust DECL_NONALIASED handling to not rely
11566         on DR_BASE_ADDRESS.
11567         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
11568         update inits of gathers or scatters.
11569         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
11570         Also copy gather/scatter flag to pattern vinfo.
11572 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11574         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11575         behavior of vec_packsu (vector unsigned long long, vector unsigned
11576         long long) to match behavior of vec_packs with same signature.
11578 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
11579             Thomas Schwinge <thomas@codesourcery.com>
11580             Cesar Philippidis  <cesar@codesourcery.com>
11582         * gimplify.c (gimplify_scan_omp_clauses): Add support for
11583         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11584         (gimplify_adjust_omp_clauses): Likewise.
11585         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
11586         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
11587         (gimplify_omp_target_update): Update handling of acc update and
11588         enter/exit data.
11589         * omp-low.c (install_var_field): Remove unused parameter
11590         base_pointers_restrict.
11591         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
11592         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
11593         FINALIZE}
11594         (omp_target_base_pointers_restrict_p): Delete.
11595         (scan_omp_target): Update call to scan_sharing_clauses.
11596         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
11597         FINALIZE}.
11598         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
11599         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11600         (convert_local_omp_clauses): Likewise.
11601         * tree-pretty-print.c (dump_omp_clause): Likewise.
11602         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
11603         FINALIZE}.
11604         (omp_clause_code_name): Likewise.
11606 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
11608         PR debug/86194
11609         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
11610         be narrowed.
11612         PR tree-optimization/86231
11613         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
11614         anti-range don't overwrite *vr0min before using it to compute *vr0max.
11616 2018-06-20  Tom de Vries  <tdevries@suse.de>
11618         PR tree-optimization/86097
11619         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
11620         iv type if signedness of iv type is not the same as that of *nit.
11622 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
11624         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
11625         EDGE_EH edges, verify they are all EDGE_EH.
11627 2018-06-20  Maya Rashish  <coypu@sdf.org>
11629         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
11631 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11633         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
11634         * config/aarch64/aarch64.c (xgene1_tunings): Add
11635         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
11636         (aarch64_mode_valid_for_sched_fusion_p):
11637         Allow 16-byte modes.
11638         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
11639         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
11640         128-bit modes.
11641         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
11642         New pattern.
11643         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
11644         * config/aarch64/iterators.md (VQ2): New mode iterator.
11646 2018-06-20  Martin Liska  <mliska@suse.cz>
11648         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11649         Change default ratio from 10 to 8.
11651 2018-06-20  Martin Liska  <mliska@suse.cz>
11653         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11654         New.
11655         (bit_test_cluster::find_bit_tests): Likewise.
11656         (switch_decision_tree::analyze_switch_statement): Find clusters.
11657         * tree-switch-conversion.h (struct jump_table_cluster): Document
11658         hierarchy.
11660 2018-06-20  Martin Liska  <mliska@suse.cz>
11662         * tree-switch-conversion.c (switch_conversion::collect):
11663         Record m_uniq property.
11664         (switch_conversion::expand): Bail out for special conditions.
11665         (group_cluster::~group_cluster): New.
11666         (group_cluster::group_cluster): Likewise.
11667         (group_cluster::dump): Likewise.
11668         (jump_table_cluster::emit): New.
11669         (switch_decision_tree::fix_phi_operands_for_edges): New.
11670         (struct case_node): Remove struct.
11671         (jump_table_cluster::can_be_handled): New.
11672         (case_values_threshold): Moved to header.
11673         (reset_out_edges_aux): Likewise.
11674         (jump_table_cluster::is_beneficial): New.
11675         (bit_test_cluster::can_be_handled): Likewise.
11676         (add_case_node): Remove.
11677         (bit_test_cluster::is_beneficial): New.
11678         (case_bit_test::cmp): New.
11679         (bit_test_cluster::emit): New.
11680         (expand_switch_as_decision_tree_p): Remove.
11681         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
11682         (fix_phi_operands_for_edge): Likewise.
11683         (switch_decision_tree::analyze_switch_statement): New.
11684         (compute_cases_per_edge): Move ...
11685         (switch_decision_tree::compute_cases_per_edge): ... here.
11686         (try_switch_expansion): Likewise.
11687         (switch_decision_tree::try_switch_expansion): Likewise.
11688         (record_phi_operand_mapping): Likewise.
11689         (switch_decision_tree::record_phi_operand_mapping): Likewise.
11690         (emit_case_decision_tree): Likewise.
11691         (switch_decision_tree::emit): Likewise.
11692         (balance_case_nodes): Likewise.
11693         (switch_decision_tree::balance_case_nodes): Likewise.
11694         (dump_case_nodes): Likewise.
11695         (switch_decision_tree::dump_case_nodes): Likewise.
11696         (emit_jump): Likewise.
11697         (switch_decision_tree::emit_jump): Likewise.
11698         (emit_cmp_and_jump_insns): Likewise.
11699         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
11700         (emit_case_nodes): Likewise.
11701         (switch_decision_tree::emit_case_nodes): Likewise.
11702         (conditional_probability): Remove.
11703         * tree-switch-conversion.h (enum cluster_type): New.
11704         (PRINT_CASE): New.
11705         (struct cluster): Likewise.
11706         (cluster::cluster): Likewise.
11707         (struct simple_cluster): Likewise.
11708         (simple_cluster::simple_cluster): Likewise.
11709         (struct group_cluster): Likewise.
11710         (struct jump_table_cluster): Likewise.
11711         (struct bit_test_cluster): Likewise.
11712         (struct min_cluster_item): Likewise.
11713         (struct case_tree_node): Likewise.
11714         (case_tree_node::case_tree_node): Likewise.
11715         (jump_table_cluster::case_values_threshold): Likewise.
11716         (struct case_bit_test): Likewise.
11717         (struct switch_decision_tree): Likewise.
11718         (struct switch_conversion): Likewise.
11719         (switch_decision_tree::reset_out_edges_aux): Likewise.
11721 2018-06-20  Martin Liska  <mliska@suse.cz>
11723         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
11724         (hoist_edge_and_branch_if_true): Likewise.
11725         (expand_switch_using_bit_tests_p): Likewise.
11726         (struct case_bit_test): Likewise.
11727         (case_bit_test_cmp): Likewise.
11728         (emit_case_bit_tests): Likewise.
11729         (switch_conversion::switch_conversion): New class.
11730         (struct switch_conv_info): Remove old struct.
11731         (collect_switch_conv_info): More to ...
11732         (switch_conversion::collect): ... this.
11733         (check_range): Likewise.
11734         (switch_conversion::check_range): Likewise.
11735         (check_all_empty_except_final): Likewise.
11736         (switch_conversion::check_all_empty_except_final): Likewise.
11737         (check_final_bb): Likewise.
11738         (switch_conversion::check_final_bb): Likewise.
11739         (create_temp_arrays): Likewise.
11740         (switch_conversion::create_temp_arrays): Likewise.
11741         (free_temp_arrays): Likewise.
11742         (gather_default_values): Likewise.
11743         (switch_conversion::gather_default_values): Likewise.
11744         (build_constructors): Likewise.
11745         (switch_conversion::build_constructors): Likewise.
11746         (constructor_contains_same_values_p): Likewise.
11747         (switch_conversion::contains_same_values_p): Likewise.
11748         (array_value_type): Likewise.
11749         (switch_conversion::array_value_type): Likewise.
11750         (build_one_array): Likewise.
11751         (switch_conversion::build_one_array): Likewise.
11752         (build_arrays): Likewise.
11753         (switch_conversion::build_arrays): Likewise.
11754         (gen_def_assigns): Likewise.
11755         (switch_conversion::gen_def_assigns): Likewise.
11756         (prune_bbs): Likewise.
11757         (switch_conversion::prune_bbs): Likewise.
11758         (fix_phi_nodes): Likewise.
11759         (switch_conversion::fix_phi_nodes): Likewise.
11760         (gen_inbound_check): Likewise.
11761         (switch_conversion::gen_inbound_check): Likewise.
11762         (process_switch): Use the newly created class.
11763         (switch_conversion::expand): New.
11764         (switch_conversion::~switch_conversion): New.
11765         * tree-switch-conversion.h: New file.
11767 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11769         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
11770         tree-vect-patterns.c.
11771         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
11772         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
11773         (vect_recog_sad_pattern): Likewise.
11774         (vect_recog_widen_sum_pattern): Likewise.
11775         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
11776         (vect_recog_widen_shift_pattern): Remove the type_in argument.
11777         (vect_recog_rotate_pattern): Likewise.
11778         (vect_recog_mult_pattern): Likewise.
11779         (vect_recog_vector_vector_shift_pattern): Likewise.
11780         (vect_recog_divmod_pattern): Likewise.
11781         (vect_recog_mixed_size_cond_pattern): Likewise.
11782         (vect_recog_bool_pattern): Likewise.
11783         (vect_recog_mask_conversion_pattern): Likewise.
11784         (vect_try_gather_scatter_pattern): Likewise.
11785         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
11786         (vect_recog_over_widening_pattern): Likewise.
11787         (vect_recog_gather_scatter_pattern): Likewise.
11788         (vect_recog_func_ptr): Move from tree-vectorizer.h
11789         (vect_vect_recog_func_ptrs): Move further down the file.
11790         (vect_recog_func): Likewise.  Remove the third argument.
11791         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
11792         (vect_pattern_recog_1): Expect the pattern function to do any
11793         necessary target tests.  Also expect it to provide a vector type.
11794         Remove the type_in handling.
11796 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11798         * tree-vect-patterns.c (vect_pattern_detected): New function.
11799         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
11800         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
11801         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
11802         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
11803         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11804         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11805         (vect_recog_mask_conversion_pattern)
11806         (vect_try_gather_scatter_pattern): Likewise.
11808 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11810         * tree-vect-patterns.c (vect_get_internal_def): New function.
11811         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11812         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
11813         (search_type_for_mask_1): Use it.
11815 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11817         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11818         redundant WIDEN_SUM_EXPR handling.
11819         (vect_recog_sad_pattern): Likewise.
11821 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11823         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11824         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11825         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
11826         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11827         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11829 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11831         * tree-vect-stmts.c (vectorizable_call): Make sure that we
11832         use the stmt_vec_info of the original bb statement for the
11833         new zero assignment, even if the call is part of a pattern.
11835 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11837         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11838         that the sequence is attached to the original statement rather
11839         than the pattern statement.
11840         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11841         PATTERN_DEF_SEQ from the original statement rather than
11842         the main pattern statement.
11843         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11844         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11845         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11847 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11849         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11850         definition statements before the early exit for statements that aren't
11851         live or relevant.
11852         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11853         split out from...
11854         (vect_transform_loop): ...here.  Process pattern definition
11855         statements without first checking whether the main pattern
11856         statement is live or relevant.
11858 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11860         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11861         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11863 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
11865         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11866         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11867         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11868         (expand_block_compare): Change select_block_compare_mode call.
11869         (expand_strncmp_align_check): Use new functions, fix comment.
11870         (emit_final_str_compare_gpr): New function.
11871         (expand_strn_compare): Refactor and clean up code.
11872         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11874 2018-06-19  Tony Reix  <tony.reix@atos.com>
11875             Damien Bergamini  <damien.bergamini@atos.com>
11876             David Edelsohn  <dje.gcc@gmail.com>
11878         * collect2.c (static_obj): New variable.
11879         (static_libs): New variable.
11880         (is_in_list): Uncomment declaration.
11881         (main): Track AIX libraries linked statically.
11882         (is_in_list): Uncomment definition.
11883         (scan_prog_file): Don't add AIX shared libraries initializer
11884         to constructor list if linking statically.
11886 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
11888         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11889         constant.
11890         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11892 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
11894         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11895         blocks.
11897 2018-06-19  Martin Liska  <mliska@suse.cz>
11899         * config/i386/i386.c (ix86_can_inline_p): Do not use
11900         ipa_fn_summaries::get_create.
11901         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11902         get.
11903         (devirtualization_time_bonus): Likewise.
11904         (ipcp_propagate_stage): Likewise.
11905         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11906         (edge_set_predicate): Likewise.
11907         (evaluate_conditions_for_known_args): Likewise.
11908         (evaluate_properties_for_edge): Likewise.
11909         (ipa_call_summary::reset): Tranform to ...
11910         (ipa_call_summary::~ipa_call_summary): ... this.
11911         (ipa_fn_summary::reset): Transform to ...
11912         (ipa_fn_summary::~ipa_fn_summary): ... this.
11913         (ipa_fn_summary_t::remove): Rename to ...
11914         (ipa_fn_summary_t::remove_callees): ... this.
11915         (ipa_fn_summary_t::duplicate): Use placement new
11916         instead of memory copy.
11917         (ipa_call_summary_t::duplicate): Likewise.
11918         (ipa_call_summary_t::remove): Remove.
11919         (dump_ipa_call_summary): Change get_create to get.
11920         (ipa_dump_fn_summary): Dump only when summary exists.
11921         (analyze_function_body): Use symbol_summary::get instead
11922         of get_create.
11923         (compute_fn_summary): Likewise.
11924         (estimate_edge_devirt_benefit): Likewise.
11925         (estimate_edge_size_and_time): Likewise.
11926         (inline_update_callee_summaries): Likewise.
11927         (remap_edge_change_prob): Likewise.
11928         (remap_edge_summaries): Likewise.
11929         (ipa_merge_fn_summary_after_inlining): Likewise.
11930         (write_ipa_call_summary): Likewise.
11931         (ipa_fn_summary_write): Likewise.
11932         (ipa_free_fn_summary): Likewise.
11933         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11934         (struct ipa_call_summary): Likewise.
11935         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11936         of get_create.
11937         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11938         (estimate_size_after_inlining): Likewise.
11939         (estimate_growth): Likewise.
11940         (growth_likely_positive): Likewise.
11941         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11942         (inline_call): Likewise.
11943         * ipa-inline.c (caller_growth_limits): Likewise.
11944         (can_inline_edge_p): Likewise.
11945         (can_inline_edge_by_limits_p): Likewise.
11946         (compute_uninlined_call_time): Likewise.
11947         (compute_inlined_call_time): Likewise.
11948         (want_inline_small_function_p): Likewise.
11949         (edge_badness): Likewise.
11950         (update_caller_keys): Likewise.
11951         (update_callee_keys): Likewise.
11952         (inline_small_functions): Likewise.
11953         (inline_to_all_callers_1): Likewise.
11954         (dump_overall_stats): Likewise.
11955         (early_inline_small_functions): Likewise.
11956         (early_inliner): Likewise.
11957         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11958         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11959         * ipa-pure-const.c (malloc_candidate_p): Likewise.
11960         * ipa-split.c (execute_split_functions): Likewise.
11961         * symbol-summary.h: Likewise.
11962         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11964 2018-06-19  Richard Biener  <rguenther@suse.de>
11966         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11967         (vectorize_loops): ... here.  Fix dbgcnt handling.
11968         (try_vectorize_loop): Wrap try_vectorize_loop_1.
11970 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
11972         PR target/86197
11973         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11974         ieee128 argument takes up only one (vector) register, not two (floating
11975         point) registers.
11977 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11979         * gimplify.c (gimplify_init_constructor): Really never clear for an
11980         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11982 2018-06-19  Richard Biener  <rguenther@suse.de>
11984         PR tree-optimization/86179
11985         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11986         after failed recognition.
11988 2018-06-18  Martin Sebor  <msebor@redhat.com>
11990         PR middle-end/85602
11991         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11992         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11993         Handle integer subtraction.
11994         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11995         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11997 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11999         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12000         param from rtx to rtx_insn *.
12001         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12002         param.
12003         (frv_ifcvt_modify_insn): Likwise.
12004         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12005         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
12006         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12007         as_a <rtx_insn *> cast to local "unprotected_region" once
12008         it's been established that it's not NULL or pc_rtx.
12009         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12010         param "sethi" from rtx to rtx_insn *.
12011         (nds32_group_float_insns): Likewise for param "insn".
12012         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12013         param.
12014         (vax_output_int_subtract): Likewise.
12015         * config/vax/vax.c (vax_output_int_add): Likewise for param
12016         "insn".
12017         (vax_output_int_subtract): Likewise.
12018         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12019         (emit_pattern_after): Likewise for param "after".
12020         (emit_insn_after): Likewise.
12021         (emit_jump_insn_after): Likewise.
12022         (emit_call_insn_after): Likewise.
12023         (emit_debug_insn_after): Likewise.
12024         (emit_pattern_before): Likewise for param "before".
12025         (emit_insn_before): Likewise.
12026         (emit_jump_insn_before): Likewise.
12027         * final.c (get_insn_template): Likewise for param "insn", removing
12028         a cast.
12029         * output.h (get_insn_template): Likewise for 2nd param.
12030         * rtl.h (emit_insn_before): Likewise.
12031         (emit_jump_insn_before): Likewise.
12032         (emit_debug_insn_before_noloc): Likewise.
12033         (emit_insn_after): Likewise.
12034         (emit_jump_insn_after): Likewise.
12035         (emit_call_insn_after): Likewise.
12036         (emit_debug_insn_after): Likewise.
12037         (set_insn_deleted): Likewise for param.
12039 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
12041         PR target/85358
12042         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12043         floating point modes, so that IFmode is numerically greater than
12044         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12045         to declare the ordering.  This prevents IFmode from being
12046         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12047         machine.  Include rs6000-modes.h to share the fractional values
12048         between genmodes* and the rest of the compiler.
12049         (IFmode): Likewise.
12050         (KFmode): Likewise.
12051         (TFmode): Likewise.
12052         * config/rs6000/rs6000-modes.h: New file.
12053         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12054         meaning of rs6000_long_double_size so that 126..128 selects an
12055         appropriate 128-bit floating point type.
12056         (rs6000_option_override_internal): Likewise.
12057         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12058         (TARGET_LONG_DOUBLE_128): Change the meaning of
12059         rs6000_long_double_size so that 126..128 selects an appropriate
12060         128-bit floating point type.
12061         (LONG_DOUBLE_TYPE_SIZE): Update comment.
12062         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12063         source and destination to match the standard usage.
12064         (truncifkf2): Likewise.
12065         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12066         ISA 2.07 to use an explicit clobber, instead of passing in a
12067         temporary.
12068         (copysign<mode>3_soft): Likewise.
12070 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
12072         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12073         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12074         (vect_slp_analyze_instance_dependence): Likewise.
12075         (vect_enhance_data_refs_alignment): Likewise.
12076         (vect_analyze_data_refs_alignment): Likewise.
12077         (vect_slp_analyze_and_verify_instance_alignment
12078         (vect_analyze_data_ref_accesses): Likewise.
12079         (vect_prune_runtime_alias_test_list): Likewise.
12080         (vect_analyze_data_refs): Likewise.
12081         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12082         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12083         (vect_analyze_scalar_cycles_1): Likewise.
12084         (vect_get_loop_niters): Likewise.
12085         (vect_analyze_loop_form_1): Likewise.
12086         (vect_update_vf_for_slp): Likewise.
12087         (vect_analyze_loop_operations): Likewise.
12088         (vect_analyze_loop): Likewise.
12089         (vectorizable_induction): Likewise.
12090         (vect_transform_loop): Likewise.
12091         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12092         * tree-vect-slp.c (vect_analyze_slp): Likewise.
12093         (vect_make_slp_decision): Likewise.
12094         (vect_detect_hybrid_slp): Likewise.
12095         (vect_slp_analyze_operations): Likewise.
12096         (vect_slp_bb): Likewise.
12097         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12098         (vectorizable_bswap): Likewise.
12099         (vectorizable_call): Likewise.
12100         (vectorizable_simd_clone_call): Likewise.
12101         (vectorizable_conversion): Likewise.
12102         (vectorizable_assignment): Likewise.
12103         (vectorizable_shift): Likewise.
12104         (vectorizable_operation): Likewise.
12105         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12107 2018-06-18  Martin Sebor  <msebor@redhat.com>
12109         PR tree-optimization/81384
12110         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12111         * builtins.c (expand_builtin_strnlen): New function.
12112         (expand_builtin): Call it.
12113         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12114         * builtins.def (BUILT_IN_STRNLEN): New.
12115         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12116         Warn for bounds in excess of maximum object size.
12117         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12118         single-value ranges.  Handle strnlen.
12119         (handle_builtin_strlen): Handle strnlen.
12120         (strlen_check_and_optimize_stmt): Same.
12121         * doc/extend.texi (Other Builtins): Document strnlen.
12123 2018-06-18  Maya Rashish  <coypu@sdf.org>
12125         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12126         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12127         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12129         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12130         here to ...
12131         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12133 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12135         * tree.c (escaped_string::escape): Replace cast to char * by
12136         const_cast<char *> (unescaped).
12138 2018-06-18  Nick Clifton  <nickc@redhat.com>
12140         PR 84195
12141         * tree.c (escaped_string): New class.  Converts an unescaped
12142         string into its escaped equivalent.
12143         (warn_deprecated_use): Use the new class to convert the
12144         deprecation message, if present.
12145         (test_escaped_strings): New self test.
12146         (test_c_tests): Add test_escaped_strings.
12147         * doc/extend.texi (deprecated): Add a note that the
12148         deprecation message is affected by the -fmessage-length
12149         option, and that control characters will be escaped.
12150         (#pragma GCC error): Document this pragma.
12151         (#pragma GCC warning): Likewise.
12152         * doc/invoke.texi (-fmessage-length): Document this option's
12153         effect on the #warning and #error preprocessor directives and
12154         the deprecated attribute.
12156 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12158         * tree.c (decl_value_expr_lookup): Revert latest change.
12159         (decl_value_expr_insert): Likewise.
12161 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
12163         * gimplify.c (nonlocal_vlas): Delete.
12164         (nonlocal_vla_vars): Likewise.
12165         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12166         referenced VLAs.
12167         (gimplify_body): Do not create and destroy nonlocal_vlas.
12168         * tree-nested.c: Include diagnostic.h.
12169         (use_pointer_in_frame): Tweak.
12170         (lookup_field_for_decl): Add assertion and declare the transformation.
12171         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12172         internal error when the reference is in a wrong context.  Do not
12173         create a debug decl by default.
12174         (note_nonlocal_block_vlas): Delete.
12175         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12176         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
12177         create a debug decl by default.
12178         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12179         call is in a wrong context.
12180         (fixup_vla_decls): New function.
12181         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
12182         debug variables were created.
12183         * tree.c (decl_value_expr_lookup): Add checking assertion.
12184         (decl_value_expr_insert): Likewise.
12186 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12188         PR middle-end/82479
12189         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12190         * tree-scalar-evolution.c (interpret_expr): Likewise.
12191         (expression_expensive_p): Likewise.
12192         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12193         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12194         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12195         (ssa_defined_by_minus_one_stmt_p): New.
12197 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12199         PR middle-end/64946
12200         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12201         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12202         * dojump.c (do_jump): Likewise.
12203         * expr.c (expand_expr_real_2): Check operand type's sign.
12204         * fold-const.c (const_unop): Handle ABSU_EXPR.
12205         (fold_abs_const): Likewise.
12206         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12207         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12208         (strip_sign_op_1): Likesise.
12209         * match.pd: Add new pattern to generate ABSU_EXPR.
12210         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12211         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12212         * tree-eh.c (operation_could_trap_helper_p): Likewise.
12213         * tree-inline.c (estimate_operator_cost): Likewise.
12214         * tree-pretty-print.c (dump_generic_node): Likewise.
12215         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12216         * tree.def (ABSU_EXPR): New.
12218 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
12220         PR middle-end/86095
12221         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12222         documented as preserved for backward compatibility only.
12223         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12225         PR rtl-optimization/86108
12226         * bb-reorder.c (create_forwarder_block): Renamed to ...
12227         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
12228         jump from new landing pad to the second part.
12229         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12230         Adjust callers.
12232 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
12234         PR middle-end/85878
12235         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12236         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12237         Only call store_expr for halves if the mode is the same.
12239         PR middle-end/86123
12240         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12241         Fix up comment formatting.
12243 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12245         * typed-splay-tree.h (typed_splay_tree::remove): New function.
12246         (typed_splay_tree::closure,
12247         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12248         (typed_splay_tree::typed_splay_tree,
12249         typed_splay_tree::operator =): Declared private.
12250         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12251         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12252         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12253         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12254         typed_splay_tree::splay_tree_splay,
12255         typed_splay_tree::splay_tree_foreach_helper,
12256         typed_splay_tree::splay_tree_insert,
12257         typed_splay_tree::splay_tree_remove,
12258         typed_splay_tree::splay_tree_lookup,
12259         typed_splay_tree::splay_tree_predecessor,
12260         typed_splay_tree::splay_tree_successor,
12261         typed_splay_tree::splay_tree_min,
12262         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12263         (typed_splay_tree::root, typed_splay_tree::comp,
12264         typed_splay_tree::delete_key,
12265         typed_splay_tree::delete_value): New data members.
12266         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12267         typed_splay_tree::remove.
12269 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
12271         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12272         -mginv and -mno-ginv to the assembler.
12273         * config/mips/mips.opt (-mcrc): New option.
12274         (-mginv): Likewise.
12275         * doc/invoke.text (-mcrc): Document.
12276         (-mginv): Likewise.
12278 2018-06-15  Nick Clifton  <nickc@redhat.com>
12280         PR 84195
12281         * tree.c (escaped_string): New class.  Converts an unescaped
12282         string into its escaped equivalent.
12283         (warn_deprecated_use): Use the new class to convert the
12284         deprecation message, if present.
12285         (test_escaped_strings): New self test.
12286         (test_c_tests): Add test_escaped_strings.
12287         * doc/extend.texi (deprecated): Add a note that the
12288         deprecation message is affected by the -fmessage-length
12289         option, and that control characters will be escaped.
12290         (#pragma GCC error): Document this pragma.
12291         (#pragma GCC warning): Likewise.
12292         * doc/invoke.texi (-fmessage-length): Document this option's
12293         effect on the #warning and #error preprocessor directives and
12294         the deprecated attribute.
12296 2018-06-15  Richard Biener  <rguenther@suse.de>
12298         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12299         here, also noting vector size used.
12300         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
12301         size used in MSG_OPTIMIZED_LOCATIONS dump.
12302         (pass_slp_vectorize::execute): Adjust.
12304 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
12306         PR target/85968
12307         * config/arc/arc.c (arc_return_address_register): Fix
12308         if-condition.
12310 2018-06-15  Richard Biener  <rguenther@suse.de>
12312         PR middle-end/86159
12313         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12314         leave useless conversion stripping to force_gimple_operand_gsi.
12315         (gimplify_build2): Likewise.
12316         (gimplify_build1): Likewise.
12318 2018-06-15  Richard Biener  <rguenther@suse.de>
12320         PR middle-end/86076
12321         * tree-cfg.c (move_stmt_op): unshare invariant addresses
12322         before adjusting their block.
12324 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12326         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12327         multilibs for *-*-rtems*.
12328         * config/riscv/t-rtems: New file.
12330 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
12332         PR middle-end/86122
12333         * match.pd ((A +- CST1) +- CST2): Punt if last resort
12334         unsigned_type_for returns NULL.
12336         PR target/85945
12337         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12338         subregs of multi-word pseudos unless the float mode has word size.
12340 2018-06-14  Richard Biener  <rguenther@suse.de>
12342         PR middle-end/86139
12343         * tree-vect-generic.c (build_word_mode_vector_type): Remove
12344         duplicate and harmful type_hash_canon.
12345         * tree.c (type_hash_canon): Assert we didn't find ourselves.
12347 2018-06-14  Richard Biener  <rguenther@suse.de>
12349         PR ipa/86124
12350         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12351         NULL cgraph_node.
12353 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12355         * config/rtems.h (STDINT_LONG32): Define.
12357 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
12358             Prachi Godbole  <prachi.godbole@imgtec.com>
12360         * config/mips/mips-cpus.def: Define P6600.
12361         * config/mips/mips-tables.opt: Regenerate.
12362         * config/mips/mips.c (mips_ucbranch_type): New enum.
12363         (mips_rtx_cost_data): Add support for P6600.
12364         (mips_issue_rate): Likewise.
12365         (mips_multipass_dfa_lookahead): Likewise.
12366         (mips_avoid_hazard): Likewise.
12367         (mips_reorg_process_insns): Likewise.
12368         (mips_classify_branch_p6600): New function.
12369         * config/mips/mips.h (TUNE_P6600): New define.
12370         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12371         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12372         * config/mips/mips.md: Include p6600.md.
12373         (processor): Add p6600.
12374         * config/mips/p6600.md: New file.
12375         * doc/invoke.texi: Add p6600 to supported architectures.
12377 2018-06-13  Martin Sebor  <msebor@redhat.com>
12379         PR tree-optimization/86114
12380         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12381         of integer types.
12382         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
12384 2018-06-13  Richard Biener  <rguenther@suse.de>
12386         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
12387         Properly set vector type of the intermediate stmt.
12388         * tree-vect-stmts.c (vectorizable_operation): The destination
12389         var always has vectype_out type.
12391 2018-06-13  Jeff Law  <law@redhat.com>
12393         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
12394         integer 0 for argument to print_rtl_with_bb.
12395         (rl78_reorg): Likewise.
12397 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
12399         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
12400         from rtx to rtx_insn *.
12401         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
12402         "label".
12403         (add_sched_insns_for_speculation): Likewise for local "target",
12404         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12405         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
12406         from rtx_insn ** to rtx_code_label **.
12407         (reorg_emit_nops): Likewise.
12408         (c6x_reorg): Likewise for local "call_labels".
12409         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
12410         rtx to rtx_insn *.
12411         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
12412         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
12413         the loops over LABEL_REFS.
12414         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
12415         braf_label.
12416         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12417         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
12418         (split_branches): Strengthen local "olabel" from rtx to
12419         rtx_insn *, adding a safe_as_a cast.
12420         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
12421         to "rtx_insn *".
12422         (add_insn_after): Likewise for first two params.
12423         (add_insn_before): Likewise.
12424         (remove_insn): Likewise for param.
12425         (emit_pattern_before_noloc): Likewise for second and third params.
12426         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
12427         (emit_call_insn_before_noloc): Likewise.
12428         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
12429         to "rtx_insn *".
12430         (emit_barrier_before): Likewise.
12431         (emit_label_before): Strengthen "label" param from "rtx" to
12432         "rtx_code_label *".  Strengthen "before" param from "rtx" to
12433         "rtx_insn *".
12434         (emit_insn_after_1): Strengthen "after" param from "rtx" to
12435         "rtx_insn *".
12436         (emit_pattern_after_noloc): Likewise.
12437         (emit_insn_after_noloc): Likewise.
12438         (emit_jump_insn_after_noloc): Likewise.
12439         (emit_call_insn_after_noloc): Likewise.
12440         (emit_debug_insn_after_noloc): Likewise.
12441         (emit_barrier_after): Likewise.
12442         (emit_label_after): Likewise for both params.
12443         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
12444         "loc" param from "int" to "location_t".
12445         (emit_insn_after_setloc): Likewise.
12446         (emit_jump_insn_after_setloc): Likewise.
12447         (emit_call_insn_after_setloc): Likewise.
12448         (emit_debug_insn_after_setloc): Likewise.
12449         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
12450         "loc" param from "int" to "location_t".
12451         (emit_pattern_before): Convert NULL_RTX to NULL.
12452         (emit_insn_before_setloc): Convert "loc" param from "int" to
12453         "location_t".
12454         (emit_jump_insn_before_setloc): Likewise.
12455         (emit_call_insn_before_setloc): Likewise.
12456         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
12457         rtx_insn *.  Convert "loc" param from "int" to "location_t".
12458         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
12459         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
12460         Convert 3rd param from "int" to "location_t".
12461         (emit_barrier_before, emit_barrier_after, next_real_insn):
12462         Strengthen param from rtx to rtx_insn *.
12463         (emit_label_before): Strengthen 1st param from "rtx" to
12464         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
12465         "rtx_insn *".
12466         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
12467         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
12468         Strengthen 2nd param from "rtx" to "rtx_insn *".
12469         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
12470         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
12471         Likewise. Convert 3rd param from "int" to "location_t".
12472         (emit_label_after): Strengthen 1st param from "rtx" to
12473         "rtx_code_label *".
12474         (next_real_insn, remove_insn): Strengthen param from "rtx" to
12475         "rtx_insn *".
12476         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
12477         from "rtx" to "rtx_insn *".
12479 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
12481         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
12482         bodies streamed in with -Q.
12483         * dumpfile.c (dump_files): Add lto-stream-out dump file.
12484         * dumpfile.h (tree_dump_index): Add lto_stream_out.
12485         * gimple-streamer-out.c: Include gimple-pretty-print.h
12486         (output_bb): Dump stmts streamed.
12487         * lto-section-out.c: Include print-tree.h
12488         (lto_begin_section): Dump sections created.
12489         (lto_output_decl_index): Dump decl encoded.
12490         * lto-streamer-out.c: Include print-tree.h
12491         (create_output_block): Dump output block created.
12492         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
12493         (output_function): Dump function output.
12494         (output_constructor): Dump constructor streamed.
12495         (write_global_stream): Output indexes encoded.
12496         (produce_asm_for_decls): Dump streams encoded.
12497         * lto-streamer.c (streamer_dump_file): New global var.
12498         * lto-streamer.h (streamer_dump_file): Declare.
12499         * passes.c (ipa_write_summaries): Initialize streamer dump.
12500         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
12501         in.
12503 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
12505         PR target/86048
12506         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
12507         offsets for register save directives.  Emit a second batch of save
12508         directives, if need be, when the function accesses prior frames.
12510 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12512         * config/arc/fpu.md (fmasf4): Force operand to register.
12513         (fnmasf4): Likewise.
12515 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12517         * config/arc/arc-protos.h (arc_pad_return): Remove.
12518         * config/arc/arc.c (machine_function): Remove force_short_suffix
12519         and size_reason.
12520         (arc_print_operand): Adjust printing of '&'.
12521         (arc_verify_short): Remove conditional printing of short suffix.
12522         (arc_final_prescan_insn): Remove reference to size_reason.
12523         (pad_return): New function.
12524         (arc_reorg): Call pad_return.
12525         (arc_pad_return): Remove.
12526         (arc_init_machine_status): Remove reference to force_short_suffix.
12527         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
12528         (attr length): When attribute iscompact is true force to 2
12529         regardless; in the case of maybe check if we want to force the
12530         instruction to have 4 bytes length.
12531         (nopv): Change it to generate 4 byte long nop as well.
12532         (blockage): New pattern.
12533         (simple_return): Remove call to arc_pad_return.
12534         (p_return_i): Likewise.
12536 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12538         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
12540 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12542         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
12543         ARC cores.
12545 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12547         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
12548         for ARC700 and ARCv2.
12550 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
12552         PR target/86076
12553         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
12554         operands[2] instead of operands[1].
12557 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
12559         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
12560         case, check whether the outer register overlaps an unallocatable
12561         register, not just whether it fits the required class.
12563 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
12565         * poly-int.h (can_div_trunc_p): Add new overload in which all values
12566         are poly_ints.
12567         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
12568         (memrefs_conflict_p): Likewise.
12569         (init_alias_analysis): Likewise.
12570         * cfgexpand.c (expand_debug_expr): Likewise.
12571         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
12572         * cse.c (fold_rtx): Likewise.
12573         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
12574         * expr.c (emit_block_move_hints): Likewise.
12575         (clear_storage_hints, push_block, emit_push_insn): Likewise.
12576         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
12577         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
12578         (emit_group_store): Likewise.
12579         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
12580         to read the PRE/POST_MODIFY increment.
12581         * calls.c (store_one_arg): Use strip_offset.
12582         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
12583         poly_int_rtx_p.
12584         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
12585         by a VEC_SELECT.
12586         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
12587         (simplify_binary_operation_1): Extend CONST_INT handling to
12588         poly_int_rtx_p.
12589         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
12590         than a HOST_WIDE_INT.
12591         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
12592         poly_int64.
12593         (adjust_mems, add_stores): Update accodingly.
12594         (vt_canonicalize_addr): Track polynomial offsets.
12595         (emit_note_insn_var_location): Likewise.
12596         (vt_add_function_parameter): Likewise.
12597         (vt_initialize): Likewise.
12599 2018-06-12  Jeff Law  <law@redhat.com>
12601         * config.gcc (alpha*-*-freebsd*): Remove.
12602         * config/alpha/freebsd.h: Remove.
12604 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
12606         PR other/69968
12607         * spellcheck-tree.c (levenshtein_distance): Rename to...
12608         (get_edit_distance): ...this, and update for underlying renaming.
12609         * spellcheck-tree.h (levenshtein_distance): Rename to...
12610         (get_edit_distance): ...this.
12611         * spellcheck.c (levenshtein_distance): Rename to...
12612         (get_edit_distance): ...this.  Convert from Levenshtein distance
12613         to Damerau-Levenshtein distance by supporting transpositions of
12614         adjacent characters.  Rename "v1" to "v_next" and "v0" to
12615         "v_one_ago".
12616         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
12617         (selftest::test_edit_distance_unit_test_oneway): ...this, and
12618         update for underlying renaming.
12619         (selftest::levenshtein_distance_unit_test): Rename to...
12620         (selftest::test_get_edit_distance_unit): ...this, and update for
12621         underlying renaming.
12622         (selftest::test_find_closest_string): Add example from PR 69968
12623         where transposition helps
12624         (selftest::test_metric_conditions): Update for renaming.
12625         (selftest::test_metric_conditions): Likewise.
12626         (selftest::spellcheck_c_tests): Likewise.
12627         * spellcheck.h (levenshtein_distance): Rename both overloads to...
12628         (get_edit_distance): ...this.
12629         (best_match::consider): Update for renaming.
12631 2018-06-12  Martin Sebor  <msebor@redhat.com>
12633         PR tree-optimization/85259
12634         * builtins.c (compute_objsize): Handle constant offsets.
12635         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
12636         true iff a warning has been issued.
12637         * gimple.h (gimple_nonartificial_location): New function.
12638         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
12639         gimple_nonartificial_location and handle -Wno-system-headers.
12640         (handle_builtin_stxncpy): Same.
12642 2018-06-12  Martin Sebor  <msebor@redhat.com>
12644         PR c/85931
12645         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
12647 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
12649         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12650         BUILTIN_VEC_XST entries for pointer to double and long long.
12652 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
12654         PR target/85990
12655         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12656         Update comments.
12657         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12658         Likewise.
12660 2018-06-12  Martin Liska  <mliska@suse.cz>
12662         * doc/options.texi: Document IntegerRange.
12664 2018-06-12  Martin Liska  <mliska@suse.cz>
12666         * config/i386/i386.opt: Make MPX-related options as Deprecated.
12667         * opt-functions.awk: Handle Deprecated flag.
12668         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
12669         and report error.
12670         (read_cmdline_option): Report warning for a deprecated option.
12671         * opts.h (struct cl_option): Add new field cl_deprecated.
12672         (CL_ERR_DEPRECATED): New.
12674 2018-06-12  Martin Liska  <mliska@suse.cz>
12676         * doc/options.texi: Document Deprecated option flag.
12678 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12680         * config/arc/arc-arch.h (arc_extras): New enum.
12681         (arc_cpu_t):Add field extra.
12682         (arc_cpu_types): Consider the extras.
12683         * config/arc/arc-cpus.def: Add extras info.
12684         * config/arc/arc-opts.h (processor_type): Consider extra field.
12685         * config/arc/arc.c (arc_override_options): Handle extra field.
12687 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12689         * config/arc/arc-arch.h: Update ARC_OPTX macro.
12690         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
12691         field.
12692         * config/arc/arc.c (arc_init): Update pic warning.
12693         (irq_range): Update irq range parsing warnings.
12694         (arc_override_options): Update various warning messages.
12695         (arc_handle_aux_attribute): Likewise.
12697 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
12699         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
12701 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12703         * doc/sourcebuild.texi: Document usage of line number 0 in verify
12704         compiler messages directives.
12706 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
12708         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
12709         * config/mips/mips-tables.opt: Regenerate.
12710         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
12711         mips64r6.
12712         * doc/invoke.texi: Document -march=i6500.
12714 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
12716         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
12717         (i6400_gpmul): Add cpu_unit.
12718         (i6400_gpdiv): Likewise.
12719         (i6400_msa_add_d): Update reservations.
12720         (i6400_msa_int_add) Likewise.
12721         (i6400_msa_short_logic3) Likewise.
12722         (i6400_msa_short_logic2) Likewise.
12723         (i6400_msa_short_logic) Likewise.
12724         (i6400_msa_move) Likewise.
12725         (i6400_msa_cmp) Likewise.
12726         (i6400_msa_short_float2) Likewise.
12727         (i6400_msa_div_d) Likewise.
12728         (i6400_msa_long_logic1) Likewise.
12729         (i6400_msa_long_logic2) Likewise.
12730         (i6400_msa_mult) Likewise.
12731         (i6400_msa_long_float2) Likewise.
12732         (i6400_msa_long_float4) Likewise.
12733         (i6400_msa_long_float5) Likewise.
12734         (i6400_msa_long_float8) Likewise.
12735         (i6400_fpu_fadd): Include frint type.
12736         (i6400_fpu_store): New define_insn_reservation.
12737         (i6400_fpu_load): Likewise.
12738         (i6400_fpu_move): Likewise.
12739         (i6400_fpu_fcmp): Likewise.
12740         (i6400_fpu_fmadd): Likewise.
12741         (i6400_int_mult): Include imul3nc type and update reservation.
12742         (i6400_int_div): Include idiv3 type and update reservation.
12743         (i6400_int_load): Update to check type not move_type.
12744         (i6400_int_store): Likewise.
12745         (i6400_int_prefetch): Set zero latency.
12747 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
12749         * gcc.c: Document new %@{...} sequence.
12750         (LINK_COMMAND_SPEC): Use it for the -L switches.
12751         (cpp_unique_options): Use it for the -I switches.
12752         (at_file_argbuf): New global variable.
12753         (in_at_file): Likewise.
12754         (alloc_args): Create at_file_argbuf.
12755         (clear_args): Truncate at_file_argbuf.
12756         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
12757         (open_at_file): New function.
12758         (close_at_file): Likewise.
12759         (create_at_file): Delete.
12760         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
12761         <'o'>: Likewise.
12762         <'@'>: New case.
12763         (validate_switches_from_spec): Deal with %@{...} sequence.
12764         (validate_switches): Likewise.
12765         (driver::finalize): Call clear_args.
12767 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
12769         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
12771 2018-06-11  Martin Sebor  <msebor@redhat.com>
12773         * doc/invoke.texi (-Wall): List -Wc++17-compat.
12774         (Wno-class-memaccess): Add @opindex.
12775         (Wno-templates, Wno-multiple-inheritance): Same.
12776         (Wno-virtual-inheritance, Wno-namespaces): Same.
12777         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
12778         (Wno-format-overflow, Wno-format-truncation): Same.
12779         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
12780         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
12781         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
12782         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
12783         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
12784         (Wno-misspelled-isr): Same.
12786 2018-06-11  Martin Sebor  <msebor@redhat.com>
12788         * PR tree-optimization/86083
12789         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
12791 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
12793         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
12795 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
12797         PR target/85755
12798         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
12799         on the correct operand.
12800         (*movdi_internal64): Ditto.
12802 2018-06-11  Martin Liska  <mliska@suse.cz>
12804         PR tree-optimization/86089
12805         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
12807 2018-06-11  Julia Koval  <julia.koval@intel.com>
12809         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
12810         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
12811         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
12813 2018-06-11  Olivier Hainque  <hainque@adacore.com>
12815         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
12816         for Ada with strict dwarf2.
12818 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
12820         PR target/85755
12821         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
12822         addresses.
12824 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
12826         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12828 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
12830         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12831         TARGET_ELF.
12833 2018-06-08  Martin Liska  <mliska@suse.cz>
12835         * tree-cfg.h (debug_function): Fix argument type to match
12836         implementation.
12838 2018-06-08  Martin Liska  <mliska@suse.cz>
12840         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12841         Remove usage of MPX-related (and removed) fields.
12842         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12844 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
12846         * cfg.c (debug): Use TDF_NONE rather than 0.
12847         * cfghooks.c (debug): Likewise.
12848         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12849         (struct dump_option_value_info): Convert to...
12850         (struct kv_pair): ...this template type.
12851         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12852         rather than 0.
12853         (optinfo_verbosity_options): Likewise.
12854         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12855         OPTGROUP_NONE.
12856         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12857         than int for "optgroup_flags" param.
12858         (dump_generic_expr_loc): Use dump_flags_t rather than int for
12859         "dump_kind" param.
12860         (dump_dec): Likewise.
12861         (dump_finish): Use TDF_NONE rather than 0.
12862         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12863         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
12864         than 0.  Update for change to option_ptr.
12865         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12866         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
12867         0.  Update for changes to optinfo_verbosity_options and
12868         optgroup_options.
12869         (opt_info_switch_p): Convert optgroup_flags from int to
12870         optgroup_flags_t.
12871         (dump_basic_block): Use dump_flags_t rather than int
12872         for "dump_kind" param.
12873         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12874         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12875         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12876         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12877         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12878         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12879         TDF_NONE): Convert from macros to...
12880         (enum dump_flag): ...this new enum.
12881         (dump_flags_t): Update to use enum.
12882         (operator|, operator&, operator~, operator|=, operator&=):
12883         Implement for dump_flags_t.
12884         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12885         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12886         Convert from macros to...
12887         (enum optgroup_flag): ...this new enum.
12888         (optgroup_flags_t): New typedef.
12889         (operator|, operator|=): Implement for optgroup_flags_t.
12890         (struct dump_file_info): Convert field "alt_flags" to
12891         dump_flags_t.  Convert field "optgroup_flags" to
12892         optgroup_flags_t.
12893         (dump_basic_block): Use dump_flags_t rather than int for param.
12894         (dump_generic_expr_loc): Likewise.
12895         (dump_dec): Likewise.
12896         (dump_register): Convert param "optgroup_flags" to
12897         optgroup_flags_t.
12898         (opt_info_enable_passes): Likewise.
12899         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12900         than 0.
12901         * gimple-pretty-print.c (debug): Likewise.
12902         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12903         (merged_store_group::apply_stores): Likewise.
12904         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12905         * gimple.c (verify_gimple_pp): Likewise.
12906         * graphite-poly.c (print_pbb_body): Likewise.
12907         * passes.c (pass_manager::register_one_dump_file): Convert
12908         local "optgroup_flags" to optgroup_flags_t.
12909         * print-tree.c (print_node): Use TDF_NONE rather than 0.
12910         (debug): Likewise.
12911         (debug_body): Likewise.
12912         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12913         to optgroup_flags_t.
12914         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12915         than 0.
12916         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12917         (convert_mult_to_fma): Likewise.
12918         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12919         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12920         * tree-vect-data-refs.c (dump_lower_bound): Convert param
12921         "dump_kind" to dump_flags_t.
12923 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12925         * config/rs6000/rs6000.c (min, max): Delete.
12927 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12929         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12930         -mabi=spe and -mabi=no-spe.
12932 2018-06-08  Martin Liska  <mliska@suse.cz>
12934         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12935         where we expect an existing summary.
12937 2018-06-08  Martin Liska  <mliska@suse.cz>
12939         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12940         * ipa-inline.h (estimate_edge_growth): Likewise.
12942 2018-06-08  Martin Liska  <mliska@suse.cz>
12944         * cgraph.c (function_version_hasher::hash): Use
12945         cgraph_node::get_uid ().
12946         (function_version_hasher::equal):
12947         * cgraph.h (cgraph_node::get_uid): New method.
12948         * ipa-inline.c (update_caller_keys): Use
12949         cgraph_node::get_uid ().
12950         (update_callee_keys): Likewise.
12951         * ipa-utils.c (searchc): Likewise.
12952         (ipa_reduced_postorder): Likewise.
12953         * lto-cgraph.c (input_node): Likewise.
12954         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12955         * symbol-summary.h (symtab_insertion): Likewise.
12956         (symtab_removal): Likewise.
12957         (symtab_duplication): Likewise.
12958         * tree-pretty-print.c (dump_function_header): Likewise.
12959         * tree-sra.c (convert_callers_for_node): Likewise.
12961 2018-06-08  Martin Liska  <mliska@suse.cz>
12963         * cgraph.c (symbol_table::create_edge): Always assign a new
12964         unique number.
12965         (symbol_table::free_edge): Do not recycle numbers.
12966         * cgraph.h (cgraph_edge::get): New method.
12967         * symbol-summary.h (symtab_removal): Use it.
12968         (symtab_duplication): Likewise.
12969         (call_summary::hashable_uid): Remove.
12971 2018-06-08  Martin Liska  <mliska@suse.cz>
12973         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12974         (initialize_growth_caches): Remove.
12975         (free_growth_caches): Likewise.
12976         (do_estimate_edge_time): Use edge_growth_cache.
12977         (do_estimate_edge_size): Likewise.
12978         (do_estimate_edge_hints): Likewise.
12979         * ipa-inline.c (reset_edge_caches): Likewise.
12980         (recursive_inlining): Likewise.
12981         (inline_small_functions): Likewise.
12982         * ipa-inline.h (initialize_growth_caches): Remove.
12983         (estimate_edge_size): Likewise.
12984         (estimate_edge_time): Likewise.
12985         (estimate_edge_hints): Likewise.
12986         (reset_edge_growth_cache): Likewise.
12987         * symbol-summary.h (call_summary::remove): New method.
12989 2018-06-08  Martin Liska  <mliska@suse.cz>
12991         * ipa-cp.c (class edge_clone_summary): New summary.
12992         (grow_edge_clone_vectors): Remove.
12993         (ipcp_edge_duplication_hook): Remove.
12994         (class edge_clone_summary_t): New call_summary class.
12995         (ipcp_edge_removal_hook): Remove.
12996         (edge_clone_summary_t::duplicate): New function.
12997         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12998         (create_specialized_node): Likewise.
12999         (ipcp_driver): Initialize edge_clone_summaries and do not
13000         register hooks.
13002 2018-06-08  Martin Liska  <mliska@suse.cz>
13004         * symbol-summary.h (get): New function.
13005         (call_summary::m_initialize_when_cloning): New class member.
13007 2018-06-08  Martin Liska  <mliska@suse.cz>
13009         * cgraph.c (cgraph_node::remove): Do not recycle uid.
13010         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13011         (symbol_table::allocate_cgraph_symbol): Do not set uid.
13012         * passes.c (uid_hash_t): Record removed_nodes by their uids.
13013         (remove_cgraph_node_from_order): Use the removed_nodes set.
13014         (do_per_function_toporder): Likwise.
13015         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13016         instead of summary_uid.
13017         (symtab_removal): Likewise.
13018         (symtab_duplication): Likewise.
13020 2018-06-08  Martin Liska  <mliska@suse.cz>
13022         * ipa-cp.c (ipcp_store_bits_results): Use
13023         ipcp_transformation_sum.
13024         (ipcp_store_vr_results): Likewise.
13025         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13026         to ...
13027         (ipcp_transformation_initialize): ... this.
13028         (ipa_set_node_agg_value_chain):
13029         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13030         (write_ipcp_transformation_info): Likewise.
13031         (read_ipcp_transformation_info): Likewise.
13032         (ipcp_update_bits): Likewise.
13033         (ipcp_update_vr): Likewise.
13034         (ipcp_transform_function): Likewise.
13035         * ipa-prop.h: Rename ipcp_transformation_summary to
13036         ipcp_transformation.
13037         (class ipcp_transformation_t): New function summary.
13038         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13039         (ipa_get_agg_replacements_for_node): Likewise.
13041 2018-06-08  Martin Liska  <mliska@suse.cz>
13043         * ipa-pure-const.c (struct funct_state_d): Do it class instead
13044         of struct.
13045         (class funct_state_summary_t): New function_summary class.
13046         (has_function_state): Remove.
13047         (get_function_state): Likewise.
13048         (set_function_state): Likewise.
13049         (add_new_function): Likewise.
13050         (funct_state_summary_t::insert): New function.
13051         (duplicate_node_data): Remove.
13052         (remove_node_data): Remove.
13053         (funct_state_summary_t::duplicate): New function.
13054         (register_hooks): Create new funct_state_summaries.
13055         (pure_const_generate_summary): Use it.
13056         (pure_const_write_summary): Likewise.
13057         (pure_const_read_summary): Likewise.
13058         (propagate_pure_const): Likewise.
13059         (propagate_nothrow): Likewise.
13060         (dump_malloc_lattice): Likewise.
13061         (propagate_malloc): Likewise.
13062         (execute): Do not register hooks, just remove summary
13063         instead.
13064         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13065         constructor.
13067 2018-06-08  Martin Liska  <mliska@suse.cz>
13069         * ipa-reference.c (remove_node_data): Remove.
13070         (duplicate_node_data): Likewise.
13071         (class ipa_ref_var_info_summary_t): New class.
13072         (class ipa_ref_opt_summary_t): Likewise.
13073         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13074         (get_reference_optimization_summary): Use
13075         ipa_ref_opt_sum_summaries.
13076         (set_reference_vars_info): Remove.
13077         (set_reference_optimization_summary): Likewise.
13078         (ipa_init): Create summaries.
13079         (init_function_info): Use function summary.
13080         (ipa_ref_opt_summary_t::duplicate): New function.
13081         (ipa_ref_opt_summary_t::remove): New function.
13082         (get_read_write_all_from_node): Fix GNU coding style.
13083         (propagate): Use function summary.
13084         (write_node_summary_p): Fix GNU coding style.
13085         (stream_out_bitmap): Likewise.
13086         (ipa_reference_read_optimization_summary): Use function summary.
13087         (ipa_reference_c_finalize): Do not release hooks.
13089 2018-06-08  Martin Liska  <mliska@suse.cz>
13091         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13092         (analyze_function_body): Extract multiple calls of get_create.
13093         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13094         * ipa-inline.c (recursive_inlining): Use ::get method.
13095         * ipa-inline.h (estimate_edge_growth): Likewise.
13097 2018-06-08  Martin Liska  <mliska@suse.cz>
13099         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13100         HSA_INVALID.
13101         (hsa_function_summary::hsa_function_summary): Use the new enum
13102         value.
13103         (hsa_gpu_implementation_p): Use hsa_summaries::get.
13104         * hsa-gen.c (hsa_get_host_function): Likewise.
13105         (get_brig_function_name): Likewise.
13106         * ipa-hsa.c (process_hsa_functions): Likewise.
13107         (ipa_hsa_write_summary): Likewise.
13108         * symbol-summary.h (symtab_duplication): Use ::get function/
13109         (get): New function.
13111 2018-06-08  Martin Liska  <mliska@suse.cz>
13113         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13114         of get.
13115         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13116         (hsa_register_kernel): Likewise.
13117         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13118         * hsa-gen.c (hsa_get_host_function): Likewise.
13119         (get_brig_function_name): Likewise.
13120         (generate_hsa): Likewise.
13121         (pass_gen_hsail::execute): Likewise.
13122         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13123         (devirtualization_time_bonus): Likewise.
13124         (ipcp_propagate_stage): Likewise.
13125         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13126         (edge_set_predicate): Likewise.
13127         (evaluate_conditions_for_known_args): Likewise.
13128         (evaluate_properties_for_edge): Likewise.
13129         (ipa_fn_summary::reset): Likewise.
13130         (ipa_fn_summary_t::duplicate): Likewise.
13131         (dump_ipa_call_summary): Likewise.
13132         (ipa_dump_fn_summary): Likewise.
13133         (analyze_function_body): Likewise.
13134         (compute_fn_summary): Likewise.
13135         (estimate_edge_devirt_benefit): Likewise.
13136         (estimate_edge_size_and_time): Likewise.
13137         (estimate_calls_size_and_time): Likewise.
13138         (estimate_node_size_and_time): Likewise.
13139         (inline_update_callee_summaries): Likewise.
13140         (remap_edge_change_prob): Likewise.
13141         (remap_edge_summaries): Likewise.
13142         (ipa_merge_fn_summary_after_inlining): Likewise.
13143         (ipa_update_overall_fn_summary): Likewise.
13144         (read_ipa_call_summary): Likewise.
13145         (inline_read_section): Likewise.
13146         (write_ipa_call_summary): Likewise.
13147         (ipa_fn_summary_write): Likewise.
13148         (ipa_free_fn_summary): Likewise.
13149         * ipa-hsa.c (process_hsa_functions): Likewise.
13150         (ipa_hsa_write_summary): Likewise.
13151         (ipa_hsa_read_section): Likewise.
13152         * ipa-icf.c (sem_function::merge): Likewise.
13153         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13154         (do_estimate_edge_time): Likewise.
13155         (estimate_size_after_inlining): Likewise.
13156         (estimate_growth): Likewise.
13157         (growth_likely_positive): Likewise.
13158         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13159         (inline_call): Likewise.
13160         * ipa-inline.c (caller_growth_limits): Likewise.
13161         (can_inline_edge_p): Likewise.
13162         (can_inline_edge_by_limits_p): Likewise.
13163         (compute_uninlined_call_time): Likewise.
13164         (compute_inlined_call_time): Likewise.
13165         (want_inline_small_function_p): Likewise.
13166         (edge_badness): Likewise.
13167         (update_caller_keys): Likewise.
13168         (update_callee_keys): Likewise.
13169         (recursive_inlining): Likewise.
13170         (inline_small_functions): Likewise.
13171         (inline_to_all_callers_1): Likewise.
13172         (dump_overall_stats): Likewise.
13173         (early_inline_small_functions): Likewise.
13174         (early_inliner): Likewise.
13175         * ipa-inline.h (estimate_edge_growth): Likewise.
13176         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13177         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13178         * ipa-prop.h (IPA_NODE_REF): Likewise.
13179         (IPA_EDGE_REF): Likewise.
13180         * ipa-pure-const.c (malloc_candidate_p): Likewise.
13181         (propagate_malloc): Likewise.
13182         * ipa-split.c (execute_split_functions): Likewise.
13183         * symbol-summary.h: Rename get to get_create.
13184         (get): Likewise.
13185         (get_create): Likewise.
13186         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13188 2018-06-08  Martin Liska  <mliska@suse.cz>
13190         * symbol-summary.h (release): Move definition out of class
13191         declaration.
13192         (symtab_removal): Likewise.
13193         (symtab_duplication): Likewise.
13195 2018-06-08  Martin Liska  <mliska@suse.cz>
13197         * symbol-summary.h (function_summary): Move constructor
13198         implementation out of class declaration.
13199         (release): Likewise.
13200         (symtab_insertion): Likewise.
13201         (symtab_removal): Likewise.
13202         (symtab_duplication): Likewise.
13203         (get): Likewise.
13205 2018-06-08  Martin Liska  <mliska@suse.cz>
13207         * Makefile.in: Remove support for MPX (macros, related functions,
13208         fields in cgraph_node, ...).
13209         * builtin-types.def (BT_BND): Likewise.
13210         (BT_FN_BND_CONST_PTR): Likewise.
13211         (BT_FN_CONST_PTR_BND): Likewise.
13212         (BT_FN_VOID_PTR_BND): Likewise.
13213         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13214         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13215         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13216         (expand_builtin_mempcpy_with_bounds): Likewise.
13217         (expand_builtin_memset_with_bounds): Likewise.
13218         (expand_builtin_memset_args): Likewise.
13219         (std_expand_builtin_va_start): Likewise.
13220         (expand_builtin): Likewise.
13221         (expand_builtin_with_bounds): Likewise.
13222         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13223         (DEF_LIB_BUILTIN_CHKP): Likewise.
13224         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13225         (DEF_CHKP_BUILTIN): Likewise.
13226         (BUILT_IN_MEMCPY): Likewise.
13227         (BUILT_IN_MEMMOVE): Likewise.
13228         (BUILT_IN_MEMPCPY): Likewise.
13229         (BUILT_IN_MEMSET): Likewise.
13230         (BUILT_IN_STPCPY): Likewise.
13231         (BUILT_IN_STRCAT): Likewise.
13232         (BUILT_IN_STRCHR): Likewise.
13233         (BUILT_IN_STRCPY): Likewise.
13234         (BUILT_IN_STRLEN): Likewise.
13235         (BUILT_IN_MEMCPY_CHK): Likewise.
13236         (BUILT_IN_MEMMOVE_CHK): Likewise.
13237         (BUILT_IN_MEMPCPY_CHK): Likewise.
13238         (BUILT_IN_MEMSET_CHK): Likewise.
13239         (BUILT_IN_STPCPY_CHK): Likewise.
13240         (BUILT_IN_STRCAT_CHK): Likewise.
13241         (BUILT_IN_STRCPY_CHK): Likewise.
13242         * calls.c (store_bounds): Likewise.
13243         (emit_call_1): Likewise.
13244         (special_function_p): Likewise.
13245         (maybe_warn_nonstring_arg): Likewise.
13246         (initialize_argument_information): Likewise.
13247         (finalize_must_preallocate): Likewise.
13248         (compute_argument_addresses): Likewise.
13249         (expand_call): Likewise.
13250         * cfgexpand.c (expand_call_stmt): Likewise.
13251         (expand_return): Likewise.
13252         (expand_gimple_stmt_1): Likewise.
13253         (pass_expand::execute): Likewise.
13254         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13255         (cgraph_node::remove): Likewise.
13256         (cgraph_node::dump): Likewise.
13257         (cgraph_node::verify_node): Likewise.
13258         * cgraph.h (chkp_function_instrumented_p): Likewise.
13259         (symtab_node::get_alias_target): Likewise.
13260         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13261         (cgraph_local_p): Likewise.
13262         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13263         (cgraph_edge::rebuild_references): Likewise.
13264         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13265         (walk_polymorphic_call_targets): Likewise.
13266         (cgraph_node::expand_thunk): Likewise.
13267         (symbol_table::output_weakrefs): Likewise.
13268         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13269         (ix86_handle_option): Likewise.
13270         * config/i386/constraints.md: Likewise.
13271         * config/i386/i386-builtin-types.def (BND): Likewise.
13272         (VOID): Likewise.
13273         (PVOID): Likewise.
13274         (ULONG): Likewise.
13275         * config/i386/i386-builtin.def (BDESC_END): Likewise.
13276         (BDESC_FIRST): Likewise.
13277         (BDESC): Likewise.
13278         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13279         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13280         * config/i386/i386.c (enum reg_class): Likewise.
13281         (ix86_target_string): Likewise.
13282         (ix86_option_override_internal): Likewise.
13283         (ix86_conditional_register_usage): Likewise.
13284         (ix86_valid_target_attribute_inner_p): Likewise.
13285         (ix86_set_indirect_branch_type): Likewise.
13286         (ix86_set_current_function): Likewise.
13287         (ix86_function_arg_regno_p): Likewise.
13288         (init_cumulative_args): Likewise.
13289         (ix86_function_arg_advance): Likewise.
13290         (ix86_function_arg): Likewise.
13291         (ix86_pass_by_reference): Likewise.
13292         (ix86_function_value_regno_p): Likewise.
13293         (ix86_function_value_1): Likewise.
13294         (ix86_function_value_bounds): Likewise.
13295         (ix86_return_in_memory): Likewise.
13296         (ix86_setup_incoming_vararg_bounds): Likewise.
13297         (ix86_va_start): Likewise.
13298         (indirect_thunk_need_prefix): Likewise.
13299         (print_reg): Likewise.
13300         (ix86_print_operand): Likewise.
13301         (ix86_expand_call): Likewise.
13302         (ix86_output_function_return): Likewise.
13303         (reg_encoded_number): Likewise.
13304         (BDESC_VERIFYS): Likewise.
13305         (ix86_init_mpx_builtins): Likewise.
13306         (ix86_init_builtins): Likewise.
13307         (ix86_emit_cmove): Likewise.
13308         (ix86_emit_move_max): Likewise.
13309         (ix86_expand_builtin): Likewise.
13310         (ix86_builtin_mpx_function): Likewise.
13311         (ix86_get_arg_address_for_bt): Likewise.
13312         (ix86_load_bounds): Likewise.
13313         (ix86_store_bounds): Likewise.
13314         (ix86_load_returned_bounds): Likewise.
13315         (ix86_store_returned_bounds): Likewise.
13316         (ix86_class_likely_spilled_p): Likewise.
13317         (ix86_hard_regno_mode_ok): Likewise.
13318         (x86_order_regs_for_local_alloc): Likewise.
13319         (ix86_mitigate_rop): Likewise.
13320         (ix86_bnd_prefixed_insn_p): Likewise.
13321         (ix86_mpx_bound_mode): Likewise.
13322         (ix86_make_bounds_constant): Likewise.
13323         (ix86_initialize_bounds): Likewise.
13324         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13325         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13326         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13327         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13328         (TARGET_CHKP_BOUND_MODE): Likewise.
13329         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13330         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13331         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13332         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13333         * config/i386/i386.h (TARGET_MPX): Likewise.
13334         (TARGET_MPX_P): Likewise.
13335         (VALID_BND_REG_MODE): Likewise.
13336         (FIRST_BND_REG): Likewise.
13337         (LAST_BND_REG): Likewise.
13338         (enum reg_class): Likewise.
13339         (BND_REG_P): Likewise.
13340         (BND_REGNO_P): Likewise.
13341         (BNDmode): Likewise.
13342         (ADJUST_INSN_LENGTH): Likewise.
13343         * config/i386/i386.md: Likewise.
13344         * config/i386/i386.opt: Likewise.
13345         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13346         (defined): Likewise.
13347         (LINK_MPX): Likewise.
13348         (MPX_SPEC): Likewise.
13349         (LIBMPX_SPEC): Likewise.
13350         (LIBMPXWRAPPERS_SPEC): Likewise.
13351         (CHKP_SPEC): Likewise.
13352         * config/i386/predicates.md: Likewise.
13353         * dbxout.c (dbxout_type): Likewise.
13354         * doc/extend.texi: Likewise.
13355         * doc/invoke.texi: Likewise.
13356         * doc/md.texi: Likewise.
13357         * doc/tm.texi: Likewise.
13358         * doc/tm.texi.in: Likewise.
13359         * dwarf2out.c (is_base_type): Likewise.
13360         (gen_formal_types_die): Likewise.
13361         (gen_subprogram_die): Likewise.
13362         (gen_type_die_with_usage): Likewise.
13363         (gen_decl_die): Likewise.
13364         (dwarf2out_late_global_decl): Likewise.
13365         * expr.c (expand_assignment): Likewise.
13366         (emit_storent_insn): Likewise.
13367         (store_expr_with_bounds): Likewise.
13368         (store_expr): Likewise.
13369         (expand_expr_real_1): Likewise.
13370         * expr.h (store_expr_with_bounds): Likewise.
13371         * function.c (use_register_for_decl): Likewise.
13372         (struct bounds_parm_data): Likewise.
13373         (assign_parms_augmented_arg_list): Likewise.
13374         (assign_parm_find_entry_rtl): Likewise.
13375         (assign_parm_is_stack_parm): Likewise.
13376         (assign_parm_load_bounds): Likewise.
13377         (assign_bounds): Likewise.
13378         (assign_parms): Likewise.
13379         (expand_function_start): Likewise.
13380         * gcc.c (CHKP_SPEC): Likewise.
13381         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13382         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13383         (wrestrict_dom_walker::check_call): Likewise.
13384         * gimple.c (gimple_build_call_from_tree): Likewise.
13385         * gimple.h (enum gf_mask): Likewise.
13386         (gimple_call_with_bounds_p): Likewise.
13387         (gimple_call_set_with_bounds): Likewise.
13388         * gimplify.c (gimplify_init_constructor): Likewise.
13389         * ipa-cp.c (initialize_node_lattices): Likewise.
13390         (propagate_constants_across_call): Likewise.
13391         (find_more_scalar_values_for_callers_subset): Likewise.
13392         * ipa-hsa.c (process_hsa_functions): Likewise.
13393         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
13394         * ipa-icf.c (sem_function::merge): Likewise.
13395         * ipa-inline.c (early_inliner): Likewise.
13396         * ipa-pure-const.c (warn_function_noreturn): Likewise.
13397         (warn_function_cold): Likewise.
13398         (propagate_pure_const): Likewise.
13399         * ipa-ref.h (enum GTY): Likewise.
13400         * ipa-split.c (find_retbnd): Likewise.
13401         (consider_split): Likewise.
13402         (split_function): Likewise.
13403         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
13404         * ipa.c (walk_polymorphic_call_targets): Likewise.
13405         (symbol_table::remove_unreachable_nodes): Likewise.
13406         (process_references): Likewise.
13407         (cgraph_build_static_cdtor_1): Likewise.
13408         * lto-cgraph.c (lto_output_node): Likewise.
13409         (output_refs): Likewise.
13410         (compute_ltrans_boundary): Likewise.
13411         (input_overwrite_node): Likewise.
13412         (input_node): Likewise.
13413         (input_cgraph_1): Likewise.
13414         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
13415         * passes.c (pass_manager::execute_early_local_passes): Likewise.
13416         (class pass_chkp_instrumentation_passes): Likewise.
13417         (make_pass_chkp_instrumentation_passes): Likewise.
13418         * passes.def: Likewise.
13419         * rtl.h (struct GTY): Likewise.
13420         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
13421         * stor-layout.c (layout_type): Likewise.
13422         * symtab.c: Likewise.
13423         * target.def: Likewise.
13424         * targhooks.c (default_chkp_bound_type): Likewise.
13425         (default_chkp_bound_mode): Likewise.
13426         (default_builtin_chkp_function): Likewise.
13427         (default_chkp_function_value_bounds): Likewise.
13428         (default_chkp_make_bounds_constant): Likewise.
13429         (default_chkp_initialize_bounds): Likewise.
13430         * targhooks.h (default_chkp_bound_type): Likewise.
13431         (default_chkp_bound_mode): Likewise.
13432         (default_builtin_chkp_function): Likewise.
13433         (default_chkp_function_value_bounds): Likewise.
13434         (default_chkp_make_bounds_constant): Likewise.
13435         (default_chkp_initialize_bounds): Likewise.
13436         * toplev.c (compile_file): Likewise.
13437         (process_options): Likewise.
13438         * tree-core.h (DEF_BUILTIN): Likewise.
13439         (DEF_BUILTIN_CHKP): Likewise.
13440         * tree-inline.c (declare_return_variable): Likewise.
13441         (remap_gimple_stmt): Likewise.
13442         (copy_bb): Likewise.
13443         (initialize_inlined_parameters): Likewise.
13444         (expand_call_inline): Likewise.
13445         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
13446         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
13447         (make_pass_ipa_chkp_produce_thunks): Likewise.
13448         (make_pass_chkp): Likewise.
13449         (make_pass_chkp_opt): Likewise.
13450         (make_pass_chkp_instrumentation_passes): Likewise.
13451         * tree-pretty-print.c (dump_generic_node): Likewise.
13452         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
13453         * tree-ssa-dce.c (propagate_necessity): Likewise.
13454         (eliminate_unnecessary_stmts): Likewise.
13455         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
13456         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
13457         * tree-ssa-sccvn.h: Likewise.
13458         * tree-ssa-strlen.c (get_string_length): Likewise.
13459         (valid_builtin_call): Likewise.
13460         (adjust_last_stmt): Likewise.
13461         (handle_builtin_strchr): Likewise.
13462         (handle_builtin_strcpy): Likewise.
13463         (handle_builtin_stxncpy): Likewise.
13464         (handle_builtin_memcpy): Likewise.
13465         (handle_builtin_strcat): Likewise.
13466         (strlen_check_and_optimize_stmt): Likewise.
13467         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
13468         * tree-streamer-in.c: Likewise.
13469         * tree-streamer.c (record_common_node): Likewise.
13470         * tree.c (tree_code_size): Likewise.
13471         (wide_int_to_tree_1): Likewise.
13472         (type_contains_placeholder_1): Likewise.
13473         (build_common_tree_nodes): Likewise.
13474         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
13475         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
13476         (POINTER_BOUNDS_P): Likewise.
13477         (BOUNDED_TYPE_P): Likewise.
13478         (BOUNDED_P): Likewise.
13479         (CALL_WITH_BOUNDS_P): Likewise.
13480         (pointer_bounds_type_node): Likewise.
13481         * value-prof.c (gimple_ic): Likewise.
13482         * var-tracking.c (vt_add_function_parameters): Likewise.
13483         * varasm.c (make_decl_rtl): Likewise.
13484         (assemble_start_function): Likewise.
13485         (output_constant): Likewise.
13486         (maybe_assemble_visibility): Likewise.
13487         * varpool.c (ctor_for_folding): Likewise.
13488         * chkp-builtins.def: Remove.
13489         * ipa-chkp.c: Remove.
13490         * ipa-chkp.h: Remove.
13491         * rtl-chkp.c: Remove.
13492         * rtl-chkp.h: Remove.
13493         * tree-chkp-opt.c: Remove.
13494         * tree-chkp.c: Remove.
13495         * tree-chkp.h: Remove.
13497 2018-06-07  Carl Love  <cel@us.ibm.com>
13499         * config/rs6000/vsx.md (vextract_fp_from_shorth,
13500         vextract_fp_from_shortl): Add BE support.
13502 2018-06-07  Paul Koning  <ni1d@arrl.net>
13504         * compare-elim.c (try_merge_compare): Don't merge compare if
13505         address contains a side effect.
13506         (try_eliminate_compare): Likewise.
13508 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
13510         * config.gcc: Support "tremont".
13511         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
13512         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13513         PROCESSOR_TREMONT.
13514         * config/i386/i386.c (m_TREMONT): Define.
13515         (processor_target_table): Add "tremont".
13516         (PTA_TREMONT): Define.
13517         (ix86_lea_outperforms): Add TARGET_TREMONT.
13518         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
13519         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
13520         and M_INTEL_GOLDMONT_PLUS.
13521         (fold_builtin_cpu): Add "tremont".
13522         (ix86_add_stmt_cost): Add TARGET_TREMONT.
13523         (ix86_option_override_internal): Add "tremont".
13524         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
13525         (processor_type): Add PROCESSOR_TREMONT.
13526         * config/i386/x86-tune.def: Add m_TREMONT.
13527         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
13529 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13531         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
13532         symbol defined for msp430i* devices to be lower case.
13534 2018-06-07  Richard Biener  <rguenther@suse.de>
13536         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
13537         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
13538         Properly wrap signed arithmetic if overflow wraps.
13540 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
13542         PR tree-optimization/69615
13543         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
13544         of a cast from a same precision integral SSA_NAME in a bb dominated
13545         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
13546         cast to utype if rhs2 has already a compatible type.
13548 2018-06-07  Richard Biener  <rguenther@suse.de>
13550         PR tree-optimization/85935
13551         * graphite-scop-detection.c (find_params_in_bb): Analyze
13552         condition operands with respect to the correct loop.  Assert
13553         the analysis doesn't fail.
13555 2018-06-04  Carl Love  <cel@us.ibm.com>
13557         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
13558         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
13559         as it is slightly cheaper.
13560         (first_match_or_eos_index_<mode>):
13561         Calculate index using natural element order.
13562         (first_match_index_<mode>):
13563         Calculate index using natural element order.
13564         (first_match_or_eos_index_<mode>):
13565         Calculate index using natural order.
13566         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
13567         for BE and LE modes.
13568         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
13569         P9V_BUILTIN_VCLZLSBB_V16QI.
13570         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
13571         specific.
13573 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13575         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
13576         indentation and line wrap for many prototypes.  Add missing
13577         @smallexample directives around block of prototypes for vec_xl and
13578         vec_xst.
13580 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
13582         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
13583         track if we pass or return IEEE 128-bit floating point.
13584         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
13585         C++ mangling that is compatible with GCC 8.1.
13586         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
13587         (init_cumulative_args): Note if we pass or return IEEE 128-bit
13588         floating point types.
13589         (rs6000_function_arg_advance_1): Likewise.
13590         (rs6000_mangle_type): Optionally generate mangled names that match
13591         what GCC 8.1 generated for IEEE 128-bit floating point types.
13592         (rs6000_globalize_decl_name): If we have an external function that
13593         passes or returns IEEE 128-bit types, generate a weak reference
13594         from the mangled name used in GCC 8.1 to the current mangled
13595         name.
13596         (rs6000_init_builtins): Make __ibm128 use the long double type if
13597         long double is IBM extended double.  Make __float128 use the long
13598         double type if long double is IEEE 128-bit.
13600         PR target/85657
13601         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
13602         macro for __ibm128 built-in functions.
13603         (PACK_IF): Add __ibm128 pack/unpack functions.
13604         (UNPACK_IF): Likewise.
13605         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
13606         enable long double built-in functions if long double is IEEE
13607         128-bit floating point.
13608         (rs6000_invalid_builtin): Update long double built-in function
13609         error message.
13610         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
13611         functions, adjust the built-in function to use the long double
13612         built-in function if __ibm128 and long double are the same type.
13613         * doc/extend.texi (PowerPC builtins): Update documention for
13614         __builtin_{,un}pack_longdouble.  Add documentation for
13615         __builtin_{,un}pack_ibm128.
13617 2018-06-06  Jim Wilson  <jimw@sifive.com>
13619         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
13620         (struct machine_function): New field interrupt_mode.
13621         (riscv_handle_type_attribute): New function.  Add forward declaration.
13622         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
13623         (riscv_expand_epilogue): Check interrupt_mode field.
13624         (riscv_set_current_function): Check interrupt attribute args and
13625         set interrupt_mode field.
13626         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
13627         (riscv_sret, riscv_uret): New.
13628         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
13629         new arguments to interrupt attribute.
13631 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
13633         PR target/63177
13634         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
13635         Don't handle -mcpu=power8 if -mpower9-vector is also used.
13637 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13639         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
13640         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
13641         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13642         several redundant entries.
13644 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
13646         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
13647         type from "rtx" to "rtx_insn *".
13648         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
13649         for local "call_insn", removing cast.
13650         (ix86_expand_call): Likewise, introducing a "call_insn" local.
13652 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13654         PR tree-optimization/86066
13655         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
13656         for BIT_INSERT_EXPR stores.
13658 2018-06-06  Richard Biener  <rguenther@suse.de>
13660         PR tree-optimization/86062
13661         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13662         component refs ontop
13663         of to be offsetted base.
13665 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13667         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
13668         to be static and remove check on interrupt attribute name.
13670 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13672         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13673         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
13675 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
13677         PR target/79924
13678         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
13679         second argument.
13680         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
13681         Remove second argument, change how error is called.
13682         (aarch64_layout_arg): Remove second argument from
13683         aarch64_err_no_fpadvsimd call.
13684         (aarch64_init_cumulative_args): Ditto.
13685         (aarch64_gimplify_va_arg_expr): Ditto.
13686         * config/aarch64/aarch64.md (mov<mode>): Ditto.
13688 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
13690         * config/i386/i386.md (simple_return_indirect_internal): New expander.
13691         (*simple_return_indirect_internal<mode>): Rename from
13692         simple_return_indirect_internal.  Use W mode iterator.
13693         (rstorssp): New expander.
13694         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
13695         (clrssbsy): New expander.
13696         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
13698 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13700         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
13701         __typeof__.
13702         (cmse_check_pointed_object): Likewise.
13704 2018-06-05  Martin Liska  <mliska@suse.cz>
13706         PR gcov-profile/47618
13707         * doc/invoke.texi: Document how -fprofile-dir format
13708         is extended.
13710 2018-06-05  Richard Biener  <rguenther@suse.de>
13712         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
13713         removal pretend DOM info isn't available so we do not update
13714         it and only remove edges, not dominated blocks.  Actually free
13715         DOM info in case we removed something.  Remove unreachable blocks.
13716         (mfb_keep_latches): Work with either DOM info or marked backedges.
13717         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
13718         first.  Mark backedges if DOM info isn't available.
13719         (Re-)compute DOM info after cleanup_control_flow_pre.
13721 2018-06-05  Richard Biener  <rguenther@suse.de>
13723         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
13724         (locus_discrim_hasher::hash): Adjust.
13725         (locus_discrim_hasher::equal): Likewise.
13726         (next_discriminator_for_locus): Work on line directly.
13727         (same_line_p): Pass in expanded locus1 as well.
13728         (assign_discriminators): Avoid redundant location expansions.
13730 2018-06-05  Richard Biener  <rguenther@suse.de>
13732         PR tree-optimization/86046
13733         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
13734         if required after clearing TREE_ADDRESSABLE.
13736 2018-06-05  Richard Biener  <rguenther@suse.de>
13738         PR tree-optimization/86047
13739         * tree-ssa-loop.c (for_each_index): Glob handling of all
13740         decls and constants and really handle all of them.
13742 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13744         PR target/81497
13745         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
13746         qualifier_void_pointer and qualifier_const_void_pointer.
13747         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
13748         (arm_init_builtins): Handle the above.
13749         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
13750         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
13751         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
13752         void intrinsics.
13754 2018-06-05  Martin Liska  <mliska@suse.cz>
13756         * auto-profile.c (read_autofdo_file): Do not use
13757         gcov_ctr_summary struct.
13758         (afdo_callsite_hot_enough_for_early_inline): Likewise.
13759         * coverage.c (struct counts_entry): Likewise.
13760         (read_counts_file): Read just single summary entry.
13761         (get_coverage_counts): Use gcov_summary struct.
13762         * coverage.h (get_coverage_counts): Likewise.
13763         * gcov-dump.c (dump_working_sets): Likewise.
13764         (tag_summary): Dump just single summary.
13765         * gcov-io.c (gcov_write_summary): Write just histogram
13766         summary.
13767         (gcov_read_summary): Read just single summary.
13768         (compute_working_sets): Use gcov_summary struct.
13769         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
13770         of GCOV_COUNTERS_SUMMABLE.
13771         (GCOV_COUNTERS_SUMMABLE): Remove.
13772         (GCOV_FIRST_VALUE_COUNTER): Replace with
13773         GCOV_COUNTER_V_INTERVAL.
13774         (struct gcov_ctr_summary): Remove.
13775         (struct gcov_summary): Directly use fields of former
13776         gcov_ctr_summary.
13777         (compute_working_sets): Use gcov_summary struct.
13778         * gcov.c (read_count_file): Do not use ctrs fields.
13779         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
13780         struct.
13781         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
13782         struct.
13783         * profile.c: Likewise.
13784         * profile.h: Likewise.
13786 2018-06-05  Martin Liska  <mliska@suse.cz>
13788         PR gcov-profile/84846
13789         * gcov.c (output_lines): Print working directory only
13790         in intermediate format.
13792 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
13794         * config/s390/s390-builtin-types.def: Add void function type.
13795         * config/s390/s390-builtins.def: Use the function type for the
13796         tbeginc builtin.
13798 2018-06-04  Jim Wilson  <jimw@sifive.com>
13800         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
13801         to int.
13802         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
13803         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
13804         handle EH_RETURN_DATA_REGNO registers properly.
13805         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
13806         (riscv_expand_epilogue): Update comment.  Change argument name and
13807         type.  Update code to use new name and type.  Pass new args to
13808         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
13809         EXCEPTION_RETURN.
13810         * config/riscv/riscv.md (NORMAL_RETURN): New.
13811         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
13812         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
13813         (eh_return): Call gen_eh_return_internal and emit barrier.
13814         (eh_return_internal): Call riscv_expand_epilogue.
13816 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
13818         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
13819         bit_insertion field and declare can_be_merged_into method.
13820         (merged_store_group::can_be_merged_into): New method.
13821         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
13822         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
13823         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
13825 2018-06-04  Richard Biener  <rguenther@suse.de>
13827         PR tree-optimization/85955
13828         * builtins.c (fold_builtin_sincos): Convert pointers to
13829         destination to appropriate type before dereferencing.
13831 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
13833         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13835 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
13837         * expr.c (expand_expr_real_1): Force the operand into memory if
13838         its TYPE_MODE is BLKmode and if there is no integer mode for
13839         the number of bits being extracted.
13841 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13843         PR target/85832
13844         PR target/86036
13845         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13846         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13848 2018-06-04  Richard Biener  <rguenther@suse.de>
13850         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13851         (cleanup_tree_cfg_noloop): ... single caller.  Do
13852         start_recording_case_labels later.
13854 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
13856         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13857         to _IMMINTRIN_H_INCLUDED.
13858         * config/i386/pconfigintrin.h: Ditto.
13859         * config/i386/waitpkgintrin.h: Ditto.
13860         * config/i386/immintrin.h: Add includes for sgxintrin.h,
13861         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13862         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13863         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13864         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13865         waitpkgintrin.h and cldemoteintrin.h.
13867 2018-06-04  Richard Biener  <rguenther@suse.de>
13869         PR tree-optimization/86038
13870         * tracer.c (find_best_successor): Check probability for
13871         being initialized, bail out if not.
13873 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
13875         PR target/86003
13876         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13877         of bits to ignore when comparing architectures.
13879 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13881         PR tree-optimization/69615
13882         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13883         maximum or minimum of the type, try to merge it also as if
13884         range1 is + [-, x - 1] or + [x + 1, -].
13886         PR c++/86025
13887         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13889 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
13891         PR tree-optimization/86034
13892         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13893         the unsigned bitfield type in a bit insertion sequence if it does not
13894         have a larger precision than the bitfield size.
13895         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13897 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
13899         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13901 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13903         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13904         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13905         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13906         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13908 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13910         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13911         Disable -fdelete-null-pointer-checks for ELF toolchain.
13913 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13914             Kito Cheng  <kito.cheng@gmail.com>
13916         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13917         (nds32le-*-*, nds32be-*-*): Integrate checking process.
13918         (nds32*-*-*): Add glibc and uclibc conditions.
13919         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13920         (TARGET_EXCEPT_UNWIND_INFO): Define.
13921         * config/nds32/elf.h: New file.
13922         * config/nds32/linux.h: New file.
13923         * config/nds32/nds32-elf.opt: New file.
13924         * config/nds32/nds32-linux.opt: New file.
13925         * config/nds32/nds32-fp-as-gp.c
13926         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13927         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13928         TARGET_LINUX_ABI.
13929         (nds32_asm_file_end): Ditto.
13930         (nds32_print_operand): Ditto.
13931         (nds32_insert_attributes): Ditto.
13932         (nds32_init_libfuncs): New function.
13933         (TARGET_HAVE_TLS): Define.
13934         (TARGET_INIT_LIBFUNCS): Define.
13935         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13936         spec content.
13937         (TARGET_ELF): Apply different mcmodel setting.
13938         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13939         been migrated into elf.h and linux.h files.
13940         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13941         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13942         (mcmodel): The content has been migrated into nds32-elf.opt and
13943         nds32-linux.opt files.
13944         * config/nds32/t-elf: New file.
13945         * config/nds32/t-linux: New file.
13947 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13948             Shiva Chen  <shiva0217@gmail.com>
13950         * config/nds32/constants.md (unspec_volatile_element): Add
13951         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13952         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13953         optimization.
13954         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13955         (make_pass_nds32_fp_as_gp): Declare.
13956         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13957         optmization pass.
13958         (nds32_asm_function_end_prologue): Remove unused asm output.
13959         (nds32_asm_function_begin_epilogue): Remove unused asm output.
13960         (nds32_asm_file_start): Output necessary fp_as_gp information.
13961         (nds32_option_override): Adjust register usage.
13962         (nds32_expand_prologue): Consider fp_as_gp situation.
13963         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13964         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13965         (epilogue): Ditto.
13966         (return): Ditto.
13967         (simple_return): Ditto.
13968         (omit_fp_begin): Output special directive for fp_as_gp.
13969         (omit_fp_end): Output special directive for fp_as_gp.
13970         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13971         mforbid-fp-as-gp): New options.
13973 2018-06-01  Mark Wielaard  <mark@klomp.org>
13975         * dwarf2out.c (dwarf2out_finish): Remove generation of
13976         DW_AT_loclists_base.
13978 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
13980         * gimple-ssa-store-merging.c: Include gimple-fold.h.
13981         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13982         (struct merged_store_group): Add bit_insertion field.
13983         (dump_char_array): Use standard hexadecimal format.
13984         (merged_store_group::merged_store_group): Set bit_insertion to false.
13985         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
13986         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
13987         also print the mask in the dump file.
13988         (pass_store_merging::gate): Minor tweak.
13989         (imm_store_chain_info::coalesce_immediate): Fix wrong association
13990         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
13991         stores with INTEGER_CST stores.
13992         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13993         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13994         and use it throughout.  Generate bit insertion sequences if need be.
13995         (pass_store_merging::process_store): Remove redundant condition.
13996         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13998 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
14000         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14001         the 128-bit floating point types.  Fix function comment.
14003 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14005         * config/aarch64/aarch64-simd.md
14006         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14007         mnemonics.
14008         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14009         mnemonics.
14011 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14013         PR tree-optimization/85989
14014         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14015         variable.
14016         (backprop::intersect_uses): Check it when deciding whether this
14017         is a backedge reference.
14018         (backprop::process_block): Add each phi to m_visited_phis
14019         after visiting it, then clear it at the end.
14021 2018-06-01  Richard Biener  <rguenther@suse.de>
14023         * tree-vectorizer.h (vect_dr_stmt): New function.
14024         (vect_get_load_cost): Adjust.
14025         (vect_get_store_cost): Likewise.
14026         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14027         Use vect_dr_stmt instead of DR_SMTT.
14028         (vect_record_base_alignments): Likewise.
14029         (vect_calculate_target_alignment): Likewise.
14030         (vect_compute_data_ref_alignment): Likewise and make static.
14031         (vect_update_misalignment_for_peel): Likewise.
14032         (vect_verify_datarefs_alignment): Likewise.
14033         (vector_alignment_reachable_p): Likewise.
14034         (vect_get_data_access_cost): Likewise.  Pass down
14035         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14036         (vect_get_peeling_costs_all_drs): Likewise.
14037         (vect_peeling_hash_get_lowest_cost): Likewise.
14038         (vect_enhance_data_refs_alignment): Likewise.
14039         (vect_find_same_alignment_drs): Likewise.
14040         (vect_analyze_data_refs_alignment): Likewise.
14041         (vect_analyze_group_access_1): Likewise.
14042         (vect_analyze_group_access): Likewise.
14043         (vect_analyze_data_ref_access): Likewise.
14044         (vect_analyze_data_ref_accesses): Likewise.
14045         (vect_vfa_segment_size): Likewise.
14046         (vect_small_gap_p): Likewise.
14047         (vectorizable_with_step_bound_p): Likewise.
14048         (vect_prune_runtime_alias_test_list): Likewise.
14049         (vect_analyze_data_refs): Likewise.
14050         (vect_supportable_dr_alignment): Likewise.
14051         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14052         (vect_gen_prolog_loop_niters): Likewise.
14053         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14054         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14055         modify DR_STMT.
14056         (vect_recog_mask_conversion_pattern): Likewise.
14057         (vect_try_gather_scatter_pattern): Likewise.
14058         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14059         to vect_get_store_cost.
14060         (vect_get_store_cost): Get stmt_info instead of DR.
14061         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14062         (vect_get_load_cost): Get stmt_info instead of DR.
14064 2018-06-01  Richard Biener  <rguenther@suse.de>
14066         PR middle-end/86017
14067         * gimple-fold.c (var_decl_component_p): Also allow offsetted
14068         vars wrapped in MEM_REFs.
14070 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14072         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14073         Fix subreg tests so that we only return a choice between
14074         GENERAL_REGS and FP_REGS if the original classes included both.
14076 2018-06-01  Richard Biener  <rguenther@suse.de>
14078         PR ipa/85960
14079         * tree-ssa-structalias.c (get_function_part_constraint):
14080         Handle NULL fi->decl.
14081         (find_func_aliases_for_call): Properly handle indirect
14082         fi from direct call.
14083         (find_func_clobbers): Likewise.
14084         (ipa_pta_execute): Likewise.
14085         (create_variable_info_for): For functions that are ifunc_resolver
14086         resolve to a varinfo that contains the result of the resolver call.
14087         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14088         aliases.
14090 2018-05-31  Michael Collison  <michael.collison@arm.com>
14092         * config/aarch64/aarch64.md:
14093         (*fix_to_zero_extenddfdi2): New pattern.
14094         * gcc.target/aarch64/fix_extend1.c: New testcase.
14096 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
14098         PR middle-end/78809
14099         PR middle-end/83026
14100         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14101         and BUILT_IN_STRNCMP_EQ.
14102         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14103         BUILT_IN_STRNCMP_EQ.
14104         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14105         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14106         (gimple_fold_builtin): Likewise.
14107         * tree-ssa-strlen.c (compute_string_length): New function.
14108         (determine_min_obsize): New function.
14109         (handle_builtin_string_cmp): New function to handle calls to
14110         string compare functions.
14111         (strlen_optimize_stmt): Add handling to builtin string compare
14112         calls.
14113         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14114         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14115         * tree.c (build_common_builtin_nodes): Add new defines of
14116         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14118 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
14120         PR target/85984
14121         * bb-reorder.c (pass_partition_blocks::gate): Return false for
14122         functions with naked attribute.
14124 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
14126         * config/i386/sse.md (avx_vec_concat<mode>):
14127         Substitute concat_tg_mode mode attribute with xtg_mode.
14128         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14129         (concat_tg_mode): Remove mode attribute.
14131 2018-05-31  Martin Sebor  <msebor@redhat.com>
14133         PR c/82063
14134         * calls.c (alloc_max_size): Correct a logic error/typo.
14135         Treat excessive arguments as infinite.  Warn for invalid arguments.
14136         * doc/invoke.texi (-Walloc-size-larger-than): Update.
14138 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
14140         PR target/85829
14141         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14142         and movx for Haswell.
14144 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
14145             Cesar Philippidis  <cesar@codesourcery.com>
14147         PR middle-end/85879
14148         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14149         when emitting error on private/firstprivate reductions.
14150         * omp-low.c (lower_omp_target): Avoid reference-type processing
14151         on pointers for firstprivate clause.
14153 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14155         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14156         (st1x2): Likewise.
14157         (st1x3): Likewise.
14158         * config/aarch64/aarch64-simd.md
14159         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14160         (aarch64_ld1_x3_<mode>): Likewise
14161         (aarch64_st1x2<VALLDIF:mode>): Likewise
14162         (aarch64_st1_x2_<mode>): Likewise
14163         (aarch64_st1x3<VALLDIF:mode>): Likewise
14164         (aarch64_st1_x3_<mode>): Likewise
14165         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14166         (vld1_s8_x3): Likewise.
14167         (vld1_u16_x3): Likewise.
14168         (vld1_s16_x3): Likewise.
14169         (vld1_u32_x3): Likewise.
14170         (vld1_s32_x3): Likewise.
14171         (vld1_u64_x3): Likewise.
14172         (vld1_s64_x3): Likewise.
14173         (vld1_f16_x3): Likewise.
14174         (vld1_f32_x3): Likewise.
14175         (vld1_f64_x3): Likewise.
14176         (vld1_p8_x3): Likewise.
14177         (vld1_p16_x3): Likewise.
14178         (vld1_p64_x3): Likewise.
14179         (vld1q_u8_x3): Likewise.
14180         (vld1q_s8_x3): Likewise.
14181         (vld1q_u16_x3): Likewise.
14182         (vld1q_s16_x3): Likewise.
14183         (vld1q_u32_x3): Likewise.
14184         (vld1q_s32_x3): Likewise.
14185         (vld1q_u64_x3): Likewise.
14186         (vld1q_s64_x3): Likewise.
14187         (vld1q_f16_x3): Likewise.
14188         (vld1q_f32_x3): Likewise.
14189         (vld1q_f64_x3): Likewise.
14190         (vld1q_p8_x3): Likewise.
14191         (vld1q_p16_x3): Likewise.
14192         (vld1q_p64_x3): Likewise.
14193         (vst1_s64_x2): Likewise.
14194         (vst1_u64_x2): Likewise.
14195         (vst1_f64_x2): Likewise.
14196         (vst1_s8_x2): Likewise.
14197         (vst1_p8_x2): Likewise.
14198         (vst1_s16_x2): Likewise.
14199         (vst1_p16_x2): Likewise.
14200         (vst1_s32_x2): Likewise.
14201         (vst1_u8_x2): Likewise.
14202         (vst1_u16_x2): Likewise.
14203         (vst1_u32_x2): Likewise.
14204         (vst1_f16_x2): Likewise.
14205         (vst1_f32_x2): Likewise.
14206         (vst1_p64_x2): Likewise.
14207         (vst1q_s8_x2): Likewise.
14208         (vst1q_p8_x2): Likewise.
14209         (vst1q_s16_x2): Likewise.
14210         (vst1q_p16_x2): Likewise.
14211         (vst1q_s32_x2): Likewise.
14212         (vst1q_s64_x2): Likewise.
14213         (vst1q_u8_x2): Likewise.
14214         (vst1q_u16_x2): Likewise.
14215         (vst1q_u32_x2): Likewise.
14216         (vst1q_u64_x2): Likewise.
14217         (vst1q_f16_x2): Likewise.
14218         (vst1q_f32_x2): Likewise.
14219         (vst1q_f64_x2): Likewise.
14220         (vst1q_p64_x2): Likewise.
14221         (vst1_s64_x3): Likewise.
14222         (vst1_u64_x3): Likewise.
14223         (vst1_f64_x3): Likewise.
14224         (vst1_s8_x3): Likewise.
14225         (vst1_p8_x3): Likewise.
14226         (vst1_s16_x3): Likewise.
14227         (vst1_p16_x3): Likewise.
14228         (vst1_s32_x3): Likewise.
14229         (vst1_u8_x3): Likewise.
14230         (vst1_u16_x3): Likewise.
14231         (vst1_u32_x3): Likewise.
14232         (vst1_f16_x3): Likewise.
14233         (vst1_f32_x3): Likewise.
14234         (vst1_p64_x3): Likewise.
14235         (vst1q_s8_x3): Likewise.
14236         (vst1q_p8_x3): Likewise.
14237         (vst1q_s16_x3): Likewise.
14238         (vst1q_p16_x3): Likewise.
14239         (vst1q_s32_x3): Likewise.
14240         (vst1q_s64_x3): Likewise.
14241         (vst1q_u8_x3): Likewise.
14242         (vst1q_u16_x3): Likewise.
14243         (vst1q_u32_x3): Likewise.
14244         (vst1q_u64_x3): Likewise.
14245         (vst1q_f16_x3): Likewise.
14246         (vst1q_f32_x3): Likewise.
14247         (vst1q_f64_x3): Likewise.
14248         (vst1q_p64_x3): Likewise.
14250 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14252         * config/msp430/msp430.c (msp430_output_labelref): Prepend
14253         user_label_prefix to name.
14255         * tree-core.h: Update comment about the format of NAME string
14256         passed to handler in attribute_spec.
14258         * config/msp430/msp430.md: Remove erroneous subreg expression from
14259         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14260         zero_extend{q,h}isi2.
14262 2018-05-30  Borislav Petkov  <bp@suse.de>
14264         * doc/extend.texi: Document some architecture specific
14265         constraints and sort entries.
14267 2018-05-30  Martin Sebor  <msebor@redhat.com>
14269         PR middle-end/85369
14270         * builtins.c (expand_builtin_stpcpy_1): New function.
14271         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14272         only if the former succeeds.
14274 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14276         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14277         in saphira.
14279 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14281         * doc/invoke.texi (-flinker-output): Document
14283 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14285         * passes.c (ipa_write_summaries): Only modify statements if body
14286         is in memory.
14287         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14288         incrementally linking.
14289         (ipa_passes): Likewise.
14290         * lto-cgraph.c (lto_output_node): When incrementally linking do not
14291         pass down resolution info.
14292         * common.opt (flag_incremental_link): Update info.
14293         * gcc.c (plugin specs): Turn flinker-output=* to
14294         -plugin-opt=-linker-output-known
14295         * toplev.c (compile_file): Also cut compilation when doing incremental
14296         link.
14297         * flag-types. (enum lto_partition_model): Add
14298         LTO_LINKER_OUTPUT_NOLTOREL.
14299         (invoke.texi): Add -flinker-output docs.
14300         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14301         link same way as WPA; do not stream in dead initializers.
14303         * dwarf2out.c (dwarf2out_die_ref_for_decl,
14304         darf2out_register_external_decl): Support incremental link.
14306 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14308         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14310 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14312         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14313         it down to simple_object_copy_lto_debug_sections.
14314         (run_gcc): Determine incremental LTO link time and configure
14315         lto1 into non-wpa mode, disable renaming of debug sections.
14317 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14319         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14320         descriptions of various incorrectly documented functions.
14322 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14324         Revert:
14325         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14326         address check not strict.
14328 2018-05-30  Richard Biener  <rguenther@suse.de>
14330         PR tree-optimization/85964
14331         * tracer.c (better_p): Drop initialized count check, we only
14332         call the function with initialized counts now.
14333         (find_best_successor): Do find a best edge if one
14334         has uninitialized count.
14335         (find_best_predecessor): Likewise.  Do BB frequency check only
14336         if count is initialized.
14338 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
14340         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14341         (aarch64_ldrstr_offset_compare): New.
14342         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14343         load/store orderings.
14344         (aarch64_gen_adjusted_ldpstp): Likewise.
14346 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
14348         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14349         Check for subset of GENERAL_REGS and FP_REGS.
14350         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14351         r=w alternative.
14353 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
14355         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14356         and wi::to_poly_offset.  Add the current offset and then check
14357         whether the sum fits, rather than using an unchecked addition of
14358         a checked term.  Check for a shwi rather than a uhwi.
14359         * expr.c (get_bit_range): Use tree_to_poly_uint64.
14360         (store_constructor): Use poly_int_tree_p.
14361         (expand_expr_real_1): Likewise.
14362         * function.c (assign_temp): Likewise.
14363         * fold-const.c (const_binop): Use poly_int_tree_p and
14364         wi::to_poly_offset.
14365         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
14366         division.
14367         * ipa-icf-gimple.c (func_checker::compare_operand): Use
14368         to_poly_offset for MEM offsets.
14369         * ipa-icf.c (sem_variable::equals): Likewise.
14370         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14371         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14372         wi::to_poly_offset for BIT_FIELD_REF offsets.
14373         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14374         wi::to_poly_offset.
14375         * var-tracking.c (emit_note_insn_var_location): Use
14376         tree_to_poly_uint64.
14378 2018-05-29  Jim Wilson  <jimw@sifive.com>
14380         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14382 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
14384         PR target/85950
14385         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
14386         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
14387         sequence.
14388         (sse4_1_round<mode>2): Use nonimmediate_operand
14389         for operand 1 predicate.
14391 2018-05-29  Martin Sebor  <msebor@redhat.com>
14392             Richard Biener  <rguenther@suse.de>
14394         PR testsuite/85888
14395         * calls.c (get_size_range): Call determine_value_range instead
14396         of get_value_range..
14397         * tree-vrp.h (determine_value_range): Declared new function.
14398         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
14400 2018-05-29  Richard Biener  <rguenther@suse.de>
14402         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
14403         sure to use non-pattern stmts for get_earlier_stmt arguments.
14404         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
14405         called on pattern stmts.
14406         (get_later_stmt): Likewise.
14408 2018-05-29  Martin Liska  <mliska@suse.cz>
14410         PR gcov-profile/85759
14411         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
14412         env variables.
14414 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
14416         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
14417         VEC_UNPACK_*_EXPR.
14418         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
14419         VEC_PACK_*_EXPR.
14421         PR target/85918
14422         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14423         VEC_PACK_FLOAT_EXPR): New tree codes.
14424         * tree-pretty-print.c (op_code_prio): Handle
14425         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14426         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14427         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14428         * tree-inline.c (estimate_operator_cost): Likewise.
14429         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
14430         * fold-const.c (const_binop): Likewise.
14431         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
14432         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14433         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14434         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
14435         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14436         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14437         * expr.c (expand_expr_real_2): Likewise.
14438         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
14439         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
14440         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
14441         optabs.
14442         * optabs.c (expand_widen_pattern_expr): For
14443         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
14444         sign from result type rather than operand's type.
14445         (expand_binop_directly): For vec_packu_float_optab and
14446         vec_packs_float_optab allow result type to be different from operand's
14447         type.
14448         * optabs-tree.c (optab_for_tree_code): Handle
14449         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14450         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
14451         * tree-vect-generic.c (expand_vector_operations_1):  Handle
14452         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14453         VEC_PACK_FLOAT_EXPR.
14454         * tree-vect-stmts.c (supportable_widening_operation): Handle
14455         FIX_TRUNC_EXPR.
14456         (supportable_narrowing_operation): Handle FLOAT_EXPR.
14457         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
14458         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
14459         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
14460         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
14461         mode attributes.
14462         (vec_pack<floatprefix>_float_<mode>): New expander.
14463         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
14464         attributes.
14465         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
14466         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
14467         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
14468         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
14469         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
14470         Document.
14471         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
14472         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
14473         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14474         VEC_PACK_FLOAT_EXPR): Document.
14476 2018-05-29  Richard Biener  <rguenther@suse.de>
14478         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
14479         member.
14480         (stmt_vec_info_vec): Make pointer.
14481         (init_stmt_vec_info_vec): Remove.
14482         (free_stmt_vec_info_vec): Likewise.
14483         (set_stmt_vec_info_vec): New function.
14484         (free_stmt_vec_infos): Likewise.
14485         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
14486         (set_vinfo_for_stmt): Likewise.
14487         (get_earlier_stmt): Likewise.
14488         (get_later_stmt): Likewise.
14489         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
14490         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
14491         (vec_info::~vec_info): Free stmt_vec_infos.
14492         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
14493         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
14494         (pass_slp_vectorize::execute): Likewise.
14495         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
14496         (free_stmt_vec_info_vec): Likewise.
14497         (set_stmt_vec_info_vec): New function.
14498         (free_stmt_vec_infos): Likewise.
14499         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
14500         the global stmt_vec_info_vec.
14501         * tree-parloops.c (gather_scalar_reductions): Use
14502         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
14503         vector.
14505 2018-05-29  Richard Biener  <rguenther@suse.de>
14507         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
14509 2018-05-29  Martin Liska  <mliska@suse.cz>
14510             David Malcolm  <dmalcolm@redhat.com>
14512         * vec.c (test_reverse): New.
14513         (vec_c_tests): Add new test.
14514         * vec.h (vl_ptr>::reverse): New function.
14516 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
14518         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
14520         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
14521         and later.
14523 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14525         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
14527 2018-05-28  Richard Biener  <rguenther@suse.de>
14529         PR tree-optimization/85933
14530         * tree-vect-data-refs.c (vect_record_base_alignments): Only
14531         look at stmts marked as vectorizable.
14533 2018-05-28  Richard Biener  <rguenther@suse.de>
14535         PR tree-optimization/85934
14536         * tree-vect-generic.c (expand_vector_operations_1): Hoist
14537         vector boolean check before scalar optimization.
14539 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
14541         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
14542         for armv5te.
14544 2018-05-28  Mark Wielaard  <mark@klomp.org>
14546         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
14547         if it is an expression containing a minus sign.
14549 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
14551         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
14553 2018-05-27  Paul Koning  <ni1d@arrl.net>
14555         * config/pdp11/pdp11.md (truncsihi2): Remove.
14557 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
14558             Chung-Ju Wu  <jasonwucj@gmail.com>
14560         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
14561         implementation.
14562         (unaligned_store_dw): Ditto.
14563         * config/nds32/nds32-memory-manipulation.c
14564         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
14565         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
14566         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
14567         (emit_setmem_word_loop): Rename to ...
14568         (emit_setmem_doubleword_loop): ... this.
14569         (nds32_gen_dup_4_byte_to_word_value): New function.
14570         (nds32_gen_dup_8_byte_to_double_word_value): New function.
14571         (nds32_expand_setmem_loop): Refine implementation.
14572         (nds32_expand_setmem_loop_v3m): Ditto.
14573         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
14574         pattern.
14576 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14578         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
14580 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14582         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
14583         (nds32_init_machine_status): Initialize machine->attr_naked_p and
14584         machine->attr_no_prologue_p.
14585         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
14586         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
14587         (nds32_expand_epilogue): Consider attr_naked_p.
14588         (nds32_expand_epilogue_v3pop): Likewise.
14589         (nds32_can_use_return_insn): Likewise.
14590         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
14591         attr_no_prologue_p fields.
14592         * config/nds32/nds32.opt (mret-in-naked-func): New option.
14594 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
14596         PR target/85918
14597         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
14598         attributes.
14599         * config/i386/sse.md
14600         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
14601         Rename to ...
14602         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
14603         ... this.
14604         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
14605         Rename to ...
14606         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
14607         ... this.
14608         (*<floatsuffix>floatv2div2sf2): Rename to ...
14609         (*float<floatunssuffix>v2div2sf2): ... this.
14610         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
14611         (float<floatunssuffix>v2div2sf2_mask): ... this.
14612         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
14613         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
14614         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
14615         to ...
14616         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
14617         ... this.
14618         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14619         Rename to ...
14620         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14621         ... this.
14622         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14623         Rename to ...
14624         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14625         ... this.
14626         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
14627         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
14628         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
14629         gen_ufix_truncv8dfv8si2.
14630         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
14631         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
14632         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
14633         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
14634         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
14635         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
14636         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
14637         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
14639 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14641         PR target/85900
14642         PR target/85345
14643         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
14645 2018-05-25  Jim Wilson  <jimw@sifive.com>
14647         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
14648         * config/riscv/riscv.c (struct machine_function): Add
14649         interrupt_handler_p and attribute_checked_p fields.
14650         (riscv_attribute_table): Add interrupt.
14651         (riscv_interrupt_type_p): New.
14652         (riscv_save_reg_p): Save extra regs for interrupt handler.
14653         (riscv_use_save_libcall): Return false  for interrupt handler.
14654         (riscv_first_stack_step): Add forward declaration.
14655         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
14656         for interrupt handler with large frame.  Use it for saved reg list.
14657         (riscv_expand_prologue): Move flag_stack_usage_info support to
14658         eliminate duplication.
14659         (riscv_expand_epilogue): Generate mret for interrupt handler.
14660         (riscv_epilogue_uses): New.
14661         (riscv_can_use_return_insn): Return false for interrupt handler.
14662         (riscv_function_ok_for_sibcall): Likewise.
14663         (riscv_set_current_function): Add interrupt handler support.
14664         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
14665         * config/riscv/riscv.md (UNSPECV_MRET): New.
14666         (GP_REGNUM): New.
14667         (riscv_frflags, riscv_fsflags): Use tab after opcode.
14668         (riscv_mret): New.
14669         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
14671 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
14673         PR tree-optimization/85712
14674         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
14675         this candidate has already been replaced in-situ by a copy.
14677 2018-05-25  Jason Merrill  <jason@redhat.com>
14679         PR c++/80485 - inline function non-zero address.
14680         * symtab.c (nonzero_address): Check DECL_COMDAT.
14682 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
14684         PR target/83628
14685         * config/alpha/alpha.md (ashlsi3): New insn pattern.
14686         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
14687         extension of SImode operation.  Use const123_operand predicate.
14688         (*saddsi_1): Remove.
14689         (*saddl_se_1): Ditto.
14690         (*ssubsi_1): Ditto.
14691         (*ssubl_se_1): Ditto.
14692         * config/alpha/predicates.md (const123_operand): New predicate.
14693         * config/alpha/constraints.md (P): Use IN_RANGE.
14695 2018-05-25  Richard Biener  <rguenther@suse.de>
14697         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
14698         defaulted to true.
14699         (ref_maybe_used_by_stmt_p): Likewise.
14700         (stmt_may_clobber_ref_p): Likewise.
14701         (stmt_may_clobber_ref_p_1): Likewise.
14702         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
14703         and pass it along.
14704         (ref_maybe_used_by_stmt_p): Likewise.
14705         (stmt_may_clobber_ref_p): Likewise.
14706         (stmt_may_clobber_ref_p_1): Likewise.
14707         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14708         the alias oracle to disambiguate DRs with stmts DR analysis
14709         couldn't handle.
14710         (vect_analyze_data_refs): Do not give up on not analyzable
14711         DRs for BB vectorization.  Remove code truncating the dataref
14712         vector.
14714 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
14716         PR target/85832
14717         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14718         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
14719         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
14721 2018-05-25  Richard Biener  <rguenther@suse.de>
14723         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
14724         function, combining stmt data ref gathering and fatal analysis
14725         parts.
14726         (vect_analyze_data_refs): Remove now redudnant code and simplify.
14727         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
14728         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
14729         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
14730         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
14732 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14734         PR tree-optimization/85720
14735         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
14736         SCC if all partitions are builtins.
14737         (version_loop_by_alias_check): New parameter.  Generate cancelable
14738         runtime alias check if all partitions are builtins.
14739         (distribute_loop): Update call to above function.
14741 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14743         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
14744         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
14745         (parm_default_def_partition_arg): Ditto.
14746         (set_parm_default_def_partition): Ditto.
14747         (get_parm_default_def_partitions): Ditto and make it static.
14748         (get_undefined_value_partitions): Ditto and make it static.
14749         (remove_ssa_form): Refactor call to init_var_map here.
14750         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
14751         computation for loop region.
14752         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
14753         (register_default_def): Delete.
14754         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
14755         (parm_default_def_partition_arg): Ditto.
14756         (set_parm_default_def_partition): Ditto.
14757         (get_parm_default_def_partitions): Ditto and make it static.
14758         (get_undefined_value_partitions): Ditto and make it static.
14759         (coalesce_with_default, coalesce_with_default): Update comment.
14760         (create_coalesce_list_for_region): New func factored out from
14761         create_outofssa_var_map.
14762         (populate_coalesce_list_for_outofssa): New func factored out from
14763         create_outofssa_var_map and coalesce_ssa_name.
14764         (create_outofssa_var_map): Delete.
14765         (coalesce_ssa_name): Refactor to support live range computation.
14766         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
14767         (get_parm_default_def_partitions): Delete.
14768         (get_undefined_value_partitions): Ditto.
14769         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
14770         computation for loop region.
14771         (new_tree_live_info, loe_visit_block): Ditto.
14772         (live_worklist, set_var_live_on_entry): Ditto.
14773         (calculate_live_on_exit, verify_live_on_entry): Ditto.
14774         * tree-ssa-live.h (struct _var_map): New fields.
14775         (init_var_map): Change decl.
14776         (region_contains_p): New.
14778 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14780         * tree-ssa-live.h (live_merge_and_clear): Delete.
14782 2018-05-25  Richard Biener  <rguenther@suse.de>
14784         PR c++/85912
14785         * tree-dump.c (dequeue_and_dump): Remove access to removed
14786         operand 2 of a SWITCH_EXPR.
14788 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14790         * doc/sourcebuild.texi (vect_double_cond_arith): Include
14791         multiplication and division.
14792         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
14793         (cond_udiv@var{m}, cond_umod@var{m}): Document.
14794         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
14795         (cond_udiv_optab, cond_umod_optab): New optabs.
14796         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
14797         (IFN_COND_RDIV): New internal functions.
14798         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
14799         TRUNC_MOD_EXPR and RDIV_EXPR.
14800         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14801         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
14802         New unspecs.
14803         (SVE_INT_BINARY): Include mult.
14804         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
14805         (optab, sve_int_op): Handle mult.
14806         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
14807         UNSPEC_COND_DIV.
14808         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
14809         for SVE_INT_BINARY_SD.
14811 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14813         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
14814         (optab, sve_int_op): Handle div and udiv.
14815         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
14816         for SVE_INT_BINARY_SD.
14817         (*<optab><mode>3): New insn for the same.
14819 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14821         * tree-vect-patterns.c: Include predict.h.
14822         (vect_recog_divmod_pattern): Restrict check for division support
14823         to when optimizing for size.
14825 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14827         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14828         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14829         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14830         (gimple_match_op::set_op): Likewise.
14831         (gimple_resimplify4): Declare.
14832         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14833         (expr::gen_transform): Likewise.
14834         (decision_tree::gen): Generate a simplification routine for 4 operands.
14835         * gimple-match-head.c (gimple_simplify): Add an overload for
14836         4 operands.  In the top-level function, handle up to 4 call
14837         arguments and call gimple_resimplify4.
14838         (gimple_resimplify4): New function.
14839         (build_call_internal): Pass a fourth operand.
14840         (maybe_push_to_seq): Likewise.
14841         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14842         Fold VEC_COND_EXPRs of an operation and a default value into
14843         an IFN_COND_* function if possible.
14844         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14845         New unspecs.
14846         (SVE_COND_FP_BINARY): Include them.
14847         (optab, sve_fp_op): Handle them.
14848         (SVE_INT_BINARY_REV): New code iterator.
14849         (SVE_COND_FP_BINARY_REV): New int iterator.
14850         (commutative): New int attribute.
14851         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14852         Declare.
14853         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14854         function.
14855         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14856         (*cond_<optab><mode>): New patterns for reversed operands.
14858 2018-05-25  Richard Biener  <rguenther@suse.de>
14860         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14861         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14862         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14863         (STMT_VINFO_GROUPED_ACCESS): Adjust.
14864         * tree-vect-data-refs.c (everywhere): Adjust users.
14865         * tree-vect-loop.c (everywhere): Likewise.
14866         * tree-vect-slp.c (everywhere): Likewise.
14867         * tree-vect-stmts.c (everywhere): Likewise.
14868         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14870 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14872         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14873         Rename to...
14874         (gcc_cv_as_section_exclude): ... this.
14875         Try Solaris as #exclude syntax.
14876         * configure: Regenerate.
14877         * config.in: Regenerate.
14878         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14879         SECTION_EXCLUDE.
14880         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14881         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14883         * varasm.c (default_elf_asm_named_section): Don't check if
14884         HAVE_GAS_SECTION_EXCLUDE is defined.
14886 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14888         * doc/md.texi: Update the documentation of the cond_* optabs
14889         to mention the new final operand.  Fix GET_MODE_NUNITS call.
14890         Describe the scalar case too.
14891         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14892         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14893         instead of 2.
14894         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14895         (get_conditional_internal_fn): Update comment.
14896         * tree-vect-loop.c (vectorizable_reduction): Pass the original
14897         accumulator value as a final argument to conditional functions.
14898         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14899         a define_expand and add an "else" operand.  Assert for now that
14900         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
14901         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14902         (*cond_<optab><mode>): New patterns.
14903         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14904         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14905         (UNSPEC_COND_EOR): Delete.
14906         (optab): Remove associated mappings.
14907         (SVE_INT_BINARY): New code iterator.
14908         (sve_int_op): Remove int attribute and add "minus" to the code
14909         attribute.
14910         (SVE_COND_INT_OP): Delete.
14911         (SVE_COND_FP_OP): Rename to...
14912         (SVE_COND_FP_BINARY): ...this.
14914 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14916         * optabs.c (can_reuse_operands_p): New function.
14917         (maybe_legitimize_operands): Try to reuse the results for
14918         earlier operands.
14920 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14922         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14923         Add {q} suffix to insn mnemonic.
14925 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14927         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14928         (msp430_warn_func_return): New.
14930 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
14932         * fold-const.c (tree_nonzero_bits): New function.
14933         * fold-const.h (tree_nonzero_bits): Likewise.
14934         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14935         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14937 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14939         PR target/85900
14940         PR target/85345
14941         * varasm.c (assemble_alias): Check ifunc_resolver only on
14942         FUNCTION_DECL.
14944 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14946         PR target/85903
14947         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14948         when memory input operand is handled.
14950 2018-05-24  Luis Machado  <luis.machado@linaro.org>
14952         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14953         global.
14954         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14956 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14958         * match.pd: Delay FMA folds until after vectorization.
14960 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14962         PR target/83009
14963         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14964         address check not strict.
14966 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14968         * gimple-match.h (gimple_match_op): New class.
14969         (mprts_hook): Replace parameters with a gimple_match_op *.
14970         (maybe_build_generic_op): Likewise.
14971         (gimple_simplified_result_is_gimple_val): Replace parameters with
14972         a const gimple_match_op *.
14973         (gimple_simplify): Replace code_helper * and tree * parameters with
14974         a gimple_match_op * parameter.
14975         (gimple_resimplify1): Replace code_helper *, tree and tree *
14976         parameters with a gimple_match_op * parameter.
14977         (gimple_resimplify2): Likewise.
14978         (gimple_resimplify3): Likewise.
14979         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14980         parameters with a gimple_match_op * parameter.
14981         * gimple-match-head.c (gimple_simplify): Change prototypes of
14982         auto-generated functions to take a gimple_match_op * instead of
14983         separate code_helper * and tree * parameters.  Make the same
14984         change in the top-level overload and update calls to the
14985         gimple_resimplify routines.  Update calls to the auto-generated
14986         functions and to maybe_push_res_to_seq in the publicly-facing
14987         operation-specific gimple_simplify overloads.
14988         (gimple_match_op::MAX_NUM_OPS): Define.
14989         (gimple_resimplify1): Replace rcode and ops with a single res_op
14990         parameter.  Update call to gimple_simplify.
14991         (gimple_resimplify2): Likewise.
14992         (gimple_resimplify3): Likewise.
14993         (mprts_hook): Replace parameters with a gimple_match_op *.
14994         (maybe_build_generic_op): Likewise.
14995         (build_call_internal): Replace type, nargs and ops with
14996         a gimple_match_op *.
14997         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14998         with a single gimple_match_op *.  Update calls to mprts_hook,
14999         build_call_internal and gimple_simplified_result_is_gimple_val.
15000         Factor out code that is common to the tree_code and combined_fn cases.
15001         * genmatch.c (expr::gen_transform): Replace tem_code and
15002         tem_ops with a gimple_match_op called tem_op.  Update calls
15003         to the gimple_resimplify functions and maybe_push_res_to_seq.
15004         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15005         res_ops.  Update call to the gimple_resimplify functions.
15006         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15007         (decision_tree::gen): Make the functions take a gimple_match_op *
15008         called res_op instead of separate res_code and res_ops parameters.
15009         Update call accordingly.
15010         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15011         and ops with a single res_op parameter.  Update calls to
15012         maybe_build_generic_op and maybe_push_res_to_seq.
15013         (fold_stmt_1): Update calls to gimple_simplify and
15014         replace_stmt_with_simplification.
15015         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15016         and gimple_simplified_result_is_gimple_val.
15017         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15018         gimple_simplify.
15019         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15020         with a gimple_match_op *.
15021         (vn_nary_build_or_lookup): Likewise.  Update call to
15022         vn_nary_build_or_lookup_1.
15023         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15024         gimple_match_op *.  Update calls to the gimple_resimplify routines
15025         and to gimple_simplified_result_is_gimple_val.
15026         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15027         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15028         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15029         (visit_nary_op): Likewise.
15030         (visit_reference_op_load): Likewise.
15032 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15034         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15035         modifier for printing the step amount.
15037 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
15039         PR target/78849
15040         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15041         types.
15043 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
15045         * doc/sourcebuild.texi (Endianness): New subsubsection.
15047 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15049         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15050         <prefetch_dynamic_strides>: New const bool field.
15051         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15052         prefetch_dynamic_strides.
15053         (exynosm1_prefetch_tune): Likewise.
15054         (thunderxt88_prefetch_tune): Likewise.
15055         (thunderx_prefetch_tune): Likewise.
15056         (thunderx2t99_prefetch_tune): Likewise.
15057         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15058         false.
15059         (aarch64_override_options_internal): Update to set
15060         PARAM_PREFETCH_DYNAMIC_STRIDES.
15061         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15062         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15063         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15064         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15065         prefetch-dynamic-strides setting.
15067 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15069         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15070         <minimum_stride>: New const int field.
15071         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15072         minimum_stride field defaulting to -1.
15073         (exynosm1_prefetch_tune): Likewise.
15074         (thunderxt88_prefetch_tune): Likewise.
15075         (thunderx_prefetch_tune): Likewise.
15076         (thunderx2t99_prefetch_tune): Likewise.
15077         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15078         <default_opt_level>: Set to 3.
15079         (aarch64_override_options_internal): Update to set
15080         PARAM_PREFETCH_MINIMUM_STRIDE.
15081         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15082         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15083         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15084         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15085         stride is constant and is below the minimum stride threshold.
15087 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15089         * config/arm/arm-cpus.in (mode26): Delete.
15090         (armv4): Delete mode26 reference.
15091         * config/arm/arm.c (arm_configure_build_target): Delete use of
15092         isa_bit_mode26.
15094 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15096         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15097         New insn pattern.
15098         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15099         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
15100         for non-SSE modes.
15101         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
15102         (floatunsdidf2): Ditto.
15104 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15106         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15107         (fixuns_trunc<mode>si2_avx512f): Ditto.
15108         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15109         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15110         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15112 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15114         PR rtl-optimization/79985
15115         * df-scan.c (df_insn_refs_collect): Remove special case for
15116         global registers and asm statements.
15118 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15120         * extend.texi (Global Register Variables): Rewrite the bullet list.
15121         Note that the register is available for allocation. Note that access
15122         via inline asm must use constraints. Add note about async-signal
15123         handlers. Remove paragraph about automagic register selection.
15125 2018-05-23  Richard Biener  <rguenther@suse.de>
15127         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15128         of fixed offset from memset VN.
15130 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
15132         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15133         first_interp field.
15134         (alloc_cand_and_find_basis): Initialize first_interp field.
15135         (slsr_process_mul): Modify first_interp field.
15136         (slsr_process_add): Likewise.
15137         (slsr_process_cast): Modify first_interp field for each new
15138         interpretation.
15139         (slsr_process_copy): Likewise.
15140         (dump_candidate): Dump first_interp field.
15141         (replace_mult_candidate): Process all interpretations, not just
15142         subsequent ones.
15143         (replace_rhs_if_not_dup): Likewise.
15144         (replace_one_candidate): Likewise.
15146 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
15148         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15149         Add new boolean.
15150         (aarch64_needs_frame_chain): New function.
15151         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15153 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
15155         PR target/84882
15156         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15157         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15158         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15159         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15160         as true for strict-align.
15161         (aarch64_can_inline_p): Perform checks even when callee has no
15162         attributes to check for strict alignment.
15163         * doc/extend.texi (AArch64 Function Attributes): Document
15164         no-strict-align.
15165         * doc/invoke.texi: (AArch64 Options): Likewise.
15167 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
15169         PR tree-optimization/85853
15170         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15171         the handling of the root of the node to...
15172         (vect_slp_analyze_node_operations_1): ...this new function,
15173         and run the whole thing with the child nodes' def types
15174         set according to their SLP node's def type.
15176 2018-05-23  Richard Biener  <rguenther@suse.de>
15178         PR middle-end/85874
15179         * tree-data-ref.c (create_runtime_alias_checks): Defer
15180         and ignore overflow warnings.
15182 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
15184         PR tree-optimization/85822
15185         * tree-vrp.c (is_masked_range_test): Fix handling of negative
15186         constants.
15188 2018-05-23  Richard Biener  <rguenther@suse.de>
15190         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15191         memset constants via native_interpret_expr.
15193 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
15195         PR target/85345
15196         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15197         attribute.
15198         (cgraph_node::create_alias): Likewise.
15199         (cgraph_node::get_availability): Check ifunc_resolver instead
15200         of looking up ifunc attribute.
15201         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15202         * varasm.c (do_assemble_alias): Likewise.
15203         (assemble_alias): Likewise.
15204         (default_binds_local_p_3): Likewise.
15205         * cgraph.h (cgraph_node): Add ifunc_resolver.
15206         (cgraph_node::only_called_directly_or_aliased_p): Return false
15207         for IFUNC resolver.
15208         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15209         attribute.
15210         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15211         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15212         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15213         instead of looking up ifunc attribute.
15215 2018-05-22  Luis Machado  <luis.machado@linaro.org>
15217         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15219 2018-05-22  Martin Sebor  <msebor@redhat.com>
15221         PR middle-end/85359
15222         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15223         only when expasion succeeds.
15224         (expand_builtin_strcmp): Same.
15225         (expand_builtin_strncmp): Same.
15227 2018-05-22  Martin Sebor  <msebor@redhat.com>
15229         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15231 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15232             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15234         * config/aarch64/aarch64-ldpstp.md: Replace uses of
15235         aarch64_mem_pair_operand with memory_operand and delete operand swapping
15236         code.
15237         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15238         Add check for legitimate_address.
15239         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15240         (aarch64_swap_ldrstr_operands): New.
15241         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15242         Define prototype.
15244 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15245             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15247         * config/aarch64/aarch64.md: New patterns to generate stp
15248         and ldp.
15249         (store_pair_sw, store_pair_dw): New patterns to generate stp for
15250         single words and double words.
15251         (load_pair_sw, load_pair_dw): Likewise.
15252         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15253         Delete.
15254         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15255         Delete.
15256         * config/aarch64/aarch64-ldpstp.md: Modify peephole
15257         for different mode ldpstp and add peephole for merged zero stores.
15258         Likewise for loads.
15259         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15260         Add size check.
15261         (aarch64_gen_store_pair): Rename calls to match new patterns.
15262         (aarch64_gen_load_pair): Rename calls to match new patterns.
15263         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15264         (load_pair<DREG:mode><DREG2:mode>): ... This.
15265         (store_pair<mode>): Rename to...
15266         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15267         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15268         New mode iterators.
15269         (V_INT_EQUIV): Handle SImode.
15270         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15271         New predicate.
15273 2018-05-22  Martin Sebor  <msebor@redhat.com>
15275         PR c/85623
15276         * calls.c (maybe_warn_nonstring_arg): Use string length to set
15277         or ajust the presumed bound on an operation to avoid unnecessary
15278         warnings.
15280 2018-05-22  Martin Sebor  <msebor@redhat.com>
15282         PR tree-optimization/85826
15283         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15284         assuming that a DECL necesarily has a constant size.
15286 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
15288         PR middle-end/85862
15289         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15291 2018-05-22  Richard Biener  <rguenther@suse.de>
15293         PR tree-optimization/85834
15294         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15295         non-constant and non-zero memset arguments.
15297 2018-05-22  Martin Liska  <mliska@suse.cz>
15299         PR ipa/85607
15300         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15302 2018-05-22  Richard Biener  <rguenther@suse.de>
15304         PR tree-optimization/85863
15305         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15306         comparisons when vectype is specified.
15307         (vectorizable_condition): Do not specify vectype for
15308         vect_is_simple_cond when SLP vectorizing.
15310 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
15312         PR target/85657
15313         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15314         define __ibm128 as long double.
15315         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15316         as a distinct type when IEEE 128-bit support is enabled.
15317         (init_float128_ieee): Fix up conversions between IFmode and IEEE
15318         128-bit types to use the correct functions.
15319         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15320         convert between 128-bit floating point types that have different
15321         modes but the same representation, instead of using gen_lowpart to
15322         makean alias.
15323         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15324         KFmode.
15325         (IFKF_reg): New attributes to give the register constraints for
15326         IFmode and KFmode.
15327         (extend<mode>tf2_internal): New insns to mark an explicit
15328         conversion between 128-bit floating point types that have a
15329         different mode but share the same representation.
15331 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
15333         PR tree-optimization/85814
15334         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15335         a null return from get_strinfo when unsharing the next
15336         strinfo in the chain.
15338 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
15340         PR gcc/84923
15341         * varasm.c (weak_finish): Clean up weak_decls.
15343 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15345         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15346         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15347         UNSPEC_UADALP values.
15348         * config/aarch64/iterators.md (ABAL): New int iterator.
15349         (ABDL2): Likewise.
15350         (ADALP): Likewise.
15351         (sur): Add mappings for the above.
15352         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15353         New define_insn.
15354         (aarch64_<sur>abal<mode>_4): Likewise.
15355         (aarch64_<sur>adalp<mode>_3): Likewise.
15356         (<sur>sadv16qi): New define_expand.
15358 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
15360         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15361         (*movdf_internal): Ditto.
15362         (*rcpsf2_sse): Ditto.
15363         (*rsqrtsf2_sse): Ditto.
15364         (*sqrt<mode>2_sse): Ditto.
15366 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
15368         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15369         eor3q<mode>4.
15370         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15371         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15372         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15373         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15374         vbcaxq_s64): New.
15375         * config/aarch64/arm_neon.h: Likewise.
15376         * config/aarch64/iterators.md (VQ_I): New.
15378 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
15380         * config.gcc: Add arc/t-multilib-linux to tmake_file for
15381         arc*-*-linux*.
15382         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
15383         MULTILIB_DIRNAMES
15385 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15387         * config/nds32/constraints.md (S): New constraint.
15388         * config/nds32/nds32.md (call_internal): Use constraint S.
15389         (call_value_internal): Likewise.
15390         (sibcall_internal): Likewise.
15391         (sibcall_value_internal): Likewise.
15393 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15394             Chung-Ju Wu  <jasonwucj@gmail.com>
15396         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
15397         into consideration.
15399 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15400             Chung-Ju Wu  <jasonwucj@gmail.com>
15402         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
15403         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
15404         (nds32_rtx_costs_impl): Simplify.
15405         (nds32_address_cost_impl): Simplify.
15406         (nds32_init_rtx_costs): New function.
15407         (nds32_rtx_costs_speed_prefer): Likewise.
15408         (nds32_rtx_costs_size_prefer): Likewise.
15409         (nds32_address_cost_speed_prefer): Likewise.
15410         (nds32_address_cost_speed_fwprop): Likewise.
15411         (nds32_address_cost_size_prefer): Likewise.
15412         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
15413         * config/nds32/nds32.c (nds32_option_override): Use
15414         nds32_init_rtx_costs function.
15416 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15418         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
15419         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
15420         (TARGET_PIPELINE_N8): Likewise.
15421         (TARGET_PIPELINE_N10): Likewise.
15422         (TARGET_PIPELINE_N13): Likewise.
15423         (TARGET_PIPELINE_GRAYWOLF): Likewise.
15425 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
15427         * config/nds32/nds32-fpu.md: Update copyright year.
15429 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15431         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
15433 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15435         * config/nds32/nds32.c
15436         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
15437         * config/nds32/nds32.opt (minline-asm-r15): New option.
15439 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15441         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
15442         MASK_HW_ABS.
15443         * config/nds32/nds32.md (abssi2): New pattern.
15445 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
15447         * config/i386/i386.md (rex64namesuffix): New mode attribute.
15448         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
15449         Merge insn pattern from sse_cvtsi2ss<round_name> and
15450         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
15451         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
15452         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
15453         using SWI48 mode iterator.
15454         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
15455         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
15456         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
15457         pattern from sse_cvttss2si<round_saeonly_name>
15458         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
15459         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
15460         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
15461         using SWI48 mode iterator.
15462         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
15463         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
15464         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
15465         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
15466         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
15467         using SWI48 mode iterator.
15468         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
15469         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
15470         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
15471         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
15472         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
15473         SWI48 mode iterator.
15474         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
15475         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
15476         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
15477         pattern from sse_cvttsd2si<round_saeonly_name>
15478         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
15480 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15482         * config/nds32/nds32-md-auxiliary.c
15483         (nds32_valid_smw_lwm_base_p): Refine.
15484         (nds32_output_smw_single_word): Refine.
15485         (nds32_output_smw_double_word): New.
15486         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
15488 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15490         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
15491         (nds32_output_stack_pop): Refine.
15492         (nds32_expand_unaligned_load): Refine.
15493         (nds32_expand_unaligned_store): Refine.
15495 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
15496             Chung-Ju Wu  <jasonwucj@gmail.com>
15498         * config/nds32/constants.md: Add TP_REGNUM constant.
15499         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
15500         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
15501         UNSPEC_ADD32.
15502         * config/nds32/nds32-doubleword.md: Consider flag_pic.
15503         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
15504         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
15505         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
15506         and PIC code generation.
15507         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
15508         code generation.
15509         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
15510         optimization.
15511         * config/nds32/nds32.md: Support TLS and PIC.
15512         * config/nds32/nds32.c: Support TLS and PIC.
15513         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
15514         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
15515         predicate.
15517 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15519         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
15520         mode with E_ prefix.
15522 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
15523             Chung-Ju Wu  <jasonwucj@gmail.com>
15525         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
15526         * config/nds32/nds32-md-auxiliary.c
15527         (symbolic_reference_mentioned_p): New.
15528         (nds32_legitimize_ict_address): New.
15529         (nds32_expand_ict_move): New.
15530         (nds32_indirect_call_referenced_p): New.
15531         (nds32_symbol_binds_local_p): Delete.
15532         (nds32_long_call_p): Modify.
15533         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
15534         * config/nds32/nds32-protos.h
15535         (symbolic_reference_mentioned_p): Declare.
15536         (nds32_legitimize_ict_address): Declare.
15537         (nds32_expand_ict_move): Declare.
15538         (nds32_indirect_call_referenced_p): Declare.
15539         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
15540         (nds32_relax_group): Use nds32_ict_const_p as condition.
15541         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
15542         (nds32_asm_file_start): Output ict_model directive in asm code.
15543         (nds32_legitimate_address_p): Consider indirect call.
15544         (nds32_print_operand): Consider indirect call.
15545         (nds32_print_operand_address): Consider indirect call.
15546         (nds32_insert_attributes): Handle "indirect_call" attribute.
15547         (TARGET_LEGITIMATE_ADDRESS_P): Define.
15548         (TARGET_LEGITIMATE_CONSTANT_P): Define.
15549         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
15550         (TARGET_DELEGITIMIZE_ADDRESS): Define.
15551         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
15552         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
15553         (TARGET_ICT_MODEL_SMALL): Define.
15554         (TARGET_ICT_MODEL_LARGE): Define.
15555         * config/nds32/nds32.md (movsi): Consider ict model.
15556         (call, call_value): Consider ict model.
15557         (sibcall, sibcall_value): Consider ict model.
15558         * config/nds32/nds32.opt (mict-model): New option.
15559         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
15560         model.
15562 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
15563             Monk Chiang  <sh.chiang04@gmail.com>
15564             Jim Wilson <jimw@sifive.com>
15566         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
15567         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
15568         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
15569         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
15570         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
15571         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
15572         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
15573         compute save_libcall_adjustment properly.
15574         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
15575         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
15576         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
15577         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
15578         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
15579         (ABI_SPEC): Handle mabi=ilp32e.
15580         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
15581         (RVE): Add RVE mask.
15582         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
15583         <-march>: Add rv32e as an example.
15585 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
15587         PR c++/82899
15588         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
15589         (intra_create_variable_infos): Handle C++ constructors.
15591 2018-05-18  Martin Liska  <mliska@suse.cz>
15593         * passes.def: Remove a redundant pass.
15595 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
15597         PR bootstrap/85838
15598         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
15600 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15602         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
15603         (ARMv4): Update.
15604         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
15605         (ARMv6m): Update.
15606         (armv2, armv2a, armv3, armv3m): Delete architectures.
15607         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
15608         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
15609         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
15610         Delete cpus.
15611         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
15612         (*mulsidi3adddi): Likewise.
15613         (mulsidi3): Likewise.
15614         (*mulsidi3_nov6): Likewise.
15615         (umulsidi3): Likewise.
15616         (umulsidi3_nov6): Likewise.
15617         (umaddsidi4): Likewise.
15618         (*umulsidi3adddi): Likewise.
15619         (smulsi3_highpart): Likewise.
15620         (*smulsi3_highpart_nov6): Likewise.
15621         (umulsi3_highpart): Likewise.
15622         (*umulsi3_highpart_nov6): Likewise.
15623         * config/arm/arm.h (arm_arch3m): Delete.
15624         * config/arm/arm.c (arm_arch3m): Delete.
15625         (arm_option_override_internal): Update armv3-related comment.
15626         (arm_configure_build_target): Delete use of isa_bit_mode32.
15627         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
15628         (arm_rtx_costs_internal): Delete check of arm_arch3m.
15629         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
15630         (mulsa3): Likewise.
15631         (mulusa3): Likewise.
15632         * config/arm/arm-protos.h (arm_arch3m): Delete.
15633         * config/arm/arm-tables.opt: Regenerate.
15634         * config/arm/arm-tune.md: Likewise.
15635         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
15636         deleted architectures.
15638 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15640         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
15641         (armv5t, armv5te): New features.
15642         (ARMv5, ARMv5e): Delete fgroups.
15643         (ARMv5t, ARMv5te): Adjust for above changes.
15644         (ARMv6m): Likewise.
15645         (armv5, armv5e): Delete arches.
15646         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
15647         arm_arch5.
15648         (*call_reg_arm): Likewise.
15649         (*call_value_reg_armv5): Likewise.
15650         (*call_value_reg_arm): Likewise.
15651         (*call_symbol): Likewise.
15652         (*call_value_symbol): Likewise.
15653         (*sibcall_insn): Likewise.
15654         (*sibcall_value_insn): Likewise.
15655         (clzsi2): Likewise.
15656         (prefetch): Likewise.
15657         (define_split and define_peephole2 dependent on arm_arch5):
15658         Likewise.
15659         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
15660         arm_arch5e.
15661         (TARGET_ARM_QBIT): Likewise.
15662         (TARGET_DSP_MULTIPLY): Likewise.
15663         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
15664         (arm_arch5, arm_arch5e): Delete.
15665         (arm_arch5t, arm_arch5te): Declare.
15666         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
15667         (arm_arch5t): Declare.
15668         (arm_option_reconfigure_globals): Update for the above.
15669         (arm_options_perform_arch_sanity_checks): Update comment, replace
15670         use of arm_arch5 with arm_arch5t.
15671         (use_return_insn): Likewise.
15672         (arm_emit_call_insn): Likewise.
15673         (output_return_instruction): Likewise.
15674         (arm_final_prescan_insn): Likewise.
15675         (arm_coproc_builtin_available): Likewise.
15676         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
15677         arm_arch5e with arm_arch5t and arm_arch5te.
15678         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
15679         (arm_arch5t, arm_arch5te): Declare.
15680         * config/arm/arm-tables.opt: Regenerate.
15681         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
15682         * config/arm/t-multilib: Likewise.
15683         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
15684         instead of arm_arch5.
15685         (*call_reg_thumb1): Likewise.
15686         (*call_value_reg_thumb1_v5): Likewise.
15687         (*call_value_reg_thumb1): Likewise.
15688         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
15689         unreachable path.
15690         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
15692 2018-05-18  Martin Liska  <mliska@suse.cz>
15694         PR gcov-profile/84846
15695         * doc/gcov.texi: Document -t option of gcov tool.
15697 2018-05-18  Martin Liska  <mliska@suse.cz>
15699         PR gcov-profile/84846
15700         * gcov.c (print_usage): Add new -t option.
15701         (process_args): Handle the option.
15702         (generate_results): Use stdout as output when requested by
15703         the option.
15705 2018-05-18  Martin Liska  <mliska@suse.cz>
15707         PR gcov-profile/84846
15708         * coverage.c (coverage_init): Write PWD to .gcno file.
15709         * doc/gcov.texi: Document how working directory is printed.
15710         * gcov-dump.c (dump_gcov_file): Print PWD.
15711         * gcov.c (output_intermediate_file): Likewise.
15712         (read_graph_file): Read PWD string.
15713         (output_lines): Print PWD.
15715 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15717         PR middle-end/85817
15718         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
15719         for retval and return false if all args to phi are zero.
15721 2018-05-18  Richard Biener  <rguenther@suse.de>
15723         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
15724         method.
15725         (evrp_dom_walker::before_dom_children): Call it.
15727 2018-05-18  Richard Biener  <rguenther@suse.de>
15729         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
15730         results when processing array refs with variable index.
15732 2018-05-18  Toon Moene  <toon@moene.org>
15734         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
15735         directly after that of -floop-interchange. Indicate that both
15736         options are enabled by default when specifying -O3.
15738 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15740         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
15741         iterator.  Delete separate integer-mode vec_set<mode> expander.
15742         (aarch64_simd_vec_setv2di): Delete.
15743         (vec_setv2di): Delete.
15744         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
15745         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
15746         the "w, r" alternative.
15748 2018-05-18  Martin Liska  <mliska@suse.cz>
15750         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
15751         * tree-pass.h (make_pass_lower_switch_O0): New function.
15752         * tree-switch-conversion.c (node_has_low_bound): Remove.
15753         (node_has_high_bound): Likewise.
15754         (node_is_bounded): Likewise.
15755         (class pass_lower_switch): Make it a template type and create
15756         two instances.
15757         (pass_lower_switch::execute): Add template argument.
15758         (make_pass_lower_switch): New function.
15759         (make_pass_lower_switch_O0): New function.
15760         (do_jump_if_equal): Remove.
15761         (emit_case_nodes): Simplify to just handle all 3 cases and leave
15762         all the hard work to tree optimization passes.
15764 2018-05-18  Martin Liska  <mliska@suse.cz>
15766         * dbgcnt.c (limit_low): Renamed from limit.
15767         (limit_high): New variable.
15768         (dbg_cnt_is_enabled): Check for upper limit.
15769         (dbg_cnt): Adjust dumping.
15770         (dbg_cnt_set_limit_by_index): Add new argument for high
15771         value.
15772         (dbg_cnt_set_limit_by_name): Likewise.
15773         (dbg_cnt_process_single_pair): Parse new format.
15774         (dbg_cnt_process_opt): Use strtok.
15775         (dbg_cnt_list_all_counters): Remove 'value' and add
15776         'limit_high'.
15777         * doc/invoke.texi: Document changes.
15779 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
15781         * doc/sourcebuild.texi (scalar_all_fma): Document.
15782         * tree.def (FMA_EXPR): Delete.
15783         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
15784         * internal-fn.c (ternary_direct): New macro.
15785         (expand_ternary_optab_fn): Likewise.
15786         (direct_ternary_optab_supported_p): Likewise.
15787         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
15788         * builtins.c (fold_builtin_fma): Delete.
15789         (fold_builtin_3): Don't call it.
15790         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
15791         * expr.c (expand_expr_real_2): Likewise.
15792         * fold-const.c (operand_equal_p): Likewise.
15793         (fold_ternary_loc): Likewise.
15794         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
15795         * gimple.c (DEFTREECODE): Likewise.
15796         * gimplify.c (gimplify_expr): Likewise.
15797         * optabs-tree.c (optab_for_tree_code): Likewise.
15798         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15799         * tree-eh.c (operation_could_trap_p): Likewise.
15800         (stmt_could_throw_1_p): Likewise.
15801         * tree-inline.c (estimate_operator_cost): Likewise.
15802         * tree-pretty-print.c (dump_generic_node): Likewise.
15803         (op_code_prio): Likewise.
15804         * tree-ssa-loop-im.c (stmt_cost): Likewise.
15805         * tree-ssa-operands.c (get_expr_operands): Likewise.
15806         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
15807         * fold-const-call.h (fold_fma): Delete.
15808         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
15809         CFN_FNMA and CFN_FNMS.
15810         (fold_fma): Delete.
15811         * genmatch.c (combined_fn): New enum.
15812         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
15813         (commutative_op): New function.
15814         (commutate): Use it.  Handle more than 2 operands.
15815         (dt_operand::gen_gimple_expr): Use commutative_op.
15816         (parser::parse_expr): Allow :c to be used with non-binary
15817         operators if the commutative operand is known.
15818         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
15819         CFN_FMS, CFN_FNMA and CFN_FNMS.
15820         (backprop::process_assign_use): Remove FMA_EXPR handling.
15821         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
15822         (gen_hsa_fma): New function.
15823         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
15824         IFN_FNMA and IFN_FNMS.
15825         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
15826         * gimple-fold.h (follow_all_ssa_edges): Declare.
15827         * gimple-fold.c (follow_all_ssa_edges): New function.
15828         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15829         gimple_build interface and use follow_all_ssa_edges to fold the result.
15830         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15831         instead of checking for optabs directly.
15832         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15833         rather than FMA_EXPRs.
15834         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15835         call to IFN_FMA instead of an FMA_EXPR.
15837 2018-05-17  Jim Wilson  <jimw@sifive.com>
15839         * expr.c (do_tablejump): When converting index to Pmode, if we have a
15840         sign extended promoted subreg, and the range does not have the sign bit
15841         set, then do a sign extend.
15843         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15844         test, check for sign extended subreg and/or constant operands, and
15845         do a sign extend in that case.
15847 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
15849         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15850         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15851         Add untyped.
15852         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15853         Change logics_shift_reg to logics_shift_imm.
15854         (thunderx2t99_fp_loadpair_basic): Delete.
15855         (thunderx2t99_fp_storepair_basic): Delete.
15856         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15857         (thunderx2t99_asimd_polynomial): Delete.
15858         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15859         and neon_fp_mul_d_scalar_q.
15860         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15861         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15862         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15863         (thunderx2t99_asimd_lut): Add missing tbl types.
15864         (thunderx2t99_asimd_ext): Delete.
15865         (thunderx2t99_asimd_load1_1_mult): Delete.
15866         (thunderx2t99_asimd_load1_2_mult): Delete.
15867         (thunderx2t99_asimd_load1_ldp): New.
15868         (thunderx2t99_asimd_load1): New.
15869         (thunderx2t99_asimd_load2): Add missing *load2* types.
15870         (thunderx2t99_asimd_load3): New.
15871         (thunderx2t99_asimd_load4): New.
15872         (thunderx2t99_asimd_store1_1_mult): Delete.
15873         (thunderx2t99_asimd_store1_2_mult): Delete.
15874         (thunderx2t99_asimd_store2_mult): Delete.
15875         (thunderx2t99_asimd_store2_onelane): Delete.
15876         (thunderx2t99_asimd_store_stp): New.
15877         (thunderx2t99_asimd_store1): New.
15878         (thunderx2t99_asimd_store2): New.
15879         (thunderx2t99_asimd_store3): New.
15880         (thunderx2t99_asimd_store4): New.
15882 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
15884         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15885         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
15887 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
15888             Segher Boessenkool  <segher@kernel.crashing.org>
15890         PR target/85698
15891         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15892         operand.
15894 2018-05-17  Richard Biener  <rguenther@suse.de>
15896         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15897         for pruning loop and prune defs feeding only already visited PHIs.
15899 2018-05-17  Richard Biener  <rguenther@suse.de>
15901         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15903 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
15904             Richard Biener  <rguenther@suse.de>
15906         PR tree-optimization/85793
15907         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15908         for VMAT_ELEMENTWISE.
15910 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15912         * internal-fn.h (lookup_internal_fn): Declare
15913         * internal-fn.c (lookup_internal_fn): New function.
15914         * gimple.c (gimple_build_call_from_tree): Handle calls to
15915         internal functions.
15916         * gimple-pretty-print.c (dump_gimple_call): Print "." before
15917         internal function names.
15918         * tree-pretty-print.c (dump_generic_node): Likewise.
15919         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15921 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15923         * gimple-fold.h (gimple_build): Make the function forms take
15924         combined_fn rather than built_in_function.
15925         (gimple_simplify): Likewise.
15926         * gimple-match-head.c (gimple_simplify): Likewise.
15927         * gimple-fold.c (gimple_build): Likewise.
15928         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15929         rather than gimple_build_call_internal.
15930         (get_initial_defs_for_reduction): Likewise.
15931         (vect_create_epilog_for_reduction): Likewise.
15932         (vectorizable_live_operation): Likewise.
15934 2018-05-17  Martin Liska  <mliska@suse.cz>
15936         * gimple-ssa-sprintf.c (format_directive): Do not use
15937         space in between 'G_' and '('.
15939 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
15941         PR target/85323
15942         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15943         even if the mask is not all ones.
15945         PR target/85323
15946         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15947         vector.
15948         (ix86_gimple_fold_builtin): Likewise.
15950         PR target/85323
15951         * config/i386/i386.c: Include tree-vector-builder.h.
15952         (ix86_vector_shift_count): New function.
15953         (ix86_fold_builtin): Fold shift builtins by scalar count.
15954         (ix86_gimple_fold_builtin): Likewise.
15956         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15957         _mm512_setzero): New intrinsics.
15959 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
15960             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15962         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15963         code generation for cases where splatting a value is not useful.
15964         * simplify-rtx.c (simplify_ternary_operation): Simplify
15965         vec_merge across a vec_duplicate and a paradoxical subreg forming
15966         a vector mode to a vec_concat.
15968 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
15970         * config.gcc: Support "goldmont-plus".
15971         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15972         "goldmont-plus".
15973         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15974         PROCESSOR_GOLDMONT_PLUS.
15975         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15976         (processor_target_table): Add "goldmont-plus".
15977         (PTA_GOLDMONT_PLUS): Define.
15978         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15979         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15980         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15981         (fold_builtin_cpu): Add "goldmont-plus".
15982         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15983         (ix86_option_override_internal): Add "goldmont-plus".
15984         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15985         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15986         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15987         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15989 2018-05-17  Richard Biener  <rguenther@suse.de>
15991         PR tree-optimization/85757
15992         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15993         remove defs that only feed that PHI from further processing.
15995 2018-05-16  Jim Wilson  <jimw@sifive.com>
15997         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15998         asterisk to name.
15999         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16001 2018-05-16  Mark Wielaard  <mark@klomp.org>
16003         * dwarf2out.c (count_index_strings): New function.
16004         (output_indirect_strings): Call count_index_strings and generate
16005         header for dwarf_version >= 5.
16007 2018-05-16  Mark Wielaard  <mark@klomp.org>
16009         * dwarf2out.c (dwarf_FORM): New function.
16010         (set_indirect_string): Use dwarf_FORM.
16011         (reset_indirect_string): Likewise.
16012         (size_of_die): Likewise.
16013         (value_format): Likewise.
16014         (output_die): Likewise.
16015         (add_skeleton_AT_string): Likewise.
16016         (output_macinfo_op): Likewise.
16017         (index_string): Likewise.
16018         (output_index_string_offset): Likewise.
16019         (output_index_string): Likewise.
16020         (count_index_strings): Likewise.
16022 2018-05-16  Carl Love  <cel@us.ibm.com>
16024         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16025         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16027 2018-05-16  Martin Jambor  <mjambor@suse.cz>
16029         * ipa-prop.c (ipa_free_all_edge_args): Remove.
16030         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16032 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
16034         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16035         (fnma<mode>4): Likewise.
16036         (fms<mode>4): Likewise.
16037         (fnms<mode>4): Likewise.
16038         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16039         (aarch64_fnma<mode>4): Likewise.
16040         (aarch64_fms<mode>4): Likewise.
16041         (aarch64_fnms<mode>4): Likewise.
16042         (aarch64_fnmadd<mode>4): Likewise.
16044 2018-05-16  Jason Merrill  <jason@redhat.com>
16046         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
16048 2018-05-16  Richard Biener  <rguenther@suse.de>
16050         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16051         (dump_stmt_cost): Declare.
16052         (add_stmt_cost): Dump cost we add.
16053         (add_stmt_costs): New function.
16054         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16055         No longer exported.
16056         (vect_analyze_stmt): Adjust prototype.
16057         (vectorizable_condition): Likewise.
16058         (vectorizable_live_operation): Likewise.
16059         (vectorizable_reduction): Likewise.
16060         (vectorizable_induction): Likewise.
16061         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16062         cost vector to pass to vectorizable_ and record afterwards.
16063         (vect_model_reduction_cost): Take cost vector argument and adjust.
16064         (vect_model_induction_cost): Likewise.
16065         (vectorizable_reduction): Likewise.
16066         (vectorizable_induction): Likewise.
16067         (vectorizable_live_operation): Likewise.
16068         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16069         SLP_TREE_NUMBER_OF_VEC_STMTS.
16070         (vect_analyze_slp_cost_1): Remove.
16071         (vect_analyze_slp_cost): Likewise.
16072         (vect_slp_analyze_node_operations): Take visited args and
16073         a target cost vector.  Avoid processing already visited stmt sets.
16074         (vect_slp_analyze_operations): Use a local cost vector to gather
16075         costs and register those of non-discarded instances.
16076         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16077         (vect_schedule_slp_instance): Remove copying of
16078         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
16079         zero.
16080         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16081         adding cost.  Record cost entry location.
16082         (vect_prologue_cost_for_slp_op): Function to compute cost of
16083         a constant or invariant generated for SLP vect in the prologue,
16084         split out from vect_analyze_slp_cost_1.
16085         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
16086         (vect_model_promotion_demotion_cost): Likewise.
16087         (vect_model_store_cost): Likewise, make static.
16088         (vect_model_load_cost): Likewise.
16089         (vectorizable_bswap): Add cost vector arg and adjust.
16090         (vectorizable_call): Likewise.
16091         (vectorizable_simd_clone_call): Likewise.
16092         (vectorizable_conversion): Likewise.
16093         (vectorizable_assignment): Likewise.
16094         (vectorizable_shift): Likewise.
16095         (vectorizable_operation): Likewise.
16096         (vectorizable_store): Likewise.
16097         (vectorizable_load): Likewise.
16098         (vectorizable_condition): Likewise.
16099         (vectorizable_comparison): Likewise.
16100         (can_vectorize_live_stmts): Likewise.
16101         (vect_analyze_stmt): Likewise.
16102         (vect_transform_stmt): Adjust calls to vectorizable_*.
16103         * tree-vectorizer.c: Include gimple-pretty-print.h.
16104         (dump_stmt_cost): New function.
16106 2018-05-16  Richard Biener  <rguenther@suse.de>
16108         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16109         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16110         * tree-ssa-dse.c: Include tree-ssa-loop.h.
16111         (check_name): New callback.
16112         (dse_classify_store): Track cycles via a visited bitmap of PHI
16113         defs and simplify handling of in-loop and across loop dead stores
16114         and properly fail for loop-variant refs.  Handle byte-tracking with
16115         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16116         limiting the walk.
16118 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
16120         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16121         (vect_get_mask_type_for_stmt): Likewise.
16122         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16123         split out from...
16124         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
16125         to determine the statement's vector type and the vector type that
16126         should be used for calculating nunits.  Deal with cases in which
16127         the type has to be deferred.
16128         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16129         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16130         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16131         (vect_determine_vf_for_stmt): New functions, split out from...
16132         (vect_determine_vectorization_factor): ...here.
16133         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16134         (vect_get_mask_type_for_stmt): New functions, split out from
16135         vect_determine_vectorization_factor.
16137 2018-05-16  Richard Biener  <rguenther@suse.de>
16139         * tree-cfg.c (verify_gimple_assign_ternary): Properly
16140         verify the [VEC_]COND_EXPR embedded comparison.
16142 2018-05-15  Martin Sebor  <msebor@redhat.com>
16144         PR tree-optimization/85753
16145         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16146         RECORD_TYPE in addition to ARRAY_TYPE.
16148 2018-05-15  Martin Sebor  <msebor@redhat.com>
16150         PR middle-end/85643
16151         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16153 2018-05-15  Richard Biener  <rguenther@suse.de>
16155         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16156         add by_clobber_p one.  Change algorithm to collect all defs
16157         representing uses we need to walk and try reducing them to
16158         a single one before failing.
16159         (dse_dom_walker::dse_optimize_stmt): Adjust.
16161 2018-05-13  Mark Wielaard  <mark@klomp.org>
16163         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16164         (size_of_loc_descr): Likewise.
16165         (output_loc_operands): Likewise.
16166         (output_loc_operands_raw): Likewise.
16167         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16168         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16169         (hash_loc_operands): Likewise.
16170         (compare_loc_operands): Likewise.
16172 2018-05-14  Mark Wielaard  <mark@klomp.org>
16174         * dwarf2out.c (count_index_addrs): New function.
16175         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16177 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16179         PR tree-optimization/83648
16180         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16181         return value as malloc candidate.
16183 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16185         PR ipa/85734
16186         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16187         param as true in call to suggest_attribute.
16189 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
16191         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16192         -mreadonly-in-sdata.
16194 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16196         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16197         New pattern.
16198         (aarch64_crypto_aesd_fused): Likewise.
16200 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
16202         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16203         (movsi_aarch64): Likewise.
16204         (load_pairsi): Likewise.
16205         (load_pairdi): Likewise.
16206         (store_pairsi): Likewise.
16207         (store_pairdi): Likewise.
16208         (load_pairsf): Likewise.
16209         (load_pairdf): Likewise.
16210         (store_pairsf): Likewise.
16211         (store_pairdf): Likewise.
16212         (zero_extend): Likewise.
16213         (trunc): Swap alternatives.
16214         (fcvt_target): Add '?' to prefer w over r.
16216 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
16218         PR target/85756
16219         * config/i386/i386.md: Disallow non-commutative arithmetics in
16220         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16221         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
16222         in the peephole2 before it.
16224 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
16226         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16227         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16228         (ix86_handle_option): Handle -mcldemote.
16229         * config.gcc: New header.
16230         * config/i386/cldemoteintrin.h: New file.
16231         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16232         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16233         -mcldemote.
16234         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16235         OPTION_MASK_ISA_CLDEMOTE.
16236         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16237         (ix86_valid_target_attribute_inner_p): Ditto.
16238         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16239         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16240         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16241         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16242         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16243         (cldemote): New.
16244         * config/i386/i386.opt: Add -mcldemote.
16245         * config/i386/x86intrin.h: New header.
16246         * doc/invoke.texi: Add -mcldemote.
16248 2018-05-14  Richard Biener  <rguenther@suse.de>
16250         * doc/match-and-simplify.texi: Adjust :s documentation.
16252 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
16254         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16255         intended memcpy size.
16256         (REORDER_45): Likewise.
16258 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
16260         * sort.cc: New file.
16261         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16262         * vec.c (qsort_chk): Use gcc_qsort.
16263         * Makefile.in (OBJS-libcommon): Add sort.o.
16264         (build/sort.o): New target.  Use it...
16265         (BUILD_RTL): ... here, and...
16266         (build/gencfn-macros): ... here, and...
16267         (build/genmatch): ... here.
16269 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16270             Chung-Ju Wu  <jasonwucj@gmail.com>
16272         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16273         * config/nds32/nds32-graywolf.md: New file.
16274         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16275         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16276         pipeline.
16277         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16278         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16279         * config/nds32/nds32.md (pipeline_model): Add graywolf.
16280         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16281         * config/nds32/pipelines.md: Include n15 settings.
16283 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16284             Chung-Ju Wu  <jasonwucj@gmail.com>
16286         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16287         * config/nds32/nds32-n13.md: New file.
16288         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16289         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16290         pipeline.
16291         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16292         * config/nds32/nds32.md (pipeline_model): Add n13.
16293         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16294         * config/nds32/pipelines.md: Include n13 settings.
16296 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16297             Chung-Ju Wu  <jasonwucj@gmail.com>
16299         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16300         * config/nds32/nds32-n10.md: New file.
16301         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16302         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16303         pipeline.
16304         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16305         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16306         * config/nds32/nds32.md (pipeline_model): Add n10.
16307         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16308         * config/nds32/pipelines.md: Include n10 settings.
16310 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
16311             Kito Cheng  <kito.cheng@gmail.com>
16312             Chung-Ju Wu  <jasonwucj@gmail.com>
16314         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16315         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16316         Add enum values for DSP extension instructions.
16317         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16318         New constraints.
16319         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16320         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16321         New code iterators.
16322         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16323         * config/nds32/nds32-dspext.md: New file for DSP implementation.
16324         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16325         * config/nds32/nds32-intrinsic.md: Likewise.
16326         * config/nds32/nds32_intrinsic.h: Likewise.
16327         * config/nds32/nds32-md-auxiliary.c: Likewise.
16328         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16329         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16330         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16331         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16332         * config/nds32/nds32-protos.h: New declarations for DSP extension.
16333         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16334         TYPE_DMAC in switch statement.
16335         * config/nds32/nds32.c: New checking and implementation for DSP
16336         extension instructions.
16337         * config/nds32/nds32.h: Likewise.
16338         * config/nds32/nds32.md: Likewise.
16339         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16340         * config/nds32/predicates.md: Implement new predicates for DSP
16341         extension.
16343 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16345         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16346         Reformat alternatives and attributes so it is easier to identify
16347         which constraints/attributes go with which instruction.
16348         (mov<mode>_hardfloat32, FMOVE64): Likewise.
16349         (mov<mode>_softfloat32, FMOVE64): Likewise.
16350         (mov<mode>_hardfloat64, FMOVE64): Likewise.
16351         (mov<mode>_softfloat64, FMOVE64): Likewise.
16353 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16355         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16356         subsection.
16357         (Basic PowerPC Built-in Functions): The new name of the
16358         subsection previously known as "PowerPC Built-in Functions".
16359         (Basic PowerPC Built-in Functions Available on all Configurations):
16360         New subsubsection.
16361         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16362         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16363         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16364         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16366 2018-05-11  Martin Jambor  <mjambor@suse.cz>
16368         PR ipa/85655
16369         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16370         single const.
16372 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16374         PR target/85733
16375         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16377 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
16379         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16380         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16381         (ix86_handle_option): Handle -mwaitpkg.
16382         * config.gcc: New header.
16383         * config/i386/cpuid.h (bit_WAITPKG): New bit.
16384         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
16385         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
16386         function type.
16387         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16388         OPTION_MASK_ISA_WAITPKG.
16389         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
16390         (ix86_option_override_internal): Add PTA_WAITPKG.
16391         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
16392         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
16393         IX86_BUILTIN_TPAUSE.
16394         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
16395         __builtin_ia32_umwait and __builtin_ia32_tpause.
16396         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
16397         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
16398         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
16399         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
16400         UNSPECV_TPAUSE): New.
16401         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
16402         * config/i386/i386.opt: Add -mwaitpkg.
16403         * config/i386/waitpkgintrin.h: New file.
16404         * config/i386/x86intrin.h: New header.
16405         * doc/invoke.texi: Add -mwaitpkg.
16407 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16409         PR target/85606
16410         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
16411         equivalent.
16412         (cortex-m0): Use armv6s-m isa.
16413         (cortex-m0plus): Likewise.
16414         (cortex-m1): Likewise.
16415         (cortex-m0.small-multiply): Likewise.
16416         (cortex-m0plus.small-multiply): Likewise.
16417         (cortex-m1.small-multiply): Likewise.
16419 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
16420             Jakub Jelinek  <jakub@redhat.com>
16422         PR tree-optimization/85692
16423         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
16424         source permute as well.
16426 2018-05-11  Martin Liska  <mliska@suse.cz>
16428         PR sanitizer/85556
16429         * doc/extend.texi: Document LLVM style format for no_sanitize
16430         attribute.
16432 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
16434         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
16435         mode_supports_vsx_dform_quad to mode_supports_dq_form.
16436         (mode_supports_vsx_dform_quad): Likewise.
16437         (mode_supports_vmx_dform): Move these functions to be next to the
16438         other mode_supports functions.
16439         (mode_supports_dq_form): Likewise.
16440         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
16441         mode_supports_dq_form.
16442         (reg_offset_addressing_ok_p): Likewise.
16443         (offsettable_ok_by_alignment): Likewise.
16444         (rs6000_legitimate_offset_address_p): Likewise.
16445         (legitimate_lo_sum_address_p): Likewise.
16446         (rs6000_legitimize_address): Likewise.
16447         (rs6000_legitimize_reload_address): Likewise.
16448         (rs6000_secondary_reload_inner): Likewise.
16449         (rs6000_preferred_reload_class): Likewise.
16450         (rs6000_output_move_128bit): Likewise.
16452 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16454         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
16455         Generate SImode target register for null target.
16456         <case IX86_BUILTIN_XGETBV>: Ditto.
16457         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
16458         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
16460 2018-05-10  Carl Love  <cel@us.ibm.com>
16462         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16463         dcbtt and dcbtstt if operands[2] is 0.
16465 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16467         PR target/85693
16468         * config/i386/sse.md (usadv64qi): New expander.
16470 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
16472         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
16473         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
16474         -maltivec=be support.
16475         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
16476         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
16477         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
16478         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
16479         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
16480         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
16481         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
16482         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
16483         altivec_vsumsws): Adjust.
16484         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
16485         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
16486         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
16487         support.
16488         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
16489         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
16490         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
16491         (altivec_lve<VI_char>x): Delete expand.
16492         (*altivec_lve<VI_char>x_internal): Rename to...
16493         (altivec_lve<VI_char>x): ... this.
16494         (altivec_lvxl_<mode>): Delete expand.
16495         (*altivec_lvxl_<mode>_internal): Rename to ...
16496         (altivec_lvxl_<mode>): ... this.
16497         (altivec_stvxl_<mode>): Delete expand.
16498         (*altivec_stvxl_<mode>_internal): Rename to ...
16499         (altivec_stvxl_<mode>): ... this.
16500         (altivec_stve<VI_char>x): Delete expand.
16501         (*altivec_stve<VI_char>x_internal): Rename to ...
16502         (altivec_stve<VI_char>x): ... this.
16503         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
16504         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
16505         reduc_plus_scal_<mode>): Adjust.
16506         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
16507         comment.
16508         (rs6000_cpu_cpp_builtins): Adjust.
16509         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
16510         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
16511         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
16512         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
16513         -maltivec=be support.
16514         (rs6000_split_vec_extract_var): Adjust.
16515         (rs6000_split_v4si_init): Adjust.
16516         (swap_selector_for_mode): Delete.
16517         (altivec_expand_lvx_be, altivec_expand_stvx_be,
16518         altivec_expand_stvex_be): Delete.
16519         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
16520         -maltivec=be support.
16521         (rs6000_gimple_fold_builtin): Ditto.
16522         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
16523         Adjust.
16524         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
16525         (TARGET_DIRECT_MOVE_64BIT): Adjust.
16526         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
16527         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
16528         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
16529         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
16530         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
16531         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
16532         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
16533         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
16534         anonymous split): Adjust.
16535         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
16536         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
16538 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
16540         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
16541         when --with-gxx-include-dir is also specified.
16542         * configure: Regenerate.
16544 2018-05-09  Jim Wilson  <jimw@sifive.com>
16546         PR target/84797
16547         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
16548         * config/riscv/t-withmultilib: New.
16549         * config/riscv/withmultilib.h: New.
16550         * doc/install.texi: Document RISC-V --with-multilib-list support.
16552 2018-05-09  Richard Biener  <rguenther@suse.de>
16554         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
16555         vector.
16556         (vect_bb_vectorization_profitable_p): Adjust.  Compute
16557         actual scalar cost using the cost vector and the add_stmt_cost
16558         machinery.
16560 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16562         PR rtl-optimization/85645
16563         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
16564         in the REG_CFA_REGISTER note for LR, don't leave it empty.
16566 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16568         PR rtl-optimization/85645
16569         * shrink-wrap.c (spread_components): Return a boolean saying if
16570         anything was changed.
16571         (try_shrink_wrapping_separate): Iterate spread_components until
16572         nothing changes anymore.
16574 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16576         PR rtl-optimization/85645
16577         * regrename.c (build_def_use): Also kill the chains that include the
16578         destination of a REG_CFA_REGISTER note.
16580 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16582         PR rtl-optimization/85645
16583         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
16584         insn that has a REG_CFA_REGISTER note.
16586 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
16588         * cfgexpand.c (expand_clobber): New function.
16589         (expand_gimple_stmt_1): Use it.
16590         * tree-vect-stmts.c (vect_clobber_variable): New function,
16591         split out from...
16592         (vectorizable_simd_clone_call): ...here.
16593         (vectorizable_store): Emit a clobber either side of an
16594         IFN_STORE_LANES sequence.
16595         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
16597 2018-05-09  Tom de Vries  <tom@codesourcery.com>
16599         PR target/85626
16600         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
16601         (define_insn "trap_if_false"): Add exit after trap.
16603 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
16605         PR rtl-optimization/85638
16606         * bb-reorder.c: Include common/common-target.h.
16607         (create_forwarder_block): New function extracted from...
16608         (fix_up_crossing_landing_pad): ...here.  Rename into...
16609         (dw2_fix_up_crossing_landing_pad): ...this.
16610         (sjlj_fix_up_crossing_landing_pad): New function.
16611         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
16612         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
16613         from both partitions and exit the loop after one iteration.
16615 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16617         Revert:
16618         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16619         subsection.
16620         (Basic PowerPC Built-in Functions): The new name of the
16621         subsection previously known as "PowerPC Built-in Functions".
16622         (Basic PowerPC Built-in Functions Available on all Configurations):
16623         New subsubsection.
16624         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16625         subsubsection.
16626         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16627         subsubsection.
16628         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16629         subsubsection.
16630         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16631         subsubsection.
16633 2018-05-08  Jim Wilson  <jimw@sifive.com>
16635         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
16636         (LD_EMUL_SUFFIX): New.
16637         (LINK_SPEC): Use it.
16639 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16641         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16642         subsection.
16643         (Basic PowerPC Built-in Functions): The new name of the
16644         subsection previously known as "PowerPC Built-in Functions".
16645         (Basic PowerPC Built-in Functions Available on all Configurations):
16646         New subsubsection.
16647         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16648         subsubsection.
16649         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16650         subsubsection.
16651         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16652         subsubsection.
16653         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16654         subsubsection.
16656 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16658         PR target/85683
16659         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
16660         after cmpelim optimization.
16662 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
16664         * config.gcc: Support "goldmont".
16665         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
16666         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16667         PROCESSOR_GOLDMONT.
16668         * config/i386/i386.c (m_GOLDMONT): Define.
16669         (processor_target_table): Add "goldmont".
16670         (PTA_GOLDMONT): Define.
16671         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
16672         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
16673         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
16674         (fold_builtin_cpu): Add "goldmont".
16675         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
16676         (ix86_option_override_internal): Add "goldmont".
16677         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
16678         (processor_type): Add PROCESSOR_GOLDMONT.
16679         * config/i386/i386.md: Add CPU "glm".
16680         * config/i386/glm.md: New file.
16681         * config/i386/x86-tune.def: Add m_GOLDMONT.
16682         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
16684 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16686         PR target/85572
16687         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
16688         E_V4DImode.
16689         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
16690         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
16691         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
16693         PR target/85317
16694         * config/i386/i386.c (ix86_fold_builtin): Handle
16695         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
16697         PR target/85480
16698         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
16699         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
16701 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
16703         PR target/85658
16704         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
16705         (check_arch): Likewise.
16706         (check_fpu): Return the result rather than printing it.
16707         (end arch): Fix operator precedence.
16708         (end cpu): Likewise.
16709         (END): Print the result from check_fpu.
16711 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16712             Alan Hayward  <alan.hayward@arm.com>
16713             David Sherwood  <david.sherwood@arm.com>
16715         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
16716         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
16717         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
16718         (*fcmuo<mode>_and): New patterns.
16720 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16722         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
16723         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
16724         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
16725         (cmp_op, sve_imm_con): New code attributes.
16726         (SVE_COND_INT_CMP, imm_con): Delete.
16727         (cmp_op): Remove above unspecs from int attribute.
16728         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
16729         to...
16730         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
16731         comparison-specific unspecs.
16732         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
16733         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
16734         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
16735         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
16736         (*vec_fcm<cmp_op><mode>): Rename to...
16737         (*fcm<cmp_op><mode>): ...this and adjust likewise.
16738         (*vec_fcmuo<mode>): Rename to...
16739         (*fcmuo<mode>): ...this and adjust likewise.
16740         (*pred_fcm<cmp_op><mode>): New pattern.
16741         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
16742         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
16743         functions.
16744         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
16745         and UNORDERED.
16746         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
16747         (aarch64_emit_sve_predicated_cond): New function.
16748         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
16749         (aarch64_emit_unspec_cond_or): Replace with...
16750         (aarch64_emit_sve_or_conds): ...this new function.  Use
16751         aarch64_emit_sve_ptrue_op for the individual comparisons and
16752         aarch64_emit_binop to OR them together.
16753         (aarch64_emit_inverted_unspec_cond): Replace with...
16754         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
16755         aarch64_emit_sve_ptrue_op for the comparison and
16756         aarch64_emit_unop to invert the result.
16757         (aarch64_expand_sve_vec_cmp_float): Update after the above
16758         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
16760 2018-05-07  Nathan Sidwell  <nathan@acm.org>
16762         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
16763         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
16764         (Backwards Compatibility): Likewise.
16766 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16768         PR bootstrap/85681
16769         Revert:
16770         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16772         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16773         <prefetch_dynamic_strides>: New const bool field.
16774         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16775         prefetch_dynamic_strides.
16776         (exynosm1_prefetch_tune): Likewise.
16777         (thunderxt88_prefetch_tune): Likewise.
16778         (thunderx_prefetch_tune): Likewise.
16779         (thunderx2t99_prefetch_tune): Likewise.
16780         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16781         to false.
16782         (aarch64_override_options_internal): Update to set
16783         PARAM_PREFETCH_DYNAMIC_STRIDES.
16784         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16785         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16786         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16787         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16788         prefetch-dynamic-strides setting.
16790         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16792         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16793         <minimum_stride>: New const int field.
16794         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16795         minimum_stride field.
16796         (exynosm1_prefetch_tune): Likewise.
16797         (thunderxt88_prefetch_tune): Likewise.
16798         (thunderx_prefetch_tune): Likewise.
16799         (thunderx2t99_prefetch_tune): Likewise.
16800         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16801         (aarch64_override_options_internal): Update to set
16802         PARAM_PREFETCH_MINIMUM_STRIDE.
16803         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16804         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16805         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16806         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16807         stride is constant and is below the minimum stride threshold.
16809 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16811         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
16812         to 512.
16814 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16816         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16817         <prefetch_dynamic_strides>: New const bool field.
16818         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16819         prefetch_dynamic_strides.
16820         (exynosm1_prefetch_tune): Likewise.
16821         (thunderxt88_prefetch_tune): Likewise.
16822         (thunderx_prefetch_tune): Likewise.
16823         (thunderx2t99_prefetch_tune): Likewise.
16824         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16825         to false.
16826         (aarch64_override_options_internal): Update to set
16827         PARAM_PREFETCH_DYNAMIC_STRIDES.
16828         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16829         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16830         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16831         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16832         prefetch-dynamic-strides setting.
16834 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16836         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16837         <minimum_stride>: New const int field.
16838         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16839         minimum_stride field.
16840         (exynosm1_prefetch_tune): Likewise.
16841         (thunderxt88_prefetch_tune): Likewise.
16842         (thunderx_prefetch_tune): Likewise.
16843         (thunderx2t99_prefetch_tune): Likewise.
16844         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16845         (aarch64_override_options_internal): Update to set
16846         PARAM_PREFETCH_MINIMUM_STRIDE.
16847         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16848         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16849         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16850         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16851         stride is constant and is below the minimum stride threshold.
16853 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
16855         PR c++/85659
16856         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16857         the type is addressable.  Don't force op into register if it has
16858         BLKmode.
16860 2018-05-05  Roland McGrath  <mcgrathr@google.com>
16862         PR other/77609
16863         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16864         any section for which we don't know a specific type it should have,
16865         regardless of name.  Previously this was done only for the exact
16866         names ".init_array", ".fini_array", and ".preinit_array".
16867         (default_elf_asm_named_section): Add comment about
16868         relationship with default_section_type_flags and SECTION_NOTYPE.
16869         (get_section): Don't consider it a type conflict if one side has
16870         SECTION_NOTYPE and the other doesn't, as long as neither has the
16871         SECTION_BSS et al used in the default_section_type_flags logic.
16873 2018-05-05  Tom de Vries  <tom@codesourcery.com>
16875         PR target/85653
16876         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16877         (workaround_barsyncs): New function.
16878         (nvptx_reorg): Use workaround_barsyncs.
16879         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16880         (define_expand "nvptx_membar_cta"): New define_expand.
16881         (define_insn "*nvptx_membar_cta"): New insn.
16883 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
16885         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16886         To improve optimization opportunities.
16887         * builtin-types.def: The new needed builtin types for the above.
16889 2018-05-04  Richard Biener  <rguenther@suse.de>
16891         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16892         * gimple-ssa-store-merging.c
16893         (imm_store_chain_info::output_merged_store): Remove redundant create,
16894         release split_store vector contents on failure.
16895         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16896         scalar stmt vector on cache hit.
16898 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
16900         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16901         Xilinx FP support.
16902         * config.gcc (powerpc-xilinx-eabi*): Remove.
16903         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16904         support.
16905         (fusion_addis_mem_combo_load): Ditto.
16906         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16907         FP support.
16908         (rs6000_cpu_cpp_builtins): Ditto.
16909         * config/rs6000/rs6000-linux.c
16910         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16911         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16912         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16913         support.
16914         (rs6000_setup_reg_addr_masks): Ditto.
16915         (rs6000_init_hard_regno_mode_ok): Ditto.
16916         (rs6000_option_override_internal): Ditto.
16917         (legitimate_lo_sum_address_p): Ditto.
16918         (rs6000_legitimize_address): Ditto.
16919         (rs6000_legitimize_reload_address): Ditto.
16920         (rs6000_legitimate_address_p): Ditto.
16921         (abi_v4_pass_in_fpr): Ditto.
16922         (setup_incoming_varargs): Ditto.
16923         (rs6000_gimplify_va_arg): Ditto.
16924         (rs6000_split_multireg_move): Ditto.
16925         (rs6000_savres_strategy): Ditto.
16926         (rs6000_emit_prologue_components): Ditto.
16927         (rs6000_emit_epilogue_components): Ditto.
16928         (rs6000_emit_prologue): Ditto.
16929         (rs6000_emit_epilogue): Ditto.
16930         (rs6000_elf_file_end): Ditto.
16931         (rs6000_function_value): Ditto.
16932         (rs6000_libcall_value): Ditto.
16933         * config/rs6000/rs6000.h: Ditto.
16934         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16935         (TARGET_MINMAX): ... this.  New.
16936         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16937         * config/rs6000/rs6000.md: Remove Xilinx FP support.
16938         (*movsi_internal1_single): Delete.
16939         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16940         mfpu=, mxilinx-fpu): Delete.
16941         * config/rs6000/singlefp.h: Delete.
16942         * config/rs6000/sysv4.h: Remove Xilinx FP support.
16943         * config/rs6000/t-rs6000: Ditto.
16944         * config/rs6000/t-xilinx: Delete.
16945         * config/rs6000/titan.md: Adjust for fp_type removal.
16946         * config/rs6000/vsx.md: Remove Xilinx FP support.
16947         (VStype_simple): Delete.
16948         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16949         * config/rs6000/xfpu.h: Delete.
16950         * config/rs6000/xfpu.md: Delete.
16951         * config/rs6000/xilinx.h: Delete.
16952         * config/rs6000/xilinx.opt: Delete.
16953         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16954         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16956 2018-05-04  Tom de Vries  <tom@codesourcery.com>
16958         PR libgomp/85639
16959         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16960         if ignore == 0.
16962 2018-05-04  Richard Biener  <rguenther@suse.de>
16964         PR middle-end/85627
16965         * tree-complex.c (update_complex_assignment): We are always in SSA form.
16966         (expand_complex_div_wide): Likewise.
16967         (expand_complex_operations_1): Likewise.
16968         (expand_complex_libcall): Preserve EH info of the original stmt.
16969         (tree_lower_complex): Handle removed blocks.
16970         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16971         on complex multiplication and division libcall builtins.
16973 2018-05-04  Richard Biener  <rguenther@suse.de>
16975         PR middle-end/85574
16976         * fold-const.c (negate_expr_p): Restrict negation of operand
16977         zero of a division to when we know that can happen without
16978         overflow.
16979         (fold_negate_expr_1): Likewise.
16981 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
16983         PR libstdc++/85466
16984         * real.h (real_nextafter): Declare.
16985         * real.c (real_nextafter): New function.
16986         * fold-const-call.c (fold_const_nextafter): New function.
16987         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16988         CASE_CFN_NEXTTOWARD.
16989         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16990         even when arg1_mode is different from arg0_mode.
16992 2018-05-03  Nathan Sidwell  <nathan@acm.org>
16994         * doc/extend.texi (Deprecated Features): Remove
16995         -ffriend-injection.
16996         (Backwards Compatibility): Likewise.
16997         * doc/invoke.texi (C++ Language Options): Likewise.
16998         (C++ Dialect Options): Likewise.
17000 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
17002         PR target/85530
17003         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17004         _mm512_mask_mullox_epi64): New intrinsics.
17006 2018-05-03  Tom de Vries  <tom@codesourcery.com>
17008         PR testsuite/85106
17009         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17010         dump files): Add offload-tree.
17012 2018-05-03  Richard Biener  <rguenther@suse.de>
17014         PR tree-optimization/85615
17015         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17016         to loops not nested in BBs loop father to avoid creating multi-entry
17017         loops.
17019 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17021         PR tree-optimization/70291
17022         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17023         arguments.  Change return type to tree.  Emit libcall as a new
17024         statement rather than replacing existing one when inplace_p is true.
17025         (expand_complex_multiplication_components): New function.
17026         (expand_complex_multiplication): Expand floating-point complex
17027         multiplication using the above.
17028         (expand_complex_division): Rename inner_type parameter to type.
17029         Update expand_complex_libcall call-site.
17030         (expand_complex_operations_1): Update expand_complex_multiplication
17031         and expand_complex_division call-sites.
17033 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17035         PR target/85582
17036         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17037         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17038         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17039         the highest significant bit of the shift count mask is clear.  In
17040         check whether and[sq]i3 is needed verify that all significant bits
17041         of the shift count other than the highest are set.
17043 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17045         PR libgomp/82428
17046         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17047         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17048         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17049         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17050         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17051         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17052         __builtin_goacc_parlevel_size.
17054 2018-05-02  Richard Biener  <rguenther@suse.de>
17056         PR tree-optimization/85597
17057         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17058         do not use split vect_get_vec_defs call but call vect_get_slp_defs
17059         directly.
17061 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17063         PR testsuite/85106
17064         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17065         dump files): Add ltrans-tree.
17067 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17069         PR testsuite/85106
17070         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17071         dump files): Add wpa-ipa.
17073 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
17075         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
17076         powerpc*-*-linux*paired* target.
17077         * config/rs6000/750cl.h: Delete.
17078         * config/rs6000/paired.h: Delete.
17079         * config/rs6000/paired.md: Delete.
17080         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17081         float support.
17082         * config/rs6000/rs6000-builtin.def: Remove paired float support.
17083         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17084         comment.  Remove paired float support.
17085         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17086         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17087         VECTOR_PAIRED.
17088         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17089         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17090         declarations.
17091         * config/rs6000/rs6000.c: Remove paired float support.
17092         (paired_expand_vector_init, paired_expand_vector_move,
17093         paired_emit_vector_compare, paired_emit_vector_cond_expr,
17094         (paired_expand_lv_builtin, paired_expand_stv_builtin,
17095         paired_expand_builtin, paired_expand_predicate_builtin,
17096         paired_init_builtins): Delete.
17097         * config/rs6000/rs6000.h: Remove paired float support.
17098         * config/rs6000/rs6000.md: Remove paired float support.
17099         (move_from_CR_ov_bit): Delete.
17100         * config/rs6000/rs6000.opt (mpaired): Delete.
17101         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17102         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17104 2018-05-02  Richard Biener  <rguenther@suse.de>
17106         PR middle-end/85567
17107         * gimplify.c (gimplify_save_expr): When in SSA form allow
17108         SAVE_EXPRs to compute to SSA vars.
17110 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17112         PR target/85582
17113         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17114         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17115         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17116         clobber operands[2], instead use a new pseudo.  Formatting fixes.
17118 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
17120         PR tree-optimization/85586
17121         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17122         exit early for statements in the same group if the accesses are
17123         not strided.
17125 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17127         PR lto/85451
17128         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17129         error message.
17131 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
17133         PR tree-optimization/85143
17134         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17136 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17138         PR lto/85451
17139         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17140         not found" error message.
17142 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17144         PR other/83786
17145         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17146         * vec.c (test_ordered_remove_if): New function.
17147         (vec_c_tests): Call test_ordered_remove_if.
17148         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17149         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17150         * tree-vect-patterns.c (vect_pattern_recog_1): Use
17151         VEC_ORDERED_REMOVE_IF.
17153 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17155         PR tree-optimization/82665
17156         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17157         pointer subtraction where arguments come from a memchr call.
17159 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
17161         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17162         --push-state --as-needed and --pop-state instead of --as-needed and
17163         --no-as-needed if ld supports it.
17164         * configure: Regenerated.
17166         PR web/85578
17167         * doc/install.texi2html: Replace _002d with - and _002a with * in
17168         generated html files using sed.
17170 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17172         PR c++/85523
17173         * gcc-rich-location.c (blank_line_before_p): New function.
17174         (use_new_line): New function.
17175         (gcc_rich_location::add_fixit_insert_formatted): New function.
17176         * gcc-rich-location.h
17177         (gcc_rich_location::add_fixit_insert_formatted): New function.
17179 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17181         * selftest.c (assert_streq): Rename "expected" and "actual" to
17182         "val1" and "val2".  Extend NULL-handling to cover both inputs
17183         symmetrically, while still requiring both to be non-NULL for a pass.
17184         * selftest.h (assert_streq): Rename "expected" and "actual" to
17185         "val1" and "val2".
17186         (ASSERT_EQ): Likewise.
17187         (ASSERT_EQ_AT): Likewise.
17188         (ASSERT_KNOWN_EQ): Likewise.
17189         (ASSERT_KNOWN_EQ_AT): Likewise.
17190         (ASSERT_NE): Likewise.
17191         (ASSERT_MAYBE_NE): Likewise.
17192         (ASSERT_MAYBE_NE_AT): Likewise.
17193         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
17194         the assertion to pass.
17195         (ASSERT_STREQ_AT): Likewise.
17197 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17199         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17200         interaction with -pie.
17202 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17204         * selftest.h: Fix alphabetization of per-source-file selftest
17205         declarations.
17207 2018-04-30  Jason Merrill  <jason@redhat.com>
17209         PR c++/61982 - dead stores to destroyed objects.
17210         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17211         of clobber.
17213 2018-04-30  Jason Merrill  <jason@redhat.com>
17215         * tree.c (build_clobber): New.
17216         * tree.h: Declare it.
17217         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17219 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17221         * diagnostic-show-locus.c (layout::layout): Update for
17222         location_get_source_line returning a char_span.
17223         (struct char_span): Move to input.h.
17224         (struct correction): Update for fields in char_span becoming
17225         private.
17226         (struct source_line): Update for location_get_source_line
17227         returning a char_span.
17228         (layout::print_line): Likewise.
17229         * edit-context.c (edited_file::print_content): Likewise.
17230         (edited_file::print_diff_hunk): Likewise.
17231         (edited_file::print_run_of_changed_lines): Likewise.
17232         (edited_file::get_num_lines): Likewise.
17233         (edited_line::edited_line): Likewise.
17234         * final.c (asm_show_source): Likewise.
17235         * input.c (location_get_source_line): Convert return type
17236         from const char * to char_span, losing the final "line_len"
17237         param.
17238         (dump_location_info): Update for the above.
17239         (get_substring_ranges_for_loc): Likewise.  Use a char_span
17240         when handling the literal within the line.
17241         (test_reading_source_line): Update for location_get_source_line
17242         returning a char_span.
17243         * input.h (class char_span): Move here from
17244         diagnostic-show-locus.c, converting from a struct to a class.
17245         Make data members private.
17246         (char_span::operator bool): New.
17247         (char_span::length): New.
17248         (char_span::get_buffer): New.
17249         (char_span::operator[]): New.
17250         (char_span::subspan): Make const.
17251         (char_span::xstrdup): New.
17252         (location_get_source_line): Convert return type from const char *
17253         to char_span, losing the final "line_size" param.
17255 2018-04-30  Jan Hubicka  <jh@suse.cz>
17257         * lto-wrapper.c (ltrans_priorities): New static var.
17258         (cmp_priority): New.
17259         (run_gcc): Read priorities and if doing parallel build order
17260         the Makefile by them.
17262 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17264         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17266 2018-04-30  Richard Biener  <rguenther@suse.de>
17268         * tree-cfg.c (verify_address): Remove base argument, add
17269         flag whether to check TREE_ADDRESSABLE and do that.
17270         (verify_expr): Remove.
17271         (verify_types_in_gimple_reference): Add pieces from verify_expr.
17272         (verify_gimple_assign_single): Likewise.
17273         (verify_gimple_switch): Likewise.
17274         (verify_expr_location_1): Dereference tp once.  Add (disabled)
17275         piece from verify_expr.
17276         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17278 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17280         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17282 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17284         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17285         (small_data_pattern): Likewise.
17286         (arc_rewrite_small_data): Likewise.
17287         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17288         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17289         (get_symbol_alignment): New function.
17290         (legitimate_small_data_address_p): Likewise.
17291         (legitimate_scaled_address): Update, call
17292         legitimate_small_data_address_p.
17293         (output_sdata): New static variable.
17294         (arc_print_operand): Update how we handle small data operands.
17295         (arc_print_operand_address): Likewise.
17296         (arc_legitimate_address_p): Update, use
17297         legitimate_small_data_address_p.
17298         (arc_rewrite_small_data_p): Remove.
17299         (arc_rewrite_small_data_1): Likewise.
17300         (arc_rewrite_small_data): Likewise.
17301         (small_data_pattern): Likewise.
17302         (compact_sda_memory_operand): Update to use
17303         legitimate_small_data_address_p and get_symbol_alignment.
17304         (prepare_move_operands): Don't rewite sdata pattern.
17305         (prepare_extend_operands): Remove.
17306         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17307         pattern.
17308         (zero_extendqisi2): Likewise.
17309         (zero_extendhisi2): Likewise.
17310         (extendqihi2): Likewise.
17311         (extendqisi2): Likewise.
17312         (extendhisi2): Likewise.
17313         (addsi3): Likewise.
17314         (subsi3): Likewise.
17315         (andsi3): Likewise.
17316         * config/arc/constraints.md (Usd): Change it to memory constraint.
17318 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17320         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17321         as source of std instructions.
17322         * config/arc/arc.md (movsi_insn): Update pattern predicate to
17323         allow 6-bit constants as source for store instructions.
17324         (movdi_insn): Update instruction pattern to allow 6-bit constants
17325         as source for store instructions.
17327 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17329         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17331 2018-04-30  Nathan Sidwell  <nathan@acm.org>
17332             Sandra Loosemore <sandra@codesourcery.com>
17334         * dumpfile.c (dump_open): Allow '-' for stdout.
17335         * doc/invoke.texi (Developer Options): Document dump filename
17336         determination early.  Document stdin/stdout selection.
17338 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
17340         Microblaze Target: PIC data text relative
17342         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17343         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17344         Add declaration.
17345         * config/microblaze/microblaze.h (microblaze_constant_address_p):
17346         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17347         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17348         New addressing mode for data-text relative position indepenedent code.
17349         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17350         'ADDRESS_SYMBOLIC_TXT_REL'.
17351         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17352         (microblaze_legitimate_pic_operand): Exclude function calls from
17353         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17354         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17355         addresses cases.
17356         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17357         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17358         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17359         for 'address + offset'.
17360         (microblaze_expand_prologue): Add new function prologue call for
17361         'r20' assignation.
17362         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17363         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17364         table in case of TARGET_PIC_DATA_TEXT_REL.
17365         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17366         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17367         Add new macros 'UNSPEC_TEXT',
17368         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17369         + exclude function calls from 'UNSPEC_PLT' in case of data text
17370         relative mode.
17371         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17372         new target hook for generating address diff vector tables in case of
17373         flag_pic.
17374         * doc/tm.texi : Regenerate.
17375         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17376         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17377         of addr diff vector generation.
17378         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17379         target hook definition.
17380         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17381         Add default function for generate_pic_addr_diff_vec -> flag_pic.
17382         * doc/invoke.texi (Add new pic option): Add new microblaze pic
17383         option for data text relative.
17385 2018-04-30  Richard Biener  <rguenther@suse.de>
17387         * tree-chrec.h (evolution_function_is_constant_p): Remove
17388         redundant check.
17389         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
17391 2018-04-30  Richard Biener  <rguenther@suse.de>
17393         PR bootstrap/85571
17394         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
17396 2018-04-30  Richard Biener  <rguenther@suse.de>
17398         PR tree-optimization/28364
17399         PR tree-optimization/85275
17400         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
17401         copying first exit test.
17403 2018-04-28  Mark Wielaard  <mark@klomp.org>
17405         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
17406         dwarf_version >= 5.
17407         (dwarf_AT): Handle DW_AT_addr_base.
17408         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
17410 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
17412         PR target/84431
17413         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
17414         (*ashl<dwi>3_doubleword_mask_1): Ditto.
17415         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
17416         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
17418 2018-04-28  Richard Biener  <rguenther@suse.de>
17420         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
17421         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
17422         to reflect use.  Only add interesting stmts.
17424 2018-04-27  Martin Jambor  <mjambor@suse.cz>
17426         PR ipa/85549
17427         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
17428         the jump function allows for passing through aggregate values.
17430 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
17432         * input.h (in_system_header_at): Convert from macro to inline
17433         function.
17434         (from_macro_expansion_at): Likewise.
17435         (from_macro_definition_at): Likewise.
17437 2018-04-27  Jeff Law  <law@redhat.com>
17439         * config.gcc: Mark tile* targets as deprecated/obsolete.
17441 2018-04-27  Richard Biener  <rguenther@suse.de>
17443         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
17444         fix for ILP32.
17446 2018-04-27  Richard Biener  <rguenther@suse.de>
17448         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
17450 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
17452         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
17453         with Yd constraint. Set "preferred_for_speed" attribute from
17454         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
17455         with Yd constraint.
17456         (*movdi_internal): Ditto.
17457         (movti_interunit splitters): Remove
17458         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
17459         (movdi_interunit splitters): Ditto.
17460         * config/i386/constraints.md (Ye): Remove.
17461         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
17463 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17465         PR target/85512
17466         * config/aarch64/constraints.md (Usg): Limit to 31.
17467         (Usj): Limit to 63.
17469 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
17471         PR tree-optimization/85529
17472         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
17473         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
17474         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
17475         zero extension or masking of the MSB bit.
17476         (optimize_range_tests): Add FIRST_BB argument, pass it through
17477         to optimize_range_tests_var_bound.
17478         (maybe_optimize_range_tests, reassociate_bb): Adjust
17479         optimize_range_tests callers.
17481 2018-04-26  Richard Biener  <rguenther@suse.de>
17482             Jakub Jelinek  <jakub@redhat.com>
17484         * cgraph.h (symbol_table): Just declare debug method here.
17485         * symtab.c (symbol_table::debug): Define.
17487 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
17489         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
17491 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
17493         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
17494         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
17495         (*movdi_internal): Substitute Yi and Yj constraint with x
17496         and Ym and Yn constraint with y constraint.  Update "isa"
17497         attribute and set "preferred_for_speed" attribute from
17498         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
17499         (*movsi_internal): Ditto.
17500         (*movdf_internal): Ditto.
17501         (*movsf_internal): Ditto.
17502         (*zero_extendsidi2): Ditto.
17503         * config/i386/sse.md (vec_set<mode>_0): Ditto.
17504         (sse2_loadld): Ditto.
17505         (*vec_extract<ssevecmodelower>_0): Ditto.
17506         (*vec_extractv4si_0_zext_sse4): Ditto.
17507         (vec_concatv2di): Ditto.
17508         (*vec_dup<mode>): Ditto.
17509         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
17510         * config/i386/constraints.md (Yi): Remove.
17511         (Yj): Remove.
17512         (Ym): Remove.
17513         (Yn): Remove.
17515 2018-04-26  Nathan Sidwell  <nathan@acm.org>
17517         * dumpfile.c (dump_open): New.
17518         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
17519         (dump_finish): Detect stdio/stderr by value not name.
17521 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
17523         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
17525 2018-04-26  Tom de Vries  <tom@codesourcery.com>
17527         PR target/84952
17528         * config/nvptx/nvptx.c (verify_neutering_jumps)
17529         (verify_neutering_labels): New function
17530         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
17532 2018-04-26  Tom de Vries  <tom@codesourcery.com>
17534         PR target/84025
17535         * config/nvptx/nvptx.c (needs_neutering_p): New function.
17536         (nvptx_single): Use needs_neutering_p to skip over insns that do not
17537         need neutering.
17539 2018-04-26  Richard Biener <rguenther@suse.de>
17540             Tom de Vries  <tom@codesourcery.com>
17542         PR lto/85422
17543         * lto-streamer-out.c (output_function): Fixup loops if required to match
17544         discovery done in the reader.
17546 2018-04-26  Richard Biener  <rguenther@suse.de>
17548         PR tree-optimization/85116
17549         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
17550         have a loop exit from the single latch predecessor.  Remove
17551         case of header with just condition.
17552         (ch_base::copy_headers): Exclude infinite loops from any
17553         processing.
17554         (pass_ch::execute): Record exits.
17556 2018-04-26  Richard Biener  <rguenther@suse.de>
17558         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
17559         prologue cost vector and pass it to vect_get_load_cost.
17560         (vect_get_peeling_costs_all_drs): Likewise.
17561         (vect_peeling_hash_get_lowest_cost): Likewise.
17562         (vect_enhance_data_refs_alignment): Likewise.
17564 2018-04-26  Richard Biener  <rguenther@suse.de>
17566         PR middle-end/85450
17567         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
17568         checking of integer<->pointer conversions.
17569         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
17570         sign-/zero-extending pointer types.
17571         (expand_omp_for_static_chunk): Likewise.
17573 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
17574             Jean Lee  <xiaoyur347@gmail.com>
17576         * config/mips/mips.c (mips_asan_shadow_offset): New function.
17577         (TARGET_ASAN_SHADOW_OFFSET): Define.
17578         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
17579         true for -fsanitize=address.
17581 2018-04-25  Mark Wielaard  <mark@klomp.org>
17583         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
17584         shorter ones.
17586 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
17588         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
17589         than "alu", remove explicit "memory" and "imm_disp" attributes.
17590         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
17592         PR middle-end/85414
17593         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
17594         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
17595         gen_lowpart_no_emit.
17597 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
17599         PR target/85473
17600         * config/i386/i386.c (ix86_expand_builtin): Change memory
17601         operand to XI, extend p0 to Pmode.
17602         * config/i386/i386.md: Change unspec volatile and operand
17603         1 mode to XI, change operand 0 mode to P.
17605 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17607         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
17608         GET_MODE_MASK before any checking.
17609         (nds32_can_use_bset_p): Likewise.
17610         (nds32_can_use_btgl_p): Likewise.
17612 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17614         * config/nds32/nds32-doubleword.md: New define_split pattern for
17615         illegal register number.
17617 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17619         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
17621 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17623         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
17625 2018-04-25  Richard Biener  <rguenther@suse.de>
17627         * lto-streamer.h (LTO_major_version): Bump to 8.
17629 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
17631         * BASE-VER: Set to 9.0.0.
17633 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
17635         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
17636         in __abskf2 and __powikf2.
17638 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17640         PR target/85512
17641         * config/aarch64/constraints.md (Usg, Usj): New constraints.
17642         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
17643         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
17644         Use the above on operand 2.  Reindent.
17645         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
17647 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17649         PR target/85485
17650         * common/config/i386/i386-common.c (ix86_handle_option): Don't
17651         handle OPT_mcet.
17652         * config/i386/i386.opt (mcet): Removed.
17653         * doc/install.texi: Remove -mcet documentation.
17654         * doc/invoke.texi: Likewise.
17656 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17658         PR target/85485
17659         * doc/install.texi: Remove -mcet from bootstrap-cet.
17661 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17663         PR target/85511
17664         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
17665         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
17666         if TARGET_64BIT.
17668         PR target/85503
17669         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
17670         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
17671         containing a CONST_VECTOR.
17673 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
17675         * doc/install.texi: Update newlib dependency for nvptx.
17677 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17679         PR target/85508
17680         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
17681         instead of INTVAL when shifting x left.
17683 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
17685         PR tree-optimization/85478
17686         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
17687         vect_grouped_store_supported for single element vectors.
17689 2018-04-24  Richard Biener  <rguenther@suse.de>
17691         PR target/85491
17692         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
17693         load cost increase to the case of non-constant step.
17695 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17697         PR target/84828
17698         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
17699         destination if any_malformed_asm.
17701 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
17703         PR middle-end/85496
17704         * expr.c (store_field): In the bitfield case, if the value comes from
17705         a function call and is returned in registers by means of a PARALLEL,
17706         do not change the mode of the temporary unless BLKmode and VOIDmode.
17708 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
17710         PR rtl-optimization/85423
17711         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
17712         dependencies to debug insns when the previous insn is non-debug.
17714 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17716         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
17717         enums into a single definition.
17718         (fls): Fix predicates and printing.
17719         (seti): Likewise.
17721 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17723         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
17724         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
17725         and short u6 immediate.
17726         (check_if_valid_sleep_operand): Remove.
17727         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
17729 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17731         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
17732         flag_always_save_lp condition.
17733         * config/nds32/nds32.opt (malways-save-lp): New option.
17735 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17737         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
17738         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
17739         * config/nds32/nds32.h
17740         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
17741         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
17743 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17745         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
17746         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
17748 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17749             Chung-Ju Wu  <jasonwucj@gmail.com>
17751         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
17752         Declare.
17753         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
17754         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
17756 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17758         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
17760 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17762         * config/nds32/nds32-protos.h (nds32_data_alignment,
17763         nds32_local_alignment): Declare.
17764         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
17765         nds32_local_alignment): New functions.
17766         (TARGET_CONSTANT_ALIGNMENT): Define.
17767         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
17769 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17771         * config/nds32/nds32.c
17772         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
17773         (TARGET_MODES_TIEABLE_P): Likewise.
17775 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17777         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
17778         level Ofast and Og.
17780 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
17781             Chung-Ju Wu  <jasonwucj@gmail.com>
17783         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17784         for unaligned access.
17785         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17786         unaligned access.
17787         * config/nds32/nds32-intrinsic.md: Likewise.
17788         * config/nds32/nds32_intrinsic.h: Likewise.
17789         * config/nds32/nds32.h (nds32_builtins): Likewise.
17790         * config/nds32/nds32.opt (munaligned-access): New option.
17791         * config/nds32/nds32.c (nds32_asm_file_start): Display
17792         flag_unaligned_access status.
17794 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17796         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
17797         -mno-relax is present.
17798         * config/riscv/linux.h (LINK_SPEC): Ditto.
17800 2018-04-20  Martin Sebor  <msebor@redhat.com>
17802         PR c/85365
17803         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
17804         for null pointers.
17805         (gimple_fold_builtin_stxcpy_chk): Same.
17806         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
17808 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
17810         PR target/85456
17811         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
17812         __powikf2 when long double is IEEE 128-bit.
17814 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17816         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
17817         step to make sure stack always aligned.
17819 2018-04-20  Carl Love  <cel@us.ibm.com>
17821         PR target/83402
17822         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
17823         size check for arg0.
17825 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
17826             Tom de Vries  <tom@codesourcery.com>
17828         PR target/85445
17829         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17830         Emit insns for calls too.
17831         (nvptx_find_par): Always look for worker-level predecessor insn.
17832         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
17833         calls.
17834         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17835         (nvptx_process_pars): Propagate frames for calls.
17837 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
17839         PR target/85469
17840         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17841         Removed.
17842         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17843         (ix86_handle_option): Don't handle OPT_mibt.
17844         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17845         __SHSTK__.
17846         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17847         has_ibt and ibt.
17848         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17849         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17850         (ix86_target_macros): Define __CET__ with flag_cf_protection
17851         for -fcf-protection.
17852         * config/i386/i386.c (isa2_opts): Remove -mibt.
17853         * config/i386/i386.h (TARGET_IBT): Removed.
17854         (TARGET_IBT_P): Likewise.
17855         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17856         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17857         * config/i386/i386.opt (mcet): Update help message.
17858         (mshstk): Likewise.
17859         (mibt): Removed.
17860         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
17861         -mcet as an alias for -mshstk.
17863 2018-04-20  Richard Biener <rguenther@suse.de>
17865         PR middle-end/85475
17866         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17867         complexity by forcing a single use of the multiply operand.
17869 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17871         ipa/85449
17872         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17873         recursion dependency to only apply to non-clones.
17875 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17877         ipa/85447
17878         * ipa-cp.c (create_specialized_node): Check that clones of
17879         self-recursive edges exist during IPA-CP.
17881 2018-04-19  Toon Moene  <toon@moene.org>
17883         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17884         by -O3.
17886 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17888         PR tree-optimization/85467
17889         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17890         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
17891         VECTOR_CST element to type.
17893 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17895         PR target/85397
17896         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17897         * config/i386/i386.md (builtin_setjmp_setup): Removed.
17898         (builtin_longjmp): Likewise.
17899         (save_stack_nonlocal): New pattern.
17900         (restore_stack_nonlocal): Likewise.
17902 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17904         PR target/85404
17905         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17906         Replace ASM_OUTPUT_LABEL with fprintf.
17908 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17910         PR target/85417
17911         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17912         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17913         * config/i386/i386-c.c (ix86_target_macros_internal): Also
17914         define __IBT__ and __SHSTK__ for -fcf-protection.
17915         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17916         TARGET_IBT.
17917         (ix86_trampoline_init): Likewise.
17918         (x86_output_mi_thunk): Likewise.
17919         (ix86_notrack_prefixed_insn_p): Likewise.
17920         (ix86_option_override_internal): Don't disallow -fcf-protection.
17921         * config/i386/i386.md (rdssp<mode>): Also enable for
17922         -fcf-protection.
17923         (incssp<mode>): Likewise.
17924         (nop_endbr): Likewise.
17925         * config/i386/i386.opt (mcet): Change help message to built-in
17926         functions only.
17927         (mibt): Likewise.
17928         (mshstk): Likewise.
17929         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17930         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
17931         enable CET built-in functions.
17933 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
17935         * common/config/i386/i386-common.c
17936         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17937         OPTION_MASK_ISA_MOVDIRI_UNSET,
17938         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17939         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17940         * config.gcc (movdirintrin.h): New header.
17941         * config/i386/cpuid.h (bit_MOVDIRI,
17942         bit_MOVDIR64B): New bits.
17943         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17944         and -mmvodir64b.
17945         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17946         (VOID, PVOID, PCVOID)): New function types.
17947         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17948         __builtin_ia32_directstoreu_u64,
17949         __builtin_ia32_movdir64b): New builtins.
17950         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17951         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17952         and -mmovdiri.
17953         (ix86_valid_target_attribute_inner_p): Ditto.
17954         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17955         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17956         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17957         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17958         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17959         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17960         (movdiri<mode>, movdir64b_<mode>): New.
17961         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17962         * config/i386/immintrin.h: Include movdirintrin.h.
17963         * config/i386/movdirintrin.h: New file.
17964         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17966 2018-04-19  Richard Biener  <rguenther@suse.de>
17968         PR middle-end/85455
17969         * cfg.c (clear_bb_flags): When loop state says we have
17970         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17972 2018-04-19  Richard Biener  <rguenther@suse.de>
17974         PR tree-optimization/84737
17975         * tree-vect-data-refs.c (vect_copy_ref_info): New function
17976         copying restrict info.
17977         (vect_setup_realignment): Use it.
17978         * tree-vectorizer.h (vect_copy_ref_info): Declare.
17979         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17980         the first DR to all generated stores.
17981         (vectorizable_load): Likewise for loads.
17983 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17985         PR tree-optimization/85446
17986         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17987         the integral and pointer types to have the same precision.
17989         * doc/install.texi: Document --disable-cet being the default and
17990         --enable-cet=auto.
17992 2018-04-18  Martin Liska  <mliska@suse.cz>
17994         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17995         style.
17997 2018-04-18  Martin Liska  <mliska@suse.cz>
17999         Revert
18000         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
18002         PR ipa/83983
18003         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18004         arguments if they are comparable.
18006 2018-04-18  Martin Liska  <mliska@suse.cz>
18008         Revert
18009         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
18011         PR lto/84805
18012         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18013         incomplete types.
18015 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
18017         PR target/85388
18018         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18019         ENDBR after calling __morestack.
18021 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
18023         PR jit/85384
18024         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18025         by using gcc_base_ver to generate a gcc_driver_version, and use
18026         it when generating GCC_DRIVER_NAME.
18027         * configure: Regenerate.
18029 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
18031         PR target/81084
18032         * config.gcc: Obsolete powerpc*-*-*spe*.
18034 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18036         PR debug/84637
18037         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18038         (stabstr_D): Change type of unum from unsigned int to
18039         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
18040         type.
18042 2018-04-17  Jim Wilson  <jimw@sifive.com>
18044         PR 84856
18045         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18046         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18047         Set arg_pointer_offset after using pretend_args_size.
18049 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18051         PR rtl-optimization/85431
18052         * dse.c (record_store): Ignore zero width stores.
18054         PR sanitizer/85230
18055         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
18056         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18057         __builtin_stack_restore rather than after it.
18058         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18059         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18060         argument instead of virtual_dynamic_stack_rtx.
18062 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18064         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18065         New prototype.
18066         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18067         Add note to error message to explain internal mapping of overloaded
18068         built-in function name to non-overloaded built-in function name.
18069         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18070         function.
18072 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18074         PR target/85424
18075         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18076         where the inputs overlap with the output.
18078 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18080         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18081         (=v, v) alternative and explicit "memory" attribute.
18082         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
18083         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18084         attributes.
18085         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18086         "sselog1" type instead of "sselog".
18087         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18088         "sselog".  Remove explicit "memory" attribute.
18089         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18090         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18091         attributes.
18092         (vec_extract_hi_v32hi): Merge all alternatives into one, use
18093         "sselog1" type instead of "sselog".  Remove explicit "memory"
18094         attribute.
18095         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18096         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18097         attribute.
18098         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18099         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18100         attributes.
18101         (vec_extract_hi_v64qi): Merge all alternatives into one, use
18102         "sselog1" type instead of "sselog".  Remove explicit "memory"
18103         attribute.
18104         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18105         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18106         attribute.
18108         PR target/85430
18109         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18111         PR middle-end/85414
18112         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18113         on a SUBREG.
18115 2018-04-17  Martin Jambor  <mjambor@suse.cz>
18117         PR ipa/85421
18118         * ipa-cp.c (create_specialized_node): Call
18119         expand_all_artificial_thunks if necessary.
18121 2018-04-17  Martin Liska  <mliska@suse.cz>
18123         PR lto/85405
18124         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18125         in message, remote space in between '_G' and '('.
18127 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18129         PR target/85281
18130         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18131         avx512f_vmcmp<mode>3<round_saeonly_name>,
18132         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18133         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18134         avx512f_rndscale<mode><round_saeonly_name>,
18135         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18136         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18137         Use %<iptr>2 instead of %2 for -masm=intel.
18138         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18139         avx512f_vcvttss2usi<round_saeonly_name>,
18140         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18141         -masm=intel.
18142         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18143         avx512f_vcvttsd2usi<round_saeonly_name>,
18144         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18145         Use %q1 instead of %1 for -masm=intel.
18146         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18147         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18148         of %3 for -masm=intel.
18149         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18150         -masm=intel.
18151         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18152         -masm=intel.
18153         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18154         -masm=intel.
18155         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18156         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18157         %g1.
18158         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18159         -masm=intel.
18160         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18161         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18162         %g1 and one with %0 and %1.
18163         (avx512er_vmrcp28<mode><round_saeonly_name>,
18164         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18165         %1 for -masm=intel.
18166         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18167         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18168         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18169         of %0 and %{%4%} for -masm=intel.
18170         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18171         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18172         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18173         order of %0 and %{%5%}%{z%} for -masm=intel.
18175 2018-04-17  Jan Hubicka  <jh@suse.cz>
18177         PR lto/85405
18178         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18180 2018-04-17  Martin Liska  <mliska@suse.cz>
18182         PR ipa/85329
18183         * multiple_target.c (create_dispatcher_calls): Set apostrophes
18184         for target_clone error message.  Make default implementation
18185         clone to be a local declaration.
18186         (separate_attrs): Add new argument and check for an empty
18187         string.
18188         (expand_target_clones): Handle it.
18189         (ipa_target_clone): Make redirection just for target_clones
18190         functions.
18192 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
18193             Tom de Vries  <tom@codesourcery.com>
18195         PR middle-end/84955
18196         * omp-expand.c (expand_oacc_for): Add dummy false branch for
18197         tiled basic blocks without omp continue statements.
18199 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
18201         PR target/83660
18202         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18203         vec_extract expression as having side effects to make sure it gets
18204         a cleanup point.
18206 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
18208         PR target/85403
18209         * config/i386/i386.c (get_builtin_code_for_version): Check
18210         error_mark_node.
18212 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
18214         PR target/84331
18215         * config.gcc: Support "skylake".
18216         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18217         PROCESSOR_SKYLAKE.
18218         * config/i386/i386.c (m_SKYLAKE): Define.
18219         (processor_target_table): Add "skylake".
18220         (ix86_option_override_internal): Add "skylake".
18221         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18222         PROCESSOR_CANNONLAKE.
18223         (get_builtin_code_for_version): Fix priority for
18224         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18225         PROCESSOR_SKYLAKE-AVX512.
18226         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18227         (processor_type): Add PROCESSOR_SKYLAKE.
18229 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
18230             Jason Merrill  <jason@redhat.com>
18232         PR c++/85112
18233         * convert.c (convert_to_integer_1): Use direct recursion for
18234         enumeral types and types with a precision less than the number
18235         of bits in their mode.
18237 2018-04-16  Julia Koval  <julia.koval@intel.com>
18239         PR target/84413
18240         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18241         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18243 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
18245         PR target/85293
18246         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18247         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18248         and -mno-direct-move.
18250 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
18252         PR target/83402
18253         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18254         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18255         Ensure negative shifts result in {0}.
18257 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
18259         PR rtl-optimization/79916
18260         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18261         regs (if any) to define how to gnerate SD moves when LRA is in
18262         progress.
18264 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
18266         PR rtl-optimization/85393
18267         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18268         * except.c (expand_dw2_landing_pad_for_region): Make static.
18269         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18270         a label and unconditional jump to old_bb, rather than
18271         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18272         basic block.
18274         PR rtl-optimization/85376
18275         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18276         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18277         instead of a specific value.
18279 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18280             Bin Cheng  <bin.cheng@arm.com>
18282         PR tree-optimization/82965
18283         PR tree-optimization/83991
18284         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18285         by_profile_only parameter.
18286         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18287         information if the loop was predicted to iterate too many times.
18288         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18290 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18292         PR lto/71991
18293         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18294         always inline.
18296 2018-04-13  Martin Liska  <mliska@suse.cz>
18297             Jakub Jelinek  <jakub@redhat.com>
18299         PR middle-end/81657
18300         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18301         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18302         * builtins.c (expand_builtin_memory_copy_args): Use
18303         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18304         handle dest_addr == pc_rtx.
18306 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
18308         PR target/85291
18309         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18310         asked to not generate direct moves.
18311         (fix_trunc<mode>si2_stfiwx): Similar.
18312         (fix_trunc<mode>si2_internal): Similar.
18314 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18316         PR debug/83157
18317         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18318         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18319         lookup if dest in some wider mode is known to be const0_rtx and
18320         if so, record permanent equivalence for it to be ZERO_EXTEND of
18321         the narrower mode destination.
18323 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18325         * lto-streamer-out.c (output_function): Revert 259346.
18326         * omp-expand.c (expand_oacc_for): Likewise.
18328 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
18330         PR rtl-optimization/85354
18331         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18332         * sel-sched.c (sel_global_init): ... here.
18334 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
18336         PR target/85238
18337         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18338         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18339         mode for PE-COFF targets.
18340         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18341         (i386_pe_asm_lto_end): Likewise.
18342         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18343         (TARGET_ASM_LTO_END): Likewise.
18344         * config/i386/winnt.c (saved_debug_info_level): New static variable.
18345         (i386_pe_asm_lto_start): New function.
18346         (i386_pe_asm_lto_end): Likewise.
18348 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18349             Richard Biener  <rguenther@suse.de>
18351         PR middle-end/84955
18352         * lto-streamer-out.c (output_function): Fix CFG loop state before
18353         streaming out.
18354         * omp-expand.c (expand_oacc_for): Handle calls to internal
18355         functions like regular functions.
18357 2018-04-12  Richard Biener  <rguenther@suse.de>
18359         PR lto/85371
18360         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18361         for the early LTO debug to properly generate references to it
18362         during DIE emission.  Do not re-use that for the skeleton for
18363         split-dwarf.
18364         (dwarf2out_early_finish): Likewise.
18366 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18368         PR target/85328
18369         * config/i386/sse.md
18370         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18371         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18372         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18373         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18374         and output is a reg, avoid creating invalid lowpart subreg, but
18375         instead split into a 512-bit move.  Don't split if not AVX512VL,
18376         input is xmm16+ reg and output is a mem.
18377         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18378         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18379         xmm16+ reg and output is a mem.
18381 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18383         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
18384         also for flag_dwarf2_cfi_asm.
18386 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18388         PR rtl-optimization/85342
18389         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
18390         a bool scalar var inside of the loop instead.  Don't try to update
18391         recog_data.operand after failed apply_change_group.
18393 2018-04-12  Tom de Vries  <tom@codesourcery.com>
18395         PR target/85296
18396         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
18397         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
18398         array with flexible array member as array without given dimension.
18399         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
18400         argument for undefined param to true.
18402 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
18404         PR target/85321
18405         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18406         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
18407         from PowerPC section.
18408         * config/rs6000/sysv4.opt (mcall-): Improve help text.
18409         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
18410         help text that is too long.
18411         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
18412         help text that is too long.
18413         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
18414         help text that is too long.
18416 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
18418         * config/alpha/alpha.md (stack_probe_internal): Rename
18419         from "probe_stack".  Update all callers.
18421 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18423         PR rtl-optimization/84566
18424         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
18425         sched_macro_fuse_insns.
18427 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18429         PR target/84301
18430         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
18431         (compute_block_dependences): ... from here.
18433 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18435         PR tree-optimization/85331
18436         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
18437         from int to HOST_WIDE_INT.
18439 2018-04-11  Martin Jambor  <mjambor@suse.cz>
18441         PR ipa/84149
18442         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
18443         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
18444         not the same as the source val.
18445         (cgraph_edge_brings_value_p): New parameter.
18446         (gather_edges_for_value): Pass destination value to
18447         cgraph_edge_brings_value_p.
18448         (perhaps_add_new_callers): Likewise.
18449         (get_info_about_necessary_edges): Likewise and exclude values brought
18450         only by self-recursive edges.
18451         (create_specialized_node): Redirect only clones of self-calling edges.
18452         (+self_recursive_pass_through_p): New function.
18453         (find_more_scalar_values_for_callers_subset): Use it.
18454         (find_aggregate_values_for_callers_subset): Likewise.
18455         (known_aggs_to_agg_replacement_list): Removed.
18456         (decide_whether_version_node): Re-calculate known constants for all
18457         remaining context clones.
18459 2018-04-11  Richard Biener  <rguenther@suse.de>
18461         PR lto/85339
18462         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
18463         from early DWARF output.
18464         (dwarf2out_early_finish): Output line info unconditionally into
18465         early DWARF and add reference to it.
18467 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18469         PR target/85281
18470         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
18471         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
18472         other than V2DFmode using iptr mode attribute.
18473         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
18475 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18477         PR rtl-optimization/84659
18478         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
18480 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18482         PR debug/85302
18483         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
18484         SIZEP is NULL.
18485         (output_loc_list): Pass address of a dummy size variable even in the
18486         locview handling loop.
18487         (index_location_lists): Add comment on why skip_loc_list_entry can't
18488         call size_of_locs.
18490 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18492         PR target/85261
18493         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
18494         into register.
18496 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
18498         PR target/85321
18499         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18500         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
18501         and -mstring-compare-inline-limit.
18503 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18505         PR target/85287
18506         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
18507         for stack clash protection in a register whenever we need it to be in
18508         a register.
18510 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18512         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
18513         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
18515 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18517         PR target/85321
18518         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
18519         the help text.
18520         (mlong-double-): Ditto.
18521         * config/rs6000/sysv4.opt (msdata=): Ditto.
18522         (mtls-size=): Ditto.
18524 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18526         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18527         erroneous entries for
18528         "vector int vec_ldl (int, long int *)", and
18529         "vector unsigned int vec_ldl (int, unsigned long int *)".
18530         Add comments and entries for
18531         "vector bool char vec_ldl (int, bool char *)",
18532         "vector bool short vec_ldl (int, bool short *)",
18533         "vector bool int vec_ldl (int, bool int *)",
18534         "vector bool long long vec_ldl (int, bool long long *)",
18535         "vector pixel vec_ldl (int, pixel *)",
18536         "vector long long vec_ldl (int, long long *)",
18537         "vector unsigned long long vec_ldl (int, unsigned long long *)".
18538         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
18539         type tree bool_long_long_type_node and correct definition of
18540         bool_V2DI_type_node to make reference to this new type tree.
18541         (rs6000_mangle_type): Replace erroneous reference to
18542         bool_long_type_node with bool_long_long_type_node.
18543         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
18544         comments to emphasize sign distinctions for char and int types and
18545         replace RS6000_BTI_bool_long constant with
18546         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
18547         use of RS6000_BTI_pixel.
18548         (bool_long_type_node): Remove this macro definition.
18549         (bool_long_long_type_node): New macro definition
18551 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
18553         PR rtl-optimization/85300
18554         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
18555         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
18556         simplify_unary_operation fails.
18558 2018-04-10  Martin Liska  <mliska@suse.cz>
18560         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
18561         cgraph_edge and ipa_ref.
18563 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
18565         PR target/85177
18566         PR target/85255
18567         * config/i386/sse.md
18568         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
18569         computation of the VEC_MERGE selector from mask.
18570         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
18571         Fix decoding of the VEC_MERGE selector into mask.
18573 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
18575         PR tree-optimization/85286
18576         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
18578 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
18580         * final.c (final_1): Set insn_last_address as well as
18581         insn_current_address.
18583 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18585         PR target/85173
18586         * explow.c (emit_stack_probe): Call validize_mem on memory location
18587         before passing it to gen_probe_stack.  Create address operand and
18588         legitimize it for the probe_stack_address case.
18590 2018-04-09  Jan Hubicka  <jh@suse.cz>
18592         PR lto/85078
18593         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
18594         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
18595         * tree.c (free_lang_data_in_type): Fix handling of binfos;
18596         walk basetypes.
18597         (free_lang_data): Rebuild type inheritance graph.
18599 2018-04-09  Martin Sebor  <msebor@redhat.com>
18601         * invoke.texi (-finline-small-functions): Mention other optimization
18602         options.
18603         (-findirect-inlining, -fpartial-inlining): Same.
18604         (-finline-functions-called-once): Same.
18605         (-freorder-blocks-and-partition): Same.
18607 2018-04-09  Jan Hubicka  <jh@suse.cz>
18609         PR rtl/84058
18610         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
18611         jumps; choose last target that matches the criteria (i.e.
18612         no partition changes for non-crossing jumps).
18613         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
18614         support for redirecting crossing jumps to non-crossing.
18616 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
18618         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
18619         also for naked functions.
18621 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
18623         * config/arc/arc.md (add_shift): New pattern.
18624         (add_shift2): Likewise.
18625         (sub_shift): Likewise.
18626         (sub_shift_cmp0_noout): Likewise.
18627         (compare_si_ashiftsi): Likewise.
18628         (xbfu_cmp0_noout): New combine pattern.
18629         (xbfu_cmp0"): Likewise.
18630         (movsi_set_cc_insn): Place the predicable variant first.
18631         (commutative_binary_cmp0_noout): Remove clobber.
18632         (commutative_binary_cmp0): New pattern.
18633         (noncommutative_binary_cmp0): Likewise.
18634         (noncommutative_binary_cmp0_noout): Likewise.
18635         (noncommutative_binary_comparison_result_used): Removed.
18636         (rsub_cmp0): New pattern.
18637         (rsub_cmp0_noout): Likewise.
18638         (extzvsi): Changed, keep only meaningful variants.
18639         (SQH, SEZ): New iterators.
18640         (SQH_postfix): New mode attribute.
18641         (SEZ_prefix): New code attribute.
18642         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
18643         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
18644         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
18645         of numerical value.
18646         (noncommutative_operator): Check the availability of barrel
18647         shifter option.
18649 2018-04-09  Richard Biener  <rguenther@suse.de>
18651         PR tree-optimization/85284
18652         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
18653         Only use the niter constraining form of simple_iv when the exit
18654         is always executed.
18656 2018-04-09  Tom de Vries  <tom@codesourcery.com>
18658         PR target/84041
18659         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18660         (define_expand "*memory_barrier"): New define_expand.
18661         (define_insn "memory_barrier"): New insn.
18663 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18665         PR rtl-optimization/80463
18666         PR rtl-optimization/83972
18667         PR rtl-optimization/83480
18669         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
18670         correct producer for the insn.
18671         (tidy_control_flow): Fixup seqnos in case of debug insns.
18673 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18675         PR rtl-optimization/83913
18677         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
18678         different sched-times when merging exprs.
18680 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18682         PR rtl-optimization/83962
18684         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
18685         tidy_fallthru_edge and tidy_control_flow.
18687 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18689         PR rtl-optimization/83530
18691         * sel-sched.c (force_next_insn): New global variable.
18692         (remove_insn_for_debug): When force_next_insn is true, also leave only
18693         next insn in the ready list.
18694         (sel_sched_region): When the region wasn't scheduled, make another pass
18695         over it with force_next_insn set to 1.
18697 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18699         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
18700         into tm_file.
18701         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18702         for interrupt control.
18703         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18704         functions for interrupt control.
18705         * config/nds32/nds32-intrinsic.md: Likewise.
18706         * config/nds32/nds32_intrinsic.h: Likewise.
18707         * config/nds32/nds32.h (nds32_builtins): Likewise.
18709 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18711         * config/nds32/nds32.c (nds32_init_machine_status,
18712         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
18713         strict_aligned_p field.
18714         (nds32_expand_to_rtl_hook): New function.
18715         (TARGET_EXPAND_TO_RTL_HOOK): Define.
18716         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
18718 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18719             Chung-Ju Wu  <jasonwucj@gmail.com>
18721         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
18722         * config/nds32/nds32-n7.md: New file.
18723         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
18724         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
18725         pipeline.
18726         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
18727         * config/nds32/nds32.md (pipeline_model): Add n7.
18728         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
18729         * config/nds32/pipelines.md: Include n7 settings.
18731 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18732             Chung-Ju Wu  <jasonwucj@gmail.com>
18734         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
18735         * config/nds32/nds32-e8.md: New file.
18736         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
18737         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
18738         pipeline.
18739         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
18740         * config/nds32/nds32.md (pipeline_model): Add e8.
18741         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
18742         * config/nds32/pipelines.md: Include e8 settings.
18744 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18745             Chung-Ju Wu  <jasonwucj@gmail.com>
18747         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
18748         * config/nds32/nds32-n8.md: New file.
18749         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
18750         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
18751         pipeline.
18752         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
18753         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
18754         * config/nds32/nds32.md (pipeline_model): Add n8.
18755         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
18756         * config/nds32/pipelines.md: Include n8 settings.
18758 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18759             Chung-Ju Wu  <jasonwucj@gmail.com>
18761         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
18762         * config/nds32/nds32-n9-2r1w.md: New file.
18763         * config/nds32/nds32-n9-3r2w.md: New file.
18764         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
18765         nds32_register_ports): New or modify for cpu n9.
18766         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
18767         pipeline.
18768         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
18769         * config/nds32/nds32-utils.c: New file.
18770         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
18771         TARGET_MUL_SLOW): Define.
18772         * config/nds32/nds32.md (pipeline_model): New attribute.
18773         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
18774         New options that support cpu n9.
18775         * config/nds32/pipelines.md: Include n9 settings.
18776         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
18778 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18780         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
18781         information if necessary.
18782         (output_cond_branch_compare_zero): Likewise.
18783         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
18784         (nds32_target_alignment): Refine for alignment.
18785         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
18786         (FUNCTION_BOUNDARY): Modify.
18787         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
18788         align case.
18789         * config/nds32/nds32.opt (malways-align, malign-functions): New.
18791 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18793         * config/nds32/constants.md (unspec_volatile_element): Add values for
18794         TLB operation and data prefetch.
18795         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18796         functions for TLB operation and data prefetch.
18797         * config/nds32/nds32-intrinsic.md: Likewise.
18798         * config/nds32/nds32_intrinsic.h: Likewise.
18799         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
18800         (nds32_print_operand): Likewise.
18801         * config/nds32/nds32.h (nds32_builtins): Likewise.
18803 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
18804         Andrew Pinski <pinsika@gcc.gnu.org>
18806         PR middle-end/82976
18807         * match.pd: Use constant_boolean_node of correct type instead of
18808         boolean_true_node or boolean_false_node for simplifying
18809         pointer comparisons to zero.
18811 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18813         PR tree-optimization/80021
18814         * tree.c (verify_type_variant): Make error call in verify_variant_match
18815         translatable and remove final full stop.
18817 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18819         * config/nds32/constants.md (unspec_volatile_element): Add
18820         UNSPEC_VOLATILE_EH_RETURN.
18821         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
18822         nds32_output_stack_pop): Support dwarf exception handling process.
18823         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
18824         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
18825         exception handling process.
18826         (nds32_compute_stack_frame): Likewise.
18827         (nds32_return_addr_rtx): Likewise.
18828         (nds32_initial_elimination_offset): Likewise.
18829         (nds32_expand_prologue): Likewise.
18830         (nds32_expand_epilogue): Likewise.
18831         (nds32_dynamic_chain_address): New function.
18832         * config/nds32/nds32.h (machine_function): Add fields for dwarf
18833         exception handling.
18834         (DYNAMIC_CHAIN_ADDRESS): Define.
18835         (EH_RETURN_DATA_REGNO): Define.
18836         (EH_RETURN_STACKADJ_RTX): Define.
18837         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18838         patterns for dwarf exception handling.
18840 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18842         * config/nds32/nds32.h: Clean up obsolete macros.
18844 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18846         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18847         Add enum values for particular instructions.
18848         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18849         particular intrinsic functions.
18850         * config/nds32/nds32-intrinsic.md: Likewise.
18851         * config/nds32/nds32_intrinsic.h: Likewise.
18852         * config/nds32/nds32.h (nds32_builtins): Likewise.
18853         * config/nds32/nds32.md (type): Add pbsad and pbsada.
18854         (btst, ave): New patterns for particular instructions.
18856 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18858         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18859         Add enum values for atomic load/store and memory sync.
18860         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18861         and memory sync.
18862         * config/nds32/nds32-intrinsic.md: Likewise.
18863         * config/nds32/nds32_intrinsic.h: Likewise.
18864         * config/nds32/nds32.h (nds32_builtins): Likewise.
18866 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18868         PR tree-optimization/85257
18869         * fold-const.c (native_encode_vector): If not all elts could fit
18870         and off is -1, return 0 rather than offset.
18871         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18872         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18873         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
18874         adjust buffer in native_interpret_expr call.
18876 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18878         * config/nds32/constants.md (unspec_volatile_element): Add cache
18879         control enum values.
18880         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18881         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18882         * config/nds32/nds32.c (nds32_cctl_names): New.
18883         (nds32_print_operand): Handle cache control register names.
18884         * config/nds32/nds32.h (nds32_builtins): New enum values.
18885         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18886         macros.
18887         * config/nds32/nds32.md (type): Add mmu.
18888         * config/nds32/pipelines.md (simple_insn): Add mmu.
18890 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18892         * config/nds32/nds32.md (type): Remove call.
18893         * config/nds32/pipelines.md (simple_insn): Likewise.
18895 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18897         * config/nds32/constants.md (unspec_volatile_element): Add
18898         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18899         UNSPEC_VOLATILE_FMFCFG.
18900         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18901         description for fmfcfg and fmfcsr.
18902         (bdesc_1arg): Add fmtcsr.
18903         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18904         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18905         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18906         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18907         unspec_fmfcfg): New patterns.
18908         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18909         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18910         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18911         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18912         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18913         __nds32__fmfcfg): Define.
18915 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18917         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18918         intrinsic register names.
18919         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18920         intrinsic register enum values and macros.
18922 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18924         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18925         for load/store addressing form.
18926         (nds32_print_operand_address): Likewise.
18928 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
18930         PR target/85196
18931         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18932         based on LABEL_REF.  Remove useless assertion.
18933         (pic_address_needs_scratch): Fix formatting.
18934         (sparc_legitimize_pic_address): Minor tweaks.
18935         (sparc_delegitimize_address): Adjust assertion accordingly.
18936         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18937         into symbolic_operand.
18938         (movsi_high_pic_label_ref): Likewise.
18939         (movsi_lo_sum_pic_label_ref): Likewise.
18940         (movdi_pic_label_ref): Likewise.
18941         (movdi_high_pic_label_ref): Likewise.
18942         (movdi_lo_sum_pic_label_ref): Likewise.
18944 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
18946         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18947         custom LIB_SPEC setup.
18949 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
18950             Kito Cheng  <kito.cheng@gmail.com>
18952         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18953         * config/riscv/freebsd.h: New.
18955 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18957         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18958         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18959         file.
18961 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18962             Kito Cheng  <kito.cheng@gmail.com>
18964         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18965         nds32_output_call, nds32_symbol_binds_local_p): New functions.
18966         * config/nds32/nds32-protos.h (nds32_output_call,
18967         nds32_output_return): Declare.
18968         * config/nds32/nds32.md: Refine all the call and return patterns.
18970 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18972         PR debug/85252
18973         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18974         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18976         PR rtl-optimization/84872
18977         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18978         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18979         EDGE_CROSSING edge.
18981 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
18983         * expr.c (copy_blkmode_to_reg): Revert 254862.
18984         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18986 2018-04-06  Richard Biener  <rguenther@suse.de>
18988         PR middle-end/85244
18989         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18990         after seeing a component reference with an adjacent field.  Treat
18991         refs to arrays at struct end of external decls similar to
18992         refs to unconstrained commons.
18994 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18996         PR sanitizer/85213
18997         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18998         look through SAVE_EXPRs with non-side-effects argument.  Adjust
18999         recursive calls.
19000         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19001         save_p here.
19003 2018-04-06  Richard Biener  <rguenther@suse.de>
19005         PR middle-end/85180
19006         * alias.c (find_base_term): New wrapper around find_base_term
19007         unwinding CSELIB_VAL_PTR changes.
19008         (find_base_term): Do not restore CSELIB_VAL_PTR during the
19009         recursion.
19011 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19013         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19014         instructions.
19015         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19016         constant definitions.
19017         ("nop"): lr 0,0 -> nopr r0
19018         ("nop_lr0", "nop_lr1"): New insn definitions.
19020 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19022         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19023         NDS32_V3PUSH_AVAILABLE_P macro.
19025 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
19026             Chung-Ju Wu  <jasonwucj@gmail.com>
19028         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19029         (nds32*-*-*): Add float and fpu_config into supported_defaults.
19030         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19031         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19032         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19033         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19034         * config/nds32/constraints.md: New constraints and checking for hard
19035         float configuration.
19036         * config/nds32/iterators.md: New mode iterator and attribute for hard
19037         float configuration.
19038         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19039         patterns.
19040         * config/nds32/nds32-fpu.md: New file.
19041         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19042         deal with hard float code generation.
19043         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19044         ARCH_V3S.
19045         (abi_type, float_reg_number): New enum type.
19046         * config/nds32/nds32-predicates.c: New predicates for hard float.
19047         * config/nds32/nds32-protos.h: Declare functions for hard float.
19048         * config/nds32/nds32.c: Implementation for hard float configuration.
19049         * config/nds32/nds32.h: Definitions for hard float configuration.
19050         * config/nds32/nds32.md: Include hard float machine description and
19051         modify patterns for hard float configuration.
19052         * config/nds32/nds32.opt: New options for hard float configuration.
19053         * config/nds32/predicates.md: New predicates for hard float
19054         configuration.
19056 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19058         * common/config/nds32/nds32-common.c
19059         (nds32_option_optimization_table): Enable -mreleax-hint by default.
19061 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
19063         PR middle-end/85195
19064         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19065         CONSTRUCTOR_ELT (ctor, ...)->value.
19067 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
19069         PR target/85193
19070         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19072 2018-04-05  Tom de Vries  <tom@codesourcery.com>
19074         PR target/85204
19075         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19076         cond jump.
19078 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19079             Kito Cheng  <kito.cheng@gmail.com>
19081         * config/nds32/constraints.md (U33): Fine-tune checking condition.
19082         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19083         * config/nds32/nds32.h (nds32_16bit_address_type): Add
19084         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19086 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19087             Kito Cheng  <kito.cheng@gmail.com>
19089         * config/nds32/constraints.md (Ufe): New memory constraint.
19090         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19091         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19092         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19093         operands.
19094         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19095         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19097 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19099         * config/nds32/nds32.md: Use optimize_size in the condition for
19100         alu-shift instructions.
19102 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19104         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19106 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19108         * config/nds32/nds32.md (negsi2): Refine pattern.
19110 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19111             Chung-Ju Wu  <jasonwucj@gmail.com>
19113         * config/nds32/iterators.md (shift_rotate): New code iterator.
19114         (shift): New code attribute.
19115         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19116         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19117         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19118         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19119         bit-wise operations.
19120         (andsi3, *andsi3): Ditto.
19121         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19122         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19123         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19124         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19125         nds32_ior_operand, nds32_xor_operand): New predicates.
19127 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19129         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19130         (addsi3, subsi3): ... this.
19132 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19134         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19136 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19138         * config/nds32/nds32.md: Adjust indention.
19140 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19142         * config/nds32/nds32.md (feature): New attribute.
19144 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19146         * config/nds32/nds32.md (subtype): New attribute.
19148 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19150         PR target/85203
19151         * config/arm/arm-builtins.c (arm_expand_builtin): Change
19152         expansion to perform a bitwise AND of the argument followed by a
19153         boolean negation of the result.
19155 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
19157         PR rtl-optimization/84878
19158         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19159         the basic block.  Assert the use reference is not artificial and that
19160         it has an associated insn.
19162 2018-04-04  Michael Matz  <matz@suse.de>
19164         * builtins.c (compute_objsize): Pass correct operand
19165         to array_at_struct_end_p.
19167 2018-04-04  Richard Biener  <rguenther@suse.de>
19169         PR lto/85176
19170         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19171         from contexts for DINFO_LEVEL_TERSE and below.
19173 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19175         * config/nds32/nds32-doubleword.md (move_<mode>): Require
19176         resiter_operand condition.
19177         * config/nds32/nds32.md (*move<mode>): Ditto.
19179 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19180             Monk Chiang  <sh.chiang04@gmail.com>
19182         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19184 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19186         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19188 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19189             Kito Cheng  <kito.cheng@gmail.com>
19191         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19192         nds32_cond_code_str, output_cond_branch,
19193         output_cond_branch_compare_zero, nds32_expand_cbranch,
19194         nds32_expand_cstore, nds32_expand_movcc,
19195         nds32_output_cbranchsi4_equality_zero,
19196         nds32_output_cbranchsi4_equality_reg,
19197         nds32_output_cbranchsi4_equality_reg_or_const_int,
19198         nds32_output_cbranchsi4_greater_less_zero: New functions.
19199         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19200         nds32_expand_cstore, nds32_expand_movcc,
19201         nds32_output_cbranchsi4_equality_zero,
19202         nds32_output_cbranchsi4_equality_reg,
19203         nds32_output_cbranchsi4_equality_reg_or_const_int,
19204         nds32_output_cbranchsi4_greater_less_zero): Declare.
19205         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19206         nds32_rimm11s_operand): New predicates.
19207         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19208         * config/nds32/nds32.md: Rewrite all the branch and conditional move
19209         patterns.
19211 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19213         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19214         * config/nds32/nds32.md: Ditto.
19215         * config/nds32/pipelines.md: Ditto.
19217 2018-04-04  Richard Biener  <rguenther@suse.de>
19219         PR tree-optimization/85168
19220         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19221         propagating abnormals.
19223 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19225         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19227 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19228             Kito Cheng  <kito.cheng@gmail.com>
19230         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19231         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19232         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19233         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19234         * config/nds32/nds32.md (sibcall_internal): New.
19235         (sibcall_register): Remove.
19236         (sibcall_immediate): Remove.
19237         (sibcall_value_internal): New.
19238         (sibcall_value_register): Remove.
19239         (sibcall_value_immediate): Remove.
19240         * config/nds32/predicates.md (nds32_general_register_operand): New.
19241         (nds32_call_address_operand): New.
19243 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19245         PR rtl-optimization/85167
19246         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19247         bb_defs if *split_p, instead preinitialize it to NULL.
19249         PR tree-optimization/85156
19250         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19251         evaluating the argument multiple times.
19253 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
19255         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19256         than vector.
19257         (_mm_cvtpd_ps): Likewise.
19258         (_mm_cvttpd_epi32): Likewise.
19259         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19260         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19261         vector, pixel, and bool following altivec.h include.
19263 2018-04-03  Martin Sebor  <msebor@redhat.com>
19265         * doc/extend.texi (Common Function Attributes): Clarify.
19266         (const attribute): Likewise.
19267         (pure attribute): Likewise.
19269 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19271         PR target/85169
19272         * config/i386/i386.c (ix86_expand_vector_set): Use
19273         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
19275 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
19277         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19278         instructions when changing rounding bits to preserve precision bits
19279         in the x87 control word.
19281 2018-04-03  Martin Liska  <mliska@suse.cz>
19283         PR tree-optimization/82491
19284         * rtl.h (strip_offset_and_add): Replace += suboffset with
19285         poly_uint64 () + suboffset.
19287 2018-03-29  Martin Liska  <mliska@suse.cz>
19288             Martin Jambor  <mjambor@suse.cz>
19290         PR ipa/84947
19291         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19292         param_type is not an integral or pointer type.
19294 2018-04-03  Richard Biener  <rguenther@suse.de>
19296         * sese.h (recompute_all_dominators): Remove.
19298 2018-04-02  Martin Sebor  <msebor@redhat.com>
19300         * doc/invoke.texi (-Wrestrict): Fix typos.
19302 2018-04-02  Jim Wilson  <jimw@sifive.com>
19304         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19305         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19306         (<optab>di3, <optab>si3_extend): Likewise.
19307         (<optab>si3_mask, <optab>si3_mask_1): New.
19308         (<optab>di3_mask, <optab>di3_mask_1): New.
19309         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19310         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19311         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19313 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
19315         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19316         example.
19318 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19320         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19321         (nds32_canonicalize_comparison): New function.
19323 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19324             Kito Cheng  <kito.cheng@gmail.com>
19325             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19327         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19328         * config/nds32/constants.md (unspec_volatile_element): Add
19329         UNSPEC_VOLATILE_RELAX_GROUP.
19330         * config/nds32/nds32-relax-opt.c: New file.
19331         * config/nds32/nds32-predicates.c
19332         (nds32_symbol_load_store_p): New function.
19333         * config/nds32/nds32-protos.h
19334         (nds32_symbol_load_store_p): Declare function.
19335         (make_pass_nds32_relax_opt): Declare new rtl pass function.
19336         * config/nds32/nds32.c
19337         (nds32_register_pass): New function to register pass.
19338         (nds32_register_passes): New function to register passes.
19339         * config/nds32/nds32.md (relax_group): New pattern.
19340         * config/nds32/nds32.opt (mrelax-hint): New option.
19341         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19343 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
19345         * config/nds32/t-nds32: Modify files dependency.
19347 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19349         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19350         (PROFILE_HOOK): Define its implementation.
19352 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19354         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19355         type and 32-bit size.
19357 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
19359         PR middle-end/85090
19360         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19361         (V_128_256): New mode iterator.
19362         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19363         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19364         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19365         of V.
19366         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19367         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19369 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
19371         PR target/83315
19372         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19373         NaN inputs correctly.
19375 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
19377         PR target/80546
19378         * config/rs6000/vsx.md (??r): New mode attribute.
19379         (*vsx_mov<mode>_64bit): Use it.
19380         (*vsx_mov<mode>_32bit): Likewise.
19382 2018-03-30  Martin Sebor  <msebor@redhat.com>
19384         PR tree-optimization/84818
19385         * builtins.c (check_access): Use warning_n.
19387 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19389         PR target/83822
19390         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
19391         condition.
19392         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
19393         condition.
19395 2018-03-30  Julia Koval  <julia.koval@intel.com>
19397         PR target/84413
19398         * x86-tune.def (movx, partial_reg_dependency): Enable for
19399         m_SKYLAKE_AVX512.
19401 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
19403         PR inline-asm/84985
19404         * lra-constraints.c (process_alt_operands): Move setting
19405         this_alternative_matches below.
19407 2018-03-29  Martin Liska  <mliska@suse.cz>
19409         PR lto/84995.
19410         * doc/invoke.texi: Document how LTO works with debug info.
19411         Describe auto-load support of binutils.  Mention 'x86-64'
19412         as valid option value of -march option.
19414 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
19416         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
19418         PR c/85094
19419         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
19420         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
19421         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
19422         checking.
19424 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19426         PR target/84912
19427         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
19428         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
19429         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
19430         for RS6000_BTM_POWERPC64.
19431         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
19432         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
19433         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
19434         definition.
19435         (DIVDE): Use it.
19436         (DIVDEU): Likewise.
19438 2018-03-28  Carl Love  <cel@us.ibm.com>
19440         Revert
19441         2017-09-27  Carl Love  <cel@us.ibm.com>
19443         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
19444         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
19445         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
19446         fctiw instruction.
19448 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19450         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
19451         instead of __vector bool.
19452         (_mm_max_pu8): Likewise.
19453         (_mm_min_pi16): Likewise.
19455 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19457         PR target/84912
19458         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
19459         (DIVWEUO): Likewise.
19460         (DIVDEO): Likewise.
19461         (DIVDEUO): Likewise.
19462         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
19463         DIVWEUO and DIVDEUO.
19464         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
19465         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
19466         (div_extend): Likewise.
19467         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
19468         builtin function.
19469         (__builtin_divweuo): Likewise.
19470         (__builtin_divdeo): Likewise.
19471         (__builtin_divdeuo): Likewise.
19473 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
19475         PR target/85095
19476         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
19477         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
19479         PR tree-optimization/82004
19480         * gimple-match-head.c (optimize_pow_to_exp): New function.
19481         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
19482         Don't fold to exp if optimize_pow_to_exp is false.
19484 2018-03-28  Martin Liska  <mliska@suse.cz>
19486         PR other/84819
19487         * calls.c (initialize_argument_information): Fix trailing space.
19488         * common.opt: Fix typo and provide better explanation for
19489         -fsanitize-coverage option.
19490         * config/i386/i386.opt: Fix typo.
19492 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
19493             Martin Liska  <mliska@suse.cz>
19495         PR sanitizer/85081
19496         * gimplify.c (asan_poison_variable): Don't do the check for
19497         gimplify_omp_ctxp here.
19498         (gimplify_decl_expr): Do it here.
19499         (gimplify_target_expr): Likewise.
19501 2018-03-28  Martin Liska  <mliska@suse.cz>
19503         PR target/84988
19504         * config/i386/i386.c (ix86_function_arg_advance): Do not call
19505         chkp_type_bounds_count if MPX is not enabled.
19507 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19509         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
19511 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
19513         PR target/84914
19514         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
19515         function to create the function decl for complex long double
19516         multiply and divide for -mabi=ieeelongdouble.
19517         (init_float128_ieee): Call it.
19519 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
19521         PR target/85044
19522         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
19523         -fcf-protection=branch -mibt.
19524         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
19526 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19528         PR target/81863
19529         * config/arm/arm.c (arm_valid_symbolic_address): Handle
19530         arm_word_relocations.
19532 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
19534         PR target/85056
19535         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
19536         extern array declarations.
19538 2018-03-27  Richard Biener  <rguenther@suse.de>
19540         PR middle-end/84067
19541         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
19542         explicit single_use checks.
19544 2018-03-27  Richard Biener  <rguenther@suse.de>
19546         PR tree-optimization/85082
19547         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
19548         Valueize the VUSE.
19550 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19552         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
19553         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
19554         Turn on fasynchronous-unwind-tables and funwind-tables.
19556 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
19558         PR target/85073
19559         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
19560         (*bmi_blsr_<mode>_ccz): Ditto.
19562 2018-03-26  Tom de Vries  <tom@codesourcery.com>
19564         PR tree-optimization/85063
19565         * omp-general.c (offloading_function_p): New function.  Factor out
19566         of ...
19567         * omp-offload.c (pass_omp_target_link::gate): ... here.
19568         * omp-general.h (offloading_function_p): Declare.
19569         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
19570         with attribute omp declare target for offloading functions.
19572 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
19574         PR tree-optimization/84005
19575         * tree-data-ref.h (get_base_for_alignment): Declare.
19576         * tree-data-ref.c (get_base_for_alignment_1): New function.
19577         (get_base_for_alignment): Likewise.
19578         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
19579         get_base_for_alignment to find a suitable base object, instead
19580         of always using drb->base_address.
19582 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
19584         PR inline-asm/85022
19585         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
19586         known size by default.
19588 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
19590         PR inline-asm/85030
19591         * lra-constraints.c (process_alt_operands): Don't match BLKmode
19592         and non BLKmode operands.
19594 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19596         PR target/85026
19597         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
19598         Clean up attributes.
19600 2018-03-23  Richard Biener  <rguenther@suse.de>
19602         PR debug/85020
19603         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
19604         we are going to emit early debug for LTO.
19606 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
19608         PR inline-asm/85034
19609         * function.c (match_asm_constraints_1): Don't optimize if input
19610         doesn't satisfy general_operand predicate for output's mode.
19612         PR inline-asm/85022
19613         * alias.c (write_dependence_p): Don't require for x_canonicalized
19614         non-VOIDmode if x has VOIDmode.
19616         PR sanitizer/85029
19617         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
19618         just don't try to optimize it rather than assert it never happens.
19620 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19622         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
19623         macro expansions for definition of ST_INTERNAL_<mode> and
19624         LD_INTERNAL_<mode> builtins.
19625         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
19626         Remove prototype.
19627         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
19628         function.
19629         (altivec_expand_st_builtin): Likewise.
19630         (altivec_expand_builtin): Remove calls to deleted functions.
19631         (rs6000_address_for_altivec): Delete this function.
19632         * config/rs6000/vector.md: Remove expands for
19633         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
19635 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
19637         PR target/84826
19638         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
19639         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
19640         re-computing once computed.
19641         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
19642         (arm_init_machine_status): Initialize
19643         machine->static_chain_stack_bytes.
19645 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19647         PR target/84760
19648         * doc/extend.texi: Add four new prototypes for vec_ld.
19649         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
19650         definitions for more logical presentation.
19651         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
19652         entries for V1TI variants of __builtin_altivec_ld builtin.
19653         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
19654         handling of V1TI variant of LVX icode pattern.
19655         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
19656         (rs6000_gimple_fold_builtin): Likewise.
19657         (altivec_init_builtins): Add code to define
19658         __builtin_altivec_lvx_v1ti function.
19660 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19662         PR inline-asm/84941
19663         * function.c (match_asm_constraints_1): Don't do the optimization
19664         if input isn't a REG, SUBREG, MEM or constant.
19666 2018-03-22  Tom de Vries  <tom@codesourcery.com>
19668         PR tree-optimization/84956
19669         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
19670         bb_has_abnormal_pred.
19672 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19674         PR sanitizer/85018
19675         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
19676         DECL_INITIAL (decl) to decl at the end.
19677         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
19678         adjust the comment.
19680 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
19682         * doc/extend.texi (__builtin_tgmath): Document when complex
19683         integer types are treated as _Complex _Float64.
19685 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19687         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
19689 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19691         PR tree-optimization/84960
19692         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
19693         if it is ENTRY block, move them into single succ of ENTRY in that case.
19695 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
19697         PR tree-optimization/84811
19698         * poly-int.h (poly_span_traits): Remove the T3 parameter and
19699         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
19700         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
19701         (known_subrange_p): Update accordingly.  Cast each value involved
19702         in the size comparison, rather than casting the result of the
19703         subtraction.
19705 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19707         PR tree-optimization/84982
19708         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
19709         by flipping the least significant bit rather than all bits from
19710         bitpos to bitpos + bitsize - 1.
19712 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19714         * doc/extend.texi (Deprecated Features): Remove mention of
19715         long-deleted deprecations.
19717 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19719         PR jit/84288
19720         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
19721         * configure: Regenerate.
19723 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19725         PR tree-optimization/83126
19726         * tree-parloops.c (num_phis): New function.
19727         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
19729 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19731         * doc/extend.texi (Deprecated Features): Update deprecated flags,
19732         mention anon-struct/union members and trailing attributes.
19734 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
19736         PR tree-optimization/84969
19737         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
19738         builtin memset partitions if they set different rhs values.
19740 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19742         PR rtl-optimization/84989
19743         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
19744         VEC_DUPLICATE with scalar result mode.
19746 2018-03-21  Martin Liska  <mliska@suse.cz>
19748         PR ipa/84963
19749         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
19750         not intended return statement.
19752 2018-03-21  Martin Liska  <mliska@suse.cz>
19754         PR target/84988
19755         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
19756         (chkp_find_bound_slots_1): Limit number of iterations.
19758 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
19760         PR target/84838
19761         * Minor grammar fixes for x86 options.
19763 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19765         PR debug/84875
19766         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
19767         holding REG_CFA_RESTORE notes, instead turn them into a USE.
19769 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
19771         PR target/83789
19772         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
19773         (altivec_lvx_<mode>_1op): Likewise.
19774         (altivec_stvx_<mode>_2op): Likewise.
19775         (altivec_stvx_<mode>_1op): Likewise.
19776         (altivec_lvx_<VM2:mode>): New define_expand.
19777         (altivec_stvx_<VM2:mode>): Likewise.
19778         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
19779         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19780         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
19781         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19782         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
19783         (rs6000_gen_lvx): Likewise.
19784         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
19785         (altivec_expand_stv_builtin): Likewise.
19786         (altivec_expand_builtin): Likewise.
19787         * config/rs6000/vector.md: Likewise.
19789 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19791         PR target/82518
19792         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
19793         BYTES_BIG_ENDIAN.
19795 2018-03-20  Richard Biener  <rguenther@suse.de>
19797         PR target/84986
19798         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
19799         sign-conversions as zero, fall back to standard scalar_stmt
19800         cost for the rest.
19802 2018-03-20  Martin Liska  <mliska@suse.cz>
19804         PR ipa/84825
19805         * predict.c (rebuild_frequencies): Handle case when we have
19806         PROFILE_ABSENT, but flag_guess_branch_prob is false.
19808 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19810         PR target/84990
19811         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
19812         flag_section_anchors.
19813         * varasm.c (use_blocks_for_decl_p): Remove hack for
19814         dw2_force_const_mem.
19816         PR target/84845
19817         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
19818         to ...
19819         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
19820         be created, use lowpart_subreg of operands[0] rather than operands[0]
19821         itself.
19822         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
19823         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
19824         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
19825         and n constraint instead of aarch64_shift_imm_di and Usd.
19826         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19827         (*aarch64_<optab>_reg_minus<mode>3): ... this.
19829 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
19831         PR target/82989
19832         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19833         to favor GPR over NEON registers.
19834         (<shift>di3_neon): Likewise.
19836 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19838         PR target/84952
19839         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19840         (nvptx_process_pars): Emit bar.sync asap and alap.
19842 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19844         PR target/84954
19845         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19846         seen_label if seen_label is already set.
19848 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19850         PR target/84945
19851         * config/i386/i386.c (fold_builtin_cpu): For features above 31
19852         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19853         Use 1U instead of 1.  Formatting fixes.
19855         PR c/84953
19856         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19857         instead of TREE_TYPE (s1) for the return value.
19859 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
19861         PR tree-optimization/84946
19862         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19863         bitsize + bitsize in poly_uint64 rather than poly_int64.
19865         PR sanitizer/78651
19866         * dwarf2asm.c: Include fold-const.c.
19867         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19868         of decl rather than decl itself.
19870         PR rtl-optimization/84643
19871         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19873 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
19875         PR sanitizer/78651
19876         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19877         calling assemble_variable.
19879 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
19881         PR target/81647
19882         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19883         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19885 2018-03-19  Jim Wilson  <jimw@sifive.com>
19887         PR bootstrap/84856
19888         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19889         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19890         (riscv_first_stack_step): Likewise.
19891         (riscv_option_override): Use STACK_BOUNDARY instead of
19892         MIN_STACK_BOUNDARY.
19893         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19894         MIN_STACK_BOUNDARY.
19895         (BIGGEST_ALIGNMENT): Set to 128.
19896         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19897         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19898         STACK_BOUNDARY.
19900 2018-03-19  Richard Biener  <rguenther@suse.de>
19902         PR tree-optimization/84933
19903         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19904         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19906 2018-03-19  Richard Biener  <rguenther@suse.de>
19908         PR tree-optimization/84859
19909         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19910         (cond_if_else_store_replacement): Perform sinking operation on
19911         single-store BBs regardless of MAX_STORES_TO_SINK setting.
19912         Generalize what a BB with a single eligible store is.
19914 2018-03-19  Richard Biener  <rguenther@suse.de>
19916         PR tree-optimization/84929
19917         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19918         chrec_is_positive against non-chrec arg.
19920 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
19922         PR target/84711
19923         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19925 2018-03-18  Martin Liska  <mliska@suse.cz>
19927         PR rtl-optimization/84635
19928         * regrename.c (build_def_use): Use matches_mode only when
19929         matches >= 0.
19931 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
19933         PR tree-optimization/84913
19934         * tree-vect-loop.c (vectorizable_reduction): Don't try to
19935         vectorize chains of COND_EXPRs.
19937 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19939         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19941 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19943         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19945 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19947         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19949 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19950             Kito Cheng  <kito.cheng@gmail.com>
19952         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19953         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19954         (nds32_adjust_reg_alloc_order): New function.
19955         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19957 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
19959         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19960         nds32_print_operand, nds32_print_operand_address): Use
19961         HOST_WIDE_INT_PRINT_DEC instead.
19963 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19965         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19967 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
19969         PR target/84902
19970         * config/i386/i386.c (initial_ix86_tune_features,
19971         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19972         unsigned long long.
19973         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19974         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19975         rather than 1u << ix86_tune.  Formatting fix.
19976         (ix86_option_override_internal): Change ix86_arch_mask from
19977         unsigned int to unsigned HOST_WIDE_INT, initialize to
19978         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19979         (ix86_function_specific_restore): Likewise.
19981 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19983         PR target/84899
19984         * postreload.c (reload_combine_recognize_pattern): Perform
19985         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19986         truncate_int_for_mode the result for the destination's mode.
19988         PR c/84909
19989         * hsa-gen.c (mem_type_for_type): Fix comment typo.
19990         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19991         Likewise.
19992         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19993         Likewise.
19995 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
19997         PR target/84876
19998         * lra-assigns.c (lra_split_hard_reg_for): Don't use
19999         regno_allocno_class_array and sorted_pseudos.
20000         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20001         insns where regno is used.
20003 2018-03-16  Martin Liska  <mliska@suse.cz>
20005         PR ipa/84833
20006         * multiple_target.c (create_dispatcher_calls): Redirect
20007         reference in the symbol table.
20009 2018-03-16  Martin Liska  <mliska@suse.cz>
20011         PR ipa/84722
20012         * multiple_target.c (create_dispatcher_calls): Redirect also
20013         an alias.
20015 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20017         PR c++/79937
20018         PR c++/82410
20019         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20020         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20021         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20023 2018-03-16  Julia Koval  <julia.koval@intel.com>
20025         * doc/invoke.texi (Skylake Server): Add CLWB.
20026         Cannonlake): Remove CLWB.
20028 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20030         PR tree-optimization/84841
20031         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20032         1 << 3.
20033         (FLOAT_ONE_CONST_TYPE): Define.
20034         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20035         (sort_by_operand_rank): Put entries with higher constant_type last
20036         rather than first to match comments.
20038 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
20040         * config/nios2/nios2.md (movsi_internal): Fix thinko in
20041         split predicate.
20043 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20045         PR c++/79085
20046         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20047         check and use address of target always.
20049 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
20051         PR target/84574
20052         * config/i386/i386.c (indirect_thunk_needed): Update comments.
20053         (indirect_thunk_bnd_needed): Likewise.
20054         (indirect_thunks_used): Likewise.
20055         (indirect_thunks_bnd_used): Likewise.
20056         (indirect_return_needed): New.
20057         (indirect_return_bnd_needed): Likewise.
20058         (output_indirect_thunk_function): Add a bool argument for
20059         function return.
20060         (output_indirect_thunk_function): Don't generate alias for
20061         function return thunk.
20062         (ix86_code_end): Call output_indirect_thunk_function to generate
20063         function return thunks.
20064         (ix86_output_function_return): Set indirect_return_bnd_needed
20065         and indirect_return_needed instead of indirect_thunk_bnd_needed
20066         and indirect_thunk_needed.
20068 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
20070         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20071         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20072         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20074 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
20075             Paul Hua <paul.hua.gm@gmail.com>
20077         PR c/84852
20078         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20080 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
20082         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20083         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20084         resp. SFmode cases.
20086 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
20088         PR target/84711
20089         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20090         instead of GET_MODE_SIZE when comparing Units.
20092 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
20094         PR target/68256
20095         * varasm.c (hash_section): Return an unchangeble hash value
20096         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20097         Return !aarch64_can_use_per_function_literal_pools_p ().
20099 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20101         PR target/84860
20102         * optabs.c (emit_conditional_move): Pass address of cmode's copy
20103         rather than address of cmode as last argument to prepare_cmp_insn.
20105 2018-03-15  Julia Koval  <julia.koval@intel.com>
20107         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20108         F_AVX512VNNI, F_AVX512BITALG): New.
20110 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
20112         PR target/83451
20113         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
20114         insn for floating-point loads and stores.
20116 2018-03-14  Carl Love  <cel@us.ibm.com>
20118         * config/rs6000/rs6000-c.c: Add macro definitions for
20119         ALTIVEC_BUILTIN_VEC_PERMXOR.
20120         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20121         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20122         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20123         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20124         UNSPEC_VPERMXOR.
20125         * config/doc/extend.texi: Add prototypes for vec_permxor.
20127 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
20129         PR c/84852
20130         * diagnostic-show-locus.c (class layout_point): Convert m_line
20131         from int to linenum_type.
20132         (line_span::comparator): Use linenum "compare" function when
20133         comparing line numbers.
20134         (test_line_span): New function.
20135         (layout_range::contains_point): Convert param "row" from int to
20136         linenum_type.
20137         (layout_range::intersects_line_p): Likewise.
20138         (layout::will_show_line_p): Likewise.
20139         (layout::print_source_line): Likewise.
20140         (layout::should_print_annotation_line_p): Likewise.
20141         (layout::print_annotation_line): Likewise.
20142         (layout::print_leading_fixits): Likewise.
20143         (layout::annotation_line_showed_range_p): Likewise.
20144         (struct line_corrections): Likewise for field m_row.
20145         (line_corrections::line_corrections): Likewise for param "row".
20146         (layout::print_trailing_fixits): Likewise.
20147         (layout::get_state_at_point): Likewise.
20148         (layout::get_x_bound_for_row): Likewise.
20149         (layout::print_line): Likewise.
20150         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20151         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20152         * input.c (selftest::test_linenum_comparisons): New function.
20153         (selftest::input_c_tests): Call it.
20154         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20155         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20156         * selftest.h (ASSERT_GT): New macro.
20157         (ASSERT_GT_AT): New macro.
20158         (ASSERT_LT): New macro.
20159         (ASSERT_LT_AT): New macro.
20161 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
20163         PR rtl-optimization/84780
20164         * combine.c (distribute_links): Don't make a link based on pc_rtx.
20166 2018-03-14  Martin Liska  <mliska@suse.cz>
20168         * tree.c (record_node_allocation_statistics): Use
20169         get_stats_node_kind.
20170         (get_stats_node_kind): New function extracted from
20171         record_node_allocation_statistics.
20172         (free_node): Use get_stats_node_kind.
20174 2018-03-14  Richard Biener  <rguenther@suse.de>
20176         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20177         that the value-set of ANTIC_IN doesn't grow.
20179         Revert
20180         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20181         member.
20182         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20183         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20185 2018-03-14  Julia Koval  <julia.koval@intel.com>
20187         * config.gcc (icelake-client, icelake-server): New.
20188         (icelake): Remove.
20189         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20190         (initial_ix86_arch_features): Ditto.
20191         (PTA_SKYLAKE): Add SGX.
20192         (PTA_ICELAKE): Remove.
20193         (PTA_ICELAKE_CLIENT): New.
20194         (PTA_ICELAKE_SERVER): New.
20195         (ix86_option_override_internal): Split up icelake on icelake client and
20196         icelake server.
20197         (get_builtin_code_for_version): Ditto.
20198         (fold_builtin_cpu): Ditto.
20199         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20200         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20201         * config/i386/i386.h (processor_type): Ditto.
20202         * doc/invoke.texi: Ditto.
20204 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
20206         PR sanitizer/83392
20207         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20208         INTEGER_CST offset, add it together with bitpos / 8 and
20209         sign extend based on POINTER_SIZE.
20211         PR target/84844
20212         Revert
20213         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
20215         PR target/78090
20216         * config/i386/constraints.md (Yc): New register constraint.
20217         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20218         Use Yc constraint for alternative 2 of operand 0.  Remove
20219         preferred_for_speed attribute.
20221 2018-03-14  Richard Biener  <rguenther@suse.de>
20223         PR tree-optimization/84830
20224         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20225         with the old one to avoid oscillations.
20227 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
20229         PR target/83712
20230         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20231         pseudos.
20232         (assign_by_spills): Return a flag of reload assignment failure.
20233         Do not process the reload assignment failures.  Do not spill other
20234         reload pseudos if they has the same reg class.  Update n if
20235         necessary.
20236         (lra_assign): Add a return arg.  Set up from the result of
20237         assign_by_spills call.
20238         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20239         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20240         usage_insns if it is not NULL.
20241         (spill_hard_reg_in_range): New function.
20242         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20243         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20244         function prototypes.
20245         (lra_assign): Change prototype.
20246         * lra.c (lra): Add code to deal with fails by splitting hard reg
20247         live ranges.
20249 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
20251         * config/riscv/riscv.opt (mrelax): New option.
20252         * config/riscv/riscv.c (riscv_file_start): Emit ".option
20253         "norelax" when riscv_mrelax is disabled.
20254         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20256 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20258         PR target/84743
20259         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20260         reassociation for int modes.
20262 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20264         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20265         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20266         for big-endian.
20267         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20268         * config/aarch64/aarch64-sve.md
20269         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20270         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20271         (*extend<mode><Vwide>2): Rename to...
20272         (aarch64_sve_extend<mode><Vwide>2): ...this.
20273         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20274         renaming the old pattern to...
20275         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
20276         unsigned packs.
20277         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20278         define_expand, renaming the old pattern to...
20279         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20280         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20281         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20282         account when deciding which SVE instruction the optab should use.
20283         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20285 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20287         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20288         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20289         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20290         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20291         (tlsdesc_small_<mode>): Turn a define_expand and use
20292         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
20293         (tlsdesc_small_advsimd_<mode>): ...this.
20294         (tlsdesc_small_sve_<mode>): New pattern.
20296 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20298         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20299         (UNSPEC_UMUL_HIGHPART): New constants.
20300         (MUL_HIGHPART): New int iteraor.
20301         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20302         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20303         define_expand.
20304         (*<su>mul<mode>3_highpart): New define_insn.
20306 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
20308         PR lto/84805
20309         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20310         incomplete types.
20312 2018-03-13  Martin Liska  <mliska@suse.cz>
20314         PR ipa/84658.
20315         * (sem_item_optimizer::sem_item_optimizer): Initialize new
20316         vector.
20317         (sem_item_optimizer::~sem_item_optimizer): Release it.
20318         (sem_item_optimizer::merge_classes): Register variable aliases.
20319         (sem_item_optimizer::fixup_pt_set): New function.
20320         (sem_item_optimizer::fixup_points_to_sets): Likewise.
20321         * ipa-icf.h: Declare new variables and functions.
20323 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
20325         PR middle-end/84834
20326         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20327         integer_pow2p@2 and test integer_pow2p in condition.
20328         (A < 0 ? C : 0): Similarly for @1.
20330         PR middle-end/84831
20331         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20332         characters starting at p contain '\0' character, don't look beyond
20333         that.
20335         PR target/84827
20336         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20337         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20339         PR target/84828
20340         * reg-stack.c (change_stack): Change update_end var from int to
20341         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20342         also call set_block_for_insn on the newly added insns and rescan.
20344         PR target/84786
20345         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20346         on the last operand.
20348         PR c++/84704
20349         * tree.c (stabilize_reference_1): Return save_expr (e) for
20350         STATEMENT_LIST even if it doesn't have side-effects.
20352 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
20354         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20356 2018-03-12  Renlin Li  <renlin.li@arm.com>
20358         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20359         aarch64_output_scalar_simd_mov_immediate.
20361 2018-03-12  Martin Sebor  <msebor@redhat.com>
20363         PR tree-optimization/83456
20364         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20365         for perfectly overlapping calls to memcpy.
20366         (gimple_fold_builtin_memory_chk): Same.
20367         (gimple_fold_builtin_strcpy): Handle no-warning.
20368         (gimple_fold_builtin_stxcpy_chk): Same.
20369         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20371 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20373         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20374         parameter.  Use it for SFmode.
20375         (rs6000_function_arg_advance_1): Adjust.
20376         (rs6000_function_arg): Adjust.
20377         (rs6000_gimplify_va_arg): Pass false for that new parameter.
20379 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20381         PR rtl-optimization/84169
20382         PR rtl-optimization/84780
20383         * combine.c (can_combine_p): Check for a 2-insn combination whether
20384         the destination register is used between the two insns, too.
20386 2018-03-12  Richard Biener  <rguenther@suse.de>
20388         PR tree-optimization/84803
20389         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
20390         for refs DR analysis didn't process.
20392 2018-03-12  Richard Biener  <rguenther@suse.de>
20394         PR tree-optimization/84777
20395         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
20396         force-vectorize loops ignore whether we are optimizing for size.
20398 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20400         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
20401         (TARGET_MD_ASM_ADJUST): Define.
20403 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
20404             Kito Cheng  <kito.cheng@gmail.com>
20405             Chung-Ju Wu  <jasonwucj@gmail.com>
20407         * config/nds32/nds32.c (nds32_compute_stack_frame,
20408         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
20409         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
20410         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
20411         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
20412         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
20413         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
20414         * config/nds32/nds32.md (prologue, epilogue): Use macro
20415         NDS32_V3PUSH_AVAILABLE_P to do checking.
20417 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
20419         PR debug/58150
20420         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
20421         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
20422         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
20423         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
20424         addition of most attributes on !orig_type_die or the attribute not
20425         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
20427 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20428             Chung-Ju Wu  <jasonwucj@gmail.com>
20430         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
20431         __NDS32_VH__ macro.
20432         * config/nds32/nds32.opt (mvh): New option.
20434 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20435             Chung-Ju Wu  <jasonwucj@gmail.com>
20437         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
20438         function.
20439         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
20440         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
20441         definition.
20443 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20444             Chung-Ju Wu  <jasonwucj@gmail.com>
20446         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
20447         function.
20448         * config/nds32/nds32-multiple.md (strlensi): New pattern.
20449         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
20451 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
20452             Kito Cheng  <kito.cheng@gmail.com>
20453             Chung-Ju Wu  <jasonwucj@gmail.com>
20455         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
20456         UNSPEC_FFMISM and UNSPEC_FLMISM.
20457         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
20458         for ffb, ffmism and flmism.
20459         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
20460         (unspec_ffmism): Ditto.
20461         (unspec_flmism): Ditto.
20462         (nds32_expand_builtin_impl): Check if string extension is available.
20463         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
20464         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
20466 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
20468         Reverting patch:
20469         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
20471         PR target/83712
20472         * lra-assigns.c (assign_by_spills): Return a flag of reload
20473         assignment failure.  Do not process the reload assignment
20474         failures.  Do not spill other reload pseudos if they has the same
20475         reg class.
20476         (lra_assign): Add a return arg.  Set up from the result of
20477         assign_by_spills call.
20478         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20479         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20480         usage_insns if it is not NULL.
20481         (spill_hard_reg_in_range): New function.
20482         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20483         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20484         function prototypes.
20485         (lra_assign): Change prototype.
20486         * lra.c (lra): Add code to deal with fails by splitting hard reg
20487         live ranges.
20489 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
20491         PR target/84807
20492         * config/i386/i386.opt: Replace Enforcment with Enforcement.
20494 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
20496         PR debug/84620
20497         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
20498         (dw_val_node): Add val_symbolic_view.
20499         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
20500         (symview_upper_bound): New.
20501         (new_line_info_table): Initialize symviews_since_reset.
20502         (dwarf2out_source_line): Count symviews_since_reset and set
20503         symview_upper_bound.
20504         (dw_val_equal_p): Handle symview.
20505         (add_AT_symview): New.
20506         (print_dw_val): Handle symview.
20507         (attr_checksum, attr_checksum_ordered): Likewise.
20508         (same_dw_val_p, size_of_die): Likewise.
20509         (value_format, output_die): Likewise.
20510         (add_high_low_attributes): Use add_AT_symview for entry_view.
20511         (dwarf2out_finish): Reset symview_upper_bound, clear
20512         zero_view_p.
20514 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
20516         PR target/83969
20517         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
20518         Add strict argument and use it.
20519         (rs6000_split_multireg_move): Update for new strict argument.
20520         (mem_operand_gpr): Disallow all non-offsettable addresses.
20521         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
20523 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
20525         PR target/84772
20526         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
20527         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
20528         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
20530         PR c++/84767
20531         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
20532         decl, use remap_type if we want to use the type.
20534 2018-03-09  Martin Sebor  <msebor@redhat.com>
20536         PR tree-optimization/84526
20537         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20538         Remove dead code.
20539         (builtin_access::generic_overlap): Be prepared to handle non-array
20540         base objects.
20542 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
20544         PR rtl-optimization/84682
20545         * lra-constraints.c (process_address_1): Check is_address flag
20546         for address constraints.
20547         (process_alt_operands): Likewise.
20548         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
20549         preprocess_constraints.
20550         * recog.h (preprocess_constraints): Add oploc parameter.
20551         Adjust callers.
20552         * recog.c (preprocess_constraints): Test address_operand for
20553         CT_ADDRESS constraints.
20555 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
20557         PR target/83712
20558         * lra-assigns.c (assign_by_spills): Return a flag of reload
20559         assignment failure.  Do not process the reload assignment
20560         failures.  Do not spill other reload pseudos if they has the same
20561         reg class.
20562         (lra_assign): Add a return arg.  Set up from the result of
20563         assign_by_spills call.
20564         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20565         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20566         usage_insns if it is not NULL.
20567         (spill_hard_reg_in_range): New function.
20568         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20569         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20570         function prototypes.
20571         (lra_assign): Change prototype.
20572         * lra.c (lra): Add code to deal with fails by splitting hard reg
20573         live ranges.
20575 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20577         PR target/83193
20578         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
20579         Accept complain bool parameter.  Only emit errors if it is true.
20580         (arm_parse_cpu_option_name): Likewise.
20581         (arm_target_thumb_only): Adjust callers of the above.
20582         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
20583         prototype to take a default true bool parameter.
20584         (arm_parse_arch_option_name): Likewise.
20586 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
20587             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
20589         PR jit/64089
20590         PR jit/84288
20591         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
20592         * configure: Regenerate.
20593         * configure.ac ("linker --version-script option"): New.
20594         ("linker soname option"): New.
20596 2018-03-09  Richard Biener  <rguenther@suse.de>
20598         PR tree-optimization/84775
20599         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
20600         immediate uses of predicate stmts and mark them modified.
20602         Revert
20603         PR tree-optimization/84178
20604         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20605         to caller.
20606         (version_loop_for_if_conversion): Delay update_ssa call.
20607         (tree_if_conversion): Delay update_ssa until after predicate
20608         insertion.
20610 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
20612         PR target/84763
20613         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
20614         when the function accesses prior frames.
20616 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20618         PR debug/84456
20619         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
20620         gen_llsym, otherwise call maybe_gen_llsym.
20622         PR inline-asm/84742
20623         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
20624         has ',' character inside of it.
20626 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20628         PR target/84748
20629         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
20630         as clobbering CC_REGNUM.
20632 2018-03-08  Richard Biener  <rguenther@suse.de>
20634         PR middle-end/84552
20635         * tree-scalar-evolution.c: Include tree-into-ssa.h.
20636         (follow_copies_to_constant): Do not follow SSA names registered
20637         for update.
20639 2018-03-08  Richard Biener  <rguenther@suse.de>
20641         PR tree-optimization/84178
20642         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20643         to caller.
20644         (version_loop_for_if_conversion): Delay update_ssa call.
20645         (tree_if_conversion): Delay update_ssa until after predicate
20646         insertion.
20648 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
20650         PR tree-optimization/84178
20651         * tree-if-conv.c (release_bb_predicate): Remove the
20652         the assertion that the stmts have NULL use_ops.
20653         Discard the statements, asserting that they haven't
20654         yet been added to a BB.
20656 2018-03-08  Richard Biener  <rguenther@suse.de>
20658         PR tree-optimization/84746
20659         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
20660         (phi_translate): Pass in destination ANTIC_OUT set.
20661         (phi_translate_1): Likewise.  For a simplified result lookup
20662         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
20663         (phi_translate_set): Adjust.
20664         (do_pre_regular_insertion): Likewise.
20665         (do_pre_partial_partial_insertion): Likewise.
20667 2018-03-08  Martin Liska  <mliska@suse.cz>
20669         PR gcov-profile/84735
20670         * doc/gcov.texi: Document usage of profile files.
20671         * gcov-io.h: Document changes in the format.
20673 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
20675         PR debug/84404
20676         PR debug/84408
20677         * dwarf2out.c (struct dw_line_info_table): Update comments for
20678         view == -1.
20679         (FORCE_RESET_NEXT_VIEW): New.
20680         (FORCE_RESETTING_VIEW_P): New.
20681         (RESETTING_VIEW_P): Check for -1 too.
20682         (ZERO_VIEW_P): Likewise.
20683         (new_line_info_table): Force-reset next view.
20684         (dwarf2out_begin_function): Likewise.
20685         (dwarf2out_source_line): Simplify zero_view_p initialization.
20686         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
20687         view directly.  Omit view when omitting .loc at line 0.
20689 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20691         PR tree-optimization/84740
20692         * tree-switch-conversion.c (process_switch): Call build_constructors
20693         only if info.phi_count is non-zero.
20695         PR tree-optimization/84739
20696         * tree-tailcall.c (find_tail_calls): Check call arguments against
20697         DECL_ARGUMENTS (current_function_decl) rather than
20698         DECL_ARGUMENTS (func) when checking for tail recursion.
20700 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20702         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
20703         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
20704         Volker Reichelt's entry and add entries for people that perform
20705         GCC fuzzy testing and report numerous bugs.
20707 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
20709         PR target/82411
20710         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
20711         readonly data in sdata, if that is disabled.
20712         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
20713         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
20714         -mreadonly-in-sdata option.
20716 2018-03-07  Martin Sebor  <msebor@redhat.com>
20718         PR tree-optimization/84468
20719         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
20720         basic block when looking for nul assignment.
20722 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
20724         PR target/84277
20725         * except.h (output_function_exception_table): Adjust prototype.
20726         * except.c (output_function_exception_table): Remove FNNAME parameter
20727         and add SECTION parameter.  Ouput one part of the table at a time.
20728         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
20729         the first part of the exception table and emit unwind directives.
20730         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
20731         (i386_pe_seh_cold_init): Likewise.
20732         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
20733         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
20734         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
20735         (ix86_output_call_insn): Emit a nop in one more case for SEH.
20736         * config/i386/winnt.c: Include except.h.
20737         (struct seh_frame_state): Add reg_offset, after_prologue and
20738         in_cold_section fields.
20739         (i386_pe_seh_end_prologue): Set seh->after_prologue.
20740         (i386_pe_seh_cold_init): New function.
20741         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
20742         to seh->in_cold_section.
20743         (seh_emit_push): Record the offset of the push.
20744         (seh_emit_save): Record the offet of the save.
20745         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
20746         Test seh->after_prologue to disregard the epilogue.
20747         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
20748         (i386_pe_end_cold_function): New function.
20750 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20752         PR fortran/84565
20753         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
20754         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
20756         PR c++/84704
20757         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
20758         on tmp_var.
20759         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
20760         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
20762         PR middle-end/84723
20763         * multiple_target.c: Include tree-inline.h and intl.h.
20764         (expand_target_clones): Diagnose and fail if node->definition and
20765         !tree_versionable_function_p (node->decl).
20767 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
20769         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
20770         sprint_ul.
20771         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
20772         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
20773         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
20775 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20777         PR target/84710
20778         * combine.c (try_combine): Use reg_or_subregno instead of handling
20779         just paradoxical SUBREGs and REGs.
20781 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
20783         * config/arc/arc.c (arc_finalize_pic): Remove function.
20784         (arc_must_save_register): We use single base PIC register, remove
20785         checks to save/restore the PIC register.
20786         (arc_expand_prologue): Likewise.
20787         * config/arc/arc-protos.h (arc_set_default_type_attributes):
20788         Remove.
20789         (arc_verify_short): Likewise.
20790         (arc_attr_type): Likewise.
20791         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
20792         (walk_stores): Likewise.
20793         (arc_address_cost): Make it static.
20794         (arc_verify_short): Likewise.
20795         (branch_dest): Likewise.
20796         (arc_attr_type): Likewise.
20797         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
20798         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
20799         (arc_final_prescan_insn): Remove inserting the nops due to
20800         hardware hazards.  It is done in reorg step.
20801         (insn_length_variant_t): Remove.
20802         (insn_length_parameters_t): Likewise.
20803         (arc_insn_length_parameters): Likewise.
20804         (arc_get_insn_variants): Likewise.
20805         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
20807 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20809         PR inline-asm/84683
20810         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
20811         assertion failure.
20813         PR tree-optimization/84687
20814         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
20815         on new_node->decl.
20816         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
20818 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20820         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
20821         Rename to ppc_speculation_barrier.
20822         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
20823         __builtin_ppc_speculation_barrier.
20825 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20827         PR target/84700
20828         * combine.c (combine_simplify_rtx): Don't try to simplify if
20829         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20830         are equal to x.
20832 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
20834         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20835         to 32 bytes when compiling for POWER9.
20837 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20839         PR target/84564
20840         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20841         regparm >= 3 with no arg reg available also for calls with
20842         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
20844         PR target/84524
20845         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20846         orig,vex.
20847         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
20849 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
20851         PR target/84264
20852         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20854 2018-03-05  Richard Biener  <rguenther@suse.de>
20856         PR tree-optimization/84486
20857         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20858         When inserting a __builtin_assume_aligned call set the LHS
20859         SSA name alignment info accordingly.
20861 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
20863         PR tree-optimization/84114
20864         * config/aarch64/aarch64.c (aarch64_reassociation_width)
20865         Avoid reassociation of FLOAT_MODE addition.
20867 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
20869         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20870         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20871         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20872         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20873         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20874         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20875         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20876         and -mwbnoinvd.
20877         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20878         __builtin_ia32_wbinvd): New builtins.
20879         (SPECIAL_ARGS2): New.
20880         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20881         (SPECIAL_ARGS2): New.
20882         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20883         (ix86_valid_target_attribute_inner_p): Ditto.
20884         (ix86_init_mmx_sse_builtins): Add special_args2.
20885         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20886         TARGET_WBNOINVD_P): New.
20887         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20888         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20889         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20890         * config/i386/immintrin.h (_wbinvd): New intrinsic.
20891         * config/i386/pconfigintrin.h: New file.
20892         * config/i386/wbnoinvdintrin.h: Ditto.
20893         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20894         wbnoinvdintrin.h.
20895         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20897 2018-03-05  Richard Biener  <rguenther@suse.de>
20899         PR tree-optimization/84670
20900         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20901         member.
20902         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20903         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20904         (compute_antic_aux): Only assert the number of values in ANTIC_IN
20905         doesn't grow if all successors (recursively) were visited at least
20906         once.
20908 2018-03-05  Richard Biener  <rguenther@suse.de>
20910         PR tree-optimization/84650
20911         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20912         if executed in the loop pipeline.
20914 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
20916         * doc/configfiles.texi (Configuration Files): Move info about
20917         conditionalizing $target-protos.h to...
20918         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
20919         differs from $target-protos.h.
20921 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
20922             Chung-Ju Wu  <jasonwucj@gmail.com>
20924         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20925         * config/nds32/nds32-multiple.md (setmemsi): Define.
20926         * config/nds32/nds32-memory-manipulation.c
20927         (nds32_gen_dup_4_byte_to_word_value): New.
20928         (emit_setmem_word_loop): New.
20929         (emit_setmem_byte_loop): New.
20930         (nds32_expand_setmem_loop): New.
20931         (nds32_expand_setmem_loop_v3m): New.
20932         (nds32_expand_setmem_unroll): New.
20933         (nds32_expand_setmem): New.
20935 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20936             Chung-Ju Wu  <jasonwucj@gmail.com>
20938         * config/nds32/nds32-memory-manipulation.c
20939         (nds32_emit_load_store): New.
20940         (nds32_emit_post_inc_load_store): New.
20941         (nds32_emit_mem_move): New.
20942         (nds32_emit_mem_move_block): New.
20943         (nds32_expand_movmemsi_loop_unknown_size): New.
20944         (nds32_expand_movmemsi_loop_known_size): New.
20945         (nds32_expand_movmemsi_loop): New.
20946         (nds32_expand_movmemsi_unroll): New.
20947         (nds32_expand_movmemqi): Rename ...
20948         (nds32_expand_movmemsi): ... to this.
20949         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20950         (movmemsi): ... to this.
20951         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20952         (nds32_expand_movmemsi): ... to this.
20954 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20955             Monk Chiang  <sh.chiang04@gmail.com>
20956             Chung-Ju Wu  <jasonwucj@gmail.com>
20958         * config/nds32/nds32-protos.h
20959         (nds32_expand_load_multiple): New arguments.
20960         (nds32_expand_store_multiple): Ditto.
20961         (nds32_valid_multiple_load_store): Rename ...
20962         (nds32_valid_multiple_load_store_p): ... to this.
20963         * config/nds32/nds32-memory-manipulation.c
20964         (nds32_expand_load_multiple): Refine implementation.
20965         (nds32_expand_store_multiple): Ditto.
20966         * config/nds32/nds32-multiple.md
20967         (load_multiple): Update nds32_expand_load_multiple interface.
20968         (store_multiple): Update nds32_expand_store_multiple interface.
20969         * config/nds32/nds32-predicates.c
20970         (nds32_valid_multiple_load_store): Rename ...
20971         (nds32_valid_multiple_load_store_p): ... to this and refine
20972         implementation.
20973         * config/nds32/predicates.md
20974         (nds32_load_multiple_and_update_address_operation): New predicate.
20975         (nds32_store_multiple_and_update_address_operation): New predicate.
20977 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20978             Chung-Ju Wu  <jasonwucj@gmail.com>
20980         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20981         (combo): New attribute.
20982         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20984 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20986         * config/nds32/nds32.opt: Change -mcmodel= default value.
20988 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
20989             Monk Chiang  <sh.chiang04@gmail.com>
20990             Chung-Ju Wu  <jasonwucj@gmail.com>
20992         * config/nds32/constants.md (unspec_element): New enum.
20993         * config/nds32/constraints.md (Umw): New constraint.
20994         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20995         * config/nds32/nds32-intrinsic.md: Likewise.
20996         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20997         (nds32_valid_smw_lwm_base_p): New.
20998         (nds32_output_smw_single_word): New.
20999         (nds32_output_lmw_single_word): New.
21000         (nds32_expand_unaligned_load): New.
21001         (nds32_expand_unaligned_store): New.
21002         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21003         (nds32_output_smw_single_word): Declare.
21004         (nds32_output_lmw_single_word): Declare.
21005         (nds32_expand_unaligned_load): Declare.
21006         (nds32_expand_unaligned_store): Declare.
21007         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21008         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21009         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21010         NDS32_BUILTIN_UASTORE_DW.
21011         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21012         predicate.
21014 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
21015             Kito Cheng  <kito.cheng@gmail.com>
21016             Chung-Ju Wu  <jasonwucj@gmail.com>
21018         * config/nds32/nds32-intrinsic.c
21019         (nds32_expand_builtin_null_ftype_reg): Delete.
21020         (nds32_expand_builtin_reg_ftype_imm): Ditto.
21021         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21022         (nds32_read_argument): New.
21023         (nds32_legitimize_target): Ditto.
21024         (nds32_legitimize_argument): Ditto.
21025         (nds32_check_constant_argument): Ditto.
21026         (nds32_expand_unop_builtin): Ditto.
21027         (nds32_expand_unopimm_builtin): Ditto.
21028         (nds32_expand_binop_builtin): Ditto.
21029         (nds32_builtin_decl_impl): Ditto.
21030         (builtin_description): Ditto.
21031         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21032         (nds32_init_builtins_impl): Ditto.
21033         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21034         (nds32_builtin_decl): New.
21035         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21036         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21038 2018-03-02  Jeff Law  <law@redhat.com>
21040         * reorg.c (stop_search_p): Handle DEBUG_INSN.
21041         (redundant_insn, fill_simple_delay_slots): Likewise.
21042         (fill_slots_from_thread): Likewise.
21043         * resource.c (mark_referenced_resources): Likewise.
21044         (mark_set_resources, find_dead_or_set_registers): Likewise.
21046 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21048         * substring-locations.h (format_warning_va): Formatting fix for
21049         ATTRIBUTE_GCC_DIAG.
21050         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21051         argument.
21052         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21053         * substring-locations.c: Include intl.h.
21054         (format_warning_va): Turned into small wrapper around
21055         format_warning_n_va, renamed to ...
21056         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21057         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21058         use ngettext.
21059         (format_warning_at_substring_n): New function.
21060         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21061         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
21062         format_warning_at_substring with just a shorter name instead of
21063         const function pointer.
21064         (fmtwarn_n): New function.
21065         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21066         appropriate, get rid of all the fmtstr temporaries, move conditionals
21067         with G_() wrapped string literals directly into fmtwarn arguments,
21068         cast dir.len to (int), formatting fixes.
21070 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
21072         * doc/invoke.texi: Remove "Cilk Plus" references.
21074 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21075             Richard Biener  <rguenther@suse.de>
21077         PR ipa/84628
21078         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21079         for error or warning attributes if CALL_FROM_THUNK_P is set.
21080         Formatting fixes.
21082 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21084         PR target/56540
21085         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21086         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21088         PR target/56540
21089         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21090         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21092         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21093         instead of -1U in last predictors element's probability member.
21095 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21097         PR ipa/83983
21098         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21099         arguments if they are comparable.
21101 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21103         PR tree-optimization/84634
21104         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21105         masks and masked_loop_p with a single loop_masks, making sure it's
21106         null for bb vectorization.
21108 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21110         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21111         (vect_analyze_data_ref_access): Use loop->safe_len rather than
21112         loop->force_vectorize to check whether there is no alias.
21114 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21116         PR target/84614
21117         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21118         prototypes.
21119         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21120         comments.
21121         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21122         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21123         instead of a loop around prev_real_insn.
21124         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21125         prev_real_insn.
21127         PR inline-asm/84625
21128         * config/i386/i386.c (ix86_print_operand): Use conditional
21129         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21130         zero vector.
21132 2018-03-02  Richard Biener  <rguenther@suse.de>
21134         PR tree-optimization/84427
21135         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21136         (bitmap_set_subtract_values): Rewrite to handle multiple
21137         exprs per value.
21138         (clean): Likewise.
21139         (prune_clobbered_mems): Likewise.
21140         (phi_translate): Take edge instead of pred/phiblock.
21141         (phi_translate_1): Likewise.
21142         (phi_translate_set): Likewise.  Insert all translated
21143         exprs for a value into the set, keeping possibly multiple
21144         expressions per value.
21145         (compute_antic_aux): Adjust for phi_translate changes.
21146         When intersecting union the expressions and prune those
21147         not in the final value set, keeping possibly multiple
21148         expressions per value.  Do not use value-insertion
21149         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21150         all expressions.  Add verification that the value-sets
21151         only shrink during iteration.
21152         (compute_partial_antic_aux): Adjust for the phi_translate changes.
21153         (do_pre_regular_insertion): Likewise.
21154         (do_pre_partial_partial_insertion): Likewise.
21156 2018-03-02  Richard Biener  <rguenther@suse.de>
21158         PR target/82005
21159         * config/darwin.c (saved_debug_info_level): New static global.
21160         (darwin_asm_lto_start): Disable debug info generation for LTO out.
21161         (darwin_asm_lto_end): Restore debug info generation settings.
21163 2018-03-01  Martin Liska  <mliska@suse.cz>
21165         PR sanitizer/82484
21166         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21167         volatile arguments.
21169 2018-03-01  Richard Biener  <rguenther@suse.de>
21171         PR debug/84645
21172         * dwarf2out.c (gen_variable_die): Properly handle late VLA
21173         type annotation with LTO when debug was disabled at compile-time.
21175 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
21177         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21178         XINT with INTVAL.
21179         (mips_final_postscan_insn): Likewise.
21181 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
21183         PR rtl-optimization/84528
21184         * alias.c (init_alias_target): Add commentary.
21185         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21186         a unique base value if the frame pointer is not eliminated
21187         to the stack pointer.
21189 2018-03-01  Tom de Vries  <tom@codesourcery.com>
21191         PR rtl-optimization/83327
21192         * lra-int.h (hard_regs_spilled_into): Declare.
21193         * lra.c (hard_regs_spilled_into): Define.
21194         (init_reg_info): Init hard_regs_spilled_into.
21195         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21196         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21197         (process_bb_lives): Handle hard_regs_spilled_into.
21198         (lra_create_live_ranges_1): Before doing liveness propagation, clear
21199         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21201 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
21203         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21204         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21205         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21206         * config/rs6000/aix72.h: New file.
21208 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
21210         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21211         instead of warning_at with conditional singular and plural messages
21212         where possible.
21214         PR target/52991
21215         * stor-layout.c (update_alignment_for_field): For
21216         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21217         && !DECL_PACKED (field), do the alignment update, just use
21218         only desired_align instead of MAX (type_align, desired_align)
21219         as the alignment.
21220         (place_field): Don't do known_align < desired_align handling
21221         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21222         is non-NULL, instead do it after rli->prev_field handling and
21223         only if not within a bitfield word.  For DECL_PACKED (field)
21224         use type_align of BITS_PER_UNIT.
21226 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
21228         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21229         superfluous parentheses and trailing spaces.
21231 2018-02-28  Richard Biener  <rguenther@suse.de>
21233         PR tree-optimization/84584
21234         * graphite-scop-detection.c (scop_detection::add_scop): Discard
21235         SCoPs with fake exit edge.
21237 2018-02-28  Martin Liska  <mliska@suse.cz>
21239         PR testsuite/84597
21240         * timevar.c (timer::print): Fix format to properly print 100%
21241         values.
21243 2018-02-28  Richard Biener  <rguenther@suse.de>
21245         PR middle-end/84607
21246         * genmatch.c (capture_info::walk_match): Do not mark
21247         captured expressions without operands as expr_p given
21248         they act more like predicates and should be subject to
21249         "lost tail" side-effect preserving.
21251 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
21253         PR rtl-optimization/81611
21254         * auto-inc-dec.c (attempt_change): Move dead note from
21255         mem_insn if it's the next use of regno
21256         (find_address): Take address use of reg holding
21257         non-incremented value.  Add parm to limit search to the named
21258         reg only.
21259         (merge_in_block): Attempt to use a mem insn that is the next
21260         use of the original regno.
21262 2018-02-27  Martin Sebor  <msebor@redhat.com>
21264         PR c++/83871
21265         * doc/invoke.texi (-Wmissing-attributes): New option.
21266         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21268 2018-02-27  Martin Sebor  <msebor@redhat.com>
21270         PR translation/84207
21271         * diagnostic-core.h (warning_n, error_n, inform_n): Change
21272         n argument to unsigned HOST_WIDE_INT.
21273         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21274         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
21275         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21276         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21278 2018-02-27  Richard Biener  <rguenther@suse.de>
21280         PR tree-optimization/84512
21281         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21282         Do not use the estimate returned from record_stmt_cost for
21283         the scalar iteration cost but sum properly using add_stmt_cost.
21285 2018-02-27  Richard Biener  <rguenther@suse.de>
21287         PR tree-optimization/84466
21288         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21289         Adjust last change to less strictly validate use operands.
21291 2018-02-27  Martin Liska  <mliska@suse.cz>
21293         PR gcov-profile/84548
21294         * gcov.c (process_file): Allow partial overlap and consider it
21295         also as group functions.
21296         (output_lines): Properly calculate range of lines for a group.
21298 2018-02-27  Martin Liska  <mliska@suse.cz>
21300         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21301         'ggc' suffixes.  Change first column width.
21302         (timer::print): Fix formatting of the column.
21304 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
21306         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21307         preserve inline entry blocks for the sake of debug inline
21308         entry point markers alone.
21309         (remove_unused_locals): Suggest in comments a better place to
21310         force the preservation of inline entry blocks that are
21311         otherwise unused, but do not preserve them.
21313 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21315         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21317 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21319         PR target/84039
21320         * config/i386/constraints.md (Bs): Replace
21321         ix86_indirect_branch_register with
21322         TARGET_INDIRECT_BRANCH_REGISTER.
21323         (Bw): Likewise.
21324         * config/i386/i386.md (indirect_jump): Likewise.
21325         (tablejump): Likewise.
21326         (*sibcall_memory): Likewise.
21327         (*sibcall_value_memory): Likewise.
21328         Peepholes of indirect call and jump via memory: Likewise.
21329         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21330         (*sibcall_value_GOT_32): Likewise.
21331         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21332         (GOT_memory_operand): Likewise.
21333         (call_insn_operand): Likewise.
21334         (sibcall_insn_operand): Likewise.
21335         (GOT32_symbol_operand): Likewise.
21336         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21338 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21340         PR rtl-optimization/83496
21341         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21342         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
21343         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21344         redundant insn, if any.
21345         (relax_delay_slots): Likewise.
21346         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21348 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
21350         PR tree-optimization/83965
21351         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21352         that grouped statements are part of a reduction chain.  Return
21353         true if the statement is not marked as a reduction itself but
21354         is part of a group.
21355         (vect_recog_dot_prod_pattern): Don't check whether the statement
21356         is part of a group here.
21357         (vect_recog_sad_pattern): Likewise.
21358         (vect_recog_widen_sum_pattern): Likewise.
21360 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21362         PR debug/84545
21363         * final.c (rest_of_clean_state): Also look for calls inside sequences.
21365 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21367         PR target/84530
21368         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21369         the bool argument.
21370         (ix86_output_indirect_function_return): New prototype.
21371         (ix86_split_simple_return_pop_internal): Likewise.
21372         * config/i386/i386.c (indirect_return_via_cx): New.
21373         (indirect_return_via_cx_bnd): Likewise.
21374         (indirect_thunk_name): Handle return va CX_REG.
21375         (output_indirect_thunk_function): Create alias for
21376         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21377         (ix86_output_indirect_jmp): Remove the bool argument.
21378         (ix86_output_indirect_function_return): New function.
21379         (ix86_split_simple_return_pop_internal): Likewise.
21380         * config/i386/i386.md (*indirect_jump): Don't pass false
21381         to ix86_output_indirect_jmp.
21382         (*tablejump_1): Likewise.
21383         (simple_return_pop_internal): Change it to define_insn_and_split.
21384         Call ix86_split_simple_return_pop_internal to split it for
21385         -mfunction-return=.
21386         (simple_return_indirect_internal): Call
21387         ix86_output_indirect_function_return instead of
21388         ix86_output_indirect_jmp.
21390 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
21392         PR bootstrap/84405
21393         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
21394         memset and value initialization afterwards.
21396 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
21398         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
21400 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21402         PR target/84521
21403         * common/config/aarch64/aarch64-common.c
21404         (aarch_option_optimization_table[]): Switch
21405         off fomit-frame-pointer
21407 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21408             Chung-Ju Wu  <jasonwucj@gmail.com>
21410         * config/nds32/nds32-multiple.md (load_multiple): Disallow
21411         volatile memory.
21412         (store_multiple): Ditto.
21414 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21416         * config.gcc: Add --with-cpu support for nds32 target.
21417         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
21418         * config/nds32/nds32.opt: Add -mcpu= option.
21420 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
21422         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
21423         isel=yes): Warn for these deprecated options.
21425 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
21427         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
21428         ISA_2_5_MASKS_EMBEDDED.
21430 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
21432         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
21433         p->max as pointers rather than using iterative_hash_expr.
21435 2018-02-23  Carl Love  <cel@us.ibm.com>
21437         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
21438         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
21439         BU_P8V_OVERLOAD_2.
21440         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
21441         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
21442         P8V_BUILTIN_VEC_VUNSIGNED2.
21444 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
21446         PR target/81572
21447         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
21448         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
21449         LRA_UNKNOWN_ALT.
21450         * lra-constraints.c (curr_insn_transform): Set up
21451         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
21452         LRA_UNKNOWN_ALT.
21453         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
21454         * lra-eliminations.c (spill_pseudos): Ditto.
21455         (process_insn_for_elimination): Ditto.
21456         * lra-lives.c (reg_early_clobber_p): Use the new macros.
21457         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
21458         LRA_NON_CLOBBERED_ALT.
21460 2018-02-22  Martin Sebor  <msebor@redhat.com>
21462         PR tree-optimization/84480
21463         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
21464         to maybe_diag_stxncpy_trunc.  Call it.
21465         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
21466         from gimple_fold_builtin_strcpy.  Print inlining stack.
21467         (handle_builtin_stxncpy): Print inlining stack.
21468         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
21470 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
21472         PR target/84176
21473         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
21474         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
21475         and -fcheck-pointer-bounds are used together.
21476         (indirect_thunk_prefix): New enum.
21477         (indirect_thunk_need_prefix): New function.
21478         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
21479         "_nt" instead of "_bnd" for NOTRACK prefix.
21480         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
21481         (output_indirect_thunk_function): Likewise.
21482         (): Likewise.
21483         (ix86_code_end): Update output_indirect_thunk_function calls.
21484         (ix86_output_indirect_branch_via_reg): Replace
21485         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
21486         (ix86_output_indirect_branch_via_push): Likewise.
21487         (ix86_output_function_return): Likewise.
21488         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
21489         incompatible with -fcf-protection=branch and
21490         -fcheck-pointer-bounds.
21492 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
21494         PR target/83335
21495         * config/aarch64/aarch64.c (aarch64_print_address_internal):
21496         Change gcc_assert call to output_operand_lossage.
21498 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
21500         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
21502 2018-02-22  DJ Delorie  <dj@redhat.com>
21503             Sebastian Perta  <sebastian.perta@renesas.com>
21504             Oleg Endo  <olegendo@gcc.gnu.org>
21506         * config/rx/rx.c (rx_rtx_costs): New function.
21507         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
21509 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21511         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
21513 2018-02-22  Martin Liska  <mliska@suse.cz>
21515         PR driver/83193
21516         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
21517         Add "native" as a possible value.
21519 2018-02-22  Martin Liska  <mliska@suse.cz>
21521         PR driver/83193
21522         * config/i386/i386.c (ix86_option_override_internal):
21523         Add "native" as a possible value for -march and -mtune.
21525 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
21527         PR target/84502
21528         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
21529         to all type variants.
21531         PR tree-optimization/84503
21532         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
21533         width as info->bitpos + info->bitsize - start.
21534         (merged_store_group::merge_overlapping): Simplify width computation.
21535         (check_no_overlap): New function.
21536         (imm_store_chain_info::try_coalesce_bswap): Compute expected
21537         start + width and last_order of the group, fail if check_no_overlap
21538         fails.
21539         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
21540         to group if check_no_overlap fails.
21542 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
21544         * config/rs6000/altivec.md: Delete contraint arguments to
21545         define_expand, define_split, and define_peephole2, and in
21546         define_insn_and_split if always unused.
21547         * config/rs6000/darwin.md: Ditto.
21548         * config/rs6000/dfp.md: Ditto.
21549         * config/rs6000/rs6000.md: Ditto.
21550         * config/rs6000/sync.md: Ditto.
21551         * config/rs6000/vector.md: Ditto.
21552         * config/rs6000/vsx.md: Ditto.
21554 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
21556         * config/rs6000/altivec.md: Write output control strings as braced
21557         blocks instead of double-quoted strings.
21558         * config/rs6000/darwin.md: Ditto.
21559         * config/rs6000/rs6000.md: Ditto.
21560         * config/rs6000/vector.md: Ditto.
21561         * config/rs6000/vsx.md: Ditto.
21563 2018-02-21  Jason Merrill  <jason@redhat.com>
21565         PR c++/84314 - ICE with templates and fastcall attribute.
21566         * attribs.c (build_type_attribute_qual_variant): Remove assert.
21568 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
21570         * ipa-cp.c (determine_versionability): Fix comment typos.
21572 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
21574         PR c/84229
21575         * ipa-cp.c (determine_versionability): Do not version functions caling
21576         va_arg_pack.
21578 2018-02-21  Martin Liska  <mliska@suse.cz>
21580         PR driver/83193
21581         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
21582         Add "native" as a possible value.
21583         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
21584         the macro when native cpu detection is available.
21586 2018-02-21  Martin Liska  <mliska@suse.cz>
21588         PR driver/83193
21589         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
21590         Add "native" as a possible value.
21591         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
21592         when native cpu detection is available.
21594 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
21595             Martin Sebor  <msebor@redhat.com>
21597         PR tree-optimization/84478
21598         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
21599         false.
21600         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
21601         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
21602         support which is conservatively correct, for 2 only stay conservative
21603         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
21604         argument to the 2 argument get_range_strlen, adjust 6 arg
21605         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
21606         false.
21607         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
21608         (gimple_fold_builtin_strlen): Pass true as last argument to
21609         get_range_strlen.
21611 2018-02-20  Martin Sebor  <msebor@redhat.com>
21613         PR middle-end/84095
21614         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
21615         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
21616         (builtin_memref::builtin_memref): Factor out parts into
21617         set_base_and_offset and call it.
21619 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21621         PR middle-end/84406
21622         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
21623         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
21624         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
21625         search at the associated MODE_INT.
21627 2018-02-20  Jeff Law  <law@redhat.com>
21629         PR middle-end/82123
21630         PR tree-optimization/81592
21631         PR middle-end/79257
21632         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
21633         for range data rather than using global data.
21634         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
21635         range data rather than using global data.
21636         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
21637         pass it to children as needed.
21638         (struct directive::fmtresult): Similarly.
21639         (struct directive::set_width): Similarly.
21640         (struct directive::set_precision): Similarly.
21641         (format_integer, format_directive, parse_directive): Similarly.
21642         (format_none): Accept unnamed vr_values parameter.
21643         (format_percent, format_floating, format_character): Similarly.
21644         (format_string, format_plain): Similarly.
21645         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
21646         the EVRP range analyzer for range data rather than using global data.
21647         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
21648         gimple-ssa-evrp-analyze.h
21649         (class sprintf_dom_walker): Add after_dom_children member function.
21650         Add evrp_range_analyzer member.
21651         (sprintf_dom_walker::before_dom_children): Call into the EVRP
21652         range analyzer as needed.
21653         (sprintf_dom_walker::after_dom_children): New member function.
21654         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
21655         if not optimizing.
21656         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
21657         (evrp_range_analyzer::pop_to_marker): Likewise.
21659 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21661         PR tree-optimization/84419
21662         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
21663         with the required type if its current type is compatible but
21664         different.
21666 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
21668         PR middle-end/82004
21669         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
21670         after vectorization.
21672 2018-02-20  Martin Liska  <mliska@suse.cz>
21674         PR driver/83193
21675         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
21676         possible values if we don't have a hint.
21678 2018-02-20  Martin Liska  <mliska@suse.cz>
21680         PR c/84310
21681         PR target/79747
21682         * final.c (shorten_branches): Build align_tab array with one
21683         more element.
21684         * opts.c (finish_options): Add alignment option limit check.
21685         (MAX_CODE_ALIGN): Likewise.
21686         (MAX_CODE_ALIGN_VALUE): Likewise.
21687         * doc/invoke.texi: Document maximum allowed option value for
21688         all -falign-* options.
21690 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
21692         PR target/84146
21693         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
21694         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
21695         * var-tracking.c (emit_note_insn_var_location): Remove all references
21696         to NOTE_INSN_CALL_ARG_LOCATION.
21697         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
21698         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
21699         Use copy_rtx_if_shared.
21700         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
21701         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
21702         (dwarf2out_var_location): Remove handling of
21703         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
21704         on call_insn.
21705         * final.c (final_scan_insn): Remove all references to
21706         NOTE_INSN_CALL_ARG_LOCATION.
21707         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
21708         before dumping final insns.
21709         * except.c (emit_note_eh_region_end): Remove all references to
21710         NOTE_INSN_CALL_ARG_LOCATION.
21711         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
21712         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
21713         * config/arc/arc.c (hwloop_optimize): Likewise.
21714         * config/arm/arm.c (create_fix_barrier): Likewise.
21715         * config/s390/s390.c (s390_chunkify_start): Likewise.
21716         * config/sh/sh.c (find_barrier): Likewise.
21717         * config/i386/i386.c (rest_of_insert_endbranch,
21718         ix86_seh_fixup_eh_fallthru): Likewise.
21719         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
21720         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
21721         * config/frv/frv.c (frv_function_prologue): Likewise.
21722         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
21723         reg note.
21724         (note_outside_basic_block_p): Remove all references to
21725         NOTE_INSN_CALL_ARG_LOCATION.
21726         * gengtype.c (adjust_field_rtx_def): Likewise.
21727         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
21728         Likewise.
21729         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
21730         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
21732         PR c++/84444
21733         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
21734         is ADDR_EXPR.
21736         PR tree-optimization/84452
21737         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
21738         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
21739         is NULL.
21741 2018-02-19  Martin Liska  <mliska@suse.cz>
21743         PR sanitizer/82183
21744         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
21746 2018-02-19  Martin Liska  <mliska@suse.cz>
21747             Richard Sandiford  <richard.sandiford@linaro.org>
21749         PR tree-optimization/82491
21750         * gimple-fold.c (get_base_constructor): Make earlier bail out
21751         to prevent ubsan.
21753 2018-02-19  Carl Love  <cel@us.ibm.com>
21755         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
21756         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
21757         BU_P8V_OVERLOAD_1.
21758         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
21759         P8V_BUILTIN_VEC_NEG.
21761 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
21763         * config/rl78/rl78.md (movdf): New define expand.
21765 2018-02-19  Martin Liska  <mliska@suse.cz>
21767         PR other/80589
21768         * doc/invoke.texi: Fix typo.
21769         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
21771 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
21773         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
21774         handle rs6000_single_float and rs6000_double_float specially for
21775         e500 family CPUs.
21777 2018-02-16  Jeff Law  <law@redhat.com>
21779         * config/rx/rx.c (add_pop_cfi_notes): New function.;
21780         (pop_regs): Use it.
21782 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21784         PR ipa/84425
21785         * ipa-inline.c (inline_small_functions): Fix a typo.
21787 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21789         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
21791 2018-02-16  Carl Love  <cel@us.ibm.com>
21793         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
21794         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
21795         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
21796         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
21797         expansion to P8V_BUILTIN_VEC_FLOAT2.
21799 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
21801         PR rtl-optimization/70023
21802         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
21803         src_regno into account.
21805 2018-02-16  Carl Love  <cel@us.ibm.com>
21807         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
21808         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
21809         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
21810         * config/rs6000/rs6000.c: Remove case statements for
21811         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
21812         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
21813         and P9V_BUILTIN_VEC_VINSERT4B.
21814         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
21815         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
21816         * config/rs6000/vsx.md:
21817         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
21818         vec_insert4b.
21820 2018-02-16  Carl Love  <cel@us.ibm.com>
21822         * config/rs6000/altivec.h: Add builtin names vec_extract4b
21823         vec_insert4b.
21824         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
21825         definitions.
21826         * config/rs6000/rs6000-c.c: Add the definitions for
21827         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21828         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21829         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21830         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
21831         definition for insert4b and define insn *insert3b_internal.
21832         * doc/extend.texi: Add documentation for vec_extract4b.
21834 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21836         * doc/extend.texi (Backwards Compatibility): Mention friend
21837         injection.  Note for-scope is deprecated.
21838         * doc/invoke.texi (-ffriend-injection): Deprecate.
21840 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
21842         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21843         that moved to I2, also allow destinations that are a paradoxical
21844         subreg (instead of a normal reg).
21846 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
21848         PR target/83831
21849         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21850         to QImode.
21852 2018-02-16  Richard Biener  <rguenther@suse.de>
21854         PR tree-optimization/84037
21855         PR tree-optimization/84016
21856         PR target/82862
21857         * config/i386/i386.c (ix86_builtin_vectorization_cost):
21858         Adjust vec_construct for the fact we need additional higher latency
21859         128bit inserts for AVX256 and AVX512 vector builds.
21860         (ix86_add_stmt_cost): Scale vector construction cost for
21861         elementwise loads.
21863 2018-02-16  Richard Biener  <rguenther@suse.de>
21865         PR tree-optimization/84417
21866         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21867         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21868         (non_rewritable_lvalue_p): Likewise, use poly-ints.
21870 2018-02-16  Martin Liska  <mliska@suse.cz>
21872         PR sanitizer/84307
21873         * internal-fn.def (ASAN_CHECK): Set proper flags.
21874         (ASAN_MARK): Likewise.
21876 2018-02-16  Julia Koval  <julia.koval@intel.com>
21878         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21879         from PTA_CANNONLAKE.
21881 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21883         PR target/84272
21884         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21885         Use ++iter rather than iter++ for std::list iterators.
21886         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
21887         defer deleting them until all nodes in the forest are processed.  Do
21888         free even leaf nodes.  Change to_process into auto_vec.
21890         PR bootstrap/84405
21891         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21892         * vec.h (vec_default_construct): Use memset instead of placement new
21893         if BROKEN_VALUE_INITIALIZATION is defined.
21894         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21895         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21896         is defined.
21898         PR rtl-optimization/83723
21899         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21900         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
21901         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
21902         recursive calls.
21903         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21904         callers.
21905         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21907 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
21909         PR rtl-optimization/81443
21910         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21911         from inner REGs to paradoxical SUBREGs.
21913 2018-02-16  Richard Biener  <rguenther@suse.de>
21915         PR tree-optimization/84399
21916         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21917         For operands we can analyze at their definition make sure we can
21918         analyze them at each use as well.
21920 2018-02-16  Richard Biener  <rguenther@suse.de>
21922         PR tree-optimization/84190
21923         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21924         volatile accesses if the decl isn't volatile.
21926 2018-02-15  Jason Merrill  <jason@redhat.com>
21928         PR c++/84314 - ICE with templates and fastcall attribute.
21929         * attribs.c (build_type_attribute_qual_variant): Don't clobber
21930         TYPE_CANONICAL on an existing type.
21932 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
21934         PR tree-optimization/84383
21935         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21936         dstoff nor call operand_equal_p if dstbase is NULL.
21938         PR tree-optimization/84334
21939         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21940         also a CONSTANT_CLASS_P, punt.
21942 2018-02-14  Jim Wilson  <jimw@sifive.com>
21944         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21945         first SMALL_OPERAND check.  New local min_second_step.  Move assert
21946         to where locals are set.  Add TARGET_RVC support.
21947         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21949 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
21951         * doc/invoke.texi: Correct -Wformat-overflow code sample.
21953 2018-02-14  Martin Sebor  <msebor@redhat.com>
21955         PR tree-optimization/83698
21956         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21957         arrays constrain the offset range to their bounds.
21958         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21959         (builtin_access::overlap): Avoid setting the size of overlap if it's
21960         already been set.
21961         (maybe_diag_overlap): Also consider arrays when deciding what values
21962         of offsets to include in diagnostics.
21964 2018-02-14  Martin Sebor  <msebor@redhat.com>
21966         PR c/84108
21967         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21968         that correspond to the kind of a declaration.
21970 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
21972         PR target/83984
21973         * config/pa/pa.md: Load address of PIC label using the linkage table
21974         if the label is nonlocal.
21976 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21978         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21979         warning message if user requests -maltivec=be.
21980         * doc/invoke.texi: Document deprecation of -maltivec=be.
21982 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
21984         PR target/84220
21985         * config/rs6000/rs6000-c.c: Update definitions for
21986         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21987         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21989 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21991         PR target/84239
21992         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21993         add _get_ssp intrinsics. Remove argument from
21994         __builtin_ia32_rdssp[d|q].
21995         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21996         * config/i386/i386-builtin.def: Remove argument from
21997         __builtin_ia32_rdssp[d|q].
21998         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21999         ix86_expand_special_args_builtin for _rdssp[d|q].
22000         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22001         Clear register before usage.
22002         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22003         Add documentation for new _get_ssp and _inc_ssp intrinsics.
22005 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
22007         PR tree-optimization/84357
22008         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22009         operand 1 of an ARRAY_REF too.
22011 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
22013         PR target/83831
22014         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22015         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22016         declarations.
22017         (set_of_reg): New struct.
22018         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22019         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22020         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22021         functions.
22022         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22023         Split into bitclr, bitset, bitinvert patterns if appropriate.
22024         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22025         use rx_fuse_in_memory_bitop.
22026         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22027         to named insn, correct maximum insn length.
22029 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
22031         PR target/79242
22032         * machmode.def: Define a complex mode for PARTIAL_INT.
22033         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22034         MODE_PARTIAL_INT.
22035         * doc/rtl.texi: Document CSPImode.
22036         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22037         handling.
22038         (msp430_hard_regno_nregs_with_padding): Likewise.
22040 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
22042         PR target/84279
22043         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22045 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
22047         PR rtl-optimization/84169
22048         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
22049         we generated a parallel as new i3 and we split that to new i2 and i3
22050         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
22051         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
22052         those to i2, not i1.  Partially rewrite this scan code.
22054 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22056         PR c/82210
22057         * stor-layout.c (place_field): For variable length fields, adjust
22058         offset_align afterwards not just based on the field's alignment,
22059         but also on the size.
22061         PR middle-end/84309
22062         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22063         of exps and logs in the use_exp2 case.
22065 2018-02-13  Jeff Law  <law@redhat.com>
22067         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22068         entry for "vector".
22070         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22071         ARGS as unused.
22073 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
22075         PR debug/84342
22076         PR debug/84319
22077         * common.opt (gas-loc-support, gas-locview-support): New.
22078         (ginline-points, ginternal-reset-location-views): New.
22079         * doc/invoke.texi: Document them.  Use @itemx where intended.
22080         (gvariable-location-views): Adjust.
22081         * target.def (reset_location_view): New.
22082         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22083         (TARGET_RESET_LOCATION_VIEW): New.
22084         * doc/tm.texi: Rebuilt.
22085         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22086         (dwarf2out_default_as_locview_support): New.
22087         (output_asm_line_debug_info): Use option variables.
22088         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22089         (output_loc_list): Likewise.
22090         (add_high_low_attributes): Check option variables.
22091         Don't output entry view attribute in strict mode.
22092         (gen_inlined_subroutine_die): Check option variables.
22093         (dwarf2out_inline_entry): Likewise.
22094         (init_sections_and_labels): Likewise.
22095         (dwarf2out_early_finish): Likewise.
22096         (maybe_reset_location_view): New, from...
22097         (dwarf2out_var_location): ... here.  Call it.
22098         * debug.h (dwarf2out_default_as_loc_support): Declare.
22099         (dwarf2out_default_as_locview_support): Declare.
22100         * hooks.c (hook_int_rtx_insn_0): New.
22101         * hooks.h (hook_int_rtx_insn_0): Declare.
22102         * toplev.c (process_options): Take -gas-loc-support and
22103         -gas-locview-support from dwarf2out.  Enable
22104         -gvariable-location-views by default only with locview
22105         assembler support.  Enable -ginternal-reset-location-views by
22106         default only if the target defines the corresponding hook.
22107         Enable -ginline-points by default if location views are
22108         enabled; force it disabled if statement frontiers are
22109         disabled.
22110         * tree-inline.c (expand_call_inline): Check option variables.
22111         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22113 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
22115         PR tree-optimization/84321
22116         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22117         handling.  Also check whether the anti-range contains any values
22118         that satisfy the mask; switch to a VR_RANGE if not.
22120 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
22122         PR sanitizer/84340
22123         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22125 2018-02-13  Martin Jambor  <mjambor@suse.cz>
22127         PR c++/83990
22128         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22129         of call statements, also set location of a load to a temporary.
22131 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
22133         * config/rl78/rl78.c (add_vector_labels): New function.
22134         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22135         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22136         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22137         which checks that no arguments are passed.
22138         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22139         * doc/extend.texi: Documentation for the new attribute.
22141 2018-02-13  Andreas Schwab  <schwab@suse.de>
22143         * config/riscv/linux.h (CPP_SPEC): Define.
22145 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22147         PR target/84335
22148         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22149         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22150         OPTION_MASK_ISA_AES as first argument to def_builtin_const
22151         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22152         instead of OPTION_MASK_ISA_PCLMUL as first argument to
22153         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22154         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22155         temporarily for AES and PCLMUL builtins.
22157         PR tree-optimization/84339
22158         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22159         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22160         Formatting fixes.
22162         PR middle-end/84309
22163         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22164         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22165         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22166         inline function.
22167         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22168         inline function.
22169         * omp-simd-clone.h: New file.
22170         * omp-simd-clone.c: Include omp-simd-clone.h.
22171         (expand_simd_clones): No longer static.
22172         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22173         cgraph.h and omp-simd-clone.h.
22174         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22175         (vect_recog_widen_shift_pattern): Formatting fix.
22176         (vect_pattern_recog_1): Don't check optab for calls.
22178         PR target/84336
22179         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22180         operands[2] into a REG before using gen_lowpart on it.
22182 2018-02-12  Jeff Law  <law@redhat.com>
22184         PR target/83760
22185         * config/sh/sh.c (find_barrier): Consider a sibling call
22186         a barrier as well.
22188         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22189         successfully back substituting a reg.
22191 2018-02-12  Richard Biener  <rguenther@suse.de>
22193         PR tree-optimization/84037
22194         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22195         parameter, move visited init to caller.
22196         (vect_slp_analyze_operations): Separate cost from validity
22197         check, initialize visited once for all instances.
22198         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22199         for all instances.
22200         * tree-vect-stmts.c (vect_model_simple_cost): Make early
22201         out an assert.
22202         (vect_model_promotion_demotion_cost): Likewise.
22203         (vectorizable_bswap): Guard cost modeling with !slp_node
22204         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22205         SLP stmts.
22206         (vectorizable_call): Likewise.
22207         (vectorizable_conversion): Likewise.
22208         (vectorizable_assignment): Likewise.
22209         (vectorizable_shift): Likewise.
22210         (vectorizable_operation): Likewise.
22211         (vectorizable_store): Likewise.
22212         (vectorizable_load): Likewise.
22213         (vectorizable_condition): Likewise.
22214         (vectorizable_comparison): Likewise.
22216 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
22218         PR sanitizer/84307
22219         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22220         (ASAN_MARK): Fix fnspec to account for return value, change pointer
22221         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22223 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22225         PR middle-end/83665
22226         * params.def (inline-min-speedup): Increase from 8 to 15.
22227         (max-inline-insns-auto): Decrease from 40 to 30.
22228         * ipa-split.c (consider_split): Add some buffer for function to
22229         be considered inlining candidate.
22230         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22231         default values.
22233 2018-02-12  Richard Biener  <rguenther@suse.de>
22235         PR tree-optimization/84037
22236         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22237         matched stmts if we cannot swap the non-matched ones.
22239 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22241         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22242         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22243         _mm_maskz_scalef_round_ss): New intrinsics.
22244         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22245         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22246         __builtin_ia32_scalefss_round): Remove.
22247         (__builtin_ia32_scalefsd_mask_round,
22248         __builtin_ia32_scalefss_mask_round): New intrinsics.
22249         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22250         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22251         ((match_operand:VF_128 2 "<round_nimm_predicate>"
22252         "<round_constraint>")): Changed to ...
22253         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22254         "<round_scalar_constraint>")): ... this.
22255         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22256         %0, %1, %2<round_op3>}"): Changed to ...
22257         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22258         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22259         %2<round_scalar_mask_op3>}"): ... this.
22260         * config/i386/subst.md (round_scalar_nimm_predicate): New.
22262 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22264         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22265         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22266         (_mm_maskz_sqrt_round_ss): New intrinsics.
22267         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22268         (__builtin_ia32_sqrtsd_mask_round)
22269         (__builtin_ia32_sqrtss_mask_round): New builtins.
22270         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22271         (__builtin_ia32_sqrtss_round): Remove.
22272         (__builtin_ia32_sqrtsd_mask_round)
22273         (__builtin_ia32_sqrtss_mask_round): New builtins.
22274         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22275         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22276         ((match_operand:VF_128 1 "vector_operand"
22277         "xBm,<round_constraint>")): Changed to ...
22278         ((match_operand:VF_128 1 "vector_operand"
22279         "xBm,<round_scalar_constraint>")): ... this.
22280         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22281         %0, %2, %<iptr>1<round_op3>}): Changed to ...
22282         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22283         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22284         %<iptr>1<round_scalar_mask_op3>}): ... this.
22285         ((set_attr "prefix" "<round_prefix>")): Changed to ...
22286         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22288 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
22290         PR target/84266
22291         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22292         Cast vec_cmpeq result to correct type.
22293         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22294         Cast vec_cmpgt result to correct type.
22296 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
22298         * final.c (final_scan_insn_1): Renamed from...
22299         (final_scan_insn): ... this.  New wrapper, to recover
22300         seen from the outermost call in recursive ones.
22301         * config/sparc/sparc.c (output_return): Drop seen from call.
22302         (output_sibcall): Likewise.
22303         * config/visium/visium.c (output_branch): Likewise.
22305 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
22307         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22308         function label.
22310 2018-02-10  Alan Modra  <amodra@gmail.com>
22312         PR target/84300
22313         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22314         Specify LR as an input.
22316 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
22318         PR sanitizer/83987
22319         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22320         remove_member_access_dummy_vars): New functions.
22321         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22322         lower_omp_1, execute_lower_omp): Use them.
22324         PR rtl-optimization/84308
22325         * shrink-wrap.c (spread_components): Release todo vector.
22327 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
22329         PR rtl-optimization/57193
22330         * ira-color.c (struct allocno_color_data): Add member
22331         conflict_allocno_hard_prefs.
22332         (update_conflict_allocno_hard_prefs): New.
22333         (bucket_allocno_compare_func): Add a preference based on
22334         conflict_allocno_hard_prefs.
22335         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22336         (color_allocnos): Remove a dead code.  Initiate
22337         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
22339 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22341         PR target/84226
22342         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22343         constraint from =wa to wa.  Avoid a subreg on the output operand,
22344         instead use a pseudo and subreg it in a move.
22345         (p9_xxbrd_<mode>): Changed to ...
22346         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22347         (p9_xxbrd_v2df): New expander.
22348         (p9_xxbrw_<mode>): Changed to ...
22349         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22350         (p9_xxbrw_v4sf): New expander.
22352 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22354         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22356 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
22358         PR target/83926
22359         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22360         multiply in 32-bit mode.
22361         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22362         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22363         mode.
22365 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22367         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22368         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22369         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22370         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22372 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
22374         PR lto/84213
22375         * dwarf2out.c (is_trivial_indirect_ref): New function.
22376         (dwarf2out_late_global_decl): Do not generate a location
22377         attribute for variables that have a non-trivial DECL_VALUE_EXPR
22378         and that are not defined in the current unit.
22380 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22382         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22383         instead of a libcall for UNORDERED.
22385 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
22387         PR target/82641
22388         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
22389         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
22391 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22393         PR target/PR84295
22394         * config/s390/s390.c (s390_set_current_function): Invoke
22395         s390_indirect_branch_settings also if fndecl didn't change.
22397 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22399         * config/rs6000/rs6000.md (blockage): Set length to zero.
22401 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22403         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
22405 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22407         PR sanitizer/84285
22408         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
22409         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
22410         -static-lib*san.
22412         PR debug/84252
22413         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
22414         PARALLEL incoming that failed vt_get_decl_and_offset check.
22416         PR middle-end/84237
22417         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
22418         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
22419         TREE_READONLY bit.
22420         (get_variable_section): For decls in named .bss* sections pass true as
22421         second argument to bss_initializer_p.
22423 2018-02-09  Marek Polacek  <polacek@redhat.com>
22424             Jakub Jelinek  <jakub@redhat.com>
22426         PR c++/83659
22427         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
22428         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
22429         Sync some changes from cxx_fold_indirect_ref.
22431 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22433         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
22434         markers.
22435         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
22436         (BLOCK_INLINE_ENTRY_LABEL): New.
22437         (dwarf2out_var_location): Disregard inline entry markers.
22438         (inline_entry_data): New struct.
22439         (inline_entry_data_hasher): New hashtable type.
22440         (inline_entry_data_hasher::hash): New.
22441         (inline_entry_data_hasher::equal): New.
22442         (inline_entry_data_table): New variable.
22443         (add_high_low_attributes): Add DW_AT_entry_pc and
22444         DW_AT_GNU_entry_view attributes if a pending entry is found
22445         in inline_entry_data_table.  Add old entry_pc attribute only
22446         if debug nonbinding markers are disabled.
22447         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
22448         markers are enabled.
22449         (block_within_block_p, dwarf2out_inline_entry): New.
22450         (dwarf2out_finish): Check that no entries remained in
22451         inline_entry_data_table.
22452         * final.c (reemit_insn_block_notes): Handle inline entry notes.
22453         (final_scan_insn, notice_source_line): Likewise.
22454         (rest_of_clean_state): Skip inline entry markers.
22455         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
22456         markers.
22457         * gimple.c (gimple_build_debug_inline_entry): New.
22458         * gimple.h (enum gimple_debug_subcode): Add
22459         GIMPLE_DEBUG_INLINE_ENTRY.
22460         (gimple_build_debug_inline_entry): Declare.
22461         (gimple_debug_inline_entry_p): New.
22462         (gimple_debug_nonbind_marker_p): Adjust.
22463         * insn-notes.def (INLINE_ENTRY): New.
22464         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
22465         inline entry marker notes.
22466         (print_insn): Likewise.
22467         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
22468         (INSN_DEBUG_MARKER_KIND): Likewise.
22469         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
22470         * tree-inline.c (expand_call_inline): Build and insert
22471         debug_inline_entry stmt.
22472         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
22473         inline entry blocks early, if nonbind markers are enabled.
22474         (dump_scope_block): Dump fragment info.
22475         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
22476         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
22477         (gimple_build_debug_inline_entry): New.
22478         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
22479         Enable/disable inline entry points too.
22480         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
22481         (DEBUG_INSN): Describe inline entry markers.
22483         * common.opt (gvariable-location-views): New.
22484         (gvariable-location-views=incompat5): New.
22485         * config.in: Rebuilt.
22486         * configure: Rebuilt.
22487         * configure.ac: Test assembler for view support.
22488         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
22489         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
22490         * dwarf2out.c (var_loc_view): New typedef.
22491         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
22492         (dwarf2out_locviews_in_attribute): New.
22493         (dwarf2out_locviews_in_loclist): New.
22494         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
22495         (enum dw_line_info_opcode): Add LI_adv_address.
22496         (struct dw_line_info_table): Add view.
22497         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
22498         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
22499         (zero_view_p): New variable.
22500         (ZERO_VIEW_P): New macro.
22501         (output_asm_line_debug_info): New.
22502         (struct var_loc_node): Add view.
22503         (add_AT_view_list, AT_loc_list): New.
22504         (add_var_loc_to_decl): Add view param.  Test it against last.
22505         (new_loc_list): Add view params.  Record them.
22506         (AT_loc_list_ptr): Handle loc and view lists.
22507         (view_list_to_loc_list_val_node): New.
22508         (print_dw_val): Handle dw_val_class_view_list.
22509         (size_of_die): Likewise.
22510         (value_format): Likewise.
22511         (loc_list_has_views): New.
22512         (gen_llsym): Set vl_symbol too.
22513         (maybe_gen_llsym, skip_loc_list_entry): New.
22514         (dwarf2out_maybe_output_loclist_view_pair): New.
22515         (output_loc_list): Output view list or entries too.
22516         (output_view_list_offset): New.
22517         (output_die): Handle dw_val_class_view_list.
22518         (output_dwarf_version): New.
22519         (output_compilation_unit_header): Use it.
22520         (output_skeleton_debug_sections): Likewise.
22521         (output_rnglists, output_line_info): Likewise.
22522         (output_pubnames, output_aranges): Update version comments.
22523         (output_one_line_info_table): Output view numbers in asm comments.
22524         (dw_loc_list): Determine current endview, pass it to new_loc_list.
22525         Call maybe_gen_llsym.
22526         (loc_list_from_tree_1): Adjust.
22527         (add_AT_location_description): Create view list attribute if
22528         needed, check it's absent otherwise.
22529         (convert_cfa_to_fb_loc_list): Adjust.
22530         (maybe_emit_file): Call output_asm_line_debug_info for test.
22531         (dwarf2out_var_location): Reset views as needed.  Precompute
22532         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
22533         attribute.  Set view.
22534         (new_line_info_table): Reset next view.
22535         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
22536         (dwarf2out_source_line): Likewise.  Output view resets and labels to
22537         the assembler, or select appropriate line info opcodes.
22538         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
22539         (optimize_string_length): Catch it.  Adjust.
22540         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
22541         dw_val_class_view_list, and remove it if no longer needed.
22542         (hash_loc_list): Hash view numbers.
22543         (loc_list_hasher::equal): Compare them.
22544         (optimize_location_lists): Check whether a view list symbol is
22545         needed, and whether the locview attribute is present, and
22546         whether they match.  Remove the locview attribute if no longer
22547         needed.
22548         (index_location_lists): Call skip_loc_list_entry for test.
22549         (dwarf2out_finish): Call output_asm_line_debug_info for test.
22550         Use output_dwarf_version.
22551         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
22552         (struct dw_val_node): Add val_view_list.
22553         * final.c (SEEN_NEXT_VIEW): New.
22554         (set_next_view_needed): New.
22555         (clear_next_view_needed): New.
22556         (maybe_output_next_view): New.
22557         (final_start_function): Rename to...
22558         (final_start_function_1): ... this.  Take pointer to FIRST,
22559         add SEEN parameter.  Emit param bindings in the initial view.
22560         (final_start_function): Reintroduce SEEN-less interface.
22561         (final): Rename to...
22562         (final_1): ... this.  Take SEEN parameter.  Output final pending
22563         next view at the end.
22564         (final): Reintroduce seen-less interface.
22565         (final_scan_insn): Output pending next view before switching
22566         sections or ending a block.  Mark the next view as needed when
22567         outputting variable locations.  Notify debug backend of section
22568         changes, and of location view changes.
22569         (rest_of_handle_final): Adjust.
22570         * toplev.c (process_options): Autodetect value for debug variable
22571         location views option.  Warn on incompat5 without -gdwarf-5.
22572         * doc/invoke.texi (gvariable-location-views): New.
22573         (gvariable-location-views=incompat5): New.
22574         (gno-variable-location-views): New.
22576 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
22578         PR tree-optimization/84136
22579         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
22580         that the result of find_edge is non-NULL.
22582 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
22584         PR target/83008
22585         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
22586         storing integer register in SImode.  Fix cost of 256 and 512
22587         byte aligned SSE register store.
22589 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
22591         * config/i386/i386.c (ix86_multiplication_cost): Fix
22592         multiplication cost for TARGET_AVX512DQ.
22594 2018-02-08  Marek Polacek  <polacek@redhat.com>
22596         PR tree-optimization/84238
22597         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
22598         get_range_strlen.
22600 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22602         PR tree-optimization/84265
22603         * tree-vect-stmts.c (vectorizable_store): Don't treat
22604         VMAT_CONTIGUOUS accesses as grouped.
22605         (vectorizable_load): Likewise.
22607 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22609         PR tree-optimization/81635
22610         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
22611         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
22612         (test_round_for_mask): New functions.
22613         (wide_int_cc_tests): Call test_round_for_mask.
22614         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
22615         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
22616         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
22617         range returned by get_range_info.
22619 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22621         PR ipa/81360
22622         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
22623         * symtab.c: Include builtins.h
22624         (symtab_node::output_to_lto_symbol_table_p): Move here
22625         from lto-streamer-out.c:output_symbol_p.
22626         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
22627         (output_symbol_p): Move all logic to symtab.c
22628         (produce_symtab): Update.
22630 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22632         * config/s390/s390-opts.h (enum indirect_branch): Define.
22633         * config/s390/s390-protos.h (s390_return_addr_from_memory)
22634         (s390_indirect_branch_via_thunk)
22635         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
22636         (enum s390_indirect_branch_type): Define.
22637         * config/s390/s390.c (struct s390_frame_layout, struct
22638         machine_function): Remove.
22639         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
22640         (indirect_branch_table_label_no, indirect_branch_table_name):
22641         Define variables.
22642         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
22643         (enum s390_indirect_branch_option): Define.
22644         (s390_return_addr_from_memory): New function.
22645         (s390_handle_string_attribute): New function.
22646         (s390_attribute_table): Add new attribute handler.
22647         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
22648         (s390_indirect_branch_via_thunk): New function.
22649         (s390_indirect_branch_via_inline_thunk): New function.
22650         (s390_function_ok_for_sibcall): When jumping via thunk disallow
22651         sibling call optimization for non z10 compiles.
22652         (s390_emit_call): Force indirect branch target to be a single
22653         register.  Add r1 clobber for non-z10 compiles.
22654         (s390_emit_epilogue): Emit return jump via return_use expander.
22655         (s390_reorg): Handle JUMP_INSNs as execute targets.
22656         (s390_option_override_internal): Perform validity checks for the
22657         new command line options.
22658         (s390_indirect_branch_attrvalue): New function.
22659         (s390_indirect_branch_settings): New function.
22660         (s390_set_current_function): Invoke s390_indirect_branch_settings.
22661         (s390_output_indirect_thunk_function):  New function.
22662         (s390_code_end): Implement target hook.
22663         (s390_case_values_threshold): Implement target hook.
22664         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
22665         macros.
22666         * config/s390/s390.h (struct s390_frame_layout)
22667         (struct machine_function): Move here from s390.c.
22668         (TARGET_INDIRECT_BRANCH_NOBP_RET)
22669         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
22670         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
22671         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
22672         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
22673         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
22674         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
22675         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
22676         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
22677         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
22678         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
22679         (mnemonic attribute): Add values which aren't recognized
22680         automatically.
22681         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
22682         pattern for branch conversion.  Fix mnemonic attribute.
22683         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
22684         indirect branch via thunk if requested.
22685         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
22686         ("*indirect_jump"): Disable for branch conversion using out of
22687         line thunks.
22688         ("indirect_jump_via_thunk<mode>_z10")
22689         ("indirect_jump_via_thunk<mode>")
22690         ("indirect_jump_via_inlinethunk<mode>_z10")
22691         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
22692         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
22693         ("casesi_jump_via_inlinethunk<mode>_z10")
22694         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
22695         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
22696         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
22697         ("*indirect2_jump"): Disable for branch conversion.
22698         ("casesi_jump"): Turn into expander and expand patterns for branch
22699         conversion.
22700         ("return_use"): New expander.
22701         ("*return"): Emit return via thunk and rename it to ...
22702         ("*return<mode>"): ... this one.
22703         * config/s390/s390.opt: Add new options and and enum for the
22704         option values.
22706 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22708         * lra-constraints.c (match_reload): Unconditionally use
22709         gen_lowpart_SUBREG, rather than selecting between that
22710         and equivalent gen_rtx_SUBREG code.
22712 2018-02-08  Richard Biener  <rguenther@suse.de>
22714         PR tree-optimization/84233
22715         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
22716         changed flag instead of boguously re-using phi_inserted.
22718 2018-02-08  Martin Jambor  <mjambor@suse.cz>
22720         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
22721         static local variables.
22723 2018-02-08  Richard Biener  <rguenther@suse.de>
22725         PR tree-optimization/84278
22726         * tree-vect-stmts.c (vectorizable_store): When looking for
22727         smaller vector types to perform grouped strided loads/stores
22728         make sure the mode is supported by the target.
22729         (vectorizable_load): Likewise.
22731 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22733         * config/aarch64/aarch64.c (aarch64_components_for_bb):
22734         Increase LDP/STP opportunities by adding adjacent callee-saves.
22736 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22738         PR rtl-optimization/84068
22739         PR rtl-optimization/83459
22740         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
22742 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
22744         PR tree-optimization/84224
22745         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
22746         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
22747         non-zero arguments.
22749 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
22751         PR target/84113
22752         * config/rs6000/altivec.md (*restore_world): Remove LR use.
22753         * config/rs6000/predicates.md (restore_world_operation): Adjust op
22754         count, remove one USE.
22756 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
22758         * doc/install.texi (Configuration): Document the
22759         --with-long-double-format={ibm,ieee} PowerPC configuration
22760         options.
22762         PR target/84154
22763         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
22764         Convert from define_expand to be define_insn_and_split.  Rework
22765         float/double/_Float128 conversions to QI/HI/SImode to work with
22766         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
22767         conversions to QI/HImode types did a store and then a load to
22768         truncate the value.  For conversions to VSX registers, don't split
22769         the insn, instead emit the code directly.  Use the code iterator
22770         any_fix to combine signed and unsigned conversions.
22771         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
22772         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
22773         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22774         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
22775         (fix_<mode>di2_hw): Likewise.
22776         (fixuns_<mode>di2_hw): Likewise.
22777         (fix_<mode>si2_hw): Likewise.
22778         (fixuns_<mode>si2_hw): Likewise.
22779         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
22780         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22781         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
22782         fix<uns>_trunc<SFDF:mode>si2_p8.
22783         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
22784         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22785         (fix<uns>_<mode>_mem): Likewise.
22786         (fctiw<u>z_<mode>_mem): Likewise.
22787         (fix<uns>_<mode>_mem): Likewise.
22788         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
22789         the register allocator from doing a direct move to the GPRs to do
22790         a store, and instead use the ISA 3.0 store byte/half-word from
22791         vector register instruction.  For IEEE 128-bit floating point,
22792         also optimize stores of 32-bit ints.
22793         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
22795 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
22797         * genextract.c (push_pathstr_operand): New function to support
22798         [a-zA-Z].
22799         (walk_rtx): Call push_pathstr_operand.
22800         (print_path): Support [a-zA-Z].
22802 2018-02-07  Richard Biener  <rguenther@suse.de>
22804         PR tree-optimization/84037
22805         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
22806         (cse_and_gimplify_to_preheader): Declare.
22807         (vect_get_place_in_interleaving_chain): Likewise.
22808         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22809         ivexpr_map.
22810         (_loop_vec_info::~_loop_vec_info): Delete it.
22811         (cse_and_gimplify_to_preheader): New function.
22812         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
22813         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
22814         (vectorizable_load): Likewise.  For grouped stores always base
22815         the IV on the first element.
22816         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
22817         condition before gimplifying.
22819 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22821         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
22822         *DIV_EXPR and *MOD_EXPR.
22824 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
22826         PR target/84248
22827         * config/i386/i386.c (ix86_option_override_internal): Mask out
22828         the CF_SET bit when checking -fcf-protection.
22830 2018-02-07  Tom de Vries  <tom@codesourcery.com>
22832         PR libgomp/84217
22833         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22834         enough.
22836 2018-02-07  Richard Biener  <rguenther@suse.de>
22838         PR tree-optimization/84204
22839         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22840         this place.
22842         PR tree-optimization/84205
22843         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22844         special-case isl_ast_op_zdiv_r.
22846         PR tree-optimization/84223
22847         * graphite-scop-detection.c (gather_bbs::before_dom_children):
22848         Only add conditions from within the region.
22849         (gather_bbs::after_dom_children): Adjust.
22851 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
22853         PR target/84209
22854         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22855         * config/avr/avr.md: Only post-reload split REG-REG moves if
22856         either register is GENERAL_REG_P.
22858 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22860         PR tree-optimization/84235
22861         * tree-ssa-scopedtables.c
22862         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22863         if the subtraction is performed in floating point type where NaNs are
22864         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22865         build 1.  Formatting fix.
22867 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
22869         PR target/84146
22870         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22871         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22872         and skip it regardless of bb boundaries.  Use CALL_P macro,
22873         don't test INSN_P (insn) together with CALL_P or JUMP_P check
22874         unnecessarily, formatting fix.
22876 2018-02-06  Michael Collison  <michael.collison@arm.com>
22878         * config/arm/thumb2.md:
22879         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22880         (*thumb_mov_notscc): Ditto.
22882 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
22884         PR target/84154
22885         * config/rs6000/rs6000.md (su code attribute): Use "u" for
22886         unsigned_fix, not "s".
22888 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22890         * configure.ac (gcc_fn_eh_frame_ro): New function.
22891         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22892         correct .eh_frame permissions.
22893         * configure: Regenerate.
22895 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
22897         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22898         irrelevant options.
22900 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22902         * config/rs6000/rs6000.c (rs6000_option_override_internal):
22903         Display warning message for -mno-speculate-indirect-jumps.
22905 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
22907         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22908         Undocumented.
22909         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22911 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
22913         PR tree-optimization/84225
22914         * tree-eh.c (find_trapping_overflow): Only call
22915         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22917 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22919         PR target/84145
22920         * config/i386/i386.c: Reimplement the check of possible options
22921         -mibt/-mshstk conbination. Change error messages.
22922         * doc/invoke.texi: Fix a typo: remove extra '='.
22924 2018-02-06  Marek Polacek  <polacek@redhat.com>
22926         PR tree-optimization/84228
22927         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22929 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
22931         PR target/82641
22932         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22933         emitted arch directives.
22934         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22935         __ARM_FEATURE_COPROC before changing architectures.
22937 2018-02-06  Richard Biener  <rguenther@suse.de>
22939         * config/i386/i386.c (print_reg): Fix typo.
22940         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22942 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
22944         * configure: Regenerate.
22946 2018-02-05  Martin Sebor  <msebor@redhat.com>
22948         PR tree-optimization/83369
22949         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22950         inlining context.
22952 2018-02-05  Martin Liska  <mliska@suse.cz>
22954         * doc/invoke.texi: Cherry-pick upstream r323995.
22956 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
22958         * ira.c (ira_init_register_move_cost): Adjust comment.
22960 2018-02-05  Martin Liska  <mliska@suse.cz>
22962         PR gcov-profile/84137
22963         * doc/gcov.texi: Fix typo in documentation.
22965 2018-02-05  Martin Liska  <mliska@suse.cz>
22967         PR gcov-profile/83879
22968         * doc/gcov.texi: Document necessity of --dynamic-list-data when
22969         using dlopen functionality.
22971 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
22973         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22974         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22975         _mm_maskz_range_ss, _mm_mask_range_round_ss,
22976         _mm_maskz_range_round_ss): New intrinsics.
22977         (__builtin_ia32_rangesd128_round)
22978         (__builtin_ia32_rangess128_round): Remove.
22979         (__builtin_ia32_rangesd128_mask_round,
22980         __builtin_ia32_rangess128_mask_round): New builtins.
22981         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22982         __builtin_ia32_rangess128_round): Remove.
22983         (__builtin_ia32_rangesd128_mask_round,
22984         __builtin_ia32_rangess128_mask_round): New builtins.
22985         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22986         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22987         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22988         "<round_saeonly_constraint>")): Changed to ...
22989         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22990         "<round_saeonly_scalar_constraint>")): ... this.
22991         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22992         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22993         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22994         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22995         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22997 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
22999         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23000         options.
23001         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23002         Remove all values except native, 8540 and 8548.
23004 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
23006         * config/i386/i386.c (ix86_output_function_return): Pass
23007         INVALID_REGNUM, instead of -1, as invalid register number to
23008         indirect_thunk_name and output_indirect_thunk.
23010 2018-02-02  Julia Koval  <julia.koval@intel.com>
23012         * config.gcc: Add -march=icelake.
23013         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23014         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23015         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23016         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23017         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23018         (processor_target_table): Add icelake.
23019         (ix86_option_override_internal): Handle new PTAs.
23020         (get_builtin_code_for_version): Handle icelake.
23021         (M_INTEL_COREI7_ICELAKE): New.
23022         (fold_builtin_cpu): Handle icelake.
23023         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23024         * doc/invoke.texi: Add -march=icelake.
23026 2018-02-02  Julia Koval  <julia.koval@intel.com>
23028         * config/i386/i386.c (ix86_option_override_internal): Change flags type
23029         to wide_int_bitmask.
23030         * wide-int-bitmask.h: New.
23032 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23034         PR target/84066
23035         * config/i386/i386.md: Replace Pmode with word_mode in
23036         builtin_setjmp_setup and builtin_longjmp to support x32.
23038 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
23040         PR target/56010
23041         PR target/83743
23042         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23043         #include "opts.h".
23044         (rs6000_supported_cpu_names): New static variable.
23045         (linux_cpu_translation_table): Likewise.
23046         (elf_platform) <cpu>: Define new static variable and use it.
23047         Translate kernel AT_PLATFORM name to canonical name if needed.
23048         Error if platform name is unknown.
23050 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
23052         PR target/84089
23053         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23055 2018-02-01  Jeff Law  <law@redhat.com>
23057         PR target/84128
23058         * config/i386/i386.c (release_scratch_register_on_entry): Add new
23059         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
23060         the scratch if RELEASE_VIA_POP is false.
23061         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23062         If we have to save a temporary register, decrement SIZE appropriately.
23063         Pass new arguments to release_scratch_register_on_entry.
23064         (ix86_adjust_stack_and_probe): Likewise.
23065         (ix86_emit_probe_stack_range): Pass new arguments to
23066         release_scratch_register_on_entry.
23068 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
23070         PR rtl-optimization/84157
23071         * combine.c (change_zero_ext): Use REG_P predicate in
23072         front of HARD_REGISTER_P predicate.
23074 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
23076         * config/avr/avr.c (avr_option_override): Move disabling of
23077         -fdelete-null-pointer-checks to...
23078         * common/config/avr/avr-common.c (avr_option_optimization_table):
23079         ...here.
23081 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23083         PR tree-optimization/81635
23084         * tree-data-ref.c (split_constant_offset_1): For types that
23085         wrap on overflow, try to use range info to prove that wrapping
23086         cannot occur.
23088 2018-02-01  Renlin Li  <renlin.li@arm.com>
23090         PR target/83370
23091         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23092         TAILCALL_ADDR_REGS.
23093         (aarch64_register_move_cost): Likewise.
23094         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23095         TAILCALL_ADDR_REGS.
23096         (REG_CLASS_NAMES): Likewise.
23097         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23098         TAILCALL_ADDR_REGS. Remove IP registers.
23099         * config/aarch64/aarch64.md (Ucs): Update register constraint.
23101 2018-02-01  Richard Biener  <rguenther@suse.de>
23103         * domwalk.h (dom_walker::dom_walker): Add additional constructor
23104         for specifying RPO order and allow NULL for that.
23105         * domwalk.c (dom_walker::dom_walker): Likewise.
23106         (dom_walker::walk): Handle NULL RPO order.
23107         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23108         in RPO order.
23109         (rewrite_update_dom_walker): Likewise.
23110         (mark_def_dom_walker): Likewise.
23112 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23114         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23115         (aarch64_maybe_expand_sve_subreg_move): Declare.
23116         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23117         * config/aarch64/predicates.md (aarch64_any_register_operand): New
23118         predicate.
23119         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23120         that are semantically a reverse operation.
23121         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23122         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23123         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23124         functions.
23125         (aarch64_can_change_mode_class): For big-endian, forbid changes
23126         between two SVE modes if they have different element sizes.
23128 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23130         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23131         the TImode handling for big-endian targets.
23133 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23135         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23136         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
23137         not just bytes.
23138         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23139         Remove BSWAP handing for big-endian targets and use the form of
23140         LD1RQ appropariate for the mode.
23142 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23144         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23145         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23146         duplicated element.
23148 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23150         PR tearget/83845
23151         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23152         check for operands that need to go through aarch64_sve_reload_be.
23154 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
23156         PR tree-optimization/81661
23157         PR tree-optimization/84117
23158         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23159         * tree-eh.c: Include gimplify.h.
23160         (find_trapping_overflow, replace_trapping_overflow,
23161         rewrite_to_non_trapping_overflow): New functions.
23162         * tree-vect-loop.c: Include tree-eh.h.
23163         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23164         * tree-data-ref.c: Include tree-eh.h.
23165         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23167 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
23169         PR rtl-optimization/84123
23170         * combine.c (change_zero_ext): Check if hard register satisfies
23171         can_change_dest_mode before calling gen_lowpart_SUBREG.
23173 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
23175         PR target/82444
23176         * ira.c (ira_init_register_move_cost): Remove assert.
23178 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23180         PR rtl-optimization/84071
23181         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23182         * doc/tm.texi: Regenerate.
23184 2018-01-31  Richard Biener  <rguenther@suse.de>
23186         PR tree-optimization/84132
23187         * tree-data-ref.c (analyze_miv_subscript): Properly
23188         check whether evolution_function_is_affine_multivariate_p
23189         before calling gcd_of_steps_may_divide_p.
23191 2018-01-31  Julia Koval  <julia.koval@intel.com>
23193         PR target/83618
23194         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23195         * config/i386/i386.md (rdpid_rex64) New.
23196         (rdpid): Make 32bit only.
23198 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
23200         PR lto/84105
23201         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23202         an IDENTIFIER_NODE for FUNCTION_TYPE's.
23204 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23206         Revert
23207         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23209         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23211 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23213         PR rtl-optimization/84071
23214         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23215         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23217 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23219         * config/arc/arc.c (arc_handle_aux_attribute): New function.
23220         (arc_attribute_table): Add 'aux' attribute.
23221         (arc_in_small_data_p): Consider aux like variables.
23222         (arc_is_aux_reg_p): New function.
23223         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23224         (arc_get_aux_arg): New function.
23225         (prepare_move_operands): Handle aux-register access.
23226         (arc_handle_aux_attribute): New function.
23227         * doc/extend.texi (ARC Variable attributes): Add subsection.
23229 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23231         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23232         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23233         (arc_attribute_table): Add 'uncached' attribute.
23234         (arc_print_operand): Print '.di' flag for uncached memory
23235         accesses.
23236         (arc_in_small_data_p): Do not consider for small data the uncached
23237         types.
23238         (arc_is_uncached_mem_p): New function.
23239         * config/arc/predicates.md (compact_store_memory_operand): Check
23240         for uncached memory accesses.
23241         (nonvol_nonimm_operand): Likewise.
23242         * doc/extend.texi (ARC Type Attribute): New subsection.
23244 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
23246         PR c/84100
23247         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23248         falign-loops=): Add Optimization flag.
23250 2018-01-30  Jeff Law  <law@redhat.com>
23252         PR target/84064
23253         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23254         INT_REGISTERS_SAVED.  Check it prior to calling
23255         get_scratch_register_on_entry.
23256         (ix86_adjust_stack_and_probe): Similarly.
23257         (ix86_emit_probe_stack_range): Similarly.
23258         (ix86_expand_prologue): Corresponding changes.
23260 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23262         PR target/40411
23263         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23264         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23266 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
23268         PR target/84112
23269         * lra-constraints.c (curr_insn_transform): Process AND in the
23270         address.
23272 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
23274         PR rtl-optimization/83986
23275         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23276         dependence against last_pending_memory_flush in addition to
23277         pending_jump_insns.
23279 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
23281         PR tree-optimization/81611
23282         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23283         copies.
23285 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23287         PR target/83758
23288         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23289         a reg rtx.
23291 2018-01-30  Richard Biener  <rguenther@suse.de>
23292             Jakub Jelinek  <jakub@redhat.com>
23294         PR tree-optimization/84111
23295         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23296         inner loops added during recursion, as they don't have up-to-date
23297         SSA form.
23299 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23301         PR ipa/81360
23302         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23303         (can_inline_edge_by_limits_p): ... here.
23304         (can_early_inline_edge_p, check_callers,
23305         update_caller_keys, update_callee_keys, recursive_inlining,
23306         add_new_edges_to_heap, speculation_useful_p,
23307         inline_small_functions,
23308         inline_small_functions, flatten_function,
23309         inline_to_all_callers_1): Update.
23311 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23313         * profile-count.c (profile_count::combine_with_ipa_count): Handle
23314         zeros correctly.
23316 2018-01-30  Richard Biener  <rguenther@suse.de>
23318         PR tree-optimization/83008
23319         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23320         invariant and constant vector uses in stmts when they need
23321         more than one stmt.
23323 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23325         PR bootstrap/84017
23326         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23327         * configure: Regenerate.
23329 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23331         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23332         pattern.
23333         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23334         Use gen_rtx_REG rather than gen_lowpart.
23336 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23338         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23339         rather than 0 when creating partial subregs.
23341 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23343         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23344         of usage.
23346 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
23348         PR target/81550
23349         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23350         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23351         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23352         flags.  This restores the settings used before the 2017-07-24.
23353         Turning off pre increment/decrement/modify allows IVOPTS to
23354         optimize DF/SF loops where the index is an int.
23356 2018-01-29  Richard Biener  <rguenther@suse.de>
23357             Kelvin Nilsen  <kelvin@gcc.gnu.org>
23359         PR bootstrap/80867
23360         * tree-vect-stmts.c (vectorizable_call): Don't call
23361         targetm.vectorize_builtin_md_vectorized_function if callee is
23362         NULL.
23364 2018-01-22  Carl Love  <cel@us.ibm.com>
23366         * doc/extend.tex: Fix typo in second arg in
23367         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23369 2018-01-29  Richard Biener  <rguenther@suse.de>
23371         PR tree-optimization/84086
23372         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23373         (flush_ssaname_freelist): When SSA names were released reset
23374         the SCEV hash table.
23376 2018-01-29  Richard Biener  <rguenther@suse.de>
23378         PR tree-optimization/84057
23379         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23380         removed paths when removing edges.
23382 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
23384         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
23385         -mfunction-return=@var{choice}.
23387 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23389         PR diagnostic/84034
23390         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
23391         Handle CR like TAB.
23392         (layout::print_source_line): Likewise.
23393         (test_get_line_width_without_trailing_whitespace): Add test cases.
23395 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
23397         PR middle-end/84040
23398         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
23399         debug insns.
23401 2018-01-26  Jim Wilson  <jimw@sifive.com>
23403         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
23405         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
23406         specified.
23408 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23410         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
23411         and CMP + SUB-immediate -> SUBS.
23413 2018-01-26  Martin Sebor  <msebor@redhat.com>
23415         PR tree-optimization/83896
23416         * tree-ssa-strlen.c (get_string_len): Rename...
23417         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
23418         Avoid assuming length is constant.
23419         (handle_char_store): Use HOST_WIDE_INT for string length.
23421 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
23423         PR target/81763
23424         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
23425         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
23427 2018-01-26  Richard Biener  <rguenther@suse.de>
23429         PR rtl-optimization/84003
23430         * dse.c (record_store): Only record redundant stores when
23431         the earlier store aliases at least all accesses the later one does.
23433 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
23435         PR rtl-optimization/83985
23436         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
23437         REG_CFA_RESTORE insns.
23438         (delete_unmarked_insns): Don't ignore separate shrink wrapping
23439         REG_CFA_RESTORE insns here.
23441         PR c/83989
23442         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
23443         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
23445 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23447         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
23448         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
23449         (arc_init): Likewise.
23450         (arc_override_options): Likewise.
23451         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
23452         value.
23453         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
23454         support.
23455         * config/arc/arc.h (TARGET_DBNZ): Define.
23456         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
23457         properly set the tune attribute.
23458         (dbnz): Use TARGET_DBNZ guard.
23459         * config/arc/arc.opt (mtune): Add core3 option.
23461 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23463         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
23464         recognize new pic like addresses.
23465         (arc_delegitimize_address): Clean up.
23467 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23469         * config/arc/arc-arches.def: Option mrf16 valid for all
23470         architectures.
23471         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
23472         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
23473         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
23474         * config/arc/arc-tables.opt: Regenerate.
23475         * config/arc/arc.c (arc_conditional_register_usage): Handle
23476         reduced register file case.
23477         (arc_file_start): Set must have build attributes.
23478         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
23479         mrf16 option value.
23480         * config/arc/arc.opt (mrf16): Add new option.
23481         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
23482         * config/arc/genmultilib.awk: Handle new mrf16 option.
23483         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
23484         * config/arc/t-multilib: Regenerate.
23485         * doc/invoke.texi (ARC Options): Document mrf16 option.
23487 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23489         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
23490         * config/arc/arc.c (arc_handle_secure_attribute): New function.
23491         (arc_attribute_table): Add 'secure_call' attribute.
23492         (arc_print_operand): Print secure call operand.
23493         (arc_function_ok_for_sibcall): Don't optimize tail calls when
23494         secure.
23495         (arc_is_secure_call_p): New function.  * config/arc/arc.md
23496         (call_i): Add support for sjli instruction.
23497         (call_value_i): Likewise.
23498         * config/arc/constraints.md (Csc): New constraint.
23500 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23501             John Eric Martin  <John.Martin@emmicro-us.com>
23503         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
23504         * config/arc/arc.c (_arc_jli_section): New struct.
23505         (arc_jli_section): New type.
23506         (rc_jli_sections): New static variable.
23507         (arc_handle_jli_attribute): New function.
23508         (arc_attribute_table): Add jli_always and jli_fixed attribute.
23509         (arc_file_end): New function.
23510         (TARGET_ASM_FILE_END): Define.
23511         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
23512         (arc_add_jli_section): New function.
23513         (jli_call_scan): Likewise.
23514         (arc_reorg): Call jli_call_scan.
23515         (arc_output_addsi): Remove 'S' from printing asm operand.
23516         (arc_is_jli_call_p): New function.
23517         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
23518         operand.
23519         (movhi_insn): Likewise.
23520         (movsi_insn): Likewise.
23521         (movsi_set_cc_insn): Likewise.
23522         (loadqi_update): Likewise.
23523         (load_zeroextendqisi_update): Likewise.
23524         (load_signextendqisi_update): Likewise.
23525         (loadhi_update): Likewise.
23526         (load_zeroextendhisi_update): Likewise.
23527         (load_signextendhisi_update): Likewise.
23528         (loadsi_update): Likewise.
23529         (loadsf_update): Likewise.
23530         (movsicc_insn): Likewise.
23531         (bset_insn): Likewise.
23532         (bxor_insn): Likewise.
23533         (bclr_insn): Likewise.
23534         (bmsk_insn): Likewise.
23535         (bicsi3_insn): Likewise.
23536         (cmpsi_cc_c_insn): Likewise.
23537         (movsi_ne): Likewise.
23538         (movsi_cond_exec): Likewise.
23539         (clrsbsi2): Likewise.
23540         (norm_f): Likewise.
23541         (normw): Likewise.
23542         (swap): Likewise.
23543         (divaw): Likewise.
23544         (flag): Likewise.
23545         (sr): Likewise.
23546         (kflag): Likewise.
23547         (ffs): Likewise.
23548         (ffs_f): Likewise.
23549         (fls): Likewise.
23550         (call_i): Remove 'S' asm letter, add jli instruction.
23551         (call_value_i): Likewise.
23552         * config/arc/arc.op (mjli-always): New option.
23553         * config/arc/constraints.md (Cji): New constraint.
23554         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
23555         operand.
23556         (subsf3_fpx): Likewise.
23557         (mulsf3_fpx): Likewise.
23558         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
23559         asm operand.
23560         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
23561         function attrbutes.
23562         * doc/invoke.texi (ARC): Document mjli-always option.
23564 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
23566         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
23567         avoid addition with 0 and use incw and decw where possible.
23569 2018-01-26  Richard Biener  <rguenther@suse.de>
23571         PR tree-optimization/81082
23572         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
23573         association if it requires casting to unsigned.
23574         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
23575         from fold_plusminus_mult_expr to catch important cases late when
23576         range info is available.
23578 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23580         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
23581         * configure.ac (hidden_linkonce): New test.
23582         * configure: Regenerate.
23583         * config.in: Regenerate.
23585 2018-01-26  Julia Koval  <julia.koval@intel.com>
23587         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
23588         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
23589         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
23590         _mm_mask_bitshuffle_epi64_mask): Fix type.
23591         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
23592         USI_FTYPE_V4DI_V4DI_USI): Remove.
23593         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
23594         __builtin_ia32_vpshufbitqmb256_mask,
23595         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
23596         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
23597         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
23599 2018-01-26  Alan Modra  <amodra@gmail.com>
23601         PR target/84033
23602         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
23603         UNSPEC_VBPERMQ.  Sort other unspecs.
23605 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
23607         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
23609 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
23611         PR middle-end/83055
23612         * predict.c (drop_profile): Do not push/pop cfun; update also
23613         node->count.
23614         (handle_missing_profiles): Fix logic looking for zero profiles.
23616 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
23618         PR middle-end/83977
23619         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
23620         on functions with #pragma omp declare simd or functions with simd
23621         attribute.
23622         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
23623         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
23624         Remove trailing \n from warning_at calls.
23626 2018-01-25  Tom de Vries  <tom@codesourcery.com>
23628         PR target/84028
23629         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23630         for neutered workers.
23632 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
23634         PR target/68467
23635         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
23636         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
23638 2018-01-24  Jeff Law  <law@redhat.com>
23640         PR target/83994
23641         * i386.c (get_probe_interval): Move to earlier point.
23642         (ix86_compute_frame_layout): If -fstack-clash-protection and
23643         the frame is larger than the probe interval, then use pushes
23644         to save registers rather than reg->mem moves.
23645         (ix86_expand_prologue): Remove conditional for int_registers_saved
23646         assertion.
23648 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
23650         PR target/84014
23651         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
23652         min/max for never referenced object.
23654 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
23656         PR middle-end/83977
23657         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
23658         here.
23659         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
23660         attributes from DECL_ATTRIBUTES (decl) without affecting
23661         DECL_ATTRIBUTES (current_function_decl).
23662         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
23663         functions with non-NULL DECL_ABSTRACT_ORIGIN.
23665 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
23667         PR tree-optimization/83979
23668         * fold-const.c (fold_comparison): Use constant_boolean_node
23669         instead of boolean_{true,false}_node.
23671 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
23673         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
23674         with zero counts.
23676 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23678         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23679         Simplify the clause that sets the length attribute.
23680         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23681         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
23682         clause that sets the length attribute.
23683         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23685 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23687         PR target/83589
23688         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
23689         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
23690         Add strict parameter.
23691         (prevent_branch_around_nothing): Insert dummy insn between branch to
23692         label and label with no ptx insn inbetween.
23693         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
23695 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23697         PR target/81352
23698         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23699         for neutered threads in warp.
23700         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
23702 2018-01-24  Richard Biener  <rguenther@suse.de>
23704         PR tree-optimization/83176
23705         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
23706         operands.
23708 2018-01-24  Richard Biener  <rguenther@suse.de>
23710         PR tree-optimization/82819
23711         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
23712         code generating pluses that are no-ops in the target precision.
23714 2018-01-24  Richard Biener  <rguenther@suse.de>
23716         PR middle-end/84000
23717         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
23719 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23721         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
23722         to merge probabilities.
23723         * predict.c (probably_never_executed): Also mark as cold functions
23724         with global 0 profile and guessed local profile.
23725         * profile-count.c (profile_probability::combine_with_count): New
23726         member function.
23727         * profile-count.h (profile_probability::operator*,
23728         profile_probability::operator*=, profile_probability::operator/,
23729         profile_probability::operator/=): Reduce precision to adjusted
23730         and set value to guessed on contradictory divisions.
23731         (profile_probability::combine_with_freq): Remove.
23732         (profile_probability::combine_wiht_count): Declare.
23733         (profile_count::force_nonzero):: Set to adjusted.
23734         (profile_count::probability_in):: Set quality to adjusted.
23735         * tree-ssa-tail-merge.c (replace_block_by): Use
23736         combine_with_count.
23738 2018-01-23  Andrew Waterman  <andrew@sifive.com>
23739             Jim Wilson  <jimw@sifive.com>
23741         * config/riscv/riscv.c (riscv_stack_boundary): New.
23742         (riscv_option_override): Set riscv_stack_boundary.  Handle
23743         riscv_preferred_stack_boundary_arg.
23744         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
23745         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
23746         (STACK_BOUNDARY): Set to riscv_stack_boundary.
23747         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
23748         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
23749         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
23751 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
23753         PR target/83905
23754         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
23755         of struct ix86_frame.
23756         (ix86_expand_epilogue): Likewise.  Add a local variable for
23757         the reg_save_offset field in struct ix86_frame.
23759 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
23761         PR tree-optimization/82604
23762         * tree-loop-distribution.c (enum partition_kind): New enum item
23763         PKIND_PARTIAL_MEMSET.
23764         (partition_builtin_p): Support above new enum item.
23765         (generate_code_for_partition): Ditto.
23766         (compute_access_range): Differentiate cases that equality can be
23767         proven at all loops, the innermost loops or no loops.
23768         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
23769         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
23770         (finalize_partitions, distribute_loop): Don't fuse partition of
23771         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
23772         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
23773         parloop is enabled.
23775 2018-01-23  Martin Liska  <mliska@suse.cz>
23777         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
23778         order to ignore the predictor.
23779         (PRED_POLYMORPHIC_CALL): Likewise.
23780         (PRED_RECURSIVE_CALL): Likewise.
23782 2018-01-23  Martin Liska  <mliska@suse.cz>
23784         * tree-profile.c (tree_profiling): Print function header to
23785         aware reader which function we are working on.
23786         * value-prof.c (gimple_find_values_to_profile): Do not print
23787         not interesting value histograms.
23789 2018-01-23  Martin Liska  <mliska@suse.cz>
23791         * profile-count.h (enum profile_quality): Add
23792         profile_uninitialized as the first value. Do not number values
23793         as they are zero based.
23794         (profile_count::verify): Update sanity check.
23795         (profile_probability::verify): Likewise.
23797 2018-01-23  Nathan Sidwell  <nathan@acm.org>
23799         * doc/invoke.texi (ffor-scope): Deprecate.
23801 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23803         PR tree-optimization/83510
23804         * domwalk.c (set_all_edges_as_executable): New function.
23805         (dom_walker::dom_walker): Convert bool param
23806         "skip_unreachable_blocks" to enum reachability.  Move setup of
23807         edge flags to set_all_edges_as_executable and only do it when
23808         reachability is REACHABLE_BLOCKS.
23809         * domwalk.h (enum dom_walker::reachability): New enum.
23810         (dom_walker::dom_walker): Convert bool param
23811         "skip_unreachable_blocks" to enum reachability.
23812         (set_all_edges_as_executable): New decl.
23813         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
23814         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
23815         "reachability".
23816         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
23817         but converting true to REACHABLE_BLOCKS.
23818         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
23819         * tree-vrp.c
23820         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
23821         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
23822         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
23823         REACHABLE_BLOCKS.
23824         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
23825         if check_all_array_refs will be called.
23827 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23829         * tree.c (selftest::test_location_wrappers): Add more test
23830         coverage.
23832 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23834         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23835         (selftest::test_bit_in_range): Likewise.
23837 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23839         PR testsuite/83888
23840         * doc/sourcebuild.texi (vect_float): Say that the selector
23841         only describes the situation when -funsafe-math-optimizations is on.
23842         (vect_float_strict): Document.
23844 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23846         PR tree-optimization/83965
23847         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23848         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23849         instead of checking only for a reduction.
23850         (vect_recog_widen_sum_pattern): Likewise.
23852 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23854         * predict.c (probably_never_executed): Only use precise profile info.
23855         (compute_function_frequency): Skip after inlining hack since we now
23856         have quality checking.
23858 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23860         * profile-count.h (profile_probability::very_unlikely,
23861         profile_probability::unlikely, profile_probability::even): Set
23862         precision to guessed.
23864 2018-01-23  Richard Biener  <rguenther@suse.de>
23866         PR tree-optimization/83963
23867         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23868         Properly terminate dominator walk when crossing the exit edge not
23869         when visiting its source block.
23871 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
23873         PR c++/83918
23874         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23875         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23877 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
23879         PR tree-optimization/83957
23880         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
23881         semicolon after for body surrounded by braces.
23883         PR tree-optimization/83081
23884         * profile-count.h (profile_probability::split): New method.
23885         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23886         Use profile_probability::split.
23887         (do_compare_rtx_and_jump): Fix adjustment of probabilities
23888         when splitting a single conditional jump into 2.
23890 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
23892         PR tree-optimization/69452
23893         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23894         decl.
23896 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23898         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23899         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23900         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23902 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23904         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23905         declaration.
23906         * config/rl78/rl78.md (movdi): New define_expand.
23907         * config/rl78/rl78.c (rl78_split_movdi): New function.
23909 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
23911         PR target/83862
23912         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23913         no longer used.
23914         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23915         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23916         128-bit to produce an UNSPEC move to get the double word with the
23917         signbit and then a shift directly to do signbit.
23918         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23919         implementation with a new version that just does either a direct
23920         move or a regular move.  Move memory interface to separate insns.
23921         Move insns so they are next to the expander.
23922         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23923         with signbit move.  Split big and little endian case.
23924         (signbit<mode>2_dm_mem_le): Likewise.
23925         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23926         (signbit<mode>2_dm2): Likewise.
23928 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23930         * config/rl78/rl78.md (anddi3): New define_expand.
23932 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23934         * config/rl78/rl78.md (umindi3): New define_expand.
23936 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23938         * config/rl78/rl78.md (smindi3): New define_expand.
23940 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23942         * config/rl78/rl78.md (smaxdi3): New define_expand.
23944 2018-01-22  Carl Love  <cel@us.ibm.com>
23946         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23947         LVX_V1TI): Add macro expansion.
23948         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23949         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23950         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23951         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23952         Change check to determine if the instruction is a byte reversing
23953         entry.  Fix typo in comment.
23954         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23955         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23956         Add def_builtin calls for new builtins.
23957         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23958         Add define_insn expansion.
23960 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23962         * config/rl78/rl78.md (umaxdi3): New define_expand.
23964 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23966         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23967         for non-QImode registers.
23969 2018-01-22  Richard Biener  <rguenther@suse.de>
23971         PR tree-optimization/83963
23972         * graphite-scop-detection.c (scop_detection::get_sese): Delay
23973         including the loop exit block.
23974         (scop_detection::merge_sese): Likewise.
23975         (scop_detection::add_scop): Do it here instead.
23977 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23979         * doc/sourcebuild.texi (arm_softfloat): Document.
23981 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
23983         PR gcc/77734
23984         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23985         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23986         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23988 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23989             David Edelsohn  <dje.gcc@gmail.com>
23991         PR target/83946
23992         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23993         Change "crset eq" to "crset 2".
23994         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23995         (*call_indirect_aix<mode>_nospec): Likewise.
23996         (*call_value_indirect_aix<mode>_nospec): Likewise.
23997         (*call_indirect_elfv2<mode>_nospec): Likewise.
23998         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23999         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24000         change assembly output from . to $.
24001         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24002         (indirect_jump<mode>_nospec): Change assembly output from . to $.
24003         (*tablejump<mode>_internal1_nospec): Likewise.
24005 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
24007         PR target/80870
24008         * config/sh/sh_optimize_sett_clrt.cc:
24009         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24011 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
24013         PR tree-optimization/83940
24014         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24015         offset_dt to vect_constant_def rather than vect_unknown_def_type.
24016         (vect_check_load_store_mask): Add a mask_dt_out parameter and
24017         use it to pass back the definition type.
24018         (vect_check_store_rhs): Likewise rhs_dt_out.
24019         (vect_build_gather_load_calls): Add a mask_dt argument and use
24020         it instead of a call to vect_is_simple_use.
24021         (vectorizable_store): Update calls to vect_check_load_store_mask
24022         and vect_check_store_rhs.  Use the dt returned by the latter instead
24023         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
24024         instead of calls to vect_is_simple_use.  Pass the scalar rather
24025         than the vector operand to vect_is_simple_use when handling
24026         second and subsequent copies of an rhs value.
24027         (vectorizable_load): Update calls to vect_check_load_store_mask
24028         and vect_build_gather_load_calls.  Use the cached mask_dt and
24029         gs_info.offset_dt instead of calls to vect_is_simple_use.
24031 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
24033         PR middle-end/83945
24034         * tree-emutls.c: Include gimplify.h.
24035         (lower_emutls_2): New function.
24036         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24037         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24038         it before further processing.
24040         PR target/83930
24041         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24042         UINTVAL (trueop1) instead of INTVAL (op1).
24044 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
24046         PR debug/81570
24047         PR debug/83728
24048         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24049         INCOMING_FRAME_SP_OFFSET if not defined.
24050         (scan_trace): Add ENTRY argument.  If true and
24051         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24052         emit a note to adjust the CFA offset.
24053         (create_cfi_notes): Adjust scan_trace callers.
24054         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24055         INCOMING_FRAME_SP_OFFSET in the CIE.
24056         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24057         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24058         Likewise.
24059         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24060         * doc/tm.texi: Regenerated.
24062 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24064         PR rtl-optimization/83147
24065         * lra-constraints.c (remove_inheritance_pseudos): Use
24066         lra_substitute_pseudo_within_insn.
24068 2018-01-19  Tom de Vries  <tom@codesourcery.com>
24069             Cesar Philippidis  <cesar@codesourcery.com>
24071         PR target/83920
24072         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24074 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
24076         PR target/83790
24077         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24078         spaces for function labels.
24080 2018-01-19  Martin Liska  <mliska@suse.cz>
24082         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24083         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24084         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24085         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24086         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24087         (PRED_CONST_RETURN): Change from 69 to 65.
24088         (PRED_NULL_RETURN): Change from 91 to 71.
24089         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24090         (PRED_LOOP_GUARD): Change from 66 to 73.
24092 2018-01-19  Martin Liska  <mliska@suse.cz>
24094         * predict.c (predict_insn_def): Add new assert.
24095         (struct branch_predictor): Change type to signed integer.
24096         (test_prediction_value_range): Amend test to cover
24097         PROB_UNINITIALIZED.
24098         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24099         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24100         (PRED_LOOP_ITERATIONS_MAX): Likewise.
24101         (PRED_LOOP_IV_COMPARE): Likewise.
24102         * predict.h (PROB_UNINITIALIZED): Define new constant.
24104 2018-01-19  Martin Liska  <mliska@suse.cz>
24106         * predict.c (dump_prediction): Add new format for
24107         analyze_brprob.py script which is enabled with -details
24108         suboption.
24109         * profile-count.h (precise_p): New function.
24111 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24113         PR tree-optimization/83922
24114         * tree-vect-loop.c (vect_verify_full_masking): Return false if
24115         there are no statements that need masking.
24116         (vect_active_double_reduction_p): New function.
24117         (vect_analyze_loop_operations): Use it when handling phis that
24118         are not in the loop header.
24120 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24122         PR tree-optimization/83914
24123         * tree-vect-loop.c (vectorizable_induction): Don't convert
24124         init_expr or apply the peeling adjustment for inductions
24125         that are nested within the vectorized loop.
24127 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24129         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24130         instead of NEG.
24132 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24134         PR sanitizer/81715
24135         PR testsuite/83882
24136         * function.h (gimplify_parameters): Add gimple_seq * argument.
24137         * function.c: Include gimple.h and options.h.
24138         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24139         for the added local temporaries if needed.
24140         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24141         if there are any parameter cleanups, wrap whole body into a
24142         try/finally with the cleanups.
24144 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
24146         PR target/82964
24147         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24148         Use GET_MODE_CLASS for scalar floating point.
24150 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24152         PR ipa/82256
24153         patch by PaX Team
24154         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24155         Fix call of call_cgraph_insertion_hooks.
24157 2018-01-18  Martin Sebor  <msebor@redhat.com>
24159         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24161 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24163         PR ipa/83619
24164         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24165         frequencies.
24167 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
24169         PR other/70268
24170         * common.opt: (-ffile-prefix-map): New option.
24171         * opts.c (common_handle_option): Defer it.
24172         * opts-global.c (handle_common_deferred_options): Handle it.
24173         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24174         * file-prefix-map.h: New file.
24175         (remap_debug_filename, add_debug_prefix_map): ...here.
24176         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24177         * final.c (debug_prefix_map, add_debug_prefix_map
24178         remap_debug_filename): Move to...
24179         * file-prefix-map.c: New file.
24180         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24181         generalize, get rid of alloca(), use strrchr() instead of strchr().
24182         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24183         Implement in terms of add_prefix_map().
24184         (remap_macro_filename, remap_debug_filename): Implement in term of
24185         remap_filename().
24186         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24187         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24188         * dbxout.c: Include file-prefix-map.h.
24189         * varasm.c: Likewise.
24190         * vmsdbgout.c: Likewise.
24191         * xcoffout.c: Likewise.
24192         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24193         * doc/cppopts.texi (-fmacro-prefix-map): Document.
24194         * doc/invoke.texi (-ffile-prefix-map): Document.
24195         (-fdebug-prefix-map): Update description.
24197 2018-01-18  Martin Liska  <mliska@suse.cz>
24199         * config/i386/i386.c (indirect_thunk_name): Document that also
24200         lfence is emitted.
24201         (output_indirect_thunk): Document why both instructions
24202         (pause and lfence) are generated.
24204 2018-01-18  Richard Biener  <rguenther@suse.de>
24206         PR tree-optimization/83887
24207         * graphite-scop-detection.c
24208         (scop_detection::get_nearest_dom_with_single_entry): Remove.
24209         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24210         (scop_detection::merge_sese): Re-implement with a flood-fill
24211         algorithm that properly finds a SESE region if it exists.
24213 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24215         PR c/61240
24216         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24217         pointer_diff optimizations use view_convert instead of convert.
24219 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24221         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24222         Generate different code for -mno-speculate-indirect-jumps.
24223         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24224         (*call_indirect_aix<mode>): Disable for
24225         -mno-speculate-indirect-jumps.
24226         (*call_indirect_aix<mode>_nospec): New define_insn.
24227         (*call_value_indirect_aix<mode>): Disable for
24228         -mno-speculate-indirect-jumps.
24229         (*call_value_indirect_aix<mode>_nospec): New define_insn.
24230         (*sibcall_nonlocal_sysv<mode>): Generate different code for
24231         -mno-speculate-indirect-jumps.
24232         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24234 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
24236         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24237         long double type, set the flags for noting the default long double
24238         type, even if we don't pass or return a long double type.
24240 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
24242         PR ipa/83051
24243         * ipa-inline.c (flatten_function): Do not overwrite final inlining
24244         failure.
24246 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
24248         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24249         support for merge[hl].
24250         (fold_mergehl_helper): New helper function.
24251         (tree-vector-builder.h): New #include for tree_vector_builder usage.
24252         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24253         (altivec_vmrglw_direct): Add xxmrglw insn.
24255 2018-01-17  Andrew Waterman  <andrew@sifive.com>
24257         * config/riscv/riscv.c (riscv_conditional_register_usage): If
24258         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24260 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
24262         PR lto/83121
24263         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24264         call the lto_location_cache before reading the
24265         DECL_SOURCE_LOCATION of the types.
24267 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
24268             Richard Sandiford  <richard.sandiford@linaro.org>
24270         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24271         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24272         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24273         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24274         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24275         Add declaration.
24276         * config/aarch64/constraints.md (aarch64_movti_operand):
24277         Limit immediates.
24278         * config/aarch64/predicates.md (Uti): Add new constraint.
24280 2018-01-17  Carl Love  <cel@us.ibm.com>
24282         * config/rs6000/vsx.md (define_expand xl_len_r,
24283         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24284         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24285         lxvll.
24286         (define_expand, define_insn): Move the shift left from  the
24287         define_insn to the define_expand for lxvl and stxvl instructions.
24288         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24289         and XL_LEN_R definitions to PURE.
24291 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
24293         * config/i386/i386.c (indirect_thunk_name): Declare regno
24294         as unsigned int.  Compare regno with INVALID_REGNUM.
24295         (output_indirect_thunk): Ditto.
24296         (output_indirect_thunk_function): Ditto.
24297         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
24298         in the call to output_indirect_thunk_function.
24300 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
24302         PR middle-end/83884
24303         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24304         rather than the size of inner_type to determine the stack slot size
24305         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24307 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
24309         PR target/83546
24310         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24311         to PTA_SILVERMONT.
24313 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24315         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24316         endian Linux systems to optionally enable multilibs for selecting
24317         the long double type if the user configured an explicit type.
24318         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24319         have no long double multilibs if not defined.
24320         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24321         warn if the user used -mabi={ieee,ibm}longdouble and we built
24322         multilibs for long double.
24323         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24324         appropriate multilib option.
24325         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24326         multilib options.
24327         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24328         for building long double multilibs.
24329         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24331 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
24333         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24334         copies.
24336         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24337         64 bits.
24338         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24339         128 bits.
24341         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24342         variables.
24344         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24345         return value.
24347 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24349         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24350         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24352 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24354         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24355         different rtl trees depending on TARGET_64BIT.
24356         (rs6000_gen_lvx): Likewise.
24358 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24360         * config/visium/visium.md (nop): Tweak comment.
24361         (hazard_nop): Likewise.
24363 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24365         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24366         -mspeculate-indirect-jumps.
24367         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24368         for -mno-speculate-indirect-jumps.
24369         (*call_indirect_elfv2<mode>_nospec): New define_insn.
24370         (*call_value_indirect_elfv2<mode>): Disable for
24371         -mno-speculate-indirect-jumps.
24372         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24373         (indirect_jump): Emit different RTL for
24374         -mno-speculate-indirect-jumps.
24375         (*indirect_jump<mode>): Disable for
24376         -mno-speculate-indirect-jumps.
24377         (*indirect_jump<mode>_nospec): New define_insn.
24378         (tablejump): Emit different RTL for
24379         -mno-speculate-indirect-jumps.
24380         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24381         (tablejumpsi_nospec): New define_expand.
24382         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24383         (tablejumpdi_nospec): New define_expand.
24384         (*tablejump<mode>_internal1): Disable for
24385         -mno-speculate-indirect-jumps.
24386         (*tablejump<mode>_internal1_nospec): New define_insn.
24387         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
24388         option.
24390 2018-01-16  Artyom Skrobov tyomitch@gmail.com
24392         * caller-save.c (insert_save): Drop unnecessary parameter.  All
24393         callers updated.
24395 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24396             Richard Biener  <rguenth@suse.de>
24398         PR libgomp/83590
24399         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
24400         return early, inline manually is_gimple_sizepos.  Make sure if we
24401         call gimplify_expr we don't end up with a gimple constant.
24402         * tree.c (variably_modified_type_p): Don't return true for
24403         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
24404         * gimplify.h (is_gimple_sizepos): Remove.
24406 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24408         PR tree-optimization/83857
24409         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
24410         vectorizable_live_operation for pure SLP statements.
24411         (vectorizable_live_operation): Handle PHIs.
24413 2018-01-16  Richard Biener  <rguenther@suse.de>
24415         PR tree-optimization/83867
24416         * tree-vect-stmts.c (vect_transform_stmt): Precompute
24417         nested_in_vect_loop_p since the scalar stmt may get invalidated.
24419 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24421         PR c/83844
24422         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
24423         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
24424         If off is not INTEGER_CST, issue a may not be aligned warning
24425         rather than isn't aligned.  Use isn%'t rather than isn't.
24426         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
24427         into MULT_EXPR.
24428         <case MULT_EXPR>: Improve the case when bottom and one of the
24429         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
24430         operand, in that case check if the other operand is multiple of
24431         bottom divided by the INTEGER_CST operand.
24433 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24435         PR target/83858
24436         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
24437         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
24438         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
24439         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
24440         * config/pa/pa.c (pa_function_arg_advance): Likewise.
24441         (pa_function_arg, pa_arg_partial_bytes): Likewise.
24442         (pa_function_arg_size): New function.
24444 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24446         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
24447         in a separate statement.
24449 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24451         PR tree-optimization/83847
24452         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
24453         group gathers and scatters.
24455 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24457         PR rtl-optimization/86620
24458         * params.def (max-sched-ready-insns): Bump minimum value to 1.
24460         PR rtl-optimization/83213
24461         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
24462         to last if both are JUMP_INSNs.
24464         PR tree-optimization/83843
24465         * gimple-ssa-store-merging.c
24466         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
24467         store_immediate_info for bswap/nop orig_stores.
24469 2018-01-15  Andrew Waterman  <andrew@sifive.com>
24471         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
24472         !TARGET_MUL.
24473         <UDIV>: Increase cost if !TARGET_DIV.
24475 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
24477         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
24478         (define_attr "cr_logical_3op"): New.
24479         (cceq_ior_compare): Adjust.
24480         (cceq_ior_compare_complement): Adjust.
24481         (*cceq_rev_compare): Adjust.
24482         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
24483         (is_cracked_insn): Adjust.
24484         (insn_must_be_first_in_group): Adjust.
24485         * config/rs6000/40x.md: Adjust.
24486         * config/rs6000/440.md: Adjust.
24487         * config/rs6000/476.md: Adjust.
24488         * config/rs6000/601.md: Adjust.
24489         * config/rs6000/603.md: Adjust.
24490         * config/rs6000/6xx.md: Adjust.
24491         * config/rs6000/7450.md: Adjust.
24492         * config/rs6000/7xx.md: Adjust.
24493         * config/rs6000/8540.md: Adjust.
24494         * config/rs6000/cell.md: Adjust.
24495         * config/rs6000/e300c2c3.md: Adjust.
24496         * config/rs6000/e500mc.md: Adjust.
24497         * config/rs6000/e500mc64.md: Adjust.
24498         * config/rs6000/e5500.md: Adjust.
24499         * config/rs6000/e6500.md: Adjust.
24500         * config/rs6000/mpc.md: Adjust.
24501         * config/rs6000/power4.md: Adjust.
24502         * config/rs6000/power5.md: Adjust.
24503         * config/rs6000/power6.md: Adjust.
24504         * config/rs6000/power7.md: Adjust.
24505         * config/rs6000/power8.md: Adjust.
24506         * config/rs6000/power9.md: Adjust.
24507         * config/rs6000/rs64.md: Adjust.
24508         * config/rs6000/titan.md: Adjust.
24510 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24512         * config/i386/predicates.md (indirect_branch_operand): Rewrite
24513         ix86_indirect_branch_register logic.
24515 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24517         * config/i386/constraints.md (Bs): Update
24518         ix86_indirect_branch_register check.  Don't check
24519         ix86_indirect_branch_register with GOT_memory_operand.
24520         (Bw): Likewise.
24521         * config/i386/predicates.md (GOT_memory_operand): Don't check
24522         ix86_indirect_branch_register here.
24523         (GOT32_symbol_operand): Likewise.
24525 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24527         * config/i386/predicates.md (constant_call_address_operand):
24528         Rewrite ix86_indirect_branch_register logic.
24529         (sibcall_insn_operand): Likewise.
24531 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24533         * config/i386/constraints.md (Bs): Replace
24534         ix86_indirect_branch_thunk_register with
24535         ix86_indirect_branch_register.
24536         (Bw): Likewise.
24537         * config/i386/i386.md (indirect_jump): Likewise.
24538         (tablejump): Likewise.
24539         (*sibcall_memory): Likewise.
24540         (*sibcall_value_memory): Likewise.
24541         Peepholes of indirect call and jump via memory: Likewise.
24542         * config/i386/i386.opt: Likewise.
24543         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24544         (GOT_memory_operand): Likewise.
24545         (call_insn_operand): Likewise.
24546         (sibcall_insn_operand): Likewise.
24547         (GOT32_symbol_operand): Likewise.
24549 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
24551         PR middle-end/83837
24552         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
24553         type rather than type addr's type points to.
24554         (expand_omp_atomic_mutex): Likewise.
24555         (expand_omp_atomic): Likewise.
24557 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24559         PR target/83839
24560         * config/i386/i386.c (output_indirect_thunk_function): Use
24561         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
24562         for  __x86_return_thunk.
24564 2018-01-15  Richard Biener  <rguenther@suse.de>
24566         PR middle-end/83850
24567         * expmed.c (extract_bit_field_1): Fix typo.
24569 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24571         PR target/83687
24572         * config/arm/iterators.md (VF): New mode iterator.
24573         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
24574         Remove integer-related logic from pattern.
24575         (neon_vabd<mode>_3): Likewise.
24577 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
24579         PR middle-end/82694
24580         * common.opt (fstrict-overflow): No longer an alias.
24581         (fwrapv-pointer): New option.
24582         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
24583         also for pointer types based on flag_wrapv_pointer.
24584         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
24585         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
24586         opts->x_flag_wrapv got set.
24587         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
24588         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
24589         POINTER_TYPE_OVERFLOW_UNDEFINED.
24590         * match.pd: Likewise in address comparison pattern.
24591         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
24593 2018-01-15  Richard Biener  <rguenther@suse.de>
24595         PR lto/83804
24596         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
24597         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
24598         Reset type names to their identifier if their TYPE_DECL doesn't
24599         have linkage (and thus is used for ODR and devirt).
24600         (save_debug_info_for_decl): Remove.
24601         (save_debug_info_for_type): Likewise.
24602         (add_tree_to_fld_list): Adjust.
24603         * tree-pretty-print.c (dump_generic_node): Make dumping of
24604         type names more robust.
24606 2018-01-15  Richard Biener  <rguenther@suse.de>
24608         * BASE-VER: Bump to 8.0.1.
24610 2018-01-14  Martin Sebor  <msebor@redhat.com>
24612         PR other/83508
24613         * builtins.c (check_access): Avoid warning when the no-warning bit
24614         is set.
24616 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
24618         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
24619         * ira-color (allocno_hard_regs_compare): Likewise.
24621 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
24623         PR target/83013
24624         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
24625         Use .pushsection/.popsection.
24627 2018-01-14  Martin Sebor  <msebor@redhat.com>
24629         PR c++/81327
24630         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
24632 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
24634         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
24635         entry from extra_headers.
24636         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
24637         extra_headers, make the list bitwise identical to the i?86-*-* one.
24639 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24641         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
24642         -mcmodel=large with -mindirect-branch=thunk,
24643         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
24644         -mfunction-return=thunk-extern.
24645         * doc/invoke.texi: Document -mcmodel=large is incompatible with
24646         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
24647         -mfunction-return=thunk and -mfunction-return=thunk-extern.
24649 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24651         * config/i386/i386.c (print_reg): Print the name of the full
24652         integer register without '%'.
24653         (ix86_print_operand): Handle 'V'.
24654         * doc/extend.texi: Document 'V' modifier.
24656 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24658         * config/i386/constraints.md (Bs): Disallow memory operand for
24659         -mindirect-branch-register.
24660         (Bw): Likewise.
24661         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24662         (GOT_memory_operand): Likewise.
24663         (call_insn_operand): Likewise.
24664         (sibcall_insn_operand): Likewise.
24665         (GOT32_symbol_operand): Likewise.
24666         * config/i386/i386.md (indirect_jump): Call convert_memory_address
24667         for -mindirect-branch-register.
24668         (tablejump): Likewise.
24669         (*sibcall_memory): Likewise.
24670         (*sibcall_value_memory): Likewise.
24671         Disallow peepholes of indirect call and jump via memory for
24672         -mindirect-branch-register.
24673         (*call_pop): Replace m with Bw.
24674         (*call_value_pop): Likewise.
24675         (*sibcall_pop_memory): Replace m with Bs.
24676         * config/i386/i386.opt (mindirect-branch-register): New option.
24677         * doc/invoke.texi: Document -mindirect-branch-register option.
24679 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24681         * config/i386/i386-protos.h (ix86_output_function_return): New.
24682         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
24683         set function_return_type.
24684         (indirect_thunk_name): Add ret_p to indicate thunk for function
24685         return.
24686         (output_indirect_thunk_function): Pass false to
24687         indirect_thunk_name.
24688         (ix86_output_indirect_branch_via_reg): Likewise.
24689         (ix86_output_indirect_branch_via_push): Likewise.
24690         (output_indirect_thunk_function): Create alias for function
24691         return thunk if regno < 0.
24692         (ix86_output_function_return): New function.
24693         (ix86_handle_fndecl_attribute): Handle function_return.
24694         (ix86_attribute_table): Add function_return.
24695         * config/i386/i386.h (machine_function): Add
24696         function_return_type.
24697         * config/i386/i386.md (simple_return_internal): Use
24698         ix86_output_function_return.
24699         (simple_return_internal_long): Likewise.
24700         * config/i386/i386.opt (mfunction-return=): New option.
24701         (indirect_branch): Mention -mfunction-return=.
24702         * doc/extend.texi: Document function_return function attribute.
24703         * doc/invoke.texi: Document -mfunction-return= option.
24705 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24707         * config/i386/i386-opts.h (indirect_branch): New.
24708         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
24709         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
24710         with local indirect jump when converting indirect call and jump.
24711         (ix86_set_indirect_branch_type): New.
24712         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
24713         (indirectlabelno): New.
24714         (indirect_thunk_needed): Likewise.
24715         (indirect_thunk_bnd_needed): Likewise.
24716         (indirect_thunks_used): Likewise.
24717         (indirect_thunks_bnd_used): Likewise.
24718         (INDIRECT_LABEL): Likewise.
24719         (indirect_thunk_name): Likewise.
24720         (output_indirect_thunk): Likewise.
24721         (output_indirect_thunk_function): Likewise.
24722         (ix86_output_indirect_branch_via_reg): Likewise.
24723         (ix86_output_indirect_branch_via_push): Likewise.
24724         (ix86_output_indirect_branch): Likewise.
24725         (ix86_output_indirect_jmp): Likewise.
24726         (ix86_code_end): Call output_indirect_thunk_function if needed.
24727         (ix86_output_call_insn): Call ix86_output_indirect_branch if
24728         needed.
24729         (ix86_handle_fndecl_attribute): Handle indirect_branch.
24730         (ix86_attribute_table): Add indirect_branch.
24731         * config/i386/i386.h (machine_function): Add indirect_branch_type
24732         and has_local_indirect_jump.
24733         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
24734         to true.
24735         (tablejump): Likewise.
24736         (*indirect_jump): Use ix86_output_indirect_jmp.
24737         (*tablejump_1): Likewise.
24738         (simple_return_indirect_internal): Likewise.
24739         * config/i386/i386.opt (mindirect-branch=): New option.
24740         (indirect_branch): New.
24741         (keep): Likewise.
24742         (thunk): Likewise.
24743         (thunk-inline): Likewise.
24744         (thunk-extern): Likewise.
24745         * doc/extend.texi: Document indirect_branch function attribute.
24746         * doc/invoke.texi: Document -mindirect-branch= option.
24748 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
24750         PR ipa/83051
24751         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
24753 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
24755         * ipa-inline.c (want_inline_small_function_p): Return false if
24756         inlining has already failed with CIF_FINAL_ERROR.
24757         (update_caller_keys): Call want_inline_small_function_p before
24758         can_inline_edge_p.
24759         (update_callee_keys): Likewise.
24761 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24763         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
24764         New function.
24765         (rs6000_quadword_masked_address_p): Likewise.
24766         (quad_aligned_load_p): Likewise.
24767         (quad_aligned_store_p): Likewise.
24768         (const_load_sequence_p): Add comment to describe the outer-most loop.
24769         (mimic_memory_attributes_and_flags): New function.
24770         (rs6000_gen_stvx): Likewise.
24771         (replace_swapped_aligned_store): Likewise.
24772         (rs6000_gen_lvx): Likewise.
24773         (replace_swapped_aligned_load): Likewise.
24774         (replace_swapped_load_constant): Capitalize argument name in
24775         comment describing this function.
24776         (rs6000_analyze_swaps): Add a third pass to search for vector loads
24777         and stores that access quad-word aligned addresses and replace
24778         with stvx or lvx instructions when appropriate.
24779         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
24780         New function prototype.
24781         (rs6000_quadword_masked_address_p): Likewise.
24782         (rs6000_gen_lvx): Likewise.
24783         (rs6000_gen_stvx): Likewise.
24784         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
24785         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
24786         when memory address is aligned.
24787         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
24788         this split to select lvx instruction when memory address is aligned.
24789         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
24790         instruction when memory address is aligned.
24791         (*vsx_le_perm_load_v16qi): Likewise.
24792         (four unnamed splitters): Modify to select the stvx instruction
24793         when memory is aligned.
24795 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
24797         * predict.c (determine_unlikely_bbs): Handle correctly BBs
24798         which appears in the queue multiple times.
24800 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24801             Alan Hayward  <alan.hayward@arm.com>
24802             David Sherwood  <david.sherwood@arm.com>
24804         * tree-vectorizer.h (vec_lower_bound): New structure.
24805         (_loop_vec_info): Add check_nonzero and lower_bounds.
24806         (LOOP_VINFO_CHECK_NONZERO): New macro.
24807         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
24808         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
24809         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
24810         fields.  Make seg_len the distance travelled, not including the
24811         access size.
24812         (dr_direction_indicator): Declare.
24813         (dr_zero_step_indicator): Likewise.
24814         (dr_known_forward_stride_p): Likewise.
24815         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
24816         tree-ssanames.h.
24817         (runtime_alias_check_p): Allow runtime alias checks with
24818         variable strides.
24819         (operator ==): Compare access_size and align.
24820         (prune_runtime_alias_test_list): Rework for new distinction between
24821         the access_size and seg_len.
24822         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
24823         segment lengths.
24824         (get_segment_min_max): New function.
24825         (create_intersect_range_checks): Use it.
24826         (dr_step_indicator): New function.
24827         (dr_direction_indicator): Likewise.
24828         (dr_zero_step_indicator): Likewise.
24829         (dr_known_forward_stride_p): Likewise.
24830         * tree-loop-distribution.c (data_ref_segment_size): Return
24831         DR_STEP * (niters - 1).
24832         (compute_alias_check_pairs): Update call to the dr_with_seg_len
24833         constructor.
24834         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24835         (vect_preserves_scalar_order_p): New function, split out from...
24836         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
24837         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24838         (vect_vfa_access_size): New function.
24839         (vect_vfa_align): Likewise.
24840         (vect_compile_time_alias): Take access_size_a and access_b arguments.
24841         (dump_lower_bound): New function.
24842         (vect_check_lower_bound): Likewise.
24843         (vect_small_gap_p): Likewise.
24844         (vectorizable_with_step_bound_p): Likewise.
24845         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24846         depencies if the vectorization factor is 1.  Convert the checks
24847         for nonzero steps into checks on the bounds of DR_STEP.  Try using
24848         a bunds check for variable steps if the minimum required step is
24849         relatively small. Update calls to the dr_with_seg_len
24850         constructor and to vect_compile_time_alias.
24851         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24852         function.
24853         (vect_loop_versioning): Call it.
24854         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24855         when retrying.
24856         (vect_estimate_min_profitable_iters): Account for any bounds checks.
24858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24859             Alan Hayward  <alan.hayward@arm.com>
24860             David Sherwood  <david.sherwood@arm.com>
24862         * doc/sourcebuild.texi (vect_scatter_store): Document.
24863         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24864         optabs.
24865         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24866         Document.
24867         * genopinit.c (main): Add supports_vec_scatter_store and
24868         supports_vec_scatter_store_cached to target_optabs.
24869         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24870         IFN_MASK_SCATTER_STORE.
24871         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24872         functions.
24873         * internal-fn.h (internal_store_fn_p): Declare.
24874         (internal_fn_stored_value_index): Likewise.
24875         * internal-fn.c (scatter_store_direct): New macro.
24876         (expand_scatter_store_optab_fn): New function.
24877         (direct_scatter_store_optab_supported_p): New macro.
24878         (internal_store_fn_p): New function.
24879         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24880         IFN_MASK_SCATTER_STORE.
24881         (internal_fn_mask_index): Likewise.
24882         (internal_fn_stored_value_index): New function.
24883         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24884         for scatter stores.
24885         * optabs-query.h (supports_vec_scatter_store_p): Declare.
24886         * optabs-query.c (supports_vec_scatter_store_p): New function.
24887         * tree-vectorizer.h (vect_get_store_rhs): Declare.
24888         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24889         true for scatter stores.
24890         (vect_gather_scatter_fn_p): Handle scatter stores too.
24891         (vect_check_gather_scatter): Consider using scatter stores if
24892         supports_vec_scatter_store_p.
24893         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24894         scatter stores too.
24895         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24896         internal_fn_stored_value_index.
24897         (check_load_store_masking): Handle scatter stores too.
24898         (vect_get_store_rhs): Make public.
24899         (vectorizable_call): Use internal_store_fn_p.
24900         (vectorizable_store): Handle scatter store internal functions.
24901         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24902         when deciding whether the end of the group has been reached.
24903         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24904         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24905         (mask_scatter_store<mode>): New insns.
24907 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24908             Alan Hayward  <alan.hayward@arm.com>
24909             David Sherwood  <david.sherwood@arm.com>
24911         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24912         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24913         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24914         function.
24915         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24916         Use vect_truncate_gather_scatter_offset if we can't treat the
24917         operation as a normal gather load or scatter store.
24918         (get_group_load_store_type): Take the gather_scatter_info
24919         as argument.  Try using a gather load or scatter store for
24920         single-element groups.
24921         (get_load_store_type): Update calls to get_group_load_store_type
24922         and vect_use_strided_gather_scatters_p.
24924 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24925             Alan Hayward  <alan.hayward@arm.com>
24926             David Sherwood  <david.sherwood@arm.com>
24928         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24929         optional tree argument.
24930         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24931         null target hooks.
24932         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24933         but continue to use the current value as a fallback.
24934         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24935         to compare the updates.
24936         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24937         (get_load_store_type): Use it when handling a strided access.
24938         (vect_get_strided_load_store_ops): New function.
24939         (vect_get_data_ptr_increment): Likewise.
24940         (vectorizable_load): Handle strided gather loads.  Always pass
24941         a step to vect_create_data_ref_ptr and bump_vector_ptr.
24943 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24944             Alan Hayward  <alan.hayward@arm.com>
24945             David Sherwood  <david.sherwood@arm.com>
24947         * doc/md.texi (gather_load@var{m}): Document.
24948         (mask_gather_load@var{m}): Likewise.
24949         * genopinit.c (main): Add supports_vec_gather_load and
24950         supports_vec_gather_load_cached to target_optabs.
24951         * optabs-tree.c (init_tree_optimization_optabs): Use
24952         ggc_cleared_alloc to allocate target_optabs.
24953         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24954         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24955         functions.
24956         * internal-fn.h (internal_load_fn_p): Declare.
24957         (internal_gather_scatter_fn_p): Likewise.
24958         (internal_fn_mask_index): Likewise.
24959         (internal_gather_scatter_fn_supported_p): Likewise.
24960         * internal-fn.c (gather_load_direct): New macro.
24961         (expand_gather_load_optab_fn): New function.
24962         (direct_gather_load_optab_supported_p): New macro.
24963         (direct_internal_fn_optab): New function.
24964         (internal_load_fn_p): Likewise.
24965         (internal_gather_scatter_fn_p): Likewise.
24966         (internal_fn_mask_index): Likewise.
24967         (internal_gather_scatter_fn_supported_p): Likewise.
24968         * optabs-query.c (supports_at_least_one_mode_p): New function.
24969         (supports_vec_gather_load_p): Likewise.
24970         * optabs-query.h (supports_vec_gather_load_p): Declare.
24971         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24972         and memory_type field.
24973         (NUM_PATTERNS): Bump to 15.
24974         * tree-vect-data-refs.c: Include internal-fn.h.
24975         (vect_gather_scatter_fn_p): New function.
24976         (vect_describe_gather_scatter_call): Likewise.
24977         (vect_check_gather_scatter): Try using internal functions for
24978         gather loads.  Recognize existing calls to a gather load function.
24979         (vect_analyze_data_refs): Consider using gather loads if
24980         supports_vec_gather_load_p.
24981         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24982         (vect_get_gather_scatter_offset_type): Likewise.
24983         (vect_convert_mask_for_vectype): Likewise.
24984         (vect_add_conversion_to_patterm): Likewise.
24985         (vect_try_gather_scatter_pattern): Likewise.
24986         (vect_recog_gather_scatter_pattern): New pattern recognizer.
24987         (vect_vect_recog_func_ptrs): Add it.
24988         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24989         internal_fn_mask_index and internal_gather_scatter_fn_p.
24990         (check_load_store_masking): Take the gather_scatter_info as an
24991         argument and handle gather loads.
24992         (vect_get_gather_scatter_ops): New function.
24993         (vectorizable_call): Check internal_load_fn_p.
24994         (vectorizable_load): Likewise.  Handle gather load internal
24995         functions.
24996         (vectorizable_store): Update call to check_load_store_masking.
24997         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24998         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24999         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25000         (aarch64_gather_scale_operand_d): New predicates.
25001         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25002         (mask_gather_load<mode>): New insns.
25004 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25005             Alan Hayward  <alan.hayward@arm.com>
25006             David Sherwood  <david.sherwood@arm.com>
25008         * optabs.def (fold_left_plus_optab): New optab.
25009         * doc/md.texi (fold_left_plus_@var{m}): Document.
25010         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25011         * internal-fn.c (fold_left_direct): Define.
25012         (expand_fold_left_optab_fn): Likewise.
25013         (direct_fold_left_optab_supported_p): Likewise.
25014         * fold-const-call.c (fold_const_fold_left): New function.
25015         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25016         * tree-parloops.c (valid_reduction_p): New function.
25017         (gather_scalar_reductions): Use it.
25018         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25019         (vect_finish_replace_stmt): Declare.
25020         * tree-vect-loop.c (fold_left_reduction_fn): New function.
25021         (needs_fold_left_reduction_p): New function, split out from...
25022         (vect_is_simple_reduction): ...here.  Accept reductions that
25023         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25024         (vect_force_simple_reduction): Also store the reduction type in
25025         the assignment's STMT_VINFO_REDUC_TYPE.
25026         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25027         (merge_with_identity): New function.
25028         (vect_expand_fold_left): Likewise.
25029         (vectorize_fold_left_reduction): Likewise.
25030         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
25031         scalar phi in place for it.  Check for target support and reject
25032         cases that would reassociate the operation.  Defer the transform
25033         phase to vectorize_fold_left_reduction.
25034         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25035         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25036         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25038 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25040         * tree-if-conv.c (predicate_mem_writes): Remove redundant
25041         call to ifc_temp_var.
25043 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25044             Alan Hayward  <alan.hayward@arm.com>
25045             David Sherwood  <david.sherwood@arm.com>
25047         * target.def (legitimize_address_displacement): Take the original
25048         offset as a poly_int.
25049         * targhooks.h (default_legitimize_address_displacement): Update
25050         accordingly.
25051         * targhooks.c (default_legitimize_address_displacement): Likewise.
25052         * doc/tm.texi: Regenerate.
25053         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25054         as an argument, moving assert of ad->disp == ad->disp_term to...
25055         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
25056         Try calling targetm.legitimize_address_displacement before expanding
25057         the address rather than afterwards, and adjust for the new interface.
25058         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25059         Match the new hook interface.  Handle SVE addresses.
25060         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25061         new hook interface.
25063 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25065         * Makefile.in (OBJS): Add early-remat.o.
25066         * target.def (select_early_remat_modes): New hook.
25067         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25068         * doc/tm.texi: Regenerate.
25069         * targhooks.h (default_select_early_remat_modes): Declare.
25070         * targhooks.c (default_select_early_remat_modes): New function.
25071         * timevar.def (TV_EARLY_REMAT): New timevar.
25072         * passes.def (pass_early_remat): New pass.
25073         * tree-pass.h (make_pass_early_remat): Declare.
25074         * early-remat.c: New file.
25075         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25076         function.
25077         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25079 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25080             Alan Hayward  <alan.hayward@arm.com>
25081             David Sherwood  <david.sherwood@arm.com>
25083         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25084         vfm1 with a bound_epilog parameter.
25085         (vect_do_peeling): Update calls accordingly, and move the prologue
25086         call earlier in the function.  Treat the base bound_epilog as 0 for
25087         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
25088         this base when peeling for gaps.
25089         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25090         with fully-masked loops.
25091         (vect_estimate_min_profitable_iters): Handle the single peeled
25092         iteration in that case.
25094 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25095             Alan Hayward  <alan.hayward@arm.com>
25096             David Sherwood  <david.sherwood@arm.com>
25098         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25099         single-element interleaving even if the size is not a power of 2.
25100         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25101         accesses for single-element interleaving if the group size is
25102         not a power of 2.
25104 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25105             Alan Hayward  <alan.hayward@arm.com>
25106             David Sherwood  <david.sherwood@arm.com>
25108         * doc/md.texi (fold_extract_last_@var{m}): Document.
25109         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25110         * optabs.def (fold_extract_last_optab): New optab.
25111         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25112         * internal-fn.c (fold_extract_direct): New macro.
25113         (expand_fold_extract_optab_fn): Likewise.
25114         (direct_fold_extract_optab_supported_p): Likewise.
25115         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25116         * tree-vect-loop.c (vect_model_reduction_cost): Handle
25117         EXTRACT_LAST_REDUCTION.
25118         (get_initial_def_for_reduction): Do not create an initial vector
25119         for EXTRACT_LAST_REDUCTION reductions.
25120         (vectorizable_reduction): Leave the scalar phi in place for
25121         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
25122         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
25123         epilogue code for EXTRACT_LAST_REDUCTION and defer the
25124         transform phase to vectorizable_condition.
25125         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25126         split out from...
25127         (vect_finish_stmt_generation): ...here.
25128         (vect_finish_replace_stmt): New function.
25129         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25130         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25131         pattern.
25132         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25134 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25135             Alan Hayward  <alan.hayward@arm.com>
25136             David Sherwood  <david.sherwood@arm.com>
25138         * doc/md.texi (extract_last_@var{m}): Document.
25139         * optabs.def (extract_last_optab): New optab.
25140         * internal-fn.def (EXTRACT_LAST): New internal function.
25141         * internal-fn.c (cond_unary_direct): New macro.
25142         (expand_cond_unary_optab_fn): Likewise.
25143         (direct_cond_unary_optab_supported_p): Likewise.
25144         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25145         loops using EXTRACT_LAST.
25146         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25147         (extract_last_<mode>): ...this optab.
25148         (vec_extract<mode><Vel>): Update accordingly.
25150 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25151             Alan Hayward  <alan.hayward@arm.com>
25152             David Sherwood  <david.sherwood@arm.com>
25154         * target.def (empty_mask_is_expensive): New hook.
25155         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25156         * doc/tm.texi: Regenerate.
25157         * targhooks.h (default_empty_mask_is_expensive): Declare.
25158         * targhooks.c (default_empty_mask_is_expensive): New function.
25159         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25160         if the target says that empty masks are expensive.
25161         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25162         New function.
25163         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25165 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25166             Alan Hayward  <alan.hayward@arm.com>
25167             David Sherwood  <david.sherwood@arm.com>
25169         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25170         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25171         (vect_use_loop_mask_for_alignment_p): New function.
25172         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25173         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25174         niters_skip argument.  Make sure that the first niters_skip elements
25175         of the first iteration are inactive.
25176         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25177         Update call to vect_set_loop_masks_directly.
25178         (get_misalign_in_elems): New function, split out from...
25179         (vect_gen_prolog_loop_niters): ...here.
25180         (vect_update_init_of_dr): Take a code argument that specifies whether
25181         the adjustment should be added or subtracted.
25182         (vect_update_init_of_drs): Likewise.
25183         (vect_prepare_for_masked_peels): New function.
25184         (vect_do_peeling): Skip prologue peeling if we're using a mask
25185         instead.  Update call to vect_update_inits_of_drs.
25186         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25187         mask_skip_niters.
25188         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25189         alignment.  Do not include the number of peeled iterations in
25190         the minimum threshold in that case.
25191         (vectorizable_induction): Adjust the start value down by
25192         LOOP_VINFO_MASK_SKIP_NITERS iterations.
25193         (vect_transform_loop): Call vect_prepare_for_masked_peels.
25194         Take the number of skipped iterations into account when calculating
25195         the loop bounds.
25196         * tree-vect-stmts.c (vect_gen_while_not): New function.
25198 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25199             Alan Hayward  <alan.hayward@arm.com>
25200             David Sherwood  <david.sherwood@arm.com>
25202         * doc/sourcebuild.texi (vect_fully_masked): Document.
25203         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25204         default value to 0.
25205         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25206         split out from...
25207         (vect_analyze_loop_2): ...here. Don't check the vectorization
25208         factor against the number of loop iterations if the loop is
25209         fully-masked.
25211 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25212             Alan Hayward  <alan.hayward@arm.com>
25213             David Sherwood  <david.sherwood@arm.com>
25215         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25216         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25217         (dump_groups): Update accordingly.
25218         (iv_use::mem_type): New member variable.
25219         (address_p): New function.
25220         (record_use): Add a mem_type argument and initialize the new
25221         mem_type field.
25222         (record_group_use): Add a mem_type argument.  Use address_p.
25223         Remove obsolete null checks of base_object.  Update call to record_use.
25224         (find_interesting_uses_op): Update call to record_group_use.
25225         (find_interesting_uses_cond): Likewise.
25226         (find_interesting_uses_address): Likewise.
25227         (get_mem_type_for_internal_fn): New function.
25228         (find_address_like_use): Likewise.
25229         (find_interesting_uses_stmt): Try find_address_like_use before
25230         calling find_interesting_uses_op.
25231         (addr_offset_valid_p): Use the iv mem_type field as the type
25232         of the addressed memory.
25233         (add_autoinc_candidates): Likewise.
25234         (get_address_cost): Likewise.
25235         (split_small_address_groups_p): Use address_p.
25236         (split_address_groups): Likewise.
25237         (add_iv_candidate_for_use): Likewise.
25238         (autoinc_possible_for_pair): Likewise.
25239         (rewrite_groups): Likewise.
25240         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25241         (determine_group_iv_cost): Update after split of USE_ADDRESS.
25242         (get_alias_ptr_type_for_ptr_address): New function.
25243         (rewrite_use_address): Rewrite address uses in calls that were
25244         identified by find_address_like_use.
25246 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25247             Alan Hayward  <alan.hayward@arm.com>
25248             David Sherwood  <david.sherwood@arm.com>
25250         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25251         TARGET_MEM_REFs.
25252         * gimple-expr.h (is_gimple_addressable: Likewise.
25253         * gimple-expr.c (is_gimple_address): Likewise.
25254         * internal-fn.c (expand_call_mem_ref): New function.
25255         (expand_mask_load_optab_fn): Use it.
25256         (expand_mask_store_optab_fn): Likewise.
25258 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25259             Alan Hayward  <alan.hayward@arm.com>
25260             David Sherwood  <david.sherwood@arm.com>
25262         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25263         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25264         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25265         (cond_umax@var{mode}): Document.
25266         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25267         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25268         (cond_umin_optab, cond_umax_optab): New optabs.
25269         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25270         (COND_IOR, COND_XOR): New internal functions.
25271         * internal-fn.h (get_conditional_internal_fn): Declare.
25272         * internal-fn.c (cond_binary_direct): New macro.
25273         (expand_cond_binary_optab_fn): Likewise.
25274         (direct_cond_binary_optab_supported_p): Likewise.
25275         (get_conditional_internal_fn): New function.
25276         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25277         Cope with reduction statements that are vectorized as calls rather
25278         than assignments.
25279         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25280         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25281         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25282         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25283         (UNSPEC_COND_EOR): New unspecs.
25284         (optab): Add mappings for them.
25285         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25286         (sve_int_op, sve_fp_op): New int attributes.
25288 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25289             Alan Hayward  <alan.hayward@arm.com>
25290             David Sherwood  <david.sherwood@arm.com>
25292         * optabs.def (while_ult_optab): New optab.
25293         * doc/md.texi (while_ult@var{m}@var{n}): Document.
25294         * internal-fn.def (WHILE_ULT): New internal function.
25295         * internal-fn.h (direct_internal_fn_supported_p): New override
25296         that takes two types as argument.
25297         * internal-fn.c (while_direct): New macro.
25298         (expand_while_optab_fn): New function.
25299         (convert_optab_supported_p): Likewise.
25300         (direct_while_optab_supported_p): New macro.
25301         * wide-int.h (wi::udiv_ceil): New function.
25302         * tree-vectorizer.h (rgroup_masks): New structure.
25303         (vec_loop_masks): New typedef.
25304         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25305         and fully_masked_p.
25306         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25307         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25308         (vect_max_vf): New function.
25309         (slpeel_make_loop_iterate_ntimes): Delete.
25310         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25311         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25312         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25313         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25314         internal-fn.h, stor-layout.h and optabs-query.h.
25315         (vect_set_loop_mask): New function.
25316         (add_preheader_seq): Likewise.
25317         (add_header_seq): Likewise.
25318         (interleave_supported_p): Likewise.
25319         (vect_maybe_permute_loop_masks): Likewise.
25320         (vect_set_loop_masks_directly): Likewise.
25321         (vect_set_loop_condition_masked): Likewise.
25322         (vect_set_loop_condition_unmasked): New function, split out from
25323         slpeel_make_loop_iterate_ntimes.
25324         (slpeel_make_loop_iterate_ntimes): Rename to..
25325         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
25326         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25327         (vect_do_peeling): Update call accordingly.
25328         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25329         loops.
25330         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25331         mask_compare_type, can_fully_mask_p and fully_masked_p.
25332         (release_vec_loop_masks): New function.
25333         (_loop_vec_info): Use it to free the loop masks.
25334         (can_produce_all_loop_masks_p): New function.
25335         (vect_get_max_nscalars_per_iter): Likewise.
25336         (vect_verify_full_masking): Likewise.
25337         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25338         retries, and free the mask rgroups before retrying.  Check loop-wide
25339         reasons for disallowing fully-masked loops.  Make the final decision
25340         about whether use a fully-masked loop or not.
25341         (vect_estimate_min_profitable_iters): Do not assume that peeling
25342         for the number of iterations will be needed for fully-masked loops.
25343         (vectorizable_reduction): Disable fully-masked loops.
25344         (vectorizable_live_operation): Likewise.
25345         (vect_halve_mask_nunits): New function.
25346         (vect_double_mask_nunits): Likewise.
25347         (vect_record_loop_mask): Likewise.
25348         (vect_get_loop_mask): Likewise.
25349         (vect_transform_loop): Handle the case in which the final loop
25350         iteration might handle a partial vector.  Call vect_set_loop_condition
25351         instead of slpeel_make_loop_iterate_ntimes.
25352         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25353         (check_load_store_masking): New function.
25354         (prepare_load_store_mask): Likewise.
25355         (vectorizable_store): Handle fully-masked loops.
25356         (vectorizable_load): Likewise.
25357         (supportable_widening_operation): Use vect_halve_mask_nunits for
25358         booleans.
25359         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25360         (vect_gen_while): New function.
25361         * config/aarch64/aarch64.md (umax<mode>3): New expander.
25362         (aarch64_uqdec<mode>): New insn.
25364 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25365             Alan Hayward  <alan.hayward@arm.com>
25366             David Sherwood  <david.sherwood@arm.com>
25368         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25369         (reduc_xor_scal_optab): New optabs.
25370         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25371         (reduc_xor_scal_@var{m}): Document.
25372         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25373         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25374         internal functions.
25375         * fold-const-call.c (fold_const_call): Handle them.
25376         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25377         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25378         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25379         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25380         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25381         (UNSPEC_XORV): New unspecs.
25382         (optab): Add entries for them.
25383         (BITWISEV): New int iterator.
25384         (bit_reduc_op): New int attributes.
25386 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25387             Alan Hayward  <alan.hayward@arm.com>
25388             David Sherwood  <david.sherwood@arm.com>
25390         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
25391         * internal-fn.def (VEC_SHL_INSERT): New internal function.
25392         * optabs.def (vec_shl_insert_optab): New optab.
25393         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
25394         (duplicate_and_interleave): Likewise.
25395         * tree-vect-loop.c: Include internal-fn.h.
25396         (neutral_op_for_slp_reduction): New function, split out from
25397         get_initial_defs_for_reduction.
25398         (get_initial_def_for_reduction): Handle option 2 for variable-length
25399         vectors by loading the neutral value into a vector and then shifting
25400         the initial value into element 0.
25401         (get_initial_defs_for_reduction): Replace the code argument with
25402         the neutral value calculated by neutral_op_for_slp_reduction.
25403         Use gimple_build_vector for constant-length vectors.
25404         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
25405         but the first group_size elements have a neutral value.
25406         Use duplicate_and_interleave otherwise.
25407         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
25408         Update call to get_initial_defs_for_reduction.  Handle SLP
25409         reductions for variable-length vectors by creating one vector
25410         result for each scalar result, with the elements associated
25411         with other scalar results stubbed out with the neutral value.
25412         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
25413         Require IFN_VEC_SHL_INSERT for double reductions on
25414         variable-length vectors, or SLP reductions that have
25415         a neutral value.  Require can_duplicate_and_interleave_p
25416         support for variable-length unchained SLP reductions if there
25417         is no neutral value, such as for MIN/MAX reductions.  Also require
25418         the number of vector elements to be a multiple of the number of
25419         SLP statements when doing variable-length unchained SLP reductions.
25420         Update call to vect_create_epilog_for_reduction.
25421         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
25422         and remove initial values.
25423         (duplicate_and_interleave): Make public.
25424         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
25425         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
25427 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25428             Alan Hayward  <alan.hayward@arm.com>
25429             David Sherwood  <david.sherwood@arm.com>
25431         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
25432         (can_duplicate_and_interleave_p): New function.
25433         (vect_get_and_check_slp_defs): Take the vector of statements
25434         rather than just the current one.  Remove excess parentheses.
25435         Restriction rejectinon of vect_constant_def and vect_external_def
25436         for variable-length vectors to boolean types, or types for which
25437         can_duplicate_and_interleave_p is false.
25438         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
25439         (duplicate_and_interleave): New function.
25440         (vect_get_constant_vectors): Use gimple_build_vector for
25441         constant-length vectors and suitable variable-length constant
25442         vectors.  Use duplicate_and_interleave for other variable-length
25443         vectors.  Don't defer the update when inserting new statements.
25445 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25446             Alan Hayward  <alan.hayward@arm.com>
25447             David Sherwood  <david.sherwood@arm.com>
25449         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
25450         min_profitable_iters doesn't go negative.
25452 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25453             Alan Hayward  <alan.hayward@arm.com>
25454             David Sherwood  <david.sherwood@arm.com>
25456         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
25457         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
25458         * optabs.def (vec_mask_load_lanes_optab): New optab.
25459         (vec_mask_store_lanes_optab): Likewise.
25460         * internal-fn.def (MASK_LOAD_LANES): New internal function.
25461         (MASK_STORE_LANES): Likewise.
25462         * internal-fn.c (mask_load_lanes_direct): New macro.
25463         (mask_store_lanes_direct): Likewise.
25464         (expand_mask_load_optab_fn): Handle masked operations.
25465         (expand_mask_load_lanes_optab_fn): New macro.
25466         (expand_mask_store_optab_fn): Handle masked operations.
25467         (expand_mask_store_lanes_optab_fn): New macro.
25468         (direct_mask_load_lanes_optab_supported_p): Likewise.
25469         (direct_mask_store_lanes_optab_supported_p): Likewise.
25470         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
25471         parameter.
25472         (vect_load_lanes_supported): Likewise.
25473         * tree-vect-data-refs.c (strip_conversion): New function.
25474         (can_group_stmts_p): Likewise.
25475         (vect_analyze_data_ref_accesses): Use it instead of checking
25476         for a pair of assignments.
25477         (vect_store_lanes_supported): Take a masked_p parameter.
25478         (vect_load_lanes_supported): Likewise.
25479         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
25480         vect_store_lanes_supported and vect_load_lanes_supported.
25481         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
25482         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
25483         parameter.  Don't allow gaps for masked accesses.
25484         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
25485         and vect_load_lanes_supported.
25486         (get_load_store_type): Take a masked_p parameter and update
25487         call to get_group_load_store_type.
25488         (vectorizable_store): Update call to get_load_store_type.
25489         Handle IFN_MASK_STORE_LANES.
25490         (vectorizable_load): Update call to get_load_store_type.
25491         Handle IFN_MASK_LOAD_LANES.
25493 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25494             Alan Hayward  <alan.hayward@arm.com>
25495             David Sherwood  <david.sherwood@arm.com>
25497         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
25498         modes for SVE.
25499         * config/aarch64/aarch64-protos.h
25500         (aarch64_sve_struct_memory_operand_p): Declare.
25501         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
25502         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
25503         (VPRED, vpred): Handle SVE structure modes.
25504         * config/aarch64/constraints.md (Utx): New constraint.
25505         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
25506         (aarch64_sve_struct_nonimmediate_operand): New predicates.
25507         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
25508         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
25509         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
25510         structure modes.  Split into pieces after RA.
25511         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
25512         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
25513         New patterns.
25514         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
25515         SVE structure modes.
25516         (aarch64_classify_address): Likewise.
25517         (sizetochar): Move earlier in file.
25518         (aarch64_print_operand): Handle SVE register lists.
25519         (aarch64_array_mode): New function.
25520         (aarch64_sve_struct_memory_operand_p): Likewise.
25521         (TARGET_ARRAY_MODE): Redefine.
25523 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25524             Alan Hayward  <alan.hayward@arm.com>
25525             David Sherwood  <david.sherwood@arm.com>
25527         * target.def (array_mode): New target hook.
25528         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
25529         * doc/tm.texi: Regenerate.
25530         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
25531         * hooks.c (hook_optmode_mode_uhwi_none): New function.
25532         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
25533         targetm.array_mode.
25534         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
25535         type sizes.
25537 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25538             Alan Hayward  <alan.hayward@arm.com>
25539             David Sherwood  <david.sherwood@arm.com>
25541         * fold-const.c (fold_binary_loc): Check the argument types
25542         rather than the result type when testing for a vector operation.
25544 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25546         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
25547         * doc/tm.texi: Regenerate.
25549 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25550             Alan Hayward  <alan.hayward@arm.com>
25551             David Sherwood  <david.sherwood@arm.com>
25553         * doc/invoke.texi (-msve-vector-bits=): Document new option.
25554         (sve): Document new AArch64 extension.
25555         * doc/md.texi (w): Extend the description of the AArch64
25556         constraint to include SVE vectors.
25557         (Upl, Upa): Document new AArch64 predicate constraints.
25558         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
25559         enum.
25560         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
25561         (msve-vector-bits=): New option.
25562         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
25563         SVE when these are disabled.
25564         (sve): New extension.
25565         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
25566         modes.  Adjust their number of units based on aarch64_sve_vg.
25567         (MAX_BITSIZE_MODE_ANY_MODE): Define.
25568         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
25569         aarch64_addr_query_type.
25570         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
25571         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
25572         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
25573         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
25574         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
25575         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
25576         (aarch64_simd_imm_zero_p): Delete.
25577         (aarch64_check_zero_based_sve_index_immediate): Declare.
25578         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25579         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25580         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25581         (aarch64_sve_float_mul_immediate_p): Likewise.
25582         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25583         rather than an rtx.
25584         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
25585         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
25586         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
25587         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
25588         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
25589         (aarch64_regmode_natural_size): Likewise.
25590         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
25591         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
25592         left one place.
25593         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
25594         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
25595         for VG and the SVE predicate registers.
25596         (V_ALIASES): Add a "z"-prefixed alias.
25597         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
25598         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
25599         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
25600         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
25601         (REG_CLASS_NAMES): Add entries for them.
25602         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
25603         and the predicate registers.
25604         (aarch64_sve_vg): Declare.
25605         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
25606         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
25607         (REGMODE_NATURAL_SIZE): Define.
25608         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
25609         SVE macros.
25610         * config/aarch64/aarch64.c: Include cfgrtl.h.
25611         (simd_immediate_info): Add a constructor for series vectors,
25612         and an associated step field.
25613         (aarch64_sve_vg): New variable.
25614         (aarch64_dbx_register_number): Handle VG and the predicate registers.
25615         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
25616         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
25617         (VEC_ANY_DATA, VEC_STRUCT): New constants.
25618         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
25619         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
25620         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
25621         (aarch64_get_mask_mode): New functions.
25622         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
25623         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
25624         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
25625         predicate modes and predicate registers.  Explicitly restrict
25626         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
25627         to store a vector mode if it is recognized by
25628         aarch64_classify_vector_mode.
25629         (aarch64_regmode_natural_size): New function.
25630         (aarch64_hard_regno_caller_save_mode): Return the original mode
25631         for predicates.
25632         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
25633         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
25634         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
25635         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
25636         functions.
25637         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
25638         does not overlap dest if the function is frame-related.  Handle
25639         SVE constants.
25640         (aarch64_split_add_offset): New function.
25641         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
25642         them aarch64_add_offset.
25643         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
25644         and update call to aarch64_sub_sp.
25645         (aarch64_add_cfa_expression): New function.
25646         (aarch64_expand_prologue): Pass extra temporary registers to the
25647         functions above.  Handle the case in which we need to emit new
25648         DW_CFA_expressions for registers that were originally saved
25649         relative to the stack pointer, but now have to be expressed
25650         relative to the frame pointer.
25651         (aarch64_output_mi_thunk): Pass extra temporary registers to the
25652         functions above.
25653         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
25654         IP0 and IP1 values for SVE frames.
25655         (aarch64_expand_vec_series): New function.
25656         (aarch64_expand_sve_widened_duplicate): Likewise.
25657         (aarch64_expand_sve_const_vector): Likewise.
25658         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
25659         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
25660         into the register, rather than emitting a SET directly.
25661         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
25662         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
25663         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
25664         (offset_9bit_signed_scaled_p): New functions.
25665         (aarch64_replicate_bitmask_imm): New function.
25666         (aarch64_bitmask_imm): Use it.
25667         (aarch64_cannot_force_const_mem): Reject expressions involving
25668         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
25669         (aarch64_classify_index): Handle SVE indices, by requiring
25670         a plain register index with a scale that matches the element size.
25671         (aarch64_classify_address): Handle SVE addresses.  Assert that
25672         the mode of the address is VOIDmode or an integer mode.
25673         Update call to aarch64_classify_symbol.
25674         (aarch64_classify_symbolic_expression): Update call to
25675         aarch64_classify_symbol.
25676         (aarch64_const_vec_all_in_range_p): New function.
25677         (aarch64_print_vector_float_operand): Likewise.
25678         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
25679         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
25680         and the FP immediates 1.0 and 0.5.
25681         (aarch64_print_address_internal): Handle SVE addresses.
25682         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
25683         (aarch64_regno_regclass): Handle predicate registers.
25684         (aarch64_secondary_reload): Handle big-endian reloads of SVE
25685         data modes.
25686         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
25687         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
25688         (aarch64_convert_sve_vector_bits): New function.
25689         (aarch64_override_options): Use it to handle -msve-vector-bits=.
25690         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25691         rather than an rtx.
25692         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
25693         Handle SVE vector and predicate modes.  Accept VL-based constants
25694         that need only one temporary register, and VL offsets that require
25695         no temporary registers.
25696         (aarch64_conditional_register_usage): Mark the predicate registers
25697         as fixed if SVE isn't available.
25698         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
25699         Return true for SVE vector and predicate modes.
25700         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
25701         rather than an unsigned int.  Handle SVE modes.
25702         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
25703         SVE modes.
25704         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
25705         if SVE is enabled.
25706         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25707         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25708         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25709         (aarch64_sve_float_mul_immediate_p): New functions.
25710         (aarch64_sve_valid_immediate): New function.
25711         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
25712         Explicitly reject structure modes.  Check for INDEX constants.
25713         Handle PTRUE and PFALSE constants.
25714         (aarch64_check_zero_based_sve_index_immediate): New function.
25715         (aarch64_simd_imm_zero_p): Delete.
25716         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
25717         vector modes.  Accept constants in the range of CNT[BHWD].
25718         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
25719         ask for an Advanced SIMD mode.
25720         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
25721         (aarch64_simd_vector_alignment): Handle SVE predicates.
25722         (aarch64_vectorize_preferred_vector_alignment): New function.
25723         (aarch64_simd_vector_alignment_reachable): Use it instead of
25724         the vector size.
25725         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
25726         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
25727         functions.
25728         (MAX_VECT_LEN): Delete.
25729         (expand_vec_perm_d): Add a vec_flags field.
25730         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
25731         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
25732         (aarch64_evpc_ext): Don't apply a big-endian lane correction
25733         for SVE modes.
25734         (aarch64_evpc_rev): Rename to...
25735         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
25736         (aarch64_evpc_rev_global): New function.
25737         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
25738         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
25739         MAX_VECT_LEN.
25740         (aarch64_evpc_sve_tbl): New function.
25741         (aarch64_expand_vec_perm_const_1): Update after rename of
25742         aarch64_evpc_rev.  Handle SVE permutes too, trying
25743         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
25744         than aarch64_evpc_tbl.
25745         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
25746         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
25747         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
25748         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
25749         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
25750         (aarch64_expand_sve_vcond): New functions.
25751         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
25752         of aarch64_vector_mode_p.
25753         (aarch64_dwarf_poly_indeterminate_value): New function.
25754         (aarch64_compute_pressure_classes): Likewise.
25755         (aarch64_can_change_mode_class): Likewise.
25756         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
25757         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
25758         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
25759         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
25760         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
25761         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
25762         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
25763         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
25764         constraints.
25765         (Dn, Dl, Dr): Accept const as well as const_vector.
25766         (Dz): Likewise.  Compare against CONST0_RTX.
25767         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
25768         of "vector" where appropriate.
25769         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
25770         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
25771         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
25772         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
25773         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
25774         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
25775         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
25776         (v_int_equiv): Extend to SVE modes.
25777         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
25778         mode attributes.
25779         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
25780         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
25781         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
25782         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
25783         (SVE_COND_FP_CMP): New int iterators.
25784         (perm_hilo): Handle the new unpack unspecs.
25785         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
25786         attributes.
25787         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
25788         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
25789         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
25790         (aarch64_equality_operator, aarch64_constant_vector_operand)
25791         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
25792         (aarch64_sve_nonimmediate_operand): Likewise.
25793         (aarch64_sve_general_operand): Likewise.
25794         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
25795         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
25796         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
25797         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
25798         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
25799         (aarch64_sve_float_arith_immediate): Likewise.
25800         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
25801         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
25802         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
25803         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
25804         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
25805         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
25806         (aarch64_sve_float_arith_operand): Likewise.
25807         (aarch64_sve_float_arith_with_sub_operand): Likewise.
25808         (aarch64_sve_float_mul_operand): Likewise.
25809         (aarch64_sve_vec_perm_operand): Likewise.
25810         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
25811         (aarch64_mov_operand): Accept const_poly_int and const_vector.
25812         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
25813         as well as const_vector.
25814         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
25815         in file.  Use CONST0_RTX and CONSTM1_RTX.
25816         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
25817         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
25818         Use aarch64_simd_imm_zero.
25819         * config/aarch64/aarch64-sve.md: New file.
25820         * config/aarch64/aarch64.md: Include it.
25821         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
25822         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
25823         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
25824         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
25825         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
25826         (sve): New attribute.
25827         (enabled): Disable instructions with the sve attribute unless
25828         TARGET_SVE.
25829         (movqi, movhi): Pass CONST_POLY_INT operaneds through
25830         aarch64_expand_mov_immediate.
25831         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25832         CNT[BHSD] immediates.
25833         (movti): Split CONST_POLY_INT moves into two halves.
25834         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25835         Split additions that need a temporary here if the destination
25836         is the stack pointer.
25837         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25838         (*add<mode>3_poly_1): New instruction.
25839         (set_clobber_cc): New expander.
25841 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25843         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25844         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
25845         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25846         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25847         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
25848         Change innermode from fixed_mode_size to machine_mode.
25849         (simplify_subreg): Update call accordingly.  Handle a constant-sized
25850         subreg of a variable-length CONST_VECTOR.
25852 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25853             Alan Hayward  <alan.hayward@arm.com>
25854             David Sherwood  <david.sherwood@arm.com>
25856         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25857         (add_offset_to_base): New function, split out from...
25858         (create_mem_ref): ...here.  When handling a scale other than 1,
25859         check first whether the address is valid without the offset.
25860         Add it into the base if so, leaving the index and scale as-is.
25862 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25864         PR c++/83778
25865         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25866         fold_for_warn before checking if arg2 is INTEGER_CST.
25868 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
25870         * config/rs6000/predicates.md (load_multiple_operation): Delete.
25871         (store_multiple_operation): Delete.
25872         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25873         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25874         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25875         guarded by TARGET_STRING.
25876         (rs6000_output_load_multiple): Delete.
25877         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25878         OPTION_MASK_STRING / TARGET_STRING handling.
25879         (print_operand) <'N', 'O'>: Add comment that these are unused now.
25880         (const rs6000_opt_masks) <"string">: Change mask to 0.
25881         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25882         (MASK_STRING): Delete.
25883         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25884         parts.  Simplify.
25885         (load_multiple): Delete.
25886         (*ldmsi8): Delete.
25887         (*ldmsi7): Delete.
25888         (*ldmsi6): Delete.
25889         (*ldmsi5): Delete.
25890         (*ldmsi4): Delete.
25891         (*ldmsi3): Delete.
25892         (store_multiple): Delete.
25893         (*stmsi8): Delete.
25894         (*stmsi7): Delete.
25895         (*stmsi6): Delete.
25896         (*stmsi5): Delete.
25897         (*stmsi4): Delete.
25898         (*stmsi3): Delete.
25899         (movmemsi_8reg): Delete.
25900         (corresponding unnamed define_insn): Delete.
25901         (movmemsi_6reg): Delete.
25902         (corresponding unnamed define_insn): Delete.
25903         (movmemsi_4reg): Delete.
25904         (corresponding unnamed define_insn): Delete.
25905         (movmemsi_2reg): Delete.
25906         (corresponding unnamed define_insn): Delete.
25907         (movmemsi_1reg): Delete.
25908         (corresponding unnamed define_insn): Delete.
25909         * config/rs6000/rs6000.opt (mno-string): New.
25910         (mstring): Replace by deprecation warning stub.
25911         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25913 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25915         * regrename.c (regrename_do_replace): If replacing the same
25916         reg multiple times, try to reuse last created gen_raw_REG.
25918         PR debug/81155
25919         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25920         main to workaround a bug in GDB.
25922 2018-01-12  Tom de Vries  <tom@codesourcery.com>
25924         PR target/83737
25925         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25927 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
25929         PR rtl-optimization/80481
25930         * ira-color.c (get_cap_member): New function.
25931         (allocnos_conflict_by_live_ranges_p): Use it.
25932         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25933         (setup_slot_coalesced_allocno_live_ranges): Ditto.
25935 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
25937         PR target/83628
25938         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25939         (*saddl_se_1): Ditto.
25940         (*ssubsi_1): Ditto.
25941         (*ssubl_se_1): Ditto.
25943 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25945         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25946         rather than wi::to_widest for DR_INITs.
25947         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25948         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25949         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25950         INTEGER_CSTs.
25951         (vect_analyze_group_access_1): Note that here.
25953 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25955         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25956         polynomial type sizes.
25958 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25960         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25961         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25962         (gimple_add_tmp_var): Likewise.
25964 2018-01-12  Martin Liska  <mliska@suse.cz>
25966         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25967         (gimple_alloc_sizes): Likewise.
25968         (dump_gimple_statistics): Use PRIu64 in printf format.
25969         * gimple.h: Change uint64_t to int.
25971 2018-01-12  Martin Liska  <mliska@suse.cz>
25973         * tree-core.h: Use uint64_t instead of int.
25974         * tree.c (tree_node_counts): Likewise.
25975         (tree_node_sizes): Likewise.
25976         (dump_tree_statistics): Use PRIu64 in printf format.
25978 2018-01-12  Martin Liska  <mliska@suse.cz>
25980         * Makefile.in: As qsort_chk is implemented in vec.c, add
25981         vec.o to linkage of gencfn-macros.
25982         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25983         passing the info to record_node_allocation_statistics.
25984         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25985         and pass the info.
25986         * ggc-common.c (struct ggc_usage): Add operator== and use
25987         it in operator< and compare function.
25988         * mem-stats.h (struct mem_usage): Likewise.
25989         * vec.c (struct vec_usage): Remove operator< and compare
25990         function. Can be simply inherited.
25992 2018-01-12  Martin Jambor  <mjambor@suse.cz>
25994         PR target/81616
25995         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25996         * tree-ssa-math-opts.c: Include domwalk.h.
25997         (convert_mult_to_fma_1): New function.
25998         (fma_transformation_info): New type.
25999         (fma_deferring_state): Likewise.
26000         (cancel_fma_deferring): New function.
26001         (result_of_phi): Likewise.
26002         (last_fma_candidate_feeds_initial_phi): Likewise.
26003         (convert_mult_to_fma): Added deferring logic, split actual
26004         transformation to convert_mult_to_fma_1.
26005         (math_opts_dom_walker): New type.
26006         (math_opts_dom_walker::after_dom_children): New method, body moved
26007         here from pass_optimize_widening_mul::execute, added deferring logic
26008         bits.
26009         (pass_optimize_widening_mul::execute): Moved most of code to
26010         math_opts_dom_walker::after_dom_children.
26011         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26012         * config/i386/i386.c (ix86_option_override_internal): Added
26013         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26015 2018-01-12  Richard Biener  <rguenther@suse.de>
26017         PR debug/83157
26018         * dwarf2out.c (gen_variable_die): Do not reset old_die for
26019         inline instance vars.
26021 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
26023         PR target/81819
26024         * config/rx/rx.c (rx_is_restricted_memory_address):
26025         Handle SUBREG case.
26027 2018-01-12  Richard Biener  <rguenther@suse.de>
26029         PR tree-optimization/80846
26030         * target.def (split_reduction): New target hook.
26031         * targhooks.c (default_split_reduction): New function.
26032         * targhooks.h (default_split_reduction): Declare.
26033         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26034         target requests first reduce vectors by combining low and high
26035         parts.
26036         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26037         (get_vectype_for_scalar_type_and_size): Export.
26038         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26039         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26040         * doc/tm.texi: Regenerate.
26041         * config/i386/i386.c (ix86_split_reduction): Implement
26042         TARGET_VECTORIZE_SPLIT_REDUCTION.
26044 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26046         PR target/83368
26047         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26048         in PIC mode except for TARGET_VXWORKS_RTP.
26049         * config/sparc/sparc.c: Include cfgrtl.h.
26050         (TARGET_INIT_PIC_REG): Define.
26051         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26052         (sparc_pic_register_p): New predicate.
26053         (sparc_legitimate_address_p): Use it.
26054         (sparc_legitimize_pic_address): Likewise.
26055         (sparc_delegitimize_address): Likewise.
26056         (sparc_mode_dependent_address_p): Likewise.
26057         (gen_load_pcrel_sym): Remove 4th parameter.
26058         (load_got_register): Adjust call to above.  Remove obsolete stuff.
26059         (sparc_expand_prologue): Do not call load_got_register here.
26060         (sparc_flat_expand_prologue): Likewise.
26061         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26062         (sparc_use_pseudo_pic_reg): New function.
26063         (sparc_init_pic_reg): Likewise.
26064         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26065         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26067 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
26069         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26070         Add item for branch_cost.
26072 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26074         PR rtl-optimization/83565
26075         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26076         not extend the result to a larger mode for rotate operations.
26077         (num_sign_bit_copies1): Likewise.
26079 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26081         PR target/40411
26082         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26083         -symbolic.
26084         Use values-Xc.o for -pedantic.
26085         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26087 2018-01-12  Martin Liska  <mliska@suse.cz>
26089         PR ipa/83054
26090         * ipa-devirt.c (final_warning_record::grow_type_warnings):
26091         New function.
26092         (possible_polymorphic_call_targets): Use it.
26093         (ipa_devirt): Likewise.
26095 2018-01-12  Martin Liska  <mliska@suse.cz>
26097         * profile-count.h (enum profile_quality): Use 0 as invalid
26098         enum value of profile_quality.
26100 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
26102         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26103         -mext-string options.
26105 2018-01-12  Richard Biener  <rguenther@suse.de>
26107         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26108         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26109         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26110         Likewise.
26111         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26113 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
26115         * configure.ac (--with-long-double-format): Add support for the
26116         configuration option to change the default long double format on
26117         PowerPC systems.
26118         * config.gcc (powerpc*-linux*-*): Likewise.
26119         * configure: Regenerate.
26120         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26121         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26122         used without modification.
26124 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26126         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26127         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26128         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26129         MISC_BUILTIN_SPEC_BARRIER.
26130         (rs6000_init_builtins): Likewise.
26131         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26132         enum value.
26133         (speculation_barrier): New define_insn.
26134         * doc/extend.texi: Document __builtin_speculation_barrier.
26136 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26138         PR target/83203
26139         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26140         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26141         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26142         iterators.
26143         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
26144         integral modes instead of "ss" and "sd".
26145         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26146         vectors with 32-bit and 64-bit elements.
26147         (vecdupssescalarmodesuffix): New mode attribute.
26148         (vec_dup<mode>): Use it.
26150 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
26152         PR target/83330
26153         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26154         frame if argument is passed on stack.
26156 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26158         PR target/82682
26159         * ree.c (combine_reaching_defs): Optimize also
26160         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26161         reg2=any_extend(exp); reg1=reg2;, formatting fix.
26163 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26165         PR middle-end/83189
26166         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26168 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26170         PR middle-end/83718
26171         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26172         after they are computed.
26174 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
26176         PR tree-optimization/83695
26177         * gimple-loop-linterchange.cc
26178         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26179         reset cached scev information after interchange.
26180         (pass_linterchange::execute): Remove call to scev_reset_htab.
26182 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26184         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26185         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26186         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26187         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26188         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26189         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26190         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26191         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26192         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26193         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26194         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26195         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26196         (V_lane_reg): Likewise.
26197         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26198         New define_expand.
26199         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26200         (vfmal_lane_low<mode>_intrinsic,
26201         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26202         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26203         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26204         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26205         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26206         vfmsl_lane_high<mode>_intrinsic): New define_insns.
26208 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26210         * config/arm/arm-cpus.in (fp16fml): New feature.
26211         (ALL_SIMD): Add fp16fml.
26212         (armv8.2-a): Add fp16fml as an option.
26213         (armv8.3-a): Likewise.
26214         (armv8.4-a): Add fp16fml as part of fp16.
26215         * config/arm/arm.h (TARGET_FP16FML): Define.
26216         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26217         when appropriate.
26218         * config/arm/arm-modes.def (V2HF): Define.
26219         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26220         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26221         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26222         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26223         vfmsl_low, vfmsl_high): New set of builtins.
26224         * config/arm/iterators.md (PLUSMINUS): New code iterator.
26225         (vfml_op): New code attribute.
26226         (VFMLHALVES): New int iterator.
26227         (VFML, VFMLSEL): New mode attributes.
26228         (V_reg): Define mapping for V2HF.
26229         (V_hi, V_lo): New mode attributes.
26230         (VF_constraint): Likewise.
26231         (vfml_half, vfml_half_selector): New int attributes.
26232         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26233         define_expand.
26234         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26235         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26236         New define_insn.
26237         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26238         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26239         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26240         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
26241         documentation.
26242         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26243         Document new effective target and option set.
26245 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26247         * config/arm/arm-cpus.in (armv8_4): New feature.
26248         (ARMv8_4a): New fgroup.
26249         (armv8.4-a): New arch.
26250         * config/arm/arm-tables.opt: Regenerate.
26251         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26252         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26253         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26254         Add matching rules for -march=armv8.4-a and extensions.
26255         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26257 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
26259         PR target/81821
26260         * config/rx/rx.md (BW): New mode attribute.
26261         (sync_lock_test_and_setsi): Add mode suffix to insn output.
26263 2018-01-11  Richard Biener  <rguenther@suse.de>
26265         PR tree-optimization/83435
26266         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26267         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26268         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26270 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26271             Alan Hayward  <alan.hayward@arm.com>
26272             David Sherwood  <david.sherwood@arm.com>
26274         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26275         field.
26276         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
26277         (aarch64_print_address_internal): Use it to check for a zero offset.
26279 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26280             Alan Hayward  <alan.hayward@arm.com>
26281             David Sherwood  <david.sherwood@arm.com>
26283         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26284         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26285         Return a poly_int64 rather than a HOST_WIDE_INT.
26286         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26287         rather than a HOST_WIDE_INT.
26288         * config/aarch64/aarch64.h (aarch64_frame): Protect with
26289         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
26290         hard_fp_offset, frame_size, initial_adjust, callee_offset and
26291         final_offset from HOST_WIDE_INT to poly_int64.
26292         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26293         to_constant when getting the number of units in an Advanced SIMD
26294         mode.
26295         (aarch64_builtin_vectorized_function): Check for a constant number
26296         of units.
26297         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26298         GET_MODE_SIZE.
26299         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26300         attribute instead of GET_MODE_NUNITS.
26301         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26302         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26303         GET_MODE_SIZE for fixed-size registers.
26304         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26305         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26306         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26307         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26308         (aarch64_print_operand, aarch64_print_address_internal)
26309         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26310         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26311         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26312         Handle polynomial GET_MODE_SIZE.
26313         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
26314         wider than SImode without modification.
26315         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26316         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26317         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26318         passing and returning SVE modes.
26319         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26320         rather than GEN_INT.
26321         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26322         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26323         (aarch64_allocate_and_probe_stack_space): Likewise.
26324         (aarch64_layout_frame): Cope with polynomial offsets.
26325         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26326         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
26327         polynomial offsets.
26328         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26329         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26330         poly_int64 rather than a HOST_WIDE_INT.
26331         (aarch64_get_separate_components, aarch64_process_components)
26332         (aarch64_expand_prologue, aarch64_expand_epilogue)
26333         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26334         (aarch64_anchor_offset): New function, split out from...
26335         (aarch64_legitimize_address): ...here.
26336         (aarch64_builtin_vectorization_cost): Handle polynomial
26337         TYPE_VECTOR_SUBPARTS.
26338         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26339         GET_MODE_NUNITS.
26340         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26341         number of elements from the PARALLEL rather than the mode.
26342         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26343         rather than GET_MODE_BITSIZE.
26344         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26345         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26346         (aarch64_expand_vec_perm_const_1): Handle polynomial
26347         d->perm.length () and d->perm elements.
26348         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
26349         Apply to_constant to d->perm elements.
26350         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26351         polynomial CONST_VECTOR_NUNITS.
26352         (aarch64_move_pointer): Take amount as a poly_int64 rather
26353         than an int.
26354         (aarch64_progress_pointer): Avoid temporary variable.
26355         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26356         the mode attribute instead of GET_MODE.
26358 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26359             Alan Hayward  <alan.hayward@arm.com>
26360             David Sherwood  <david.sherwood@arm.com>
26362         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26363         x exists before using it.
26364         (aarch64_add_constant_internal): Rename to...
26365         (aarch64_add_offset_1): ...this.  Replace regnum with separate
26366         src and dest rtxes.  Handle the case in which they're different,
26367         including when the offset is zero.  Replace scratchreg with an rtx.
26368         Use 2 additions if there is no spare register into which we can
26369         move a 16-bit constant.
26370         (aarch64_add_constant): Delete.
26371         (aarch64_add_offset): Replace reg with separate src and dest
26372         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
26373         Use aarch64_add_offset_1.
26374         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26375         an rtx rather than an int.  Take the delta as a poly_int64
26376         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
26377         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26378         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26379         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26380         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26381         and aarch64_add_sp.
26382         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26383         aarch64_add_constant.
26385 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26387         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
26388         Use scalar_float_mode.
26390 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26392         * config/aarch64/aarch64-simd.md
26393         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
26394         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
26395         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
26396         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
26397         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
26398         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
26399         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
26400         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
26401         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
26402         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
26404 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26406         PR target/83514
26407         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
26408         targ_options->x_arm_arch_string is non NULL.
26410 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
26412         * config/aarch64/aarch64.h
26413         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
26415 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
26417         PR target/82096
26418         * expmed.c (emit_store_flag_force): Swap if const op0
26419         and change VOIDmode to mode of op0.
26421 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26423         PR rtl-optimization/83761
26424         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
26425         than bytes to mode_for_size.
26427 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26429         PR middle-end/83189
26430         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
26431         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
26432         profile.
26434 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26436         PR middle-end/83575
26437         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
26438         when in layout mode.
26439         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
26440         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
26441         partition fixup.
26443 2018-01-10  Michael Collison  <michael.collison@arm.com>
26445         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
26446         * config/aarch64/aarch64-option-extension.def: Add
26447         AARCH64_OPT_EXTENSION of 'fp16fml'.
26448         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26449         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
26450         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
26451         * config/aarch64/constraints.md (Ui7): New constraint.
26452         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
26453         (VFMLA_SEL_W): Ditto.
26454         (f16quad): Ditto.
26455         (f16mac1): Ditto.
26456         (VFMLA16_LOW): New int iterator.
26457         (VFMLA16_HIGH): Ditto.
26458         (UNSPEC_FMLAL): New unspec.
26459         (UNSPEC_FMLSL): Ditto.
26460         (UNSPEC_FMLAL2): Ditto.
26461         (UNSPEC_FMLSL2): Ditto.
26462         (f16mac): New code attribute.
26463         * config/aarch64/aarch64-simd-builtins.def
26464         (aarch64_fmlal_lowv2sf): Ditto.
26465         (aarch64_fmlsl_lowv2sf): Ditto.
26466         (aarch64_fmlalq_lowv4sf): Ditto.
26467         (aarch64_fmlslq_lowv4sf): Ditto.
26468         (aarch64_fmlal_highv2sf): Ditto.
26469         (aarch64_fmlsl_highv2sf): Ditto.
26470         (aarch64_fmlalq_highv4sf): Ditto.
26471         (aarch64_fmlslq_highv4sf): Ditto.
26472         (aarch64_fmlal_lane_lowv2sf): Ditto.
26473         (aarch64_fmlsl_lane_lowv2sf): Ditto.
26474         (aarch64_fmlal_laneq_lowv2sf): Ditto.
26475         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
26476         (aarch64_fmlalq_lane_lowv4sf): Ditto.
26477         (aarch64_fmlsl_lane_lowv4sf): Ditto.
26478         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
26479         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
26480         (aarch64_fmlal_lane_highv2sf): Ditto.
26481         (aarch64_fmlsl_lane_highv2sf): Ditto.
26482         (aarch64_fmlal_laneq_highv2sf): Ditto.
26483         (aarch64_fmlsl_laneq_highv2sf): Ditto.
26484         (aarch64_fmlalq_lane_highv4sf): Ditto.
26485         (aarch64_fmlsl_lane_highv4sf): Ditto.
26486         (aarch64_fmlalq_laneq_highv4sf): Ditto.
26487         (aarch64_fmlsl_laneq_highv4sf): Ditto.
26488         * config/aarch64/aarch64-simd.md:
26489         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
26490         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26491         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
26492         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26493         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
26494         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
26495         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
26496         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
26497         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
26498         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
26499         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
26500         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
26501         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
26502         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
26503         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
26504         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
26505         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
26506         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
26507         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
26508         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
26509         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
26510         (vfmlsl_low_u32): Ditto.
26511         (vfmlalq_low_u32): Ditto.
26512         (vfmlslq_low_u32): Ditto.
26513         (vfmlal_high_u32): Ditto.
26514         (vfmlsl_high_u32): Ditto.
26515         (vfmlalq_high_u32): Ditto.
26516         (vfmlslq_high_u32): Ditto.
26517         (vfmlal_lane_low_u32): Ditto.
26518         (vfmlsl_lane_low_u32): Ditto.
26519         (vfmlal_laneq_low_u32): Ditto.
26520         (vfmlsl_laneq_low_u32): Ditto.
26521         (vfmlalq_lane_low_u32): Ditto.
26522         (vfmlslq_lane_low_u32): Ditto.
26523         (vfmlalq_laneq_low_u32): Ditto.
26524         (vfmlslq_laneq_low_u32): Ditto.
26525         (vfmlal_lane_high_u32): Ditto.
26526         (vfmlsl_lane_high_u32): Ditto.
26527         (vfmlal_laneq_high_u32): Ditto.
26528         (vfmlsl_laneq_high_u32): Ditto.
26529         (vfmlalq_lane_high_u32): Ditto.
26530         (vfmlslq_lane_high_u32): Ditto.
26531         (vfmlalq_laneq_high_u32): Ditto.
26532         (vfmlslq_laneq_high_u32): Ditto.
26533         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
26534         (AARCH64_FL_FOR_ARCH8_4): New.
26535         (AARCH64_ISA_F16FML): New ISA flag.
26536         (TARGET_F16FML): New feature flag for fp16fml.
26537         (doc/invoke.texi): Document new fp16fml option.
26539 2018-01-10  Michael Collison  <michael.collison@arm.com>
26541         * config/aarch64/aarch64-builtins.c:
26542         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
26543         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26544         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
26545         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
26546         (AARCH64_ISA_SHA3): New ISA flag.
26547         (TARGET_SHA3): New feature flag for sha3.
26548         * config/aarch64/iterators.md (sha512_op): New int attribute.
26549         (CRYPTO_SHA512): New int iterator.
26550         (UNSPEC_SHA512H): New unspec.
26551         (UNSPEC_SHA512H2): Ditto.
26552         (UNSPEC_SHA512SU0): Ditto.
26553         (UNSPEC_SHA512SU1): Ditto.
26554         * config/aarch64/aarch64-simd-builtins.def
26555         (aarch64_crypto_sha512hqv2di): New builtin.
26556         (aarch64_crypto_sha512h2qv2di): Ditto.
26557         (aarch64_crypto_sha512su0qv2di): Ditto.
26558         (aarch64_crypto_sha512su1qv2di): Ditto.
26559         (aarch64_eor3qv8hi): Ditto.
26560         (aarch64_rax1qv2di): Ditto.
26561         (aarch64_xarqv2di): Ditto.
26562         (aarch64_bcaxqv8hi): Ditto.
26563         * config/aarch64/aarch64-simd.md:
26564         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
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/arm_neon.h (vsha512hq_u64): New intrinsic.
26572         (vsha512h2q_u64): Ditto.
26573         (vsha512su0q_u64): Ditto.
26574         (vsha512su1q_u64): Ditto.
26575         (veor3q_u16): Ditto.
26576         (vrax1q_u64): Ditto.
26577         (vxarq_u64): Ditto.
26578         (vbcaxq_u16): Ditto.
26579         * config/arm/types.md (crypto_sha512): New type attribute.
26580         (crypto_sha3): Ditto.
26581         (doc/invoke.texi): Document new sha3 option.
26583 2018-01-10  Michael Collison  <michael.collison@arm.com>
26585         * config/aarch64/aarch64-builtins.c:
26586         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
26587         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26588         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
26589         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
26590         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
26591         (AARCH64_ISA_SM4): New ISA flag.
26592         (TARGET_SM4): New feature flag for sm4.
26593         * config/aarch64/aarch64-simd-builtins.def
26594         (aarch64_sm3ss1qv4si): Ditto.
26595         (aarch64_sm3tt1aq4si): Ditto.
26596         (aarch64_sm3tt1bq4si): Ditto.
26597         (aarch64_sm3tt2aq4si): Ditto.
26598         (aarch64_sm3tt2bq4si): Ditto.
26599         (aarch64_sm3partw1qv4si): Ditto.
26600         (aarch64_sm3partw2qv4si): Ditto.
26601         (aarch64_sm4eqv4si): Ditto.
26602         (aarch64_sm4ekeyqv4si): Ditto.
26603         * config/aarch64/aarch64-simd.md:
26604         (aarch64_sm3ss1qv4si): Ditto.
26605         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
26606         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
26607         (aarch64_sm4eqv4si): Ditto.
26608         (aarch64_sm4ekeyqv4si): Ditto.
26609         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
26610         (sm3part_op): Ditto.
26611         (CRYPTO_SM3TT): Ditto.
26612         (CRYPTO_SM3PART): Ditto.
26613         (UNSPEC_SM3SS1): New unspec.
26614         (UNSPEC_SM3TT1A): Ditto.
26615         (UNSPEC_SM3TT1B): Ditto.
26616         (UNSPEC_SM3TT2A): Ditto.
26617         (UNSPEC_SM3TT2B): Ditto.
26618         (UNSPEC_SM3PARTW1): Ditto.
26619         (UNSPEC_SM3PARTW2): Ditto.
26620         (UNSPEC_SM4E): Ditto.
26621         (UNSPEC_SM4EKEY): Ditto.
26622         * config/aarch64/constraints.md (Ui2): New constraint.
26623         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
26624         * config/arm/types.md (crypto_sm3): New type attribute.
26625         (crypto_sm4): Ditto.
26626         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
26627         (vsm3tt1aq_u32): Ditto.
26628         (vsm3tt1bq_u32): Ditto.
26629         (vsm3tt2aq_u32): Ditto.
26630         (vsm3tt2bq_u32): Ditto.
26631         (vsm3partw1q_u32): Ditto.
26632         (vsm3partw2q_u32): Ditto.
26633         (vsm4eq_u32): Ditto.
26634         (vsm4ekeyq_u32): Ditto.
26635         (doc/invoke.texi): Document new sm4 option.
26637 2018-01-10  Michael Collison  <michael.collison@arm.com>
26639         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
26640         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
26641         (AARCH64_FL_FOR_ARCH8_4): New.
26642         (AARCH64_FL_V8_4): New flag.
26643         (doc/invoke.texi): Document new armv8.4-a option.
26645 2018-01-10  Michael Collison  <michael.collison@arm.com>
26647         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26648         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
26649         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
26650         * config/aarch64/aarch64-option-extension.def: Add
26651         AARCH64_OPT_EXTENSION of 'sha2'.
26652         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
26653         (crypto): Disable sha2 and aes if crypto disabled.
26654         (crypto): Enable aes and sha2 if enabled.
26655         (simd): Disable sha2 and aes if simd disabled.
26656         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
26657         New flags.
26658         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
26659         (TARGET_SHA2): New feature flag for sha2.
26660         (TARGET_AES): New feature flag for aes.
26661         * config/aarch64/aarch64-simd.md:
26662         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
26663         conditional on TARGET_AES.
26664         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
26665         (aarch64_crypto_sha1hsi): Make pattern conditional
26666         on TARGET_SHA2.
26667         (aarch64_crypto_sha1hv4si): Ditto.
26668         (aarch64_be_crypto_sha1hv4si): Ditto.
26669         (aarch64_crypto_sha1su1v4si): Ditto.
26670         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
26671         (aarch64_crypto_sha1su0v4si): Ditto.
26672         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
26673         (aarch64_crypto_sha256su0v4si): Ditto.
26674         (aarch64_crypto_sha256su1v4si): Ditto.
26675         (doc/invoke.texi): Document new aes and sha2 options.
26677 2018-01-10  Martin Sebor  <msebor@redhat.com>
26679         PR tree-optimization/83781
26680         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
26681         as string arrays.
26683 2018-01-11  Martin Sebor  <msebor@gmail.com>
26684             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26686         PR tree-optimization/83501
26687         PR tree-optimization/81703
26689         * tree-ssa-strlen.c (get_string_cst): Rename...
26690         (get_string_len): ...to this.  Handle global constants.
26691         (handle_char_store): Adjust.
26693 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
26694             Jim Wilson  <jimw@sifive.com>
26696         * config/riscv/riscv-protos.h (riscv_output_return): New.
26697         * config/riscv/riscv.c (struct machine_function): New naked_p field.
26698         (riscv_attribute_table, riscv_output_return),
26699         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
26700         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
26701         (riscv_compute_frame_info): Only compute frame->mask if not a naked
26702         function.
26703         (riscv_expand_prologue): Add early return for naked function.
26704         (riscv_expand_epilogue): Likewise.
26705         (riscv_function_ok_for_sibcall): Return false for naked function.
26706         (riscv_set_current_function): New.
26707         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
26708         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
26709         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
26710         * doc/extend.texi (RISC-V Function Attributes): New.
26712 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
26714         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
26715         check for 128-bit long double before checking TCmode.
26716         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
26717         128-bit long doubles before checking TFmode or TCmode.
26718         (FLOAT128_IBM_P): Likewise.
26720 2018-01-10  Martin Sebor  <msebor@redhat.com>
26722         PR tree-optimization/83671
26723         * builtins.c (c_strlen): Unconditionally return zero for the empty
26724         string.
26725         Use -Warray-bounds for warnings.
26726         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
26727         for non-constant array indices with COMPONENT_REF, arrays of
26728         arrays, and pointers to arrays.
26729         (gimple_fold_builtin_strlen): Determine and set length range for
26730         non-constant character arrays.
26732 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
26734         PR middle-end/81897
26735         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
26736         empty blocks.
26738 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
26740         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
26742 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26744         PR target/83399
26745         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
26746         VECTOR_MEM_ALTIVEC_OR_VSX_P.
26747         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
26748         indexed_or_indirect_operand predicate.
26749         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
26750         (*vsx_le_perm_load_v8hi): Likewise.
26751         (*vsx_le_perm_load_v16qi): Likewise.
26752         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
26753         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
26754         (*vsx_le_perm_store_v8hi): Likewise.
26755         (*vsx_le_perm_store_v16qi): Likewise.
26756         (eight unnamed splitters): Likewise.
26758 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26760         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
26761         * config/rs6000/emmintrin.h: Likewise.
26762         * config/rs6000/mmintrin.h: Likewise.
26763         * config/rs6000/xmmintrin.h: Likewise.
26765 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
26767         PR c++/43486
26768         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
26769         "public_flag".
26770         * tree.c (tree_nop_conversion): Return true for location wrapper
26771         nodes.
26772         (maybe_wrap_with_location): New function.
26773         (selftest::check_strip_nops): New function.
26774         (selftest::test_location_wrappers): New function.
26775         (selftest::tree_c_tests): Call it.
26776         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
26777         (maybe_wrap_with_location): New decl.
26778         (EXPR_LOCATION_WRAPPER_P): New macro.
26779         (location_wrapper_p): New inline function.
26780         (tree_strip_any_location_wrapper): New inline function.
26782 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
26784         PR target/83735
26785         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
26786         stack_realign_offset for the largest alignment of stack slot
26787         actually used.
26788         (ix86_find_max_used_stack_alignment): New function.
26789         (ix86_finalize_stack_frame_flags): Use it.  Set
26790         max_used_stack_alignment if we don't realign stack.
26791         * config/i386/i386.h (machine_function): Add
26792         max_used_stack_alignment.
26794 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
26796         * config/arm/arm.opt (-mbranch-cost): New option.
26797         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
26798         account.
26800 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
26802         PR target/83629
26803         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
26804         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
26806 2018-01-10  Richard Biener  <rguenther@suse.de>
26808         PR debug/83765
26809         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
26810         early out so it also covers the case where we have a non-NULL
26811         origin.
26813 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26815         PR tree-optimization/83753
26816         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
26817         for non-strided grouped accesses if the number of elements is 1.
26819 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26821         PR target/81616
26822         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
26823         * i386.h (TARGET_USE_GATHER): Define.
26824         * x86-tune.def (X86_TUNE_USE_GATHER): New.
26826 2018-01-10  Martin Liska  <mliska@suse.cz>
26828         PR bootstrap/82831
26829         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26830         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26831         partitioning.
26832         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26833         CLEANUP_NO_PARTITIONING is not set.
26835 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26837         * doc/rtl.texi: Remove documentation of (const ...) wrappers
26838         for vectors, as a partial revert of r254296.
26839         * rtl.h (const_vec_p): Delete.
26840         (const_vec_duplicate_p): Don't test for vector CONSTs.
26841         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26842         * expmed.c (make_tree): Likewise.
26844         Revert:
26845         * common.md (E, F): Use CONSTANT_P instead of checking for
26846         CONST_VECTOR.
26847         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26848         checking for CONST_VECTOR.
26850 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26852         PR middle-end/83575
26853         * predict.c (force_edge_cold): Handle in more sane way edges
26854         with no prediction.
26856 2018-01-09  Carl Love  <cel@us.ibm.com>
26858         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26859         V4SI, V4SF types.
26860         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26861         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26862         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26863         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
26864         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26865         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
26866         * config/rs6000/rs6000-protos.h: Add extern defition for
26867         rs6000_generate_float2_double_code.
26868         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26869         function.
26870         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26871         (float2_v2df): Add define_expand.
26873 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
26875         PR target/83628
26876         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26877         op_mode in the force_to_mode call.
26879 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26881         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26882         instead of checking each element individually.
26883         (aarch64_evpc_uzp): Likewise.
26884         (aarch64_evpc_zip): Likewise.
26885         (aarch64_evpc_ext): Likewise.
26886         (aarch64_evpc_rev): Likewise.
26887         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26888         instead of checking each element individually.  Return true without
26889         generating rtl if
26890         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26891         whether all selected elements come from the same input, instead of
26892         checking each element individually.  Remove calls to gen_rtx_REG,
26893         start_sequence and end_sequence and instead assert that no rtl is
26894         generated.
26896 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26898         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26899         order of HIGH and CONST checks.
26901 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26903         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26904         if the destination isn't an SSA_NAME.
26906 2018-01-09  Richard Biener  <rguenther@suse.de>
26908         PR tree-optimization/83668
26909         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26910         move prologue...
26911         (canonicalize_loop_form): ... here, renamed from ...
26912         (canonicalize_loop_closed_ssa_form): ... this and amended to
26913         swap successor edges for loop exit blocks to make us use
26914         the RPO order we need for initial schedule generation.
26916 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
26918         PR tree-optimization/64811
26919         * match.pd: When optimizing comparisons with Inf, avoid
26920         introducing or losing exceptions from comparisons with NaN.
26922 2018-01-09  Martin Liska  <mliska@suse.cz>
26924         PR sanitizer/82517
26925         * asan.c (shadow_mem_size): Add gcc_assert.
26927 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
26929         Don't save registers in main().
26931         PR target/83738
26932         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26933         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26934         * config/avr/avr.c (avr_set_current_function): Don't error if
26935         naked, OS_task or OS_main are specified at the same time.
26936         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26937         OS_main.
26938         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26939         attribute.
26940         * common/config/avr/avr-common.c (avr_option_optimization_table):
26941         Switch on -mmain-is-OS_task for optimizing compilations.
26943 2018-01-09  Richard Biener  <rguenther@suse.de>
26945         PR tree-optimization/83572
26946         * graphite.c: Include cfganal.h.
26947         (graphite_transform_loops): Connect infinite loops to exit
26948         and remove fake edges at the end.
26950 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26952         * ipa-inline.c (edge_badness): Revert accidental checkin.
26954 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26956         PR ipa/80763
26957         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26958         symbols; not inline clones.
26960 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
26962         PR target/83507
26963         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26964         hard registers.  Formatting fixes.
26966         PR preprocessor/83722
26967         * gcc.c (try_generate_repro): Pass
26968         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26969         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26970         do_report_bug.
26972 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
26973             Kito Cheng  <kito.cheng@gmail.com>
26975         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26976         (riscv_leaf_function_p): Delete.
26977         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26979 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26981         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26982         function.
26983         (do_ifelse): New function.
26984         (do_isel): New function.
26985         (do_sub3): New function.
26986         (do_add3): New function.
26987         (do_load_mask_compare): New function.
26988         (do_overlap_load_compare): New function.
26989         (expand_compare_loop): New function.
26990         (expand_block_compare): Call expand_compare_loop() when appropriate.
26991         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26992         option description.
26993         (-mblock-compare-inline-loop-limit): New option.
26995 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26997         PR target/83677
26998         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26999         Reverse order of second and third operands in first alternative.
27000         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27001         of first and second elements in UNSPEC_VPERMR vector.
27002         (altivec_expand_vec_perm_le): Likewise.
27004 2018-01-08  Jeff Law  <law@redhat.com>
27006         PR rtl-optimizatin/81308
27007         * tree-switch-conversion.c (cfg_altered): New file scoped static.
27008         (process_switch): If group_case_labels makes a change, then set
27009         cfg_altered.
27010         (pass_convert_switch::execute): If a switch is converted, then
27011         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
27013         PR rtl-optimization/81308
27014         * recog.c (split_all_insns): Conditionally cleanup the CFG after
27015         splitting insns.
27017 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
27019         PR target/83663 - Revert r255946
27020         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27021         generation for cases where splatting a value is not useful.
27022         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27023         across a vec_duplicate and a paradoxical subreg forming a vector
27024         mode to a vec_concat.
27026 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27028         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27029         -march=armv8.3-a variants.
27030         * config/arm/t-multilib: Likewise.
27031         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
27033 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27035         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27036         to generate rtl.
27037         (cceq_ior_compare_complement): Give it a name so I can use it, and
27038         change boolean_or_operator predicate to boolean_operator so it can
27039         be used to generate a crand.
27040         (eqne): New code iterator.
27041         (bd/bd_neg): New code_attrs.
27042         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27043         a single define_insn.
27044         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27045         decrement (bdnzt/bdnzf/bdzt/bdzf).
27046         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27047         with the new names of the branch decrement patterns, and added the
27048         names of the branch decrement conditional patterns.
27050 2018-01-08  Richard Biener  <rguenther@suse.de>
27052         PR tree-optimization/83563
27053         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27054         cache.
27056 2018-01-08  Richard Biener  <rguenther@suse.de>
27058         PR middle-end/83713
27059         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27061 2018-01-08  Richard Biener  <rguenther@suse.de>
27063         PR tree-optimization/83685
27064         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27065         references to abnormals.
27067 2018-01-08  Richard Biener  <rguenther@suse.de>
27069         PR lto/83719
27070         * dwarf2out.c (output_indirect_strings): Handle empty
27071         skeleton_debug_str_hash.
27072         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27074 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27076         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27077         (emit_store_direct): Likewise.
27078         (arc_trampoline_adjust_address): Likewise.
27079         (arc_asm_trampoline_template): New function.
27080         (arc_initialize_trampoline): Use asm_trampoline_template.
27081         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27082         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27083         * config/arc/arc.md (flush_icache): Delete pattern.
27085 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27087         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27088         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27089         munaligned-access.
27091 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27093         PR target/83681
27094         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27095         by not USED_FOR_TARGET.
27096         (make_pass_resolve_sw_modes): Likewise.
27098 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27100         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27101         USED_FOR_TARGET.
27103 2018-01-08  Richard Biener  <rguenther@suse.de>
27105         PR middle-end/83580
27106         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27108 2018-01-08  Richard Biener  <rguenther@suse.de>
27110         PR middle-end/83517
27111         * match.pd ((t * 2) / 2) -> t): Add missing :c.
27113 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
27115         PR middle-end/81897
27116         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27117         basic blocks with a small number of successors.
27118         (convert_control_dep_chain_into_preds): Improve handling of
27119         forwarder blocks.
27120         (dump_predicates): Split apart into...
27121         (dump_pred_chain): ...here...
27122         (dump_pred_info): ...and here.
27123         (can_one_predicate_be_invalidated_p): Add debugging printfs.
27124         (can_chain_union_be_invalidated_p): Improve check for invalidation
27125         of paths.
27126         (uninit_uses_cannot_happen): Avoid unnecessary if
27127         convert_control_dep_chain_into_preds yielded nothing.
27129 2018-01-06  Martin Sebor  <msebor@redhat.com>
27131         PR tree-optimization/83640
27132         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27133         subtracting negative offset from size.
27134         (builtin_access::overlap): Adjust offset bounds of the access to fall
27135         within the size of the object if possible.
27137 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
27139         PR rtl-optimization/83699
27140         * expmed.c (extract_bit_field_1): Restrict the vector usage of
27141         extract_bit_field_as_subreg to cases in which the extracted
27142         value is also a vector.
27144         * lra-constraints.c (process_alt_operands): Test for the equivalence
27145         substitutions when detecting a possible reload cycle.
27147 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
27149         PR debug/83480
27150         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27151         by default if flag_selective_schedling{,2}.  Formatting fixes.
27153         PR rtl-optimization/83682
27154         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27155         if it has non-VECTOR_MODE element mode.
27156         (vec_duplicate_p): Likewise.
27158         PR middle-end/83694
27159         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27160         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27162 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27164         PR target/83604
27165         * config/i386/i386-builtin.def
27166         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27167         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27168         Require also OPTION_MASK_ISA_AVX512F in addition to
27169         OPTION_MASK_ISA_GFNI.
27170         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27171         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27172         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27173         to OPTION_MASK_ISA_GFNI.
27174         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27175         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27176         OPTION_MASK_ISA_AVX512BW.
27177         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27178         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27179         addition to OPTION_MASK_ISA_GFNI.
27180         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27181         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27182         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27183         to OPTION_MASK_ISA_GFNI.
27184         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27185         a requirement for all ISAs rather than any of them with a few
27186         exceptions.
27187         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27188         processing.
27189         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27190         bitmasks to be enabled with 3 exceptions, instead of requiring any
27191         enabled ISA with lots of exceptions.
27192         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27193         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27194         Change avx512bw in isa attribute to avx512f.
27195         * config/i386/sgxintrin.h: Add license boilerplate.
27196         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
27197         to __AVX512F__ and __AVX512VL to __AVX512VL__.
27198         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27199         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27200         defined.
27201         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27202         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27203         temporarily sse2 rather than sse if not enabled already.
27205         PR target/83604
27206         * config/i386/sse.md (VI248_VLBW): Rename to ...
27207         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
27208         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27209         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27210         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27211         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27212         mode iterator instead of VI248_VLBW.
27214 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
27216         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27217         (record_modified): Skip clobbers; add debug output.
27218         (param_change_prob): Use sreal frequencies.
27220 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27222         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27223         punt for user-aligned variables.
27225 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27227         * tree-chrec.c (chrec_contains_symbols): Return true for
27228         POLY_INT_CST.
27230 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
27232         PR target/82439
27233         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27234         of (x|y) == x for BICS pattern.
27236 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27238         PR tree-optimization/83605
27239         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27240         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27241         can throw.
27243 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27245         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27246         * config/epiphany/rtems.h: New file.
27248 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27249             Uros Bizjak  <ubizjak@gmail.com>
27251         PR target/83554
27252         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27253         QIreg_operand instead of register_operand predicate.
27254         * config/i386/i386.c (ix86_rop_should_change_byte_p,
27255         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27256         comments instead of -fmitigate[-_]rop.
27258 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27260         PR bootstrap/81926
27261         * cgraphunit.c (symbol_table::compile): Switch to text_section
27262         before calling assembly_start debug hook.
27263         * run-rtl-passes.c (run_rtl_passes): Likewise.
27264         Include output.h.
27266 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27268         * tree-vrp.c (extract_range_from_binary_expr_1): Check
27269         range_int_cst_p rather than !symbolic_range_p before calling
27270         extract_range_from_multiplicative_op_1.
27272 2018-01-04  Jeff Law  <law@redhat.com>
27274         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27275         redundant test in assertion.
27277 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27279         * doc/rtl.texi: Document machine_mode wrapper classes.
27281 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27283         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27284         using tree_to_uhwi.
27286 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27288         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27289         the VEC_PERM_EXPR fold to fail.
27291 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27293         PR debug/83585
27294         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27295         to switched_sections.
27297 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27299         PR target/83680
27300         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27301         test for d.testing.
27303 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
27305         PR target/83387
27306         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27307         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27309 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27311         PR debug/83666
27312         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27313         is BLKmode and bitpos not zero or mode change is needed.
27315 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27317         PR target/83675
27318         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27319         TARGET_VIS2.
27321 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
27323         PR target/83628
27324         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27325         instead of MULT rtx.  Update all corresponding splitters.
27326         (*saddl_se): Ditto.
27327         (*ssub<modesuffix>): Ditto.
27328         (*ssubl_se): Ditto.
27329         (*cmp_sadd_di): Update split patterns.
27330         (*cmp_sadd_si): Ditto.
27331         (*cmp_sadd_sidi): Ditto.
27332         (*cmp_ssub_di): Ditto.
27333         (*cmp_ssub_si): Ditto.
27334         (*cmp_ssub_sidi): Ditto.
27335         * config/alpha/predicates.md (const23_operand): New predicate.
27336         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27337         Look for ASHIFT, not MULT inner operand.
27338         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27340 2018-01-04  Martin Liska  <mliska@suse.cz>
27342         PR gcov-profile/83669
27343         * gcov.c (output_intermediate_file): Add version to intermediate
27344         gcov file.
27345         * doc/gcov.texi: Document new field 'version' in intermediate
27346         file format. Fix location of '-k' option of gcov command.
27348 2018-01-04  Martin Liska  <mliska@suse.cz>
27350         PR ipa/82352
27351         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27353 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27355         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27357 2018-01-03  Martin Sebor  <msebor@redhat.com>
27359         PR tree-optimization/83655
27360         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27361         checking calls with invalid arguments.
27363 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27365         * tree-vect-stmts.c (vect_get_store_rhs): New function.
27366         (vectorizable_mask_load_store): Delete.
27367         (vectorizable_call): Return false for masked loads and stores.
27368         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
27369         instead of gimple_assign_rhs1.
27370         (vectorizable_load): Handle IFN_MASK_LOAD.
27371         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27373 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27375         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27376         split out from..,
27377         (vectorizable_mask_load_store): ...here.
27378         (vectorizable_load): ...and here.
27380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27382         * tree-vect-stmts.c (vect_build_all_ones_mask)
27383         (vect_build_zero_merge_argument): New functions, split out from...
27384         (vectorizable_load): ...here.
27386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27388         * tree-vect-stmts.c (vect_check_store_rhs): New function,
27389         split out from...
27390         (vectorizable_mask_load_store): ...here.
27391         (vectorizable_store): ...and here.
27393 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27395         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
27396         split out from...
27397         (vectorizable_mask_load_store): ...here.
27399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27401         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
27402         (vect_model_store_cost): Take a vec_load_store_type instead of a
27403         vect_def_type.
27404         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
27405         (vect_model_store_cost): Take a vec_load_store_type instead of a
27406         vect_def_type.
27407         (vectorizable_mask_load_store): Update accordingly.
27408         (vectorizable_store): Likewise.
27409         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
27411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27413         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
27414         IFN_MASK_LOAD calls here rather than...
27415         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
27417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27418             Alan Hayward  <alan.hayward@arm.com>
27419             David Sherwood  <david.sherwood@arm.com>
27421         * expmed.c (extract_bit_field_1): For vector extracts,
27422         fall back to extract_bit_field_as_subreg if vec_extract
27423         isn't available.
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         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
27430         they are variable or constant sized.
27431         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
27432         slots for constant-sized data.
27434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27435             Alan Hayward  <alan.hayward@arm.com>
27436             David Sherwood  <david.sherwood@arm.com>
27438         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
27439         handling COND_EXPRs with boolean comparisons, try to find a better
27440         basis for the mask type than the boolean itself.
27442 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27444         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
27445         is calculated and how it can be overridden.
27446         * genmodes.c (max_bitsize_mode_any_mode): New variable.
27447         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
27448         if defined.
27449         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
27450         if nonzero.
27452 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27453             Alan Hayward  <alan.hayward@arm.com>
27454             David Sherwood  <david.sherwood@arm.com>
27456         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
27457         Remove the mode argument.
27458         (aarch64_simd_valid_immediate): Remove the mode and inverse
27459         arguments.
27460         * config/aarch64/iterators.md (bitsize): New iterator.
27461         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
27462         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
27463         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
27464         aarch64_simd_valid_immediate.
27465         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
27466         (aarch64_reg_or_bic_imm): Likewise.
27467         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
27468         with an insn_type enum and msl with a modifier_type enum.
27469         Replace element_width with a scalar_mode.  Change the shift
27470         to unsigned int.  Add constructors for scalar_float_mode and
27471         scalar_int_mode elements.
27472         (aarch64_vect_float_const_representable_p): Delete.
27473         (aarch64_can_const_movi_rtx_p)
27474         (aarch64_simd_scalar_immediate_valid_for_move)
27475         (aarch64_simd_make_constant): Update call to
27476         aarch64_simd_valid_immediate.
27477         (aarch64_advsimd_valid_immediate_hs): New function.
27478         (aarch64_advsimd_valid_immediate): Likewise.
27479         (aarch64_simd_valid_immediate): Remove mode and inverse
27480         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
27481         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
27482         and aarch64_float_const_representable_p on the result.
27483         (aarch64_output_simd_mov_immediate): Remove mode argument.
27484         Update call to aarch64_simd_valid_immediate and use of
27485         simd_immediate_info.
27486         (aarch64_output_scalar_simd_mov_immediate): Update call
27487         accordingly.
27489 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27490             Alan Hayward  <alan.hayward@arm.com>
27491             David Sherwood  <david.sherwood@arm.com>
27493         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
27494         (mode_nunits): Likewise CONST_MODE_NUNITS.
27495         * machmode.def (ADJUST_NUNITS): Document.
27496         * genmodes.c (mode_data::need_nunits_adj): New field.
27497         (blank_mode): Update accordingly.
27498         (adj_nunits): New variable.
27499         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
27500         parameter.
27501         (emit_mode_size_inline): Set need_bytesize_adj for all modes
27502         listed in adj_nunits.
27503         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
27504         listed in adj_nunits.  Don't emit case statements for such modes.
27505         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
27506         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
27507         nothing if adj_nunits is nonnull.
27508         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
27509         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
27510         (emit_mode_fbit): Update use of print_maybe_const_decl.
27511         (emit_move_size): Likewise.  Treat the array as non-const
27512         if adj_nunits.
27513         (emit_mode_adjustments): Handle adj_nunits.
27515 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27517         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
27518         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
27519         (VECTOR_MODES): Use it.
27520         (make_vector_modes): Take the prefix as an argument.
27522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27523             Alan Hayward  <alan.hayward@arm.com>
27524             David Sherwood  <david.sherwood@arm.com>
27526         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
27527         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
27528         for MODE_VECTOR_BOOL.
27529         * machmode.def (VECTOR_BOOL_MODE): Document.
27530         * genmodes.c (VECTOR_BOOL_MODE): New macro.
27531         (make_vector_bool_mode): New function.
27532         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
27533         MODE_VECTOR_BOOL.
27534         * lto-streamer-in.c (lto_input_mode_table): Likewise.
27535         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
27536         Likewise.
27537         * stor-layout.c (int_mode_for_mode): Likewise.
27538         * tree.c (build_vector_type_for_mode): Likewise.
27539         * varasm.c (output_constant_pool_2): Likewise.
27540         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
27541         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
27542         for MODE_VECTOR_BOOL.
27543         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
27544         of mode class checks.
27545         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
27546         instead of a list of mode class checks.
27547         (expand_vector_scalar_condition): Likewise.
27548         (type_for_widest_vector_mode): Handle BImode as an inner mode.
27550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27551             Alan Hayward  <alan.hayward@arm.com>
27552             David Sherwood  <david.sherwood@arm.com>
27554         * machmode.h (mode_size): Change from unsigned short to
27555         poly_uint16_pod.
27556         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
27557         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27558         or if measurement_type is not polynomial.
27559         (fixed_size_mode::includes_p): Check for constant-sized modes.
27560         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
27561         return a poly_uint16 rather than an unsigned short.
27562         (emit_mode_size): Change the type of mode_size from unsigned short
27563         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
27564         (emit_mode_adjustments): Cope with polynomial vector sizes.
27565         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27566         for GET_MODE_SIZE.
27567         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27568         for GET_MODE_SIZE.
27569         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
27570         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
27571         * caller-save.c (setup_save_areas): Likewise.
27572         (replace_reg_with_saved_mem): Likewise.
27573         * calls.c (emit_library_call_value_1): Likewise.
27574         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
27575         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
27576         (gen_lowpart_for_combine): Likewise.
27577         * convert.c (convert_to_integer_1): Likewise.
27578         * cse.c (equiv_constant, cse_insn): Likewise.
27579         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
27580         (cselib_subst_to_values): Likewise.
27581         * dce.c (word_dce_process_block): Likewise.
27582         * df-problems.c (df_word_lr_mark_ref): Likewise.
27583         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
27584         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
27585         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
27586         (rtl_for_decl_location): Likewise.
27587         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
27588         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
27589         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
27590         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
27591         (expand_expr_real_1): Likewise.
27592         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
27593         (pad_below): Likewise.
27594         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27595         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
27596         * ira.c (get_subreg_tracking_sizes): Likewise.
27597         * ira-build.c (ira_create_allocno_objects): Likewise.
27598         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
27599         (ira_sort_regnos_for_alter_reg): Likewise.
27600         * ira-costs.c (record_operand_costs): Likewise.
27601         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
27602         (resolve_simple_move): Likewise.
27603         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
27604         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
27605         (lra_constraints): Likewise.
27606         (CONST_POOL_OK_P): Reject variable-sized modes.
27607         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
27608         (add_pseudo_to_slot, lra_spill): Likewise.
27609         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27610         * optabs-query.c (get_best_extraction_insn): Likewise.
27611         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27612         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
27613         (expand_mult_highpart, valid_multiword_target_p): Likewise.
27614         * recog.c (offsettable_address_addr_space_p): Likewise.
27615         * regcprop.c (maybe_mode_change): Likewise.
27616         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
27617         * regrename.c (build_def_use): Likewise.
27618         * regstat.c (dump_reg_info): Likewise.
27619         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
27620         (find_reloads, find_reloads_subreg_address): Likewise.
27621         * reload1.c (eliminate_regs_1): Likewise.
27622         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
27623         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
27624         (simplify_binary_operation_1, simplify_subreg): Likewise.
27625         * targhooks.c (default_function_arg_padding): Likewise.
27626         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
27627         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
27628         (verify_gimple_assign_ternary): Likewise.
27629         * tree-inline.c (estimate_move_cost): Likewise.
27630         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27631         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
27632         (get_address_cost_ainc): Likewise.
27633         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
27634         (vect_supportable_dr_alignment): Likewise.
27635         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27636         (vectorizable_reduction): Likewise.
27637         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
27638         (vectorizable_operation, vectorizable_load): Likewise.
27639         * tree.c (build_same_sized_truth_vector_type): Likewise.
27640         * valtrack.c (cleanup_auto_inc_dec): Likewise.
27641         * var-tracking.c (emit_note_insn_var_location): Likewise.
27642         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
27643         (ADDR_VEC_ALIGN): Likewise.
27645 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27646             Alan Hayward  <alan.hayward@arm.com>
27647             David Sherwood  <david.sherwood@arm.com>
27649         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
27650         unsigned short.
27651         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27652         or if measurement_type is polynomial.
27653         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
27654         * combine.c (make_extraction): Likewise.
27655         * dse.c (find_shift_sequence): Likewise.
27656         * dwarf2out.c (mem_loc_descriptor): Likewise.
27657         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
27658         (extract_bit_field, extract_low_bits): Likewise.
27659         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
27660         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
27661         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
27662         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
27663         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27664         * reload.c (find_reloads): Likewise.
27665         * reload1.c (alter_reg): Likewise.
27666         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
27667         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
27668         * tree-if-conv.c (predicate_mem_writes): Likewise.
27669         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
27670         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
27671         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
27672         * valtrack.c (dead_debug_insert_temp): Likewise.
27673         * varasm.c (mergeable_constant_section): Likewise.
27674         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
27676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27677             Alan Hayward  <alan.hayward@arm.com>
27678             David Sherwood  <david.sherwood@arm.com>
27680         * expr.c (expand_assignment): Cope with polynomial mode sizes
27681         when assigning to a CONCAT.
27683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27684             Alan Hayward  <alan.hayward@arm.com>
27685             David Sherwood  <david.sherwood@arm.com>
27687         * machmode.h (mode_precision): Change from unsigned short to
27688         poly_uint16_pod.
27689         (mode_to_precision): Return a poly_uint16 rather than an unsigned
27690         short.
27691         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
27692         or if measurement_type is not polynomial.
27693         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
27694         in which the mode is already known to be a scalar_int_mode.
27695         * genmodes.c (emit_mode_precision): Change the type of mode_precision
27696         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
27697         initializer.
27698         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27699         for GET_MODE_PRECISION.
27700         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27701         for GET_MODE_PRECISION.
27702         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
27703         as polynomial.
27704         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
27705         (expand_field_assignment, make_extraction): Likewise.
27706         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
27707         (get_last_value): Likewise.
27708         * convert.c (convert_to_integer_1): Likewise.
27709         * cse.c (cse_insn): Likewise.
27710         * expr.c (expand_expr_real_1): Likewise.
27711         * lra-constraints.c (simplify_operand_subreg): Likewise.
27712         * optabs-query.c (can_atomic_load_p): Likewise.
27713         * optabs.c (expand_atomic_load): Likewise.
27714         (expand_atomic_store): Likewise.
27715         * ree.c (combine_reaching_defs): Likewise.
27716         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
27717         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
27718         * tree.h (type_has_mode_precision_p): Likewise.
27719         * ubsan.c (instrument_si_overflow): Likewise.
27721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27722             Alan Hayward  <alan.hayward@arm.com>
27723             David Sherwood  <david.sherwood@arm.com>
27725         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
27726         polynomial numbers of units.
27727         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
27728         (valid_vector_subparts_p): New function.
27729         (build_vector_type): Remove temporary shim and take the number
27730         of units as a poly_uint64 rather than an int.
27731         (build_opaque_vector_type): Take the number of units as a
27732         poly_uint64 rather than an int.
27733         * tree.c (build_vector_from_ctor): Handle polynomial
27734         TYPE_VECTOR_SUBPARTS.
27735         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
27736         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
27737         (build_vector_from_val): If the number of units is variable,
27738         use build_vec_duplicate_cst for constant operands and
27739         VEC_DUPLICATE_EXPR otherwise.
27740         (make_vector_type): Remove temporary is_constant ().
27741         (build_vector_type, build_opaque_vector_type): Take the number of
27742         units as a poly_uint64 rather than an int.
27743         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
27744         VECTOR_CST_NELTS.
27745         * cfgexpand.c (expand_debug_expr): Likewise.
27746         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
27747         (store_constructor, expand_expr_real_1): Likewise.
27748         (const_scalar_mask_from_tree): Likewise.
27749         * fold-const-call.c (fold_const_reduction): Likewise.
27750         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
27751         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
27752         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
27753         (fold_relational_const): Likewise.
27754         (native_interpret_vector): Likewise.  Change the size from an
27755         int to an unsigned int.
27756         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
27757         TYPE_VECTOR_SUBPARTS.
27758         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
27759         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
27760         duplicating a non-constant operand into a variable-length vector.
27761         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
27762         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
27763         * ipa-icf.c (sem_variable::equals): Likewise.
27764         * match.pd: Likewise.
27765         * omp-simd-clone.c (simd_clone_subparts): Likewise.
27766         * print-tree.c (print_node): Likewise.
27767         * stor-layout.c (layout_type): Likewise.
27768         * targhooks.c (default_builtin_vectorization_cost): Likewise.
27769         * tree-cfg.c (verify_gimple_comparison): Likewise.
27770         (verify_gimple_assign_binary): Likewise.
27771         (verify_gimple_assign_ternary): Likewise.
27772         (verify_gimple_assign_single): Likewise.
27773         * tree-pretty-print.c (dump_generic_node): Likewise.
27774         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27775         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
27776         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
27777         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
27778         (vect_shift_permute_load_chain): Likewise.
27779         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
27780         (expand_vector_condition, optimize_vector_constructor): Likewise.
27781         (lower_vec_perm, get_compute_type): Likewise.
27782         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27783         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
27784         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
27785         (vect_recog_mask_conversion_pattern): Likewise.
27786         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
27787         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
27788         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27789         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
27790         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
27791         (vectorizable_shift, vectorizable_operation, vectorizable_store)
27792         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
27793         (supportable_widening_operation): Likewise.
27794         (supportable_narrowing_operation): Likewise.
27795         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
27796         Likewise.
27797         * varasm.c (output_constant): Likewise.
27799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27800             Alan Hayward  <alan.hayward@arm.com>
27801             David Sherwood  <david.sherwood@arm.com>
27803         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
27804         so that both the length == 3 and length != 3 cases set up their
27805         own permute vectors.  Add comments explaining why we know the
27806         number of elements is constant.
27807         (vect_permute_load_chain): Likewise.
27809 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27810             Alan Hayward  <alan.hayward@arm.com>
27811             David Sherwood  <david.sherwood@arm.com>
27813         * machmode.h (mode_nunits): Change from unsigned char to
27814         poly_uint16_pod.
27815         (ONLY_FIXED_SIZE_MODES): New macro.
27816         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
27817         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
27818         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
27819         New typedefs.
27820         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
27821         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
27822         or if measurement_type is not polynomial.
27823         * genmodes.c (ZERO_COEFFS): New macro.
27824         (emit_mode_nunits_inline): Make mode_nunits_inline return a
27825         poly_uint16.
27826         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27827         Use ZERO_COEFFS when emitting initializers.
27828         * data-streamer.h (bp_pack_poly_value): New function.
27829         (bp_unpack_poly_value): Likewise.
27830         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27831         for GET_MODE_NUNITS.
27832         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27833         for GET_MODE_NUNITS.
27834         * tree.c (make_vector_type): Remove temporary shim and make
27835         the real function take the number of units as a poly_uint64
27836         rather than an int.
27837         (build_vector_type_for_mode): Handle polynomial nunits.
27838         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27839         * emit-rtl.c (const_vec_series_p_1): Likewise.
27840         (gen_rtx_CONST_VECTOR): Likewise.
27841         * fold-const.c (test_vec_duplicate_folding): Likewise.
27842         * genrecog.c (validate_pattern): Likewise.
27843         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27844         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27845         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27846         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27847         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27848         * rtlanal.c (subreg_get_info): Likewise.
27849         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27850         (vect_grouped_load_supported): Likewise.
27851         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27852         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27853         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27854         (simplify_const_unary_operation, simplify_binary_operation_1)
27855         (simplify_const_binary_operation, simplify_ternary_operation)
27856         (test_vector_ops_duplicate, test_vector_ops): Likewise.
27857         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27858         instead of CONST_VECTOR_NUNITS.
27859         * varasm.c (output_constant_pool_2): Likewise.
27860         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27861         explicit-encoded elements in the XVEC for variable-length vectors.
27863 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27865         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27867 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27868             Alan Hayward  <alan.hayward@arm.com>
27869             David Sherwood  <david.sherwood@arm.com>
27871         * coretypes.h (fixed_size_mode): Declare.
27872         (fixed_size_mode_pod): New typedef.
27873         * builtins.h (target_builtins::x_apply_args_mode)
27874         (target_builtins::x_apply_result_mode): Change type to
27875         fixed_size_mode_pod.
27876         * builtins.c (apply_args_size, apply_result_size, result_vector)
27877         (expand_builtin_apply_args_1, expand_builtin_apply)
27878         (expand_builtin_return): Update accordingly.
27880 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27882         * cse.c (hash_rtx_cb): Hash only the encoded elements.
27883         * cselib.c (cselib_hash_rtx): Likewise.
27884         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27885         CONST_VECTOR encoding.
27887 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27888             Jeff Law  <law@redhat.com>
27890         PR target/83641
27891         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27892         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27893         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27894         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27896         PR target/83641
27897         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27898         explicitly probe *sp in a noreturn function if there were any callee
27899         register saves or frame pointer is needed.
27901 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27903         PR debug/83621
27904         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27905         BLKmode for ternary, binary or unary expressions.
27907         PR debug/83645
27908         * var-tracking.c (delete_vta_debug_insn): New inline function.
27909         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27910         insns from get_insns () to NULL instead of each bb separately.
27911         Use delete_vta_debug_insn.  No longer static.
27912         (vt_debug_insns_local, variable_tracking_main_1): Adjust
27913         delete_vta_debug_insns callers.
27914         * rtl.h (delete_vta_debug_insns): Declare.
27915         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27916         instead of variable_tracking_main.
27918 2018-01-03  Martin Sebor  <msebor@redhat.com>
27920         PR tree-optimization/83603
27921         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27922         arguments past the endof the argument list in functions declared
27923         without a prototype.
27924         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27925         Avoid checking when arguments are null.
27927 2018-01-03  Martin Sebor  <msebor@redhat.com>
27929         PR c/83559
27930         * doc/extend.texi (attribute const): Fix a typo.
27931         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27932         issuing -Wsuggest-attribute for void functions.
27934 2018-01-03  Martin Sebor  <msebor@redhat.com>
27936         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27937         offset_int::from instead of wide_int::to_shwi.
27938         (maybe_diag_overlap): Remove assertion.
27939         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27940         * gimple-ssa-sprintf.c (format_directive): Same.
27941         (parse_directive): Same.
27942         (sprintf_dom_walker::compute_format_length): Same.
27943         (try_substitute_return_value): Same.
27945 2018-01-03  Jeff Law  <law@redhat.com>
27947         PR middle-end/83654
27948         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27949         non-constant residual for zero at runtime and avoid probing in
27950         that case.  Reorganize code for trailing problem to mirror handling
27951         of the residual.
27953 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27955         PR tree-optimization/83501
27956         * tree-ssa-strlen.c (get_string_cst): New.
27957         (handle_char_store): Call get_string_cst.
27959 2018-01-03  Martin Liska  <mliska@suse.cz>
27961         PR tree-optimization/83593
27962         * tree-ssa-strlen.c: Include tree-cfg.h.
27963         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27964         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27965         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27966         to false.
27967         (strlen_dom_walker::before_dom_children): Call
27968         gimple_purge_dead_eh_edges. Dump tranformation with details
27969         dump flags.
27970         (strlen_dom_walker::before_dom_children): Update call by adding
27971         new argument cleanup_eh.
27972         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27974 2018-01-03  Martin Liska  <mliska@suse.cz>
27976         PR ipa/83549
27977         * cif-code.def (VARIADIC_THUNK): New enum value.
27978         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27979         thunks.
27981 2018-01-03  Jan Beulich  <jbeulich@suse.com>
27983         * sse.md (mov<mode>_internal): Tighten condition for when to use
27984         vmovdqu<ssescalarsize> for TI and OI modes.
27986 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27988         Update copyright years.
27990 2018-01-03  Martin Liska  <mliska@suse.cz>
27992         PR ipa/83594
27993         * ipa-visibility.c (function_and_variable_visibility): Skip
27994         functions with noipa attribure.
27996 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27998         * gcc.c (process_command): Update copyright notice dates.
27999         * gcov-dump.c (print_version): Ditto.
28000         * gcov.c (print_version): Ditto.
28001         * gcov-tool.c (print_version): Ditto.
28002         * gengtype.c (create_file): Ditto.
28003         * doc/cpp.texi: Bump @copying's copyright year.
28004         * doc/cppinternals.texi: Ditto.
28005         * doc/gcc.texi: Ditto.
28006         * doc/gccint.texi: Ditto.
28007         * doc/gcov.texi: Ditto.
28008         * doc/install.texi: Ditto.
28009         * doc/invoke.texi: Ditto.
28011 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28013         * vector-builder.h (vector_builder::m_full_nelts): Change from
28014         unsigned int to poly_uint64.
28015         (vector_builder::full_nelts): Update prototype accordingly.
28016         (vector_builder::new_vector): Likewise.
28017         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28018         (vector_builder::operator ==): Likewise.
28019         (vector_builder::finalize): Likewise.
28020         * int-vector-builder.h (int_vector_builder::int_vector_builder):
28021         Take the number of elements as a poly_uint64 rather than an
28022         unsigned int.
28023         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28024         from unsigned int to poly_uint64.
28025         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28026         (vec_perm_indices::new_vector): Likewise.
28027         (vec_perm_indices::length): Likewise.
28028         (vec_perm_indices::nelts_per_input): Likewise.
28029         (vec_perm_indices::input_nelts): Likewise.
28030         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28031         number of elements per input as a poly_uint64 rather than an
28032         unsigned int.  Use the original encoding for variable-length
28033         vectors, rather than clamping each individual element.
28034         For the second and subsequent elements in each pattern,
28035         clamp the step and base before clamping their sum.
28036         (vec_perm_indices::series_p): Handle polynomial element counts.
28037         (vec_perm_indices::all_in_range_p): Likewise.
28038         (vec_perm_indices_to_tree): Likewise.
28039         (vec_perm_indices_to_rtx): Likewise.
28040         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28041         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28042         (tree_vector_builder::new_binary_operation): Handle polynomial
28043         element counts.  Return false if we need to know the number
28044         of elements at compile time.
28045         * fold-const.c (fold_vec_perm): Punt if the number of elements
28046         isn't known at compile time.
28048 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28050         * vec-perm-indices.h (vec_perm_builder): Change element type
28051         from HOST_WIDE_INT to poly_int64.
28052         (vec_perm_indices::element_type): Update accordingly.
28053         (vec_perm_indices::clamp): Handle polynomial element_types.
28054         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28055         (vec_perm_indices::all_in_range_p): Likewise.
28056         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28057         than shwi trees.
28058         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28059         polynomial vec_perm_indices element types.
28060         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28061         * fold-const.c (fold_vec_perm): Likewise.
28062         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28063         * tree-vect-generic.c (lower_vec_perm): Likewise.
28064         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28065         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28066         element type to HOST_WIDE_INT.
28068 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28069             Alan Hayward  <alan.hayward@arm.com>
28070             David Sherwood  <david.sherwood@arm.com>
28072         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28073         rather than an int.  Use plus_constant.
28074         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28075         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28078             Alan Hayward  <alan.hayward@arm.com>
28079             David Sherwood  <david.sherwood@arm.com>
28081         * calls.c (emit_call_1, expand_call): Change struct_value_size from
28082         a HOST_WIDE_INT to a poly_int64.
28084 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28085             Alan Hayward  <alan.hayward@arm.com>
28086             David Sherwood  <david.sherwood@arm.com>
28088         * calls.c (load_register_parameters): Cope with polynomial
28089         mode sizes.  Require a constant size for BLKmode parameters
28090         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
28091         forces a parameter to be padded at the lsb end in order to
28092         fill a complete number of words, require the parameter size
28093         to be ordered wrt UNITS_PER_WORD.
28095 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28096             Alan Hayward  <alan.hayward@arm.com>
28097             David Sherwood  <david.sherwood@arm.com>
28099         * reload1.c (spill_stack_slot_width): Change element type
28100         from unsigned int to poly_uint64_pod.
28101         (alter_reg): Treat mode sizes as polynomial.
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         * reload.c (complex_word_subreg_p): New function.
28108         (reload_inner_reg_of_subreg, push_reload): Use it.
28110 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28111             Alan Hayward  <alan.hayward@arm.com>
28112             David Sherwood  <david.sherwood@arm.com>
28114         * lra-constraints.c (process_alt_operands): Reject matched
28115         operands whose sizes aren't ordered.
28116         (match_reload): Refer to this check here.
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         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28123         that the mode size is in the set {1, 2, 4, 8, 16}.
28125 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28126             Alan Hayward  <alan.hayward@arm.com>
28127             David Sherwood  <david.sherwood@arm.com>
28129         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28130         Use plus_constant instead of gen_rtx_PLUS.
28132 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28133             Alan Hayward  <alan.hayward@arm.com>
28134             David Sherwood  <david.sherwood@arm.com>
28136         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28137         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28138         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28139         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28140         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28141         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28142         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28143         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28144         * config/i386/i386.c (ix86_push_rounding): ...this new function.
28145         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28146         a poly_int64.
28147         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28148         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28149         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28150         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28151         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28152         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28153         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28154         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28155         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28156         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28157         function.
28158         * expr.c (emit_move_resolve_push): Treat the input and result
28159         of PUSH_ROUNDING as a poly_int64.
28160         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28161         (emit_push_insn): Likewise.
28162         * lra-eliminations.c (mark_not_eliminable): Likewise.
28163         * recog.c (push_operand): Likewise.
28164         * reload1.c (elimination_effects): Likewise.
28165         * rtlanal.c (nonzero_bits1): Likewise.
28166         * calls.c (store_one_arg): Likewise.  Require the padding to be
28167         known at compile time.
28169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28170             Alan Hayward  <alan.hayward@arm.com>
28171             David Sherwood  <david.sherwood@arm.com>
28173         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28174         Use plus_constant instead of gen_rtx_PLUS.
28176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28177             Alan Hayward  <alan.hayward@arm.com>
28178             David Sherwood  <david.sherwood@arm.com>
28180         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28181         rather than an int.
28183 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28184             Alan Hayward  <alan.hayward@arm.com>
28185             David Sherwood  <david.sherwood@arm.com>
28187         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28188         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28189         via stack temporaries.  Treat the mode size as polynomial too.
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_2): When handling conversions involving
28196         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28197         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
28198         as a poly_uint64 too.
28200 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28201             Alan Hayward  <alan.hayward@arm.com>
28202             David Sherwood  <david.sherwood@arm.com>
28204         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28207             Alan Hayward  <alan.hayward@arm.com>
28208             David Sherwood  <david.sherwood@arm.com>
28210         * combine.c (can_change_dest_mode): Handle polynomial
28211         REGMODE_NATURAL_SIZE.
28212         * expmed.c (store_bit_field_1): Likewise.
28213         * expr.c (store_constructor): Likewise.
28214         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28215         and polynomial REGMODE_NATURAL_SIZE.
28216         (gen_lowpart_common): Likewise.
28217         * reginfo.c (record_subregs_of_mode): Likewise.
28218         * rtlanal.c (read_modify_subreg_p): Likewise.
28220 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28221             Alan Hayward  <alan.hayward@arm.com>
28222             David Sherwood  <david.sherwood@arm.com>
28224         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28225         numbers of elements.
28227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28228             Alan Hayward  <alan.hayward@arm.com>
28229             David Sherwood  <david.sherwood@arm.com>
28231         * match.pd: Cope with polynomial numbers of vector elements.
28233 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28234             Alan Hayward  <alan.hayward@arm.com>
28235             David Sherwood  <david.sherwood@arm.com>
28237         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28238         in a POINTER_PLUS_EXPR.
28240 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28241             Alan Hayward  <alan.hayward@arm.com>
28242             David Sherwood  <david.sherwood@arm.com>
28244         * omp-simd-clone.c (simd_clone_subparts): New function.
28245         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28246         (ipa_simd_modify_function_body): Likewise.
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         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28253         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28254         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28255         (expand_vector_condition, vector_element): Likewise.
28256         (subparts_gt): New function.
28257         (get_compute_type): Use subparts_gt.
28258         (count_type_subparts): Delete.
28259         (expand_vector_operations_1): Use subparts_gt instead of
28260         count_type_subparts.
28262 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28263             Alan Hayward  <alan.hayward@arm.com>
28264             David Sherwood  <david.sherwood@arm.com>
28266         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28267         (vect_compile_time_alias): ...this new function.  Do the calculation
28268         on poly_ints rather than trees.
28269         (vect_prune_runtime_alias_test_list): Update call accordingly.
28271 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28272             Alan Hayward  <alan.hayward@arm.com>
28273             David Sherwood  <david.sherwood@arm.com>
28275         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28276         numbers of units.
28277         (vect_schedule_slp_instance): Likewise.
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_get_and_check_slp_defs): Reject
28284         constant and extern definitions for variable-length vectors.
28285         (vect_get_constant_vectors): Note that the number of units
28286         is known to be constant.
28288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28289             Alan Hayward  <alan.hayward@arm.com>
28290             David Sherwood  <david.sherwood@arm.com>
28292         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28293         of units as polynomial.  Choose between WIDE and NARROW based
28294         on multiple_p.
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 (simd_clone_subparts): New function.
28301         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28303 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28304             Alan Hayward  <alan.hayward@arm.com>
28305             David Sherwood  <david.sherwood@arm.com>
28307         * tree-vect-stmts.c (vectorizable_call): Treat the number of
28308         vectors as polynomial.  Use build_index_vector for
28309         IFN_GOMP_SIMD_LANE.
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 (get_load_store_type): Treat the number of
28316         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28317         for variable-length vectors.
28318         (vectorizable_mask_load_store): Treat the number of units as
28319         polynomial, asserting that it is constant if the condition has
28320         already been enforced.
28321         (vectorizable_store, vectorizable_load): Likewise.
28323 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28324             Alan Hayward  <alan.hayward@arm.com>
28325             David Sherwood  <david.sherwood@arm.com>
28327         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28328         of units as polynomial.  Punt if we can't tell at compile time
28329         which vector contains the final result.
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_induction): Treat the number
28336         of units as polynomial.  Punt on SLP inductions.  Use an integer
28337         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
28338         cast of such a series for variable-length floating-point
28339         reductions.
28341 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28342             Alan Hayward  <alan.hayward@arm.com>
28343             David Sherwood  <david.sherwood@arm.com>
28345         * tree.h (build_index_vector): Declare.
28346         * tree.c (build_index_vector): New function.
28347         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28348         of units as polynomial, forcibly converting it to a constant if
28349         vectorizable_reduction has already enforced the condition.
28350         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
28351         to create a {1,2,3,...} vector.
28352         (vectorizable_reduction): Treat the number of units as polynomial.
28353         Choose vectype_in based on the largest scalar element size rather
28354         than the smallest number of units.  Enforce the restrictions
28355         relied on above.
28357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28358             Alan Hayward  <alan.hayward@arm.com>
28359             David Sherwood  <david.sherwood@arm.com>
28361         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28362         number of units as polynomial.
28364 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28365             Alan Hayward  <alan.hayward@arm.com>
28366             David Sherwood  <david.sherwood@arm.com>
28368         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28369         * target.def (autovectorize_vector_sizes): Return the vector sizes
28370         by pointer, using vector_sizes rather than a bitmask.
28371         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28372         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28373         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28374         Likewise.
28375         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28376         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28377         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28378         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28379         * omp-general.c (omp_max_vf): Likewise.
28380         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28381         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28382         * tree-vect-loop.c (vect_analyze_loop): Likewise.
28383         * tree-vect-slp.c (vect_slp_bb): Likewise.
28384         * doc/tm.texi: Regenerate.
28385         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
28386         to a poly_uint64.
28387         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
28388         the vector size as a poly_uint64 rather than an unsigned int.
28389         (current_vector_size): Change from an unsigned int to a poly_uint64.
28390         (get_vectype_for_scalar_type): Update accordingly.
28391         * tree.h (build_truth_vector_type): Take the size and number of
28392         units as a poly_uint64 rather than an unsigned int.
28393         (build_vector_type): Add a temporary overload that takes
28394         the number of units as a poly_uint64 rather than an unsigned int.
28395         * tree.c (make_vector_type): Likewise.
28396         (build_truth_vector_type): Take the number of units as a poly_uint64
28397         rather than an unsigned int.
28399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28400             Alan Hayward  <alan.hayward@arm.com>
28401             David Sherwood  <david.sherwood@arm.com>
28403         * target.def (get_mask_mode): Take the number of units and length
28404         as poly_uint64s rather than unsigned ints.
28405         * targhooks.h (default_get_mask_mode): Update accordingly.
28406         * targhooks.c (default_get_mask_mode): Likewise.
28407         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
28408         * doc/tm.texi: Regenerate.
28410 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28411             Alan Hayward  <alan.hayward@arm.com>
28412             David Sherwood  <david.sherwood@arm.com>
28414         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
28415         * omp-general.c (omp_max_vf): Likewise.
28416         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
28417         (expand_omp_simd): Handle polynomial safelen.
28418         * omp-low.c (omplow_simd_context): Add a default constructor.
28419         (omplow_simd_context::max_vf): Change from int to poly_uint64.
28420         (lower_rec_simd_input_clauses): Update accordingly.
28421         (lower_rec_input_clauses): Likewise.
28423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28424             Alan Hayward  <alan.hayward@arm.com>
28425             David Sherwood  <david.sherwood@arm.com>
28427         * tree-vectorizer.h (vect_nunits_for_cost): New function.
28428         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
28429         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
28430         (vect_analyze_slp_cost): Likewise.
28431         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
28432         (vect_model_load_cost): Likewise.
28434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28435             Alan Hayward  <alan.hayward@arm.com>
28436             David Sherwood  <david.sherwood@arm.com>
28438         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
28439         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
28440         from an unsigned int * to a poly_uint64_pod *.
28441         (calculate_unrolling_factor): New function.
28442         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
28444 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28445             Alan Hayward  <alan.hayward@arm.com>
28446             David Sherwood  <david.sherwood@arm.com>
28448         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
28449         from an unsigned int to a poly_uint64.
28450         (_loop_vec_info::slp_unrolling_factor): Likewise.
28451         (_loop_vec_info::vectorization_factor): Change from an int
28452         to a poly_uint64.
28453         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
28454         (vect_get_num_vectors): New function.
28455         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
28456         (vect_get_num_copies): Use vect_get_num_vectors.
28457         (vect_analyze_data_ref_dependences): Change max_vf from an int *
28458         to an unsigned int *.
28459         (vect_analyze_data_refs): Change min_vf from an int * to a
28460         poly_uint64 *.
28461         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28462         than an unsigned HOST_WIDE_INT.
28463         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
28464         (vect_analyze_data_ref_dependence): Change max_vf from an int *
28465         to an unsigned int *.
28466         (vect_analyze_data_ref_dependences): Likewise.
28467         (vect_compute_data_ref_alignment): Handle polynomial vf.
28468         (vect_enhance_data_refs_alignment): Likewise.
28469         (vect_prune_runtime_alias_test_list): Likewise.
28470         (vect_shift_permute_load_chain): Likewise.
28471         (vect_supportable_dr_alignment): Likewise.
28472         (dependence_distance_ge_vf): Take the vectorization factor as a
28473         poly_uint64 rather than an unsigned HOST_WIDE_INT.
28474         (vect_analyze_data_refs): Change min_vf from an int * to a
28475         poly_uint64 *.
28476         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
28477         vfm1 as a poly_uint64 rather than an int.  Make the same change
28478         for the returned bound_scalar.
28479         (vect_gen_vector_loop_niters): Handle polynomial vf.
28480         (vect_do_peeling): Likewise.  Update call to
28481         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
28482         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
28483         be constant.
28484         * tree-vect-loop.c (vect_determine_vectorization_factor)
28485         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
28486         (vect_get_known_peeling_cost): Likewise.
28487         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
28488         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
28489         (vect_transform_loop): Likewise.  Use the lowest possible VF when
28490         updating the upper bounds of the loop.
28491         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
28492         rather than an int.
28493         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
28494         polynomial unroll factors.
28495         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
28496         (vect_make_slp_decision): Likewise.
28497         (vect_supported_load_permutation_p): Likewise, and polynomial
28498         vf too.
28499         (vect_analyze_slp_cost): Handle polynomial vf.
28500         (vect_slp_analyze_node_operations): Likewise.
28501         (vect_slp_analyze_bb_1): Likewise.
28502         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28503         than an unsigned HOST_WIDE_INT.
28504         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
28505         (vectorizable_load): Handle polynomial vf.
28506         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
28507         a poly_uint64.
28508         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
28510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28511             Alan Hayward  <alan.hayward@arm.com>
28512             David Sherwood  <david.sherwood@arm.com>
28514         * match.pd: Handle bit operations involving three constants
28515         and try to fold one pair.
28517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28519         * tree-vect-loop-manip.c: Include gimple-fold.h.
28520         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
28521         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
28522         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
28523         Add a path that uses a step of VF instead of 1, but disable it
28524         for now.
28525         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
28526         and niters_no_overflow parameters.  Update calls to
28527         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
28528         Create a new SSA name if the latter choses to use a ste other
28529         than zero, and return it via niters_vector_mult_vf_var.
28530         * tree-vect-loop.c (vect_transform_loop): Update calls to
28531         vect_do_peeling, vect_gen_vector_loop_niters and
28532         slpeel_make_loop_iterate_ntimes.
28533         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
28534         (vect_gen_vector_loop_niters): Update declarations after above changes.
28536 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
28538         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
28539         128-bit round to integer instructions.
28540         (ceil<mode>2): Likewise.
28541         (btrunc<mode>2): Likewise.
28542         (round<mode>2): Likewise.
28544 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28546         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
28547         unaligned VSX load/store on P8/P9.
28548         (expand_block_clear): Allow the use of unaligned VSX
28549         load/store on P8/P9.
28551 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28553         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
28554         New function.
28555         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
28556         swap associated with both a load and a store.
28558 2018-01-02  Andrew Waterman  <andrew@sifive.com>
28560         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
28561         * config/riscv/riscv.md (clear_cache): Use it.
28563 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
28565         * web.c: Remove out-of-date comment.
28567 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28569         * expr.c (fixup_args_size_notes): Check that any existing
28570         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
28571         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
28572         (emit_single_push_insn): ...here.
28574 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28576         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
28577         (const_vector_encoded_nelts): New function.
28578         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
28579         (const_vector_int_elt, const_vector_elt): Declare.
28580         * emit-rtl.c (const_vector_int_elt_1): New function.
28581         (const_vector_elt): Likewise.
28582         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
28583         of CONST_VECTOR_ELT.
28585 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28587         * expr.c: Include rtx-vector-builder.h.
28588         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
28589         directly on the tree encoding.
28590         (const_vector_from_tree): Likewise.
28591         * optabs.c: Include rtx-vector-builder.h.
28592         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
28593         sequence of "u" values.
28594         * vec-perm-indices.c: Include rtx-vector-builder.h.
28595         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
28596         directly on the vec_perm_indices encoding.
28598 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28600         * doc/rtl.texi (const_vector): Describe new encoding scheme.
28601         * Makefile.in (OBJS): Add rtx-vector-builder.o.
28602         * rtx-vector-builder.h: New file.
28603         * rtx-vector-builder.c: Likewise.
28604         * rtl.h (rtx_def::u2): Add a const_vector field.
28605         (CONST_VECTOR_NPATTERNS): New macro.
28606         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
28607         (CONST_VECTOR_DUPLICATE_P): Likewise.
28608         (CONST_VECTOR_STEPPED_P): Likewise.
28609         (CONST_VECTOR_ENCODED_ELT): Likewise.
28610         (const_vec_duplicate_p): Check for a duplicated vector encoding.
28611         (unwrap_const_vec_duplicate): Likewise.
28612         (const_vec_series_p): Check for a non-duplicated vector encoding.
28613         Say that the function only returns true for integer vectors.
28614         * emit-rtl.c: Include rtx-vector-builder.h.
28615         (gen_const_vec_duplicate_1): Delete.
28616         (gen_const_vector): Call gen_const_vec_duplicate instead of
28617         gen_const_vec_duplicate_1.
28618         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
28619         (gen_const_vec_duplicate): Use rtx_vector_builder.
28620         (gen_const_vec_series): Likewise.
28621         (gen_rtx_CONST_VECTOR): Likewise.
28622         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
28623         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28624         Build a new vector rather than modifying a CONST_VECTOR in-place.
28625         (handle_special_swappables): Update call accordingly.
28626         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
28627         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28628         Build a new vector rather than modifying a CONST_VECTOR in-place.
28629         (handle_special_swappables): Update call accordingly.
28631 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28633         * simplify-rtx.c (simplify_const_binary_operation): Use
28634         CONST_VECTOR_ELT instead of XVECEXP.
28636 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28638         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
28639         the selector elements to be different from the data elements
28640         if the selector is a VECTOR_CST.
28641         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
28642         ssizetype for the selector.
28644 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28646         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
28647         before testing each element individually.
28648         * tree-vect-generic.c (lower_vec_perm): Likewise.
28650 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28652         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
28653         * selftest-run-tests.c (selftest::run_tests): Call it.
28654         * vector-builder.h (vector_builder::operator ==): New function.
28655         (vector_builder::operator !=): Likewise.
28656         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
28657         (vec_perm_indices::all_from_input_p): New function.
28658         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28659         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
28660         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
28661         instead of reading the VECTOR_CST directly.  Detect whether both
28662         vector inputs are the same before constructing the vec_perm_indices,
28663         and update the number of inputs argument accordingly.  Use the
28664         utility functions added above.  Only construct sel2 if we need to.
28666 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28668         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
28669         the broadcast of the low byte.
28670         (expand_mult_highpart): Use an explicit encoding for the permutes.
28671         * optabs-query.c (can_mult_highpart_p): Likewise.
28672         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
28673         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28674         (vectorizable_bswap): Likewise.
28675         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
28676         explicit encoding for the power-of-2 permutes.
28677         (vect_permute_store_chain): Likewise.
28678         (vect_grouped_load_supported): Likewise.
28679         (vect_permute_load_chain): Likewise.
28681 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28683         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
28684         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
28685         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
28686         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28687         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
28688         (vect_gen_perm_mask_any): Likewise.
28690 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28692         * int-vector-builder.h: New file.
28693         * vec-perm-indices.h: Include int-vector-builder.h.
28694         (vec_perm_indices): Redefine as an int_vector_builder.
28695         (auto_vec_perm_indices): Delete.
28696         (vec_perm_builder): Redefine as a stand-alone class.
28697         (vec_perm_indices::vec_perm_indices): New function.
28698         (vec_perm_indices::clamp): Likewise.
28699         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
28700         (vec_perm_indices::new_vector): New function.
28701         (vec_perm_indices::new_expanded_vector): Update for new
28702         vec_perm_indices class.
28703         (vec_perm_indices::rotate_inputs): New function.
28704         (vec_perm_indices::all_in_range_p): Operate directly on the
28705         encoded form, without computing elided elements.
28706         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
28707         encoding.  Update for new vec_perm_indices class.
28708         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
28709         the given vec_perm_builder.
28710         (expand_vec_perm_var): Update vec_perm_builder constructor.
28711         (expand_mult_highpart): Use vec_perm_builder instead of
28712         auto_vec_perm_indices.
28713         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
28714         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
28715         or double series encoding as appropriate.
28716         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
28717         vec_perm_indices instead of auto_vec_perm_indices.
28718         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28719         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28720         (vect_permute_store_chain): Likewise.
28721         (vect_grouped_load_supported): Likewise.
28722         (vect_permute_load_chain): Likewise.
28723         (vect_shift_permute_load_chain): Likewise.
28724         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28725         (vect_transform_slp_perm_load): Likewise.
28726         (vect_schedule_slp_instance): Likewise.
28727         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28728         (vectorizable_mask_load_store): Likewise.
28729         (vectorizable_bswap): Likewise.
28730         (vectorizable_store): Likewise.
28731         (vectorizable_load): Likewise.
28732         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
28733         vec_perm_indices instead of auto_vec_perm_indices.  Use
28734         tree_to_vec_perm_builder to read the vector from a tree.
28735         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
28736         vec_perm_builder instead of a vec_perm_indices.
28737         (have_whole_vector_shift): Use vec_perm_builder and
28738         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
28739         truncation to calc_vec_perm_mask_for_shift.
28740         (vect_create_epilog_for_reduction): Likewise.
28741         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
28742         from auto_vec_perm_indices to vec_perm_indices.
28743         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28744         instead of changing individual elements.
28745         (aarch64_vectorize_vec_perm_const): Use new_vector to install
28746         the vector in d.perm.
28747         * config/arm/arm.c (expand_vec_perm_d::perm): Change
28748         from auto_vec_perm_indices to vec_perm_indices.
28749         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28750         instead of changing individual elements.
28751         (arm_vectorize_vec_perm_const): Use new_vector to install
28752         the vector in d.perm.
28753         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
28754         Update vec_perm_builder constructor.
28755         (rs6000_expand_interleave): Likewise.
28756         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
28757         (rs6000_expand_interleave): Likewise.
28759 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28761         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
28762         to qimode could truncate the indices.
28763         * optabs.c (expand_vec_perm_var): Likewise.
28765 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28767         * Makefile.in (OBJS): Add vec-perm-indices.o.
28768         * vec-perm-indices.h: New file.
28769         * vec-perm-indices.c: Likewise.
28770         * target.h (vec_perm_indices): Replace with a forward class
28771         declaration.
28772         (auto_vec_perm_indices): Move to vec-perm-indices.h.
28773         * optabs.h: Include vec-perm-indices.h.
28774         (expand_vec_perm): Delete.
28775         (selector_fits_mode_p, expand_vec_perm_var): Declare.
28776         (expand_vec_perm_const): Declare.
28777         * target.def (vec_perm_const_ok): Replace with...
28778         (vec_perm_const): ...this new hook.
28779         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
28780         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
28781         * doc/tm.texi: Regenerate.
28782         * optabs.def (vec_perm_const): Delete.
28783         * doc/md.texi (vec_perm_const): Likewise.
28784         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
28785         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
28786         expand_vec_perm for constant permutation vectors.  Assert that
28787         the mode of variable permutation vectors is the integer equivalent
28788         of the mode that is being permuted.
28789         * optabs-query.h (selector_fits_mode_p): Declare.
28790         * optabs-query.c: Include vec-perm-indices.h.
28791         (selector_fits_mode_p): New function.
28792         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
28793         is defined, instead of checking whether the vec_perm_const_optab
28794         exists.  Use targetm.vectorize.vec_perm_const instead of
28795         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
28796         fit in the vector mode before using a variable permute.
28797         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
28798         vec_perm_indices instead of an rtx.
28799         (expand_vec_perm): Replace with...
28800         (expand_vec_perm_const): ...this new function.  Take the selector
28801         as a vec_perm_indices rather than an rtx.  Also take the mode of
28802         the selector.  Update call to shift_amt_for_vec_perm_mask.
28803         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
28804         Use vec_perm_indices::new_expanded_vector to expand the original
28805         selector into bytes.  Check whether the indices fit in the vector
28806         mode before using a variable permute.
28807         (expand_vec_perm_var): Make global.
28808         (expand_mult_highpart): Use expand_vec_perm_const.
28809         * fold-const.c: Includes vec-perm-indices.h.
28810         * tree-ssa-forwprop.c: Likewise.
28811         * tree-vect-data-refs.c: Likewise.
28812         * tree-vect-generic.c: Likewise.
28813         * tree-vect-loop.c: Likewise.
28814         * tree-vect-slp.c: Likewise.
28815         * tree-vect-stmts.c: Likewise.
28816         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
28817         Delete.
28818         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
28819         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
28820         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
28821         (aarch64_vectorize_vec_perm_const): ...this new function.
28822         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28823         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28824         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
28825         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
28826         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28827         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28828         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28829         into...
28830         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
28831         check for NEON modes.
28832         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28833         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28834         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28835         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28836         into...
28837         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
28838         the old VEC_PERM_CONST conditions.
28839         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28840         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28841         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28842         (ia64_vectorize_vec_perm_const_ok): Merge into...
28843         (ia64_vectorize_vec_perm_const): ...this new function.
28844         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28845         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28846         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28847         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28848         * config/mips/mips.c (mips_expand_vec_perm_const)
28849         (mips_vectorize_vec_perm_const_ok): Merge into...
28850         (mips_vectorize_vec_perm_const): ...this new function.
28851         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28852         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28853         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28854         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28855         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28856         (rs6000_expand_vec_perm_const): Delete.
28857         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28858         Delete.
28859         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28860         (altivec_expand_vec_perm_const_le): Take each operand individually.
28861         Operate on constant selectors rather than rtxes.
28862         (altivec_expand_vec_perm_const): Likewise.  Update call to
28863         altivec_expand_vec_perm_const_le.
28864         (rs6000_expand_vec_perm_const): Delete.
28865         (rs6000_vectorize_vec_perm_const_ok): Delete.
28866         (rs6000_vectorize_vec_perm_const): New function.
28867         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28868         an element count and rtx array.
28869         (rs6000_expand_extract_even): Update call accordingly.
28870         (rs6000_expand_interleave): Likewise.
28871         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28872         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28873         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28874         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28875         (rs6000_expand_vec_perm_const): Delete.
28876         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28877         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28878         (altivec_expand_vec_perm_const_le): Take each operand individually.
28879         Operate on constant selectors rather than rtxes.
28880         (altivec_expand_vec_perm_const): Likewise.  Update call to
28881         altivec_expand_vec_perm_const_le.
28882         (rs6000_expand_vec_perm_const): Delete.
28883         (rs6000_vectorize_vec_perm_const_ok): Delete.
28884         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
28885         reference to the SPE evmerge intructions.
28886         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28887         an element count and rtx array.
28888         (rs6000_expand_extract_even): Update call accordingly.
28889         (rs6000_expand_interleave): Likewise.
28890         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28891         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28892         new function.
28893         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28895 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28897         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28898         vector mode and that that mode matches the mode of the data
28899         being permuted.
28900         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28901         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
28902         directly using expand_vec_perm_1 when forcing selectors into
28903         registers.
28904         (expand_vec_perm_var): New function, split out from expand_vec_perm.
28906 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28908         * optabs-query.h (can_vec_perm_p): Delete.
28909         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28910         * optabs-query.c (can_vec_perm_p): Split into...
28911         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28912         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28913         particular selector is valid.
28914         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28915         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28916         (vect_grouped_load_supported): Likewise.
28917         (vect_shift_permute_load_chain): Likewise.
28918         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28919         (vect_transform_slp_perm_load): Likewise.
28920         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28921         (vectorizable_bswap): Likewise.
28922         (vect_gen_perm_mask_checked): Likewise.
28923         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
28924         implementations of variable permutation vectors into account
28925         when deciding which selector to use.
28926         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28927         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28928         with a false third argument.
28929         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28930         to test whether the constant selector is valid and can_vec_perm_var_p
28931         to test whether a variable selector is valid.
28933 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28935         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28936         * optabs-query.c (can_vec_perm_p): Likewise.
28937         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28938         instead of vec_perm_indices.
28939         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28940         (vect_gen_perm_mask_checked): Likewise,
28941         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28942         (vect_gen_perm_mask_checked): Likewise,
28944 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28946         * optabs-query.h (qimode_for_vec_perm): Declare.
28947         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28948         (qimode_for_vec_perm): ...this new function.
28949         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28951 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28953         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28954         does not have a conditional at the top.
28956 2018-01-02  Richard Biener  <rguenther@suse.de>
28958         * ipa-inline.c (big_speedup_p): Fix expression.
28960 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28962         PR target/81616
28963         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28964         for generic 4->6.
28966 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28968         PR target/81616
28969         Generic tuning.
28970         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28971         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28972         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28973         cond_taken_branch_cost 3->4.
28975 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
28977         PR tree-optimization/83581
28978         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28979         TODO_cleanup_cfg if any changes have been made.
28981         PR middle-end/83608
28982         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28983         convert_modes if target mode has the right side, but different mode
28984         class.
28986         PR middle-end/83609
28987         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28988         last argument when extracting from CONCAT.  If either from_real or
28989         from_imag is NULL, use expansion through memory.  If result is not
28990         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28991         the parts directly to inner mode, if even that fails, use expansion
28992         through memory.
28994         PR middle-end/83623
28995         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28996         check for bswap in mode rather than HImode and use that in expand_unop
28997         too.
28999 Copyright (C) 2018 Free Software Foundation, Inc.
29001 Copying and distribution of this file, with or without modification,
29002 are permitted in any medium without royalty provided the copyright
29003 notice and this notice are preserved.