1 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
2 Richard Biener <rguenther@suse.de>
4 * bitmap.h: Update data structure documentation, including a
5 description of bitmap views as either linked-lists or splay trees.
6 (struct bitmap_element_def): Update comments for splay tree bitmaps.
7 (struct bitmap_head_def): Likewise.
8 (bitmap_list_view, bitmap_tree_view): New prototypes.
9 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
11 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
12 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
13 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
14 released bitmap element here.
15 (bitmap_element_free): Remove.
16 (bitmap_elt_clear_from): Work on splay tree bitmaps.
17 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
18 this function similar ones such that linked-list bitmap implementation
19 functions are grouped.
20 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
21 and moved for grouping.
22 (bitmap_list_insert_element_after): Renamed from
23 bitmap_elt_insert_after, and moved for grouping.
24 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
25 (bitmap_tree_link_left, bitmap_tree_link_right,
26 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
27 bitmap_tree_link_element, bitmap_tree_unlink_element,
28 bitmap_tree_find_element): New functions for splay-tree bitmap
30 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
31 Renamed and moved, see above entries.
32 (bitmap_tree_listify_from): New function to convert part of a splay
33 tree bitmap to a linked-list bitmap.
34 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
35 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
36 (bitmap_find_bit): Remove.
37 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
38 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
39 Handle splay tree bitmaps.
40 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
41 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
42 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
43 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
44 bitmap_intersect_compl_p, bitmap_ior_and_compl,
45 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
46 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
47 corresponding changes to use linked-list specific bitmap_element
48 manipulation functions as applicable for efficiency.
49 (bitmap_tree_to_vec): New function.
50 (debug_bitmap_elt_file): New function split out from ...
51 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
52 (bitmap_print): Likewise.
54 PR tree-optimization/63155
55 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
57 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
60 2018-10-22 Martin Liska <mliska@suse.cz>
62 PR tree-optimization/87686
64 2018-08-29 Martin Liska <mliska@suse.cz>
66 * tree-switch-conversion.c (switch_conversion::expand):
67 Strenghten assumption about gswitch statements.
69 2018-10-22 Martin Liska <mliska@suse.cz>
71 * ipa-icf.c (sem_item::compare_attributes): Remove.
72 (sem_item::compare_referenced_symbol_properties): Use
73 attribute_list_equal instead.
74 (sem_function::equals_wpa): Likewise.
75 * ipa-icf.h: Remove compare_attributes.
77 2018-10-22 Richard Biener <rguenther@suse.de>
80 * mem-stats.h (mem_usage::operator==): Fix pasto.
82 2018-10-22 Richard Biener <rguenther@suse.de>
84 PR tree-optimization/87640
85 * tree-vrp.c (set_value_range_with_overflow): Decompose
87 (extract_range_from_binary_expr_1): Adjust.
89 2018-10-22 Martin Jambor <mjambor@suse.cz>
91 * tree-eh.h (stmt_could_throw_p): Add function parameter.
92 (stmt_can_throw_external): Likewise.
93 (stmt_can_throw_internal): Likewise.
94 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
95 (lower_eh_constructs_2): Likewise.
96 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
97 (stmt_can_throw_external): Likewise.
98 (stmt_can_throw_internal): Likewise.
99 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
100 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
101 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
102 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
103 (pass_lower_eh_dispatch::execute): Pass cfun to
104 stmt_can_throw_external.
105 (cleanup_empty_eh): Likewise.
106 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
107 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
108 stmt_can_throw_external instead of pushing it to cfun.
109 (symbol_table::create_edge): Likewise.
110 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
111 stmt_can_throw_internal.
112 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
113 to stmt_could_throw_p.
114 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
115 stmt_can_throw_internal.
116 (pass_store_merging::execute): Likewise.
117 * gimple-ssa-strength-reduction.c
118 (find_candidates_dom_walker::before_dom_children): Pass cfun to
120 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
121 stmt_can_throw_internal.
122 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
123 to stmt_can_throw_external.
124 (check_stmt): Pass cfun to stmt_could_throw_p.
125 (check_stmt): Pass cfun to stmt_can_throw_external.
126 (pass_nothrow::execute): Likewise.
127 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
128 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
129 stmt_can_throw_internal.
130 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
131 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
132 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
133 * tree-complex.c (expand_complex_libcall): Pass cfun to
134 stmt_could_throw_p and to stmt_can_throw_internal.
135 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
136 * tree-inline.c (copy_edges_for_bb): Likewise.
137 (maybe_move_debug_stmts_to_successors): Likewise.
138 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
140 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
141 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
142 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
143 stmt_can_throw_internal.
144 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
145 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
147 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
148 stmt_can_throw_internal.
149 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
150 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
152 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
153 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
154 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
155 (convert_mult_to_fma_1): Likewise.
156 (convert_to_divmod): Likewise.
157 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
158 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
159 * tree-ssa-propagate.c
160 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
161 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
162 (maybe_optimize_range_tests): Likewise.
163 (linearize_expr_tree): Likewise.
164 (reassociate_bb): Likewise.
165 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
166 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
167 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
168 (handle_char_store): Likewise.
169 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
170 stmt_can_throw_internal.
171 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
173 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
174 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
175 (vectorizable_simd_clone_call): Likewise.
176 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
177 (gimple_stringop_fixed_value): Likewise.
179 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
181 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
182 literal pool references.
183 (s390_check_qrst_address): Adapt to the new behavior of
184 s390_loadrelative_operand_p ().
186 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
189 * config/i386/sse.md (*andnot<mode>3_bcst): New.
191 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
194 * config/i386/sse.md (*<code><mode>3_bcst): New.
196 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
199 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
200 V4DI, V16SI and V8DI.
201 (*sub<mode>3<mask_name>_bcst): New.
202 (*add<mode>3<mask_name>_bcst): Likewise.
204 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
207 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
208 __builtin_ia32_vfnmsubpd512_mask.
209 (_mm512_mask_fnmsub_round_pd): Likewise.
210 (_mm512_fnmsub_pd): Likewise.
211 (_mm512_mask_fnmsub_pd): Likewise.
212 (_mm512_maskz_fnmsub_round_pd): Use
213 __builtin_ia32_vfnmsubpd512_maskz.
214 (_mm512_maskz_fnmsub_pd): Likewise.
215 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
216 (_mm512_mask_fnmsub_round_ps): Likewise.
217 (_mm512_fnmsub_ps): Likewise.
218 (_mm512_mask_fnmsub_ps): Likewise.
219 (_mm512_maskz_fnmsub_round_ps): Use
220 __builtin_ia32_vfnmsubps512_maskz.
221 (_mm512_maskz_fnmsub_ps): Likewise.
222 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
223 __builtin_ia32_vfnmsubpd256_mask.
224 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
225 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
226 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
227 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
228 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
229 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
230 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
231 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
232 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
233 __builtin_ia32_vfnmsubpd.
234 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
235 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
236 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
237 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
238 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
239 * config/i386/i386-builtin.def: Add
240 __builtin_ia32_vfnmsubpd256_mask,
241 __builtin_ia32_vfnmsubpd256_maskz,
242 __builtin_ia32_vfnmsubpd128_mask,
243 __builtin_ia32_vfnmsubpd128_maskz,
244 __builtin_ia32_vfnmsubps256_mask,
245 __builtin_ia32_vfnmsubps256_maskz,
246 __builtin_ia32_vfnmsubps128_mask,
247 __builtin_ia32_vfnmsubps128_maskz,
248 __builtin_ia32_vfnmsubpd512_mask,
249 __builtin_ia32_vfnmsubpd512_maskz,
250 __builtin_ia32_vfnmsubps512_mask,
251 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
252 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
253 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
254 __builtin_ia32_vfnmsubpd256.
255 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
256 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
257 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
259 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
261 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
263 (fmai_vmfnmsub_<mode><round_name>): Likewise.
265 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
268 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
269 __builtin_ia32_vfnmaddpd512_mask.
270 (_mm512_mask_fnmadd_round_pd): Likewise.
271 (_mm512_fnmadd_pd): Likewise.
272 (_mm512_mask_fnmadd_pd): Likewise.
273 (_mm512_maskz_fnmadd_round_pd): Use
274 __builtin_ia32_vfnmaddpd512_maskz.
275 (_mm512_maskz_fnmadd_pd): Likewise.
276 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
277 (_mm512_mask_fnmadd_round_ps): Likewise.
278 (_mm512_fnmadd_ps): Likewise.
279 (_mm512_mask_fnmadd_ps): Likewise.
280 (_mm512_maskz_fnmadd_round_ps): Use
281 __builtin_ia32_vfnmaddps512_maskz.
282 (_mm512_maskz_fnmadd_ps): Likewise.
283 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
284 __builtin_ia32_vfnmaddpd256_mask.
285 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
286 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
287 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
288 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
289 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
290 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
291 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
292 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
293 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
294 __builtin_ia32_vfnmaddpd.
295 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
296 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
297 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
298 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
299 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
300 * config/i386/i386-builtin.def: Add
301 __builtin_ia32_vfnmaddpd256_mask,
302 __builtin_ia32_vfnmaddpd256_maskz,
303 __builtin_ia32_vfnmaddpd128_mask,
304 __builtin_ia32_vfnmaddpd128_maskz,
305 __builtin_ia32_vfnmaddps256_mask,
306 __builtin_ia32_vfnmaddps256_maskz,
307 __builtin_ia32_vfnmaddps128_mask,
308 __builtin_ia32_vfnmaddps128_maskz,
309 __builtin_ia32_vfnmaddpd512_mask,
310 __builtin_ia32_vfnmaddpd512_maskz,
311 __builtin_ia32_vfnmaddps512_mask,
312 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
313 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
314 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
315 __builtin_ia32_vfnmaddpd256.
316 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
317 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
318 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
320 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
322 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
324 (fmai_vmfnmadd_<mode><round_name>): Likewise.
326 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
329 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
330 __builtin_ia32_vfmsubpd512_mask.
331 (_mm512_mask_fmsub_round_pd): Likewise.
332 (_mm512_fmsub_pd): Likewise.
333 (_mm512_mask_fmsub_pd): Likewise.
334 (_mm512_maskz_fmsub_round_pd): Use
335 __builtin_ia32_vfmsubpd512_maskz.
336 (_mm512_maskz_fmsub_pd): Likewise.
337 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
338 (_mm512_mask_fmsub_round_ps): Likewise.
339 (_mm512_fmsub_ps): Likewise.
340 (_mm512_mask_fmsub_ps): Likewise.
341 (_mm512_maskz_fmsub_round_ps): Use
342 __builtin_ia32_vfmsubps512_maskz.
343 (_mm512_maskz_fmsub_ps): Likewise.
344 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
345 __builtin_ia32_vfmsubpd256_mask.
346 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
347 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
348 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
349 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
350 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
351 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
352 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
353 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
354 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
355 __builtin_ia32_vfmsubpd.
356 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
357 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
358 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
359 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
360 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
361 * config/i386/i386-builtin.def: Add
362 __builtin_ia32_vfmsubpd256_mask,
363 __builtin_ia32_vfmsubpd256_maskz,
364 __builtin_ia32_vfmsubpd128_mask,
365 __builtin_ia32_vfmsubpd128_maskz,
366 __builtin_ia32_vfmsubps256_mask,
367 __builtin_ia32_vfmsubps256_maskz,
368 __builtin_ia32_vfmsubps128_mask,
369 __builtin_ia32_vfmsubps128_maskz,
370 __builtin_ia32_vfmsubpd512_mask,
371 __builtin_ia32_vfmsubpd512_maskz,
372 __builtin_ia32_vfmsubps512_mask,
373 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
374 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
375 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
376 __builtin_ia32_vfmsubpd256.
377 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
378 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
379 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
381 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
383 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
385 (fmai_vmfmsub_<mode><round_name>): Likewise.
387 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
389 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
390 Remove plus. Renamed to ...
391 (*sub<mode>3<mask_name>_bcst): This.
392 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
393 (*add<mode>3<mask_name>_bcst): This.
395 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
398 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
400 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
403 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
404 (_mm_or_epi32): Likewise.
405 (_mm256_xor_epi32): Likewise.
406 (_mm_xor_epi32): Likewise.
407 (_mm256_or_epi64): Likewise.
408 (_mm_or_epi64): Likewise.
409 (_mm256_xor_epi64): Likewise.
410 (_mm_xor_epi64): Likewise.
412 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
415 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
417 2018-10-20 Jakub Jelinek <jakub@redhat.com>
420 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
422 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
424 * doc/ux.texi: Move @section directly after @node.
426 2018-10-19 Jakub Jelinek <jakub@redhat.com>
430 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
431 depend closely nested inside of loop with ordered clause with
434 2018-10-19 David Malcolm <dmalcolm@redhat.com>
436 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
437 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
438 * doc/ux.texi: New file.
440 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
442 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
443 be the first CR field allocated.
445 2018-10-19 Richard Biener <rguenther@suse.de>
448 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
449 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
451 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
455 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
456 (*add<mode>3<mask_name>_bcst_2): Likewise.
458 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
461 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
462 Replace nonimmediate_operand with register_operand.
463 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
465 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
468 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
470 PR rtl-optimization/87596
471 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
472 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
473 for instructions in FROM..TO range.
475 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
477 * cfgexpand.c (expand_one_var): Use specific wording in error message
478 for non-local frame variables.
479 * stor-layout.c (layout_decl): Do not issue a warning for them.
481 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
483 * haifa-sched.c (priority): Add force_recompute parameter.
484 (apply_replacement): Call priority () with force_recompute = true.
485 (restore_pattern): Likewise.
487 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
489 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
490 HOST_BITS_PER_WIDE_INT.
491 (test_vector_ops_duplicate): Likewise.
493 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
496 * config/i386/sse.md (VF_AVX512): New.
497 (avx512bcst): Likewise.
498 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
500 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
502 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
505 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
507 * doc/invoke.texi (-dumpversion): Improve grammar.
508 (-dumpfullversion): Make more consistent with -dumpversion.
510 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
512 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
513 Set JUMP_LABEL to the jump insn.
514 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
515 Predict emitted jump and add label to jump insn.
517 2018-10-18 David Malcolm <dmalcolm@redhat.com>
519 PR tree-optimization/87562
520 * input.c (get_substring_ranges_for_loc): Use
521 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
522 getting the linemap for the endpoint. Verify that it's either
523 in the same linemap as the start point's spelling location, or
524 at least in the same file.
526 2018-10-18 Richard Biener <rguenther@suse.de>
528 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
529 feed width-specific load/store costs through ix86_vec_cost.
530 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
532 (bdver_cost): Likewise.
533 (znver1_cost): Likewise.
534 (btver1_cost): Likewise.
535 (btver2_cost): Likewise.
537 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
539 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
540 to simplify subreg of vec_merge.
542 2018-10-18 Richard Biener <rguenther@suse.de>
544 * config/i386/i386.c: Fix costing of vector FMA.
546 2018-10-18 Richard Biener <rguenther@suse.de>
548 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
550 (ix86_builtin_vectorization_cost): For vec_construct properly
551 cost insertion into SSE regs.
552 (...): Adjust calls to ix86_vec_cost.
554 2018-10-18 Richard Biener <rguenther@suse.de>
558 2018-02-07 Richard Biener <rguenther@suse.de>
560 PR tree-optimization/84204
561 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
564 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
567 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
569 (test_vector_ops_duplicate): Add test for a scalar subreg of a
570 VEC_MERGE of a VEC_DUPLICATE.
572 2018-10-17 Joseph Myers <joseph@codesourcery.com>
574 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
575 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
576 * doc/standards.texi (C Language): Document C2X.
577 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
578 (rl78_option_override): Handle "GNU C2X" language name.
580 2018-10-17 Joseph Myers <joseph@codesourcery.com>
582 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
583 Document C17 as published in 2018.
585 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
588 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
589 bail out if both sides do not have the same storage order.
591 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
593 * bitmap.c (bitmap_head::dump): New.
594 * bitmap.h (bitmap_head): Add dump().
595 * gimple-ssa-evrp-analyze.c
596 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
597 (evrp_range_analyzer::set_ssa_range_info): Same.
598 (evrp_range_analyzer::record_ranges_from_phis): Same.
599 (evrp_range_analyzer::record_ranges_from_stmt): Same.
600 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
601 * gimple-ssa-sprintf.c (get_int_range): Same.
602 (format_integer): Same.
603 (sprintf_dom_walker::handle_gimple_call): Same.
604 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
605 (ipcp_vr_lattice::top_p): Same.
606 (ipcp_vr_lattice::bottom_p): Same.
607 (ipcp_vr_lattice::set_to_bottom): Same.
608 (ipa_vr_operation_and_type_effects): Same.
609 (propagate_vr_across_jump_function): Same.
610 (ipcp_store_vr_results): Same.
611 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
612 (ipa_print_node_jump_functions_for_edge): Same.
613 (ipa_get_value_range): Same.
614 (ipa_compute_jump_functions_for_edge): Same.
615 (ipa_write_jump_function): Same.
616 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
617 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
619 * vr-values.c (set_value_range_to_nonnegative): Same.
620 (set_value_range_to_truthvalue): Same.
621 (vr_values::get_value_range): Same.
622 (vr_values::set_defs_to_varying): Same.
623 (vr_values::update_value_range): Same.
624 (symbolic_range_based_on_p): Same.
625 (vr_values::op_with_boolean_value_range_p): Same.
626 (vr_values::extract_range_for_var_from_comparison_expr): Same.
627 (vr_values::extract_range_from_ssa_name): Same.
628 (vr_values::extract_range_from_binary_expr): Same.
629 (vr_values::extract_range_from_unary_expr): Same.
630 (vr_values::extract_range_from_cond_expr): Same.
631 (vr_values::extract_range_from_comparison): Same.
632 (vr_values::check_for_binary_op_overflow): Same.
633 (vr_values::extract_range_basic): Same.
634 (vr_values::extract_range_from_assignment): Same.
635 (compare_ranges): Same.
636 (compare_range_with_value): Same.
637 (vr_values::adjust_range_with_scev): Same.
638 (vrp_valueize): Same.
639 (vrp_valueize_1): Same.
640 (vr_values::get_vr_for_comparison): Same.
641 (vr_values::compare_name_with_value): Same.
642 (vr_values::compare_names): Same.
643 (vr_values::vrp_evaluate_conditional): Same.
644 (find_case_label_ranges): Same.
645 (vr_values::vrp_visit_switch_stmt): Same.
646 (vr_values::extract_range_from_phi_node): Same.
647 (vr_values::simplify_div_or_mod_using_ranges): Same.
648 (vr_values::simplify_bit_ops_using_ranges): Same.
649 (test_for_singularity): Same.
650 (range_fits_type_p): Same.
651 (vr_values::simplify_cond_using_ranges_1): Same.
652 (vr_values::simplify_switch_using_ranges): Same.
653 (vr_values::simplify_float_conversion_using_ranges): Same.
654 (vr_values::two_valued_val_range_p): Same.
655 (vr_values::add_equivalence): Move to value_range::equiv_add.
656 * vr-values.h (vr_values::add_equivalence): Remove.
657 (VR_INITIALIZER): Remove.
658 * tree-vrp.c (value_range::set): New.
659 (value_range::equiv_add): New.
660 (value_range::value_range): New.
661 (value_range::deep_copy): New.
662 (value_range::check): New.
663 (value_range::equal_p): New.
664 (value_range::ignore_equivs_equal_p): New.
665 (value_range::operator==): New.
666 (value_range::operator!=): New.
667 (value_range::symbolic_p): New.
668 (value_range::numeric_p): New.
669 (value_range::set_undefined): New.
670 (value_range::set_varying): New.
671 (value_range::may_contain_p): New.
672 (value_range::equiv_clear): New.
673 (value_range::singleton_p): New.
674 (value_range::intersect): New.
675 (value_range::dump): New.
676 (value_range::set_and_canonicalize): New.
677 (set_value_range): Adjust for value_range API.
678 (set_value_range_to_undefined): Same.
679 (set_value_range_to_varying): Same.
680 (set_and_canonicalize_value_range): Same.
681 (set_value_range_to_nonnull): Same.
682 (set_value_range_to_null): Same.
683 (range_is_null): Same.
684 (range_is_nonnull): Same.
685 (range_int_cst_p): Same.
686 (range_int_cst_singleton_p): Same.
687 (symbolic_range_p): Same.
688 (range_includes_zero_p): Same.
689 (value_range_constant_singleton): Same.
690 (vrp_set_zero_nonzero_bits): Same.
691 (ranges_from_anti_range): Same.
692 (extract_range_into_wide_ints): Same.
693 (extract_range_from_multiplicative_op): Same.
694 (set_value_range_with_overflow): Same.
695 (extract_range_from_binary_expr_1): Same.
696 (extract_range_from_unary_expr): Same.
697 (dump_value_range): Same.
698 (debug_value_range): Same.
699 (vrp_prop::check_array_ref): Same.
700 (vrp_prop::check_mem_ref): Same.
701 (vrp_prop::vrp_initialize): Same.
702 (vrp_prop::visit_stmt): Same.
703 (intersect_ranges): Same.
704 (vrp_prop::visit_phi): Same.
705 (vrp_prop::vrp_finalize): Same.
706 (determine_value_range_1): Same.
707 (determine_value_range): Same.
708 (vrp_intersect_ranges_1): Rename to...
709 (vrp_intersect_1): this.
710 (vrp_intersect_ranges): Rename to...
711 (value_range::intersect_helper): ...this.
712 (vrp_meet_1): Rename to...
713 (value_range::union_helper): ...this.
714 (vrp_meet): Rename to...
715 (value_range::union_): ...this.
716 (copy_value_range): Remove.
717 * tree-vrp.h (struct value_range): Rewrite into a proper class.
718 (value_range::vrtype): New.
719 (value_range::type): New.
720 (value_range::equiv): New.
721 (value_range::min): New.
722 (value_range::max): New.
723 (value_range::varying_p): New.
724 (value_range::undefined_p): New.
725 (value_range::null_p): New.
726 (value_range::equiv_add): New.
727 (copy_value_range): Remove.
729 2018-10-17 David Malcolm <dmalcolm@redhat.com>
731 * Makefile.in (SELFTEST_TARGETS): New.
732 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
733 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
734 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
736 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
737 (selftest-c++-gdb, selftest-c++-valgrind): Move to
739 * configure: Regenerate.
740 * configure.ac (selftest_languages): New.
742 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
744 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
745 overflow wraps argument.
746 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
747 wide_int_range_multiplicative_op.
748 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
749 overflow wraps argument.
750 (wide_int_range_multiplicative_op): Same.
751 (wide_int_range_lshift): Same.
752 (wide_int_range_div): Same.
753 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
754 (wide_int_range_lshift): Same.
755 (wide_int_range_div): Same.
757 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
759 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
760 use sign as argument.
761 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
762 wide_int_range_shift_undefined_p.
764 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
766 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
768 (@despeculate_copy<ALLI_TI:mode>): ... This.
769 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
772 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
774 * config.gcc: Obsolete *-*-solaris2.10*.
775 * doc/install.texi (Specific, *-*-solaris2*): Document it.
777 2018-10-12 Jeff Law <law@redhat.com>
779 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
780 reg + sym +- const_int addressing modes.
782 2018-10-15 David Malcolm <dmalcolm@redhat.com>
784 * common.opt (fdiagnostics-minimum-margin-width=): New option.
785 * diagnostic-show-locus.c (layout::layout): Apply the minimum
787 (layout::start_annotation_line): Only print up to 3 of the
788 margin character, to avoid touching the left-hand side.
789 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
790 minimum margin width, as set by test_diagnostic_context's ctor.
791 (selftest::test_fixit_insert_containing_newline): Likewise.
792 (selftest::test_fixit_insert_containing_newline_2): Likewise.
793 (selftest::test_line_numbers_multiline_range): Clear
795 * diagnostic.c (diagnostic_initialize): Initialize
797 * diagnostic.h (struct diagnostic_context): Add field
799 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
800 * opts.c (common_handle_option): Handle
801 OPT_fdiagnostics_minimum_margin_width_.
802 * selftest-diagnostic.c
803 (selftest::test_diagnostic_context::test_diagnostic_context):
804 Initialize min_margin_width to 6.
805 * toplev.c (general_init): Initialize global_dc->min_margin_width.
807 2018-10-15 David Malcolm <dmalcolm@redhat.com>
809 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
810 Fix usage of "error_at_rich_loc" in the comment.
812 2018-10-15 Renlin Li <renlin.li@arm.com>
815 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
816 if-conversioned loop when it contains ifn with types not
817 supported by backend.
818 * internal-fn.c (expand_direct_optab_fn): Add an assert.
819 (direct_internal_fn_supported_p): New helper function.
820 * internal-fn.h (direct_internal_fn_supported_p): Declare.
822 2018-10-15 Jakub Jelinek <jakub@redhat.com>
825 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
826 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
827 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
829 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
831 PR tree-optimization/87022
832 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
833 bits in dist vector rather than the first one.
835 2018-10-15 Richard Biener <rguenther@suse.de>
838 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
839 (visit_loadstore): When a used restrict tag escaped verify that
840 the points-to solution of "other" pointers do not include
842 (compute_dependence_clique): If a used restrict tag escaped
843 communicated that down to visit_loadstore.
845 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
847 * config/s390/s390.c (s390_expand_vec_init): Force vector element
848 into reg if it isn't a general operand.
850 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
853 * config/i386/sse.md (*vec_dupv2di): Add register source to
856 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
859 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
860 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
861 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
862 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
864 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
866 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
867 (notice_args_size): Set it in the current trace if no insn that can
868 throw internally has been seen yet.
869 (connect_traces): When connecting args_size between traces, allow the
870 incoming values not to match if there is an insn setting it before the
871 first insn that can throw internally; in that case, force the creation
872 of a CFI note on this latter insn.
874 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
876 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
877 the base class, because using the injected-class-name was not clearly
878 specified until DR 176.
880 2018-10-12 Paul Koning <ni1d@arrl.net>
882 * config/pdp11/pdp11.md (doloop_end): New expander.
883 (doloop_end_insn): renamed from "doloop_end".
884 (addqi3): New pattern.
885 (subqi3): New pattern.
886 * config/pdp11/predicates.md (incdec_operand): New predicate.
888 2018-10-12 Yury Gribov <tetra2005@gmail.com>
891 * real.c (format_helper::can_represent_integral_type_p): New function
892 * real.h (format_helper::can_represent_integral_type_p): Ditto.
893 * match.pd: New pattern.
895 2018-10-12 Alexandre Oliva <oliva@adacore.com>
897 * configure.ac: Introduce --enable-large-address-aware
898 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
899 * doc/install.texi: Document it.
900 * configure, config.in: Rebuilt.
901 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
902 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
903 (LINK_SPEC): Insert it.
904 * config/i386/mingw-264.h: Likewise.
906 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
908 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
910 PR rtl-optimization/87600
911 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
913 2018-10-12 Paul Koning <ni1d@arrl.net>
915 * doc/md.texi (doloop_end): Document that the pattern code may
916 need to check operand mode.
918 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
920 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
921 to zero-extend between int and floating-point registers.
922 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
923 ldp into floating-point registers. Add type and arch attributes.
924 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
925 Use f_loads for type attribute.
927 2018-10-11 Martin Sebor <msebor@redhat.com>
929 * doc/extend.texi (attribute packed): Correct typos.
931 2018-10-11 Martin Sebor <msebor@redhat.com>
933 * doc/extend.texi (attribute flatten): Mention interaction with
936 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
939 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
940 Set new_decl virtual flag to zero.
942 2018-10-11 Martin Sebor <msebor@redhat.com>
945 * doc/extend.texi (attribute format_arg): Discuss using multiple
946 attributes on a single function.
948 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
950 PR tree-optimization/86829
951 * match.pd (sin (atan (x))): New simplification rules.
952 (cos (atan (x))): Likewise.
953 * real.c (build_sinatan_real): New function.
954 * real.h (build_sinatan_real): Prototype.
956 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
958 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
960 (fold_mergeeo_helper): New helper function.
961 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
962 intrinsics. Correct some whitespace indentation issues.
964 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
967 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
968 Use HOST_WIDE_INT_1U for shift.
970 2018-10-11 Doug Rupp <rupp@adacore.com>
971 Olivier Hainque <hainque@adacore.com>
973 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
974 Pass --relax to the linker for RTPs.
975 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
977 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
978 Jan Hubicka <jh@suse.cz>
979 Martin Jambor <mjambor@suse.cz>
981 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
982 the same elements are repeated rather than printing all of them.
983 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
985 * read-rtl-function.c (test_loading_repeat): New function.
986 (read_rtl_function_c_tests): Call test_loading_repeat.
987 * rtl-tests.c (test_dumping_repeat): New function.
988 (rtl_tests_c_tests): Call test_dumping_repeat.
990 2018-10-11 Richard Biener <rguenther@suse.de>
992 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
993 bdver?_cost): Unify to ...
994 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
995 * config/i386/i386.c (processor_cost_table): Adjust.
997 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
1000 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1001 the thunk when expanding to GIMPLE.
1003 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1005 * varasm.c (mergeable_string_section): Don't try to move zero-length
1006 strings to the merge section.
1008 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
1011 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1013 2018-10-10 Jakub Jelinek <jakub@redhat.com>
1016 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1017 to special_args set.
1019 2018-10-10 Richard Biener <rguenther@suse.de>
1021 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1022 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1023 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1024 and recursing and pattern terminating the recursion on SSE
1025 vector width using ix86_expand_reduc.
1026 (reduc_sminmax_scal_<mode>): Split into part reducing to half
1027 width and recursing and SSE2 vector variant doing the final
1028 reduction with ix86_expand_reduc.
1029 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1030 with terminating the recursion at AVX level, splitting that
1033 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1035 * genmatch.c (error_cb): Rename to...
1036 (diagnostic_cb): ...this, converting int params to enums.
1037 (fatal_at): Update for renaming.
1038 (warning_at): Likewise.
1040 * input.c (selftest::ebcdic_execution_charset::apply):
1041 Update for renaming of...
1042 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1044 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1045 converting level and reason to enums.
1046 (class selftest::lexer_error_sink): Rename to...
1047 (class selftest::lexer_test_options): ...this, renaming field
1048 "m_errors" to "m_diagnostics".
1049 (selftest::lexer_test_options::apply): Update for renaming of...
1050 (selftest::lexer_test_options::on_error): ...this, renaming to...
1051 (selftest::lexer_test_options::on_diagnostic): ...this
1052 converting level and reason to enums.
1053 (selftest::test_lexer_string_locations_raw_string_unterminated):
1054 Update for renamings.
1055 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1058 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
1060 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1061 * config/rs6000/pmmintrin.h: New file.
1063 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
1065 PR tree-optimization/86659
1066 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1068 2018-10-09 Richard Biener <rguenther@suse.de>
1070 PR tree-optimization/63155
1071 * tree-ssa-structalias.c: Include tree-ssa.h.
1072 (get_constraint_for_ssa_var): For undefs return nothing_id.
1073 (find_func_aliases): Cleanup PHI handling.
1075 2018-10-09 Richard Biener <rguenther@suse.de>
1077 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1080 2018-10-09 Martin Liska <mliska@suse.cz>
1082 * asan.c (asan_emit_stack_protection): If a stack variable
1083 is located in a same file as current function, then emit
1084 line info into variable definition string.
1086 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1088 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1091 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1093 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1096 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1098 PR tree-optimization/86659
1099 * gimple-match.h (struct gimple_match_op): Add reverse field.
1100 (gimple_match_op::set_op): New overloaded method.
1101 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1102 the REF_REVERSE_STORAGE_ORDER flag on the value.
1103 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1104 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1106 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1109 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1110 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1112 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
1115 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1116 Defined with __builtin_ia32_vfmaddsubpd512_mask.
1118 2018-10-08 Richard Biener <rguenther@suse.de>
1120 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1121 cost the same as AVX128 ones.
1123 2018-10-08 Paul Koning <ni1d@arrl.net>
1125 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1126 (expand_block_move): New function.
1127 * config/pdp11/pdp11.c (output_block_move): Remove.
1128 (expand_block_move): New function.
1129 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1130 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1131 (*movmemhi1): Remove.
1133 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
1135 * config/s390/2827.md: Increase latencies for some FP instructions.
1137 2018-10-08 Richard Biener <rguenther@suse.de>
1139 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1141 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1142 * tree-vectorizer.h (dump_stmt_cost): Adjust.
1143 (add_stmt_cost): Dump return value of the hook.
1145 2018-10-08 Richard Biener <rguenther@suse.de>
1147 PR tree-optimization/63155
1148 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1149 (ssa_propagation_engine::ssa_propagate): Remove redundant
1150 bitmap bit clearing.
1152 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
1154 PR rtl-optimization/86939
1155 PR rtl-optimization/87479
1156 * ira.h (non_conflicting_reg_copy_p): New prototype.
1157 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1158 (make_hard_regno_dead): Don't add conflicts for register
1159 ignore_reg_for_conflicts.
1160 (make_object_dead): Likewise.
1161 (non_conflicting_reg_copy_p): New function.
1162 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1163 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1164 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1165 (make_hard_regno_dead): Don't add conflicts for register
1166 ignore_reg_for_conflicts. Remove special conflict handling of
1167 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
1168 check_pic_pseudo_p and update callers.
1169 (mark_pseudo_dead): Don't add conflicts for register
1170 ignore_reg_for_conflicts.
1171 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1173 2018-10-05 Andrew Waterman <andrew@sifive.com>
1174 Jim Wilson <jimw@sifive.com>
1176 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1177 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
1178 new pattern using HONOR_SNANS that emits one extra instruction.
1180 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
1182 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1183 patterns): Merge SI and DI patterns to a GPR pattern.
1184 (unnamed define_insn and define_split for record form of that): Merge
1185 to a single define_insn_and_split pattern.
1187 2018-10-05 David Malcolm <dmalcolm@redhat.com>
1190 * input.c (expand_location_to_spelling_point): Add param "aspect"
1191 and use rather than hardcoding LOCATION_ASPECT_CARET.
1192 (get_substring_ranges_for_loc): Handle the case of a single token
1193 within a macro expansion.
1194 * input.h (expand_location_to_spelling_point): Add "aspect" param,
1195 defaulting to LOCATION_ASPECT_CARET.
1197 2018-10-05 Paul Koning <ni1d@arrl.net>
1199 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1200 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1201 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1202 (pdp11_guard_type): New function.
1204 2018-10-05 Paul Koning <ni1d@arrl.net>
1206 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1207 * config/pdp11/pdp11.opt (mfloat32): Remove.
1209 * doc/invoke.texi (pdp11 -mfloat32): Remove:
1210 (pdp11 -mfloat64): Remove.
1212 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1214 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1215 (*cmp<mode>_cc_i387): Ditto.
1216 (*cmpu<mode>_cc_i387): Ditto.
1217 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1218 * config/i386/i386.c (ix86_expand_fp_compare): Remove
1220 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1221 Emit x86_sahf_1 pattern.
1222 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1223 (ix86_expand_carry_flag_compare): Ditto.
1225 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1227 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1228 to reg_or_0_operand. Add "C" constraint.
1229 (*cmpxf_cc_i387): Ditto.
1230 (*cmp<mode>_i387): Change operand 2 predicate
1231 to nonimm_or_0_operand. Add "C" constraint.
1232 (*cmp<mode>_cc_i387): Ditto.
1233 (*cmp<mode>_0_i387): Remove insn pattern.
1234 (*cmp<mode>_0_cc_i387): Ditto.
1236 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1238 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1239 * config/i386/predicates.md (nonimm_or_0_operand): Rename
1240 from vector_move_operand. Update all uses.
1242 2018-10-05 Martin Sebor <msebor@redhat.com>
1244 PR tree-optimization/87490
1245 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1248 2018-10-05 Richard Biener <rguenther@suse.de>
1250 PR tree-optimization/63155
1251 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1252 vertical space in dumpfiles.
1253 * tree-ssa-propagate.h
1254 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1255 * tree-ssa-propagate.c (cfg_blocks_back): New global.
1256 (ssa_edge_worklist_back): Likewise.
1257 (curr_order): Likewise.
1258 (cfg_blocks_get): Remove abstraction.
1259 (cfg_blocks_add): Likewise.
1260 (cfg_blocks_empty_p): Likewise.
1261 (add_ssa_edge): Add to current or next worklist based on
1263 (add_control_edge): Likewise.
1264 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1266 (ssa_propagation_engine::ssa_propagate): ... here. Unify
1267 iteration from CFG and SSA edge worklist so we process
1268 everything in RPO order, prioritizing forward progress
1270 (ssa_prop_init): Allocate new worklists, do not dump
1272 (ssa_prop_fini): Free new worklists.
1274 2018-10-05 Richard Biener <rguenther@suse.de>
1276 * tree-core.h (tree_block::abstract_flag): Remove.
1277 (tree_block::block_num): Make full 32bits.
1278 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1279 * tree.h (BLOCK_ABSTRACT): Remove.
1280 * dwarf2out.c (gen_lexical_block_die): Remove dead code
1281 resulting from BLOCK_ABSTRACT being always false.
1282 (gen_inlined_subroutine_die): Likewise.
1283 (gen_block_die): Likewise.
1284 * tree.c (block_ultimate_origin): Likewise.
1285 * tree-pretty-print.c (dump_block_node): Remove code dealing
1286 with BLOCK_ABSTRACT.
1287 * tree-ssa-live.c (dump_scope_block): Likewise.
1288 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
1289 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
1291 2018-10-05 Richard Biener <rguenther@suse.de>
1293 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
1294 is asked for initialize mode to the component mode of the
1297 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
1300 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
1301 assembler for -mavx.
1302 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
1304 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
1307 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
1309 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
1310 to be DImode. When using mffscrn, force the operand to a register.
1312 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
1314 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
1315 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
1316 X87MODEF mode iterator.
1317 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
1318 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
1319 X87MODEF mode iterator.
1321 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1323 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
1324 -Wno-prio-ctor-dtor.
1326 2018-10-04 David Malcolm <dmalcolm@redhat.com>
1328 * Makefile.in (OBJS): Add opt-problem.o.
1329 * dump-context.h: Include "selftest.h.
1330 (selftest::temp_dump_context): New forward decl.
1331 (class dump_context): Make friend of class
1332 selftest::temp_dump_context.
1333 (dump_context::dump_loc_immediate): New decl.
1334 (class dump_pretty_printer): Move here from dumpfile.c.
1335 (class temp_dump_context): Move to namespace selftest.
1336 (temp_dump_context::temp_dump_context): Add param
1337 "forcibly_enable_dumping".
1338 (selftest::verify_dumped_text):
1339 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
1340 (selftest::verify_item):
1341 (ASSERT_IS_TEXT): Move here from dumpfile.c.
1342 (ASSERT_IS_TREE): Likewise.
1343 (ASSERT_IS_GIMPLE): Likewise.
1344 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
1346 (dump_context::dump_loc_immediate): ...this new function.
1347 (class dump_pretty_printer): Move to dump-context.h.
1348 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
1349 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
1350 (temp_dump_context::temp_dump_context): Move to "selftest"
1351 namespace. Add param "forcibly_enable_dumping", and use it to
1352 conditionalize the use of m_pp;
1353 (selftest::verify_dumped_text): Make non-static.
1354 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
1355 (selftest::verify_item): Make non-static.
1356 (ASSERT_IS_TEXT): Move to dump-context.h.
1357 (ASSERT_IS_TREE): Likewise.
1358 (ASSERT_IS_GIMPLE): Likewise.
1359 (selftest::test_capture_of_dump_calls): Pass "true" for new
1360 param of temp_dump_context.
1361 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
1362 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
1364 * opt-problem.cc: New file.
1365 * opt-problem.h: New file.
1366 * optinfo-emit-json.cc
1367 (selftest::test_building_json_from_dump_calls): Pass "true" for
1368 new param of temp_dump_context.
1369 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
1370 (optinfo::emit_for_opt_problem): New function.
1371 (optinfo::emit): Clarity which emit_item is used.
1372 * optinfo.h (optinfo::get_dump_location): New accessor.
1373 (optinfo::emit_for_opt_problem): New decl.
1374 (optinfo::emit): Make const.
1375 * selftest-run-tests.c (selftest::run_tests): Call
1376 selftest::opt_problem_cc_tests.
1377 * selftest.h (selftest::opt_problem_cc_tests): New decl.
1378 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
1379 bool to opt_result, converting fprintf messages to
1380 opt_result::failure_at calls. Add "stmt" param for use by the
1382 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
1383 (runtime_alias_check_p): Convert return type from bool to
1384 opt_result, converting dump_printf calls to
1385 opt_result::failure_at, using the statement DDR_A for their
1387 (find_data_references_in_stmt): Convert return type from bool to
1388 opt_result, converting "return false" to opt_result::failure_at
1390 * tree-data-ref.h: Include "opt-problem.h".
1391 (dr_analyze_innermost): Convert return type from bool to opt_result,
1392 and add a const gimple * param.
1393 (find_data_references_in_stmt): Convert return type from bool to
1395 (runtime_alias_check_p): Likewise.
1396 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
1397 dr_analyze_innermost.
1398 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
1399 Convert return type from bool to opt_result, adding a message for
1400 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
1401 (vect_analyze_data_ref_dependence): Convert return type from bool
1402 to opt_result. Change sense of return type from "false"
1403 effectively meaning "no problems" to "false" meaning a problem,
1404 so that "return false" becomes "return opt_result::success".
1405 Convert "return true" calls to opt_result::failure_at, using
1406 the location of statement A rather than vect_location.
1407 (vect_analyze_data_ref_dependences): Convert return type from bool
1409 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
1410 calls to opt_result::failure_at, using the stmt location rather
1412 (vect_verify_datarefs_alignment): Convert return type from bool
1414 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
1415 into multiple more-tightly-scoped copies.
1416 (vect_analyze_data_refs_alignment): Convert return type from bool
1418 (vect_analyze_data_ref_accesses): Likewise, converting a
1419 "return false" to a "return opt_result::failure_at", adding a
1421 (vect_prune_runtime_alias_test_list): Convert return type from
1422 bool to opt_result, converting dump_printf_loc to
1423 opt_result::failure_at. Add a %G to show the pertinent statement,
1424 and use the stmt's location rather than vect_location.
1425 (vect_find_stmt_data_reference): Convert return type from
1426 bool to opt_result, converting dump_printf_loc to
1427 opt_result::failure_at, using stmt's location.
1428 (vect_analyze_data_refs): Convert return type from bool to
1429 opt_result. Convert "return false" to "return
1430 opt_result::failure_at", adding messages as needed.
1431 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
1432 type from bool to opt_result.
1433 (vect_determine_vf_for_stmt): Likewise.
1434 (vect_determine_vectorization_factor): Likewise, converting
1435 dump_printf_loc to opt_result::failure_at, using location of phi
1436 rather than vect_location.
1437 (vect_analyze_loop_form_1): Convert return type from bool to
1438 opt_result, converting dump_printf_loc calls, retaining the use of
1440 (vect_analyze_loop_form): Convert return type from loop_vec_info
1441 to opt_loop_vec_info.
1442 (vect_analyze_loop_operations): Convert return type from bool to
1443 opt_result, converting dump_printf_loc calls, using the location
1444 of phi/stmt rather than vect_location where available. Convert
1445 various "return false" to "return opt_result::failure_at" with
1446 "unsupported phi" messages.
1447 (vect_get_datarefs_in_loop): Convert return type from bool to
1448 opt_result. Add a message for the
1449 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
1450 (vect_analyze_loop_2): Convert return type from bool to
1451 opt_result. Ensure "ok" is set to a opt_result::failure_at before
1452 each "goto again;", adding new messages where needed.
1453 Add "unsupported grouped {store|load}" messages.
1454 (vect_analyze_loop): Convert return type from loop_vec_info to
1456 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
1458 * tree-vect-stmts.c (process_use): Likewise, converting
1459 dump_printf_loc call and using stmt location, rather than
1461 (vect_mark_stmts_to_be_vectorized): Likeise.
1462 (vect_analyze_stmt): Likewise, adding a %G.
1463 (vect_get_vector_types_for_stmt): Convert return type from bool to
1464 opt_result, converting dump_printf_loc calls and using stmt
1465 location, rather than vect_location.
1466 (vect_get_mask_type_for_stmt): Convert return type from tree to
1467 opt_tree, converting dump_printf_loc calls and using stmt location.
1468 * tree-vectorizer.c: Include "opt-problem.h.
1469 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
1470 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
1471 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
1472 enabled, use it to report at the top level "couldn't vectorize
1473 loop" followed by the problem.
1474 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
1475 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
1477 (vect_analyze_stmt): Likewise.
1478 (vect_get_vector_types_for_stmt): Likewise.
1479 (tree vect_get_mask_type_for_stmt): Likewise.
1480 (vect_analyze_data_ref_dependences): Likewise.
1481 (vect_enhance_data_refs_alignment): Likewise.
1482 (vect_analyze_data_refs_alignment): Likewise.
1483 (vect_verify_datarefs_alignment): Likewise.
1484 (vect_analyze_data_ref_accesses): Likewise.
1485 (vect_prune_runtime_alias_test_list): Likewise.
1486 (vect_find_stmt_data_reference): Likewise.
1487 (vect_analyze_data_refs): Likewise.
1488 (vect_analyze_loop): Convert return type from loop_vec_info to
1490 (vect_analyze_loop_form): Likewise.
1491 (vect_analyze_slp): Convert return type from bool to opt_result.
1493 2018-10-04 David Malcolm <dmalcolm@redhat.com>
1495 * doc/invoke.texi (-fopt-info): Document new "internals"
1497 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
1498 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
1500 (optinfo_verbosity_options): Add "internals".
1501 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
1502 (dump_context::apply_dump_filter_p): New member function.
1503 (dump_context::dump_loc): Use apply_dump_filter_p rather than
1504 explicitly masking the dump_kind.
1505 (dump_context::begin_scope): Increment the scope depth first. Use
1506 apply_dump_filter_p rather than explicitly masking the dump_kind.
1507 (dump_context::emit_item): Use apply_dump_filter_p rather than
1508 explicitly masking the dump_kind.
1509 (dump_dec): Likewise.
1510 (dump_hex): Likewise.
1511 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
1512 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
1513 (opt_info_switch_p): Update handling of default
1514 MSG_OPTIMIZED_LOCATIONS to cope with default of
1515 MSG_PRIORITY_USER_FACING.
1516 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
1517 masking the dump_kind.
1518 (selftest::test_capture_of_dump_calls): Update test_dump_context
1519 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
1520 than MSG_ALL. Generalize scope test to be run at all four
1521 combinations of with/without MSG_PRIORITY_USER_FACING and
1522 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
1523 for each of the two values.
1524 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
1525 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
1526 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
1527 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
1528 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
1529 with MSG_PRIORITY_*.
1530 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
1531 dump messages as MSG_PRIORITY_USER_FACING.
1532 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
1533 about the interaction with MSG_PRIORITY_*.
1535 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1537 * varasm.c (output_constant): Add new parameter merge_strings.
1538 Make strings properly zero terminated in merge string sections.
1539 (mergeable_string_section): Don't fail if the last char is non-zero.
1540 (assemble_variable_contents): Handle merge string sections.
1541 (assemble_variable): Likewise.
1542 (assemble_constant_contents): Likewise.
1543 (output_constant_def_contents): Likewise.
1544 (output_constructor_array_range,
1545 output_constructor_regular_field): Adjust call to output_constant.
1546 (output_object_block): Adjust call to assemble_constant_contents
1547 and assemble_variable_contents.
1549 2018-10-04 Martin Liska <mliska@suse.cz>
1552 * cgraphunit.c (process_function_and_variable_attributes):
1553 Warn about a function with alias attribute and a body.
1555 2018-10-04 Martin Liska <mliska@suse.cz>
1558 * multiple_target.c (redirect_to_specific_clone): New function.
1559 (ipa_target_clone): Use it.
1560 * tree-inline.c: Fix comment.
1562 2018-10-04 David Malcolm <dmalcolm@redhat.com>
1564 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
1566 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
1567 (gcc::dump_manager::register_pass): New member function, adapted
1568 from loop body in gcc::pass_manager::register_pass, adding a
1569 call to update_dfi_for_opt_info.
1570 (gcc::dump_manager::opt_info_enable_passes): Store the
1571 -fopt-info options into the new fields. Move the loop
1573 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
1575 * dumpfile.h (struct opt_pass): New forward decl.
1576 (gcc::dump_manager::register_pass): New decl.
1577 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
1578 (class gcc::dump_manager): Add fields "m_optgroup_flags",
1579 "m_optinfo_flags", and "m_optinfo_filename".
1580 * passes.c (gcc::pass_manager::register_pass): Move all of the
1581 dump-handling code to gcc::dump_manager::register_pass.
1583 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
1585 PR rtl-optimization/87466
1586 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
1587 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
1588 * doc/tm.texi: Regenerate.
1589 * ira-lives.c (process_bb_node_lives): Use the new target hook.
1590 * lra-lives.c (process_bb_lives): Likewise.
1591 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
1594 2018-10-04 Tamar Christina <tamar.christina@arm.com>
1596 * params.c (add_params): Fix initialization.
1598 2018-10-04 Martin Liska <mliska@suse.cz>
1600 PR gcov-profile/84107
1601 * tree-profile.c (init_ic_make_global_vars):
1602 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
1603 Come up with new ic_tuple* variables. Emit
1604 __gcov_indirect_call{,_topn} variables.
1605 (gimple_gen_ic_profiler): Access the variable
1607 (gimple_gen_ic_func_profiler): Access
1608 __gcov_indirect_call.callee field.
1609 (gimple_init_gcov_profiler): Use ptr_type_node.
1610 * value-prof.c (gimple_ic): Use ptr_type_node.
1612 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1614 PR tree-optimization/85787
1615 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
1616 into this function and add support for detecting multiple phis.
1617 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
1619 2018-10-04 Martin Liska <mliska@suse.cz>
1622 * ipa-inline.c (inline_to_all_callers_1):
1623 Call ultimate_alias_target for node being inlined.
1625 2018-10-03 Jeff Law <law@redhat.com>
1627 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
1629 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
1630 * tree.h (get_typenode_from_name): Prototype.
1632 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
1634 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1635 Change operand 2 predicate to nonimmediate_operand.
1636 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1638 2018-10-03 Martin Sebor <msebor@redhat.com>
1639 Jeff Law <law@redhat.com>
1641 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
1643 (get_string_length): Detect unterminated arrays.
1644 (format_string): Same.
1645 (format_directive): Warn about unterminated arrays.
1646 (handle_gimple_call): Mark statements with no_warning as needed.
1648 2018-10-03 Jim Wilson <jimw@sifive.com>
1650 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
1651 also define __riscv_abi_rve. Delete trailing white space.
1653 2018-10-03 Paul Koning <ni1d@arrl.net>
1655 Enable LRA register allocator for PDP11.
1656 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
1659 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
1660 * config/pdp11/pdp11.opt (-mlra): New option.
1661 * doc/invoke.texi (PDP-11 Options): Document -mlra.
1663 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
1665 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
1666 (*<absneg:code>extend<mode>xf2): Ditto.
1668 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
1670 PR tree-optimization/87415
1671 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
1674 2018-10-02 Jeff Law <law@redhat.com>
1676 * gimple-fold.c (get_range_strlen): Only set *nonstr when
1677 an unterminated string is discovered. Bubble up range
1678 even for unterminated strings.
1679 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
1680 indicates the string was not terminated via NONSTR.
1682 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
1684 * tree-vrp.c (extract_range_from_unary_expr): Special case all
1685 pointer conversions.
1686 Do not do anything special for anti-ranges.
1688 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
1690 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
1691 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
1693 2018-10-03 Martin Liska <mliska@suse.cz>
1695 PR gcov-profile/86109
1696 * coverage.c (coverage_begin_function): Do not
1697 mark lambdas as artificial.
1698 * tree-core.h (struct GTY): Remove tm_clone_flag
1699 and introduce new lambda_function.
1700 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
1702 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1705 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
1706 P8_VECTOR and VSX are enabled.
1708 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
1710 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
1711 0x3907 as CPU model number.
1713 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
1715 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
1716 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
1717 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
1718 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
1719 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
1720 * config/s390/s390.md: Likewise. Rename also the cpu attribute
1721 value from arch12 to z14.
1723 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
1725 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
1727 (isinf<mode>2): Ditto.
1729 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
1731 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1732 before emitting fxam. Perform calculations in XFmode.
1734 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
1736 * match.pd (((X /[ex] A) +- B) * A): New transformation.
1738 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
1741 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1742 * tree.c (signed_or_unsigned_type_for): Handle complex.
1744 2018-10-02 Jeff Law <law@redhat.com>
1746 * gimple-fold.c (get_range_strlen): Remove dead code.
1748 2018-10-02 Martin Sebor <msebor@redhat.com>
1749 Jeff Law <law@redhat.com>
1751 * builtins.c (unterminated_array): Add new arguments.
1752 If argument is not terminated, bubble up size and exact
1754 (expand_builtin_strnlen): Detect, avoid expanding
1755 and diagnose unterminated arrays.
1756 (c_strlen): Fill in offset of start of unterminated strings.
1757 * builtins.h (unterminated_array): Update prototype.
1759 2018-10-02 Richard Biener <rguenther@suse.de>
1761 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1762 of haddv4df, first reduce to SSE width and exploit the fact
1763 that we only need element zero with the reduction result.
1764 (reduc_plus_scal_v2df): Likewise.
1766 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
1768 * dojump.h (do_jump): Delete.
1769 (do_jump_1): Likewise.
1770 (split_comparison): Move around.
1771 * dojump.c (do_jump): Make static.
1772 (do_jump_1): Likewise.
1773 (jumpifnot): Move around.
1774 (jumpifnot_1): Likewise.
1776 (jumpif_1): Likewise.
1777 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1779 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
1781 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1782 insns in the delay slot and add_insn_after for the jump insn.
1784 2018-10-02 Richard Biener <rguenther@suse.de>
1786 * tree-inline.c (expand_call_inline): Use the location of
1787 the callee declaration for the inline-entry marker.
1788 * final.c (notice_source_line): Remove special-casing of
1789 NOTE_INSN_INLINE_ENTRY.
1791 2018-10-01 Carl Love <cel@us.ibm.com>
1794 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1795 (__builtin_mtfsb0): New.
1796 (__builtin_mtfsb1): New.
1797 ( __builtin_set_fpscr_rn): New.
1798 (__builtin_set_fpscr_drn): New.
1799 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1800 (rs6000_expand_set_fpscr_rn_builtin): Add.
1801 (rs6000_expand_set_fpscr_drn_builtin): Add.
1802 (rs6000_expand_builtin): Add case statement entries for
1803 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1804 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1805 RS6000_BUILTIN_MFFSL.
1806 (rs6000_init_builtins): Add ftype initialization and def_builtin
1807 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1808 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1809 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1810 rs6000_mffscdrn): Add define_insn.
1811 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1812 * doc/extend.texi: Add documentation for the builtins.
1814 2018-10-01 Richard Biener <rguenther@suse.de>
1816 PR tree-optimization/87465
1817 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1818 causing branch miscounts.
1820 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1822 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1823 aarch64_option_default_param): New.
1824 (params.h): Include.
1825 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1826 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1827 stack-clash protection validation code.
1829 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1831 * params.c (validate_param): New.
1832 (add_params): Use it.
1833 (set_param_value): Refactor param validation into validate_param.
1834 (diagnostic.h): Include.
1835 * diagnostic.h (diagnostic_ready_p): New.
1837 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1839 * params.c (set_param_value):
1840 Add index of parameter being validated.
1841 * common/common-target.def (option_validate_param): New.
1842 * common/common-targhooks.h (default_option_validate_param): New.
1843 * common/common-targhooks.c (default_option_validate_param): New.
1844 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1845 * doc/tm.texi: Regenerate.
1847 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1850 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1851 Add validation for stack-clash parameters and set defaults.
1853 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1856 * configure.ac: Add stack-clash-protection-guard-size.
1857 * doc/install.texi: Document it.
1858 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1859 * params.def: Update comment for guard-size.
1860 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1861 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1862 * configure: Regenerate.
1864 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1867 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1868 STACK_DYNAMIC_OFFSET): New.
1869 * config/aarch64/aarch64.c (aarch64_layout_frame):
1870 Update outgoing args size.
1871 (aarch64_stack_clash_protection_alloca_probe_range,
1872 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1874 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1877 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1879 * target.def (stack_clash_protection_alloca_probe_range): New.
1880 (stack_clash_protection_final_dynamic_probe): Remove.
1881 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1882 (default_stack_clash_protection_final_dynamic_probe): Remove.
1883 * targhooks.c: Likewise.
1884 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1885 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1886 * doc/tm.texi: Regenerate.
1888 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1891 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1892 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1893 aarch64_clamp_to_uimm12_shift): New.
1894 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1895 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1897 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1900 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1902 2018-10-01 Jeff Law <law@redhat.com>
1903 Richard Sandiford <richard.sandiford@linaro.org>
1904 Tamar Christina <tamar.christina@arm.com>
1907 * config/aarch64/aarch64.md
1908 (probe_stack_range): Add k (SP) constraint.
1909 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1910 STACK_CLASH_MAX_UNROLL_PAGES): New.
1911 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1912 stack probes for stack clash.
1913 (aarch64_allocate_and_probe_stack_space): New.
1914 (aarch64_expand_prologue): Use it.
1915 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1916 (aarch64_sub_sp): Add emit_move_imm optional param.
1918 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
1920 PR tree-optimization/87261
1921 * match.pd: Remove trailing whitespace.
1922 Add (x & y) | ~(x | y) -> ~(x ^ y),
1923 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1925 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1927 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1929 (ashlsi3_insn): Update instruction constraints.
1930 (ashrsi3_insn): Likewise.
1931 (rotrsi3): Likewise.
1932 (add_shift): Likewise.
1933 * config/arc/constraints.md (Csz): New 32 bit constraint. It
1934 avoids placing in the limm field small constants which, otherwise,
1935 could end into a small instruction.
1937 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1939 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1940 destination register is not odd-even.
1941 (umaddsidi4_split): Likewise.
1943 2018-10-01 Richard Biener <rguenther@suse.de>
1945 * tree-inline.c (expand_call_inline): Store origin of fn
1946 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1947 * tree.c (block_ultimate_origin): Simplify and do some
1950 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
1952 * config/i386/mmx.md (EMMS): New int iterator.
1953 (emms): New int attribute.
1954 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1955 EMMS int iterator. Explicitly declare clobbers.
1956 (mmx_emms): Remove expander.
1958 * config/i386/predicates.md (emms_operation): Remove predicate.
1959 (vzeroall_pattern): New predicate.
1960 (vzeroupper_pattern): Rename from vzeroupper_operation.
1961 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1962 vzeroupper_pattern and vzeroall_pattern predicates.
1964 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
1966 PR rtl-optimization/86939
1967 * ira-lives.c (make_hard_regno_born): Rename from this...
1968 (make_hard_regno_live): ... to this. Remove update to conflict
1969 information. Update function comment.
1970 (make_hard_regno_dead): Add conflict information update. Update
1972 (make_object_born): Rename from this...
1973 (make_object_live): ... to this. Remove update to conflict information.
1974 Update function comment.
1975 (make_object_dead): Add conflict information update. Update function
1977 (mark_pseudo_regno_live): Call make_object_live.
1978 (mark_pseudo_regno_subword_live): Likewise.
1979 (mark_hard_reg_dead): Update function comment.
1980 (mark_hard_reg_live): Call make_hard_regno_live.
1981 (process_bb_node_lives): Likewise.
1982 * lra-lives.c (make_hard_regno_born): Rename from this...
1983 (make_hard_regno_live): ... to this. Remove update to conflict
1984 information. Remove now uneeded check_pic_pseudo_p argument.
1985 Update function comment.
1986 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1987 to conflict information. Update function comment.
1988 (mark_pseudo_live): Remove update to conflict information. Update
1990 (mark_pseudo_dead): Add conflict information update.
1991 (mark_regno_live): Call make_hard_regno_live.
1992 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1993 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1995 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
1998 * config/i386/i386.c (construct_container): Use TImode for
1999 BLKmode values in 2 integer registers.
2001 2018-09-29 Jeff Law <law@redhat.com>
2003 * builtins.c (unterminated_array): Pass in c_strlen_data * to
2004 c_strlen rather than just a tree *.
2005 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2006 Update recursive calls appropriately. If caller did not provide a
2007 suitable data pointer, create a local one. When a non-terminated
2008 string is discovered, bubble up information about the string via the
2009 c_strlen_data object.
2010 * builtins.h (c_strlen): Update prototype.
2011 (c_strlen_data): New structure.
2012 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2013 For a type 2 call, if c_strlen indicates a non-terminated string
2014 use the length of the non-terminated string.
2015 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2017 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2020 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2021 __m512d type for __A argument rather than __m512.
2023 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
2025 * match.pd (simple_comparison): Don't optimize if either operand is
2026 a function pointer when target needs function pointer canonicalization.
2028 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2030 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2031 power5 .. power9 to remove indirection.
2032 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2033 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2034 ASM_CPU_476_SPEC): Delete.
2035 (ASM_CPU_SPEC): Adjust.
2036 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2037 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2039 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2041 * config.in: Delete HAVE_AS_DCI.
2042 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2043 * config/rs6000/rs6000.h: Ditto.
2044 * configure.ac: Delete HAVE_AS_DCI.
2045 * configure: Regenerate.
2047 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2049 * config.in (HAVE_AS_LWSYNC): Delete.
2050 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2051 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2053 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2054 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2056 * configure.ac: Delete HAVE_AS_LWSYNC.
2057 * configure: Regenerate.
2059 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2060 Pierre-Marie de Rodat <derodat@adacore.com>
2062 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2063 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2064 (cgraph_node::create_thunk): Add indirect_offset parameter.
2065 (thunk_adjust): Likewise.
2066 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2067 and initialize the corresponding field with it.
2068 (cgraph_node::dump): Dump indirect_offset field.
2069 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2070 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2071 (thunk_adjust): Add indirect_offset parameter and deal with it.
2072 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2073 pass it to thunk_adjust. Do not call the target hook if it's non-zero
2074 or if the thunk is external or local. Fix formatting. Do not chain
2075 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
2076 if any, in the GIMPLE representation.
2077 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2078 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2079 (input_node): Read indirect_offset field.
2080 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2081 call to thunk_adjust.
2082 * tree-nested.c (struct nesting_info): Add thunk_p field.
2083 (create_nesting_tree): Set it.
2084 (convert_all_function_calls): Copy static chain from targets to thunks.
2085 (finalize_nesting_tree_1): Return early for thunks.
2086 (unnest_nesting_tree_1): Do not finalize thunks.
2087 (gimplify_all_functions): Do not gimplify thunks.
2089 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2091 * opt-suggestions.c (option_proposer::build_option_suggestions):
2092 Release "option_values".
2094 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2096 * coverage.c (get_coverage_counts): Convert problem-reporting dump
2097 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2098 * dumpfile.c (kind_as_string): New function.
2099 (dump_loc): Rather than a hardcoded prefix of "note: ", use
2100 kind_as_string to vary the prefix based on dump_kind.
2101 (selftest::test_capture_of_dump_calls): Update for above.
2103 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2105 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2106 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2108 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2110 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2111 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2112 INVALID_REGNUM instead of FPSR_REG.
2113 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2114 * config/i386/i386.md: Update comment of FP compares.
2115 (fldenv): Do not clobber FPSR_REG.
2117 2018-09-28 Richard Biener <rguenther@suse.de>
2119 * tree.h (BLOCK_ORIGIN): New.
2120 * omp-expand.c (grid_expand_target_grid_body): Assign
2121 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2122 * tree-inline.c (remap_block): Likewise.
2123 * auto-profile.c (get_function_decl_from_block): Simplify
2124 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2125 * langhooks.c (lhd_print_error_function): Likewise.
2126 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2128 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2129 * tree.c (block_nonartificial_location): Likewise.
2130 (block_ultimate_origin): Likewise.
2131 * tree-pretty-print.c (percent_K_format): Likewise. Remove
2132 no longer needed LTO case.
2134 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
2135 Jan Hubicka <jh@suse.cz>
2136 Martin Jambor <mjambor@suse.cz>
2138 * simplify-rtx.c (simplify_merge_mask): New function.
2139 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2140 same masks are used in op1 or op2.
2141 (test_vec_merge): New function.
2142 (test_vector_ops): Call test_vec_merge.
2144 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2146 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2147 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2148 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2149 (cypress_costs): Set it.
2150 (supersparc_costs): Likewise.
2151 (hypersparc_costs): Likewise.
2152 (leon_cost): Likewise.
2153 (leon3_costs): Likewise.
2154 (sparclet_costs): Likewise.
2155 (ultrasparc_costs): Likewise.
2156 (ultrasparc_costs): Likewise.
2157 (niagara_costs): Likewise.
2158 (niagara2_costs): Likewise.
2159 (niagara3_costs): Likewise.
2160 (niagara4_costs): Likewise.
2161 (niagara7_costs): Likewise.
2162 (m8_costs): Likewise.
2163 (TARGET_CAN_FOLLOW_JUMP): Define.
2164 (pass_work_around_errata::gate): Minor tweak.
2165 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2166 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2167 Automaitcally clear MASK_FSMULD mask for V7 processors.
2168 (sparc_can_follow_jump): New static function.
2169 (output_ubranch): Deal with CROSSING_JUMP_P.
2170 (sparc_use_sched_lookahead): Rewrite using switch statement.
2171 (sparc_issue_rate): Reorder.
2172 (sparc_branch_cost): New function.
2174 2018-09-27 Martin Sebor <msebor@redhat.com>
2176 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2177 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2178 (int_fits_type_p): Same.
2180 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
2182 * config/i386/i386.md (FPCR_REG): Remove.
2183 (UNSPEC_FLDCW): Remove.
2184 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2185 (x86_fldcw_1): Remove insn pattern.
2186 (fnstenv): Do not clobber FPCR_REG.
2188 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2189 (CALL_USED_REGISTERS): Ditto.
2190 (REG_ALLOC_ORDER): Ditto.
2191 (REG_CLASS_CONTENTS): Ditto.
2192 (HI_REGISTER_NAMES): Ditto.
2193 (ADDITIONAL_REGISTER_NAMES): Use defines instead
2194 of numerical constants.
2195 * config/i386/i386.c (regclass_map): Remove fpsr register.
2196 (dbx_register_map): Ditto.
2197 (dbx64_register_map): Ditto.
2198 (svr4_dbx_register_map): Ditto.
2199 (print_reg): Do not handle FPCR_REG.
2201 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
2204 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2205 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2206 Delete, always treat as true.
2207 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2208 Ditto. Simplify remaining code.
2209 * config/powerpcspe/powerpcspe.h: Ditto.
2210 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2211 Simplify remaining code.
2212 (rs6000_expand_builtin): Ditto.
2213 * config/rs6000/rs6000.h: Ditto.
2214 * configure.ac: Ditto.
2215 * configure: Regenerate.
2217 2018-09-27 Martin Liska <mliska@suse.cz>
2219 * coverage.c (get_coverage_counts): Revert the formatting
2220 of missing profile opt info.
2222 2018-09-27 Richard Biener <rguenther@suse.de>
2226 * dwarf2out.c (set_block_origin_self): Do not mark outermost
2227 block as we do not output that.
2228 (gen_inlined_subroutine_die): Elide the originally outermost
2229 block, matching what we do for concrete instances.
2230 (decls_for_scope): Add parameter specifying whether to recurse
2233 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
2234 Tom de Vries <tom@codesourcery.com>
2238 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2239 STORE_FLAG_VALUE == 1.
2241 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
2243 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2244 constant definitions.
2245 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2246 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2247 ("speculation_barrier"): New expander definition.
2249 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
2251 PR gcov-profile/86957
2252 * common.opt: New warning option -Wmissing-profile.
2253 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2254 * doc/invoke.texi: Document -Wmissing-profile.
2256 2018-09-26 Jim Wilson <jimw@sifive.com>
2258 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2259 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2261 2018-09-26 Martin Sebor <msebor@redhat.com>
2263 * tree.c (zerop): Change return type to bool.
2264 (integer_zerop, integer_onep, integer_each_onep): Same.
2265 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2266 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2267 (real_onep, real_minus_onep, chain_index): Same.
2268 (print_type_hash_statistics, type_list_equal): Same.
2269 * tree.h (zerop): Same.
2270 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2271 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2272 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2273 (real_onep, real_minus_onep, chain_index): Same.
2274 (print_type_hash_statistics, type_list_equal): Same.
2276 2018-09-26 Jim Wilson <jimw@sifive.com>
2278 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2280 2018-09-26 Jakub Jelinek <jakub@redhat.com>
2283 * config/i386/i386.c: Include debug.h and dwarf2out.h.
2284 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2287 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
2289 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
2291 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
2293 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
2294 and FP_SECOND_SSE_REGS.
2295 (REG_CLASS_NAMES): Ditto.
2296 (REG_CLASS_CONTENTS): Ditto.
2297 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
2298 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
2299 (ix86_preferred_output_reload_class): Ditto.
2300 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
2301 clobber constraint to "=&f".
2302 (fix_truncdi_i387): Ditto.
2303 (lrintxfdi2): Ditto.
2304 (fistdi2_<rounding>): Ditto.
2305 (fpremxf4_i387): Change "=u" constraint to "=f".
2306 (fprem1xf4_i387): Ditto.
2308 (fptanxf4_i387): Ditto.
2309 (fxtractxf3_i387): Ditto.
2310 (fscalexf4_i387): Ditto.
2311 (atan2xf3): Change "u" constraint to "f".
2312 (fyl2xxf3_i387): Ditto.
2313 (fyl2xp1xf3_i387): Ditto.
2315 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
2318 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
2319 for removed I387_MASK_PM entity.
2322 2018-09-26 Jeff Law <law@redhat.com>
2324 2018-09-26 Alexey Neyman <stilor@att.net>
2326 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2327 headers are no longer pulled in by <isl/val.h>.
2329 2018-09-26 Richard Biener <rguenther@suse.de>
2332 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
2333 or concrete instance DIE to the tree. Create abstract origin
2334 attributes also for concrete instances.
2336 2018-09-26 Alexey Neyman <stilor@att.net>
2338 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2339 headers are no longer pulled in by <isl/val.h>.
2341 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
2343 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
2344 Use new helper functions.
2345 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
2346 Use new helper functions.
2347 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
2348 aarch_mm_needs_release): New declarations.
2349 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
2350 aarch_mm_needs_release): New.
2352 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
2354 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
2355 (arm32_output_mi_thunk): Deal with long calls.
2357 2018-09-26 Richard Biener <rguenther@suse.de>
2361 * tree-inline.c (expand_call_inline): When the location
2362 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2363 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2364 the inserted BLOCK to make inlined_function_outer_scope_p
2366 * dwarf2out.c (add_call_src_coords_attributes): Do not add
2367 coords for reserved locations.
2369 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
2371 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
2372 (*call_indirect_nonlocal_sysv<mode>): Ditto.
2373 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
2374 (*sibcall_nonlocal_sysv<mode>): Ditto.
2375 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
2376 (<bd>_<mode>): Ditto.
2377 (<bd>tf_<mode>): Ditto.
2379 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
2381 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
2382 control string as a list of templates instead of as C code.
2383 (*altivec_movti): Ditto.
2384 * config/rs6000/darwin.md (movdf_low_di): Ditto.
2386 2018-09-25 Jim Wilson <jimw@sifive.com>
2388 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
2389 when target symbol is weak.
2391 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2394 * builtins.c (unterminated_array): Simplify.
2395 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
2396 where pointer arithmetic is safe.
2398 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
2401 * config/rs6000/altivec.md (altivec_vspltb): Use
2402 const_0_to_15_operand instead of u5bit_cint_operand.
2403 (*altivec_vspltb_internal): Ditto.
2404 (altivec_vspltb_direct): Ditto.
2405 (altivec_vsplth): Use const_0_to_7_operand instead of
2407 (*altivec_vsplth_internal): Ditto.
2408 (altivec_vsplth_direct): Ditto.
2409 (altivec_vspltw): Use const_0_to_3_operand instead of
2411 (*altivec_vspltw_internal): Ditto.
2412 (altivec_vspltw_direct): Ditto.
2413 (altivec_vspltsf): Ditto.
2414 (*altivec_vspltsf_internal): Ditto.
2415 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
2416 various splats with the proper size immediate. Reorder the various
2417 cases by ascending size of immediate, and put all such together.
2419 2018-09-25 Richard Biener <rguenther@suse.de>
2422 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
2424 (maybe_create_die_with_external_ref): Do not create
2425 DW_TAG_imported_unit here.
2426 (add_abstract_origin_attribute): Handle external BLOCK refs.
2427 (dwarf2out_abstract_function): Simplify LTO case.
2428 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
2429 rather than using maybe_create_die_with_external_ref.
2431 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
2434 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
2435 (frndintxf2_mask_pm_i387): Ditto.
2436 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
2437 Enable for !flag_trapping_math.
2438 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
2439 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
2440 Change operand 1 predicate to nonimmediate_operand.
2441 (attr "i387_cw"): Remove mask_pm.
2442 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
2443 (enum ix86_entity): Remove I387_MASK_PM.
2444 * config/i386/i386.c (ix86_i387_mode_needed): Do not
2445 handle I387_MASK_PM.
2446 (ix86_mode_needed): Ditto.
2447 (ix86_mode_after): Ditto.
2448 (ix86_mode_entry): Ditto.
2449 (ix86_mode_exit): Ditto.
2450 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
2452 2018-09-25 Jakub Jelinek <jakub@redhat.com>
2454 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
2455 to_update_switch_stmts to vNULL instead of calling create on them
2458 2018-09-25 Richard Biener <rguenther@suse.de>
2460 PR tree-optimization/87402
2461 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
2462 (visit_phi): Re-instantiate handling of supposed to be VARYING
2463 but non-VARYING backedge value.
2465 2018-09-25 Richard Biener <rguenther@suse.de>
2468 * dwarf2out.c (struct sym_off_pair): New.
2469 (external_die_map): New global.
2470 (lookup_decl_die): When in LTO create DIEs lazily from the
2472 (lookup_block_die): New function, create DIEs lazily in LTO.
2473 (equate_block_to_die): New function.
2474 (dwarf2out_die_ref_for_decl): During WPA get the association
2475 from the external DIE map.
2476 (dwarf2out_register_external_die): Record mapping into the
2478 (maybe_create_die_with_external_ref): New function split out from
2479 DIE generation part of old dwarf2out_register_external_die.
2480 (add_abstract_origin_attribute): Do not return the DIE. When
2481 in LTO reference externals directly.
2482 (dwarf2out_abstract_function): When in LTO ignore calls for
2483 decls with external DIEs (already present abstract instances).
2484 (gen_call_site_die): Adjust.
2485 (add_high_low_attributes): Likewise.
2486 (gen_lexical_block_die): Likewise.
2487 (gen_inlined_subroutine_die): Likewie.
2488 (gen_block_die): Likewise.
2489 (dwarf2out_inline_entry): Likewise.
2490 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
2493 2018-09-25 Martin Liska <mliska@suse.cz>
2495 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
2496 integers and not by a float value.
2498 2018-09-25 Martin Liska <mliska@suse.cz>
2501 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
2503 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
2504 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
2505 * godump.c (go_format_type): Remove extra parenthesis.
2507 2018-09-25 Martin Liska <mliska@suse.cz>
2509 * alias.c (set_dest_equal_p): Remove unused function.
2510 * config/i386/i386.c (def_builtin_pure2): Likewise.
2511 * diagnostic-show-locus.c (class layout): Remove
2513 (layout::layout): Likewise here.
2514 * dump-context.h (class temp_dump_context): Likewise.
2515 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
2516 (add_AT_loclistsptr): Likewise.
2517 (add_AT_offset): Likewise.
2518 (get_AT_hi_pc): Likewise.
2519 (is_comdat_die): Likewise.
2520 (type_is_enum): Likewise.
2521 (ceiling): Likewise.
2522 (add_AT_vms_delta): Likewise.
2523 (is_class_die): Likewise.
2524 * edit-context.c (class line_event): Remove unused field.
2525 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
2527 * ipa-cp.c (ipa_get_vr_lat): Likewise.
2528 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
2529 (ok_for_base_p_nonstrict): Likewise.
2530 * tree-chrec.c (is_not_constant_evolution): Likewise.
2531 (chrec_fold_poly_cst): Likewise.
2532 * tree-if-conv.c (has_pred_critical_p): Likewise.
2533 * tree-ssa-coalesce.c (print_exprs): Likewise.
2534 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
2535 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
2536 * tree-vrp.c (value_ranges_intersect_p): Likewise.
2537 (value_range_nonnegative_p): Likewise.
2539 2018-09-25 Martin Liska <mliska@suse.cz>
2541 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2542 Do not handle "GNU Pascal".
2543 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2545 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
2546 from documentation. Likewise.
2547 * dbxout.c (dbxout_range_type): Likewise.
2548 * doc/cpp.texi: Likewise.
2549 * doc/extend.texi: Likewise.
2550 * doc/frontends.texi: Likewise.
2551 * doc/invoke.texi: Remove Pascal entry.
2552 * tree.def (CLEANUP_POINT_EXPR): Likewise.
2553 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
2555 2018-09-25 Martin Liska <mliska@suse.cz>
2558 * doc/invoke.texi: Document all parameters and remove default
2561 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
2564 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
2565 contains HOST_WIDE_INTs when computing its size.
2567 2018-09-24 Jim Wilson <jimw@sifive.com>
2570 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
2572 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
2574 2018-09-24 Andrew Pinski <apinski@marvell.com>
2576 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2577 access prev before checking it for NULLness in the
2578 AARCH64_FUSE_CMP_BRANCH case.
2580 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
2583 * config/i386/i386.c (rest_of_insert_endbranch): Set
2584 endbr_queued_at_entrance to true and don't insert ENDBR if
2585 x86_function_profiler will be called.
2586 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2588 * config/i386/i386.h (machine_function): Add
2589 endbr_queued_at_entrance.
2591 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
2593 * genattrtab.c (mk_attr_alt): Use alternative_mask.
2594 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
2596 (check_attr_test): Use alternative_mask.
2597 (get_attr_value): Likewise.
2598 (compute_alternative_mask): Use alternative_mask and XWINT.
2599 (make_alternative_compare): Use alternative_mask.
2600 (attr_alt_subset_p): Use XWINT.
2601 (attr_alt_subset_of_compl_p): Likewise.
2602 (attr_alt_intersection): Use alternative_mask and XWINT.
2603 (attr_alt_union): Likewise.
2604 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
2605 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
2606 (simplify_test_exp): Use alternative_mask and XWINT.
2607 (write_test_expr): Use alternative_mask and XWINT, adjust bit
2608 number calculation to support 64 bits. Generate code that
2609 checks 64-bit masks.
2610 (main): Use alternative_mask.
2611 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2613 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
2616 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
2617 RETURN+USE when returning via %r14.
2619 2018-09-24 Martin Liska <mliska@suse.cz>
2621 * gcov.c (output_lines): Print colorization legend
2622 for both flag_use_colors and flag_use_hotness_colors.
2625 2018-09-24 Martin Liska <mliska@suse.cz>
2627 * coverage.c (get_coverage_counts): Use warning_at
2628 with current_function_decl location. Use %qD in warning
2631 2018-09-24 Martin Liska <mliska@suse.cz>
2633 * memory-block.h (memory_block_pool::release): Annotate with
2634 valgrind that the memory is not accessible.
2636 2018-09-24 Martin Liska <mliska@suse.cz>
2639 * asan.c: Make asan_handled_variables extern.
2641 * cfgexpand.c (expand_stack_vars): Make sure
2642 a representative is unpoison if another
2643 variable in the partition is handled by
2644 use-after-scope sanitization.
2646 2018-09-24 Richard Biener <rguenther@suse.de>
2648 PR tree-optimization/63155
2649 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2650 the worklist when the edge of the respective argument isn't
2653 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2655 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
2656 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
2657 (MASK_CLASS_P): Update for rename.
2658 (MAYBE_MASK_CLASS_P): Ditto.
2659 (REG_CLASS_NAMES): Update.
2660 (REG_CLASS_CONTENT): Update.
2661 * config/i386/i386.c (regclass_map): Update for MASK_REG
2662 and ALL_MASK_REGS rename.
2663 * config/i386/constraints.md (Yk): Update for rename.
2666 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2668 * config/i386/i386.h (enum reg_class): Remove
2669 EVEX_SSE_REGS and MOD4_SSE_REGS.
2670 (REG_CLASS_NAMES): Update.
2671 (REG_CLASS_CONTENT): Update.
2672 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
2673 registers as ALL_SSE_REGS.
2674 (ix86_additional_allocno_class_p): Remove.
2675 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
2676 (ix86_register_priority): Lower priority of EVEX SSE registers.
2677 Use IN_RANGE macro where appropriate.
2678 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
2679 AVX-5124VNNIW checks.
2680 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
2681 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
2682 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
2683 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
2684 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
2685 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
2686 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
2687 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
2688 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
2689 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
2690 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
2691 * config/i386/constraints.md (Yh): Remove.
2693 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2695 * config/i386/i386.c (regclass_map): Declare integer REX registers
2698 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
2700 * doc/service.texi (Service): Switch the fsf.org link to https.
2702 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
2705 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2706 Define to speculation_safe_value_not_needed.
2708 2018-09-21 Florian Weimer <fweimer@redhat.com>
2711 * doc/extend.texi (Common Function Attributes): Mention that
2712 noreturn suppresses tail call optimization.
2714 2018-09-21 Jeff Law <law@redhat.com>
2716 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
2717 vr_values::cleanup_edges_and_switches.
2718 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
2720 (identify_jump_threads): Remove EDGE_IGNORE handling.
2721 (execute_vrp): Move handling of to_remove_edges and
2722 to_update_switch_stmts into vr_values class member functions.
2723 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
2724 (to_update_switch_stmts): Likewise.
2725 * vr-values.c: Include cfghooks.h.
2726 (vr_values::vr_values): Initialize to_remove_edges and
2727 to_update_switch_stmts.
2728 (vr_values::~vr_values): Verify to_remove_edges and
2729 to_update_switch_stmts are empty.
2730 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2731 (vr_values::cleanup_edges_and_switches): New member function.
2732 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2733 function. Add new data members.
2735 2018-09-21 David Malcolm <dmalcolm@redhat.com>
2737 PR tree-optimization/87309
2738 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2739 calls with pflags and alt_flags.
2740 (selftest::test_capture_of_dump_calls): Add test of interaction of
2741 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2743 2018-09-21 Olivier Hainque <hainque@adacore.com>
2745 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2747 2018-09-21 Olivier Hainque <hainque@adacore.com>
2749 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2751 2018-09-21 Olivier Hainque <hainque@adacore.com>
2753 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2754 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2755 (VXWORKS_LIBS_RTP): Minor reordering.
2757 2018-09-21 Olivier Hainque <hainque@adacore.com>
2759 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2760 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2762 2018-09-21 Olivier Hainque <hainque@adacore.com>
2764 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2765 (PTRDIFF_TYPE): Likewise.
2767 2018-09-21 Olivier Hainque <hainque@adacore.com>
2769 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2770 triplet, similar to support for VxWorks7.
2771 * config/vxworks-dummy.h: Provide a default definition
2772 of TARGET_VXWORKS64 to 0.
2774 2018-09-21 Olivier Hainque <hainque@adacore.com>
2776 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2777 * config/vxworks-dummy.h: here.
2779 2018-09-21 Olivier Hainque <hainque@adacore.com>
2781 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2783 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
2784 Bo Zhou <zbo.zhou@hisilicon.com>
2786 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2787 * config/aarch64/aarch64-tune.md: Regenerated.
2788 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2789 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2790 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2792 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
2793 Julian Brown <julian@codesourcery.com>
2795 * builtins.c (get_builtin_sync_mem): Handle address spaces.
2797 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2799 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2800 if the call takes a static chain.
2802 2018-09-21 Martin Liska <mliska@suse.cz>
2804 * auto-profile.c (autofdo_source_profile::read): Do not
2806 (read_profile): Do not add working sets.
2807 (read_autofdo_file): Remove sum_all.
2808 (afdo_callsite_hot_enough_for_early_inline): Remove const
2810 * coverage.c (struct counts_entry): Remove gcov_summary.
2811 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2812 do not support GCOV_TAG_PROGRAM_SUMMARY.
2813 (get_coverage_counts): Remove summary and expected
2815 * coverage.h (get_coverage_counts): Likewise.
2816 * doc/gcov-dump.texi: Remove -w option.
2817 * gcov-dump.c (dump_working_sets): Remove.
2818 (main): Do not support '-w' option.
2819 (print_usage): Likewise.
2820 (tag_summary): Likewise.
2821 * gcov-io.c (gcov_write_summary): Do not dump
2823 (gcov_read_summary): Likewise.
2824 (gcov_histo_index): Remove.
2825 (gcov_histogram_merge): Likewise.
2826 (compute_working_sets): Likewise.
2827 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2829 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2830 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2831 (GCOV_HISTOGRAM_SIZE): Remove.
2832 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2833 (struct gcov_summary): Simplify rapidly just
2834 to runs and sum_max fields.
2835 (gcov_histo_index): Remove.
2836 (NUM_GCOV_WORKING_SETS): Likewise.
2837 (compute_working_sets): Likewise.
2838 * gcov-tool.c (print_overlap_usage_message): Remove
2839 trailing empty line.
2840 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2841 (output_lines): Remove program related line.
2842 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2843 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2845 (input_profile_summary): Do not read it.
2846 (merge_profile_summaries): And do not merge it.
2847 (input_symtab): Do not call removed function.
2848 * modulo-sched.c (sms_schedule): Do not print sum_max.
2849 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2850 removed when histogram method was invented.
2851 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2853 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2855 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2856 and dump selected value.
2857 * profile.c (add_working_set): Remove.
2858 (get_working_sets): Likewise.
2859 (find_working_set): Likewise.
2860 (get_exec_counts): Do not work with working sets.
2861 (read_profile_edge_counts): Do not inform as sum_max is removed.
2862 (compute_branch_probabilities): Likewise.
2863 (compute_value_histograms): Remove argument for call of
2864 get_coverage_counts.
2865 * profile.h: Do not make gcov_summary const.
2867 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
2869 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2871 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2873 PR tree-optimization/86990
2874 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2875 Check that the entire merged store group is made of constants only for
2878 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
2880 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2881 (VTABLE_VERIFICATION_SPEC): Likewise.
2882 (SANITIZER_EARLY_SPEC): Likewise.
2883 (SANITIZER_SPEC): Likewise.
2884 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2885 * doc/invoke.texi (Link Options): Document -r.
2887 2018-09-20 Richard Biener <rguenther@suse.de>
2890 * gimplify.c (gimplify_expr): Retain alignment of
2891 addressable lvalue in dereference.
2893 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
2896 * configure.ac: Check for .loc is_stmt support.
2897 * configure, config.in: Rebuilt.
2898 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2901 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2903 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2904 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2907 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2909 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2911 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2914 2018-09-20 Marek Polacek <polacek@redhat.com>
2916 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2918 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2920 PR tree-optimization/87288
2921 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2922 into account when determining PEELING_FOR_NITERS.
2924 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2926 PR tree-optimization/86877
2927 * tree-vect-loop.c (vect_analyze_loop_2): Call
2928 vect_verify_datarefs_alignment.
2930 2018-09-19 Marek Polacek <polacek@redhat.com>
2932 * doc/invoke.texi: Document -Wclass-conversion.
2934 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2936 * config/pa/pa.c (pa_adjust_priority): Delete.
2937 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2939 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2940 (atomic_storehi): Likewise.
2941 (atomic_storesi): Likewise.
2942 (atomic_loaddi): Restore compare and swap exchange loop code.
2944 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
2946 PR rtl-optimization/86902
2947 * combine.c (try_combine): When changing the CC mode used, don't change
2948 an unrelated mode in other_insn to that new CC mode.
2950 2018-09-19 David Malcolm <dmalcolm@redhat.com>
2952 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2953 with %T in place of calls to dump_generic_expr.
2954 (prune_runtime_alias_test_list): Likewise.
2955 (create_runtime_alias_checks): Likewise.
2956 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2957 (vect_analyze_data_ref_dependence): Likewise.
2958 (vect_slp_analyze_data_ref_dependence): Likewise.
2959 (vect_record_base_alignment): Likewise. Use %G in place of call
2960 to dump_gimple_stmt.
2961 (vect_compute_data_ref_alignment): Likewise.
2962 (verify_data_ref_alignment): Likewise.
2963 (vect_find_same_alignment_drs): Likewise.
2964 (vect_analyze_group_access_1): Likewise.
2965 (vect_analyze_data_ref_accesses): Likewise.
2966 (dependence_distance_ge_vf): Likewise.
2967 (dump_lower_bound): Likewise.
2968 (vect_prune_runtime_alias_test_list): Likewise.
2969 (vect_find_stmt_data_reference): Likewise.
2970 (vect_analyze_data_refs): Likewise.
2971 (vect_create_addr_base_for_vector_ref): Likewise.
2972 (vect_create_data_ref_ptr): Likewise.
2973 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2974 (vect_can_advance_ivs_p): Likewise.
2975 (vect_update_ivs_after_vectorizer): Likewise.
2976 (vect_gen_prolog_loop_niters): Likewise.
2977 (vect_prepare_for_masked_peels): Likewise.
2978 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2979 (vect_determine_vectorization_factor): Likewise.
2980 (vect_is_simple_iv_evolution): Likewise.
2981 (vect_analyze_scalar_cycles_1): Likewise.
2982 (vect_analyze_loop_operations): Likewise.
2983 (report_vect_op): Likewise.
2984 (vect_is_slp_reduction): Likewise.
2985 (check_reduction_path): Likewise.
2986 (vect_is_simple_reduction): Likewise.
2987 (vect_create_epilog_for_reduction): Likewise.
2988 (vect_finalize_reduction:): Likewise.
2989 (vectorizable_induction): Likewise.
2990 (vect_transform_loop_stmt): Likewise.
2991 (vect_transform_loop): Likewise.
2992 (optimize_mask_stores): Likewise.
2993 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2994 (vect_split_statement): Likewise.
2995 (vect_recog_over_widening_pattern): Likewise.
2996 (vect_recog_average_pattern): Likewise.
2997 (vect_determine_min_output_precision_1): Likewise.
2998 (vect_determine_precisions_from_range): Likewise.
2999 (vect_determine_precisions_from_users): Likewise.
3000 (vect_mark_pattern_stmts): Likewise.
3001 (vect_pattern_recog_1): Likewise.
3002 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3003 (vect_record_max_nunits): Likewise.
3004 (vect_build_slp_tree_1): Likewise.
3005 (vect_build_slp_tree_2): Likewise.
3006 (vect_print_slp_tree): Likewise.
3007 (vect_analyze_slp_instance): Likewise.
3008 (vect_detect_hybrid_slp_stmts): Likewise.
3009 (vect_detect_hybrid_slp_1): Likewise.
3010 (vect_slp_analyze_operations): Likewise.
3011 (vect_slp_analyze_bb_1): Likewise.
3012 (vect_transform_slp_perm_load): Likewise.
3013 (vect_schedule_slp_instance): Likewise.
3014 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3015 (vect_mark_stmts_to_be_vectorized): Likewise.
3016 (vect_init_vector_1): Likewise.
3017 (vect_get_vec_def_for_operand): Likewise.
3018 (vect_finish_stmt_generation_1): Likewise.
3019 (vect_check_load_store_mask): Likewise.
3020 (vectorizable_call): Likewise.
3021 (vectorizable_conversion): Likewise.
3022 (vectorizable_operation): Likewise.
3023 (vectorizable_load): Likewise.
3024 (vect_analyze_stmt): Likewise.
3025 (vect_is_simple_use): Likewise.
3026 (vect_get_vector_types_for_stmt): Likewise.
3027 (vect_get_mask_type_for_stmt): Likewise.
3028 * tree-vectorizer.c (increase_alignment): Likewise.
3030 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
3032 * doc/rtl.texi: Adjust vec_select description.
3033 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3034 non-constant selectors.
3036 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
3038 * config/aarch64/aarch64-protos.h
3039 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3040 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3041 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3042 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3043 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3044 (AARCH64_FL_PROFILE): Move index so flags are ordered.
3045 (AARCH64_ISA_RCPC8_4): New flag.
3046 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3047 to aarch64_offset_9bit_signed_unscaled_p.
3048 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3050 * config/aarch64/constraints.md (Ust): New constraint.
3051 * config/aarch64/predicates.md.
3052 (aarch64_9bit_offset_memory_operand): New predicate.
3053 (aarch64_rcpc_memory_operand): New predicate.
3055 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
3057 PR rtl-optimization/87361
3058 * rtlanal.c (nonzero_bits1): Revert accidental change.
3060 2018-09-19 Richard Biener <rguenther@suse.de>
3062 PR tree-optimization/87349
3063 PR tree-optimization/87342
3064 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3066 2018-09-18 Marek Polacek <polacek@redhat.com>
3068 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3069 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3071 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3073 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3075 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3077 PR rtl-optimization/86882
3078 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3080 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
3082 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3083 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3085 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
3088 * doc/invoke.texi (Link Options): Fix formatting and grammar.
3090 2018-09-18 Richard Biener <rguenther@suse.de>
3093 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3094 (compute_samebase_partition_bases): Likewise.
3095 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3096 (gimple_can_coalesce_p): Simplify.
3098 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
3100 Handle a library implementation of ffs calling __builtin_ffs.
3101 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3102 (mmix_init_libfuncs): New function: make __builtin_ffs expand
3105 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3107 * diagnostic-show-locus.c (class layout_range): Add field
3109 (layout_range::layout_range): Add "original_idx" param and use it
3110 to initialize new field.
3111 (make_range): Use 0 for original_idx.
3112 (layout::layout): Pass in index to calls to
3113 maybe_add_location_range.
3114 (layout::maybe_add_location_range): Add param "original_idx" and
3115 pass it on to layout_range.
3116 (layout::print_any_labels): Pass on range->m_original_idx to
3118 (gcc_rich_location::add_location_if_nearby): Use 0 for
3120 * gcc-rich-location.h (text_range_label::get_text): Update for new
3122 (range_label_for_type_mismatch::get_text): Likewise.
3124 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3126 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3128 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3130 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3131 format_string_diagnostic_t.
3132 (fmtwarn_n): Likewise.
3133 * substring-locations.c
3134 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3135 (format_warning_n_va): Convert to...
3136 (format_string_diagnostic_t::emit_warning_n_va): ...this.
3137 (format_warning_va): Convert to...
3138 (format_string_diagnostic_t::emit_warning_va): ...this.
3139 (format_warning_at_substring): Convert to...
3140 (format_string_diagnostic_t::emit_warning): ...this.
3141 (format_warning_at_substring_n): Convert to...
3142 (format_string_diagnostic_t::emit_warning_n): ...this.
3143 * substring-locations.h (class format_string_diagnostic_t): New
3145 (format_warning_va): Convert to
3146 format_string_diagnostic_t::emit_warning_va.
3147 (format_warning_n_va): Convert to
3148 format_string_diagnostic_t::emit_warning_n_va.
3149 (format_warning_at_substring): Convert to
3150 format_string_diagnostic_t::emit_warning.
3151 (format_warning_at_substring_n): Convert to
3152 format_string_diagnostic_t::emit_warning_n.
3154 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
3155 Bernd Schmidt <bernds_cb1@t-online.de>
3157 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3160 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3162 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3163 operand 0 predicate to nonimmediate operand.
3164 (rint<mode>2_frndint): Remove insn pattern.
3165 (rint<mode>2): Change operand 1 predicate to general_operand.
3166 Extend operand 1 to XFmode and generate rintxf2 insn.
3167 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3168 Do not use X87MODEF mode macro.
3169 (frndintxf2_<rounding>_i387): Rename from
3170 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
3171 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3172 to XFmode and generate significandxf3 insn.
3174 2018-09-17 Richard Biener <rguenther@suse.de>
3176 PR tree-optimization/87328
3177 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3178 visiting unexecutable backedges when not iterating.
3179 (do_rpo_vn): Mark all edges not executable even when not
3182 2018-09-17 Martin Jambor <mjambor@suse.cz>
3185 * doc/invoke.texi (Warning Options): Likewise.
3187 2018-09-17 Richard Biener <rguenther@suse.de>
3189 PR tree-optimization/87301
3190 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3191 clean EH info from leftover copy assignments.
3193 2018-09-17 Martin Liska <mliska@suse.cz>
3195 PR gcov-profile/85871
3196 * gcov.c (output_intermediate_file): Fix out of bounds
3199 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
3201 * config/arc/arc.c: Object attributes for core4 not reflected
3203 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3206 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
3208 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3210 2018-09-17 Martin Liska <mliska@suse.cz>
3212 * doc/gcov.texi: Document new option --use-hotness-colors.
3213 * gcov.c (struct source_info): Declare new field.
3214 (source_info::source_info): Set default for maximum_count.
3215 (print_usage): Add new -q option.
3216 (process_args): Process it.
3217 (accumulate_line_info): Save src->maximum_count.
3218 (output_line_beginning): Make color line number if
3219 flag_use_hotness_colors is set.
3220 (output_line_details): Pass default argument value.
3221 (output_lines): Pass src->maximum_count.
3223 2018-09-17 Martin Liska <mliska@suse.cz>
3225 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3226 Use processor_names table.
3227 * config/i386/i386.c (ix86_default_align): Use
3228 processor_cost_table for alignment values.
3229 (ix86_option_override_internal): Use processor_names.
3230 (ix86_function_specific_print): Likewise.
3231 * config/i386/i386.h (struct processor_costs):
3232 Add alignment values.
3233 (struct ptt): Remove and replace with const char *.
3234 * config/i386/x86-tune-costs.h (struct processor_costs):
3235 Declare default alignments for all costs.
3237 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
3239 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3240 symbolics or VR_VARYING ranges for ABS_EXPR.
3241 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3242 when range will wrap.
3244 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
3247 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3248 before and after a JUMP_TABLE_DATA.
3250 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
3253 * dojump.c (do_compare_and_jump): Canonicalize function pointers
3254 when one operand is a function pointer. Use POINTER_TYPE_P and
3255 FUNC_OR_METHOD_TYPE_P.
3256 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3257 * fold-const.c (build_range_check): Likewise.
3258 * match.pd (simple_comparison): Likewise.
3260 2018-09-14 David Malcolm <dmalcolm@redhat.com>
3263 * spellcheck.c (get_edit_distance_cutoff): New function.
3264 (selftest::test_edit_distance_unit_test_oneway): Rename to...
3265 (selftest::test_get_edit_distance_one_way): ...this.
3266 (selftest::test_get_edit_distance_unit): Rename to...
3267 (selftest::test_get_edit_distance_both_ways): ...this.
3268 (selftest::test_edit_distances): Move tests to this new function,
3269 and test some more pairs of strings. Update for above renaming.
3270 (selftest::get_old_cutoff): New function.
3271 (selftest::test_get_edit_distance_cutoff): New function.
3272 (selftest::assert_suggested_for): New function.
3273 (ASSERT_SUGGESTED_FOR): New macro.
3274 (selftest::assert_not_suggested_for): New function.
3275 (ASSERT_NOT_SUGGESTED_FOR): New macro.
3276 (selftest::test_suggestions): New function.
3277 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3278 tests to selftest::test_edit_distances and call it. Add calls to
3279 selftest::test_get_edit_distance_cutoff and
3280 selftest::test_suggestions.
3281 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3282 (best_match::consider): Replace hard-coded cutoff calculation with
3284 (best_match::get_cutoff): New declaration.
3285 (best_match::get_best_meaningful_candidate): Likewise.
3287 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3289 * builtins.c (fold_builtin_strlen): Remove TODO comment.
3291 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3294 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3296 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3297 terminated string literal.
3299 2018-09-14 Martin Sebor <msebor@redhat.com>
3301 * builtins.c (unterminated_array): Handle ARRAY_REF.
3302 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
3303 * builtins.h (unterminated_array): Declare extern.
3304 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
3306 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
3309 2018-09-14 Martin Sebor <msebor@redhat.com>
3310 Jeff Law <law@redhat.com>
3312 * builtins.c (unterminated_array): New.
3313 (expand_builtin_strcpy): Adjust.
3314 (expand_builtin_strcpy_args): Detect unterminated arrays.
3315 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
3316 unterminated arrays.
3317 * gimple-fold.h (get_maxval_strlen): Add argument.
3318 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
3320 * gimple-fold.c (get_range_strlen): Add argument.
3321 (get_maxval_strlen): Adjust.
3322 * gimple-fold.h (get_range_strlen): Add argument.
3324 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
3326 * config/i386/movdirintrin.h: Fix copyright year.
3328 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
3330 * reg-stack.c: Include regs.h.
3331 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
3332 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
3333 FIRST_STACK_REG, not DFmode.
3334 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
3335 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
3336 (change stack): Default register mode to the reg_raw_mode of
3337 FIRST_STACK_REG, not DFmode.
3338 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
3339 (*swapxf): Rename from swapxf.
3341 2018-09-14 Carl Love <cel@us.ibm.com>
3343 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
3344 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
3346 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
3349 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
3352 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
3355 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
3357 2018-09-14 Jason Merrill <jason@redhat.com>
3359 Fix --enable-gather-detailed-mem-stats.
3360 * hash-table.c (hash_table_usage): Change from variable to function.
3361 * hash-table.h: Adjust.
3362 * Makefile.in: Add missing dependencies on hash-table.h.
3364 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3366 PR tree-optimization/87259
3368 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
3369 execute_cse_reciprocals_1 has tried transforming.
3371 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
3373 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
3374 VR_VARYING for PLUS/MINUS_EXPR.
3376 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
3378 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
3381 2018-09-14 Richard Biener <rguenther@suse.de>
3384 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
3385 bits for the merged partition.
3387 2018-09-13 Martin Sebor <msebor@redhat.com>
3388 Bernd Edlinger <bernd.edlinger@hotmail.de>
3390 * builtins.h (c_srlen): Add argument.
3391 * builtins.c (warn_string_no_nul): New function.
3392 (c_strlen): Add argument and use it. Update recursive calls.
3393 Pass DECL argument to string_constant to get info on non
3394 terminated strings. Update *NONSTR as needed.
3395 (fold_builtin_strlen): Add argument to calls to c_strlen.
3396 Warn for unterminated arrays.
3397 (warn_string_no_null): Add prototype.
3398 * expr.c (string_constant): Update arguments. Update recursive
3399 calls appropriately. Detect missing NUL terminator and outermost
3400 declaration its missing in.
3401 Improve checks for arrays with nonzero lower bound or elements
3402 that are not a single byte. Simplify offset computation.
3403 Simplify checks for non-NUL terminated strings.
3404 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
3405 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
3407 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3409 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
3411 * fold-const.c (c_getstr): Fix function comment. Remove unused third
3412 argument. Fix range checks.
3413 * fold-const.h (c_getstr): Adjust protoype.
3414 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
3415 string is constant but contains no NUL byte.
3417 * expr.c (string_constant): Adjust function comment.
3418 Remove bogus check for zero termination.
3420 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
3422 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
3423 (get_constant_size): Don't make STRING_CSTs larger than they are.
3424 (check_string_literal): New check function for STRING_CSTs.
3425 (output_constant): Use it.
3427 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
3430 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
3432 2018-09-13 Richard Biener <rguenther@suse.de>
3434 PR tree-optimization/87263
3435 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
3436 (struct unwind_state): Add max_rpo field.
3437 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
3438 Compute max_rpo, the max RPO number a block can be backwards reached
3439 from. Re-write non-iterating mode to a RPO ordered worklist approach,
3440 separating it from the iterating mode.
3442 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
3444 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
3445 (rfs_decision): New scheduling decision.
3447 2018-09-13 Richard Biener <rguenther@suse.de>
3450 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
3451 (vn_nary_op_insert_pieces_predicated): Do not write useless
3452 valid_dominated_by_p entry outside of the allocated storage.
3454 2018-09-13 Omar Sandoval <osandov@osandov.com>
3455 Tom de Vries <tdevries@suse.de>
3458 * dwarf2out.c (is_c): New function.
3459 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
3461 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
3464 * config/aarch64/aarch64.md (*aarch64_bfxil):
3466 * config/aarch64/constraints.md (Ulc): Define.
3467 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
3469 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
3472 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
3474 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
3475 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
3476 aarch64_layout_frame call.
3477 (aarch64_expand_epilogue): Likewise.
3478 (aarch64_initial_elimination_offset): Likewise.
3479 (aarch64_get_separate_components): Likewise.
3480 (aarch64_use_return_insn_p): Likewise.
3481 (aarch64_layout_frame): Remove unneeded check.
3483 2018-09-13 Jakub Jelinek <jakub@redhat.com>
3485 * configure.ac: Only append
3486 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
3487 gcc_config_arguments if it was never reconfigured or last reconfigure
3488 was with different arguments.
3489 * configure: Regenerated.
3491 2018-09-13 Jakub Jelinek <jakub@redhat.com>
3492 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3495 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
3496 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
3498 2018-09-13 Jakub Jelinek <jakub@redhat.com>
3500 PR tree-optimization/87287
3501 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
3502 X % C == 0 to X % (unsigned) C == 0 optimization to ...
3503 * match.pd (X % C == 0): ... here. New optimization.
3505 2018-09-12 Jakub Jelinek <jakub@redhat.com>
3508 * expr.h (maybe_optimize_mod_cmp): Declare.
3509 * expr.c (mod_inv): New function.
3510 (maybe_optimize_mod_cmp): New function.
3511 (do_store_flag): Use it.
3512 * cfgexpand.c (expand_gimple_cond): Likewise.
3514 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
3515 Julian Brown <julian@codesourcery.com>
3518 * gimplify.c (gimplify_scan_omp_clauses): Set
3519 target_firstprivatize_array_bases in OpenACC parallel and kernels
3520 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
3521 OpenACC data regions.
3523 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
3525 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
3526 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
3528 2018-09-12 Richard Biener <rguenther@suse.de>
3530 PR tree-optimization/87280
3531 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
3532 edge but unreachable target.
3533 (do_rpo_vn): For conservatively handling a PHI only mark
3534 the backedge executable but not the block reachable.
3536 2018-09-12 Richard Biener <rguenther@suse.de>
3538 PR tree-optimization/87266
3539 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
3542 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
3544 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3546 ("trunc<BFP:mode><DFP_ALL:mode>2")
3547 ("trunc<DFP_ALL:mode><BFP:mode>2")
3548 ("extend<BFP:mode><DFP_ALL:mode>2")
3549 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3550 according to the target operand type.
3552 2018-09-12 Jakub Jelinek <jakub@redhat.com>
3553 Andreas Krebbel <krebbel@linux.ibm.com>
3555 PR tree-optimization/86844
3556 * gimple-ssa-store-merging.c
3557 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
3558 there are any overlapping stores in between them, make sure they are
3559 also coalesced or we give up completely.
3561 2018-09-12 Jakub Jelinek <jakub@redhat.com>
3564 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3565 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
3567 2018-09-12 Tom de Vries <tdevries@suse.de>
3569 * common.opt (gdescribe-dies): Add option.
3570 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
3571 attribute for artifical and nameless decls.
3572 (dwarf2out_register_external_die): Add description attribute to
3573 external reference die.
3574 (add_desc_attribute): New functions.
3575 (gen_subprogram_die): Add description attribute to
3576 DW_TAG_call_site_parameter.
3577 * tree-pretty-print.c (print_generic_expr_to_str): New function.
3578 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
3579 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
3581 (@item -gdescribe-dies): Add.
3583 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
3585 * tree-vrp.c (vrp_shift_undefined_p): Remove.
3586 (extract_range_from_binary_expr_1: Call
3587 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
3588 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
3591 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
3593 * gimple-ssa-warn-alloca.c
3594 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
3595 field for ALLOCA_BOUND_*_LARGE.
3597 2018-09-11 Nathan Sidwell <nathan@acm.org>
3599 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
3601 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3603 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
3604 for clobbers. Remove obsolete comment.
3606 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3608 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
3609 mpxchk, mpxld and mpxst types.
3610 (define_attr length_immediate): Remove all processing of mpx types.
3611 (define_attr prefix_0f): Ditto.
3612 (define_attr memory): Ditto.
3614 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3616 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
3617 (log<mode>2): Change operand 1 predicate to general_operand.
3618 Extend operand 1 to XFmode and generate logxf3 insn.
3619 (log10<mode>2): Change operand 1 predicate to general_operand.
3620 Extend operand 1 to XFmode and generate log10xf3 insn.
3621 (log2<mode>2): Change operand 1 predicate to general_operand.
3622 Extend operand 1 to XFmode and generate log2xf3 insn.
3623 (fyl2xp1_extend<mode>xf3_i387): Remove.
3624 (log1p<mode>2): Change operand 1 predicate to general_operand.
3625 Extend operand 1 to XFmode and generate log1pxf3 insn.
3626 (fxtract_extend<mode>xf3_i387): Remove.
3627 (logb<mode>2): Change operand 1 predicate to general_operand.
3628 Extend operand 1 to XFmode and generate logbxf3 insn.
3629 (ilogb<mode>2): Change operand 1 predicate to general_operand.
3630 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
3631 (significand<mode>2): Change operand 1 predicate to general_operand.
3632 Extend operand 1 to XFmode and generate significandxf3 insn.
3634 2018-09-11 Nathan Sidwell <nathan@acm.org>
3636 * gcc.c (perror_with_name, pfatal_with_name): Delete.
3637 (load_specs): Use fatal_error.
3638 (DELETE_IF_ORDINARY, process_command): Use error.
3639 (execute, run_attempt): Use fatal_error.
3641 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
3643 * diagnostic-core.h (sorry_at): New prototype.
3644 * diagnostic.c (sorry_at): New function.
3646 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
3648 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
3649 by zero as VR_UNDEFINED.
3651 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
3653 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
3654 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
3655 (<sincos>mode2): New expander.
3656 (sincos_extend<mode>xf3_i387): Remove insn pattern.
3657 (sincos -> sin, cos splitters): Remove splitter patterns.
3658 (sincos<mode>3): Change operand 2 predicate to general_operand.
3659 Extend operand 2 to XFmode and generate sincosxf3 insn.
3660 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
3661 Change operand 3 predicate to const1_operand.
3662 (fptan_extend<mode>xf4_i387): Remove insn pattern.
3663 (tanxf2): Update operands in the call to fptanxf4_i387.
3664 (tan<mode>2): Change operand 1 predicate to general_operand.
3665 Extend operand 1 to XFmode and generate tanxf3 insn.
3666 (atan2xf3): Rename from *fpatanxf3_i387.
3667 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
3668 (atan2xf3): Remove expander.
3669 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
3670 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
3671 (atan<mode>2): Change operand 1 predicate to general_operand.
3672 Extend operand 1 to XFmode and generate atanxf3 insn.
3674 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
3676 * config/i386/i386.md (x87/SSE constant load splitter): Use
3677 memory_operand instead of nonimmediate_operand for input operand
3680 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
3682 * config/i386/i386.md (float partial SSE register stall splitter): Move
3683 splitter near its instruction pattern.
3684 (float_extend partial SSE register stall splitter): Ditto.
3685 (float_truncate partial SSE register stall splitter): Ditto.
3687 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
3690 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3691 to speculation_safe_value_not_needed.
3694 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3695 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3696 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3697 leaf_function_p, instead use has_hard_reg_initial_val.
3699 2018-09-09 Nathan Sidwell <nathan@acm.org>
3701 * gcc.h (pfatal_with_name): Don't declare here.
3702 * gcc.c (pfatal_with_name): Make static.
3704 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
3706 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
3709 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
3711 PR rtl-optimization/85458
3712 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
3713 priority hook to reduce the priority of EXPR.
3715 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
3717 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
3718 DImode for x87 on 32bit targets. Conditionally disable x87 modes
3719 with X87_ENABLE_FLOAT. Remove preparation code.
3720 (*float<SWI48:mode><MODEF:mode>2): Rename from
3721 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
3722 math using "enabled" attribute.
3723 (*floatdi<MODEF:mode>2_i387): Rename from
3724 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
3725 enable for 32bit targets only.
3726 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
3728 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3729 as operand 1 predicate. Rewrite as define_insn_and_split.
3730 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3732 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
3734 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3735 to fallthru to FLOAT case.
3737 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3740 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3741 around folding of vec_sl to handle out of range shift values.
3743 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
3745 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3746 Update callers to gen_fix_trunc<mode>_i387_fisttp
3747 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3748 nonimmediate_operand.
3749 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3750 and corresponding splitters.
3751 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3752 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3753 (fix_truncdi_i387_with_temp): Remove insn pattern
3754 and corresponding splitters.
3755 (fix_trunc<mode>_i387): Change operand 0 predicate to
3756 nonimmediate_operand.
3757 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3758 and corresponding splitters.
3759 (*fistdi2_1): Remove.
3761 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3762 (lrintxfdi2): Remove expander. Reimplement as define_insn.
3763 (*fist<mode>2_1): Remove.
3764 (fist<mode>2): Ditto.
3765 (fist<mode>2_with_temp): Remove insn pattern and corresponding
3767 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
3768 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3769 (fistdi2_<rounding>): Change operand 0 predicate to
3770 nonimmediate_operand.
3771 (fistdi2_<rounding>_with_temp): Remove insn pattern
3772 and corresponding splitters.
3773 (fist<mode>2_<rounding>): Change operand 0 predicate to
3774 nonimmediate_operand.
3775 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3776 and corresponding splitters.
3778 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3780 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3782 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3785 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3787 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3788 early gimple folding of vec_splat().
3789 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3790 * gimple-fold.h: Add an extern define for tree_vec_extract().
3792 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3794 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3795 wrappers around TREE_TYPE comparisons.
3797 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3800 * config/s390/predicates.md: Add nonsym_memory_operand.
3801 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3802 contains a SYMBOL_REF, load it into an intermediate pseudo.
3803 (s390_emit_compare_and_swap): Legitimize operand.
3804 * config/s390/s390.md: Use the new nonsym_memory_operand
3805 with UNSPECV_CAS patterns.
3807 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3810 * config/s390/s390-passes.def: New file.
3811 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3813 (make_pass_s390_early_mach): Add declaration.
3814 * config/s390/s390.c (make_pass_s390_early_mach):
3815 (s390_option_override): Remove dynamic registration.
3816 * config/s390/t-s390: Add s390-passes.def.
3818 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3820 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3821 Remove UNSPEC_LTREL_BASE check.
3822 (annotate_constant_pool_refs): Likewise.
3823 (find_constant_pool_ref): Likewise.
3824 (find_ltrel_base): Removed.
3825 (replace_ltrel_base): Removed.
3826 (s390_mainpool_finish): Remove replace_ltrel_base call.
3827 (s390_chunkify_start): Remove pending LTREL_BASE logic.
3828 (s390_chunkify_finish): Remove replace_ltrel_base call.
3829 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3831 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
3834 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3835 to speculation_safe_value_not_needed.
3837 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
3838 Bernd Schmidt <bernds_cb1@t-online.de>
3840 * config/nvptx/nvptx-opts.h: New file.
3841 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3842 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3844 (TARGET_SM35): New macro.
3845 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3847 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3849 (misa=): New option.
3850 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3852 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
3854 * config/i386/i386.md (truncdfsf2): Remove expander.
3855 (truncdfsf2_with_temp): Ditto.
3856 (truncxf<mode>2): Ditto.
3857 (*truncdfsf_fast_mixed): Remove insn pattern.
3858 (*truncdfsf_fast_i387): Ditto.
3859 (*truncdfsf_mixed): Ditto.
3860 (*truncdfsf_i387): Ditto.
3861 (*truncdfsf2_i387_1): Ditto.
3862 (*truncxfsf2_mixed): Ditto.
3863 (*truncxfdf2_mixed): Ditto.
3864 (*truncxf<mode>2_i387_noop): Ditto. Update callers
3865 to call gen_truncxf<mode>2 instead.
3866 (*truncxf<mode>2_i387): Remove.
3867 (reg->reg splitters): Remove splitter pattern.
3868 (reg->mem splitters): Ditto.
3870 (truncdfsf2): New insn pattern.
3871 (truncxf<mode>2): Ditto.
3873 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3875 * tree-ssa-math-opts.c (is_mult_by): New function.
3876 (is_square_of): Use the above.
3877 (optimize_recip_sqrt): New function.
3878 (pass_cse_reciprocals::execute): Use the above.
3880 2018-09-05 Richard Biener <rguenther@suse.de>
3883 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3884 to zero-init the emplaced vec.
3886 2018-09-05 Martin Liska <mliska@suse.cz>
3888 PR tree-optimization/87205
3889 * tree-switch-conversion.c (pass_lower_switch::execute):
3890 Group cases for switch statements.
3892 2018-09-05 Richard Biener <rguenther@suse.de>
3894 PR tree-optimization/87217
3895 * tree-ssa-sccvn.c (vuse_valueize): New.
3896 (vn_reference_lookup_pieces): Use it.
3897 (vn_reference_lookup): Likewise.
3899 2018-09-05 Nathan Sidwell <nathan@acm.org>
3902 * stor-layout.c (place_field): Scan forwards to check last
3903 bitfield when ms_bitfield_placement is in effect.
3905 2018-09-05 Richard Biener <rguenther@suse.de>
3908 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3911 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
3912 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3914 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3915 * config.gcc (extra_objs): Build it.
3916 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3918 * config/aarch64/aarch64-passes.def
3919 (pass_tag_collision_avoidance): New pass.
3920 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3921 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3922 (aarch64_classify_address): Remove static qualifier.
3923 (aarch64_address_info, aarch64_address_type): Move to...
3924 * config/aarch64/aarch64-protos.h: ... here.
3925 (make_pass_tag_collision_avoidance): New function.
3926 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3929 2018-09-05 Martin Liska <mliska@suse.cz>
3931 * doc/gcov.texi: Update documentation of humar
3933 * gcov.c (format_count): Print one decimal place, it provides
3934 more fine number of situations like '1G' vs. '1.4G'.
3936 2018-09-05 Martin Liska <mliska@suse.cz>
3939 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3940 * optc-gen.awk: Allow 'Var' for Deprecated options in order
3941 to generate a MASK value.
3943 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
3946 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3947 if frame pointer isn't used.
3948 (compute_frame_pointer_to_fb_displacement): Likewise.
3950 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3953 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3954 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3955 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3956 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3957 and OPTION_MASK_ISA_XSAVEC_UNSET.
3959 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3961 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3962 XOR operations in NAND case.
3964 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3966 * wide-int-range.cc (wide_int_range_convert): New.
3967 * wide-int-range.h (wide_int_range_convert): New.
3968 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3969 code into wide_int_range_convert.
3970 (extract_range_into_wide_ints): Do not munge anti range constants
3971 into the entire domain. Just return the range back.
3973 2018-09-04 Martin Liska <mliska@suse.cz>
3975 * genmatch.c (output_line_directive): Add new argument
3977 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3979 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3981 * doc/invoke.texi (Option Summary): Add whitespace.
3983 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3985 2018-09-04 Richard Biener <rguenther@suse.de>
3987 PR tree-optimization/87211
3988 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3989 backedge value we're supposed to treat as VARYING also number
3990 the PHI to VARYING in case it got a different value-number already.
3992 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3994 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3995 (extract_range_from_binary_expr_1): Do not call
3996 vrp_can_optimize_bit_op.
3997 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3999 (wide_int_range_get_mask_and_bounds): New.
4000 (wide_int_range_optimize_bit_op): New.
4001 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4002 (wide_int_range_bit_and): Same.
4003 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4004 (wide_int_range_optimize_bit_op): New.
4005 (wide_int_range_get_mask_and_bounds): New.
4007 2018-09-04 Richard Biener <rguenther@suse.de>
4009 PR tree-optimization/87176
4010 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4011 variable. When value-numbering a virtual PHI node make sure
4012 to not value-number to the backedge value.
4014 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4016 * doc/extend.texi (Long Long, Hex Floats): Document support for
4017 long long and hex floats in more recent versions of ISO C++.
4019 2018-09-03 Richard Biener <rguenther@suse.de>
4021 PR tree-optimization/87177
4022 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4025 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4027 * bb-reorder.c (edge_order): Convert to C-qsort-style
4028 tri-state comparator.
4029 (reorder_basic_blocks_simple): Change std::stable_sort to
4032 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4034 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4035 tri-state comparator.
4036 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4038 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4040 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
4041 (mergesort): ... here as maximum count for using netsort.
4042 (gcc_qsort): Set nlim to 3 if stable sort is requested.
4043 (gcc_stablesort): New.
4044 * system.h (gcc_stablesort): Declare.
4046 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4048 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4049 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
4050 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
4052 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
4054 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4055 lxsdx and stxsdx alternatives.
4056 (*mov<mode>_hardfloat64): Ditto.
4057 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4059 2018-09-03 Richard Biener <rguenther@suse.de>
4061 PR tree-optimization/87200
4062 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4065 2018-09-03 Martin Liska <mliska@suse.cz>
4067 PR tree-optimization/87201
4068 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4069 Fix parenthesis in an expression.
4071 2018-09-03 Richard Biener <rguenther@suse.de>
4073 PR tree-optimization/87197
4074 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4075 visited. CSE the VN_INFO hashtable lookup.
4077 PR tree-optimization/87169
4078 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4079 iterating make sure there's no extra backedges from irreducible
4080 regions feeding the header. Mark the destination block
4083 2018-09-03 Martin Liska <mliska@suse.cz>
4086 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4087 * common/common-targhooks.c (default_get_valid_option_values):
4089 * common/common-targhooks.h (default_get_valid_option_values):
4091 * common/config/i386/i386-common.c: Move processor_target_table
4093 (ix86_get_valid_option_values): New function.
4094 (TARGET_GET_VALID_OPTION_VALUES): New macro.
4095 * config/i386/i386.c (struct ptt): Move to i386-common.c.
4096 (PTA_*): Move all defined masks into i386-common.c.
4097 (ix86_function_specific_restore): Use new processor_cost_table.
4098 * config/i386/i386.h (struct ptt): Moved from i386.c.
4099 (struct pta): Likewise.
4100 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4101 * doc/tm.texi.in: Likewise.
4102 * opt-suggestions.c (option_proposer::suggest_option):
4103 Pass prefix to build_option_suggestions.
4104 (option_proposer::get_completions): Likewise.
4105 (option_proposer::build_option_suggestions): Use the new target
4107 * opts.c (struct option_help_tuple): New struct.
4108 (print_filtered_help): Use the new target hook.
4110 2018-09-03 Martin Liska <mliska@suse.cz>
4113 * predict.c (set_even_probabilities): Add likely_edges
4114 argument and handle cases where we have precisely one
4116 (combine_predictions_for_bb): Catch also likely_edges.
4117 (tree_predict_by_opcode): Handle gswitch statements.
4118 * tree-cfg.h (find_case_label_for_value): New declaration.
4119 (find_taken_edge_switch_expr): Likewise.
4120 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4121 Find pivot in decision tree based on probabily, not by number of
4124 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
4126 * doc/standards.texi (Standards): Update Objective-C reference.
4128 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4130 * doc/install.texi (Prerequisites): Update link for MPC.
4132 2018-09-01 Michael Matz <matz@suse.de>
4134 PR tree-optimization/87074
4135 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4136 PHIs for outer-loop uses.
4138 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4140 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4141 * doc/invoke.texi (C Dialect Options): Ditto.
4143 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4145 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4147 2018-08-31 Richard Biener <rguenther@suse.de>
4149 PR tree-optimization/87168
4150 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4151 (rpo_elim::eliminate_avail): When OP was not visited it must
4154 2018-08-31 David Malcolm <dmalcolm@redhat.com>
4156 * tree-vrp.c (copy_value_range): Convert param "from" from
4157 "value_range *" to "const value_range *".
4158 (range_is_null): Likewise for param "vr".
4159 (range_int_cst_p): Likewise.
4160 (range_int_cst_singleton_p): Likewise.
4161 (symbolic_range_p): Likewise.
4162 (value_ranges_intersect_p): Likewise for both params.
4163 (value_range_nonnegative_p): Likewise for param "vr".
4164 (value_range_constant_singleton): Likewise.
4165 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4166 (extract_range_into_wide_ints): Likewise for param "vr".
4167 (extract_range_from_multiplicative_op): Likewise for params "vr0"
4169 (vrp_can_optimize_bit_op): Likewise.
4170 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4172 (extract_range_from_unary_expr): Likewise.
4173 (debug_value_range): Likewise for param "vr".
4174 (value_range::dump): Add "const" qualifier.
4175 (vrp_prop::check_array_ref): Convert local "vr" from
4176 "value_range *" to "const value_range *".
4177 (vrp_prop::check_mem_ref): Likewise.
4178 (vrp_prop::visit_stmt): Likewise for local "old_vr".
4179 (vrp_intersect_ranges_1): Likewise for param "vr_1".
4180 (vrp_intersect_ranges): Likewise.
4181 (simplify_stmt_for_jump_threading): Likewise for local "vr".
4182 (vrp_prop::vrp_finalize): Likewise.
4183 * tree-vrp.h (value_range::dump): Add "const" qualifier.
4184 (vrp_intersect_ranges): Add "const" qualifier to params as above.
4185 (extract_range_from_unary_expr): Likewise.
4186 (value_range_constant_singleton): Likewise.
4187 (symbolic_range_p): Likewise.
4188 (copy_value_range): Likewise.
4189 (extract_range_from_binary_expr_1): Likewise.
4190 (range_int_cst_p): Likewise.
4191 (vrp_set_zero_nonzero_bits): Likewise.
4192 (range_int_cst_singleton_p): Likewise.
4194 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
4196 * config/aarch64/arm_neon.h (vabsd_s64): New.
4197 (vnegd_s64): Likewise.
4199 2018-08-31 Martin Jambor <mjambor@suse.cz>
4201 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4203 2018-08-31 Martin Liska <mliska@suse.cz>
4205 * ipa-icf.c (sem_item::add_type): Use
4206 sem_item::m_type_hash_cache.
4207 * ipa-icf.h: Move the cache from sem_item_optimizer
4210 2018-08-31 Nathan Sidwell <nathan@acm.org>
4212 * doc/extend.texi (Backwards Compatibility): Remove implicit
4213 extern C leeway of () being (...).
4215 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4217 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4219 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
4223 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4225 2018-08-31 Jakub Jelinek <jakub@redhat.com>
4228 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4229 gen_int_mode. Formatting fixes.
4231 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
4233 * target.def (custom_function_descriptors): Improve documentation.
4234 * doc/tm.texi.in (Trampolines): Expand discussion of function
4235 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4236 beginning of the section.
4237 * doc/tm.texi: Regenerated.
4239 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
4241 * cfg.h (class auto_edge_flag): Spell out the template-id of the
4242 base class in the initializer list. This is a workaround for
4243 building with older GCC.
4244 (class auto_bb_flag): Likewise.
4246 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
4248 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4249 (altivec_vcmpequ<VI_char>_p): Remove star.
4250 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4252 (expand_strncmp_vec_sequence): New function.
4253 (emit_final_str_compare_vec): New function.
4254 (expand_strn_compare): Add support for vector strncmp.
4255 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4256 length specification to bytes.
4257 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4258 (vcmpnezb_p): New pattern.
4259 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4260 for option -mstring-compare-inline-limit.
4262 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
4264 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4265 (PTA_SKYLAKE): Add PTA_AES.
4266 (PTA_GOLDMONT): Likewise.
4268 2018-08-29 Jan Hubicka <jh@suse.cz>
4271 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4272 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4274 2018-08-29 Jan Hubicka <jh@suse.cz>
4276 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4278 (hash_tree): Do not visit TYPE_STUB_DECL.
4279 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4280 stream TYPE_STUB_DECL.
4281 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4282 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4283 after free_lang_data.
4284 (type_in_anonymous_namespace_p): Likewise.
4286 2018-08-29 Jan Hubicka <jh@suse.cz>
4288 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4289 comment that it has to be even number.
4290 (class sreal): Change m_sig type to int32_t.
4291 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4292 int64_t for temporary calculations.
4293 (sreal_verify_basics): Drop one bit from minimum and maximum.
4295 2018-08-30 Richard Biener <rguenther@suse.de>
4297 PR tree-optimization/87147
4298 * tree-ssa-sccvn.c (SSA_VISITED): New function.
4299 (visit_phi): When the degenerate result is from the backedge and
4300 we didn't visit its definition yet drop to VARYING.
4301 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
4303 2018-08-29 Jan Hubicka <jh@suse.cz>
4305 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
4307 (hash_tree): Likewise.
4309 2018-08-29 Jan Hubicka <jh@suse.cz>
4311 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
4312 and TYPE_NEXT_REF_TO.
4314 2018-08-29 Jan Hubicka <jh@suse.cz>
4316 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4317 comment that it has to be even number.
4318 (class sreal): Change m_sig type to int32_t.
4319 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4320 int64_t for temporary calculations.
4321 (sreal_verify_basics): Drop one bit from minimum and maximum.
4323 2018-08-30 Tamar Christina <tamar.christina@arm.com>
4325 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
4327 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
4330 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
4331 if to_add is negative.
4333 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
4336 * builtins.c (c_strlen): Improve range checks.
4338 2018-08-29 Martin Sebor <msebor@redhat.com>
4339 Jeff Law <law@redhat.com>
4341 PR tree-optimization/86714
4342 PR tree-optimization/86711
4343 * builtins.c (c_strlen): Add arguments to call to string_constant.
4344 * expr.c (string_constant): Add argument. Detect missing nul
4345 terminator and outermost declaration it's missing in.
4346 * expr.h (string_constant): Add argument.
4347 * fold-const.c (read_from_constant_string): Add arguments to call to
4349 (c_getstr): Likewise.
4350 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4352 * tree-ssa-strlen.c (get_stridx): Likewise.
4354 2018-08-29 Jan Hubicka <jh@suse.cz>
4356 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
4357 Do not stream DECL_VINDEX.
4358 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
4359 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
4360 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
4362 2018-08-29 Richard Biener <rguenther@suse.de>
4364 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
4365 virtual operands that are not default defs to honor region
4367 (rpo_vn_valueize): Remove ineffective code here.
4369 2018-08-29 Richard Biener <rguenther@suse.de>
4371 PR tree-optimization/87132
4372 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
4373 when skipping defs reachable over backedges.
4375 2018-08-29 Richard Biener <rguenther@suse.de>
4377 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
4378 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
4379 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
4380 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
4381 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
4382 (vn_reference_lookup_3): Remove use of const_parms.
4383 (free_rpo_vn): Do not free const_parms.
4384 (do_rpo_vn): Do not call init_const_parms.
4385 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
4386 SSA_NAME_POINTS_TO_READONLY_MEMORY.
4387 (call_may_clobber_ref_p_1): Likewise.
4389 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
4392 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
4394 (-ftree-scev-cprop): Document.
4396 2018-08-29 Jan Hubicka <jh@suse.cz>
4398 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
4400 (sreal constructor): Update.
4401 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
4402 sreal:operator/): Update.
4404 2018-08-29 Martin Liska <mliska@suse.cz>
4406 * tree-switch-conversion.c (switch_conversion::expand):
4407 Strenghten assumption about gswitch statements.
4409 2018-08-29 Richard Biener <rguenther@suse.de>
4411 PR tree-optimization/87117
4412 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
4413 re-value-number released SSA VDEFs.
4415 2018-08-29 Richard Biener <rguenther@suse.de>
4417 PR tree-optimization/87126
4418 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
4420 2018-08-28 Jim Wilson <jimw@sifive.com>
4422 * config/riscv/pic.md: Rewrite.
4423 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
4425 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
4426 (SOFTF, default_load, softload, softstore): New.
4428 2018-08-28 Jeff Law <law@redhat.com>
4430 * fold-const.c (fold_binary_loc): Remove recently added assert.
4432 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
4434 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
4435 to OP parmeter of generated function.
4437 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
4439 PR tree-optimization/87009
4440 * match.pd: Add boolean optimizations.
4442 2018-08-28 Martin Sebor <msebor@redhat.com>
4445 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
4446 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
4447 (pass_walloca::gate): Use it.
4448 (alloca_call_type): Same.
4449 (pass_walloca::execute): Same.
4450 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
4452 2018-08-28 David Malcolm <dmalcolm@redhat.com>
4454 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
4455 GCC_VERSION for usage of "__gcc_dump_printf__" format from
4458 2018-08-28 Richard Biener <rguenther@suse.de>
4460 PR tree-optimization/87124
4461 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
4462 constants before looking up avail.
4464 2018-08-28 Jakub Jelinek <jakub@redhat.com>
4467 * calls.c (maybe_warn_nonstring_arg): Punt early if
4468 warn_stringop_overflow is zero. Don't call get_range_strlen
4469 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
4470 Swap comparison operands to have constants on rhs. Only use
4471 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
4472 increment lenrng[0].
4474 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
4476 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
4477 use of tree_to_shwi. Remove duplicated test for the size being
4478 a whole number of bytes.
4480 2018-08-28 Richard Biener <rguenther@suse.de>
4482 PR tree-optimization/87117
4483 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
4484 Handle removed stmt without LHS (GIMPLE_NOP).
4486 2018-08-28 Richard Biener <rguenther@suse.de>
4488 PR tree-optimization/87117
4489 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
4490 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
4492 2018-08-28 Richard Biener <rguenther@suse.de>
4494 PR tree-optimization/87117
4495 * tree-ssa-pre.c (compute_avail): Do not make expressions
4496 with predicated values available.
4497 (get_expr_value_id): Assert we do not run into predicated value
4500 2018-08-28 Richard Biener <rguenther@suse.de>
4502 PR tree-optimization/87117
4503 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
4504 get virtual operands.
4505 (get_expr_operands): Handle STRING_CST like other decls.
4507 2018-08-28 Martin Liska <mliska@suse.cz>
4509 * tree.h: Update documentation of fndecl_built_in_p
4513 2018-08-27 Jeff Law <law@redhat.com>
4514 PR tree-optimization/87110
4515 * tree-ssa-dse.c (compute_trims): Handle non-constant
4518 2018-08-27 Martin Sebor <msebor@redhat.com>
4520 PR tree-optimization/86914
4521 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
4523 2018-08-27 Martin Sebor <msebor@redhat.com>
4525 PR tree-optimization/87112
4526 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
4527 the type of the bound argument.
4529 2018-08-27 Jeff Law <law@redhat.com>
4531 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
4532 type does not have a TYPE_SIZE_UNIT.
4534 2018-08-27 Steve Ellcey <sellcey@cavium.com>
4536 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
4537 with include of backend.h.
4539 2018-08-27 Richard Biener <rguenther@suse.de>
4541 PR tree-optimization/86927
4542 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
4543 use const cond reduction code.
4545 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
4547 PR tree-optimization/85758
4548 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
4550 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4553 * diagnostic-show-locus.c (class layout_range): Update for
4554 conversion of show_caret_p to a tri-state.
4555 (layout_range::layout_range): Likewise.
4556 (make_range): Likewise.
4557 (layout::maybe_add_location_range): Likewise.
4558 (layout::should_print_annotation_line_p): Don't show annotation
4559 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
4560 (layout::get_state_at_point): Update for conversion of
4561 show_caret_p to a tri-state. Bail out early for
4562 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
4563 underlining or source colorization.
4564 (gcc_rich_location::add_location_if_nearby): Update for conversion
4565 of show_caret_p to a tri-state.
4566 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
4567 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
4569 (selftest::test_one_liner_labels): Likewise.
4570 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
4571 conversion of show_caret_p to a tri-state.
4572 * pretty-print.c (text_info::set_location): Likewise.
4573 * pretty-print.h (text_info::set_location): Likewise.
4574 * substring-locations.c (format_warning_n_va): Likewise.
4575 * tree-diagnostic.c (default_tree_printer): Likewise.
4576 * tree-pretty-print.c (newline_and_indent): Likewise.
4578 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4581 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
4582 line above for line-insertion fix-it hints.
4583 (selftest::test_fixit_insert_containing_newline): Update the
4584 expected results, and add a test with line-numbering enabled.
4586 2018-08-27 Martin Liska <mliska@suse.cz>
4589 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
4590 params with DECL_HAS_VALUE_EXPR_P.
4592 2018-08-27 Martin Liska <mliska@suse.cz>
4594 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4595 selected expansion strategy.
4597 2018-08-27 Martin Liska <mliska@suse.cz>
4599 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
4600 * builtins.c (is_builtin_fn): Likewise.
4601 * attribs.c (diag_attr_exclusions): Use new function
4602 fndecl_built_in_p and remove check for FUNCTION_DECL if
4604 (builtin_mathfn_code): Likewise.
4605 (fold_builtin_expect): Likewise.
4606 (fold_call_expr): Likewise.
4607 (fold_builtin_call_array): Likewise.
4608 (fold_call_stmt): Likewise.
4609 (set_builtin_user_assembler_name): Likewise.
4610 (is_simple_builtin): Likewise.
4611 * calls.c (gimple_alloca_call_p): Likewise.
4612 (maybe_warn_nonstring_arg): Likewise.
4613 * cfgexpand.c (expand_call_stmt): Likewise.
4614 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
4615 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
4616 (cgraph_node::verify_node): Likewise.
4617 * cgraphclones.c (build_function_decl_skip_args): Likewise.
4618 (cgraph_node::create_clone): Likewise.
4619 * config/arm/arm.c (arm_insert_attributes): Likewise.
4620 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
4621 * dse.c (scan_insn): Likewise.
4622 * expr.c (expand_expr_real_1): Likewise.
4623 * fold-const.c (operand_equal_p): Likewise.
4624 (fold_binary_loc): Likewise.
4625 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4626 * gimple-low.c (lower_stmt): Likewise.
4627 * gimple-pretty-print.c (dump_gimple_call): Likewise.
4628 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
4630 * gimple.c (gimple_build_call_from_tree): Likewise.
4631 (gimple_call_builtin_p): Likewise.
4632 (gimple_call_combined_fn): Likewise.
4633 * gimplify.c (gimplify_call_expr): Likewise.
4634 (gimple_boolify): Likewise.
4635 (gimplify_modify_expr): Likewise.
4636 (gimplify_addr_expr): Likewise.
4637 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
4638 * ipa-cp.c (determine_versionability): Likewise.
4639 * ipa-fnsummary.c (compute_fn_summary): Likewise.
4640 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
4641 * ipa-split.c (visit_bb): Likewise.
4642 (split_function): Likewise.
4643 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4644 * lto-cgraph.c (input_node): Likewise.
4645 * lto-streamer-out.c (write_symbol): Likewise.
4646 * omp-low.c (setjmp_or_longjmp_p): Likewise.
4647 (lower_omp_1): Likewise.
4648 * predict.c (strip_predict_hints): Likewise.
4649 * print-tree.c (print_node): Likewise.
4650 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
4651 * trans-mem.c (is_tm_irrevocable): Likewise.
4652 (is_tm_load): Likewise.
4653 (is_tm_simple_load): Likewise.
4654 (is_tm_store): Likewise.
4655 (is_tm_simple_store): Likewise.
4656 (is_tm_abort): Likewise.
4657 (tm_region_init_1): Likewise.
4658 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
4659 * tree-cfg.c (verify_gimple_call): Likewise.
4660 (move_stmt_r): Likewise.
4661 (stmt_can_terminate_bb_p): Likewise.
4662 * tree-eh.c (lower_eh_constructs_2): Likewise.
4663 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
4664 * tree-inline.c (remap_gimple_stmt): Likewise.
4665 (copy_bb): Likewise.
4666 (estimate_num_insns): Likewise.
4667 (fold_marked_statements): Likewise.
4668 * tree-sra.c (scan_function): Likewise.
4669 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
4670 (optimize_stack_restore): Likewise.
4671 (pass_fold_builtins::execute): Likewise.
4672 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
4673 (mark_all_reaching_defs_necessary_1): Likewise.
4674 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
4675 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4676 (pass_forwprop::execute): Likewise.
4677 * tree-ssa-loop-im.c (stmt_cost): Likewise.
4678 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4679 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
4680 * tree-ssa-strlen.c (get_string_length): Likewise.
4681 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
4682 (find_func_aliases_for_call): Likewise.
4683 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
4684 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
4685 * tree-tailcall.c (find_tail_calls): Likewise.
4686 * tree.c (need_assembler_name_p): Likewise.
4687 (free_lang_data_in_decl): Likewise.
4688 (get_call_combined_fn): Likewise.
4689 * ubsan.c (is_ubsan_builtin_p): Likewise.
4690 * varasm.c (incorporeal_function_p): Likewise.
4691 * tree.h (DECL_BUILT_IN): Remove and replace with
4693 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
4694 (fndecl_built_in_p): New.
4696 2018-08-27 Martin Liska <mliska@suse.cz>
4698 PR tree-optimization/86847
4699 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
4700 Dump also subtree probability.
4701 (switch_decision_tree::do_jump_if_equal): New function.
4702 (switch_decision_tree::emit_case_nodes): Handle special
4703 situations in balanced tree that can be emitted much simpler.
4704 Fix calculation of probabilities that happen in tree expansion.
4705 * tree-switch-conversion.h (struct cluster): Add
4707 (struct simple_cluster): Likewise.
4708 (struct case_tree_node): Add new function has_child.
4709 (do_jump_if_equal): New.
4711 2018-08-27 Martin Liska <mliska@suse.cz>
4713 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
4714 Add new argument to bit_test_cluster constructor.
4715 (bit_test_cluster::emit): Set bits really number of values
4717 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
4718 probability argument.
4719 * tree-switch-conversion.h (struct bit_test_cluster):
4720 Add m_handles_entire_switch.
4722 2018-08-27 Martin Liska <mliska@suse.cz>
4724 PR tree-optimization/86702
4725 * tree-switch-conversion.c (jump_table_cluster::emit):
4726 Make probabilities even for values in jump table
4727 according to number of cases handled.
4728 (switch_decision_tree::compute_cases_per_edge): Pass
4729 argument to reset_out_edges_aux function.
4730 (switch_decision_tree::analyze_switch_statement): Likewise.
4731 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4734 2018-08-27 Martin Liska <mliska@suse.cz>
4736 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4737 cfun argument explicitly.
4738 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4739 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4740 function gimple_switch_default_bb.
4741 (convert_switch_statements):
4743 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4744 * stmt.c (label_to_block_fn): Use label_to_block and pass
4745 cfun argument explicitly and use gimple_switch_label_bb.
4746 (expand_case): Likewise.
4747 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4748 cfun argument explicitly. Likewise.
4749 (make_edges_bb): Likewise.
4750 (make_cond_expr_edges): Likewise.
4751 (get_cases_for_edge): Likewise.
4752 (make_gimple_switch_edges): Likewise.
4753 (label_to_block_fn): Likewise.
4754 (label_to_block): Likewise.
4755 (make_goto_expr_edges): Likewise.
4756 (make_gimple_asm_edges): Likewise.
4757 (main_block_label): Likewise.
4758 (group_case_labels_stmt): Likewise.
4759 (find_taken_edge_computed_goto): Likewise.
4760 (find_taken_edge_switch_expr): Likewise.
4761 (gimple_verify_flow_info): Likewise.
4762 (gimple_redirect_edge_and_branch): Likewise.
4763 (gimple_switch_label_bb): New function.
4764 (gimple_switch_default_bb): Likewise.
4765 (gimple_switch_edge): Likewise.
4766 (gimple_switch_default_edge): Likewise.
4767 * tree-cfg.h (label_to_block_fn): Remove and replace ...
4768 (label_to_block): ... with this.
4769 (gimple_switch_label_bb): New.
4770 (gimple_switch_default_bb): Likewise.
4771 (gimple_switch_edge): Likewise.
4772 (gimple_switch_default_edge): Likewise.
4773 * tree-cfgcleanup.c (convert_single_case_switch): Use
4774 new gimple functions and pass new argument to label_to_block.
4775 (cleanup_control_flow_bb):
4776 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4777 cfun argument explicitly.
4778 (make_eh_edges): Likewise.
4779 (redirect_eh_dispatch_edge): Likewise.
4780 (lower_resx): Likewise.
4781 (lower_eh_dispatch): Likewise.
4782 (maybe_remove_unreachable_handlers): Likewise.
4783 (unsplit_eh): Likewise.
4784 (cleanup_empty_eh): Likewise.
4785 (verify_eh_edges): Likewise.
4786 (verify_eh_dispatch_edge): Likewise.
4787 * tree-ssa-dom.c (record_edge_info): Likewise.
4788 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4789 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4790 (thread_through_normal_block): Likewise.
4791 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4792 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4793 * tree-switch-conversion.c (switch_conversion::collect): Use new
4795 (switch_conversion::check_final_bb): Likewise.
4796 (switch_conversion::gather_default_values): Pass new argument
4798 (switch_conversion::build_constructors): Likewise.
4799 (switch_decision_tree::compute_cases_per_edge): Use new
4800 gimple_switch_edge function.
4801 (switch_decision_tree::analyze_switch_statement): Pass new argument
4803 (switch_decision_tree::try_switch_expansion): Use
4804 gimple_switch_default_edge.
4805 * tree-vrp.c (find_switch_asserts): Pass new argument
4807 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4808 (vr_values::simplify_switch_using_ranges): Likewise.
4810 2018-08-27 Richard Biener <rguenther@suse.de>
4812 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4813 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4815 * tree-ssa-sccvn.h (struct vn_pval): New structure.
4816 (struct vn_nary_op_s): Add unwind_to member. Add
4817 predicated_values flag and put result into a union together
4818 with a linked list of vn_pval.
4819 (struct vn_ssa_aux): Add name member to make maintaining
4820 a map of SSA name to vn_ssa_aux possible. Remove no longer
4821 needed info, dfsnum, low, visited, on_sccstack, use_processed
4822 and range_info_anti_range_p members.
4823 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4824 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4826 (vn_valueize): New global.
4827 (vn_context_bb): Likewise.
4828 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4829 VN_INFO_PTR_INFO): Remove.
4830 * tree-ssa-sccvn.c: ... (rewrite)
4831 (pass_fre::execute): For -O2+ initialize loops and run
4832 RPO VN in optimistic mode (iterating). For -O1 and -Og
4833 run RPO VN in non-optimistic mode.
4834 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4835 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4836 * doc/invoke.texi (sccvn-max-scc-size): Remove.
4837 (rpo-vn-max-loop-depth): Document.
4838 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4839 when valuezing the VUSE signals we walked out of the region.
4840 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4841 (phi_translate): Set VN context block to use for availability
4843 (compute_avail): Likewise.
4844 (pre_valueize): New function.
4845 (pass_pre::execute): Adjust to the RPO VN API.
4847 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4848 (propagate_constants_for_unrolling): Remove.
4849 (tree_unroll_loops_completely): Perform value-numbering
4850 on the unrolled bodies loop parent.
4852 2018-08-27 Richard Biener <rguenther@suse.de>
4854 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4855 for partial antic compute.
4857 2018-08-27 Jakub Jelinek <jakub@redhat.com>
4859 PR rtl-optimization/87065
4860 * combine.c (simplify_if_then_else): Formatting fix.
4861 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4863 (known_cond): Don't return const_true_rtx for vector modes. Use
4864 CONST0_RTX instead of const0_rtx. Formatting fixes.
4866 2018-08-27 Martin Liska <mliska@suse.cz>
4868 PR gcov-profile/87069
4869 * gcov.c (process_file): Record files already processed
4870 and warn about a file being processed multiple times.
4872 2018-08-27 Martin Liska <mliska@suse.cz>
4875 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4876 Set default values for x_aarch64_*_string strings.
4877 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4878 prefix. For -mabi do not print '=ABI' in help and use
4879 <option_value> format for -msve-vector-bits and -moverride
4882 2018-08-26 Jeff Law <law@redhat.com>
4884 * config/mips/frame-header-opt.c: Include "backend.h" rather than
4887 2018-08-26 Marek Polacek <polacek@redhat.com>
4889 PR c++/87029, Implement -Wredundant-move.
4890 * doc/invoke.texi: Document -Wredundant-move.
4892 2018-08-25 Martin Sebor <msebor@redhat.com>
4894 PR tree-optimization/87059
4895 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4896 to the same type as the other.
4897 * fold-const.c (fold_binary_loc): Assert expectation.
4899 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
4901 * config/darwin.c (machopic_legitimize_pic_address): Clean up
4902 extraneous parentheses, dead code section and formatting.
4904 2018-08-24 David Malcolm <dmalcolm@redhat.com>
4907 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4908 wide enough for jumps in the line-numbering to be visible.
4909 (layout::print_gap_in_line_numbering): New member function.
4910 (layout::calculate_line_spans): When using line numbering, merge
4911 line spans that are only 1 line apart.
4912 (diagnostic_show_locus): When printing line numbers, show gaps in
4913 line numbering directly, rather than printing headers.
4914 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4915 line-numbering with multiple line spans.
4916 (selftest::test_fixit_insert_containing_newline_2): Add test of
4917 line-numbering, in which the spans are close enough to be merged.
4919 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4921 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4922 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
4923 * tree-vrp.c (range_is_nonnull): Remove.
4924 (range_includes_zero_p): Accept value_range instead of min/max.
4925 (extract_range_from_binary_expr_1): Do not early bail on
4927 Use range_includes_zero_p instead of range_is_nonnull.
4928 (extract_range_from_unary_expr): Use range_includes_zero_p instead
4929 of range_is_nonnull.
4930 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
4931 special case VR_ANTI_RANGE.
4932 (vrp_finalize): Same.
4933 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4935 (range_is_nonnull): Remove.
4936 * vr-values.c (vrp_stmt_computes_nonzero): Use
4937 range_includes_zero_p instead of range_is_nonnull.
4938 (extract_range_basic): Pass value_range to range_includes_zero_p
4939 instead of range_is_nonnull.
4941 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
4943 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4944 * emit-rtl.h (rtl_data): Remove return_bnd.
4945 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4946 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4947 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4948 (POINTER_BOUNDS_MODE): Remove definition.
4949 (make_pointer_bounds_mode): Remove.
4950 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4951 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4952 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4953 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4954 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4955 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4956 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4958 * config/i386/i386-modes.def (BND32, BND64): Remove.
4959 * config/i386/i386.c (dbx_register_map): Remove bound registers.
4960 (dbx64_register_map): Ditto.
4961 (svr4_dbx_register_map): Ditto.
4962 (indirect_thunk_bnd_needed): Remove.
4963 (indirect_thunks_bnd_used): Ditto.
4964 (indirect_return_bnd_needed): Ditto.
4965 (indirect_return_via_cx_bnd): Ditto.
4966 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4967 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4968 (output_indirect_thunk): Ditto. Remove need_prefix argument.
4969 (output_indirect_thunk_function): Remove handling of
4970 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4971 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4972 (ix86_save_reg): Remove handling of crtl->return_bnd.
4973 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4974 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4975 and UNSPEC_BNDLX_ADDR.
4976 (ix86_output_indirect_branch_via_reg): Remove handling of
4977 indirect_thunk_prefix_bnd.
4978 (ix86_output_indirect_branch_via_push): Ditto.
4979 (ix86_output_function_return): Ditto.
4980 (ix86_output_indirect_function_return): Ditto.
4981 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4982 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4983 (CALL_USED_REGISTERS): Ditto.
4984 (REG_ALLOC_ORDER): Update for removal of bound registers.
4985 (HI_REGISTER_NAMES): Ditto.
4986 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4987 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4988 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4989 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4990 (FIRST_PSEUDO_REG): Update.
4991 (BND): Remove mode iterator.
4992 * config/i386/predicates.md (bnd_mem_operator): Remove.
4994 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4996 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4999 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5001 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5002 the case in which the permute needs only a single element and
5003 repeats for every vector of the result. Extend that case to
5004 handle variable-length vectors.
5005 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5007 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
5010 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5011 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5013 2018-08-24 Richard Biener <rguenther@suse.de>
5015 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5016 bb_flags_allocated members.
5017 (auto_flag): New RAII class for allocating flags.
5018 (auto_edge_flag): New RAII class for allocating edge flags.
5019 (auto_bb_flag): New RAII class for allocating bb flags.
5020 * cfgloop.c (verify_loop_structure): Allocate temporary edge
5022 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5023 in favor of temporarily allocated BB flag.
5024 * hsa-brig.c: Re-order includes.
5025 * hsa-dump.c: Likewise.
5026 * hsa-regalloc.c: Likewise.
5027 * print-rtl.c: Likewise.
5028 * profile-count.c: Likewise.
5030 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
5033 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5036 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5039 * wide-int-range.cc (wide_int_range_div): Do not ignore result
5040 from wide_int_range_multiplicative_op.
5042 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5044 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5047 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
5049 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5052 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
5054 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5055 full GENERIC expression used for replacement.
5057 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
5059 * tree-vrp.c (abs_extent_range): Remove.
5060 (extract_range_into_wide_ints): Pass wide ints by reference.
5061 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5062 Pass wide ints by reference in all calls to
5063 extract_range_into_wide_ints.
5064 * wide-int-range.cc (wide_int_range_div): New.
5065 * wide-int-range.h (wide_int_range_div): New.
5066 (wide_int_range_includes_zero_p): New.
5067 (wide_int_range_zero_p): New.
5069 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
5071 * config/aarch64/aarch64.md (arches): New enum.
5072 (arch): New enum attr.
5073 (arch_enabled): New attr.
5074 (enabled): Now uses arch_enabled only.
5075 (simd, sve, fp16): Removed attribute.
5076 (fp): Attr now defined in terms of 'arch'.
5077 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5078 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5079 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5080 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5081 attributes into 'arch'.
5082 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5083 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5084 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5085 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5086 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5087 'simd' attribute into 'arch'.
5088 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5089 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5090 Convert use of 'fp' attribute to 'arch'.
5091 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5092 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5094 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5095 (different modes) Merge 'fp' and 'simd' into 'arch'.
5096 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5099 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
5101 PR rtl-optimization/87026
5102 * expmed.c (canonicalize_comparison): If we can no longer create
5103 pseudoregisters, don't.
5105 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
5108 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5110 * config/arm/arm.c (speculation_barrier_libfunc): New static
5112 (arm_init_libfuncs): Initialize it.
5113 (arm_emit_speculation_barrier): New function.
5114 * config/arm/arm.md (speculation_barrier): Call
5115 arm_emit_speculation_barrier for architectures that do not have
5117 (speculation_barrier_insn): Only match on Armv7 or later.
5119 2018-08-23 Richard Biener <rguenther@suse.de>
5122 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5125 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5127 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5128 of single-vector TBLs.
5129 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5132 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5135 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5136 aarch64_evpc_tbl guard.
5138 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
5140 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5143 2018-08-22 Martin Sebor <msebor@redhat.com>
5146 * tree-pretty-print.c (pretty_print_string): Add argument.
5147 (dump_generic_node): Call to pretty_print_string with string size.
5149 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
5151 PR rtl-optimization/86771
5152 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5153 of two SETs into those two SETs, one to be placed at i2, if that SETs
5154 destination is modified between i2 and i3.
5156 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5158 PR tree-optimization/86725
5159 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5161 (vect_analyze_scalar_cycles_1): Check it.
5163 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5165 PR tree-optimization/86725
5166 * tree-vect-loop.c (vect_is_simple_reduction): When treating
5167 an outer loop phi as a double reduction, make sure that the
5168 single user of the phi result is an inner loop phi.
5170 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5172 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5173 grouped stores with gaps to a strided group.
5175 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5177 * tree-vect-stmts.c (get_group_load_store_type)
5178 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5179 first statement in a group.
5181 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5183 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5184 the sequence used in gcc/gcc.c.
5186 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5189 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5192 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5194 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5195 Darwin10-specific unwinder-shim.
5196 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5197 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5198 New to cater for Darwin10 Rosetta.
5200 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5202 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5203 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5205 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5210 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5211 (dwarf2out_switch_text_section): Generate a local label for the
5212 second function sub-section and apply it as the second FDE start
5214 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5215 second sub-section start.
5217 2018-08-22 Richard Biener <rguenther@suse.de>
5219 PR tree-optimization/86988
5220 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5222 2018-08-22 Richard Biener <rguenther@suse.de>
5224 PR tree-optimization/86945
5225 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5227 2018-08-22 Alexandre Oliva <oliva@adacore.com>
5229 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5230 a comment about how uses of r2 for .sdata2 come about.
5232 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
5234 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5236 2018-08-21 Marek Polacek <polacek@redhat.com>
5238 PR c++/86981, Implement -Wpessimizing-move.
5239 * doc/invoke.texi: Document -Wpessimizing-move.
5241 2018-08-21 Jan Hubicka <jh@suse.cz>
5243 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5244 * tree.h (is_redundant_typedef): Remove.
5245 * dwarf2out.c (is_redundant_typedef): Turn into static function.
5247 2018-08-21 Jan Hubicka <jh@suse.cz>
5249 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5252 2018-08-21 Tamar Christina <tamar.christina@arm.com>
5254 * expmed.c (extract_low_bits): Reject invalid subregs early.
5256 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5259 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5262 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5264 * config/vxworks.h: Guard vxworks_asm_out_constructor and
5265 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5266 * config/vxworks.c: Likewise.
5268 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5270 * config/vxworks.c: Set targetm.have_ctors_dtors
5271 if HAVE_INITFINI_ARRAY_SUPPORT.
5272 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5273 if HAVE_INITFINI_ARRAY_SUPPORT.
5275 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5277 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5278 default search path for VxWorks < 7.
5280 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5282 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5283 (get_format_string): Refer to c_getstr.
5285 2018-08-21 Tom de Vries <tdevries@suse.de>
5287 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5288 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5289 (debuginfo_early_stop): Declare.
5290 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5291 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5292 (debuginfo_early_stop): New function.
5293 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
5294 and debuginfo_early_stop.
5295 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
5296 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
5297 (general_init): Call debuginfo_early_init.
5298 (finalize): Call debuginfo_fini.
5299 (do_compile): Call debuginfo_init.
5300 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
5302 (@item -fdump-debug, @item -fdump-earlydebug): Add.
5304 2018-08-21 Tom de Vries <tdevries@suse.de>
5306 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
5307 flag_dump_noaddr and flag_dump_unnumbered.
5309 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
5311 * wide-int-range.cc (wide_int_range_abs): New.
5312 (wide_int_range_order_set): Rename from wide_int_range_min_max.
5313 * wide-int-range.h (wide_int_range_abs): New.
5314 (wide_int_range_min_max): New.
5315 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
5316 case to call wide_int_range_abs.
5317 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
5318 (extract_range_from_abs_expr): Delete.
5320 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
5323 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
5324 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
5327 2018-08-20 Nathan Sidwell <nathan@acm.org>
5328 Jeff Law <law@redhat.com>
5330 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
5331 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
5333 2018-08-20 David Malcolm <dmalcolm@redhat.com>
5336 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
5337 (decl_attributes): Likewise.
5338 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
5340 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5341 * diagnostic-core.h (class auto_diagnostic_group): New class.
5342 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
5343 (diagnostic_report_diagnostic): Handle the first diagnostics within
5345 (emit_diagnostic): Add auto_diagnostic_group instance.
5347 (inform_n): Likewise.
5348 (warning): Likewise.
5349 (warning_at): Likewise.
5350 (warning_n): Likewise.
5351 (pedwarn): Likewise.
5352 (permerror): Likewise.
5354 (error_n): Likewise.
5355 (error_at): Likewise.
5357 (fatal_error): Likewise.
5358 (internal_error): Likewise.
5359 (internal_error_no_backtrace): Likewise.
5360 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
5361 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
5362 * diagnostic.h (struct diagnostic_context): Add fields
5363 "diagnostic_group_nesting_depth",
5364 "diagnostic_group_emission_count", "begin_group_cb",
5366 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
5367 Add auto_diagnostic_group instance(s).
5368 (find_explicit_erroneous_behavior): Likewise.
5369 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
5370 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
5371 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
5372 (gimplify_va_arg_expr): Likewise.
5373 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
5374 (HSA_SORRY_AT): Likewise.
5375 * ipa-devirt.c (compare_virtual_tables): Likewise.
5376 (warn_odr): Likewise.
5377 * multiple_target.c (expand_target_clones): Likewise.
5378 * opts-common.c (cmdline_handle_error): Likewise.
5379 * reginfo.c (globalize_reg): Likewise.
5380 * substring-locations.c (format_warning_n_va): Likewise.
5381 * tree-inline.c (expand_call_inline): Likewise.
5382 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
5383 * tree-ssa-loop-niter.c
5384 (do_warn_aggressive_loop_optimizations): Likewise.
5385 * tree-ssa-uninit.c (warn_uninit): Likewise.
5386 * tree.c (warn_deprecated_use): Likewise.
5388 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
5391 * config/i386/i386.md (eh_return): Always update EH return
5392 address in word_mode.
5394 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
5396 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
5397 TARGET_SPLIT_COMPLEX_ARG is defined.
5399 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5401 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
5403 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5406 * expr.c (expand_assignment): Assert that bitpos is positive.
5407 (store_field): Likewise
5408 (expand_expr_real_1): Make sure that bitpos is positive.
5409 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
5412 2018-08-20 Nathan Sidwell <nathan@acm.org>
5414 * Makefile.in (CPP_ID_DATA_H): Delete.
5415 (CPP_INTERNAL_H): Don't add it.
5416 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
5417 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
5419 2018-08-20 Richard Biener <rguenther@suse.de>
5421 PR tree-optimization/78655
5422 * tree-vrp.c (extract_range_from_binary_expr_1): Make
5423 pointer + offset nonnull if either operand is nonnull work.
5425 2018-08-20 Tom de Vries <tdevries@suse.de>
5427 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
5428 unless the referenced die describes the added property using
5429 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
5430 Otherwise, add a DW_AT_location to the referenced die.
5432 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
5435 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
5436 register_operand when calling ix86_set_reg_reg_cost.
5437 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
5438 Set *total to 0 for operands that satisfy x86_64_immediate_operand
5439 predicate and to 1 otherwise.
5441 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
5443 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
5444 emit a diagnostic that it is not supported and reset the option.
5445 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
5446 supported and consume the option. (ASM_FINAL_SPEC): New.
5448 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
5450 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
5453 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
5455 C-SKY port: Documentation
5457 * doc/extend.texi (C-SKY Function Attributes): New section.
5458 * doc/invoke.texi (Option Summary): Add C-SKY options.
5459 (C-SKY Options): New section.
5460 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
5462 2018-08-17 Jojo <jijie_rong@c-sky.com>
5463 Huibin Wang <huibin_wang@c-sky.com>
5464 Sandra Loosemore <sandra@codesourcery.com>
5465 Chung-Lin Tang <cltang@codesourcery.com>
5467 C-SKY port: Backend implementation
5469 * config/csky/*: New.
5470 * common/config/csky/*: New.
5472 2018-08-17 Jojo <jijie_rong@c-sky.com>
5473 Huibin Wang <huibin_wang@c-sky.com>
5474 Sandra Loosemore <sandra@codesourcery.com>
5475 Chung-Lin Tang <cltang@codesourcery.com>
5476 Andrew Jenner <andrew@codesourcery.com>
5478 C-SKY port: Configury
5480 * config.gcc (csky-*-*): New.
5481 * configure.ac: Add csky to targets for dwarf2 debug_line support.
5482 * configure: Regenerated.
5484 2018-08-17 David Malcolm <dmalcolm@redhat.com>
5486 * dump-context.h: Include "dumpfile.h".
5487 (dump_context::dump_printf_va): Convert final param from va_list
5488 to va_list *. Convert from ATTRIBUTE_PRINTF to
5489 ATTRIBUTE_GCC_DUMP_PRINTF.
5490 (dump_context::dump_printf_loc_va): Likewise.
5491 * dumpfile.c: Include "stringpool.h".
5492 (make_item_for_dump_printf_va): Delete.
5493 (make_item_for_dump_printf): Delete.
5494 (class dump_pretty_printer): New class.
5495 (dump_pretty_printer::dump_pretty_printer): New ctor.
5496 (dump_pretty_printer::emit_items): New member function.
5497 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
5499 (dump_pretty_printer::emit_item): New member function.
5500 (dump_pretty_printer::stash_item): New member function.
5501 (dump_pretty_printer::format_decoder_cb): New member function.
5502 (dump_pretty_printer::decode_format): New member function.
5503 (dump_context::dump_printf_va): Reimplement in terms of
5504 dump_pretty_printer.
5505 (dump_context::dump_printf_loc_va): Convert final param from va_list
5507 (dump_context::begin_scope): Reimplement call to
5508 make_item_for_dump_printf.
5509 (dump_printf): Update for change to dump_printf_va.
5510 (dump_printf_loc): Likewise.
5511 (selftest::test_capture_of_dump_calls): Convert "stmt" from
5512 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
5513 with %T, %E, and %G.
5514 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
5515 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
5516 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
5517 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
5518 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
5519 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
5520 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
5521 within a dump_printf_loc call to "%wu".
5522 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
5523 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
5524 missing space after "=".
5525 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
5526 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
5527 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
5528 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
5529 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
5530 duplicate "vectorized" from message.
5532 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
5534 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
5535 polyNxK_t element's TYPE_STRING_FLAG.
5537 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
5539 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
5540 (they were unnamed before). Fix comments.
5542 2018-08-17 Nathan Sidwell <nathan@acm.org>
5544 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
5546 2018-08-17 Richard Biener <rguenther@suse.de>
5548 PR tree-optimization/86841
5549 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
5551 2018-08-17 Martin Liska <mliska@suse.cz>
5553 * common.opt: Remove Warn, Init and Report for options with
5554 Ignore/Deprecated flag. Warning is done automatically for
5556 * config/i386/i386.opt: Likewise.
5557 * config/ia64/ia64.opt: Likewise.
5558 * config/rs6000/rs6000.opt: Likewise.
5559 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
5560 Remove usage of flag_check_pointer_bounds.
5561 * lto-wrapper.c (merge_and_complain): Do not handle
5562 OPT_fcheck_pointer_bounds.
5563 (append_compiler_options): Likewise.
5564 * opt-functions.awk: Do not handle Deprecated.
5565 * optc-gen.awk: Check that Var, Report and Init are not
5566 used for an option with Ignore/Deprecated flag.
5567 * opts-common.c (decode_cmdline_option): Do not report
5569 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
5571 * opts.h (struct cl_option): Remove cl_deprecated flag.
5572 (CL_ERR_DEPRECATED): Remove error enum value.
5574 2018-08-17 Richard Biener <rguenther@suse.de>
5577 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
5578 across a va-arg-pack using call adjust its return value accordingly.
5580 2018-08-16 Martin Sebor <msebor@redhat.com>
5582 PR tree-optimization/86853
5583 * gimple-ssa-sprintf.c (struct format_result): Rename member.
5584 (struct fmtresult): Add member and initialize it in ctors.
5585 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
5586 (format_string): Handle %S the same as %ls. Set MAYFAIL.
5587 (format_directive): Set POSUNDER4K when MAYFAIL is set.
5588 (parse_directive): Handle %C same as %c.
5589 (sprintf_dom_walker::compute_format_length): Adjust.
5590 (is_call_safe): Adjust.
5592 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5594 * builtins.c (c_strlen): Add new parameter eltsize. Use it
5595 for determining how to count the elements.
5596 * builtins.h (c_strlen): Adjust prototype.
5597 * expr.c (string_constant): Add new parameter mem_size.
5598 Set *mem_size appropriately.
5599 * expr.h (string_constant): Adjust protoype.
5600 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
5601 * gimple-fold.h (get_range_strlen): Adjust prototype.
5602 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
5603 (format_string): Call get_string_length with eltsize.
5605 2018-08-16 David Malcolm <dmalcolm@redhat.com>
5607 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
5608 to emit the span, rather than setting it as the prefix.
5610 2018-08-16 David Malcolm <dmalcolm@redhat.com>
5612 * diagnostic-show-locus.c (layout::start_annotation_line): Add
5613 "margin_char" parameter, defaulting to space. Use it in place
5614 of pp_space for the initial part of the margin.
5615 (layout::print_leading_fixits): Use '+' when filling the margin
5616 of line-insertion fix-it hints.
5618 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5620 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
5623 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5625 * config/rs6000/altivec.md: Don't set length attribute to the default
5627 * config/rs6000/darwin.md: Ditto.
5628 * config/rs6000/dfp.md: Ditto.
5629 * config/rs6000/htm.md: Ditto.
5630 * config/rs6000/rs6000.md: Ditto.
5631 * config/rs6000/sync.md: Ditto.
5632 * config/rs6000/vsx.md: Ditto.
5634 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5636 * config/rs6000/altivec.md: Don't set length attribute to the default
5637 value, for branch instructions.
5638 * config/rs6000/darwin.md: Ditto.
5639 * config/rs6000/rs6000.md: Ditto.
5641 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5643 * config/rs6000/rs6000.md (length): Always define as const_int 4.
5644 (unnamed conditional branch define_insn): Set length to 4 or 8
5645 depending on offset.
5646 (<bd>_<mode>): Similar, for alternative 0.
5647 (<bd>tf_<mode>): Ditto.
5649 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5651 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5653 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
5655 * doc/rtl.texi: Replace old RTX class names with new names.
5658 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
5660 * expmed.h (canonicalize_comparison): New declaration.
5661 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5662 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
5663 * optabs.c (prepare_cmp_insn): Likewise.
5664 * rtl.h (unsigned_condition_p): New function which checks if a
5665 comparison operator is unsigned.
5667 2018-08-16 Nathan Sidwell <nathan@acm.org>
5669 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
5670 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
5672 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5675 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
5676 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
5677 (mov<mov>): ..this and enable unconditionally.
5679 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5681 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
5683 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
5685 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
5686 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
5687 "Common" with "Target".
5689 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
5691 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
5692 * doc/invoke.texi (mmitigate-rop): Remove.
5693 * config/i386/i386.c: Do not include "regrename.h".
5694 (ix86_rop_should_change_byte_p, reg_encoded_number)
5695 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
5697 (ix86_reorg): Remove call to ix86_mitigate_rop.
5698 * config/i386/i386.md (attr "modrm_class"): Remove.
5699 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
5700 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
5701 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
5703 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
5705 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
5706 allow folding of mergeh() and mergel() for the float and double types.
5707 (fold_mergehl_helper): Rework to handle building a permute tree
5710 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
5712 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
5715 2018-08-15 David Malcolm <dmalcolm@redhat.com>
5717 * common.opt (fdiagnostics-show-labels): New option.
5718 * diagnostic-show-locus.c (class layout_range): Add field
5720 (class layout): Add field "m_show_labels_p".
5721 (layout_range::layout_range): Add param "label" and use it to
5723 (make_range): Pass in NULL for new "label" param of layout_range's
5725 (layout::layout): Initialize m_show_labels_p.
5726 (layout::maybe_add_location_range): Pass in loc_range->m_label
5727 when constructing layout_range instances.
5728 (struct line_label): New struct.
5729 (layout::print_any_labels): New member function.
5730 (layout::print_line): Call it if label-printing is enabled.
5731 (selftest::test_one_liner_labels): New test.
5732 (selftest::test_diagnostic_show_locus_one_liner): Call it.
5733 * diagnostic.c (diagnostic_initialize): Initialize
5734 context->show_labels_p.
5735 * diagnostic.h (struct diagnostic_context): Add field
5737 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5738 -fno-diagnostics-show-labels.
5739 * dwarf2out.c (gen_producer_string): Add
5740 OPT_fdiagnostics_show_labels to the ignored options.
5741 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5743 (gcc_rich_location::maybe_add_expr): Likewise.
5744 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5745 label" param, defaulting to NULL.
5746 (gcc_rich_location::add_expr): Add "label" param.
5747 (gcc_rich_location::maybe_add_expr): Likewise.
5748 (class text_range_label): New class.
5749 (class range_label_for_type_mismatch): New class.
5750 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5751 of format_warning_va.
5752 (fmtwarn_n): Likewise for new params of format_warning_n_va.
5753 * lto-wrapper.c (merge_and_complain): Add
5754 OPT_fdiagnostics_show_labels to the "pick one setting" options.
5755 (append_compiler_options): Likewise to the dropped options.
5756 (append_diag_options): Likewise to the passed-on options.
5757 * opts.c (common_handle_option): Handle the new option.
5758 * selftest-diagnostic.c
5759 (test_diagnostic_context::test_diagnostic_context): Enable
5761 * substring-locations.c: Include "gcc-rich-location.h".
5762 (format_warning_n_va): Add "fmt_label" and "param_label" params
5763 and use them as appropriate.
5764 (format_warning_va): Add "fmt_label" and "param_label" params,
5765 passing them on to format_warning_n_va.
5766 (format_warning_at_substring): Likewise.
5767 (format_warning_at_substring_n): Likewise.
5768 * substring-locations.h (format_warning_va): Add "fmt_label" and
5769 "param_label" params.
5770 (format_warning_n_va): Likewise.
5771 (format_warning_at_substring): Likewise.
5772 (format_warning_at_substring_n): Likewise.
5773 * toplev.c (general_init): Initialize global_dc->show_labels_p.
5775 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
5778 * builtins.c (expand_builtin_memcmp): Do not expand the call
5779 when overflow is detected.
5781 2018-08-15 Martin Sebor <msebor@redhat.com>
5783 PR tree-optimization/71625
5784 * config/aarch64/aarch64-builtins.c
5785 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5787 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
5789 * config/s390/s390.c (s390_reorg): Remove loop.
5791 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5794 (darwin_function_switched_text_sections): Delete.
5795 * gcc/config/darwin.h
5796 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5798 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5801 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5802 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
5803 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5805 2018-08-15 Martin Liska <mliska@suse.cz>
5807 PR tree-optimization/86925
5808 * predict.c (expr_expected_value_1): When taking
5809 later predictor, assign also probability.
5810 Use fold_build2_initializer_loc in order to fold
5811 the expression in -frounding-math.
5813 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
5815 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5817 (expand_vec_perm_1): Try the new method.
5819 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
5822 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5823 Check whether lra_live_max_point is 0 before dividing.
5825 2018-08-14 Martin Sebor <msebor@redhat.com>
5827 PR tree-optimization/86650
5828 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5829 (vrp_prop::check_mem_ref): Same.
5831 2018-08-13 Liu Hao <lh_mouse@126.com>
5833 * pretty-print.c (eat_esc_sequence): Swap the foreground and
5834 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5835 and clear it thereafter, as it only works for DBCS.
5837 2018-08-13 Liu Hao <lh_mouse@126.com>
5839 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5840 handle returned by _get_osf_handle().
5842 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5844 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5845 for folding vec_perm.
5847 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5849 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5850 Add support for gimple-folding of vec_pack() and vec_unpack()
5853 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5855 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5856 vec_xst variants to the list.
5857 (rs6000_gimple_fold_builtin): Add support for folding unaligned
5858 vector loads and stores.
5860 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
5862 * config.gcc (rs6000-ibm-aix4.x): Delete.
5863 (rs6000-ibm-aix5.1): Delete.
5864 (rs6000-ibm-aix5.2): Delete.
5865 (rs6000-ibm-aix5.3): Delete.
5866 * config/rs6000/aix43.h: Delete.
5867 * config/rs6000/aix51.h: Delete.
5868 * config/rs6000/aix52.h: Delete.
5869 * config/rs6000/t-aix43: Delete.
5871 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
5873 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5875 (s390_decompose_address): Factor out constant pool ref
5878 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5880 * config/nds32/nds32-predicates.c
5881 (nds32_can_use_bclr_p): Change return type as bool.
5882 (nds32_can_use_bset_p): Ditto.
5883 (nds32_can_use_btgl_p): Ditto.
5884 (nds32_can_use_bitci_p): Ditto.
5885 * config/nds32/nds32-protos.h
5886 (nds32_can_use_bclr_p): Change declaration.
5887 (nds32_can_use_bset_p): Ditto.
5888 (nds32_can_use_btgl_p): Ditto.
5889 (nds32_can_use_bitci_p): Ditto.
5891 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5893 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5894 Support -msched-prolog-epilog option.
5895 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5897 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5899 * common/config/nds32/nds32-common.c
5900 (nds32_option_optimization_table): Enalbe -malways-align.
5902 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5904 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5906 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5907 OPT_misr_secure_ case.
5908 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5909 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5910 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5912 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5913 (nds32_isr_info): New field security_level.
5914 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5915 * config/nds32/nds32.md (return_internal): Consider critical attribute.
5916 * config/nds32/nds32.opt (misr-secure): New option.
5917 * config/nds32/nds32_init.inc: New file.
5918 * config/nds32/nds32_isr.h: New file.
5920 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
5922 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5923 Update comment for atomic instructions.
5924 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5925 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5927 (atomic_loaddi): Revise fence expansion to only emit fence prior to
5928 load for __ATOMIC_SEQ_CST model.
5929 (atomic_loaddi_1): Remove float register target.
5930 (atomic_storedi): Handle CONST_INT values.
5931 (atomic_storedi_1): Remove float register source. Add special case
5933 (memory_barrier): New expander and insn.
5935 2018-08-11 Jakub Jelinek <jakub@redhat.com>
5937 PR tree-optimization/86835
5938 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5939 new_stmt after def_gsi, make sure to insert new_square_stmt after
5940 that stmt, not 2 stmts before it.
5942 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
5945 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5948 2018-08-10 Martin Liska <mliska@suse.cz>
5951 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5953 * builtins.c (expand_builtin_expect_with_probability):
5955 (expand_builtin_expect_with_probability): New function.
5956 (build_builtin_expect_predicate): Add new argumnet probability
5957 for BUILT_IN_EXPECT_WITH_PROBABILITY.
5958 (fold_builtin_expect):
5961 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5962 * builtins.h (fold_builtin_expect): Set new argument.
5963 * doc/extend.texi: Document __builtin_expect_with_probability.
5964 * doc/invoke.texi: Likewise.
5965 * gimple-fold.c (gimple_fold_call): Pass new argument.
5966 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5967 also BUILT_IN_EXPECT_WITH_PROBABILITY.
5968 * predict.c (get_predictor_value): New function.
5969 (expr_expected_value): Add new argument probability. Assume
5970 that predictor and probability are always non-null.
5971 (expr_expected_value_1): Likewise. For __builtin_expect and
5972 __builtin_expect_with_probability set probability. Handle
5973 combination in binary expressions.
5974 (tree_predict_by_opcode): Simplify code by simply calling
5975 get_predictor_value.
5976 (pass_strip_predict_hints::execute): Add handling of
5977 BUILT_IN_EXPECT_WITH_PROBABILITY.
5978 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5980 * tree.h (DECL_BUILT_IN_P): New function.
5982 2018-08-10 Martin Liska <mliska@suse.cz>
5984 PR tree-optimization/85799
5985 * passes.def: Add argument for pass_strip_predict_hints.
5986 * predict.c (class pass_strip_predict_hints): Add new argument
5988 (strip_predictor_early): New function.
5989 (pass_strip_predict_hints::execute): Call the function to
5991 (strip_predict_hints): New function.
5992 * predict.def: Fix comment.
5994 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5996 * Makefile.in: Clarify which tm.texi to copy over to assert the
5997 right to grant a GFDL license for all.
5999 2018-08-09 Jeff Law <law@redhat.com>
6001 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6004 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
6006 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6009 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6011 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6012 reductions for variable-length vectors.
6014 2018-08-09 David Malcolm <dmalcolm@redhat.com>
6017 * common.opt (fdiagnostics-show-line-numbers): New option.
6018 * diagnostic-show-locus.c (class layout): Add fields
6019 "m_show_line_numbers_p" and "m_linenum_width";
6020 (num_digits): New function.
6021 (test_num_digits): New function.
6022 (layout::layout): Initialize new fields. Update m_x_offset
6023 logic to handle any left margin.
6024 (layout::print_source_line): Print line number when requested.
6025 (layout::start_annotation_line): New member function.
6026 (layout::print_annotation_line): Call it.
6027 (layout::print_leading_fixits): Likewise.
6028 (layout::print_trailing_fixits): Likewise. Update calls to
6029 move_to_column for new parameter.
6030 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6031 it to potentially call start_annotation_line.
6032 (layout::show_ruler): Call start_annotation_line.
6033 (selftest::test_line_numbers_multiline_range): New selftest.
6034 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6035 and selftest::test_line_numbers_multiline_range.
6036 * diagnostic.c (diagnostic_initialize): Initialize
6037 show_line_numbers_p.
6038 * diagnostic.h (struct diagnostic_context): Add field
6039 "show_line_numbers_p".
6040 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6041 -fno-diagnostics-show-line-numbers.
6042 * dwarf2out.c (gen_producer_string): Add
6043 OPT_fdiagnostics_show_line_numbers to the ignored options.
6044 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6045 one setting" options.
6046 (append_compiler_options): Likewise to the dropped options.
6047 (append_diag_options): Likewise to the passed-on options.
6048 * opts.c (common_handle_option): Handle the new option.
6049 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6051 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
6053 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6054 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
6055 third argument of type "const signed char" to descriptions of
6056 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6057 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6058 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6059 __builtin_bcdsub_ov functions.
6061 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6063 PR tree-optimization/86858
6064 * tree-vect-loop.c (vect_is_simple_reduction): Restore
6065 flow_bb_inside_loop_p calls.
6067 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6069 PR tree-optimization/86871
6070 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6071 instead of gimple_assign_lhs.
6073 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
6076 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6077 register constraint to operand 0.
6078 (add<mode>3_carryinC): Likewise.
6079 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6081 2018-08-09 Martin Liska <mliska@suse.cz>
6084 * common.opt: Remove extra line.
6086 2018-08-09 Martin Liska <mliska@suse.cz>
6088 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6089 at the end of a line, make first letter capital and end up
6090 a sentence with a dot.
6091 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6092 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6093 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6094 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6095 (PARAM_MAX_ISL_OPERATIONS): Likewise.
6096 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6097 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6098 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6099 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6100 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6101 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6102 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6103 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6104 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6105 (PARAM_TREE_REASSOC_WIDTH): Likewise.
6106 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6107 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6108 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6110 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
6113 * config/s390/s390.c (s390_option_override_internal): Reduce the
6114 stack-clash-protection-probe-interval param if it would be too big
6117 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
6120 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6121 * config/m68k/m68k.c (handle_move_double): Don't call
6122 m68k_final_prescan_insn.
6123 (m68k_adjust_decorated_operand): Renamed from
6124 m68k_final_prescan_insn, remove first and third operand and
6126 (print_operand): Call it.
6127 (print_operand_address): Call it.
6129 2018-08-08 Nathan Sidwell <nathan@acm.org>
6131 * diagnostic.c (diagnostic_report_current_module): Use
6132 linemap_included_from & linemap_included_from_linemap.
6134 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
6136 * config/aarch64/aarch64-cores.def: Add phecda core.
6137 * config/aarch64/aarch64-tune.md: Regenerate.
6138 * doc/invoke.texi: Add phecda core.
6140 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6143 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6145 * config/s390/s390.md ("movti"): Add more alternatives for
6146 constant to GPR copies.
6148 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6150 * config/s390/s390.c: Fix whitespace damage throughout the file.
6151 * config/s390/s390.h: Likewise.
6152 * config/s390/tpf.h: Likewise.
6154 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6156 * config/s390/s390.c (s390_loadrelative_operand_p):
6157 Remove TARGET_CPU_ZARCH usages.
6158 (s390_rtx_costs): Likewise.
6159 (s390_legitimate_constant_p): Likewise.
6160 (s390_cannot_force_const_mem): Likewise.
6161 (legitimate_reload_constant_p): Likewise.
6162 (s390_preferred_reload_class): Likewise.
6163 (legitimize_pic_address): Likewise.
6164 (legitimize_tls_address): Likewise.
6165 (s390_split_branches): Removed.
6166 (s390_add_execute): Removed.
6167 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6168 (s390_mainpool_start): Likewise.
6169 (s390_mainpool_finish): Likewise.
6170 (s390_mainpool_cancel): Removed.
6171 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6172 (s390_chunkify_cancel): Likewise.
6173 (s390_return_addr_rtx): Likewise.
6174 (s390_register_info): Remove split_branches_pending_p uages.
6175 (s390_optimize_register_info): Likewise.
6176 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6177 split_branches_pending_p usages.
6178 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6179 (s390_load_got): Likewise.
6180 (s390_expand_split_stack_prologue): Likewise.
6181 (output_asm_nops): Likewise.
6182 (s390_function_profiler): Likewise.
6183 (s390_emit_call): Likewise.
6184 (s390_conditional_register_usage): Likewise.
6185 (s390_optimize_prologue): Likewise.
6186 (s390_reorg): Remove TARGET_CPU_ZARCH and
6187 split_branches_pending_p usages.
6188 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6190 (s390_output_indirect_thunk_function): Likewise.
6191 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6192 (TARGET_CPU_ZARCH_P): Removed.
6193 (struct machine_function): Remove split_branches_pending_p.
6194 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6196 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6198 * common/config/s390/s390-common.c (processor_flags_table):
6200 * config.gcc: Remove with_arch/with_tune support.
6201 * config/s390/2064.md: Remove cpu attribute comparisons.
6202 * config/s390/driver-native.c (s390_host_detect_local_cpu):
6204 * config/s390/linux.h (ASM_SPEC):
6205 Remove -march support.
6206 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6207 Use a table to get an arch level.
6208 * config/s390/s390-opts.h (enum processor_type):
6210 * config/s390/s390.c
6211 (processor_table): Remove entries, add arch_level values.
6212 (s390_issue_rate): Remove cases.
6213 (s390_option_override): Adjust
6214 s390_option_override_internal() call.
6215 (s390_option_override_internal): Remove deprecation warning.
6216 (s390_valid_target_attribute_tree): Adjust
6217 s390_option_override_internal() call.
6218 * config/s390/s390.h (struct s390_processor):
6219 Share with s390-c.c, add arch_level field.
6220 * config/s390/s390.md:
6221 Remove occurrences in cpu attribute.
6222 * config/s390/s390.opt: Remove -march/-mtune support.
6223 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6224 * doc/invoke.texi: Remove deprecation warning.
6226 2018-08-08 Luis Machado <luis.machado@linaro.org>
6228 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6230 (qdf24xx_tunings): Set vector cost structure to
6231 qdf24xx_vector_cost.
6233 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6234 <register_sextend>: Set to 3.
6236 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
6239 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6240 * config/aarch64/aarch64-simd.md
6241 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6242 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6243 (aarch64_frecpx<mode>): ...this new pattern.
6244 * config/aarch64/aarch64-simd-builtins.def: Remove comment
6245 about aarch64_frecp<FRECP:frecp_suffix><mode>.
6247 2018-08-07 Martin Liska <mliska@suse.cz>
6250 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6251 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6252 * predict.def (PRED_MALLOC_NONNULL): New predictor.
6253 * doc/extend.texi: Document that malloc attribute adds
6256 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
6259 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6260 Define to speculation_safe_value_not_needed.
6262 2018-08-06 Jeff Law <law@redhat.com>
6264 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6265 the vr_values instance to cprop_into_stmt.
6266 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6267 (cprop_operand): Also query EVRP to determine if OP is a constant.
6269 2018-08-06 Nathan Sidwell <nathan@acm.org>
6271 * diagnostic.c (diagnostic_report_current_module): Reroll
6272 included-at loop. Translate text.
6274 2018-08-06 David Malcolm <dmalcolm@redhat.com>
6276 * function-tests.c (selftest::test_expansion_to_rtl): Call
6277 free_after_compilation.
6279 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6281 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6283 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
6285 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
6286 loops with memory block operations from getting unrolled.
6288 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
6291 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6292 Define to speculation_safe_value_not_needed.
6294 2018-08-06 Jeff Law <law@redhat.com>
6296 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
6299 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6302 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
6303 with all enabled __intN types.
6305 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
6307 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6309 * alias.c (record_set): Check for clobber high.
6310 * cfgexpand.c (expand_gimple_stmt): Likewise.
6311 * combine-stack-adj.c (single_set_for_csa): Likewise.
6312 * combine.c (find_single_use_1): Likewise.
6313 (set_nonzero_bits_and_sign_copies): Likewise.
6314 (get_combine_src_dest): Likewise.
6315 (is_parallel_of_n_reg_sets): Likewise.
6316 (try_combine): Likewise.
6317 (record_dead_and_set_regs_1): Likewise.
6318 (reg_dead_at_p_1): Likewise.
6319 (reg_dead_at_p): Likewise.
6320 * dce.c (deletable_insn_p): Likewise.
6321 (mark_nonreg_stores_1): Likewise.
6322 (mark_nonreg_stores_2): Likewise.
6323 * df-scan.c (df_find_hard_reg_defs): Likewise.
6324 (df_uses_record): Likewise.
6325 (df_get_call_refs): Likewise.
6326 * dwarf2out.c (mem_loc_descriptor): Likewise.
6327 * haifa-sched.c (haifa_classify_rtx): Likewise.
6328 * ira-build.c (create_insn_allocnos): Likewise.
6329 * ira-costs.c (scan_one_insn): Likewise.
6330 * ira.c (equiv_init_movable_p): Likewise.
6331 (rtx_moveable_p): Likewise.
6332 (interesting_dest_for_shprep): Likewise.
6333 * jump.c (mark_jump_label_1): Likewise.
6334 * postreload-gcse.c (record_opr_changes): Likewise.
6335 * postreload.c (reload_cse_simplify): Likewise.
6336 (struct reg_use): Add source expr.
6337 (reload_combine): Check for clobber high.
6338 (reload_combine_note_use): Likewise.
6339 (reload_cse_move2add): Likewise.
6340 (move2add_note_store): Likewise.
6341 * print-rtl.c (print_pattern): Likewise.
6342 * recog.c (decode_asm_operands): Likewise.
6343 (store_data_bypass_p): Likewise.
6344 (if_test_bypass_p): Likewise.
6345 * regcprop.c (kill_clobbered_value): Likewise.
6346 (kill_set_value): Likewise.
6347 * reginfo.c (reg_scan_mark_refs): Likewise.
6348 * reload1.c (maybe_fix_stack_asms): Likewise.
6349 (eliminate_regs_1): Likewise.
6350 (elimination_effects): Likewise.
6351 (mark_not_eliminable): Likewise.
6352 (scan_paradoxical_subregs): Likewise.
6353 (forget_old_reloads_1): Likewise.
6354 * reorg.c (find_end_label): Likewise.
6355 (try_merge_delay_insns): Likewise.
6356 (redundant_insn): Likewise.
6357 (own_thread_p): Likewise.
6358 (fill_simple_delay_slots): Likewise.
6359 (fill_slots_from_thread): Likewise.
6360 (dbr_schedule): Likewise.
6361 * resource.c (update_live_status): Likewise.
6362 (mark_referenced_resources): Likewise.
6363 (mark_set_resources): Likewise.
6364 * rtl.c (copy_rtx): Likewise.
6365 * rtlanal.c (reg_referenced_p): Likewise.
6366 (single_set_2): Likewise.
6367 (noop_move_p): Likewise.
6368 (note_stores): Likewise.
6369 * sched-deps.c (sched_analyze_reg): Likewise.
6370 (sched_analyze_insn): Likewise.
6372 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6374 * cse.c (invalidate_reg): New function extracted from...
6375 (invalidate): ...here.
6376 (canonicalize_insn): Check for clobber high.
6377 (invalidate_from_clobbers): invalidate clobber highs.
6378 (invalidate_from_sets_and_clobbers): Likewise.
6379 (count_reg_usage): Check for clobber high.
6380 (insn_live_p): Likewise.
6381 * cselib.c (cselib_expand_value_rtx_1):Likewise.
6382 (cselib_invalidate_regno): Check for clobber in setter.
6383 (cselib_invalidate_rtx): Pass through setter.
6384 (cselib_invalidate_rtx_note_stores):
6385 (cselib_process_insn): Check for clobber high.
6386 * cselib.h (cselib_invalidate_rtx): Add operand.
6388 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6390 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
6391 (mark_not_eliminable): Likewise.
6392 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
6393 * lra-lives.c (process_bb_lives): Check for clobber high.
6394 * lra.c (new_insn_reg): Remember clobber highs.
6395 (collect_non_operand_hard_regs): Check for clobber high.
6396 (lra_set_insn_recog_data): Likewise.
6397 (add_regs_to_insn_regno_info): Likewise.
6398 (lra_update_insn_regno_info): Likewise.
6400 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6402 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
6403 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
6405 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6407 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
6408 (copy_insn_1): Likewise.
6409 (gen_hard_reg_clobber_high): New gen function.
6410 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
6411 * genemit.c (gen_exp): Likewise.
6412 (gen_emit_seq): Pass through info.
6413 (gen_insn): Check for CLOBBER_HIGH.
6414 (gen_expand): Pass through info.
6415 (gen_split): Likewise.
6416 (output_add_clobbers): Likewise.
6417 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
6418 (remove_clobbers): Likewise.
6419 * rtl.h (gen_hard_reg_clobber_high): New declaration.
6421 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6423 * doc/rtl.texi (clobber_high): Add.
6424 (parallel): Add in clobber high
6425 * rtl.c (rtl_check_failed_code3): Add function.
6426 * rtl.def (CLOBBER_HIGH): Add expression.
6427 * rtl.h (RTL_CHECKC3): Add macro.
6428 (rtl_check_failed_code3): Add declaration.
6429 (XC3EXP): Add macro.
6431 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
6434 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
6435 cfun->machine->max_used_stack_alignment if needed.
6437 2018-08-04 Martin Sebor <msebor@redhat.com>
6439 PR tree-optimization/86571
6440 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
6443 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
6446 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6449 2018-08-03 Jeff Law <law@redhat.com>
6452 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6453 Define to speculation_safe_value_not_needed.
6455 2018-08-03 David Malcolm <dmalcolm@redhat.com>
6457 * doc/gcov.texi (-x): Remove duplicate "to".
6458 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
6459 (-Wif-not-aligned): Remove duplicate "is".
6460 (-flto): Remove duplicate "the".
6461 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
6462 duplicate "v5.00.b".
6463 (MSP430 Options): Remove duplicate "and" from the description
6464 of "-mgprel-sec=regexp".
6465 (x86 Options): Remove duplicate copies of "vmldLog102" and
6466 vmlsLog104 from description of "-mveclibabi=type".
6468 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
6470 * internal-fn.h (first_commutative_argument): Declare.
6471 * internal-fn.c (first_commutative_argument): New function.
6472 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
6473 restrictions for pattern statements. Use first_commutative_argument
6474 to look for commutative operands in calls to internal functions.
6476 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
6478 * Makefile.in (wide-int-range.o): New.
6479 * tree-vrp.c: Move all the wide_int_* functions to...
6480 * wide-int-range.cc: ...here.
6481 * tree-vrp.h: Move all the wide_int_* prototypes to...
6482 * wide-int-range.h: ...here.
6484 2018-08-03 Tom de Vries <tdevries@suse.de>
6486 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
6488 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
6489 * except.c (output_function_exception_table): Do early exit if
6490 targetm_common.except_unwind_info (&global_options) == UI_NONE.
6492 2018-08-03 Martin Liska <mliska@suse.cz>
6494 * predict.c (dump_prediction): Change to 2 digits
6497 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
6499 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
6501 (falkor_am_1_gtov_gtov): ... a new insn reservation.
6503 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
6505 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
6506 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
6507 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
6508 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
6509 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
6511 2018-08-02 David Malcolm <dmalcolm@redhat.com>
6513 * diagnostic-show-locus.c (diagnostic_show_locus): Use
6514 pp_take_prefix when saving the existing prefix.
6515 * diagnostic.c (diagnostic_append_note): Likewise.
6516 * langhooks.c (lhd_print_error_function): Likewise.
6517 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
6518 param's type. Free the existing prefix.
6519 (pp_take_prefix): New function.
6520 (pretty_printer::pretty_printer): Drop the prefix parameter.
6521 Rename the length parameter to match the comment.
6522 (pretty_printer::~pretty_printer): Free the prefix.
6523 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
6525 (struct pretty_printer): Drop the "const" from "prefix" field's
6526 type and clarify memory management.
6527 (pp_set_prefix): Drop the "const" from the 2nd param.
6528 (pp_take_prefix): New decl.
6530 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6532 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
6533 for word_mode_ok here instead of passing as argument.
6534 (expand_block_compare): Change select_block_compare_mode() call.
6535 (expand_strncmp_gpr_sequence): New function.
6536 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
6538 2018-08-02 Jeff Law <law@redhat.com>
6541 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6542 Define to speculation_safe_value_not_needed.
6545 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6546 Define to speculation_safe_value_not_needed.
6548 2018-08-02 Tom de Vries <tdevries@suse.de>
6551 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
6552 function. Return UI_TARGET unconditionally.
6553 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
6554 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
6556 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6558 * genemit.c (print_overload_test): Fix typo.
6560 2018-08-02 Richard Biener <rguenther@suse.de>
6562 PR tree-optimization/86816
6563 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
6564 which checks for value availability before querying it.
6565 (gvn_uses_equal): Use it.
6566 (same_succ_hash): Likewise.
6567 (gimple_equal_p): Likewise.
6569 2018-08-02 Nick Clifton <nickc@redhat.com>
6572 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6573 Define to speculation_safe_value_not_needed.
6576 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6577 Define to speculation_safe_value_not_needed.
6580 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6581 Define to speculation_safe_value_not_needed.
6584 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6585 Define to speculation_safe_value_not_needed.
6588 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6589 Define to speculation_safe_value_not_needed.
6592 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6593 Define to speculation_safe_value_not_needed.
6596 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6597 Define to speculation_safe_value_not_needed.
6600 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6601 Define to speculation_safe_value_not_needed.
6604 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6605 speculation_safe_value_not_needed.
6608 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
6609 to speculation_safe_value_not_needed.
6611 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6613 * doc/md.texi: Expand the documentation of instruction names
6614 to mention port-local uses. Document '@' in pattern names.
6615 * read-md.h (overloaded_instance, overloaded_name): New structs.
6617 (md_reader::handle_overloaded_name): New member function.
6618 (md_reader::get_overloads): Likewise.
6619 (md_reader::m_first_overload): New member variable.
6620 (md_reader::m_next_overload_ptr): Likewise.
6621 (md_reader::m_overloads_htab): Likewise.
6622 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
6623 m_next_overload_ptr and m_overloads_htab.
6624 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
6625 (get_mode_token, get_code_token, get_int_token): New functions.
6626 (map_attr_string): Add an optional argument that passes back
6627 the associated iterator.
6628 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
6629 (md_reader::handle_overloaded_name, add_overload_instance): New
6631 (apply_iterators): Handle '@' names. Report an error if '@'
6632 is used without iterators.
6633 (initialize_iterators): Initialize the new iterator_group fields.
6634 * genopinit.c (handle_overloaded_code_for)
6635 (handle_overloaded_gen): New functions.
6636 (main): Use them to print declarations of maybe_code_for_* and
6637 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
6638 * genemit.c (print_overload_arguments, print_overload_test)
6639 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
6640 (main): Use it to print definitions of maybe_code_for_* and
6641 maybe_gen_* functions.
6642 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
6643 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
6644 instead of explicit mode checks.
6645 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
6646 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
6647 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
6648 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
6649 (aarch64_expand_compare_and_swap): Likewise
6650 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
6651 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
6652 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
6653 (aarch64_constant_pool_reload_icode): Delete.
6654 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
6655 instead of aarch64_constant_pool_reload_icode. Use
6656 code_for_aarch64_reload_mov instead of explicit mode checks.
6657 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
6658 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
6659 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
6660 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
6661 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
6662 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
6663 (aarch64_atomic_load_op_code): Delete.
6664 (aarch64_emit_atomic_load_op): Likewise.
6665 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
6666 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
6667 instead of aarch64_emit_atomic_load_op.
6668 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
6669 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
6670 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
6671 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
6672 character before the pattern name.
6673 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6674 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
6675 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
6676 (aarch64_frecps<mode>): Likewise.
6677 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
6678 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
6679 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
6680 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
6681 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
6683 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6685 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
6686 Allow HFmode constants if TARGET_FP_F16INST.
6688 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
6691 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
6692 No longer check last store for clobber of address register.
6694 2018-08-02 Martin Liska <mliska@suse.cz>
6696 PR gcov-profile/86817
6697 * gcov.c (process_all_functions): New function.
6699 (process_file): Move functions processing to
6700 process_all_functions.
6702 2018-08-02 David Malcolm <dmalcolm@redhat.com>
6704 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
6705 "const" to the "gimple *" and "rtx_insn *" parameters.
6706 * dumpfile.h (dump_user_location_t::dump_user_location_t):
6708 (dump_location_t::dump_location_t): Likewise.
6710 2018-08-01 Martin Sebor <msebor@redhat.com>
6712 PR tree-optimization/86650
6713 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
6714 rather than a "gcall *". Directly pass the data of interest
6715 to percent_K_format, rather than building a temporary CALL_EXPR
6717 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
6718 (gimple_fold_builtin_strncat): Adjust.
6719 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
6720 gcall* argument with gimple*.
6721 * gimple-ssa-warn-restrict.c (check_call): Same.
6722 (wrestrict_dom_walker::before_dom_children): Same.
6723 (builtin_access::builtin_access): Same.
6724 (check_bounds_or_overlap): Same
6725 (maybe_diag_overlap): Same.
6726 (maybe_diag_offset_bounds): Same.
6727 * tree-diagnostic.c (default_tree_printer): Move usage of
6728 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6730 * tree-pretty-print.c (percent_K_format): Add argument.
6731 * tree-pretty-print.h: Add argument.
6732 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6733 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6734 (maybe_diag_stxncpy_trunc): Same.
6735 (handle_builtin_stxncpy): Same.
6736 (handle_builtin_strcat): Same.
6738 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6740 * match.pd: Optimise pointer range checks.
6742 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6744 PR tree-optimization/86758
6745 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6746 to remove pattern statements.
6748 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6750 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6751 result of dfs_enumerate_from when constructing stmt_vec_infos,
6752 instead of additionally calling get_loop_body.
6754 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6756 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6758 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6759 When creating an iv, assert that the step is not known to be zero.
6760 (vect_setup_realignment): Update call accordingly.
6761 * tree-vect-stmts.c (vectorizable_store): Likewise.
6762 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
6764 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6766 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6767 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6768 (vectorizable_reduction): Likewise.
6769 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6770 (vect_detect_hybrid_slp_stmts): Likewise.
6771 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6773 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
6775 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6776 (wide_int_set_zero_nonzero_bits): ...this.
6777 (zero_nonzero_bits_from_vr): Rename to...
6778 (vrp_set_zero_nonzero_bits): ...this.
6779 (extract_range_from_multiplicative_op_1): Abstract wide int
6781 (wide_int_range_multiplicative_op): ...here.
6782 (extract_range_from_binary_expr_1): Extract wide int binary
6783 operations into their own functions.
6784 (wide_int_range_lshift): New.
6785 (wide_int_range_can_optimize_bit_op): New.
6786 (wide_int_range_shift_undefined_p): New.
6787 (wide_int_range_bit_xor): New.
6788 (wide_int_range_bit_ior): New.
6789 (wide_int_range_bit_and): New.
6790 (wide_int_range_trunc_mod): New.
6791 (extract_range_into_wide_ints): New.
6792 (vrp_shift_undefined_p): New.
6793 (extract_range_from_multiplicative_op): New.
6794 (vrp_can_optimize_bit_op): New.
6795 * tree-vrp.h (value_range::dump): New.
6796 (wide_int_range_multiplicative_op): New.
6797 (wide_int_range_lshift):New.
6798 (wide_int_range_shift_undefined_p): New.
6799 (wide_int_range_bit_xor): New.
6800 (wide_int_range_bit_ior): New.
6801 (wide_int_range_bit_and): New.
6802 (wide_int_range_trunc_mod): New.
6803 (zero_nonzero_bits_from_bounds): Rename to...
6804 (wide_int_set_zero_nonzero_bits): ...this.
6805 (zero_nonzero_bits_from_vr): Rename to...
6806 (vrp_set_zero_nonzero_bits): ...this.
6807 (range_easy_mask_min_max): Rename to...
6808 (wide_int_range_can_optimize_bit_op): this.
6809 * vr-values.c (simplify_bit_ops_using_ranges): Rename
6810 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6812 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6814 * tree-vectorizer.h (vect_orig_stmt): New function.
6815 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6816 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6817 (vect_create_epilog_for_reduction): Likewise.
6818 (vectorizable_live_operation): Likewise.
6819 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6820 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6821 * tree-vect-stmts.c (vectorizable_call): Likewise.
6822 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6824 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6826 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6828 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6829 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6830 (vect_transform_loop): Likewise.
6831 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6833 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6835 * tree-vectorizer.h (vect_schedule_slp): Return void.
6836 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6837 (vect_schedule_slp): Likewise.
6839 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6841 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6843 (vect_transform_loop): Update calls accordingly. Schedule SLP
6844 instances before the main loop, if any exist.
6846 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6848 PR tree-optimization/86749
6849 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6850 If the lhs is used in a COND_EXPR, check that it is being used
6851 as the "then" or "else" value.
6853 2018-08-01 Tom de Vries <tdevries@suse.de>
6856 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6857 speculation_safe_value_not_needed.
6859 2018-08-01 Richard Biener <rguenther@suse.de>
6861 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6864 2018-08-01 Martin Liska <mliska@suse.cz>
6866 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6867 format how successful transformation is dumped.
6868 (gimple_mod_pow2_value_transform): Likewise.
6869 (gimple_mod_subtract_transform): Likewise.
6870 (gimple_stringops_transform): Likewise.
6872 2018-08-01 Martin Liska <mliska@suse.cz>
6875 * value-prof.c (interesting_stringop_to_profile_p):
6876 Simplify the code and add BUILT_IN_MEMMOVE.
6877 (gimple_stringops_transform): Likewise.
6879 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
6881 * config/aarch64/aarch64-simd.md
6882 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6883 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6884 use GPI iterator instead of SI mode.
6886 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6888 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6889 rs6000_speculation_barrier.
6890 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6891 new barrier pattern name.
6893 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6895 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6896 (speculation_barrier): New insn.
6898 2018-08-01 Richard Biener <rguenther@suse.de>
6901 * graphite.h: Include isl/id.h and isl/space.h to allow build
6904 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
6907 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6908 mode for COFF targets.
6909 * defaults.h (TARGET_COFF): Define.
6910 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6911 TARGET_COFF): Define.
6912 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6913 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6914 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6916 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6918 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6919 * gimple-streamer-out.c (output_bb): Save it.
6920 * lto-streamer-in.c (input_struct_function_base): Restore
6921 instance discriminator if available. Create map on demand.
6922 * lto-streamer-out.c (output_struct_function_base): Save it if
6924 * final.c (decl_to_instance_map): Document LTO strategy.
6926 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6927 Olivier Hainque <hainque@adacore.com>
6929 * debug.h (decl_to_instance_map_t): New type.
6930 (decl_to_instance_map): Declare.
6931 (maybe_create_decl_to_instance_map): New inline function.
6932 * final.c (bb_discriminator, last_bb_discriminator): New statics,
6933 to track basic block discriminators.
6934 (final_start_function_1): Initialize them.
6935 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6937 (decl_to_instance_map): New variable.
6938 (map_decl_to_instance, maybe_set_discriminator): New functions.
6939 (notice_source_line): Set discriminator.
6941 2018-07-31 Ian Lance Taylor <iant@golang.org>
6943 * targhooks.c (default_have_speculation_safe_value): Add
6946 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6948 * dump-context.h: Include "pretty-print.h".
6949 (dump_context::refresh_dumps_are_enabled): New decl.
6950 (dump_context::emit_item): New decl.
6951 (class dump_context): Add fields "m_test_pp" and
6953 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6954 (temp_dump_context::get_dumped_text): New decl.
6955 (class temp_dump_context): Add field "m_pp".
6956 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6957 (dump_context::refresh_dumps_are_enabled): ...and add a test for
6959 (set_dump_file): Update for above change.
6960 (set_alt_dump_file): Likewise.
6961 (dump_loc): New overload, taking a pretty_printer *.
6962 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
6963 to any test pretty-printer.
6964 (make_item_for_dump_gimple_stmt): New function, adapted from
6965 optinfo::add_gimple_stmt.
6966 (dump_context::dump_gimple_stmt): Call it, and use the result,
6967 eliminating the direct usage of dump_file and alt_dump_file in
6968 favor of indirectly using them via emit_item.
6969 (make_item_for_dump_gimple_expr): New function, adapted from
6970 optinfo::add_gimple_expr.
6971 (dump_context::dump_gimple_expr): Call it, and use the result,
6972 eliminating the direct usage of dump_file and alt_dump_file in
6973 favor of indirectly using them via emit_item.
6974 (make_item_for_dump_generic_expr): New function, adapted from
6976 (dump_context::dump_generic_expr): Call it, and use the result,
6977 eliminating the direct usage of dump_file and alt_dump_file in
6978 favor of indirectly using them via emit_item.
6979 (make_item_for_dump_printf_va): New function, adapted from
6980 optinfo::add_printf_va.
6981 (make_item_for_dump_printf): New function.
6982 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6983 and use the result, eliminating the direct usage of dump_file and
6984 alt_dump_file in favor of indirectly using them via emit_item.
6985 (make_item_for_dump_dec): New function.
6986 (dump_context::dump_dec): Call it, and use the result,
6987 eliminating the direct usage of dump_file and alt_dump_file in
6988 favor of indirectly using them via emit_item.
6989 (make_item_for_dump_symtab_node): New function, adapted from
6990 optinfo::add_symtab_node.
6991 (dump_context::dump_symtab_node): Call it, and use the result,
6992 eliminating the direct usage of dump_file and alt_dump_file in
6993 favor of indirectly using them via emit_item.
6994 (dump_context::begin_scope): Reimplement, avoiding direct usage
6995 of dump_file and alt_dump_file in favor of indirectly using them
6997 (dump_context::emit_item): New member function.
6998 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6999 Set up test pretty-printer on the underlying context. Call
7000 refresh_dumps_are_enabled.
7001 (temp_dump_context::~temp_dump_context): Call
7002 refresh_dumps_are_enabled.
7003 (temp_dump_context::get_dumped_text): New member function.
7004 (selftest::verify_dumped_text): New function.
7005 (ASSERT_DUMPED_TEXT_EQ): New macro.
7006 (selftest::test_capture_of_dump_calls): Run all tests twice, with
7007 and then without optinfo enabled. Add uses of
7008 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
7009 * dumpfile.h: Update comment for the dump_* API.
7010 * optinfo-emit-json.cc
7011 (selftest::test_building_json_from_dump_calls): Update for new
7012 param for temp_dump_context ctor.
7013 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7014 and "m_owned" field.
7015 (optinfo_item::~optinfo_item): Likewise.
7016 (optinfo::add_item): New member function.
7017 (optinfo::emit): Update comment.
7018 (optinfo::add_string): Delete.
7019 (optinfo::add_printf): Delete.
7020 (optinfo::add_printf_va): Delete.
7021 (optinfo::add_gimple_stmt): Delete.
7022 (optinfo::add_gimple_expr): Delete.
7023 (optinfo::add_tree): Delete.
7024 (optinfo::add_symtab_node): Delete.
7025 (optinfo::add_dec): Delete.
7026 * optinfo.h (class dump_context): New forward decl.
7027 (optinfo::add_item): New decl.
7028 (optinfo::add_string): Delete.
7029 (optinfo::add_printf): Delete.
7030 (optinfo::add_printf_va): Delete.
7031 (optinfo::add_gimple_stmt): Delete.
7032 (optinfo::add_gimple_expr): Delete.
7033 (optinfo::add_tree): Delete.
7034 (optinfo::add_symtab_node): Delete.
7035 (optinfo::add_dec): Delete.
7036 (optinfo::add_poly_int): Delete.
7037 (optinfo_item::optinfo_item): Remove "owned" param.
7038 (class optinfo_item): Remove field "m_owned".
7040 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7043 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7044 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7045 requested variable alignment.
7046 (expand_one_ssa_partition): Likewise.
7047 (expand_one_var): Likewise.
7049 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7051 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7052 to speculation_safe_value_not_needed.
7054 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7056 * targhooks.h (speculation_safe_value_not_needed): New prototype.
7057 * targhooks.c (speculation_safe_value_not_needed): New function.
7058 * target.def (have_speculation_safe_value): Update documentation.
7059 * doc/tm.texi: Regenerated.
7061 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7063 * config/aarch64/iterators.md (ALLI_TI): New iterator.
7064 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7066 (despeculate_copy<ALLI:mode>_insn): New insn.
7067 (despeculate_copyti_insn): New insn.
7068 (despeculate_simple<ALLI:mode>): New insn
7069 (despeculate_simpleti): New insn.
7070 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7072 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7073 aarch64_speculation_safe_value.
7074 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7076 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7078 * config/aarch64/aarch64-speculation.cc: New file.
7079 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7080 before pass_reorder_blocks.
7081 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7083 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7084 X14 and X15 when tracking speculation.
7085 * config/aarch64/aarch64.md (register name constants): Add
7086 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7087 (unspec): Add UNSPEC_SPECULATION_TRACKER.
7088 (speculation_barrier): New insn attribute.
7089 (cmp<mode>): Allow SP in comparisons.
7090 (speculation_tracker): New insn.
7091 (speculation_barrier): Add speculation_barrier attribute.
7092 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7093 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7094 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7096 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7098 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7099 aarch64_track_speculation is true.
7100 (tb<optab><mode>1): Likewise.
7101 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7102 generate CB[N]Z when tracking speculation.
7103 (aarch64_split_compare_and_swap): Likewise.
7104 (aarch64_split_atomic_op): Likewise.
7106 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7108 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7110 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7112 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7113 (speculation_barrier): New insn.
7115 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7117 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7118 * config/arm/arm.md (speculation_barrier): New expand.
7119 (speculation_barrier_insn): New pattern.
7121 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7123 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7124 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7125 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7126 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7128 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7129 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7130 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7131 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7132 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7133 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7134 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7135 * builtins.c (expand_speculation_safe_value): New function.
7136 (expand_builtin): Call it.
7137 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7138 * doc/extend.texi: Document __builtin_speculation_safe_value.
7139 * doc/md.texi: Document "speculation_barrier" pattern.
7140 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7141 TARGET_HAVE_SPECULATION_SAFE_VALUE.
7142 * doc/tm.texi: Regenerated.
7143 * target.def (have_speculation_safe_value, speculation_safe_value): New
7145 * targhooks.c (default_have_speculation_safe_value): New function.
7146 (default_speculation_safe_value): New function.
7147 * targhooks.h (default_have_speculation_safe_value): Add prototype.
7148 (default_speculation_safe_value): Add prototype.
7150 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7152 * dump-context.h (dump_context::dump_loc): New decl.
7153 * dumpfile.c (dump_context::dump_loc): New member function.
7154 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7155 and dump_gimple_stmt.
7156 (dump_context::dump_gimple_expr_loc): Likewise, using
7158 (dump_context::dump_generic_expr_loc): Likewise, using
7160 (dump_context::dump_printf_loc_va): Likewise, using
7162 (dump_context::begin_scope): Explicitly using the global function
7163 "dump_loc", rather than the member function.
7165 2018-07-31 Martin Sebor <msebor@redhat.com>
7167 PR tree-optimization/86741
7168 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7170 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
7172 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7173 depend on whether prefetch instructions will be emitted or not.
7174 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7175 will be emitted or not.
7176 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7177 (TARGET_SETMEM_PFD): New macros.
7179 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7181 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7182 (NULL_STMT_VEC_INFO): Delete.
7183 (stmt_vec_info::operator*): Likewise.
7184 (stmt_vec_info::operator gimple *): Likewise.
7185 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7186 of NULL_STMT_VEC_INFO.
7187 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7188 (vect_reassociating_reduction_p): Likewise.
7189 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7190 (vectorizable_store): Likewise.
7191 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7192 (vec_info::free_stmt_vec_infos): Likewise.
7194 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7196 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7197 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7201 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7202 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7203 (vec_info::free_stmt_vec_info): New private member functions.
7204 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7205 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7206 * tree-parloops.c (gather_scalar_reductions): Remove calls to
7207 set_stmt_vec_info_vec and free_stmt_vec_infos.
7208 * tree-vect-loop.c (_loop_vec_info): Remove call to
7209 set_stmt_vec_info_vec.
7210 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7211 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7212 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7213 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7214 (vec_info::free_stmt_vec_info): ...these new functions. Remove
7215 assignments in {vec_info::,}new_stmt_vec_info that are redundant
7216 with the clearing in the xcalloc.
7217 (stmt_vec_info_vec): Delete.
7218 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7219 (vectorize_loops): Likewise.
7220 (vec_info::~vec_info): Remove argument from call to
7221 free_stmt_vec_infos.
7222 (vec_info::add_stmt): Remove vinfo argument from call to
7225 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7227 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7228 rather than a gimple stmt.
7229 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
7230 information for pattern statements when passed the original
7231 statement; instead wait to be passed the pattern statement itself.
7232 Don't call set_vinfo_for_stmt here.
7233 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7234 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7235 stmt_vec_infos here.
7236 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7237 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7238 stmt_vec_infos entry.
7240 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7242 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7243 * tree-vectorizer.c (vec_info::replace_stmt): New function.
7244 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7245 * tree-vect-stmts.c (vectorizable_call): Likewise.
7246 (vectorizable_simd_clone_call): Likewise.
7248 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7250 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7251 * tree-vectorizer.c (vec_info::remove_stmt): New function.
7252 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7253 * tree-vect-loop.c (vect_transform_loop): Likewise.
7254 * tree-vect-slp.c (vect_schedule_slp): Likewise.
7255 * tree-vect-stmts.c (vect_remove_stores): Likewise.
7257 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7259 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7260 (vect_dr_stmt): Delete.
7261 * tree-vectorizer.c (vec_info::lookup_dr): New function.
7262 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7264 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7265 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7266 (vect_verify_datarefs_alignment, vect_peeling_supportable)
7267 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7268 (vect_analyze_data_refs): Likewise.
7269 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
7271 (vect_find_same_alignment_drs): Likewise.
7272 (vect_slp_analyze_node_dependences): Update calls accordingly.
7273 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7274 instead of DR_VECT_AUX.
7275 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7276 of a vector data references. Use vec_info::lookup_dr instead of
7278 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7279 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7280 instead of DR_VECT_AUX.
7282 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7284 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
7286 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7288 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7289 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7290 (vect_gen_prolog_loop_niters): Likewise.
7292 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7294 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
7295 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
7296 (vect_known_alignment_in_bytes, vect_dr_behavior)
7297 (vect_get_scalar_dr_size): Take references as dr_vec_infos
7298 instead of data_references. Update calls to other routines for
7299 which the same change has been made.
7300 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
7301 dr_vec_infos instead of stmt_vec_infos.
7302 (vect_analyze_data_ref_dependence): Update call accordingly.
7303 (vect_slp_analyze_data_ref_dependence)
7304 (vect_record_base_alignments): Use DR_VECT_AUX.
7305 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
7306 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
7307 (vector_alignment_reachable_p, vect_get_data_access_cost)
7308 (vect_peeling_supportable, vect_analyze_group_access_1)
7309 (vect_analyze_group_access, vect_analyze_data_ref_access)
7310 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
7311 (vect_compile_time_alias, vect_small_gap_p)
7312 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
7313 (vect_supportable_dr_alignment): Take references as dr_vec_infos
7314 instead of data_references. Update calls to other routines for
7315 which the same change has been made.
7316 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
7317 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7318 (vect_slp_analyze_and_verify_node_alignment)
7319 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7320 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7321 (vect_setup_realignment): Use dr_vec_infos. Update calls after
7323 (_vect_peel_info::dr): Replace with...
7324 (_vect_peel_info::dr_info): ...this new field.
7325 (vect_peeling_hash_get_most_frequent)
7326 (vect_peeling_hash_choose_best_peeling): Update accordingly.
7327 (vect_peeling_hash_get_lowest_cost):
7328 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
7329 routines for which the same change has been made.
7330 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
7332 * tree-vect-loop-manip.c (get_misalign_in_elems)
7333 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
7335 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7336 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
7337 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
7338 (get_group_load_store_type, get_negative_load_store_type)
7339 (vect_get_data_ptr_increment, vectorizable_store)
7340 (vectorizable_load): Likewise.
7341 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
7342 Update calls to other routines for which the same change has been made.
7344 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7346 * tree-vectorizer.h (vec_info::move_dr): New member function.
7347 (dataref_aux): Rename to...
7348 (dr_vec_info): ...this and add "dr" and "stmt" fields.
7349 (_stmt_vec_info::dr_aux): Update accordingly.
7350 (_stmt_vec_info::data_ref_info): Delete.
7351 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
7352 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
7353 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
7354 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
7356 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
7357 (STMT_VINFO_DR_INFO): New macro.
7358 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
7359 (set_dr_misalignment): Update after rename of dataref_aux.
7360 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
7361 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
7362 initialization of STMT_VINFO_DATA_REF.
7363 * tree-vectorizer.c (vec_info::move_dr): New function.
7364 * tree-vect-patterns.c (vect_recog_bool_pattern)
7365 (vect_recog_mask_conversion_pattern)
7366 (vect_recog_gather_scatter_pattern): Use it.
7367 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
7368 the "dr" and "stmt" fields of dr_vec_info instead of
7369 STMT_VINFO_DATA_REF.
7371 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7373 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
7374 (is_pattern_stmt_p): Use it.
7375 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
7376 on pattern statements.
7378 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7380 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
7381 original stmt as a stmt_vec_info rather than a gimple stmt.
7382 (vect_pattern_recog_1): Take the statement directly as a
7383 stmt_vec_info, rather than via a gimple_stmt_iterator.
7384 Update call to vect_mark_pattern_stmts.
7385 (vect_pattern_recog): Update calls accordingly.
7387 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7389 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
7390 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
7391 a vect_def_type for the first argument.
7392 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
7393 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
7394 operand if it isn't defined by a vectorized statement.
7395 (vect_build_gather_load_calls): Remove the mask_dt argument and
7396 update calls to vect_get_vec_def_for_stmt_copy.
7397 (vectorizable_bswap): Likewise the dt argument.
7398 (vectorizable_call): Update calls to vectorizable_bswap and
7399 vect_get_vec_def_for_stmt_copy.
7400 (vectorizable_simd_clone_call, vectorizable_assignment)
7401 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
7402 (vectorizable_comparison): Update calls to
7403 vect_get_vec_def_for_stmt_copy.
7404 (vectorizable_store): Likewise. Remove now-unnecessary calls to
7406 (vect_get_loop_based_defs): Remove dt argument and update call
7407 to vect_get_vec_def_for_stmt_copy.
7408 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
7409 and vect_get_vec_def_for_stmt_copy.
7410 (vectorizable_load): Update calls to vect_build_gather_load_calls
7411 and vect_get_vec_def_for_stmt_copy.
7412 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7413 (vectorizable_reduction, vectorizable_live_operation): Update calls
7414 to vect_get_vec_def_for_stmt_copy.
7416 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7418 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
7419 and gimple stmt arguments with a stmt_vec_info.
7420 (vect_record_base_alignments): Update calls accordingly.
7421 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
7422 and gimple stmt arguments with a stmt_vec_info.
7423 (vect_build_slp_tree_1): Remove vinfo argument and update call
7424 to vect_record_max_nunits.
7425 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
7426 and vect_record_max_nunits.
7428 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7430 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
7431 file and take a stmt_vec_info instead of a gimple stmt.
7432 (supportable_widening_operation, vect_finish_replace_stmt)
7433 (vect_finish_stmt_generation, vect_get_store_rhs)
7434 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
7435 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
7436 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
7437 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
7438 (vect_create_data_ref_ptr, bump_vector_ptr)
7439 (vect_permute_store_chain, vect_setup_realignment)
7440 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
7441 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
7442 (vectorizable_reduction, vectorizable_induction)
7443 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
7444 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
7445 than gimple stmts as arguments.
7446 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
7447 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
7448 (can_group_stmts_p, vect_check_gather_scatter)
7449 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7450 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
7451 (vect_permute_load_chain, vect_shift_permute_load_chain)
7452 (vect_transform_grouped_load)
7453 (vect_record_grouped_load_vectors): Likewise.
7454 * tree-vect-loop.c (vect_fixup_reduc_chain)
7455 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
7456 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
7457 (vectorizable_reduction, vectorizable_induction)
7458 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
7459 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
7460 (vect_get_load_store_mask): Likewise.
7461 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
7462 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
7463 * tree-vect-stmts.c (vect_mark_relevant)
7464 (is_simple_and_all_uses_invariant)
7465 (exist_non_indexing_operands_for_use_p, process_use)
7466 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
7467 (vect_get_vec_def_for_operand, vect_get_vec_defs)
7468 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
7469 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
7470 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
7471 (get_negative_load_store_type, get_load_store_type)
7472 (vect_check_load_store_mask, vect_check_store_rhs)
7473 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
7474 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7475 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7476 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7477 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
7478 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
7479 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
7480 (supportable_widening_operation): Likewise.
7482 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7484 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
7485 a stmt_vec_info instead of a gcall.
7486 (vect_check_gather_scatter): Update call accordingly.
7487 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
7489 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
7490 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
7491 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
7492 instead of a gimple stmt.
7493 (vect_transform_loop): Update calls accordingly.
7494 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
7495 stmt_vec_infos instead of gimple stmts.
7496 (vect_analyze_slp_instance): Update use accordingly.
7497 * tree-vect-stmts.c (read_vector_array, write_vector_array)
7498 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
7499 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
7500 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
7501 (vect_gen_widened_results_half, vect_get_loop_based_defs)
7502 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
7503 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
7504 down to subroutines.
7506 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7508 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
7509 of the worklist from a vector of gimple stmts to a vector of
7511 * tree-vect-stmts.c (vect_mark_relevant, process_use)
7512 (vect_mark_stmts_to_be_vectorized): Likewise
7514 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7516 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
7517 statement before passing it to vect_analyze_stmt.
7518 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
7519 the chain of phi vector definitions. Track the exit phi via its
7521 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
7522 STMT_VINFO_REDUC_DEF.
7523 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
7524 stmt_vec_infos to handle the statement chains.
7525 (vect_get_slp_defs): Record the first statement in the node
7526 using a stmt_vec_info.
7527 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
7528 statements here and pass their stmt_vec_info down to subroutines.
7529 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
7530 down to vect_finish_stmt_generation.
7531 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
7532 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
7533 stmt_vec_infos to subroutines.
7534 (vect_remove_stores): Use stmt_vec_infos to handle the statement
7537 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7539 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
7540 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
7541 (vect_permute_store_chain, vect_setup_realignment)
7542 (vect_permute_load_chain, vect_shift_permute_load_chain)
7543 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
7544 stmts internally, and when passing values to other vectorizer routines.
7545 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7546 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
7547 (vect_analyze_loop_operations, get_initial_def_for_reduction)
7548 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
7549 (vectorizable_reduction, vectorizable_induction)
7550 (vectorizable_live_operation, vect_transform_loop_stmt)
7551 (vect_transform_loop): Likewise.
7552 * tree-vect-patterns.c (vect_reassociating_reduction_p)
7553 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
7554 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
7555 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7556 (vect_slp_analyze_node_operations_1): Likewise.
7557 * tree-vect-stmts.c (vect_mark_relevant, process_use)
7558 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
7559 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
7560 (vect_finish_stmt_generation_1, get_group_load_store_type)
7561 (get_load_store_type, vect_build_gather_load_calls)
7562 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7563 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7564 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7565 (vectorizable_store, vectorizable_load, vectorizable_condition)
7566 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
7567 (supportable_widening_operation): Likewise.
7568 (vect_get_vector_types_for_stmt): Likewise.
7569 * tree-vectorizer.h (vect_dr_behavior): Likewise.
7571 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7573 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7574 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
7575 (vect_permute_store_chain, vect_permute_load_chain)
7576 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
7577 repeated stmt_vec_info lookups.
7578 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7579 (vect_update_ivs_after_vectorizer): Likewise.
7580 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
7581 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7582 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
7583 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7584 (vect_bb_slp_scalar_cost): Likewise.
7585 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
7587 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7589 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
7590 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
7591 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
7592 to get gassigns and gcalls, rather than operating on generc gimple
7594 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
7595 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
7596 (vectorizable_load, vect_analyze_stmt): Likewise.
7597 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
7599 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7601 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
7602 return stmt_vec_infos rather than gimple stmts. Do not accept
7604 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7606 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7607 Update use of get_later_stmt.
7608 (vect_get_constant_vectors): Update call accordingly.
7609 (vect_schedule_slp_instance): Likewise
7610 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
7611 (vect_slp_analyze_instance_dependence): Likewise.
7612 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
7614 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7616 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
7617 (stmt_info_for_cost::stmt_info): ...this new field.
7618 (add_stmt_costs): Update accordingly.
7619 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7620 (vect_get_known_peeling_cost): Likewise.
7621 (vect_estimate_min_profitable_iters): Likewise.
7622 * tree-vect-stmts.c (record_stmt_cost): Likewise.
7624 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7626 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
7627 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7628 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7630 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
7632 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7634 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
7635 a gimple stmt to a stmt_vec_info.
7636 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7638 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7640 * tree-vectorizer.h (vec_info::grouped_stores): Change from
7641 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7642 (_loop_vec_info::reduction_chains): Likewise.
7643 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
7645 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7647 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7649 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
7650 a gimple stmt to a stmt_vec_info.
7651 (_stmt_vec_info::next_element): Likewise.
7652 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
7653 (vect_slp_analyze_and_verify_node_alignment)
7654 (vect_analyze_group_access_1, vect_analyze_group_access)
7655 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
7656 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
7657 (vect_supportable_dr_alignment): Update accordingly.
7658 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
7659 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
7660 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
7661 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7662 * tree-vect-slp.c (vect_build_slp_tree_1)
7663 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
7664 (vect_split_slp_store_group, vect_analyze_slp_instance)
7665 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
7666 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
7667 (get_group_load_store_type, get_load_store_type)
7668 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
7669 (vect_transform_stmt, vect_remove_stores): Likewise.
7671 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7673 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
7675 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7676 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
7677 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
7678 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
7679 (vector_alignment_reachable_p, vect_get_data_access_cost)
7680 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
7681 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
7682 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7683 (vect_analyze_group_access_1, vect_analyze_group_access)
7684 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
7685 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
7686 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
7687 result of vect_dr_stmt and use the stmt_vec_info instead of
7688 the associated gimple stmt.
7689 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7690 (vect_gen_prolog_loop_niters): Likewise.
7691 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7693 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7695 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
7696 to a vec<stmt_vec_info>.
7697 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
7698 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
7700 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
7701 to a vec<stmt_vec_info>.
7702 (bst_traits::value_type, bst_traits::value_type): Likewise.
7703 (bst_traits::hash): Update accordingly.
7704 (vect_get_and_check_slp_defs): Change the stmts parameter from
7705 a vec<gimple *> to a vec<stmt_vec_info>.
7706 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
7707 (vect_build_slp_tree): Likewise.
7708 (vect_build_slp_tree_2): Likewise. Update uses of
7709 SLP_TREE_SCALAR_STMTS.
7710 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
7711 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
7712 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
7713 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
7714 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
7715 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
7716 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
7717 (vect_get_constant_vectors, vect_get_slp_defs)
7718 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
7719 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
7720 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
7721 instead of gimple stmts.
7722 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
7723 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
7724 (vect_slp_analyze_instance_dependence): Update uses of
7725 SLP_TREE_SCALAR_STMTS.
7726 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7727 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7728 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7729 (get_initial_defs_for_reduction): Likewise.
7730 (vect_create_epilog_for_reduction): Likewise.
7731 (vectorize_fold_left_reduction): Likewise.
7732 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7733 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7734 (can_vectorize_live_stmts): Likewise.
7736 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7738 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7739 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7740 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7742 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7744 (gather_scalar_reductions): Update after above interface changes.
7745 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7746 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7748 (vect_force_simple_reduction): Likewise.
7749 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7750 LOOP_VINFO_REDUCTIONS.
7751 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7755 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7756 a gimple stmt to a stmt_vec_info.
7757 * tree-vect-loop.c (vect_active_double_reduction_p)
7758 (vect_force_simple_reduction, vectorizable_reduction): Update
7761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7763 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7764 vec<gimple *> to a vec<stmt_vec_info>.
7765 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7766 the reduction_phis argument from a vec<gimple *> to a
7768 (vectorizable_reduction): Likewise the phis local variable that
7769 is passed to vect_create_epilog_for_reduction. Update for new type
7770 of SLP_TREE_VEC_STMTS.
7771 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7772 (vectorizable_live_operation): Likewise.
7773 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7774 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7778 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7779 a gimple stmt to a stmt_vec_info.
7780 (vectorizable_condition, vectorizable_live_operation)
7781 (vectorizable_reduction, vectorizable_induction): Pass back the
7782 vectorized statement as a stmt_vec_info.
7783 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7784 use of STMT_VINFO_VEC_STMT.
7785 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7786 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7787 as stmt_vec_infos rather than gimple stmts.
7788 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7790 (vectorizable_live_operation): Likewise.
7791 (vectorizable_reduction, vectorizable_induction): Likewise,
7792 updating use of STMT_VINFO_VEC_STMT.
7793 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7794 of STMT_VINFO_VEC_STMT.
7795 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7796 (vectorizable_simd_clone_call, vectorizable_conversion)
7797 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7798 (vectorizable_store, vectorizable_load, vectorizable_condition)
7799 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7800 from a gimple stmt to a stmt_vec_info.
7801 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
7802 pointer to a stmt_vec_info to the vectorizable_* routines.
7804 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7806 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7807 a gimple stmt to a stmt_vec_info.
7808 (is_pattern_stmt_p): Update accordingly.
7809 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7810 (vect_record_grouped_load_vectors): Likewise.
7811 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7812 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7813 (vect_model_reduction_cost): Likewise.
7814 (vect_create_epilog_for_reduction): Likewise.
7815 (vectorizable_reduction, vectorizable_induction): Likewise.
7816 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7817 Return the stmt_vec_info for the pattern statement.
7818 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7819 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7820 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7821 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7822 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7823 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7824 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7825 (free_stmt_vec_info, vect_is_simple_use): Likewise.
7827 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7829 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7830 (vect_finish_stmt_generation): Likewise.
7831 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7832 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7833 (vect_build_gather_load_calls): Use the return value of the above
7834 functions instead of a separate call to vinfo_for_stmt. Use narrow
7835 scopes for the input gimple stmt and wider scopes for the associated
7836 stmt_vec_info. Use vec_info::lookup_def when setting these
7837 stmt_vec_infos from an SSA_NAME definition.
7838 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7839 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7840 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7841 (vectorizable_store, vectorizable_load, vectorizable_condition)
7842 (vectorizable_comparison): Likewise.
7843 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7844 (vectorizable_reduction): Likewise.
7846 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7848 * tree-vectorizer.h (vect_is_simple_use): Add an optional
7849 stmt_vec_info * parameter before the optional gimple **.
7850 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7851 (process_use, vect_get_vec_def_for_operand_1): Update callers.
7852 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7853 * tree-vect-loop.c (vectorizable_reduction): Likewise.
7854 (vectorizable_live_operation): Likewise.
7855 * tree-vect-patterns.c (type_conversion_p): Likewise.
7856 (vect_look_through_possible_promotion): Likewise.
7857 (vect_recog_rotate_pattern): Likewise.
7858 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7860 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7862 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7863 a typedef to a wrapper class.
7864 (NULL_STMT_VEC_INFO): New macro.
7865 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7866 (stmt_vec_info::operator*): New function.
7867 (stmt_vec_info::operator gimple *): Likewise.
7868 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7869 (add_stmt_costs): Likewise.
7870 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7871 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7872 (vect_get_known_peeling_cost): Likewise.
7873 (vect_estimate_min_profitable_iters): Likewise.
7874 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7875 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7876 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7877 (vectorizable_store, free_stmt_vec_infos): Likewise.
7878 (new_stmt_vec_info): Change return type of xcalloc to
7881 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7883 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7884 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7885 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7886 a single_imm_use-based sequence.
7887 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7889 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7891 * tree-vectorizer.h (vec_info::lookup_def): Declare.
7892 * tree-vectorizer.c (vec_info::lookup_def): New function.
7893 * tree-vect-patterns.c (vect_get_internal_def): Use it.
7894 (vect_widened_op_tree): Likewise.
7895 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7896 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7897 (vectorizable_reduction): Likewise.
7898 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7900 (vect_is_slp_reduction): Update calls accordingly. Use
7901 vec_info::lookup_def.
7902 (vect_is_simple_reduction): Likewise
7903 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7905 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7907 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7908 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7909 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7911 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7912 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7913 (vect_update_vf_for_slp, vect_analyze_loop_operations)
7914 (vect_is_slp_reduction, vectorizable_induction)
7915 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7916 * tree-vect-patterns.c (vect_init_pattern_stmt):
7917 (vect_determine_min_output_precision_1, vect_determine_precisions)
7918 (vect_pattern_recog): Likewise.
7919 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7920 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7921 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7922 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7923 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7924 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
7925 info field from a loop to a loop_vec_info.
7927 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7929 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7930 (vec_info::add_stmt): Declare.
7931 * tree-vectorizer.c (vec_info::add_stmt): New function.
7932 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7933 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7934 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7935 (vectorizable_induction): Likewise.
7936 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7937 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7938 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7939 (vectorizable_load): Likewise.
7940 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7941 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7942 (vect_recog_gather_scatter_pattern): Likewise.
7943 (append_pattern_def_seq): Likewise. Remove a check that is
7944 performed by add_stmt itself.
7946 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7948 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7949 which make_ssa_name was called with new_stmt before new_stmt
7952 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7954 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7956 (vect_is_slp_reduction): ...here...
7957 (vect_is_simple_reduction): ...and here. Remove repetition of tests
7958 that are already known to be false.
7960 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7962 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7963 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
7964 STMT_VINFO_NUM_SLP_USES when it's true.
7965 (vect_free_slp_instance): Add a final_p parameter and pass it to
7967 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7968 (vect_analyze_slp_instance): Likewise.
7969 (vect_slp_analyze_operations): Likewise.
7970 (vect_slp_analyze_bb_1): Likewise.
7971 * tree-vectorizer.c (vec_info): Likewise.
7972 * tree-vect-loop.c (vect_transform_loop): Likewise.
7974 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7976 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7977 function is not called for second and subsequent members of
7980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7982 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7983 cases for nested loops from here to ...
7984 (vect_create_epilog_for_reduction): ...here. Only call
7985 vect_is_simple_use for inner-loop reductions.
7987 2018-07-31 Martin Liska <mliska@suse.cz>
7989 PR gcov-profile/85338
7990 PR gcov-profile/85350
7991 PR gcov-profile/85372
7992 * profile.c (struct location_triplet): New.
7993 (struct location_triplet_hash): Likewise.
7994 (output_location): Do not output a BB that
7995 is already recorded for a line.
7996 (branch_prob): Use streamed_locations.
7998 2018-07-31 Martin Liska <mliska@suse.cz>
8000 PR gcov-profile/85370
8001 * coverage.c (coverage_begin_function): Do not mark target
8002 clones as artificial functions.
8004 2018-07-31 Martin Liska <mliska@suse.cz>
8006 PR gcov-profile/83813
8007 PR gcov-profile/84758
8008 PR gcov-profile/85217
8009 PR gcov-profile/85332
8010 * profile.c (branch_prob): Do not record GOTO expressions
8011 for GIMPLE statements which locations are already streamed.
8013 2018-07-31 Olivier Hainque <hainque@adacore.com>
8015 * gcc.c (handle_spec_function): Accept a soft_matched_part
8016 argument, as do_spec_1. Pass it down to ...
8017 (eval_spec_function): Accept a soft_matched_part argument,
8018 and pass it down to ...
8019 (do_spec_2): Accept a soft_matched_part argument, and pass
8020 it down to do_spec_1.
8021 (do_spec_1): Pass soft_matched_part to handle_spec_function.
8022 (handle_braces): Update call to handle_spec_function.
8023 (driver::set_up_specs): Update calls to do_spec_2.
8024 (compare_debug_dump_opt_spec_function): Likewise.
8025 (compare_debug_self_opt_spec_function): Likewise.
8027 2018-07-31 Olivier Hainque <hainque@adacore.com>
8029 * common.opt (nolibc): New option.
8030 * doc/invoke.texi (Link Options): Document it.
8031 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8032 * config/alpha/linux.h: Likewise.
8033 * config/arc/elf.h: Likewise.
8034 * config/arm/uclinux-elf.h: Likewise.
8035 * config/arm/unknown-elf.h: Likewise.
8036 * config/avr/avrlibc.h: Likewise.
8037 * config/bfin/bfin.h: Likewise.
8038 * config/bfin/linux.h: Likewise.
8039 * config/bfin/uclinux.h: Likewise.
8040 * config/darwin.h: Likewise.
8041 * config/darwin10.h: Likewise.
8042 * config/darwin12.h: Likewise.
8043 * config/gnu-user.h: Likewise.
8044 * config/lm32/uclinux-elf.h: Likewise.
8045 * config/pa/pa-hpux11.h: Likewise.
8046 * config/pa/pa64-hpux.h: Likewise.
8047 * config/sparc/sparc.h: Likewise.
8049 2018-07-31 Olivier Hainque <hainque@adacore.com>
8051 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8052 undefined variables.
8054 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8057 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8060 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8062 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8063 terminated string literal.
8065 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8067 PR rtl-optimization/85160
8068 * combine.c (is_just_move): New function.
8069 (try_combine): Allow combining two instructions into two if neither of
8070 the original instructions was a move.
8072 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
8075 * doc/extend.texi (Global Register Variables): Discourage use of type
8077 (Local Register Variables): Likewise.
8079 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
8081 PR tree-optimization/86506
8082 * hwint.h (ceil_log2): Resync with hwint.c implementation.
8084 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
8087 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8088 hard_regno, make sure no insn between `from` and `to` clobbers it.
8090 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
8091 Tom de Vries <tdevries@suse.de>
8093 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8094 (PTX_DEFAULT_RUNTIME_DIM): ... this.
8095 (nvptx_goacc_validate_dims): Set default worker and gang dims to
8096 PTX_DEFAULT_RUNTIME_DIM.
8097 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8099 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
8101 * config/pa/pa.c (pa_output_addr_vec): Align address table.
8102 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8103 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8105 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
8107 * config/rs6000/constraints.md (wG constraint): Delete, no longer
8109 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8110 predicate to reflect toc fusion has been deleted.
8111 (toc_fusion_mem_raw): Delete, no longer used.
8112 (toc_fusion_mem_wrapped): Likewise.
8113 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8115 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8116 Delete, no longer used.
8117 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8118 meant to be used for toc fusion.
8119 (rs6000_debug_print_mode): Delete toc fusion debugging.
8120 (rs6000_debug_reg_global): Likewise.
8121 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8122 fusion and secondary reload support that were never used.
8123 (rs6000_option_override_internal): Delete TOC fusion, that was only
8124 partially defined, and it did not work unless you also used the
8126 (rs6000_legitimate_address_p): Delete TOC fusion support.
8127 (rs6000_opt_masks): Likewise.
8128 (fusion_wrap_memory_address): Delete function, no longer used.
8129 (fusion_split_address); Delete TOC fusion support.
8130 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8131 longer used with toc fusion being deleted.
8132 (TARGET_TOC_FUSION_FP): Likewise.
8133 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8135 (toc fusion spliter): Delete TOC fusion support.
8136 (toc_fusionload_<mode>): Likewise.
8137 (toc_fusionload_di): Likewise.
8138 (fusion_gpr_load_<mode>): Delete generator function, this insn no
8139 longer needs to be named. Rename predicate to delete TOC fusion.
8140 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8141 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8142 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8143 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8144 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8146 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
8148 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8149 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
8150 __int128 in built-in function prototypes.
8151 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8152 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8154 2018-07-27 Martin Sebor <msebor@redhat.com>
8156 PR tree-optimization/86696
8157 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8158 types, including enums.
8159 (handle_char_store): Be prepared for the above function to fail.
8161 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
8163 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8164 when optimization level is lower than 2 or optimize for size.
8166 2018-07-26 Martin Sebor <msebor@redhat.com>
8168 PR tree-optimization/86043
8169 PR tree-optimization/86042
8170 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8171 (get_string_cst_length): Rename...
8172 (get_min_string_length): ...to this. Add argument.
8173 (handle_char_store): Extend to handle multi-character stores by
8175 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
8176 * tree.h (initializer_zerop): Add argument.
8178 2018-07-26 Jakub Jelinek <jakub@redhat.com>
8181 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8182 declare target to variables if they have always,{to,from,tofrom} map
8185 2018-07-26 Martin Liska <mliska@suse.cz>
8188 * lto-wrapper.c: Add linker_output as prefix
8189 for ltrans_output_file.
8191 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
8193 PR rtl-optimization/85805
8194 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8195 value for hard registers if that was written in the same mode.
8197 2018-07-26 Martin Liska <mliska@suse.cz>
8199 PR gcov-profile/86536
8200 * gcov.c (format_gcov): Use printf format %.*f directly
8201 and do not handle special values.
8203 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8205 * common/config/arc/arc-common.c (arc_option_optimization_table):
8206 Update default optimizations for size.
8208 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8210 * config/arc/arc.md (movsf_insn): Add short instruction selection.
8211 * config/arc/constraints.md (CfZ): New constraint.
8212 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8213 (subsf3_fpu): Likewise.
8214 (cmpsf_fpu): Likewise.
8215 (cmpsf_fpu_uneq): Likewise.
8217 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8219 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8221 (arc_is_uncached_mem_p): uncached applies to both the variable and
8224 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8226 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8229 2018-07-25 David Malcolm <dmalcolm@redhat.com>
8231 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8232 field "m_scopes" from vec to auto_vec.
8234 2018-07-25 Martin Liska <mliska@suse.cz>
8236 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8239 2018-07-25 Richard Biener <rguenther@suse.de>
8242 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8243 special wrt context_die late.
8244 (gen_subprogram_die): Re-use DIEs in local scope.
8246 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
8248 PR tree-optimization/86644
8249 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
8251 2018-07-25 Martin Liska <mliska@suse.cz>
8254 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8255 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8257 2018-07-25 Martin Liska <mliska@suse.cz>
8260 * params.def: Explain ASan abbreviation and provide
8261 a documentation link.
8263 2018-07-24 Martin Sebor <msebor@redhat.com>
8265 PR tree-optimization/86622
8266 PR tree-optimization/86532
8267 * builtins.h (string_length): Declare.
8268 * builtins.c (c_strlen): Correct handling of non-constant offsets.
8269 (check_access): Be prepared for non-constant length ranges.
8270 (string_length): Make extern.
8271 * expr.c (string_constant): Only handle the minor non-constant
8272 array index. Use string_constant to compute the length of
8273 a generic string constant.
8275 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
8277 PR tree-optimization/86618
8278 * tree-vect-stmts.c (vectorizable_call): Don't take the address
8279 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8281 2018-07-24 David Malcolm <dmalcolm@redhat.com>
8283 PR tree-optimization/86636
8284 * json.cc (json::object::set): Fix comment. Add assertions.
8285 (json::array::append): Move here from json.h. Add comment and an
8287 (json::string::string): Likewise.
8288 * json.h (json::array::append): Move to json.cc.
8289 (json::string::string): Likewise.
8290 * optinfo-emit-json.cc
8291 (optrecord_json_writer::impl_location_to_json): Assert that we
8292 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
8293 wrapper around it. Expand the location once, rather than three
8295 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
8296 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
8298 (optrecord_json_writer::optinfo_to_json): Likewise, in four
8299 places. Fix some overlong lines.
8301 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
8303 * config/aarch64/aarch64-simd.md
8304 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
8305 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
8306 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
8307 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
8308 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
8309 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
8310 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
8311 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
8312 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
8314 2018-07-24 Jakub Jelinek <jakub@redhat.com>
8317 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
8318 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
8319 and abs_d == d, do the power of two handling if profitable.
8321 2018-07-24 Richard Biener <rguenther@suse.de>
8323 * match.pd: Add BIT_FIELD_REF canonicalizations.
8325 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
8328 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
8330 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
8332 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
8333 terminated STRING_CST object.
8335 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
8337 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
8339 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
8341 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
8342 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
8343 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
8344 the elements into a register.
8345 (rs6000_split_v4si_init_di_reg): Delete.
8346 (rs6000_split_v4si_init): Delete.
8347 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
8348 (vsx_init_v4si): Rewrite as a define_expand.
8350 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
8352 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
8353 zero_extend argument from memory): New.
8355 2018-07-22 Martin Sebor <msebor@redhat.com>
8358 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
8359 diagnosing calls with unknown arguments unless -Walloca-larger-than
8360 is restricted to less than PTRDIFF_MAX bytes.
8362 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
8364 * doc/gcov.texi (Invoking Gcov): Editorial changes.
8366 2018-07-20 David Malcolm <dmalcolm@redhat.com>
8368 * pretty-print.c (text_info::set_location): Remove redundant
8369 "line_table" parameter from call to rich_location::set_range.
8371 2018-07-20 Martin Sebor <msebor@redhat.com>
8374 * builtins.c (expand_builtin_alloca): Adjust.
8375 * calls.c (alloc_max_size): Simplify.
8376 * cgraphunit.c (cgraph_node::expand): Adjust.
8377 * common.opt (larger_than_size, warn_frame_larger_than): Remove
8379 (frame_larger_than_size): Same.
8380 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
8381 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
8383 * doc/invoke.texi (GCC Command Options): Document option arguments.
8384 Explain byte-size arguments and suffixes.
8385 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
8386 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
8387 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
8388 * doc/options.texi (UInteger): Expand.
8389 (Host_Wide_Int, ByteSize): Document new properties.
8390 * final.c (final_start_function_1): Include sizes in an error message.
8391 * function.c (frame_offset_overflow): Same.
8392 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
8393 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
8394 Diagnose unbounded alloca calls only for limits of less than
8396 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
8397 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
8399 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
8400 only for limits of less than PTRDIFF_MAX.
8401 * langhooks-def.h (lhd_handle_option): Change function argument
8403 * langhooks.c (lhd_handle_option): Same.
8404 * langhooks.h (handle_option): Same.
8405 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
8407 (var_type, var_type_struct): Same.
8408 (var_set): Handle ByteSize flag.
8409 * optc-gen.awk: Add comments to output to ease debugging. Make
8410 use of HOST_WIDE_INT where appropriate.
8411 * opts-gen-save.awk: Use %lx to format unsigned long.
8412 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
8413 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
8414 arguments. Parse bytes-size suffixes.
8415 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
8416 (enum_value_to_arg): Same.
8417 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
8418 (handle_option): Adjust.
8419 (generate_option): Change function argument to HOST_WIDE_INT.
8420 (cmdline_handle_error): Adjust.
8421 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
8422 (set_option): Change function argument to HOST_WIDE_INT.
8423 (option_enabled): Handle cl_host_wide_int.
8424 (get_option_state): Handle CLVC_SIZE.
8425 (control_warning_option): Same.
8426 * opts.c (common_handle_option): Change function argument to
8427 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
8428 OPT_Wvla_larger_than_.
8429 * opts.h (enum cl_var_type): Add an enumerator.
8430 * stor-layout.c (layout_decl): Print a more meaningful warning.
8431 * toplev.c (output_stack_usage): Adjust.
8433 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
8435 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
8436 call to inline_expand_builtin_string_cmp.
8437 (expand_builtin_strcmp): Likewise.
8438 (expand_builtin_strncmp): Likewise.
8439 (inline_string_cmp): Delete the last parameter, change char_type_node
8440 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
8442 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
8443 the inlining expansion on target where the type of the call has same or
8444 narrower precision than unsigned char.
8446 2018-07-20 David Malcolm <dmalcolm@redhat.com>
8448 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
8449 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
8450 * common.opt (fsave-optimization-record): New option.
8451 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
8452 * doc/invoke.texi (-fsave-optimization-record): New option.
8453 * dumpfile.c: Include "optinfo-emit-json.h".
8454 (struct kv_pair): Move to coretypes.h.
8455 (optgroup_options): Make non-static.
8456 (dump_context::end_scope): Call
8457 optimization_records_maybe_pop_dump_scope.
8458 * dumpfile.h (optgroup_options): New decl.
8459 * json.cc: New file.
8461 * optinfo-emit-json.cc: New file.
8462 * optinfo-emit-json.h: New file.
8463 * optinfo.cc: Include "optinfo-emit-json.h".
8464 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
8465 (optinfo_enabled_p): Check optimization_records_enabled_p.
8466 (optinfo_wants_inlining_info_p): Likewise.
8467 * optinfo.h: Update comment.
8468 * profile-count.c (profile_quality_as_string): New function.
8469 * profile-count.h (profile_quality_as_string): New decl.
8470 (profile_count::quality): New accessor.
8471 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
8472 and optinfo_emit_json_cc_tests.
8473 * selftest.h (selftest::json_cc_tests): New decl.
8474 (selftest::optinfo_emit_json_cc_tests): New decl.
8475 * toplev.c: Include "optinfo-emit-json.h".
8476 (compile_file): Call optimization_records_finish.
8477 (do_compile): Call optimization_records_start.
8478 * tree-ssa-live.c: Include optinfo.h.
8479 (remove_unused_scope_block_p): Retain inlining information if
8480 optinfo_wants_inlining_info_p returns true.
8482 2018-07-20 Richard Biener <rguenther@suse.de>
8485 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
8486 to cover -flto-partition=none.
8488 2018-07-20 Martin Liska <mliska@suse.cz>
8490 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
8491 (get_decl_source_range): Remove unused function.
8493 2018-07-20 Richard Biener <rguenther@suse.de>
8495 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
8496 (struct vn_phi_s): Likewise.
8497 (struct vn_reference_s): Likewise.
8498 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
8499 for searching the slot of an entry known to be in the hash itself.
8500 (vn_phi_hasher::equal): Likewise.
8501 (vn_reference_hasher::equal): Likewise.
8502 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
8504 (optimistic_info, current_info): Remove, keeping only valid_info.
8505 (vn_reference_lookup_1): Remove fallback lookup.
8506 (vn_reference_lookup_2): Likewise.
8507 (vn_nary_op_lookup_1): Likewise.
8508 (vn_phi_lookup): Likewise.
8509 (vn_nary_build_or_lookup_1): Make sure to not chain the built
8511 (vn_reference_insert): Adjust, chain the inserted hash element
8512 at last_inserted_ref.
8513 (vn_reference_insert_pieces): Likewise.
8514 (visit_reference_op_call): Likewise.
8515 (vn_nary_op_insert_into): Chain the inserted hash element at
8517 (vn_nary_op_insert_pieces): Adjust.
8518 (vn_nary_op_insert): Likewise.
8519 (vn_nary_op_insert_stmt): Likewise.
8520 (vn_phi_insert): Adjust, chain the inserted hash element at
8522 (process_scc): Remove clearing and copying the optimistic
8523 table. Instead remove elements inserted during an optimistic
8524 iteration from the single table we maintain.
8525 (init_scc_vn): Adjust.
8526 (free_scc_vn): Likewise.
8527 (sccvn_dom_walker::record_cond): Likewise.
8528 (sccvn_dom_walker::after_dom_children): Likewise.
8530 2018-07-19 Martin Sebor <msebor@redhat.com>
8532 PR tree-optimization/84047
8533 PR tree-optimization/83776
8534 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
8535 (check_array_bounds): Call it.
8537 2018-07-19 Martin Sebor <msebor@redhat.com>
8539 * align.h (align_flags): Use member initialization.
8541 2018-07-19 David Malcolm <dmalcolm@redhat.com>
8543 * Makefile.in (OBJS): Add optinfo.o.
8544 * coretypes.h (class symtab_node): New forward decl.
8545 (struct cgraph_node): New forward decl.
8546 (class varpool_node): New forward decl.
8547 * dump-context.h: New file.
8548 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
8550 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
8551 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
8552 (set_alt_dump_file): Likewise.
8553 (dump_context::~dump_context): New dtor.
8554 (dump_gimple_stmt): Move implementation to...
8555 (dump_context::dump_gimple_stmt): ...this new member function.
8556 Add the stmt to any pending optinfo, creating one if need be.
8557 (dump_gimple_stmt_loc): Move implementation to...
8558 (dump_context::dump_gimple_stmt_loc): ...this new member function.
8559 Start a new optinfo and add the stmt to it.
8560 (dump_gimple_expr): Move implementation to...
8561 (dump_context::dump_gimple_expr): ...this new member function.
8562 Add the stmt to any pending optinfo, creating one if need be.
8563 (dump_gimple_expr_loc): Move implementation to...
8564 (dump_context::dump_gimple_expr_loc): ...this new member function.
8565 Start a new optinfo and add the stmt to it.
8566 (dump_generic_expr): Move implementation to...
8567 (dump_context::dump_generic_expr): ...this new member function.
8568 Add the tree to any pending optinfo, creating one if need be.
8569 (dump_generic_expr_loc): Move implementation to...
8570 (dump_context::dump_generic_expr_loc): ...this new member
8571 function. Add the tree to any pending optinfo, creating one if
8573 (dump_printf): Move implementation to...
8574 (dump_context::dump_printf_va): ...this new member function. Add
8575 the text to any pending optinfo, creating one if need be.
8576 (dump_printf_loc): Move implementation to...
8577 (dump_context::dump_printf_loc_va): ...this new member function.
8578 Start a new optinfo and add the stmt to it.
8579 (dump_dec): Move implementation to...
8580 (dump_context::dump_dec): ...this new member function. Add the
8581 value to any pending optinfo, creating one if need be.
8582 (dump_context::dump_symtab_node): New member function.
8583 (dump_context::get_scope_depth): New member function.
8584 (dump_context::begin_scope): New member function.
8585 (dump_context::end_scope): New member function.
8586 (dump_context::ensure_pending_optinfo): New member function.
8587 (dump_context::begin_next_optinfo): New member function.
8588 (dump_context::end_any_optinfo): New member function.
8589 (dump_context::s_current): New global.
8590 (dump_context::s_default): New global.
8591 (dump_scope_depth): Delete global.
8592 (dumpfile_ensure_any_optinfo_are_flushed): New function.
8593 (dump_symtab_node): New function.
8594 (get_dump_scope_depth): Reimplement in terms of dump_context.
8595 (dump_begin_scope): Likewise.
8596 (dump_end_scope): Likewise.
8597 (selftest::temp_dump_context::temp_dump_context): New ctor.
8598 (selftest::temp_dump_context::~temp_dump_context): New dtor.
8599 (selftest::verify_item): New function.
8600 (ASSERT_IS_TEXT): New macro.
8601 (ASSERT_IS_TREE): New macro.
8602 (ASSERT_IS_GIMPLE): New macro.
8603 (selftest::test_capture_of_dump_calls): New test.
8604 (selftest::dumpfile_c_tests): Call it.
8605 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
8606 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
8607 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
8608 descriptive comment.
8609 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
8610 (dump_node, dump_bb): Move these unrelated decls.
8611 (class dump_manager): Add leading comment.
8612 * optinfo.cc: New file.
8613 * optinfo.h: New file.
8615 2018-07-19 Michael Collison <michael.collison@arm.com>
8616 Richard Henderson <rth@redhat.com>
8618 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
8619 (subti): Handle op1 zero.
8620 (subvti4, usub4ti4): New.
8621 (*sub<GPI>3_compare1_imm): New.
8622 (sub<GPI>3_carryinCV): New.
8623 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
8624 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
8626 2018-07-19 Michael Collison <michael.collison@arm.com>
8627 Richard Henderson <rth@redhat.com>
8629 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
8630 (addti3): Create simpler code if low part is already known to be 0.
8631 (addvti4, uaddvti4): New.
8632 (*add<GPI>3_compareC_cconly_imm): New.
8633 (*add<GPI>3_compareC_cconly): New.
8634 (*add<GPI>3_compareC_imm): New.
8635 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
8636 handle constants within this pattern..
8637 (*add<GPI>3_compareV_cconly_imm): New.
8638 (*add<GPI>3_compareV_cconly): New.
8639 (*add<GPI>3_compareV_imm): New.
8640 (add<GPI>3_compareV): New.
8641 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
8642 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
8643 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
8644 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
8645 with 'comparison' operator.
8646 (*add<GPI>3_compareV_cconly_imm): Ditto.
8647 (*add<GPI>3_compareV_cconly): Ditto.
8648 (*add<GPI>3_compareV_imm): Ditto.
8649 (add<GPI>3_compareV): Ditto.
8650 (add<mode>3_carryinC): Ditto.
8651 (*add<mode>3_carryinC_zero): Ditto.
8652 (*add<mode>3_carryinC): Ditto.
8653 (add<mode>3_carryinV): Ditto.
8654 (*add<mode>3_carryinV_zero): Ditto.
8655 (*add<mode>3_carryinV): Ditto.
8657 2018-07-19 Michael Collison <michael.collison@arm.com>
8658 Richard Henderson <rth@redhat.com>
8660 * config/aarch64/aarch64-modes.def (CC_V): New.
8661 * config/aarch64/aarch64-protos.h
8662 (aarch64_addti_scratch_regs): Declare
8663 (aarch64_subvti_scratch_regs): Declare.
8664 (aarch64_expand_subvti): Declare.
8665 (aarch64_gen_unlikely_cbranch): Declare
8666 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
8667 for signed overflow using CC_Vmode.
8668 (aarch64_get_condition_code_1): Handle CC_Vmode.
8669 (aarch64_gen_unlikely_cbranch): New function.
8670 (aarch64_addti_scratch_regs): New function.
8671 (aarch64_subvti_scratch_regs): New function.
8672 (aarch64_expand_subvti): New function.
8674 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8676 * config/aarch64/aarch64-option-extensions.def: New entry for profile
8678 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
8679 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
8682 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8685 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8686 address check not strict.
8688 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8690 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
8692 (store_pair_lanes<mode>): Likewise.
8693 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
8694 enum value 'ADDR_QUERY_LDP_STP_N'.
8695 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
8696 (aarch64_print_address_internal): Add declaration.
8697 (aarch64_print_ldpstp_address): Remove.
8698 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
8699 (aarch64_print_operand): Change printing of 'y'.
8700 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
8701 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
8702 'true' rather than '1'.
8703 * config/aarch64/constraints.md (Uml): Likewise.
8704 (Uml): Rename to Umn.
8707 2018-07-19 Richard Biener <rguenther@suse.de>
8709 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
8711 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
8712 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
8713 (vn_reference_hasher): Likewise.
8714 (struct vn_tables_s): Remove obstack and alloc-pool members.
8715 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
8716 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
8717 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
8718 (vn_reference_insert_pieces): Likewise.
8719 (alloc_vn_nary_op_noinit): Adjust.
8720 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
8721 (vn_phi_eq): Adjust.
8722 (shared_lookup_phiargs): Remove.
8723 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
8724 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
8725 (visit_reference_op_call): Likewise.
8726 (copy_nary, copy_phi, copy_reference): Remove.
8727 (process_scc): Rewind the obstack when iterating. Do not
8728 copy the elements to valid_info but just move them from one
8729 hashtable to the other.
8730 (allocate_vn_table): Adjust.
8731 (free_vn_table): Likewise.
8732 (init_scc_vn): Likewise.
8733 (free_scc_vn): Likewise.
8735 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
8738 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8739 indirect_return as function type attribute.
8740 (ix86_attribute_table): Change indirect_return to function
8742 * doc/extend.texi: Update indirect_return attribute.
8744 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
8746 * wide-int.h (widest2_int): New.
8747 * gimple-fold.c (arith_overflowed_p): Use it.
8748 * tree.h (widest2_int_cst): New.
8749 * tree-vrp.c (wide_int_binop_overflow): Rename from
8750 vrp_int_const_binop.
8751 Rewrite to work on trees.
8752 (extract_range_from_multiplicative_op_1): Abstract code to...
8753 (wide_int_range_min_max): ...here.
8754 (wide_int_range_cross_product): ...and here.
8755 (extract_range_from_binary_expr_1): Abstract overflow code to...
8756 (wide_int_range_mult_wrapping): ...here.
8757 * tree-vrp.h (wide_int_range_cross_product): New.
8758 (wide_int_range_mult_wrapping): New.
8760 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
8761 Julia Koval <julia.koval@intel.com>
8763 * config/i386/x86-tune-costs.h (skylake_memcpy,
8764 skylake_memset): Replace rep_prefix with unrolling for size 512.
8766 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
8769 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8770 comparision with EQ_EXPR in last stmt.
8772 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
8774 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8775 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8776 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8777 previously known as "PowerPC AltiVec Built-in Functions". Move
8778 some material to new subsubsections "PowerPC AltiVec Built-in
8779 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8781 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8782 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8783 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8784 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8786 2018-07-18 Richard Biener <rguenther@suse.de>
8788 PR tree-optimization/86557
8789 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8792 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
8794 * config/s390/s390.c (s390_function_profiler): Generate CFI.
8796 2018-07-17 Jeff Law <law@redhat.com>
8798 * config/arm/arm.c (get_label_padding): Update for recent
8799 changes to label_to_alignment.
8801 PR tree-optimization/86010
8802 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8804 * config/mips/mips.c (vr4130_align_insns): Update for recent
8805 changes to label_to_alignment.
8807 * config/frv/frv.c (frv_label_align): Update for recent changes
8808 to label_to_alignment.
8810 * config/nios2/nios2.c (nios2_label_align): Update for recent
8811 changes which dropped ALIGN_LABELS_LOG.
8813 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
8815 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8816 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8818 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
8820 * config/arc/arc.c (arc_label_align): Use align_labels instead of
8821 deprecated align_labels_log.
8823 2018-07-17 Richard Biener <rguenther@suse.de>
8826 * dwarf2out.c (init_sections_and_labels): Always generate
8827 a debug_line_str_section for early LTO debug.
8828 (dwarf2out_finish): Reset debug_line_str_hash output early.
8829 Bump counter for extra dwarf5 .debug_loc labels to not conflict
8831 (dwarf2out_early_finish): Output debug_line_str.
8833 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8835 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8836 index register on z196 or later.
8838 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8840 * config/s390/s390.c (s390_default_align): Set default function
8842 (s390_override_options_after_change): Call s390_default align.
8843 (s390_option_override_internal): Call s390_default_align.
8844 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8846 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8849 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8850 to _looptemp_ clauses, other than the first two.
8852 2018-07-17 Martin Liska <mliska@suse.cz>
8854 * opts.c: Do not enable OPT_falign_* for -Os.
8856 2018-07-17 Martin Liska <mliska@suse.cz>
8858 * align.h (MAX_CODE_ALIGN): New.
8859 (MAX_CODE_ALIGN_VALUE): New.
8860 * common/config/i386/i386-common.c (ix86_handle_option):
8861 (MAX_CODE_ALIGN): Moved to align.h.
8862 * final.c (MAX_CODE_ALIGN): Likewise.
8863 * opts.c (parse_and_check_align_values):
8864 (MAX_CODE_ALIGN): Likewise.
8865 (MAX_CODE_ALIGN_VALUE): Likewise.
8867 2018-07-17 Martin Liska <mliska@suse.cz>
8869 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8870 in order to fulfil coding style.
8871 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8872 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8873 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8874 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8875 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8876 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8877 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8878 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8879 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8881 2018-07-17 Martin Liska <mliska@suse.cz>
8883 * align.h: New file.
8884 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8886 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8887 align_flags of label_to_alignment.
8888 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8890 * config/m68k/m68k.c: Do not use removed align_labels_value and
8892 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8893 (LOOP_ALIGN): Likewise.
8894 (LABEL_ALIGN): Likewise.
8895 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8896 Remove not used macro.
8897 (rs6000_loop_align): Change return type to align_flags.
8898 (rs6000_loop_align_max_skip): Remove.
8899 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8900 Change return type to align_flags.
8901 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8902 Remove not used macro.
8903 (rs6000_loop_align): Change return type to align_flags.
8904 (rs6000_loop_align_max_skip): Remove.
8905 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8906 * config/rx/rx-protos.h (rx_align_for_label): Make it
8908 * config/rx/rx.c (rx_align_for_label): Change return type
8910 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8912 into align_flags class.
8913 (LABEL_ALIGN): Likewise.
8914 (LOOP_ALIGN): Likewise.
8915 * config/s390/s390.c (s390_label_align): Use align_flags
8917 (s390_asm_output_function_label): Likewise.
8918 * config/sh/sh.c (sh_override_options_after_change):
8919 Use align_flags class directly without macros.
8920 (find_barrier): Likewise.
8921 (barrier_align): Likewise.
8922 (sh_loop_align): Likewise.
8923 * config/spu/spu.c (spu_option_override):
8924 Use align_flags_tuple::get_value instead of removed macros.
8925 (spu_sched_init): Likewise.
8926 * config/spu/spu.h (GTY): Likewise.
8927 * config/visium/visium.c (visium_option_override):
8928 Set "8" as default secondary alignment.
8929 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8930 in order to guarantee secondary alignment of 8.
8931 * coretypes.h: Include align.h header file.
8932 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8933 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8934 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8935 * doc/tm.texi.in: Likewise.
8936 * final.c (struct label_alignment): Remove not used structure.
8937 (LABEL_ALIGN): Change type to align_flags.
8938 (LOOP_ALIGN): Likewise.
8939 (JUMP_ALIGN): Likewise.
8940 (default_loop_align_max_skip): Remove.
8941 (default_label_align_max_skip): Likewise.
8942 (default_jump_align_max_skip): Likewise.
8943 (default_label_align_after_barrier_max_skip):
8944 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8945 (LABEL_TO_MAX_SKIP): Remove.
8946 (label_to_alignment): Return align_flags type instead of integer.
8947 (label_to_max_skip): Remove.
8948 (align_fuzz): Use align_flags type.
8949 (compute_alignments): Use align_flags type and use align_flags::max
8950 to combine multiple alignments.
8951 (grow_label_align): Grow vec instead of C array.
8952 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8953 (shorten_branches): Use align_flags type and use align_flags::max
8954 to combine multiple alignments.
8955 (final_scan_insn_1): Remove usage of secondary alignment that comes
8956 from label alignment, but instead use proper secondary alignment
8957 which is computed in grow_label_align.
8958 * flags.h (struct align_flags_tuple): Move to align.h.
8959 (struct align_flags): Likewise.
8960 (state_align_loops): Rename to align_loops.
8961 (state_align_jumps): Rename to align_jumps.
8962 (state_align_labels): Rename to align_labels.
8963 (state_align_functions): Rename to align_functions.
8964 (align_loops_log): Remove.
8965 (align_jumps_log): Remove.
8966 (align_labels_log): Remove.
8967 (align_functions_log): Remove.
8968 (align_loops_max_skip): Remove.
8969 (align_jumps_max_skip): Remove.
8970 (align_labels_max_skip): Remove.
8971 (align_functions_max_skip): Remove.
8972 (align_loops_value): Remove.
8973 (align_jumps_value): Remove.
8974 (align_labels_value): Remove.
8975 (align_functions_value): Remove.
8976 * output.h (label_to_alignment): Change return type to align_flags.
8977 (label_to_max_skip): Remove.
8978 * target.def: Remove loop_align_max_skip, label_align_max_skip,
8979 jump_align_max_skip macros.
8980 * targhooks.h (default_loop_align_max_skip): Remove.
8981 (default_label_align_max_skip): Likewise.
8982 (default_jump_align_max_skip): Likewise.
8983 (default_label_align_after_barrier_max_skip): Remove.
8984 * toplev.c (read_log_maxskip): Use ::normalize function.
8985 (parse_N_M): Remove not used argument and also call ::normalize.
8986 (parse_alignment_opts): Do not pass unused arguments.
8987 * varasm.c (assemble_start_function): Use directly align_functions
8988 instead of removed macros.
8989 * system.h: Do not poison removed macros.
8991 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8994 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8995 and cond temporaries don't have reference type if iterator has
8996 pointer type. For init use &for_pre_body instead of pre_p if
8997 for_pre_body is non-empty.
8999 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9001 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9002 double-double modes to SFmode directly directly.
9003 (trunc<mode>sf2_fprs): Delete.
9005 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9007 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9008 for conversions between IFmode and the decimal floating point modes.
9009 (init_float128_ieee): Use the correct names for conversions between
9010 KFmode and the decimal floating point modes.
9012 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9014 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9015 for the conversions between TDmode and IFmode.
9016 (init_float128_ieee): Use more correct names for the conversions
9017 between TDmode and KFmode.
9019 2018-07-16 Jakub Jelinek <jakub@redhat.com>
9021 PR tree-optimization/86526
9022 * builtins.c (expand_builtin_memcmp): Formatting fixes.
9023 (inline_expand_builtin_string_cmp): Likewise.
9024 (inline_string_cmp): Likewise. Use c_readstr instead of
9025 builtin_memcpy_read_str. Add unit_mode temporary.
9027 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9030 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9031 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9033 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9035 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9036 Alphabetize prototypes of built-in functions, separating out
9037 built-in functions that are listed in this section but should be
9038 described elsewhere.
9040 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
9043 * expmed.c (emit_store_flag): Do not emit setcc followed by a
9044 conditional move when trapping comparison was split to a
9045 non-trapping one (and vice versa).
9047 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9049 * config/s390/s390.c (s390_function_profiler): Generate nops
9050 instead of profiler call sequences.
9051 * config/s390/s390.opt: Add the new option.
9053 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9055 * config/s390/s390.c (s390_function_profiler): Generate
9056 __mcount_loc section.
9057 * config/s390/s390.opt: Add the new option.
9059 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9061 * common.opt: Add the new warning.
9062 * config/s390/s390.c (s390_function_profiler): Emit "brasl
9063 %r0,__fentry__" when -mfentry is specified.
9064 (s390_option_override_internal): Disallow -mfentry for 31-bit
9066 * config/s390/s390.opt: Add the new option.
9068 2018-07-16 Richard Biener <rguenther@suse.de>
9071 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9072 for function-local FUNCTION_DECL and RESULT_DECL immediately.
9074 2018-07-16 Martin Liska <mliska@suse.cz>
9077 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9080 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9082 * config/arc/arcHS.md: Update ARCHS scheduling rules.
9084 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9086 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9088 * config/arc/arc-cpus.def (hs4x): New cpu.
9090 * config/arc/arc-tables.opt: Regenerate.
9091 * config/arc/arc.c (arc_sched_issue_rate): New function.
9092 (TARGET_SCHED_ISSUE_RATE): Define.
9093 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9094 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9096 (attr tune): Add ARCHS4x tune values.
9097 (attr tune_dspmpy): Define.
9098 (*tst): Correct instruction type.
9099 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9100 * config/arc/arcHS4x.md: New file.
9101 * config/arc/fpu.md: Update instruction type attributes.
9102 * config/arc/t-multilib: Regenerate.
9104 2018-07-16 Tom de Vries <tdevries@suse.de>
9107 * var-tracking.c (vt_initialize): Fix pre_dec handling.
9109 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9111 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9114 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
9116 PR tree-optimization/86514
9117 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9118 conversion to a boolean type from a type with greater precision.
9120 2018-07-16 Tom de Vries <tdevries@suse.de>
9122 * var-tracking.c (vt_initialize): Print adjusted insn slim if
9123 dump_flags request TDF_SLIM.
9125 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
9127 * fold-const.c (int_const_binop_1): Abstract...
9128 (wide_int_binop): ...wide int code here.
9129 (poly_int_binop): ...poly int code here.
9130 Abstract the rest of int_const_binop_1 into int_const_binop.
9131 * fold-const.h (wide_int_binop): New.
9132 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9133 Remove useless PLUS/MINUS_EXPR case.
9134 (zero_nonzero_bits_from_vr): Move wide int code...
9135 (zero_nonzero_bits_from_bounds): ...here.
9136 (extract_range_from_binary_expr_1): Move mask optimization code...
9137 (range_easy_mask_min_max): ...here.
9138 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9139 (range_easy_mask_min_max): New.
9141 2018-07-15 Jeff Law <law@redhat.com>
9144 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9147 2018-07-14 Jim Wilson <jimw@sifive.com>
9149 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9151 2018-07-14 Paul Koning <ni1d@arrl.net>
9153 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9155 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
9157 * lto-streamer-out.c (copy_function_or_variable): Dump info about
9160 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
9161 Steve Munroe <munroesj52@gmail.com>
9163 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9164 (_mm_andnot_si128): Likewise.
9165 (_mm_or_si128): Likewise.
9166 (_mm_xor_si128): Likewise.
9168 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
9171 * builtins.c (expand_builtin_memcmp): Inline the calls first
9172 when result_eq is false.
9173 (expand_builtin_strcmp): Inline the calls first.
9174 (expand_builtin_strncmp): Likewise.
9175 (inline_string_cmp): New routine. Expand a string compare
9176 call by using a sequence of char comparison.
9177 (inline_expand_builtin_string_cmp): New routine. Inline expansion
9178 a call to str(n)cmp/memcmp.
9179 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9181 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9183 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
9185 * config/arm/driver-arm.c: Include arm-native.h.
9186 (host_detect_local_cpu): Use auto-generated data tables.
9187 (vendors, arm_cpu_table): Delete. Move part information to ...
9188 * config/arm/arm-cpus.in: ... here.
9189 * config/arm/parsecpu.awk (gen_native): New function.
9190 (vendor, part): New CPU fields.
9191 (END): Add support for building the native CPU detection tables.
9192 * config/arm/t-arm (arm-native.h): Add build rule.
9193 (driver-arm.o): Add dependency on arm-native.h.
9195 2018-07-13 Richard Biener <rguenther@suse.de>
9198 * match.pd (addr1 - addr2): Allow either of the operand to
9201 2018-07-13 Tom de Vries <tdevries@suse.de>
9203 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9206 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
9208 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9209 arrays instead of numbered variables.
9211 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
9213 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9214 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9216 2018-07-13 Richard Biener <rguenther@suse.de>
9219 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9220 instead of get_context_die.
9222 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
9223 Richard Biener <rguenther@suse.de>
9226 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9227 that the loop latch destination where phi is defined.
9229 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
9231 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9232 (riscv_expand_epilogue): Add assertion to check interrupt mode.
9233 (riscv_set_current_function): Extract getting interrupt type to new
9235 (riscv_get_interrupt_type): New function.
9236 (riscv_merge_decl_attributes): New function, checking interrupt type is
9238 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9240 2018-07-12 Paul Koning <ni1d@arrl.net>
9242 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9245 2018-07-12 Paul Koning <ni1d@arrl.net>
9247 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9248 zero reference, add doloop_end instead.
9249 * doc/md.texi (decrement_and_branch_until_zero): Remove.
9250 (Looping patterns): Remove decrement_and_branch_until_zero. Add
9251 detail for doloop_end.
9253 2018-07-12 Martin Sebor <msebor@redhat.com>
9256 * attribs.c (decl_attributes): Reject conflicting attributes before
9257 calling attribute handlers.
9259 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
9261 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9263 (gcc::dump_manager::get_dump_file_name): likewise.
9264 (dump_begin): Likewise.
9265 * dumpfile.h (dump_begin): Update prototype.
9266 (gcc::dump_manager::get_dump_file_name,
9267 gcc::dump_manager::get_dump_file_name): Update prototype.
9269 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9271 * internal-fn.h (vectorizable_internal_fn_p): New function.
9272 * tree-vect-slp.c (compatible_calls_p): Likewise.
9273 (vect_build_slp_tree_1): Remove nops argument. Handle calls
9274 to internal functions.
9275 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9277 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9279 * fold-const.h (inverse_conditions_p): Declare.
9280 * fold-const.c (inverse_conditions_p): New function.
9281 * match.pd: Use inverse_conditions_p. Add folds of view_converts
9282 that test the inverse condition of a conditional internal function.
9283 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9284 * internal-fn.c (internal_fn_mask_index): Handle conditional
9286 (vectorized_internal_fn_supported_p): New function.
9287 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
9288 (any_pred_load_store): Replace with...
9289 (need_to_predicate): ...this new variable.
9290 (redundant_ssa_names): New variable.
9291 (ifcvt_can_use_mask_load_store): Move initial checks to...
9292 (ifcvt_can_predicate): ...this new function. Handle tree codes
9293 for which a conditional internal function exists.
9294 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
9295 instead of ifcvt_can_use_mask_load_store. Update after variable
9297 (predicate_load_or_store): New function, split out from
9298 predicate_mem_writes.
9299 (check_redundant_cond_expr): New function.
9300 (value_available_p): Likewise.
9301 (predicate_rhs_code): Likewise.
9302 (predicate_mem_writes): Rename to...
9303 (predicate_statements): ...this. Use predicate_load_or_store
9304 and predicate_rhs_code.
9305 (combine_blocks, tree_if_conversion): Update after above name changes.
9306 (ifcvt_local_dce): Handle redundant_ssa_names.
9307 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
9308 general conditional functions.
9309 * tree-vect-stmts.c (vectorizable_call): Likewise.
9311 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9312 Alan Hayward <alan.hayward@arm.com>
9313 David Sherwood <david.sherwood@arm.com>
9315 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
9316 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
9317 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
9318 plus and minus and convert them into IFN_COND_FMA-based sequences.
9319 (convert_mult_to_fma): Handle conditional plus and minus.
9321 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9323 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
9324 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
9325 (cond_fnms_optab): New optabs.
9326 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
9328 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
9329 * internal-fn.h (get_conditional_internal_fn): Declare.
9330 (get_unconditional_internal_fn): Likewise.
9331 * internal-fn.c (cond_ternary_direct): New macro.
9332 (expand_cond_ternary_optab_fn): Likewise.
9333 (direct_cond_ternary_optab_supported_p): Likewise.
9334 (FOR_EACH_COND_FN_PAIR): Likewise.
9335 (get_conditional_internal_fn): New function.
9336 (get_unconditional_internal_fn): Likewise.
9337 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
9338 (gimple_match_op::gimple_match_op): Add a new overload for 5
9340 (gimple_match_op::set_op): Likewise.
9341 (gimple_resimplify5): Declare.
9342 * genmatch.c (decision_tree::gen): Generate simplifications for
9344 * gimple-match-head.c (gimple_simplify): Define an overload for
9345 5 operands. Handle calls with 5 arguments in the top-level overload.
9346 (convert_conditional_op): Handle conversions from unconditional
9347 internal functions to conditional ones.
9348 (gimple_resimplify5): New function.
9349 (build_call_internal): Pass a fifth operand.
9350 (maybe_push_res_to_seq): Likewise.
9351 (try_conditional_simplification): Try converting conditional
9352 internal functions to unconditional internal functions.
9353 Handle 3-operand unconditional forms.
9354 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
9355 Define ternary equivalents of the current rules for binary conditional
9357 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
9359 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
9360 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
9361 (optab): Handle them.
9362 (SVE_COND_FP_TERNARY): New int iterator.
9363 (sve_fmla_op, sve_fmad_op): New int attributes.
9364 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
9365 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
9366 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
9368 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9370 * target.def (preferred_else_value): New target hook.
9371 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
9372 * doc/tm.texi: Regenerate.
9373 * targhooks.h (default_preferred_else_value): Declare.
9374 * targhooks.c (default_preferred_else_value): New function.
9375 * internal-fn.h (conditional_internal_fn_code): Declare.
9376 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
9377 (get_conditional_internal_fn): Use it.
9378 (conditional_internal_fn_code): New function.
9379 * gimple-match.h (gimple_match_cond): New struct.
9380 (gimple_match_op): Add a cond member function.
9381 (gimple_match_op::gimple_match_op): Update all forms to take a
9383 * genmatch.c (expr::gen_transform): Use the same condition as res_op
9384 for the suboperation, but don't specify a particular else_value.
9385 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
9386 (visit_nary_op, visit_reference_op_load): Pass
9387 gimple_match_cond::UNCOND to the gimple_match_op constructor.
9388 * gimple-match-head.c: Include tree-eh.h
9389 (convert_conditional_op): New function.
9390 (maybe_resimplify_conditional_op): Likewise.
9391 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
9392 (gimple_resimplify2): Likewise.
9393 (gimple_resimplify3): Likewise.
9394 (gimple_resimplify4): Likewise.
9395 (maybe_push_res_to_seq): Return null for conditional operations.
9396 (try_conditional_simplification): New function.
9397 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
9399 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
9401 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
9403 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
9405 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
9407 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
9409 (hash_tree): Do not hash DECL_FCONTEXT
9410 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
9411 Do not stream DECL_FCONTEXT.
9412 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
9413 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
9415 2018-07-12 Richard Biener <rguenther@suse.de>
9418 * dwarf2out.c (gen_block_die): Only output blocks when they have
9419 at least one !DECL_IGNORED_P variable.
9421 2018-07-12 Richard Biener <rguenther@suse.de>
9424 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
9425 Remove -mieee-fp handling.
9427 2018-07-12 Richard Biener <rguenther@suse.de>
9429 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
9430 left-over from last patch.
9432 2018-07-12 Jakub Jelinek <jakub@redhat.com>
9434 PR tree-optimization/86492
9435 * gimple-ssa-store-merging.c
9436 (imm_store_chain_info::coalesce_immediate_stores): Call
9437 check_no_overlap even for the merge_overlapping case. Formatting fix.
9439 2018-07-12 Richard Biener <rguenther@suse.de>
9442 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
9443 move possibly trapping operations into the conditional.
9445 2018-07-12 Richard Biener <rguenther@suse.de>
9447 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
9448 (vn_lookup_simplify_result): Remove recursion limit applied
9450 (vn_nary_build_or_lookup_1): Adjust.
9451 (try_to_simplify): Likewise.
9452 * gimple-match-head.c (gimple_resimplify1): Instead apply one
9454 (gimple_resimplify2): Likewise.
9455 (gimple_resimplify3): Likewise.
9456 (gimple_resimplify4): Likewise.
9458 2018-07-11 Jakub Jelinek <jakub@redhat.com>
9460 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
9461 Use __mmask64 type instead of __mmask8 for __M argument.
9462 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
9463 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
9465 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
9466 __mmask16 for __M argument.
9467 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
9468 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
9469 to __mmask16 instead of __mmask8.
9470 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
9471 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
9472 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
9473 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
9474 instead of __mmask16 for __U argument.
9475 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
9476 __mmask16 instead of __mmask8 for __U argument.
9477 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
9479 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
9481 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
9483 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
9485 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
9487 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
9489 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
9491 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
9493 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
9495 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
9497 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
9498 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
9499 return type as well as __M argument type and all casts from __mmask8
9501 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
9502 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
9503 return type as well as __M argument type and all casts from __mmask8
9505 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
9506 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
9507 return type as well as __M argument type and all casts from __mmask8
9509 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
9510 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
9511 return type as well as __M argument type and all casts from __mmask8
9513 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
9514 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
9517 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
9519 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
9520 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
9523 2018-07-11 Paul Koning <ni1d@arrl.net>
9525 * doc/md.texi (define_subst): Document how multiple occurrences of
9526 the same argument in the replacement pattern are handled.
9528 2018-07-11 Paul Koning <ni1d@arrl.net>
9530 * doc/extend.texi (Common Variable Attributes): Move "mode" into
9532 (Common Type Attributes): Add "mode" attribute.
9534 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
9536 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
9537 stream DECL_ORIGINAL_TYPE.
9538 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
9539 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
9540 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
9541 Do not walk original type.
9542 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
9544 (write_ts_decl_non_common_tree_pointers): Do not stream
9546 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
9547 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
9549 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
9551 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
9552 thread twice from the same starting edge.
9554 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
9556 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
9557 * gimple.c (gimple_call_nonnull_result_p): ...here...
9558 (gimple_call_nonnull_arg): ...and here.
9559 * gimple.h (gimple_call_nonnull_result_p): New.
9560 (gimple_call_nonnull_arg): New.
9562 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
9564 * config/arm/arm-cpus.in: Move information from fpu field of each
9565 cpu definition to the isa field.
9566 * config/arm/parsecpu.awk (fpu): Delete match rule.
9567 (gen_comm_data): Don't add bits from the CPU's FPU entry.
9569 2018-07-11 Richard Biener <rguenther@suse.de>
9572 * dwarf2out.c (init_sections_and_labels): Use
9573 output_asm_line_debug_info consistently.
9574 (dwarf2out_early_finish): Likewise.
9575 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
9578 2018-07-11 Richard Biener <rguenther@suse.de>
9580 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
9581 Rework father_bb setting in a way to avoid propagating constants
9582 multiple times on a loop body.
9584 2018-07-10 Mark Wielaard <mark@klomp.org>
9587 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
9589 2018-07-10 Richard Biener <rguenther@suse.de>
9591 * hash-map.h (hash_map::iterator::operator*): Return
9592 references to key and value.
9594 2018-07-10 Jakub Jelinek <jakub@redhat.com>
9597 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
9598 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
9599 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
9600 (gimplify_omp_for): For composite loops, move outer
9601 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
9602 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
9603 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
9604 TREE_LIST for both the original class iterator and the "last" helper
9605 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
9606 loop, remember has_decl_expr from outer composite loops for the
9607 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
9609 2018-07-09 Martin Sebor <msebor@redhat.com>
9613 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
9614 accessing implicitly initialized array elements.
9615 * expr.c (string_constant): Handle string initializers of
9616 character arrays within aggregates.
9617 * gimple-fold.c (fold_array_ctor_reference): Add argument.
9618 Store element offset. As a special case, handle zero size.
9619 (fold_nonarray_ctor_reference): Same.
9620 (fold_ctor_reference): Add argument. Store subobject offset.
9621 * gimple-fold.h (fold_ctor_reference): Add argument.
9623 2018-07-09 Paul Koning <ni1d@arrl.net>
9625 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
9626 (pdp11_insn_cost): New function.
9627 (pdp11_md_asm_adjust): New function.
9628 (TARGET_INVALID_WITHIN_DOLOOP): Define.
9629 (pdp11_rtx_costs): Update to match machine better.
9630 (output_addr_const_pdp11): Correct format mismatch warnings.
9631 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
9632 * config/pdp11/pdp11.md: General change to add base_cost and/or
9633 length attributes for use by new pdp11_insn_cost function.
9634 (MIN_BRANCH): Correct definition.
9636 (doloop_end): Use standard pattern name for looping pattern.
9637 (doloop_end_nocc): New.
9638 (movsf): Add another constraint alternative.
9639 (zero_extendqihi2): Add constraint alternatives for not in place
9641 (zero_extendhisi2): Remove.
9642 (shift patterns): Add CC handling variants.
9646 (define_peephole2): New peephole to recognize mov that sets CC for
9649 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9651 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
9652 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
9655 2018-07-09 Jakub Jelinek <jakub@redhat.com>
9658 * real.c (real_nextafter): Return true if result is denormal.
9660 2018-07-09 Martin Liska <mliska@suse.cz>
9662 * common.opt: Add back wrongly removed attribute.
9664 2018-07-09 Richard Biener <rguenther@suse.de>
9667 * dwarf2out.c (gen_block_die): For an early generated DIE
9668 always output high/low PC attributes.
9670 2018-07-09 Tom de Vries <tdevries@suse.de>
9672 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
9673 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
9674 onto VAR_DECL with abstract origin.
9676 2018-07-07 Jim Wilson <jimw@sifive.com>
9678 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
9680 2018-07-07 Tom de Vries <tdevries@suse.de>
9682 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
9684 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
9686 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
9688 (combine_bound): Use wide-int overflow calculation instead of
9690 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
9692 * fold-const.c (int_const_binop_2): Same.
9693 (extract_muldiv_1): Same.
9694 (fold_div_compare): Same.
9695 (fold_abs_const): Same.
9697 * poly-int.h (add): Same.
9701 * predict.c (predict_iv_comparison): Same.
9702 * profile-count.c (slow_safe_scale_64bit): Same.
9703 * simplify-rtx.c (simplify_const_binary_operation): Same.
9704 * tree-chrec.c (tree_fold_binomial): Same.
9705 * tree-data-ref.c (split_constant_offset_1): Same.
9706 * tree-if-conv.c (idx_within_array_bound): Same.
9707 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
9708 * tree-ssa-phiopt.c (minmax_replacement): Same.
9709 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
9710 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
9711 * vr-values.c (vr_values::adjust_range_with_scev): Same.
9712 * wide-int.cc (wi::add_large): Same.
9713 (wi::mul_internal): Same.
9714 (wi::sub_large): Same.
9715 (wi::divmod_internal): Same.
9716 * wide-int.h: Change overflow type to overflow_type for neg, add,
9717 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
9718 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
9719 mul_internal, divmod_internal.
9720 (overflow_type): New enum.
9721 (accumulate_overflow): New.
9723 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
9725 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
9726 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9728 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
9730 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9731 argument is checked for zero before entering loop, avoid checking again.
9733 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
9735 * gimplify.h (generic_expr_could_trap_p): Set as global function.
9736 * gimplify.h (generic_expr_could_trap_p): Likwise.
9737 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9739 2018-07-06 Jakub Jelinek <jakub@redhat.com>
9741 PR tree-optimization/86401
9742 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9743 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9744 (fold_bit_and_mask): ... here. New helper function for match.pd.
9745 * fold-const.h (fold_bit_and_mask): Declare.
9746 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9748 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
9751 * target.def (translate_mode_attribute): New hook.
9752 * targhooks.h (default_translate_mode_attribute): Declare.
9753 * targhooks.c (default_translate_mode_attribute): New function.
9754 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9755 * doc/tm.texi: Regenerate.
9756 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9757 (rs6000_translate_mode_attribute): New function.
9759 2018-07-06 Paul Koning <ni1d@arrl.net>
9761 * doc/md.texi (define_split): Document DONE and FAIL.
9762 (define_peephole2): Ditto.
9764 2018-07-05 Jeff Law <law@redhat.com>
9766 PR tree-optimization/86010
9767 * tree-ssa-dse.c (compute_trims): More aggressively trim at
9768 both the head and tail of mem* and str* calls.
9770 2018-07-05 Jim Wilson <jimw@sifive.com>
9772 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9774 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
9776 * config/aarch64/aarch64-simd.md: correct flags text for
9777 MIN_EXPR replacement.
9779 2018-07-05 James Clarke <jrtc27@jrtc27.com>
9781 * configure: Regenerated.
9783 2018-07-05 Carl Love <cel@us.ibm.com>
9785 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9786 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9787 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9788 VSX_BUILTIN_DOUBLEL_V4SF.
9790 2018-07-05 Martin Sebor <msebor@redhat.com>
9793 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9794 than its domain to compute its the upper bound of a char array.
9796 2018-07-05 Nathan Sidwell <nathan@acm.org>
9798 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9799 * doc/cpp.texi: Update comment.
9800 * doc/tm.texi: Rebuilt.
9801 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9802 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9803 * doc/extend.texi (Backwards Compatibility): Clarify it is system
9804 headers affected by extern "C".
9805 * system.h: Poison NO_IMPLICIT_EXTERN_C.
9806 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9807 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9808 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9809 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9810 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9811 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9812 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9813 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9814 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9815 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9816 config/sparc/sp64-elf.h, config/spu/spu.h,
9817 config/stormy16/stormy16.h, config/v850/v850.h,
9818 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9819 define NO_IMPLICIT_EXTERN_C.
9820 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9822 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9825 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9826 instead of GET_MODE_SIZE when comparing Units.
9828 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9831 * rtlanal.c (set_noop_p): Constrain on mode change,
9832 include hard-reg-set.h
9834 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9836 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9838 2018-07-05 Jakub Jelinek <jakub@redhat.com>
9841 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9844 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9846 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9848 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9851 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9853 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9855 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
9858 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9860 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
9862 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9863 neg_*_op* variables.
9865 2018-07-04 Martin Liska <mliska@suse.cz>
9867 * tree-switch-conversion.c: Define
9868 max_ratio_for_speed and max_ratio_for_size constants.
9870 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9871 Martin Liska <mliska@suse.cz>
9876 * common.opt: Rename align options with 'str_' prefix.
9877 * common/config/i386/i386-common.c (set_malign_value): New
9879 (ix86_handle_option): Use it to set -falign-* options/
9880 * config/aarch64/aarch64-protos.h (struct tune_params): Change
9881 type from int to string.
9882 * config/aarch64/aarch64.c: Update default values from int
9884 * config/alpha/alpha.c (alpha_override_options_after_change):
9886 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9887 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9888 max skip conditionally.
9889 * config/i386/freebsd.h (SUBALIGN_LOG): New.
9890 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9891 max skip conditionally.
9892 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9893 max skip conditionally.
9894 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9895 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9896 max skip conditionally.
9897 * config/i386/i386.c (struct ptt): Change type from int to
9899 (ix86_default_align): Set default values.
9900 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9901 max skip conditionally.
9902 * config/i386/iamcu.h (SUBALIGN_LOG): New.
9903 (ASM_OUTPUT_MAX_SKIP_ALIGN):
9904 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9905 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9906 max skip conditionally.
9907 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9908 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9909 * config/i386/x86-64.h (SUBALIGN_LOG): New.
9910 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9911 max skip conditionally.
9912 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9913 * config/ia64/ia64.c (ia64_option_override): Set default values
9914 for alignment options.
9915 * config/m68k/m68k.c: Handle new str_align_* options.
9916 * config/mips/mips.c (mips_set_compression_mode): Change
9918 (mips_option_override): Set default values for options.
9919 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9921 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9923 * config/rx/rx.c (rx_option_override): Likewise.
9924 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9925 (LABEL_ALIGN): Use align_labels_log.
9926 (LOOP_ALIGN): Use align_loops_align.
9927 * config/s390/s390.c (s390_asm_output_function_label): Use new
9929 * config/sh/sh.c (sh_override_options_after_change):
9930 Change type of constants.
9931 * config/spu/spu.c (spu_sched_init): Likewise.
9932 * config/sparc/sparc.c (sparc_option_override): Set default
9934 * config/visium/visium.c (visium_option_override): Likewise.
9935 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9936 emit p2align format with last argument if it's not needed.
9937 * doc/invoke.texi: Document extended format of -falign-*.
9938 * final.c: Use align_labels alignment.
9939 * flags.h (struct target_flag_state): Change type to use
9941 (struct align_flags_tuple): New.
9942 (struct align_flags): Likewise.
9943 (align_loops_log): Redefine macro to use new types.
9944 (align_loops_max_skip): Redefine macro to use new types.
9945 (align_jumps_log): Redefine macro to use new types.
9946 (align_jumps_max_skip): Redefine macro to use new types.
9947 (align_labels_log): Redefine macro to use new types.
9948 (align_labels_max_skip): Redefine macro to use new types.
9949 (align_functions_log): Redefine macro to use new types.
9950 (align_loops): Redefine macro to use new types.
9951 (align_jumps): Redefine macro to use new types.
9952 (align_labels): Redefine macro to use new types.
9953 (align_functions): Redefine macro to use new types.
9954 (align_functions_max_skip): Redefine macro to use new types.
9955 (align_loops_value): New macro.
9956 (align_jumps_value): New macro.
9957 (align_labels_value): New macro.
9958 (align_functions_value): New macro.
9959 * function.c (invoke_set_current_function_hook): Propagate
9960 alignment values from flags to global variables default in
9962 * ipa-icf.c (sem_function::equals_wpa): Use
9963 cl_optimization_option_eq instead of memcmp.
9964 * lto-streamer.h (cl_optimization_stream_out): Support streaming
9966 (cl_optimization_stream_in): Likewise.
9967 * optc-save-gen.awk: Support strings in cl_optimization.
9968 * opth-gen.awk: Likewise.
9969 * opts.c (finish_options): Remove error checking of invalid
9971 (MAX_CODE_ALIGN): Remove.
9972 (MAX_CODE_ALIGN_VALUE): Likewise.
9973 (parse_and_check_align_values): New function.
9974 (check_alignment_argument): Likewise.
9975 (common_handle_option): Use check_alignment_argument.
9976 * opts.h (parse_and_check_align_values): Declare.
9977 * toplev.c (init_alignments): Remove.
9978 (read_log_maxskip): New.
9979 (parse_N_M): Likewise.
9980 (parse_alignment_opts): Likewise.
9981 (backend_init_target): Remove usage of init_alignments.
9982 * toplev.h (parse_alignment_opts): Declare.
9983 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9985 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9986 * tree.c (cl_option_hasher::equal): New.
9987 * varasm.c: Use new global macros.
9989 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9991 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9992 Use a simpler align directive also if MAXSKIP = ALIGN-1.
9993 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9994 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9995 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9996 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9997 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9998 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9999 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10000 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10001 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10002 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10003 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10005 2018-07-04 Martin Liska <mliska@suse.cz>
10006 Jonathan Wakely <jwakely@redhat.com>
10008 * coverage.c: Use correct type.
10009 * doc/invoke.texi: Language correction.
10011 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
10014 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10015 ENDBRANCH for non-tail call which may return via indirect branch.
10016 * doc/extend.texi: Document indirect_return attribute.
10018 2018-07-03 Martin Sebor <msebor@redhat.com>
10020 PR tree-optimization/86274
10021 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10023 (format_floating): Correct handling of infinities and NaNs.
10025 2018-07-03 Martin Sebor <msebor@redhat.com>
10027 * print-tree.c (print_real_cst): New function.
10028 (print_node_brief): Call it.
10029 (print_node): Ditto.
10031 2018-07-03 Jeff Law <law@redhat.com>
10033 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10034 into a single pattern.
10036 * config/h8300/h8300.md (ors code_iterator): New.
10037 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10038 a single pattern and single splitter.
10039 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10040 (iorqi3_1, xorqi3_1): Likewise.
10041 (iorqi3, xorqi3 expanders): Similarly.
10043 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10044 (movmd_internal) into a single pattern using the P mode iterator.
10045 (movmd splitters): Similarly.
10046 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10047 (movsd splitters): Similarly.
10049 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10050 ADDB, ADDW and ADDL into a single ADD attribute which selects the
10051 right table based on the size of the operand.
10052 * config/h8300/h8300.md (length_table): Corresponding changes. All
10053 references to "addb", "addw" and "addl" changed to "add".
10054 (btst patterns): Merge two variants into a single pattern.
10055 (tstqi, tsthi): Likewise.
10056 (addhi3_incdec, addsi3_incdec): Likewise.
10057 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10058 (mulhi3, mulsi3): Likewise.
10059 (udivhi3, udivsi3): Likewise.
10060 (divhi3, divsi3): Likewise.
10061 (andorqi3, andorhi3, andorsi3): Likewise.
10063 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
10066 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10067 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10069 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10071 PR tree-optimization/85694
10072 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10073 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10075 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10076 (<u>avg<mode>3_ceil): New patterns.
10078 2018-07-03 David Malcolm <dmalcolm@redhat.com>
10080 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10081 scan-tree-dump directive.
10082 * gcc.dg/vect/slp-perm-2.c: Likewise.
10083 * gcc.dg/vect/slp-perm-3.c: Likewise.
10084 * gcc.dg/vect/slp-perm-5.c: Likewise.
10085 * gcc.dg/vect/slp-perm-6.c: Likewise.
10086 * gcc.dg/vect/slp-perm-7.c: Likewise.
10087 * gcc.dg/vect/slp-perm-8.c: Likewise.
10089 2018-07-03 Marek Polacek <polacek@redhat.com>
10091 PR middle-end/86202
10092 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10094 2018-07-03 Richard Biener <rguenther@suse.de>
10097 * tree-ssa-structalias.c (find_func_clobbers): Properly
10098 handle indirect calls.
10100 2018-07-03 Jeff Law <law@redhat.com>
10102 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10103 (shifts): New code iterator.
10104 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10105 expander. Fix HImode handling on H8/SX.
10106 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10107 (subqi3, subhi3, subsi3 expanders): Likewise.
10108 (andqi3, andhi3, andsi3 expanders): Likewise.
10109 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10110 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10111 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10112 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10113 (zero_extendqihi2, zero_extendqisi2): Likewise.
10114 (extendqihi2, extendqisi2): Likewise.
10115 (rotlqi3, rotlhi3, rotlsi3): Likewise.
10116 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10117 (rotlqi3_1, rotlhi3_1): Likewise.
10118 (logicalhi3_sn, logicalsi3_sn): Likewise.
10119 (logicalhi3, logicalsi3): Likewise.
10121 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10123 * tree-vect-patterns.c (vect_recog_rotate_pattern)
10124 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10125 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10126 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10127 type to append_pattern_def_seq instead of creating a stmt_vec_info
10129 (build_mask_conversion): Likewise. Remove vinfo argument.
10130 (vect_add_conversion_to_patterm): Likewise, renaming to...
10131 (vect_add_conversion_to_pattern): ...this.
10132 (vect_recog_mask_conversion_pattern): Update call to
10133 build_mask_conversion. Pass the vector type to
10134 append_pattern_def_seq here too.
10135 (vect_recog_gather_scatter_pattern): Update call to
10136 vect_add_conversion_to_pattern.
10138 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10140 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10141 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10142 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10143 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10144 STMT_VINFO_PATTERN_DEF_SEQ to null here.
10145 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10146 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10147 append_pattern_def_seq instead of new_pattern_def_seq.
10148 (vect_recog_divmod_pattern): Do both of the above.
10149 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10152 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10154 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10155 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10156 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10157 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10158 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10159 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10160 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10161 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10162 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10163 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10164 parameter with a single stmt_vec_info.
10165 (vect_recog_func_ptr): Likewise.
10166 (vect_recog_gather_scatter_pattern): Likewise, folding in...
10167 (vect_try_gather_scatter_pattern): ...this.
10168 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10169 the stmt_vec_info of the statement to be matched. Don't clear
10170 STMT_VINFO_RELATED_STMT.
10171 (vect_pattern_recog): Update call accordingly.
10173 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10175 PR tree-optimization/85694
10176 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10177 (uavgM3_ceil): Document new optabs.
10178 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10179 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10181 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10182 (savg_ceil_optab): New optabs.
10183 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10184 (vect_vect_recog_func_ptrs): Add it.
10185 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10186 constant directly from the associated lhs.
10188 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10190 * tree-vect-patterns.c (vect_split_statement): New function.
10191 (vect_convert_input): Use it to try to split an existing cast.
10193 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10195 * poly-int.h (print_hex): New function.
10196 * dumpfile.h (dump_dec, dump_hex): Declare.
10197 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10198 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10199 min_input_precision, operation_precision and operation_sign.
10200 * tree-vect-patterns.c (vect_get_range_info): New function.
10201 (vect_same_loop_or_bb_p, vect_single_imm_use)
10202 (vect_operation_fits_smaller_type): Delete.
10203 (vect_look_through_possible_promotion): Add an optional
10204 single_use_p parameter.
10205 (vect_recog_over_widening_pattern): Rewrite to use new
10206 stmt_vec_info infomration. Handle one operation at a time.
10207 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10208 (vect_truncatable_operation_p, vect_set_operation_type)
10209 (vect_set_min_input_precision): New functions.
10210 (vect_determine_min_output_precision_1): Likewise.
10211 (vect_determine_min_output_precision): Likewise.
10212 (vect_determine_precisions_from_range): Likewise.
10213 (vect_determine_precisions_from_users): Likewise.
10214 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10215 (vect_vect_recog_func_ptrs): Put over_widening first.
10217 (vect_pattern_recog): Call vect_determine_precisions.
10219 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10221 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10222 statements that have been replaced by further pattern statements.
10223 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10225 2018-07-03 Richard Biener <rguenther@suse.de>
10227 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10228 always set *dt. Dump vectype in vectype overload.
10229 * dumpfile.h (dump_gimple_expr): New function.
10230 (dump_gimple_expr_loc): Likewise.
10231 * dumpfile.c (dump_gimple_expr): New function.
10232 (dump_gimple_expr_loc): Likewise.
10234 2018-07-02 Jeff Law <law@redhat.com>
10236 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10237 the H8/300, H8/300H and H8/S variants into a single pattern.
10238 (movhi_h8300, movqi_h8300hs): Similarly.
10239 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10240 (QHI mode iterator): New.
10242 * config/h8300/h8300.md: Remove trailing whitespace.
10244 2018-07-02 Jim Wilson <jimw@sifive.com>
10246 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10247 instead of emit_insn for interrupt returns.
10248 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10249 (riscv_sret, riscv_uret): Likewise.
10251 2018-07-02 David Malcolm <dmalcolm@redhat.com>
10253 * pretty-print.c (selftest::test_pp_format): Move save and restore
10254 of quotes to class auto_fix_quotes, and add an instance.
10255 * selftest.c: Include "intl.h".
10256 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10257 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10258 * selftest.h (selftest::auto_fix_quotes): New class.
10260 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
10262 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10263 (aarch64_sve_prepare_conditional_op): Remove.
10264 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10265 Allow aarch64_simd_reg_or_zero as select operand; remove
10266 the aarch64_sve_prepare_conditional_op call.
10267 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10268 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10269 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10270 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10271 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10272 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10273 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10274 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10275 and a splitters to match all of the *_any patterns.
10276 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10278 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10279 (SVE_COND_FP_BINARY_REV): Remove.
10280 (sve_int_op_rev, sve_fp_op_rev): New.
10281 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10282 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10283 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10284 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
10285 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
10286 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
10287 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
10288 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
10289 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
10291 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
10292 Remove match_dup 1 from the inner unspec.
10293 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10295 * config/aarch64/aarch64.md (movprfx): New attr.
10296 (length): Default movprfx to 8.
10297 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
10298 (*madd<SVE_I>, *msub<SVE_I): Likewise.
10299 (*<su>mul<SVE_I>3_highpart): Likewise.
10300 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
10301 (*v<ASHIFT><SVE_I>3): Likewise.
10302 (*<su><MAXMIN><SVE_I>3): Likewise.
10303 (*<su><MAXMIN><SVE_F>3): Likewise.
10304 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
10305 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
10306 (*div<SVE_F>4): Likewise.
10308 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
10310 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
10313 2018-07-02 Richard Biener <rguenther@suse.de>
10315 PR tree-optimization/86363
10316 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
10317 memset argument refers to a non-variable address.
10319 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
10321 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
10322 {PLUS,MINUS}_EXPR code to...
10323 (adjust_symbolic_bound): ...here,
10324 (combine_bound): ...here,
10325 (set_value_range_with_overflow): ...and here.
10327 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
10329 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
10331 (extract_range_from_abs_expr): ...here.
10333 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
10335 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
10336 -fno-omit-frame-pointer when not optimizing.
10338 2018-07-02 Martin Liska <mliska@suse.cz>
10341 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
10342 (propagate_nothrow): Likewise.
10344 2018-07-02 Martin Liska <mliska@suse.cz>
10347 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
10349 2018-07-02 David Malcolm <dmalcolm@redhat.com>
10351 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
10352 function in r262149, changing "loc" param from source_location to
10353 const dump_location_t &.
10354 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
10355 declaration, as above.
10357 2018-07-01 Paul Koning <ni1d@arrl.net>
10359 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10360 -munit-asm, -mgnu-asm, -mdec-asm.
10361 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
10362 (pdp11_output_labelref): New.
10363 (pdp11_output_def): New.
10364 (pdp11_output_addr_vec_elt): New.
10365 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
10366 %# and %@ format codes.
10367 (pdp11_option_override): New.
10368 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
10369 (pdp11_output_ident): New.
10370 (pdp11_asm_named_section): New.
10371 (pdp11_asm_init_sections): New.
10372 (pdp11_file_start): New.
10373 (pdp11_file_end): New.
10374 (output_ascii): Use .ascii/.asciz for -mdec-asm.
10375 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
10376 %o, like %c but octal.
10377 (pdp11_option_override): New.
10378 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
10380 (DATA_SECTION_ASM_OP): Ditto.
10381 (READONLY_DATA_SECTION_ASM_OP): New.
10382 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
10383 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
10384 (ASM_OUTPUT_LABELREF): Ditto.
10385 (ASM_OUTPUT_DEF): Ditto.
10386 (ASM_OUTPUT_EXTERNAL): New.
10387 (ASM_OUTPUT_SOURCE_FILENAME): New.
10388 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
10389 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
10390 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
10391 %# and %@ format codes.
10392 * config/pdp11/pdp11.opt (mgnu-asm): New.
10393 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
10394 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
10395 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
10397 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
10399 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
10400 dereferencing path[] beyond its length.
10402 (debug_all_paths): New.
10403 (rewire_first_differing_edge): New.
10404 (adjust_paths_after_duplication): New.
10405 (duplicate_thread_path): Call adjust_paths_after_duplication.
10407 (thread_through_all_blocks): Add new argument to
10408 duplicate_thread_path.
10410 2018-06-30 Jim Wilson <jimw@sifive.com>
10412 * config/riscv/predicates.md (p2m1_shift_operand): New.
10413 (high_mask_shift_operand): New.
10414 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
10415 pattern using p2m1_shift_operand.
10416 (lshsi3_zero_extend_3+2): New combiner pattern using
10417 high_mask_shift_operand.
10419 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
10421 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
10423 (vect_recog_rotate_pattern): ...here.
10424 (vect_convert_input): Try to insert casts of invariants in the
10426 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
10427 preheader to be empty.
10429 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
10431 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
10432 vector type. If given, install it in the new statement's
10433 STMT_VINFO_VECTYPE.
10434 (vect_element_precision): New function.
10435 (vect_unpromoted_value): New struct.
10436 (vect_unpromoted_value::vect_unpromoted_value): New function.
10437 (vect_unpromoted_value::set_op): Likewise.
10438 (vect_look_through_possible_promotion): Likewise.
10439 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
10440 (vect_widened_op_tree, vect_convert_input): Likewise.
10441 (vect_convert_inputs, vect_convert_output): Likewise.
10442 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
10443 to handle the optional cast of the multiplication result and
10444 vect_widened_op_tree to detect the widened multiplication itself.
10445 Do not require the input and output of promotion casts to have
10446 the same sign, but base the signedness of the operation on the
10447 input rather than the result. If the pattern includes two
10448 promotions, check that those promotions have the same sign.
10449 Do not restrict the MULT_EXPR handling to a double-width result;
10450 handle quadruple-width results and wider. Use vect_convert_inputs
10451 to convert the inputs to the common type.
10452 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
10453 to handle the optional cast of the ABS result. Also allow a sign
10454 change or a sign extension between the ABS and MINUS.
10455 Use vect_widened_op_tree to detect the widened subtraction and use
10456 vect_convert_inputs to convert the inputs to the common type.
10457 (vect_handle_widen_op_by_const): Delete.
10458 (vect_recog_widen_op_pattern): New function.
10459 (vect_recog_widen_mult_pattern): Use it.
10460 (vect_recog_widen_shift_pattern): Likewise.
10461 (vect_recog_widen_sum_pattern): Use
10462 vect_look_through_possible_promotion to handle the promoted
10465 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
10467 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
10468 the containing gimple_seq *.
10469 * gimple-iterator.h (gsi_for_stmt): Declare it.
10470 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
10471 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
10472 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10473 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10474 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
10476 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
10478 (vect_mark_pattern_stmts): ...here. Handle cases in which the
10479 statement being replaced is part of an existing pattern
10480 definition sequence, inserting the new pattern statements before
10482 (vect_pattern_recog_1): Don't return a bool. If the statement
10483 is already part of a pattern, instead apply pattern matching
10484 to the pattern definition statements. Don't clear the
10485 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
10486 (vect_pattern_recog): Don't break after the first match;
10487 continue processing the pattern definition statements instead.
10488 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
10490 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
10492 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10493 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10494 (vect_recog_widen_sum_pattern): Use it.
10496 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
10498 * tree-vect-loop.c (vectorizable_reduction): Assert that the
10499 phi is not a pattern statement and has not been replaced by
10500 a pattern statement.
10501 * tree-vect-patterns.c (type_conversion_p): Don't check
10502 STMT_VINFO_IN_PATTERN_P.
10503 (vect_recog_vector_vector_shift_pattern): Likewise.
10504 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
10505 the pattern statement rather than the original statement; check
10506 directly for a WIDEN_MULT_EXPR here.
10507 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
10508 vect_is_simple_use to return the pattern statement rather
10509 than the original statement; use is_pattern_stmt_p to check
10510 for such a pattern statement.
10511 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
10512 to return the pattern statement rather than the original statement;
10513 don't do the same transformation here.
10514 (vect_is_simple_use): If the defining statement has been replaced
10515 by a pattern statement, return the pattern statement instead.
10516 Remove the corresponding (local) transformation from the vectype
10519 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
10521 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
10522 end and default to null.
10523 * tree-vect-loop.c (vect_create_epilog_for_reduction)
10524 (vectorizable_reduction): Update calls accordingly, dropping the
10525 gimple ** argument if the passed-back statement isn't needed.
10526 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
10527 (vect_recog_rotate_pattern): Likewise.
10528 (vect_recog_mask_conversion_pattern): Likewise.
10529 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10530 (vect_mask_constant_operand_p): Likewise.
10531 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
10532 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
10533 (get_group_load_store_type, get_load_store_type): Likewise.
10534 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
10535 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
10536 (vectorizable_conversion, vectorizable_assignment): Likewise.
10537 (vectorizable_shift, vectorizable_operation): Likewise.
10538 (vectorizable_store, vect_is_simple_cond): Likewise.
10539 (vectorizable_condition, vectorizable_comparison): Likewise.
10540 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
10541 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
10542 and move it to the end. Cope with null def_stmt_outs.
10544 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10546 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
10548 2018-06-29 Jeff Law <law@redhat.com>
10550 * config/v850/v850.c (v850_legitimate_address_p): Handle large
10551 displacements for TARGET_V850E2V3 and newer.
10552 (TARGET_LRA_P): Remove. Defaults to LRA now.
10553 * config/v850/v850.md (sign23byte_load): Remove.
10554 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
10555 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
10557 2018-06-29 Martin Liska <mliska@suse.cz>
10560 * coverage.c (coverage_init): Mangle full path name.
10561 * doc/invoke.texi: Document the change.
10562 * gcov-io.c (mangle_path): New.
10563 * gcov-io.h (mangle_path): Likewise.
10564 * gcov.c (mangle_name): Use mangle_path for path mangling.
10566 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10568 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
10569 if starting source register is not even.
10571 2018-06-29 Martin Liska <mliska@suse.cz>
10573 PR tree-optimization/86263
10574 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
10575 Make edge redirection.
10577 2018-06-29 David Malcolm <dmalcolm@redhat.com>
10579 * dumpfile.c (dump_loc): Add indentation based on scope depth.
10580 (dump_scope_depth): New variable.
10581 (get_dump_scope_depth): New function.
10582 (dump_begin_scope): New function.
10583 (dump_end_scope): New function.
10584 * dumpfile.h (get_dump_scope_depth): New declaration.
10585 (dump_begin_scope): New declaration.
10586 (dump_end_scope): New declaration.
10587 (class auto_dump_scope): New class.
10588 (AUTO_DUMP_SCOPE): New macro.
10589 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
10592 2018-06-29 Richard Biener <rguenther@suse.de>
10594 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
10595 compute_all_dependences succeeds.
10596 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
10597 exceed --param loop-max-datarefs-for-datadeps.
10599 2018-06-29 Jakub Jelinek <jakub@redhat.com>
10601 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
10603 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
10606 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
10607 alternative 0 in preferred_for_speed attribute.
10609 2018-06-28 Paul Koning <ni1d@arrl.net>
10611 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
10612 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
10613 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
10614 * config/pdp11/pdp11.md: Correct "length" attribute calculation
10615 for shift insn patterns.
10617 2018-06-28 David Malcolm <dmalcolm@redhat.com>
10619 * cgraph.c (cgraph_node::get_body): Replace assignments to
10620 "dump_file" with calls to set_dump_file.
10621 * dumpfile.c (alt_dump_file): Make static, and group with...
10622 (alt_flags): ...this definition.
10623 (dumps_are_enabled): New variable.
10624 (refresh_dumps_are_enabled): New function.
10625 (set_dump_file): New function.
10626 (set_alt_dump_file): New function.
10627 (gcc::dump_manager::dump_start): Replace assignments to
10628 "dump_file" and "alt_dump_file" with calls to set_dump_file and
10630 (gcc::dump_manager::dump_finish): Likewise.
10631 * dumpfile.h (alt_dump_file): Delete decl.
10632 (dumps_are_enabled): New variable decl.
10633 (set_dump_file): New function decl.
10634 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
10636 * tree-nested.c (lower_nested_functions): Replace assignments to
10637 "dump_file" with calls to set_dump_file.
10639 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
10641 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
10642 goto_locus of each outgoing edge of each basic block.
10644 2018-06-28 Richard Biener <rguenther@suse.de>
10646 * dwarf2out.c (decl_scope_table): Remove.
10647 (push_decl_scope): Likewise.
10648 (pop_decl_scope): Likewise.
10649 (gen_type_die_for_member): Do not call push/pop_decl_scope.
10650 (gen_struct_or_union_type_die): Likewise.
10651 (gen_tagged_type_die): Likewise.
10652 (dwarf2out_init): Do not initialize decl_scope_table.
10653 (dwarf2out_c_finalize): Do not free it.
10655 2018-06-28 Richard Biener <rguenther@suse.de>
10657 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
10658 deciding whether to not re-use a DIE.
10660 2018-06-28 Richard Biener <rguenther@suse.de>
10662 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
10663 DW_AT_abstract_origin attribute.
10665 2018-06-28 Martin Liska <mliska@suse.cz>
10667 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10668 Use newly introduced constants.
10669 * tree-switch-conversion.h (struct jump_table_cluster):
10670 Define max_ratio_for_size and max_ratio_for_speed.
10672 2018-06-28 Martin Liska <mliska@suse.cz>
10674 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10675 Add new checking assert to catch invalid state.
10676 (jump_table_cluster::can_be_handled): Handle single case
10678 (jump_table_cluster::is_beneficial): Bail out for such case.
10679 (bit_test_cluster::find_bit_tests):
10680 Add new checking assert to catch invalid state.
10681 (bit_test_cluster::can_be_handled): Handle single case
10683 (bit_test_cluster::is_beneficial): Bail out for such case.
10684 (switch_decision_tree::analyze_switch_statement):
10687 2018-06-28 Martin Liska <mliska@suse.cz>
10689 * common.opt: Introduce -completion option.
10690 * gcc.c (driver_handle_option): Handle it.
10691 (driver::main): Print completions if completion
10693 * opt-suggestions.c (option_proposer::get_completions):
10695 (option_proposer::suggest_completion): Likewise.
10696 (option_proposer::find_param_completions): Likewise.
10697 (verify_autocompletions): Likewise.
10698 (test_completion_valid_options): Likewise.
10699 (test_completion_valid_params): Likewise.
10700 (in_completion_p): Likewise.
10701 (empty_completion_p): Likewise.
10702 (test_completion_partial_match): Likewise.
10703 (test_completion_garbage): Likewise.
10704 (opt_proposer_c_tests): Likewise.
10705 * opt-suggestions.h: Declare new functions.
10706 * opts.c (common_handle_option): Handle OPT__completion_.
10707 * selftest-run-tests.c (selftest::run_tests): Add
10708 opt_proposer_c_tests.
10709 * selftest.c (assert_str_startswith): New.
10710 * selftest.h (assert_str_startswith): Likewise.
10711 (opt_proposer_c_tests): New.
10712 (ASSERT_STR_STARTSWITH): Likewise.
10714 2018-06-28 Martin Liska <mliska@suse.cz>
10716 * Makefile.in: Add opt-suggestions.o.
10717 * gcc-main.c: Include opt-suggestions.h.
10718 * gcc.c (driver::driver): Likewise.
10719 (driver::~driver): Remove m_option_suggestions.
10720 (driver::build_option_suggestions): Moved to option_proposer.
10721 (driver::suggest_option): Likewise.
10722 (driver::handle_unrecognized_options): Use option_proposer.
10723 * gcc.h (class driver): Add new memver m_option_proposer.
10724 * opt-suggestions.c: New file.
10725 * opt-suggestions.h: New file.
10727 2018-06-28 Martin Liska <mliska@suse.cz>
10729 * vec.h (class auto_string_vec): New (moved from auto_argvec).
10730 (auto_string_vec::~auto_string_vec): Likewise.
10732 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
10734 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10735 prevent_decl_creation_for_types fields up and add reset_location field.
10736 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10737 statement if id->reset_location is true.
10738 (copy_edges_for_bb): Do not set goto_locus on the new edges if
10739 id->reset_location is true.
10740 (copy_phis_for_bb): Force input_location on the arguments if
10741 id->reset_location is true.
10742 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10743 is set on the function to be inlined.
10745 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
10747 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10749 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
10751 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10752 registers for Pmode.
10753 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10754 hard registers for the clobbered pseudo.
10756 2018-06-27 Paul Koning <ni1d@arrl.net>
10758 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10759 mutually exclusive options.
10760 * config/pdp11/constraints.md (h): New constraint.
10761 (O): Update definition to match shift code generation.
10762 (D): New constraint.
10763 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10765 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10767 (output_jump): Change arguments.
10768 (pdp11_fixed_cc_regs): New function.
10769 (pdp11_cc_mode): Ditto.
10770 (pdp11_expand_shift): Ditto.
10771 (pdp11_assemble_shift): Ditto.
10772 (pdp11_small_shift): Ditto.
10773 (pdp11_branch_cost): Remove.
10774 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10776 (pdp11_register_move_cost): Update for CC registers.
10777 (pdp11_rtx_costs): Add case for LSHIFTRT.
10778 (pdp11_output_jump): Add CCNZ mode conditional branches.
10779 (notice_update_cc_on_set): Remove.
10780 (pdp11_cc_mode): New function.
10781 (simple_memory_operand): Correct pre/post decrement case.
10782 (no_side_effect_operand): New function.
10783 (pdp11_regno_reg_class): Add CC_REGS class.
10784 (pdp11_fixed_cc_regs): New function.
10785 (pdp11_small_shift): New function.
10786 (pdp11_expand_shift): New function to expand shift insns.
10787 (pdp11_assemble_shift): New function to output shifts.
10788 (pdp11_branch_cost): Remove.
10789 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10790 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10791 (WCHAR_TYPE): Ditto.
10792 (PTRDIFF_TYPE): Ditto.
10793 (ADJUST_INSN_LENGTH): New macro.
10794 (FIXED_REGISTERS): Add CC registers.
10795 (CALL_USED_REGISTERS): Ditto.
10796 (reg_class): Ditto.
10797 (REG_CLASS_NAMES): Ditto.
10798 (REG_CLASS_CONTENTS): Ditto.
10799 (SELECT_CC_MODE): Use new function.
10800 (TARGET_FLAGS_REGNUM): New macro.
10801 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10802 (cc0_reg_rtx): Remove.
10803 (CC_STATUS_MDEP): Remove.
10804 (CC_STATUS_MDEFP_INIT): Remove.
10805 (CC_IN_FPU): Remove.
10806 (NOTICE_UPDATE_CC): Remove.
10807 (REGISTER_NAMES): Add CC registers.
10808 (BRANCH_COST): Change to constant 1.
10809 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10811 * config/pdp11/pdp11.opt (mbcopy): Remove.
10812 (mbcopy-builtin): Remove.
10813 (mbranch-cheap): Remove.
10814 (mbranch-expensive): Remove.
10815 * config/pdp11/predicates.md (expand_shift_operand): Update to
10816 match shift code generation.
10817 (ccnz_operator): New predicate.
10818 * doc/invoke.texi (PDP-11 Options): Remove deleted options
10819 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10820 Remove non-existent option -mabshi, -mno-abshi. Document mutually
10822 * doc/md.texi (PDP-11): Document new D and h constraints. Update
10823 description of O constraint.
10825 2018-06-27 Jeff Law <law@redhat.com>
10826 Austin Law <austinklaw@gmail.com>
10828 * config/v850/v850.md (addsi3_set_flags): New pattern.
10829 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10830 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10831 (zero_extendhisi2_v850_set_flags): Likewise.
10832 (zero_extendqisi2_v850_set_flags): Likewise.
10833 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10834 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10835 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10837 * config/v850/v850-protos.h (notice_update_cc): Remove.
10838 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10839 (v850_print_operand): Handle 'D' and "d".
10840 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10841 Add handling of arithmetic/logical operations compared against zero.
10842 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10843 Do not look at v850_compare_op, instead get mode from last argument.
10844 (v850_gen_compare): Remove
10845 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10846 after reload for prologue insns.
10847 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10849 (construct_save_jarl): Likewise.
10850 (TARGET_FLAGS_REGNUM): Define.
10851 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10852 (NOTICE_UPDATE_CC): Remove.
10853 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10854 than cc0. Conditionalize on reload_completed.
10855 (cmpsi_insn, setfcc_insn): Likewise.
10856 (tst1 splitter): Turn into define_and_split which sets the flags
10858 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10859 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10860 (cstoresf4, cstoredf4): Clobber the flags.
10861 (cmpsi, cmpsf, cmpdf): Remove expanders.
10862 (setf_insn): Remove pattern.
10863 (addsi3): Turn into define_and_split which clobbers the flags after
10864 reload and a suitable pattern (addsi3_clobber_flags) for use after
10866 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10867 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10868 (ashrsi3, ashrsi3_v850e2): Likewise.
10869 (bins): Clobber the flags.
10870 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10871 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10872 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10873 (call_value_internal_short, call_value_internal_long): Likewise.
10874 (callt_save_interrupt, callt_return_interrupt): Likewise.
10875 (save_interrupt, return_interrupt): Likewise.
10876 (callt_save_all_interrupt, save_all_interrupt): Likewise.
10877 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10878 (restore_all_interrupt, _restore_all_interrupt): Likewise.
10879 (All FP comparisons): Only allow after reload has completed.
10881 (divh, divhu): Tweak output template.
10882 (branch_z_normal, branch_z_invert): Remove
10883 (branch_nz_normal, branch_nz_invert): Likewise.
10884 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10886 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10887 * config/v850/v850.c (notice_update_cc): Remove.
10888 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
10889 (CC_NO_CARRY): Likewise.
10890 (NOTICE_UPDATE_CC): Define to nothing.
10891 * config/v850/v850.md: Remove block comment on cc0 handling
10892 Remove "cc" attribute from all patterns. Remove cc_status handling
10893 from all patterns. Minor formatting fixes.
10895 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10897 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10898 (cortex-a76.cortex-a55): Likewise.
10899 * config/aarch64/aarch64-tune.md: Regenerate.
10900 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10901 cortex-a76.cortex-a55.
10903 2018-06-27 Jeff Law <law@redhat.com>
10905 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10906 (MULTILIB_DIRNAMES): Similarly.
10908 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
10910 * gimple.h (gimple_return_retbnd): Delete.
10911 (gimple_return_set_retbnd): Likewise.
10912 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10913 gimple_return_set_retbnd.
10914 * gimple-pretty-print.c (dump_gimple_return): Remove call to
10915 gimple_return_retbnd and adjust.
10916 * tree-inline.h (struct copy_body_data): Remove retbnd field.
10917 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10918 Explicitly return NULL in a couple more cases. Move assertion
10919 on debug statements and remove unreachable code.
10920 (reset_debug_binding): Do not test id->retbnd.
10921 (expand_call_inline): Do not set it.
10923 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10925 * configure.ac: Add --disable-gcov option.
10926 * configure: Regenerate.
10927 * Makefile.in: Honour @enable_gcov@.
10928 * doc/install.texi: Document --disable-gcov.
10930 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10932 * config/arm/arm-cpus.in (cortex-a76): New entry.
10933 (cortex-a76.cortex-a55): Likewise.
10934 * config/arm/arm-tables.opt: Regenerate.
10935 * config/arm/arm-tune.md: Likewise.
10936 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10937 * doc/invoke.texi (ARM Options): Document cortex-a76 and
10938 cortex-a76.cortex-a55.
10940 2018-06-27 Tamar Christina <tamar.christina@arm.com>
10943 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10945 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
10947 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10949 (EPILOGUE_USES): Likewise.
10951 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
10953 * tree-inline.c (remap_location): New function extracted from...
10954 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
10955 (copy_phis_for_bb): ...here. Call remap_location.
10956 (copy_cfg_body): Adjust call to copy_edges_for_bb.
10958 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
10960 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10961 unaligned vsx for 16B memset.
10963 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
10966 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10967 ieee128_float_type_node to long_double_type_node unless
10968 TARGET_LONG_DOUBLE_128 is set.
10970 2018-06-26 David Malcolm <dmalcolm@redhat.com>
10972 * cfgloop.c (get_loop_location): Convert return type from
10973 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10974 by implicit construction from rtx_insn *, and using
10975 dump_user_location_t::from_function_decl for the fallback case.
10976 * cfgloop.h (get_loop_location): Convert return type from
10977 location_t to dump_user_location_t.
10978 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10979 dump_printf_loc to pass in a dump_location_t rather than a
10980 location_t, via the gimple stmt.
10981 * coverage.c (get_coverage_counts): Update calls to
10982 dump_printf_loc to pass in dump_location_t rather than a
10984 * doc/optinfo.texi (Dump types): Convert example of
10985 dump_printf_loc from taking "locus" to taking "insn". Update
10986 description of the "_loc" calls to cover dump_location_t.
10987 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10989 (dump_user_location_t::dump_user_location_t): New constructors,
10990 from gimple *stmt and rtx_insn *.
10991 (dump_user_location_t::from_function_decl): New function.
10992 (dump_loc): Make static.
10993 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10994 const dump_location_t &.
10995 (dump_generic_expr_loc): Delete.
10996 (dump_printf_loc): Convert param "loc" from location_t to
10997 const dump_location_t &.
10998 (selftest::test_impl_location): New function.
10999 (selftest::dumpfile_c_tests): New function.
11000 * dumpfile.h: Include "profile-count.h".
11001 (class dump_user_location_t): New class.
11002 (struct dump_impl_location_t): New struct.
11003 (class dump_location_t): New class.
11004 (dump_printf_loc): Convert 2nd param from source_location to
11005 const dump_location_t &.
11006 (dump_generic_expr_loc): Delete.
11007 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11008 const dump_location_t &.
11009 * gimple-fold.c (fold_gimple_assign): Update call to
11010 dump_printf_loc to pass in a dump_location_t rather than a
11011 location_t, via the gimple stmt.
11012 (gimple_fold_call): Likewise.
11013 * gimple-loop-interchange.cc
11014 (loop_cand::analyze_iloop_reduction_var): Update for change to
11015 check_reduction_path.
11016 (tree_loop_interchange::interchange): Update for change to
11017 find_loop_location.
11018 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11019 change in return-type of find_loop_location.
11020 (graphite_regenerate_ast_isl): Likewise.
11021 * graphite-optimize-isl.c (optimize_isl): Likewise.
11022 * graphite.c (graphite_transform_loops): Likewise.
11023 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11024 pass in a dump_location_t rather than a location_t, via the
11026 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11027 * ipa.c (walk_polymorphic_call_targets): Likewise.
11028 * loop-unroll.c (report_unroll): Convert "locus" param from
11029 location_t to dump_location_t.
11030 (decide_unrolling): Update for change to get_loop_location's
11032 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11033 location_t to dump_user_location_t.
11034 (grid_find_single_omp_among_assignments_1): Updates calls to
11035 dump_printf_loc to pass in a dump_location_t rather than a
11036 location_t, via the gimple stmt.
11037 (grid_parallel_clauses_gridifiable): Convert "tloc" from
11038 location_t to dump_location_t. Updates calls to dump_printf_loc
11039 to pass in a dump_location_t rather than a location_t, via the
11041 (grid_inner_loop_gridifiable_p): Likewise.
11042 (grid_dist_follows_simple_pattern): Likewise.
11043 (grid_gfor_follows_tiling_pattern): Likewise.
11044 (grid_target_follows_gridifiable_pattern): Likewise.
11045 (grid_attempt_target_gridification): Convert initialization
11046 of local "grid" from memset to zero-initialization; FIXME: does
11047 this require C++11? Update call to dump_printf_loc to pass in a
11048 optinfo_location rather than a location_t, via the gimple stmt.
11049 * profile.c (read_profile_edge_counts): Updates call to
11050 dump_printf_loc to pass in a dump_location_t rather than a
11052 (compute_branch_probabilities): Likewise.
11053 * selftest-run-tests.c (selftest::run_tests): Call
11055 * selftest.h (dumpfile_c_tests): New decl.
11056 * tree-loop-distribution.c (pass_loop_distribution::execute):
11057 Update for change in return type of find_loop_location.
11058 * tree-parloops.c (parallelize_loops): Likewise.
11059 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11060 "locus" from location_t to dump_user_location_t.
11061 (canonicalize_loop_induction_variables): Likewise.
11062 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11063 for change in return type of find_loop_location.
11064 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11065 to dump_printf_loc to pass in a dump_location_t rather than a
11066 location_t, via the stmt.
11067 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11069 * tree-vect-loop-manip.c (find_loop_location): Convert return
11070 type from source_location to dump_user_location_t.
11071 (vect_do_peeling): Update for above change.
11072 (vect_loop_versioning): Update for change in type of
11074 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11075 from location_t to dump_user_location_t.
11076 (vect_estimate_min_profitable_iters): Update for change in type
11078 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11079 location_t to dump_location_t.
11080 (vect_slp_bb): Update for change in type of vect_location.
11081 * tree-vectorizer.c (vect_location): Convert from source_location
11082 to dump_user_location_t.
11083 (try_vectorize_loop_1): Update for change in vect_location's type.
11084 (vectorize_loops): Likewise.
11085 (increase_alignment): Likewise.
11086 * tree-vectorizer.h (vect_location): Convert from source_location
11087 to dump_user_location_t.
11088 (find_loop_location): Convert return type from source_location to
11089 dump_user_location_t.
11090 (check_reduction_path): Convert 1st param from location_t to
11091 dump_user_location_t.
11092 * value-prof.c (check_counter): Update call to dump_printf_loc to
11093 pass in a dump_user_location_t rather than a location_t; update
11094 call to error_at for change in type of "locus".
11095 (check_ic_target): Update call to dump_printf_loc to
11096 pass in a dump_user_location_t rather than a location_t, via the
11099 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
11101 * config/s390/s390.h (enum processor_flags): Do not use
11102 default tune parameter when -march was specified.
11104 2018-06-26 Jakub Jelinek <jakub@redhat.com>
11107 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11108 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11111 2018-06-26 Richard Biener <rguenther@suse.de>
11113 PR tree-optimization/86287
11115 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11116 (vect_analyze_loop): Initialize n_stmts.
11118 2018-06-26 Richard Biener <rguenther@suse.de>
11120 PR middle-end/86271
11121 * fold-const.c (fold_convertible_p): Pointer extension
11124 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
11127 * dwarf2out.c (loc_list_has_views): Adjust comments.
11128 (dw_loc_list): Split single cross-partition range with
11131 2018-06-25 Jeff Law <law@redhat.com>
11133 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11134 on -mbig-switch by default.
11136 * config/v850/predicates.md (const_float_1_operand): Fix match_code
11138 (const_float_0_operand): Remove unused predicate.
11139 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11140 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11141 (recipsf2): New expander. Original pattern now called
11143 (recipdf2, recipdf2_insn): Similarly.
11144 (rsqrtsf2, rsqrtsf2_insn): Similarly
11145 (rsqrtdf2, rsqrtdf2_insn): Similarly
11147 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
11149 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11150 Simplify logic for FreeBSD (twice).
11152 2018-06-25 Martin Sebor <msebor@redhat.com>
11154 PR tree-optimization/86204
11155 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11156 a strnlen result if it's less than the length of the string.
11158 2018-06-25 Martin Sebor <msebor@redhat.com>
11160 PR tree-optimization/85700
11161 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11162 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11163 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11165 2018-06-25 Martin Sebor <msebor@redhat.com>
11167 * doc/extend.texi (Zero-length arrays): Update and clarify.
11169 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
11171 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11172 added IEEE/IBM long double multilib support on PowerPC little
11173 endian Linux systems.
11174 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11175 (MULTILIB_DEFAULTS): Likewise.
11176 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11178 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11179 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11180 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11182 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
11184 PR middle-end/86311
11185 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11186 (REORDER_45): Likewise.
11188 2018-06-25 Jeff Law <law@redhat.com>
11190 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11191 dividend to 32 bits. Adjust length.
11192 (udivmodhi4): Cleanup output template. Fix length.
11194 2018-06-25 Carl Love <cel@us.ibm.com>
11196 * config/rs6000/vsx.md: Change word selector to prefered location.
11198 2018-06-25 Richard Biener <rguenther@suse.de>
11200 PR tree-optimization/86304
11201 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11202 epilogue-if-converted loops as well.
11204 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
11206 * lto-section-out.c (lto_begin_section): Do not print section
11207 name for noaddr and unnumbered dumps.
11209 2018-06-25 Richard Biener <rguenther@suse.de>
11211 * tree-vectorizer.h (struct vec_info_shared): New structure
11212 with parts split out from struct vec_info and loop_nest from
11213 struct _loop_vec_info.
11214 (struct vec_info): Adjust accordingly.
11215 (struct _loop_vec_info): Likewise.
11216 (LOOP_VINFO_LOOP_NEST): Adjust.
11217 (LOOP_VINFO_DATAREFS): Likewise.
11218 (LOOP_VINFO_DDRS): Likewise.
11219 (struct _bb_vec_info): Likewise.
11220 (BB_VINFO_DATAREFS): Likewise.
11221 (BB_VINFO_DDRS): Likewise.
11222 (struct _stmt_vec_info): Add dr_aux member.
11223 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11224 (DR_MISALIGNMENT_UNINITIALIZED): New.
11225 (set_dr_misalignment): Adjust.
11226 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11227 (vect_analyze_loop): Adjust prototype.
11228 (vect_analyze_loop_form): Likewise.
11229 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11230 Compute dependences lazily.
11231 (vect_record_base_alignments): Use shared datarefs/ddrs.
11232 (vect_verify_datarefs_alignment): Likewise.
11233 (vect_analyze_data_refs_alignment): Likewise.
11234 (vect_analyze_data_ref_accesses): Likewise.
11235 (vect_analyze_data_refs): Likewise.
11236 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11237 constructor parameter for shared part.
11238 (vect_analyze_loop_form): Pass in shared part and adjust.
11239 (vect_analyze_loop_2): Pass in storage for the number of
11240 stmts. Move loop nest finding to the caller. Compute
11242 (vect_analyze_loop): Pass in shared part.
11243 (vect_transform_loop): Verify shared datarefs are unchanged.
11244 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11245 constructor parameter for shared part.
11246 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11247 (vect_slp_bb): Verify shared datarefs are unchanged before
11249 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11251 (new_stmt_vec_info): Initialize DR_AUX misalignment to
11252 DR_MISALIGNMENT_UNINITIALIZED.
11253 * tree-vectorizer.c (vec_info::vec_info): Add constructor
11254 parameter for shared part.
11255 (vec_info::~vec_info): Adjust.
11256 (vec_info_shared::vec_info_shared): New.
11257 (vec_info_shared::~vec_info_shared): Likewise.
11258 (vec_info_shared::save_datarefs): Likewise.
11259 (vec_info_shared::check_datarefs): Likewise.
11260 (try_vectorize_loop_1): Construct shared part live for analyses
11261 of a single loop for multiple vector sizes.
11262 * tree-parloops.c (gather_scalar_reductions): Adjust.
11264 2018-06-25 Richard Biener <rguenther@suse.de>
11266 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11267 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11268 (vect_analyze_data_refs): Remove similar code from here and
11269 simplify accordingly.
11271 2018-06-25 Richard Biener <rguenther@suse.de>
11273 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11274 for reverse storage order accesses rather than asserting
11275 they cannot happen here.
11277 2018-06-25 Tom de Vries <tdevries@suse.de>
11280 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11281 Use data16 instead of .byte for insn prefix.
11283 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
11286 * parser.c (make_char_string_pack): Pass this literal chars
11287 through cpp_interpret_string.
11288 (cp_parser_userdef_numeric_literal): Check the result of
11289 make_char_string_pack.
11291 2018-06-24 Maya Rashish <coypu@sdf.org>
11293 * ginclude/stddef.h: Simplify conditions around avoiding
11294 re-definition of __size_t.
11296 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
11298 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
11299 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
11301 2018-06-22 Maya Rashish <coypu@sdf.org>
11303 * doc/invoke.texi (mno-fancy-math-387): Update for changes
11304 made to OpenBSD and NetBSD through the years.
11306 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11308 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11309 behavior of vec_pack (vector double, vector double) to match
11310 behavior of vec_float2 (vector double, vector double).
11312 2018-06-22 Olivier Hainque <hainque@adacore.com>
11314 * gimplify.c (gimplify_function_tree): Prevent creation
11315 of a trampoline for the address of the current function
11316 passed to entry/exit instrumentation hooks.
11318 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
11321 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
11324 2018-06-22 Martin Liska <mliska@suse.cz>
11326 PR tree-optimization/86263
11327 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11328 Bail out if is_enabled is false.
11329 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
11331 (jump_table_cluster::is_enabled): New function.
11333 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
11335 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11336 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
11337 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
11338 (lto_input_ts_binfo_tree_pointers): Likewise.
11339 * tree-streamer-out.c (streamer_write_tree_bitfields,
11340 write_ts_binfo_tree_pointers): Likewise.
11341 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
11343 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
11345 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
11347 2018-06-22 Martin Liska <mliska@suse.cz>
11349 * symbol-summary.h (get): Make it pure and inline move
11350 functionality from ::get function.
11351 (get): Remove and inline into ::get and ::get_create.
11352 (get_create): Move code from ::get function.
11354 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11357 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
11358 -x assembler-with-cpp.
11360 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11362 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
11363 _FILE_OFFSET_BITS=64 for C++.
11365 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
11367 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
11368 conversion insn that shows up when pr85657-3.c is compiled using
11369 IEEE 128-bit long double.
11370 (neg<mode>2_internal): Use the correct mode to check whether the
11371 mode is IBM extended.
11372 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
11373 multiply and divide external functions from being created more
11376 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
11378 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
11380 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
11381 the edge can be forwarded.
11382 (cfg_layout_merge_blocks): Likewise.
11384 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
11386 * except.c (finish_eh_generation): Commit edge insertions only after
11387 the EH edges have been redirected from post-landing to landing pads.
11389 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
11391 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
11392 create_tmp_var_for to create the FRAME decl.
11393 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
11395 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
11397 * tree-inline.c (copy_edges_for_bb): Minor tweak.
11398 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
11399 debug statement when resetting its value.
11400 (expand_call_inline): Copy the locus of the call onto the assignment
11401 of the return value, if any. Use local variable in more cases.
11403 2018-06-21 Martin Liska <mliska@suse.cz>
11405 * ipa-pure-const.c (propagate_nothrow): Use
11406 funct_state_summaries->get.
11407 (dump_malloc_lattice): Likewise.
11408 (propagate_malloc): Likewise.
11410 2018-06-21 Richard Biener <rguenther@suse.de>
11412 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
11413 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
11414 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
11416 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
11417 BLOCK_ABSTRACT_ORIGIN unconditionally.
11419 2018-06-21 David Malcolm <dmalcolm@redhat.com>
11421 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
11423 * ipa-reference.c (ipa_reference_c_finalize): Delete
11424 ipa_ref_opt_sum_summaries and set it to NULL.
11426 2018-06-21 Tom de Vries <tdevries@suse.de>
11428 PR tree-optimization/85859
11429 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
11430 test with comment from bb_no_side_effects_p.
11432 2018-06-21 Richard Biener <rguenther@suse.de>
11434 PR tree-optimization/86232
11435 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
11436 max for constant niter.
11438 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
11440 * config/aarch64/aarch64-simd.md
11441 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
11443 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
11445 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
11446 Make opernads of the unspec commutative.
11448 2018-06-21 Richard Biener <rguenther@suse.de>
11450 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
11451 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
11452 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
11453 (vect_analyze_data_ref_dependence): Re-order checks to deal with
11455 (vect_record_base_alignments): Do not record base alignment
11456 for gathers or scatters.
11457 (vect_compute_data_ref_alignment): Drop return value that is always
11458 true. Bail out early for gathers or scatters.
11459 (vect_enhance_data_refs_alignment): Bail out early for gathers
11461 (vect_find_same_alignment_drs): Likewise.
11462 (vect_analyze_data_refs_alignment): Remove dead code.
11463 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11464 (vect_analyze_data_refs): For possible gathers or scatters do
11465 not create an alternate DR, just check their possible validity
11466 and mark them. Adjust DECL_NONALIASED handling to not rely
11467 on DR_BASE_ADDRESS.
11468 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
11469 update inits of gathers or scatters.
11470 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
11471 Also copy gather/scatter flag to pattern vinfo.
11473 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
11475 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11476 behavior of vec_packsu (vector unsigned long long, vector unsigned
11477 long long) to match behavior of vec_packs with same signature.
11479 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
11480 Thomas Schwinge <thomas@codesourcery.com>
11481 Cesar Philippidis <cesar@codesourcery.com>
11483 * gimplify.c (gimplify_scan_omp_clauses): Add support for
11484 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11485 (gimplify_adjust_omp_clauses): Likewise.
11486 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
11487 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
11488 (gimplify_omp_target_update): Update handling of acc update and
11490 * omp-low.c (install_var_field): Remove unused parameter
11491 base_pointers_restrict.
11492 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
11493 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
11495 (omp_target_base_pointers_restrict_p): Delete.
11496 (scan_omp_target): Update call to scan_sharing_clauses.
11497 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
11499 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
11500 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11501 (convert_local_omp_clauses): Likewise.
11502 * tree-pretty-print.c (dump_omp_clause): Likewise.
11503 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
11505 (omp_clause_code_name): Likewise.
11507 2018-06-20 Jakub Jelinek <jakub@redhat.com>
11510 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
11513 PR tree-optimization/86231
11514 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
11515 anti-range don't overwrite *vr0min before using it to compute *vr0max.
11517 2018-06-20 Tom de Vries <tdevries@suse.de>
11519 PR tree-optimization/86097
11520 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
11521 iv type if signedness of iv type is not the same as that of *nit.
11523 2018-06-20 Jakub Jelinek <jakub@redhat.com>
11525 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
11526 EDGE_EH edges, verify they are all EDGE_EH.
11528 2018-06-20 Maya Rashish <coypu@sdf.org>
11530 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
11532 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11534 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
11535 * config/aarch64/aarch64.c (xgene1_tunings): Add
11536 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
11537 (aarch64_mode_valid_for_sched_fusion_p):
11538 Allow 16-byte modes.
11539 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
11540 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
11542 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
11544 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
11545 * config/aarch64/iterators.md (VQ2): New mode iterator.
11547 2018-06-20 Martin Liska <mliska@suse.cz>
11549 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11550 Change default ratio from 10 to 8.
11552 2018-06-20 Martin Liska <mliska@suse.cz>
11554 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11556 (bit_test_cluster::find_bit_tests): Likewise.
11557 (switch_decision_tree::analyze_switch_statement): Find clusters.
11558 * tree-switch-conversion.h (struct jump_table_cluster): Document
11561 2018-06-20 Martin Liska <mliska@suse.cz>
11563 * tree-switch-conversion.c (switch_conversion::collect):
11564 Record m_uniq property.
11565 (switch_conversion::expand): Bail out for special conditions.
11566 (group_cluster::~group_cluster): New.
11567 (group_cluster::group_cluster): Likewise.
11568 (group_cluster::dump): Likewise.
11569 (jump_table_cluster::emit): New.
11570 (switch_decision_tree::fix_phi_operands_for_edges): New.
11571 (struct case_node): Remove struct.
11572 (jump_table_cluster::can_be_handled): New.
11573 (case_values_threshold): Moved to header.
11574 (reset_out_edges_aux): Likewise.
11575 (jump_table_cluster::is_beneficial): New.
11576 (bit_test_cluster::can_be_handled): Likewise.
11577 (add_case_node): Remove.
11578 (bit_test_cluster::is_beneficial): New.
11579 (case_bit_test::cmp): New.
11580 (bit_test_cluster::emit): New.
11581 (expand_switch_as_decision_tree_p): Remove.
11582 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
11583 (fix_phi_operands_for_edge): Likewise.
11584 (switch_decision_tree::analyze_switch_statement): New.
11585 (compute_cases_per_edge): Move ...
11586 (switch_decision_tree::compute_cases_per_edge): ... here.
11587 (try_switch_expansion): Likewise.
11588 (switch_decision_tree::try_switch_expansion): Likewise.
11589 (record_phi_operand_mapping): Likewise.
11590 (switch_decision_tree::record_phi_operand_mapping): Likewise.
11591 (emit_case_decision_tree): Likewise.
11592 (switch_decision_tree::emit): Likewise.
11593 (balance_case_nodes): Likewise.
11594 (switch_decision_tree::balance_case_nodes): Likewise.
11595 (dump_case_nodes): Likewise.
11596 (switch_decision_tree::dump_case_nodes): Likewise.
11597 (emit_jump): Likewise.
11598 (switch_decision_tree::emit_jump): Likewise.
11599 (emit_cmp_and_jump_insns): Likewise.
11600 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
11601 (emit_case_nodes): Likewise.
11602 (switch_decision_tree::emit_case_nodes): Likewise.
11603 (conditional_probability): Remove.
11604 * tree-switch-conversion.h (enum cluster_type): New.
11606 (struct cluster): Likewise.
11607 (cluster::cluster): Likewise.
11608 (struct simple_cluster): Likewise.
11609 (simple_cluster::simple_cluster): Likewise.
11610 (struct group_cluster): Likewise.
11611 (struct jump_table_cluster): Likewise.
11612 (struct bit_test_cluster): Likewise.
11613 (struct min_cluster_item): Likewise.
11614 (struct case_tree_node): Likewise.
11615 (case_tree_node::case_tree_node): Likewise.
11616 (jump_table_cluster::case_values_threshold): Likewise.
11617 (struct case_bit_test): Likewise.
11618 (struct switch_decision_tree): Likewise.
11619 (struct switch_conversion): Likewise.
11620 (switch_decision_tree::reset_out_edges_aux): Likewise.
11622 2018-06-20 Martin Liska <mliska@suse.cz>
11624 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
11625 (hoist_edge_and_branch_if_true): Likewise.
11626 (expand_switch_using_bit_tests_p): Likewise.
11627 (struct case_bit_test): Likewise.
11628 (case_bit_test_cmp): Likewise.
11629 (emit_case_bit_tests): Likewise.
11630 (switch_conversion::switch_conversion): New class.
11631 (struct switch_conv_info): Remove old struct.
11632 (collect_switch_conv_info): More to ...
11633 (switch_conversion::collect): ... this.
11634 (check_range): Likewise.
11635 (switch_conversion::check_range): Likewise.
11636 (check_all_empty_except_final): Likewise.
11637 (switch_conversion::check_all_empty_except_final): Likewise.
11638 (check_final_bb): Likewise.
11639 (switch_conversion::check_final_bb): Likewise.
11640 (create_temp_arrays): Likewise.
11641 (switch_conversion::create_temp_arrays): Likewise.
11642 (free_temp_arrays): Likewise.
11643 (gather_default_values): Likewise.
11644 (switch_conversion::gather_default_values): Likewise.
11645 (build_constructors): Likewise.
11646 (switch_conversion::build_constructors): Likewise.
11647 (constructor_contains_same_values_p): Likewise.
11648 (switch_conversion::contains_same_values_p): Likewise.
11649 (array_value_type): Likewise.
11650 (switch_conversion::array_value_type): Likewise.
11651 (build_one_array): Likewise.
11652 (switch_conversion::build_one_array): Likewise.
11653 (build_arrays): Likewise.
11654 (switch_conversion::build_arrays): Likewise.
11655 (gen_def_assigns): Likewise.
11656 (switch_conversion::gen_def_assigns): Likewise.
11657 (prune_bbs): Likewise.
11658 (switch_conversion::prune_bbs): Likewise.
11659 (fix_phi_nodes): Likewise.
11660 (switch_conversion::fix_phi_nodes): Likewise.
11661 (gen_inbound_check): Likewise.
11662 (switch_conversion::gen_inbound_check): Likewise.
11663 (process_switch): Use the newly created class.
11664 (switch_conversion::expand): New.
11665 (switch_conversion::~switch_conversion): New.
11666 * tree-switch-conversion.h: New file.
11668 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11670 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
11671 tree-vect-patterns.c.
11672 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
11673 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
11674 (vect_recog_sad_pattern): Likewise.
11675 (vect_recog_widen_sum_pattern): Likewise.
11676 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
11677 (vect_recog_widen_shift_pattern): Remove the type_in argument.
11678 (vect_recog_rotate_pattern): Likewise.
11679 (vect_recog_mult_pattern): Likewise.
11680 (vect_recog_vector_vector_shift_pattern): Likewise.
11681 (vect_recog_divmod_pattern): Likewise.
11682 (vect_recog_mixed_size_cond_pattern): Likewise.
11683 (vect_recog_bool_pattern): Likewise.
11684 (vect_recog_mask_conversion_pattern): Likewise.
11685 (vect_try_gather_scatter_pattern): Likewise.
11686 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
11687 (vect_recog_over_widening_pattern): Likewise.
11688 (vect_recog_gather_scatter_pattern): Likewise.
11689 (vect_recog_func_ptr): Move from tree-vectorizer.h
11690 (vect_vect_recog_func_ptrs): Move further down the file.
11691 (vect_recog_func): Likewise. Remove the third argument.
11692 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
11693 (vect_pattern_recog_1): Expect the pattern function to do any
11694 necessary target tests. Also expect it to provide a vector type.
11695 Remove the type_in handling.
11697 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11699 * tree-vect-patterns.c (vect_pattern_detected): New function.
11700 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
11701 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
11702 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
11703 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
11704 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11705 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11706 (vect_recog_mask_conversion_pattern)
11707 (vect_try_gather_scatter_pattern): Likewise.
11709 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11711 * tree-vect-patterns.c (vect_get_internal_def): New function.
11712 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11713 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
11714 (search_type_for_mask_1): Use it.
11716 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11718 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11719 redundant WIDEN_SUM_EXPR handling.
11720 (vect_recog_sad_pattern): Likewise.
11722 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11724 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11725 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11726 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
11727 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11728 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11730 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11732 * tree-vect-stmts.c (vectorizable_call): Make sure that we
11733 use the stmt_vec_info of the original bb statement for the
11734 new zero assignment, even if the call is part of a pattern.
11736 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11738 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11739 that the sequence is attached to the original statement rather
11740 than the pattern statement.
11741 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11742 PATTERN_DEF_SEQ from the original statement rather than
11743 the main pattern statement.
11744 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11745 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11746 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11748 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11750 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11751 definition statements before the early exit for statements that aren't
11753 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11755 (vect_transform_loop): ...here. Process pattern definition
11756 statements without first checking whether the main pattern
11757 statement is live or relevant.
11759 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11761 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11762 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11764 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
11766 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11767 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11768 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11769 (expand_block_compare): Change select_block_compare_mode call.
11770 (expand_strncmp_align_check): Use new functions, fix comment.
11771 (emit_final_str_compare_gpr): New function.
11772 (expand_strn_compare): Refactor and clean up code.
11773 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11775 2018-06-19 Tony Reix <tony.reix@atos.com>
11776 Damien Bergamini <damien.bergamini@atos.com>
11777 David Edelsohn <dje.gcc@gmail.com>
11779 * collect2.c (static_obj): New variable.
11780 (static_libs): New variable.
11781 (is_in_list): Uncomment declaration.
11782 (main): Track AIX libraries linked statically.
11783 (is_in_list): Uncomment definition.
11784 (scan_prog_file): Don't add AIX shared libraries initializer
11785 to constructor list if linking statically.
11787 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
11789 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11791 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11793 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
11795 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11798 2018-06-19 Martin Liska <mliska@suse.cz>
11800 * config/i386/i386.c (ix86_can_inline_p): Do not use
11801 ipa_fn_summaries::get_create.
11802 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11804 (devirtualization_time_bonus): Likewise.
11805 (ipcp_propagate_stage): Likewise.
11806 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11807 (edge_set_predicate): Likewise.
11808 (evaluate_conditions_for_known_args): Likewise.
11809 (evaluate_properties_for_edge): Likewise.
11810 (ipa_call_summary::reset): Tranform to ...
11811 (ipa_call_summary::~ipa_call_summary): ... this.
11812 (ipa_fn_summary::reset): Transform to ...
11813 (ipa_fn_summary::~ipa_fn_summary): ... this.
11814 (ipa_fn_summary_t::remove): Rename to ...
11815 (ipa_fn_summary_t::remove_callees): ... this.
11816 (ipa_fn_summary_t::duplicate): Use placement new
11817 instead of memory copy.
11818 (ipa_call_summary_t::duplicate): Likewise.
11819 (ipa_call_summary_t::remove): Remove.
11820 (dump_ipa_call_summary): Change get_create to get.
11821 (ipa_dump_fn_summary): Dump only when summary exists.
11822 (analyze_function_body): Use symbol_summary::get instead
11824 (compute_fn_summary): Likewise.
11825 (estimate_edge_devirt_benefit): Likewise.
11826 (estimate_edge_size_and_time): Likewise.
11827 (inline_update_callee_summaries): Likewise.
11828 (remap_edge_change_prob): Likewise.
11829 (remap_edge_summaries): Likewise.
11830 (ipa_merge_fn_summary_after_inlining): Likewise.
11831 (write_ipa_call_summary): Likewise.
11832 (ipa_fn_summary_write): Likewise.
11833 (ipa_free_fn_summary): Likewise.
11834 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11835 (struct ipa_call_summary): Likewise.
11836 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11838 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11839 (estimate_size_after_inlining): Likewise.
11840 (estimate_growth): Likewise.
11841 (growth_likely_positive): Likewise.
11842 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11843 (inline_call): Likewise.
11844 * ipa-inline.c (caller_growth_limits): Likewise.
11845 (can_inline_edge_p): Likewise.
11846 (can_inline_edge_by_limits_p): Likewise.
11847 (compute_uninlined_call_time): Likewise.
11848 (compute_inlined_call_time): Likewise.
11849 (want_inline_small_function_p): Likewise.
11850 (edge_badness): Likewise.
11851 (update_caller_keys): Likewise.
11852 (update_callee_keys): Likewise.
11853 (inline_small_functions): Likewise.
11854 (inline_to_all_callers_1): Likewise.
11855 (dump_overall_stats): Likewise.
11856 (early_inline_small_functions): Likewise.
11857 (early_inliner): Likewise.
11858 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11859 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11860 * ipa-pure-const.c (malloc_candidate_p): Likewise.
11861 * ipa-split.c (execute_split_functions): Likewise.
11862 * symbol-summary.h: Likewise.
11863 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11865 2018-06-19 Richard Biener <rguenther@suse.de>
11867 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11868 (vectorize_loops): ... here. Fix dbgcnt handling.
11869 (try_vectorize_loop): Wrap try_vectorize_loop_1.
11871 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
11874 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11875 ieee128 argument takes up only one (vector) register, not two (floating
11878 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11880 * gimplify.c (gimplify_init_constructor): Really never clear for an
11881 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11883 2018-06-19 Richard Biener <rguenther@suse.de>
11885 PR tree-optimization/86179
11886 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11887 after failed recognition.
11889 2018-06-18 Martin Sebor <msebor@redhat.com>
11891 PR middle-end/85602
11892 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11893 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11894 Handle integer subtraction.
11895 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11896 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11898 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11900 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11901 param from rtx to rtx_insn *.
11902 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11904 (frv_ifcvt_modify_insn): Likwise.
11905 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11906 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
11907 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11908 as_a <rtx_insn *> cast to local "unprotected_region" once
11909 it's been established that it's not NULL or pc_rtx.
11910 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11911 param "sethi" from rtx to rtx_insn *.
11912 (nds32_group_float_insns): Likewise for param "insn".
11913 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11915 (vax_output_int_subtract): Likewise.
11916 * config/vax/vax.c (vax_output_int_add): Likewise for param
11918 (vax_output_int_subtract): Likewise.
11919 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11920 (emit_pattern_after): Likewise for param "after".
11921 (emit_insn_after): Likewise.
11922 (emit_jump_insn_after): Likewise.
11923 (emit_call_insn_after): Likewise.
11924 (emit_debug_insn_after): Likewise.
11925 (emit_pattern_before): Likewise for param "before".
11926 (emit_insn_before): Likewise.
11927 (emit_jump_insn_before): Likewise.
11928 * final.c (get_insn_template): Likewise for param "insn", removing
11930 * output.h (get_insn_template): Likewise for 2nd param.
11931 * rtl.h (emit_insn_before): Likewise.
11932 (emit_jump_insn_before): Likewise.
11933 (emit_debug_insn_before_noloc): Likewise.
11934 (emit_insn_after): Likewise.
11935 (emit_jump_insn_after): Likewise.
11936 (emit_call_insn_after): Likewise.
11937 (emit_debug_insn_after): Likewise.
11938 (set_insn_deleted): Likewise for param.
11940 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
11943 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11944 floating point modes, so that IFmode is numerically greater than
11945 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11946 to declare the ordering. This prevents IFmode from being
11947 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11948 machine. Include rs6000-modes.h to share the fractional values
11949 between genmodes* and the rest of the compiler.
11950 (IFmode): Likewise.
11951 (KFmode): Likewise.
11952 (TFmode): Likewise.
11953 * config/rs6000/rs6000-modes.h: New file.
11954 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11955 meaning of rs6000_long_double_size so that 126..128 selects an
11956 appropriate 128-bit floating point type.
11957 (rs6000_option_override_internal): Likewise.
11958 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11959 (TARGET_LONG_DOUBLE_128): Change the meaning of
11960 rs6000_long_double_size so that 126..128 selects an appropriate
11961 128-bit floating point type.
11962 (LONG_DOUBLE_TYPE_SIZE): Update comment.
11963 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11964 source and destination to match the standard usage.
11965 (truncifkf2): Likewise.
11966 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11967 ISA 2.07 to use an explicit clobber, instead of passing in a
11969 (copysign<mode>3_soft): Likewise.
11971 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11973 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11974 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11975 (vect_slp_analyze_instance_dependence): Likewise.
11976 (vect_enhance_data_refs_alignment): Likewise.
11977 (vect_analyze_data_refs_alignment): Likewise.
11978 (vect_slp_analyze_and_verify_instance_alignment
11979 (vect_analyze_data_ref_accesses): Likewise.
11980 (vect_prune_runtime_alias_test_list): Likewise.
11981 (vect_analyze_data_refs): Likewise.
11982 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11983 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11984 (vect_analyze_scalar_cycles_1): Likewise.
11985 (vect_get_loop_niters): Likewise.
11986 (vect_analyze_loop_form_1): Likewise.
11987 (vect_update_vf_for_slp): Likewise.
11988 (vect_analyze_loop_operations): Likewise.
11989 (vect_analyze_loop): Likewise.
11990 (vectorizable_induction): Likewise.
11991 (vect_transform_loop): Likewise.
11992 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11993 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11994 (vect_make_slp_decision): Likewise.
11995 (vect_detect_hybrid_slp): Likewise.
11996 (vect_slp_analyze_operations): Likewise.
11997 (vect_slp_bb): Likewise.
11998 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11999 (vectorizable_bswap): Likewise.
12000 (vectorizable_call): Likewise.
12001 (vectorizable_simd_clone_call): Likewise.
12002 (vectorizable_conversion): Likewise.
12003 (vectorizable_assignment): Likewise.
12004 (vectorizable_shift): Likewise.
12005 (vectorizable_operation): Likewise.
12006 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12008 2018-06-18 Martin Sebor <msebor@redhat.com>
12010 PR tree-optimization/81384
12011 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12012 * builtins.c (expand_builtin_strnlen): New function.
12013 (expand_builtin): Call it.
12014 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12015 * builtins.def (BUILT_IN_STRNLEN): New.
12016 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12017 Warn for bounds in excess of maximum object size.
12018 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12019 single-value ranges. Handle strnlen.
12020 (handle_builtin_strlen): Handle strnlen.
12021 (strlen_check_and_optimize_stmt): Same.
12022 * doc/extend.texi (Other Builtins): Document strnlen.
12024 2018-06-18 Maya Rashish <coypu@sdf.org>
12026 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12027 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12028 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12030 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12032 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12034 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12036 * tree.c (escaped_string::escape): Replace cast to char * by
12037 const_cast<char *> (unescaped).
12039 2018-06-18 Nick Clifton <nickc@redhat.com>
12042 * tree.c (escaped_string): New class. Converts an unescaped
12043 string into its escaped equivalent.
12044 (warn_deprecated_use): Use the new class to convert the
12045 deprecation message, if present.
12046 (test_escaped_strings): New self test.
12047 (test_c_tests): Add test_escaped_strings.
12048 * doc/extend.texi (deprecated): Add a note that the
12049 deprecation message is affected by the -fmessage-length
12050 option, and that control characters will be escaped.
12051 (#pragma GCC error): Document this pragma.
12052 (#pragma GCC warning): Likewise.
12053 * doc/invoke.texi (-fmessage-length): Document this option's
12054 effect on the #warning and #error preprocessor directives and
12055 the deprecated attribute.
12057 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
12059 * tree.c (decl_value_expr_lookup): Revert latest change.
12060 (decl_value_expr_insert): Likewise.
12062 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
12064 * gimplify.c (nonlocal_vlas): Delete.
12065 (nonlocal_vla_vars): Likewise.
12066 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12068 (gimplify_body): Do not create and destroy nonlocal_vlas.
12069 * tree-nested.c: Include diagnostic.h.
12070 (use_pointer_in_frame): Tweak.
12071 (lookup_field_for_decl): Add assertion and declare the transformation.
12072 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12073 internal error when the reference is in a wrong context. Do not
12074 create a debug decl by default.
12075 (note_nonlocal_block_vlas): Delete.
12076 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12077 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
12078 create a debug decl by default.
12079 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12080 call is in a wrong context.
12081 (fixup_vla_decls): New function.
12082 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
12083 debug variables were created.
12084 * tree.c (decl_value_expr_lookup): Add checking assertion.
12085 (decl_value_expr_insert): Likewise.
12087 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12089 PR middle-end/82479
12090 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12091 * tree-scalar-evolution.c (interpret_expr): Likewise.
12092 (expression_expensive_p): Likewise.
12093 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12094 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12095 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12096 (ssa_defined_by_minus_one_stmt_p): New.
12098 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12100 PR middle-end/64946
12101 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12102 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12103 * dojump.c (do_jump): Likewise.
12104 * expr.c (expand_expr_real_2): Check operand type's sign.
12105 * fold-const.c (const_unop): Handle ABSU_EXPR.
12106 (fold_abs_const): Likewise.
12107 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12108 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12109 (strip_sign_op_1): Likesise.
12110 * match.pd: Add new pattern to generate ABSU_EXPR.
12111 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12112 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12113 * tree-eh.c (operation_could_trap_helper_p): Likewise.
12114 * tree-inline.c (estimate_operator_cost): Likewise.
12115 * tree-pretty-print.c (dump_generic_node): Likewise.
12116 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12117 * tree.def (ABSU_EXPR): New.
12119 2018-06-16 Jakub Jelinek <jakub@redhat.com>
12121 PR middle-end/86095
12122 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12123 documented as preserved for backward compatibility only.
12124 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12126 PR rtl-optimization/86108
12127 * bb-reorder.c (create_forwarder_block): Renamed to ...
12128 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
12129 jump from new landing pad to the second part.
12130 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12133 2018-06-15 Jakub Jelinek <jakub@redhat.com>
12135 PR middle-end/85878
12136 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12137 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12138 Only call store_expr for halves if the mode is the same.
12140 PR middle-end/86123
12141 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12142 Fix up comment formatting.
12144 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
12146 * typed-splay-tree.h (typed_splay_tree::remove): New function.
12147 (typed_splay_tree::closure,
12148 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12149 (typed_splay_tree::typed_splay_tree,
12150 typed_splay_tree::operator =): Declared private.
12151 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12152 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12153 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12154 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12155 typed_splay_tree::splay_tree_splay,
12156 typed_splay_tree::splay_tree_foreach_helper,
12157 typed_splay_tree::splay_tree_insert,
12158 typed_splay_tree::splay_tree_remove,
12159 typed_splay_tree::splay_tree_lookup,
12160 typed_splay_tree::splay_tree_predecessor,
12161 typed_splay_tree::splay_tree_successor,
12162 typed_splay_tree::splay_tree_min,
12163 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12164 (typed_splay_tree::root, typed_splay_tree::comp,
12165 typed_splay_tree::delete_key,
12166 typed_splay_tree::delete_value): New data members.
12167 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12168 typed_splay_tree::remove.
12170 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
12172 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12173 -mginv and -mno-ginv to the assembler.
12174 * config/mips/mips.opt (-mcrc): New option.
12175 (-mginv): Likewise.
12176 * doc/invoke.text (-mcrc): Document.
12177 (-mginv): Likewise.
12179 2018-06-15 Nick Clifton <nickc@redhat.com>
12182 * tree.c (escaped_string): New class. Converts an unescaped
12183 string into its escaped equivalent.
12184 (warn_deprecated_use): Use the new class to convert the
12185 deprecation message, if present.
12186 (test_escaped_strings): New self test.
12187 (test_c_tests): Add test_escaped_strings.
12188 * doc/extend.texi (deprecated): Add a note that the
12189 deprecation message is affected by the -fmessage-length
12190 option, and that control characters will be escaped.
12191 (#pragma GCC error): Document this pragma.
12192 (#pragma GCC warning): Likewise.
12193 * doc/invoke.texi (-fmessage-length): Document this option's
12194 effect on the #warning and #error preprocessor directives and
12195 the deprecated attribute.
12197 2018-06-15 Richard Biener <rguenther@suse.de>
12199 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12200 here, also noting vector size used.
12201 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
12202 size used in MSG_OPTIMIZED_LOCATIONS dump.
12203 (pass_slp_vectorize::execute): Adjust.
12205 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
12208 * config/arc/arc.c (arc_return_address_register): Fix
12211 2018-06-15 Richard Biener <rguenther@suse.de>
12213 PR middle-end/86159
12214 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12215 leave useless conversion stripping to force_gimple_operand_gsi.
12216 (gimplify_build2): Likewise.
12217 (gimplify_build1): Likewise.
12219 2018-06-15 Richard Biener <rguenther@suse.de>
12221 PR middle-end/86076
12222 * tree-cfg.c (move_stmt_op): unshare invariant addresses
12223 before adjusting their block.
12225 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
12227 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12228 multilibs for *-*-rtems*.
12229 * config/riscv/t-rtems: New file.
12231 2018-06-14 Jakub Jelinek <jakub@redhat.com>
12233 PR middle-end/86122
12234 * match.pd ((A +- CST1) +- CST2): Punt if last resort
12235 unsigned_type_for returns NULL.
12238 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12239 subregs of multi-word pseudos unless the float mode has word size.
12241 2018-06-14 Richard Biener <rguenther@suse.de>
12243 PR middle-end/86139
12244 * tree-vect-generic.c (build_word_mode_vector_type): Remove
12245 duplicate and harmful type_hash_canon.
12246 * tree.c (type_hash_canon): Assert we didn't find ourselves.
12248 2018-06-14 Richard Biener <rguenther@suse.de>
12251 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12254 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
12256 * config/rtems.h (STDINT_LONG32): Define.
12258 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
12259 Prachi Godbole <prachi.godbole@imgtec.com>
12261 * config/mips/mips-cpus.def: Define P6600.
12262 * config/mips/mips-tables.opt: Regenerate.
12263 * config/mips/mips.c (mips_ucbranch_type): New enum.
12264 (mips_rtx_cost_data): Add support for P6600.
12265 (mips_issue_rate): Likewise.
12266 (mips_multipass_dfa_lookahead): Likewise.
12267 (mips_avoid_hazard): Likewise.
12268 (mips_reorg_process_insns): Likewise.
12269 (mips_classify_branch_p6600): New function.
12270 * config/mips/mips.h (TUNE_P6600): New define.
12271 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12272 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12273 * config/mips/mips.md: Include p6600.md.
12274 (processor): Add p6600.
12275 * config/mips/p6600.md: New file.
12276 * doc/invoke.texi: Add p6600 to supported architectures.
12278 2018-06-13 Martin Sebor <msebor@redhat.com>
12280 PR tree-optimization/86114
12281 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12283 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
12285 2018-06-13 Richard Biener <rguenther@suse.de>
12287 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
12288 Properly set vector type of the intermediate stmt.
12289 * tree-vect-stmts.c (vectorizable_operation): The destination
12290 var always has vectype_out type.
12292 2018-06-13 Jeff Law <law@redhat.com>
12294 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
12295 integer 0 for argument to print_rtl_with_bb.
12296 (rl78_reorg): Likewise.
12298 2018-06-13 David Malcolm <dmalcolm@redhat.com>
12300 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
12301 from rtx to rtx_insn *.
12302 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
12304 (add_sched_insns_for_speculation): Likewise for local "target",
12305 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12306 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
12307 from rtx_insn ** to rtx_code_label **.
12308 (reorg_emit_nops): Likewise.
12309 (c6x_reorg): Likewise for local "call_labels".
12310 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
12312 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
12313 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
12314 the loops over LABEL_REFS.
12315 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
12317 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12318 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
12319 (split_branches): Strengthen local "olabel" from rtx to
12320 rtx_insn *, adding a safe_as_a cast.
12321 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
12323 (add_insn_after): Likewise for first two params.
12324 (add_insn_before): Likewise.
12325 (remove_insn): Likewise for param.
12326 (emit_pattern_before_noloc): Likewise for second and third params.
12327 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
12328 (emit_call_insn_before_noloc): Likewise.
12329 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
12331 (emit_barrier_before): Likewise.
12332 (emit_label_before): Strengthen "label" param from "rtx" to
12333 "rtx_code_label *". Strengthen "before" param from "rtx" to
12335 (emit_insn_after_1): Strengthen "after" param from "rtx" to
12337 (emit_pattern_after_noloc): Likewise.
12338 (emit_insn_after_noloc): Likewise.
12339 (emit_jump_insn_after_noloc): Likewise.
12340 (emit_call_insn_after_noloc): Likewise.
12341 (emit_debug_insn_after_noloc): Likewise.
12342 (emit_barrier_after): Likewise.
12343 (emit_label_after): Likewise for both params.
12344 (emit_pattern_after_setloc): Likewise for "after" param. Convert
12345 "loc" param from "int" to "location_t".
12346 (emit_insn_after_setloc): Likewise.
12347 (emit_jump_insn_after_setloc): Likewise.
12348 (emit_call_insn_after_setloc): Likewise.
12349 (emit_debug_insn_after_setloc): Likewise.
12350 (emit_pattern_before_setloc): Likewise for "before" param. Convert
12351 "loc" param from "int" to "location_t".
12352 (emit_pattern_before): Convert NULL_RTX to NULL.
12353 (emit_insn_before_setloc): Convert "loc" param from "int" to
12355 (emit_jump_insn_before_setloc): Likewise.
12356 (emit_call_insn_before_setloc): Likewise.
12357 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
12358 rtx_insn *. Convert "loc" param from "int" to "location_t".
12359 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
12360 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
12361 Convert 3rd param from "int" to "location_t".
12362 (emit_barrier_before, emit_barrier_after, next_real_insn):
12363 Strengthen param from rtx to rtx_insn *.
12364 (emit_label_before): Strengthen 1st param from "rtx" to
12365 "rtx_code_label *". Strengthen 2nd param from "rtx" to
12367 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
12368 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
12369 Strengthen 2nd param from "rtx" to "rtx_insn *".
12370 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
12371 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
12372 Likewise. Convert 3rd param from "int" to "location_t".
12373 (emit_label_after): Strengthen 1st param from "rtx" to
12374 "rtx_code_label *".
12375 (next_real_insn, remove_insn): Strengthen param from "rtx" to
12377 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
12378 from "rtx" to "rtx_insn *".
12380 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
12382 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
12383 bodies streamed in with -Q.
12384 * dumpfile.c (dump_files): Add lto-stream-out dump file.
12385 * dumpfile.h (tree_dump_index): Add lto_stream_out.
12386 * gimple-streamer-out.c: Include gimple-pretty-print.h
12387 (output_bb): Dump stmts streamed.
12388 * lto-section-out.c: Include print-tree.h
12389 (lto_begin_section): Dump sections created.
12390 (lto_output_decl_index): Dump decl encoded.
12391 * lto-streamer-out.c: Include print-tree.h
12392 (create_output_block): Dump output block created.
12393 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
12394 (output_function): Dump function output.
12395 (output_constructor): Dump constructor streamed.
12396 (write_global_stream): Output indexes encoded.
12397 (produce_asm_for_decls): Dump streams encoded.
12398 * lto-streamer.c (streamer_dump_file): New global var.
12399 * lto-streamer.h (streamer_dump_file): Declare.
12400 * passes.c (ipa_write_summaries): Initialize streamer dump.
12401 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
12404 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
12407 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
12408 offsets for register save directives. Emit a second batch of save
12409 directives, if need be, when the function accesses prior frames.
12411 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12413 * config/arc/fpu.md (fmasf4): Force operand to register.
12414 (fnmasf4): Likewise.
12416 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12418 * config/arc/arc-protos.h (arc_pad_return): Remove.
12419 * config/arc/arc.c (machine_function): Remove force_short_suffix
12421 (arc_print_operand): Adjust printing of '&'.
12422 (arc_verify_short): Remove conditional printing of short suffix.
12423 (arc_final_prescan_insn): Remove reference to size_reason.
12424 (pad_return): New function.
12425 (arc_reorg): Call pad_return.
12426 (arc_pad_return): Remove.
12427 (arc_init_machine_status): Remove reference to force_short_suffix.
12428 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
12429 (attr length): When attribute iscompact is true force to 2
12430 regardless; in the case of maybe check if we want to force the
12431 instruction to have 4 bytes length.
12432 (nopv): Change it to generate 4 byte long nop as well.
12433 (blockage): New pattern.
12434 (simple_return): Remove call to arc_pad_return.
12435 (p_return_i): Likewise.
12437 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12439 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
12441 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12443 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
12446 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12448 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
12449 for ARC700 and ARCv2.
12451 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
12454 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
12455 operands[2] instead of operands[1].
12458 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
12460 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
12461 case, check whether the outer register overlaps an unallocatable
12462 register, not just whether it fits the required class.
12464 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
12466 * poly-int.h (can_div_trunc_p): Add new overload in which all values
12468 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
12469 (memrefs_conflict_p): Likewise.
12470 (init_alias_analysis): Likewise.
12471 * cfgexpand.c (expand_debug_expr): Likewise.
12472 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
12473 * cse.c (fold_rtx): Likewise.
12474 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
12475 * expr.c (emit_block_move_hints): Likewise.
12476 (clear_storage_hints, push_block, emit_push_insn): Likewise.
12477 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
12478 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
12479 (emit_group_store): Likewise.
12480 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
12481 to read the PRE/POST_MODIFY increment.
12482 * calls.c (store_one_arg): Use strip_offset.
12483 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
12485 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
12487 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
12488 (simplify_binary_operation_1): Extend CONST_INT handling to
12490 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
12491 than a HOST_WIDE_INT.
12492 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
12494 (adjust_mems, add_stores): Update accodingly.
12495 (vt_canonicalize_addr): Track polynomial offsets.
12496 (emit_note_insn_var_location): Likewise.
12497 (vt_add_function_parameter): Likewise.
12498 (vt_initialize): Likewise.
12500 2018-06-12 Jeff Law <law@redhat.com>
12502 * config.gcc (alpha*-*-freebsd*): Remove.
12503 * config/alpha/freebsd.h: Remove.
12505 2018-06-12 David Malcolm <dmalcolm@redhat.com>
12508 * spellcheck-tree.c (levenshtein_distance): Rename to...
12509 (get_edit_distance): ...this, and update for underlying renaming.
12510 * spellcheck-tree.h (levenshtein_distance): Rename to...
12511 (get_edit_distance): ...this.
12512 * spellcheck.c (levenshtein_distance): Rename to...
12513 (get_edit_distance): ...this. Convert from Levenshtein distance
12514 to Damerau-Levenshtein distance by supporting transpositions of
12515 adjacent characters. Rename "v1" to "v_next" and "v0" to
12517 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
12518 (selftest::test_edit_distance_unit_test_oneway): ...this, and
12519 update for underlying renaming.
12520 (selftest::levenshtein_distance_unit_test): Rename to...
12521 (selftest::test_get_edit_distance_unit): ...this, and update for
12522 underlying renaming.
12523 (selftest::test_find_closest_string): Add example from PR 69968
12524 where transposition helps
12525 (selftest::test_metric_conditions): Update for renaming.
12526 (selftest::test_metric_conditions): Likewise.
12527 (selftest::spellcheck_c_tests): Likewise.
12528 * spellcheck.h (levenshtein_distance): Rename both overloads to...
12529 (get_edit_distance): ...this.
12530 (best_match::consider): Update for renaming.
12532 2018-06-12 Martin Sebor <msebor@redhat.com>
12534 PR tree-optimization/85259
12535 * builtins.c (compute_objsize): Handle constant offsets.
12536 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
12537 true iff a warning has been issued.
12538 * gimple.h (gimple_nonartificial_location): New function.
12539 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
12540 gimple_nonartificial_location and handle -Wno-system-headers.
12541 (handle_builtin_stxncpy): Same.
12543 2018-06-12 Martin Sebor <msebor@redhat.com>
12546 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
12548 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
12550 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12551 BUILTIN_VEC_XST entries for pointer to double and long long.
12553 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
12556 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12558 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12561 2018-06-12 Martin Liska <mliska@suse.cz>
12563 * doc/options.texi: Document IntegerRange.
12565 2018-06-12 Martin Liska <mliska@suse.cz>
12567 * config/i386/i386.opt: Make MPX-related options as Deprecated.
12568 * opt-functions.awk: Handle Deprecated flag.
12569 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
12571 (read_cmdline_option): Report warning for a deprecated option.
12572 * opts.h (struct cl_option): Add new field cl_deprecated.
12573 (CL_ERR_DEPRECATED): New.
12575 2018-06-12 Martin Liska <mliska@suse.cz>
12577 * doc/options.texi: Document Deprecated option flag.
12579 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12581 * config/arc/arc-arch.h (arc_extras): New enum.
12582 (arc_cpu_t):Add field extra.
12583 (arc_cpu_types): Consider the extras.
12584 * config/arc/arc-cpus.def: Add extras info.
12585 * config/arc/arc-opts.h (processor_type): Consider extra field.
12586 * config/arc/arc.c (arc_override_options): Handle extra field.
12588 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12590 * config/arc/arc-arch.h: Update ARC_OPTX macro.
12591 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
12593 * config/arc/arc.c (arc_init): Update pic warning.
12594 (irq_range): Update irq range parsing warnings.
12595 (arc_override_options): Update various warning messages.
12596 (arc_handle_aux_attribute): Likewise.
12598 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
12600 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
12602 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12604 * doc/sourcebuild.texi: Document usage of line number 0 in verify
12605 compiler messages directives.
12607 2018-06-12 Matthew Fortune <mfortune@gmail.com>
12609 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
12610 * config/mips/mips-tables.opt: Regenerate.
12611 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
12613 * doc/invoke.texi: Document -march=i6500.
12615 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
12617 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
12618 (i6400_gpmul): Add cpu_unit.
12619 (i6400_gpdiv): Likewise.
12620 (i6400_msa_add_d): Update reservations.
12621 (i6400_msa_int_add) Likewise.
12622 (i6400_msa_short_logic3) Likewise.
12623 (i6400_msa_short_logic2) Likewise.
12624 (i6400_msa_short_logic) Likewise.
12625 (i6400_msa_move) Likewise.
12626 (i6400_msa_cmp) Likewise.
12627 (i6400_msa_short_float2) Likewise.
12628 (i6400_msa_div_d) Likewise.
12629 (i6400_msa_long_logic1) Likewise.
12630 (i6400_msa_long_logic2) Likewise.
12631 (i6400_msa_mult) Likewise.
12632 (i6400_msa_long_float2) Likewise.
12633 (i6400_msa_long_float4) Likewise.
12634 (i6400_msa_long_float5) Likewise.
12635 (i6400_msa_long_float8) Likewise.
12636 (i6400_fpu_fadd): Include frint type.
12637 (i6400_fpu_store): New define_insn_reservation.
12638 (i6400_fpu_load): Likewise.
12639 (i6400_fpu_move): Likewise.
12640 (i6400_fpu_fcmp): Likewise.
12641 (i6400_fpu_fmadd): Likewise.
12642 (i6400_int_mult): Include imul3nc type and update reservation.
12643 (i6400_int_div): Include idiv3 type and update reservation.
12644 (i6400_int_load): Update to check type not move_type.
12645 (i6400_int_store): Likewise.
12646 (i6400_int_prefetch): Set zero latency.
12648 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
12650 * gcc.c: Document new %@{...} sequence.
12651 (LINK_COMMAND_SPEC): Use it for the -L switches.
12652 (cpp_unique_options): Use it for the -I switches.
12653 (at_file_argbuf): New global variable.
12654 (in_at_file): Likewise.
12655 (alloc_args): Create at_file_argbuf.
12656 (clear_args): Truncate at_file_argbuf.
12657 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
12658 (open_at_file): New function.
12659 (close_at_file): Likewise.
12660 (create_at_file): Delete.
12661 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
12664 (validate_switches_from_spec): Deal with %@{...} sequence.
12665 (validate_switches): Likewise.
12666 (driver::finalize): Call clear_args.
12668 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
12670 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
12672 2018-06-11 Martin Sebor <msebor@redhat.com>
12674 * doc/invoke.texi (-Wall): List -Wc++17-compat.
12675 (Wno-class-memaccess): Add @opindex.
12676 (Wno-templates, Wno-multiple-inheritance): Same.
12677 (Wno-virtual-inheritance, Wno-namespaces): Same.
12678 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
12679 (Wno-format-overflow, Wno-format-truncation): Same.
12680 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
12681 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
12682 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
12683 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
12684 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
12685 (Wno-misspelled-isr): Same.
12687 2018-06-11 Martin Sebor <msebor@redhat.com>
12689 * PR tree-optimization/86083
12690 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
12692 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
12694 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
12696 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
12699 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
12700 on the correct operand.
12701 (*movdi_internal64): Ditto.
12703 2018-06-11 Martin Liska <mliska@suse.cz>
12705 PR tree-optimization/86089
12706 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
12708 2018-06-11 Julia Koval <julia.koval@intel.com>
12710 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
12711 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
12712 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
12714 2018-06-11 Olivier Hainque <hainque@adacore.com>
12716 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
12717 for Ada with strict dwarf2.
12719 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
12722 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
12725 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
12727 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12729 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
12731 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12734 2018-06-08 Martin Liska <mliska@suse.cz>
12736 * tree-cfg.h (debug_function): Fix argument type to match
12739 2018-06-08 Martin Liska <mliska@suse.cz>
12741 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12742 Remove usage of MPX-related (and removed) fields.
12743 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12745 2018-06-08 David Malcolm <dmalcolm@redhat.com>
12747 * cfg.c (debug): Use TDF_NONE rather than 0.
12748 * cfghooks.c (debug): Likewise.
12749 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12750 (struct dump_option_value_info): Convert to...
12751 (struct kv_pair): ...this template type.
12752 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12754 (optinfo_verbosity_options): Likewise.
12755 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12757 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12758 than int for "optgroup_flags" param.
12759 (dump_generic_expr_loc): Use dump_flags_t rather than int for
12761 (dump_dec): Likewise.
12762 (dump_finish): Use TDF_NONE rather than 0.
12763 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12764 rather than int for "optgroup_flags" param. Use TDF_NONE rather
12765 than 0. Update for change to option_ptr.
12766 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12767 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
12768 0. Update for changes to optinfo_verbosity_options and
12770 (opt_info_switch_p): Convert optgroup_flags from int to
12772 (dump_basic_block): Use dump_flags_t rather than int
12773 for "dump_kind" param.
12774 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12775 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12776 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12777 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12778 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12779 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12780 TDF_NONE): Convert from macros to...
12781 (enum dump_flag): ...this new enum.
12782 (dump_flags_t): Update to use enum.
12783 (operator|, operator&, operator~, operator|=, operator&=):
12784 Implement for dump_flags_t.
12785 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12786 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12787 Convert from macros to...
12788 (enum optgroup_flag): ...this new enum.
12789 (optgroup_flags_t): New typedef.
12790 (operator|, operator|=): Implement for optgroup_flags_t.
12791 (struct dump_file_info): Convert field "alt_flags" to
12792 dump_flags_t. Convert field "optgroup_flags" to
12794 (dump_basic_block): Use dump_flags_t rather than int for param.
12795 (dump_generic_expr_loc): Likewise.
12796 (dump_dec): Likewise.
12797 (dump_register): Convert param "optgroup_flags" to
12799 (opt_info_enable_passes): Likewise.
12800 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12802 * gimple-pretty-print.c (debug): Likewise.
12803 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12804 (merged_store_group::apply_stores): Likewise.
12805 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12806 * gimple.c (verify_gimple_pp): Likewise.
12807 * graphite-poly.c (print_pbb_body): Likewise.
12808 * passes.c (pass_manager::register_one_dump_file): Convert
12809 local "optgroup_flags" to optgroup_flags_t.
12810 * print-tree.c (print_node): Use TDF_NONE rather than 0.
12812 (debug_body): Likewise.
12813 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12814 to optgroup_flags_t.
12815 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12817 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12818 (convert_mult_to_fma): Likewise.
12819 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12820 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12821 * tree-vect-data-refs.c (dump_lower_bound): Convert param
12822 "dump_kind" to dump_flags_t.
12824 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12826 * config/rs6000/rs6000.c (min, max): Delete.
12828 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12830 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12831 -mabi=spe and -mabi=no-spe.
12833 2018-06-08 Martin Liska <mliska@suse.cz>
12835 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12836 where we expect an existing summary.
12838 2018-06-08 Martin Liska <mliska@suse.cz>
12840 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12841 * ipa-inline.h (estimate_edge_growth): Likewise.
12843 2018-06-08 Martin Liska <mliska@suse.cz>
12845 * cgraph.c (function_version_hasher::hash): Use
12846 cgraph_node::get_uid ().
12847 (function_version_hasher::equal):
12848 * cgraph.h (cgraph_node::get_uid): New method.
12849 * ipa-inline.c (update_caller_keys): Use
12850 cgraph_node::get_uid ().
12851 (update_callee_keys): Likewise.
12852 * ipa-utils.c (searchc): Likewise.
12853 (ipa_reduced_postorder): Likewise.
12854 * lto-cgraph.c (input_node): Likewise.
12855 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12856 * symbol-summary.h (symtab_insertion): Likewise.
12857 (symtab_removal): Likewise.
12858 (symtab_duplication): Likewise.
12859 * tree-pretty-print.c (dump_function_header): Likewise.
12860 * tree-sra.c (convert_callers_for_node): Likewise.
12862 2018-06-08 Martin Liska <mliska@suse.cz>
12864 * cgraph.c (symbol_table::create_edge): Always assign a new
12866 (symbol_table::free_edge): Do not recycle numbers.
12867 * cgraph.h (cgraph_edge::get): New method.
12868 * symbol-summary.h (symtab_removal): Use it.
12869 (symtab_duplication): Likewise.
12870 (call_summary::hashable_uid): Remove.
12872 2018-06-08 Martin Liska <mliska@suse.cz>
12874 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12875 (initialize_growth_caches): Remove.
12876 (free_growth_caches): Likewise.
12877 (do_estimate_edge_time): Use edge_growth_cache.
12878 (do_estimate_edge_size): Likewise.
12879 (do_estimate_edge_hints): Likewise.
12880 * ipa-inline.c (reset_edge_caches): Likewise.
12881 (recursive_inlining): Likewise.
12882 (inline_small_functions): Likewise.
12883 * ipa-inline.h (initialize_growth_caches): Remove.
12884 (estimate_edge_size): Likewise.
12885 (estimate_edge_time): Likewise.
12886 (estimate_edge_hints): Likewise.
12887 (reset_edge_growth_cache): Likewise.
12888 * symbol-summary.h (call_summary::remove): New method.
12890 2018-06-08 Martin Liska <mliska@suse.cz>
12892 * ipa-cp.c (class edge_clone_summary): New summary.
12893 (grow_edge_clone_vectors): Remove.
12894 (ipcp_edge_duplication_hook): Remove.
12895 (class edge_clone_summary_t): New call_summary class.
12896 (ipcp_edge_removal_hook): Remove.
12897 (edge_clone_summary_t::duplicate): New function.
12898 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12899 (create_specialized_node): Likewise.
12900 (ipcp_driver): Initialize edge_clone_summaries and do not
12903 2018-06-08 Martin Liska <mliska@suse.cz>
12905 * symbol-summary.h (get): New function.
12906 (call_summary::m_initialize_when_cloning): New class member.
12908 2018-06-08 Martin Liska <mliska@suse.cz>
12910 * cgraph.c (cgraph_node::remove): Do not recycle uid.
12911 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12912 (symbol_table::allocate_cgraph_symbol): Do not set uid.
12913 * passes.c (uid_hash_t): Record removed_nodes by their uids.
12914 (remove_cgraph_node_from_order): Use the removed_nodes set.
12915 (do_per_function_toporder): Likwise.
12916 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12917 instead of summary_uid.
12918 (symtab_removal): Likewise.
12919 (symtab_duplication): Likewise.
12921 2018-06-08 Martin Liska <mliska@suse.cz>
12923 * ipa-cp.c (ipcp_store_bits_results): Use
12924 ipcp_transformation_sum.
12925 (ipcp_store_vr_results): Likewise.
12926 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12928 (ipcp_transformation_initialize): ... this.
12929 (ipa_set_node_agg_value_chain):
12930 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12931 (write_ipcp_transformation_info): Likewise.
12932 (read_ipcp_transformation_info): Likewise.
12933 (ipcp_update_bits): Likewise.
12934 (ipcp_update_vr): Likewise.
12935 (ipcp_transform_function): Likewise.
12936 * ipa-prop.h: Rename ipcp_transformation_summary to
12937 ipcp_transformation.
12938 (class ipcp_transformation_t): New function summary.
12939 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12940 (ipa_get_agg_replacements_for_node): Likewise.
12942 2018-06-08 Martin Liska <mliska@suse.cz>
12944 * ipa-pure-const.c (struct funct_state_d): Do it class instead
12946 (class funct_state_summary_t): New function_summary class.
12947 (has_function_state): Remove.
12948 (get_function_state): Likewise.
12949 (set_function_state): Likewise.
12950 (add_new_function): Likewise.
12951 (funct_state_summary_t::insert): New function.
12952 (duplicate_node_data): Remove.
12953 (remove_node_data): Remove.
12954 (funct_state_summary_t::duplicate): New function.
12955 (register_hooks): Create new funct_state_summaries.
12956 (pure_const_generate_summary): Use it.
12957 (pure_const_write_summary): Likewise.
12958 (pure_const_read_summary): Likewise.
12959 (propagate_pure_const): Likewise.
12960 (propagate_nothrow): Likewise.
12961 (dump_malloc_lattice): Likewise.
12962 (propagate_malloc): Likewise.
12963 (execute): Do not register hooks, just remove summary
12965 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12968 2018-06-08 Martin Liska <mliska@suse.cz>
12970 * ipa-reference.c (remove_node_data): Remove.
12971 (duplicate_node_data): Likewise.
12972 (class ipa_ref_var_info_summary_t): New class.
12973 (class ipa_ref_opt_summary_t): Likewise.
12974 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12975 (get_reference_optimization_summary): Use
12976 ipa_ref_opt_sum_summaries.
12977 (set_reference_vars_info): Remove.
12978 (set_reference_optimization_summary): Likewise.
12979 (ipa_init): Create summaries.
12980 (init_function_info): Use function summary.
12981 (ipa_ref_opt_summary_t::duplicate): New function.
12982 (ipa_ref_opt_summary_t::remove): New function.
12983 (get_read_write_all_from_node): Fix GNU coding style.
12984 (propagate): Use function summary.
12985 (write_node_summary_p): Fix GNU coding style.
12986 (stream_out_bitmap): Likewise.
12987 (ipa_reference_read_optimization_summary): Use function summary.
12988 (ipa_reference_c_finalize): Do not release hooks.
12990 2018-06-08 Martin Liska <mliska@suse.cz>
12992 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12993 (analyze_function_body): Extract multiple calls of get_create.
12994 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12995 * ipa-inline.c (recursive_inlining): Use ::get method.
12996 * ipa-inline.h (estimate_edge_growth): Likewise.
12998 2018-06-08 Martin Liska <mliska@suse.cz>
13000 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13002 (hsa_function_summary::hsa_function_summary): Use the new enum
13004 (hsa_gpu_implementation_p): Use hsa_summaries::get.
13005 * hsa-gen.c (hsa_get_host_function): Likewise.
13006 (get_brig_function_name): Likewise.
13007 * ipa-hsa.c (process_hsa_functions): Likewise.
13008 (ipa_hsa_write_summary): Likewise.
13009 * symbol-summary.h (symtab_duplication): Use ::get function/
13010 (get): New function.
13012 2018-06-08 Martin Liska <mliska@suse.cz>
13014 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13016 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13017 (hsa_register_kernel): Likewise.
13018 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13019 * hsa-gen.c (hsa_get_host_function): Likewise.
13020 (get_brig_function_name): Likewise.
13021 (generate_hsa): Likewise.
13022 (pass_gen_hsail::execute): Likewise.
13023 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13024 (devirtualization_time_bonus): Likewise.
13025 (ipcp_propagate_stage): Likewise.
13026 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13027 (edge_set_predicate): Likewise.
13028 (evaluate_conditions_for_known_args): Likewise.
13029 (evaluate_properties_for_edge): Likewise.
13030 (ipa_fn_summary::reset): Likewise.
13031 (ipa_fn_summary_t::duplicate): Likewise.
13032 (dump_ipa_call_summary): Likewise.
13033 (ipa_dump_fn_summary): Likewise.
13034 (analyze_function_body): Likewise.
13035 (compute_fn_summary): Likewise.
13036 (estimate_edge_devirt_benefit): Likewise.
13037 (estimate_edge_size_and_time): Likewise.
13038 (estimate_calls_size_and_time): Likewise.
13039 (estimate_node_size_and_time): Likewise.
13040 (inline_update_callee_summaries): Likewise.
13041 (remap_edge_change_prob): Likewise.
13042 (remap_edge_summaries): Likewise.
13043 (ipa_merge_fn_summary_after_inlining): Likewise.
13044 (ipa_update_overall_fn_summary): Likewise.
13045 (read_ipa_call_summary): Likewise.
13046 (inline_read_section): Likewise.
13047 (write_ipa_call_summary): Likewise.
13048 (ipa_fn_summary_write): Likewise.
13049 (ipa_free_fn_summary): Likewise.
13050 * ipa-hsa.c (process_hsa_functions): Likewise.
13051 (ipa_hsa_write_summary): Likewise.
13052 (ipa_hsa_read_section): Likewise.
13053 * ipa-icf.c (sem_function::merge): Likewise.
13054 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13055 (do_estimate_edge_time): Likewise.
13056 (estimate_size_after_inlining): Likewise.
13057 (estimate_growth): Likewise.
13058 (growth_likely_positive): Likewise.
13059 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13060 (inline_call): Likewise.
13061 * ipa-inline.c (caller_growth_limits): Likewise.
13062 (can_inline_edge_p): Likewise.
13063 (can_inline_edge_by_limits_p): Likewise.
13064 (compute_uninlined_call_time): Likewise.
13065 (compute_inlined_call_time): Likewise.
13066 (want_inline_small_function_p): Likewise.
13067 (edge_badness): Likewise.
13068 (update_caller_keys): Likewise.
13069 (update_callee_keys): Likewise.
13070 (recursive_inlining): Likewise.
13071 (inline_small_functions): Likewise.
13072 (inline_to_all_callers_1): Likewise.
13073 (dump_overall_stats): Likewise.
13074 (early_inline_small_functions): Likewise.
13075 (early_inliner): Likewise.
13076 * ipa-inline.h (estimate_edge_growth): Likewise.
13077 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13078 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13079 * ipa-prop.h (IPA_NODE_REF): Likewise.
13080 (IPA_EDGE_REF): Likewise.
13081 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13082 (propagate_malloc): Likewise.
13083 * ipa-split.c (execute_split_functions): Likewise.
13084 * symbol-summary.h: Rename get to get_create.
13086 (get_create): Likewise.
13087 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13089 2018-06-08 Martin Liska <mliska@suse.cz>
13091 * symbol-summary.h (release): Move definition out of class
13093 (symtab_removal): Likewise.
13094 (symtab_duplication): Likewise.
13096 2018-06-08 Martin Liska <mliska@suse.cz>
13098 * symbol-summary.h (function_summary): Move constructor
13099 implementation out of class declaration.
13100 (release): Likewise.
13101 (symtab_insertion): Likewise.
13102 (symtab_removal): Likewise.
13103 (symtab_duplication): Likewise.
13106 2018-06-08 Martin Liska <mliska@suse.cz>
13108 * Makefile.in: Remove support for MPX (macros, related functions,
13109 fields in cgraph_node, ...).
13110 * builtin-types.def (BT_BND): Likewise.
13111 (BT_FN_BND_CONST_PTR): Likewise.
13112 (BT_FN_CONST_PTR_BND): Likewise.
13113 (BT_FN_VOID_PTR_BND): Likewise.
13114 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13115 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13116 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13117 (expand_builtin_mempcpy_with_bounds): Likewise.
13118 (expand_builtin_memset_with_bounds): Likewise.
13119 (expand_builtin_memset_args): Likewise.
13120 (std_expand_builtin_va_start): Likewise.
13121 (expand_builtin): Likewise.
13122 (expand_builtin_with_bounds): Likewise.
13123 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13124 (DEF_LIB_BUILTIN_CHKP): Likewise.
13125 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13126 (DEF_CHKP_BUILTIN): Likewise.
13127 (BUILT_IN_MEMCPY): Likewise.
13128 (BUILT_IN_MEMMOVE): Likewise.
13129 (BUILT_IN_MEMPCPY): Likewise.
13130 (BUILT_IN_MEMSET): Likewise.
13131 (BUILT_IN_STPCPY): Likewise.
13132 (BUILT_IN_STRCAT): Likewise.
13133 (BUILT_IN_STRCHR): Likewise.
13134 (BUILT_IN_STRCPY): Likewise.
13135 (BUILT_IN_STRLEN): Likewise.
13136 (BUILT_IN_MEMCPY_CHK): Likewise.
13137 (BUILT_IN_MEMMOVE_CHK): Likewise.
13138 (BUILT_IN_MEMPCPY_CHK): Likewise.
13139 (BUILT_IN_MEMSET_CHK): Likewise.
13140 (BUILT_IN_STPCPY_CHK): Likewise.
13141 (BUILT_IN_STRCAT_CHK): Likewise.
13142 (BUILT_IN_STRCPY_CHK): Likewise.
13143 * calls.c (store_bounds): Likewise.
13144 (emit_call_1): Likewise.
13145 (special_function_p): Likewise.
13146 (maybe_warn_nonstring_arg): Likewise.
13147 (initialize_argument_information): Likewise.
13148 (finalize_must_preallocate): Likewise.
13149 (compute_argument_addresses): Likewise.
13150 (expand_call): Likewise.
13151 * cfgexpand.c (expand_call_stmt): Likewise.
13152 (expand_return): Likewise.
13153 (expand_gimple_stmt_1): Likewise.
13154 (pass_expand::execute): Likewise.
13155 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13156 (cgraph_node::remove): Likewise.
13157 (cgraph_node::dump): Likewise.
13158 (cgraph_node::verify_node): Likewise.
13159 * cgraph.h (chkp_function_instrumented_p): Likewise.
13160 (symtab_node::get_alias_target): Likewise.
13161 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13162 (cgraph_local_p): Likewise.
13163 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13164 (cgraph_edge::rebuild_references): Likewise.
13165 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13166 (walk_polymorphic_call_targets): Likewise.
13167 (cgraph_node::expand_thunk): Likewise.
13168 (symbol_table::output_weakrefs): Likewise.
13169 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13170 (ix86_handle_option): Likewise.
13171 * config/i386/constraints.md: Likewise.
13172 * config/i386/i386-builtin-types.def (BND): Likewise.
13176 * config/i386/i386-builtin.def (BDESC_END): Likewise.
13177 (BDESC_FIRST): Likewise.
13179 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13180 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13181 * config/i386/i386.c (enum reg_class): Likewise.
13182 (ix86_target_string): Likewise.
13183 (ix86_option_override_internal): Likewise.
13184 (ix86_conditional_register_usage): Likewise.
13185 (ix86_valid_target_attribute_inner_p): Likewise.
13186 (ix86_set_indirect_branch_type): Likewise.
13187 (ix86_set_current_function): Likewise.
13188 (ix86_function_arg_regno_p): Likewise.
13189 (init_cumulative_args): Likewise.
13190 (ix86_function_arg_advance): Likewise.
13191 (ix86_function_arg): Likewise.
13192 (ix86_pass_by_reference): Likewise.
13193 (ix86_function_value_regno_p): Likewise.
13194 (ix86_function_value_1): Likewise.
13195 (ix86_function_value_bounds): Likewise.
13196 (ix86_return_in_memory): Likewise.
13197 (ix86_setup_incoming_vararg_bounds): Likewise.
13198 (ix86_va_start): Likewise.
13199 (indirect_thunk_need_prefix): Likewise.
13200 (print_reg): Likewise.
13201 (ix86_print_operand): Likewise.
13202 (ix86_expand_call): Likewise.
13203 (ix86_output_function_return): Likewise.
13204 (reg_encoded_number): Likewise.
13205 (BDESC_VERIFYS): Likewise.
13206 (ix86_init_mpx_builtins): Likewise.
13207 (ix86_init_builtins): Likewise.
13208 (ix86_emit_cmove): Likewise.
13209 (ix86_emit_move_max): Likewise.
13210 (ix86_expand_builtin): Likewise.
13211 (ix86_builtin_mpx_function): Likewise.
13212 (ix86_get_arg_address_for_bt): Likewise.
13213 (ix86_load_bounds): Likewise.
13214 (ix86_store_bounds): Likewise.
13215 (ix86_load_returned_bounds): Likewise.
13216 (ix86_store_returned_bounds): Likewise.
13217 (ix86_class_likely_spilled_p): Likewise.
13218 (ix86_hard_regno_mode_ok): Likewise.
13219 (x86_order_regs_for_local_alloc): Likewise.
13220 (ix86_mitigate_rop): Likewise.
13221 (ix86_bnd_prefixed_insn_p): Likewise.
13222 (ix86_mpx_bound_mode): Likewise.
13223 (ix86_make_bounds_constant): Likewise.
13224 (ix86_initialize_bounds): Likewise.
13225 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13226 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13227 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13228 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13229 (TARGET_CHKP_BOUND_MODE): Likewise.
13230 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13231 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13232 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13233 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13234 * config/i386/i386.h (TARGET_MPX): Likewise.
13235 (TARGET_MPX_P): Likewise.
13236 (VALID_BND_REG_MODE): Likewise.
13237 (FIRST_BND_REG): Likewise.
13238 (LAST_BND_REG): Likewise.
13239 (enum reg_class): Likewise.
13240 (BND_REG_P): Likewise.
13241 (BND_REGNO_P): Likewise.
13242 (BNDmode): Likewise.
13243 (ADJUST_INSN_LENGTH): Likewise.
13244 * config/i386/i386.md: Likewise.
13245 * config/i386/i386.opt: Likewise.
13246 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13247 (defined): Likewise.
13248 (LINK_MPX): Likewise.
13249 (MPX_SPEC): Likewise.
13250 (LIBMPX_SPEC): Likewise.
13251 (LIBMPXWRAPPERS_SPEC): Likewise.
13252 (CHKP_SPEC): Likewise.
13253 * config/i386/predicates.md: Likewise.
13254 * dbxout.c (dbxout_type): Likewise.
13255 * doc/extend.texi: Likewise.
13256 * doc/invoke.texi: Likewise.
13257 * doc/md.texi: Likewise.
13258 * doc/tm.texi: Likewise.
13259 * doc/tm.texi.in: Likewise.
13260 * dwarf2out.c (is_base_type): Likewise.
13261 (gen_formal_types_die): Likewise.
13262 (gen_subprogram_die): Likewise.
13263 (gen_type_die_with_usage): Likewise.
13264 (gen_decl_die): Likewise.
13265 (dwarf2out_late_global_decl): Likewise.
13266 * expr.c (expand_assignment): Likewise.
13267 (emit_storent_insn): Likewise.
13268 (store_expr_with_bounds): Likewise.
13269 (store_expr): Likewise.
13270 (expand_expr_real_1): Likewise.
13271 * expr.h (store_expr_with_bounds): Likewise.
13272 * function.c (use_register_for_decl): Likewise.
13273 (struct bounds_parm_data): Likewise.
13274 (assign_parms_augmented_arg_list): Likewise.
13275 (assign_parm_find_entry_rtl): Likewise.
13276 (assign_parm_is_stack_parm): Likewise.
13277 (assign_parm_load_bounds): Likewise.
13278 (assign_bounds): Likewise.
13279 (assign_parms): Likewise.
13280 (expand_function_start): Likewise.
13281 * gcc.c (CHKP_SPEC): Likewise.
13282 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13283 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13284 (wrestrict_dom_walker::check_call): Likewise.
13285 * gimple.c (gimple_build_call_from_tree): Likewise.
13286 * gimple.h (enum gf_mask): Likewise.
13287 (gimple_call_with_bounds_p): Likewise.
13288 (gimple_call_set_with_bounds): Likewise.
13289 * gimplify.c (gimplify_init_constructor): Likewise.
13290 * ipa-cp.c (initialize_node_lattices): Likewise.
13291 (propagate_constants_across_call): Likewise.
13292 (find_more_scalar_values_for_callers_subset): Likewise.
13293 * ipa-hsa.c (process_hsa_functions): Likewise.
13294 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
13295 * ipa-icf.c (sem_function::merge): Likewise.
13296 * ipa-inline.c (early_inliner): Likewise.
13297 * ipa-pure-const.c (warn_function_noreturn): Likewise.
13298 (warn_function_cold): Likewise.
13299 (propagate_pure_const): Likewise.
13300 * ipa-ref.h (enum GTY): Likewise.
13301 * ipa-split.c (find_retbnd): Likewise.
13302 (consider_split): Likewise.
13303 (split_function): Likewise.
13304 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
13305 * ipa.c (walk_polymorphic_call_targets): Likewise.
13306 (symbol_table::remove_unreachable_nodes): Likewise.
13307 (process_references): Likewise.
13308 (cgraph_build_static_cdtor_1): Likewise.
13309 * lto-cgraph.c (lto_output_node): Likewise.
13310 (output_refs): Likewise.
13311 (compute_ltrans_boundary): Likewise.
13312 (input_overwrite_node): Likewise.
13313 (input_node): Likewise.
13314 (input_cgraph_1): Likewise.
13315 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
13316 * passes.c (pass_manager::execute_early_local_passes): Likewise.
13317 (class pass_chkp_instrumentation_passes): Likewise.
13318 (make_pass_chkp_instrumentation_passes): Likewise.
13319 * passes.def: Likewise.
13320 * rtl.h (struct GTY): Likewise.
13321 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
13322 * stor-layout.c (layout_type): Likewise.
13323 * symtab.c: Likewise.
13324 * target.def: Likewise.
13325 * targhooks.c (default_chkp_bound_type): Likewise.
13326 (default_chkp_bound_mode): Likewise.
13327 (default_builtin_chkp_function): Likewise.
13328 (default_chkp_function_value_bounds): Likewise.
13329 (default_chkp_make_bounds_constant): Likewise.
13330 (default_chkp_initialize_bounds): Likewise.
13331 * targhooks.h (default_chkp_bound_type): Likewise.
13332 (default_chkp_bound_mode): Likewise.
13333 (default_builtin_chkp_function): Likewise.
13334 (default_chkp_function_value_bounds): Likewise.
13335 (default_chkp_make_bounds_constant): Likewise.
13336 (default_chkp_initialize_bounds): Likewise.
13337 * toplev.c (compile_file): Likewise.
13338 (process_options): Likewise.
13339 * tree-core.h (DEF_BUILTIN): Likewise.
13340 (DEF_BUILTIN_CHKP): Likewise.
13341 * tree-inline.c (declare_return_variable): Likewise.
13342 (remap_gimple_stmt): Likewise.
13343 (copy_bb): Likewise.
13344 (initialize_inlined_parameters): Likewise.
13345 (expand_call_inline): Likewise.
13346 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
13347 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
13348 (make_pass_ipa_chkp_produce_thunks): Likewise.
13349 (make_pass_chkp): Likewise.
13350 (make_pass_chkp_opt): Likewise.
13351 (make_pass_chkp_instrumentation_passes): Likewise.
13352 * tree-pretty-print.c (dump_generic_node): Likewise.
13353 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
13354 * tree-ssa-dce.c (propagate_necessity): Likewise.
13355 (eliminate_unnecessary_stmts): Likewise.
13356 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
13357 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
13358 * tree-ssa-sccvn.h: Likewise.
13359 * tree-ssa-strlen.c (get_string_length): Likewise.
13360 (valid_builtin_call): Likewise.
13361 (adjust_last_stmt): Likewise.
13362 (handle_builtin_strchr): Likewise.
13363 (handle_builtin_strcpy): Likewise.
13364 (handle_builtin_stxncpy): Likewise.
13365 (handle_builtin_memcpy): Likewise.
13366 (handle_builtin_strcat): Likewise.
13367 (strlen_check_and_optimize_stmt): Likewise.
13368 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
13369 * tree-streamer-in.c: Likewise.
13370 * tree-streamer.c (record_common_node): Likewise.
13371 * tree.c (tree_code_size): Likewise.
13372 (wide_int_to_tree_1): Likewise.
13373 (type_contains_placeholder_1): Likewise.
13374 (build_common_tree_nodes): Likewise.
13375 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
13376 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
13377 (POINTER_BOUNDS_P): Likewise.
13378 (BOUNDED_TYPE_P): Likewise.
13379 (BOUNDED_P): Likewise.
13380 (CALL_WITH_BOUNDS_P): Likewise.
13381 (pointer_bounds_type_node): Likewise.
13382 * value-prof.c (gimple_ic): Likewise.
13383 * var-tracking.c (vt_add_function_parameters): Likewise.
13384 * varasm.c (make_decl_rtl): Likewise.
13385 (assemble_start_function): Likewise.
13386 (output_constant): Likewise.
13387 (maybe_assemble_visibility): Likewise.
13388 * varpool.c (ctor_for_folding): Likewise.
13389 * chkp-builtins.def: Remove.
13390 * ipa-chkp.c: Remove.
13391 * ipa-chkp.h: Remove.
13392 * rtl-chkp.c: Remove.
13393 * rtl-chkp.h: Remove.
13394 * tree-chkp-opt.c: Remove.
13395 * tree-chkp.c: Remove.
13396 * tree-chkp.h: Remove.
13398 2018-06-07 Carl Love <cel@us.ibm.com>
13400 * config/rs6000/vsx.md (vextract_fp_from_shorth,
13401 vextract_fp_from_shortl): Add BE support.
13403 2018-06-07 Paul Koning <ni1d@arrl.net>
13405 * compare-elim.c (try_merge_compare): Don't merge compare if
13406 address contains a side effect.
13407 (try_eliminate_compare): Likewise.
13409 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
13411 * config.gcc: Support "tremont".
13412 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
13413 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13415 * config/i386/i386.c (m_TREMONT): Define.
13416 (processor_target_table): Add "tremont".
13417 (PTA_TREMONT): Define.
13418 (ix86_lea_outperforms): Add TARGET_TREMONT.
13419 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
13420 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
13421 and M_INTEL_GOLDMONT_PLUS.
13422 (fold_builtin_cpu): Add "tremont".
13423 (ix86_add_stmt_cost): Add TARGET_TREMONT.
13424 (ix86_option_override_internal): Add "tremont".
13425 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
13426 (processor_type): Add PROCESSOR_TREMONT.
13427 * config/i386/x86-tune.def: Add m_TREMONT.
13428 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
13430 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13432 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
13433 symbol defined for msp430i* devices to be lower case.
13435 2018-06-07 Richard Biener <rguenther@suse.de>
13437 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
13438 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
13439 Properly wrap signed arithmetic if overflow wraps.
13441 2018-06-07 Jakub Jelinek <jakub@redhat.com>
13443 PR tree-optimization/69615
13444 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
13445 of a cast from a same precision integral SSA_NAME in a bb dominated
13446 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
13447 cast to utype if rhs2 has already a compatible type.
13449 2018-06-07 Richard Biener <rguenther@suse.de>
13451 PR tree-optimization/85935
13452 * graphite-scop-detection.c (find_params_in_bb): Analyze
13453 condition operands with respect to the correct loop. Assert
13454 the analysis doesn't fail.
13456 2018-06-04 Carl Love <cel@us.ibm.com>
13458 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
13459 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
13460 as it is slightly cheaper.
13461 (first_match_or_eos_index_<mode>):
13462 Calculate index using natural element order.
13463 (first_match_index_<mode>):
13464 Calculate index using natural element order.
13465 (first_match_or_eos_index_<mode>):
13466 Calculate index using natural order.
13467 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
13468 for BE and LE modes.
13469 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
13470 P9V_BUILTIN_VCLZLSBB_V16QI.
13471 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
13474 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
13476 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
13477 indentation and line wrap for many prototypes. Add missing
13478 @smallexample directives around block of prototypes for vec_xl and
13481 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
13483 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
13484 track if we pass or return IEEE 128-bit floating point.
13485 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
13486 C++ mangling that is compatible with GCC 8.1.
13487 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
13488 (init_cumulative_args): Note if we pass or return IEEE 128-bit
13489 floating point types.
13490 (rs6000_function_arg_advance_1): Likewise.
13491 (rs6000_mangle_type): Optionally generate mangled names that match
13492 what GCC 8.1 generated for IEEE 128-bit floating point types.
13493 (rs6000_globalize_decl_name): If we have an external function that
13494 passes or returns IEEE 128-bit types, generate a weak reference
13495 from the mangled name used in GCC 8.1 to the current mangled
13497 (rs6000_init_builtins): Make __ibm128 use the long double type if
13498 long double is IBM extended double. Make __float128 use the long
13499 double type if long double is IEEE 128-bit.
13502 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
13503 macro for __ibm128 built-in functions.
13504 (PACK_IF): Add __ibm128 pack/unpack functions.
13505 (UNPACK_IF): Likewise.
13506 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
13507 enable long double built-in functions if long double is IEEE
13508 128-bit floating point.
13509 (rs6000_invalid_builtin): Update long double built-in function
13511 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
13512 functions, adjust the built-in function to use the long double
13513 built-in function if __ibm128 and long double are the same type.
13514 * doc/extend.texi (PowerPC builtins): Update documention for
13515 __builtin_{,un}pack_longdouble. Add documentation for
13516 __builtin_{,un}pack_ibm128.
13518 2018-06-06 Jim Wilson <jimw@sifive.com>
13520 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
13521 (struct machine_function): New field interrupt_mode.
13522 (riscv_handle_type_attribute): New function. Add forward declaration.
13523 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
13524 (riscv_expand_epilogue): Check interrupt_mode field.
13525 (riscv_set_current_function): Check interrupt attribute args and
13526 set interrupt_mode field.
13527 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
13528 (riscv_sret, riscv_uret): New.
13529 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
13530 new arguments to interrupt attribute.
13532 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
13535 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
13536 Don't handle -mcpu=power8 if -mpower9-vector is also used.
13538 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
13540 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
13541 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
13542 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13543 several redundant entries.
13545 2018-06-06 David Malcolm <dmalcolm@redhat.com>
13547 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
13548 type from "rtx" to "rtx_insn *".
13549 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
13550 for local "call_insn", removing cast.
13551 (ix86_expand_call): Likewise, introducing a "call_insn" local.
13553 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
13555 PR tree-optimization/86066
13556 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
13557 for BIT_INSERT_EXPR stores.
13559 2018-06-06 Richard Biener <rguenther@suse.de>
13561 PR tree-optimization/86062
13562 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13563 component refs ontop
13564 of to be offsetted base.
13566 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13568 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
13569 to be static and remove check on interrupt attribute name.
13571 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
13573 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13574 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
13576 2018-06-05 Steve Ellcey <sellcey@cavium.com>
13579 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
13581 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
13582 Remove second argument, change how error is called.
13583 (aarch64_layout_arg): Remove second argument from
13584 aarch64_err_no_fpadvsimd call.
13585 (aarch64_init_cumulative_args): Ditto.
13586 (aarch64_gimplify_va_arg_expr): Ditto.
13587 * config/aarch64/aarch64.md (mov<mode>): Ditto.
13589 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
13591 * config/i386/i386.md (simple_return_indirect_internal): New expander.
13592 (*simple_return_indirect_internal<mode>): Rename from
13593 simple_return_indirect_internal. Use W mode iterator.
13594 (rstorssp): New expander.
13595 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
13596 (clrssbsy): New expander.
13597 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
13599 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
13601 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
13603 (cmse_check_pointed_object): Likewise.
13605 2018-06-05 Martin Liska <mliska@suse.cz>
13607 PR gcov-profile/47618
13608 * doc/invoke.texi: Document how -fprofile-dir format
13611 2018-06-05 Richard Biener <rguenther@suse.de>
13613 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
13614 removal pretend DOM info isn't available so we do not update
13615 it and only remove edges, not dominated blocks. Actually free
13616 DOM info in case we removed something. Remove unreachable blocks.
13617 (mfb_keep_latches): Work with either DOM info or marked backedges.
13618 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
13619 first. Mark backedges if DOM info isn't available.
13620 (Re-)compute DOM info after cleanup_control_flow_pre.
13622 2018-06-05 Richard Biener <rguenther@suse.de>
13624 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
13625 (locus_discrim_hasher::hash): Adjust.
13626 (locus_discrim_hasher::equal): Likewise.
13627 (next_discriminator_for_locus): Work on line directly.
13628 (same_line_p): Pass in expanded locus1 as well.
13629 (assign_discriminators): Avoid redundant location expansions.
13631 2018-06-05 Richard Biener <rguenther@suse.de>
13633 PR tree-optimization/86046
13634 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
13635 if required after clearing TREE_ADDRESSABLE.
13637 2018-06-05 Richard Biener <rguenther@suse.de>
13639 PR tree-optimization/86047
13640 * tree-ssa-loop.c (for_each_index): Glob handling of all
13641 decls and constants and really handle all of them.
13643 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13646 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
13647 qualifier_void_pointer and qualifier_const_void_pointer.
13648 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
13649 (arm_init_builtins): Handle the above.
13650 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
13651 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
13652 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
13655 2018-06-05 Martin Liska <mliska@suse.cz>
13657 * auto-profile.c (read_autofdo_file): Do not use
13658 gcov_ctr_summary struct.
13659 (afdo_callsite_hot_enough_for_early_inline): Likewise.
13660 * coverage.c (struct counts_entry): Likewise.
13661 (read_counts_file): Read just single summary entry.
13662 (get_coverage_counts): Use gcov_summary struct.
13663 * coverage.h (get_coverage_counts): Likewise.
13664 * gcov-dump.c (dump_working_sets): Likewise.
13665 (tag_summary): Dump just single summary.
13666 * gcov-io.c (gcov_write_summary): Write just histogram
13668 (gcov_read_summary): Read just single summary.
13669 (compute_working_sets): Use gcov_summary struct.
13670 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
13671 of GCOV_COUNTERS_SUMMABLE.
13672 (GCOV_COUNTERS_SUMMABLE): Remove.
13673 (GCOV_FIRST_VALUE_COUNTER): Replace with
13674 GCOV_COUNTER_V_INTERVAL.
13675 (struct gcov_ctr_summary): Remove.
13676 (struct gcov_summary): Directly use fields of former
13678 (compute_working_sets): Use gcov_summary struct.
13679 * gcov.c (read_count_file): Do not use ctrs fields.
13680 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
13682 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
13684 * profile.c: Likewise.
13685 * profile.h: Likewise.
13687 2018-06-05 Martin Liska <mliska@suse.cz>
13689 PR gcov-profile/84846
13690 * gcov.c (output_lines): Print working directory only
13691 in intermediate format.
13693 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
13695 * config/s390/s390-builtin-types.def: Add void function type.
13696 * config/s390/s390-builtins.def: Use the function type for the
13699 2018-06-04 Jim Wilson <jimw@sifive.com>
13701 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
13703 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
13704 and maybe_eh_return. Change regno to unsigned int. Use new args to
13705 handle EH_RETURN_DATA_REGNO registers properly.
13706 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
13707 (riscv_expand_epilogue): Update comment. Change argument name and
13708 type. Update code to use new name and type. Pass new args to
13709 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
13711 * config/riscv/riscv.md (NORMAL_RETURN): New.
13712 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
13713 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
13714 (eh_return): Call gen_eh_return_internal and emit barrier.
13715 (eh_return_internal): Call riscv_expand_epilogue.
13717 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
13719 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
13720 bit_insertion field and declare can_be_merged_into method.
13721 (merged_store_group::can_be_merged_into): New method.
13722 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
13723 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
13724 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
13726 2018-06-04 Richard Biener <rguenther@suse.de>
13728 PR tree-optimization/85955
13729 * builtins.c (fold_builtin_sincos): Convert pointers to
13730 destination to appropriate type before dereferencing.
13732 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
13734 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13736 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
13738 * expr.c (expand_expr_real_1): Force the operand into memory if
13739 its TYPE_MODE is BLKmode and if there is no integer mode for
13740 the number of bits being extracted.
13742 2018-06-04 Jakub Jelinek <jakub@redhat.com>
13746 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13747 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13749 2018-06-04 Richard Biener <rguenther@suse.de>
13751 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13752 (cleanup_tree_cfg_noloop): ... single caller. Do
13753 start_recording_case_labels later.
13755 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
13757 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13758 to _IMMINTRIN_H_INCLUDED.
13759 * config/i386/pconfigintrin.h: Ditto.
13760 * config/i386/waitpkgintrin.h: Ditto.
13761 * config/i386/immintrin.h: Add includes for sgxintrin.h,
13762 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13763 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13764 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13765 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13766 waitpkgintrin.h and cldemoteintrin.h.
13768 2018-06-04 Richard Biener <rguenther@suse.de>
13770 PR tree-optimization/86038
13771 * tracer.c (find_best_successor): Check probability for
13772 being initialized, bail out if not.
13774 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
13777 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13778 of bits to ignore when comparing architectures.
13780 2018-06-04 Jakub Jelinek <jakub@redhat.com>
13782 PR tree-optimization/69615
13783 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13784 maximum or minimum of the type, try to merge it also as if
13785 range1 is + [-, x - 1] or + [x + 1, -].
13788 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13790 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
13792 PR tree-optimization/86034
13793 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13794 the unsigned bitfield type in a bit insertion sequence if it does not
13795 have a larger precision than the bitfield size.
13796 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13798 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
13800 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13802 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13804 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13805 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13806 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13807 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13809 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13811 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13812 Disable -fdelete-null-pointer-checks for ELF toolchain.
13814 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13815 Kito Cheng <kito.cheng@gmail.com>
13817 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13818 (nds32le-*-*, nds32be-*-*): Integrate checking process.
13819 (nds32*-*-*): Add glibc and uclibc conditions.
13820 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13821 (TARGET_EXCEPT_UNWIND_INFO): Define.
13822 * config/nds32/elf.h: New file.
13823 * config/nds32/linux.h: New file.
13824 * config/nds32/nds32-elf.opt: New file.
13825 * config/nds32/nds32-linux.opt: New file.
13826 * config/nds32/nds32-fp-as-gp.c
13827 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13828 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13830 (nds32_asm_file_end): Ditto.
13831 (nds32_print_operand): Ditto.
13832 (nds32_insert_attributes): Ditto.
13833 (nds32_init_libfuncs): New function.
13834 (TARGET_HAVE_TLS): Define.
13835 (TARGET_INIT_LIBFUNCS): Define.
13836 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13838 (TARGET_ELF): Apply different mcmodel setting.
13839 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13840 been migrated into elf.h and linux.h files.
13841 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13842 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13843 (mcmodel): The content has been migrated into nds32-elf.opt and
13844 nds32-linux.opt files.
13845 * config/nds32/t-elf: New file.
13846 * config/nds32/t-linux: New file.
13848 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13849 Shiva Chen <shiva0217@gmail.com>
13851 * config/nds32/constants.md (unspec_volatile_element): Add
13852 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13853 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13855 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13856 (make_pass_nds32_fp_as_gp): Declare.
13857 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13859 (nds32_asm_function_end_prologue): Remove unused asm output.
13860 (nds32_asm_function_begin_epilogue): Remove unused asm output.
13861 (nds32_asm_file_start): Output necessary fp_as_gp information.
13862 (nds32_option_override): Adjust register usage.
13863 (nds32_expand_prologue): Consider fp_as_gp situation.
13864 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13865 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13868 (simple_return): Ditto.
13869 (omit_fp_begin): Output special directive for fp_as_gp.
13870 (omit_fp_end): Output special directive for fp_as_gp.
13871 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13872 mforbid-fp-as-gp): New options.
13874 2018-06-01 Mark Wielaard <mark@klomp.org>
13876 * dwarf2out.c (dwarf2out_finish): Remove generation of
13877 DW_AT_loclists_base.
13879 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
13881 * gimple-ssa-store-merging.c: Include gimple-fold.h.
13882 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13883 (struct merged_store_group): Add bit_insertion field.
13884 (dump_char_array): Use standard hexadecimal format.
13885 (merged_store_group::merged_store_group): Set bit_insertion to false.
13886 (merged_store_group::apply_stores): Use optimal buffer size. Deal
13887 with BIT_INSERT_EXPR stores. Move up code updating the mask and
13888 also print the mask in the dump file.
13889 (pass_store_merging::gate): Minor tweak.
13890 (imm_store_chain_info::coalesce_immediate): Fix wrong association
13891 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
13892 stores with INTEGER_CST stores.
13893 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13894 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13895 and use it throughout. Generate bit insertion sequences if need be.
13896 (pass_store_merging::process_store): Remove redundant condition.
13897 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13899 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
13901 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13902 the 128-bit floating point types. Fix function comment.
13904 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13906 * config/aarch64/aarch64-simd.md
13907 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13909 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13912 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13914 PR tree-optimization/85989
13915 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13917 (backprop::intersect_uses): Check it when deciding whether this
13918 is a backedge reference.
13919 (backprop::process_block): Add each phi to m_visited_phis
13920 after visiting it, then clear it at the end.
13922 2018-06-01 Richard Biener <rguenther@suse.de>
13924 * tree-vectorizer.h (vect_dr_stmt): New function.
13925 (vect_get_load_cost): Adjust.
13926 (vect_get_store_cost): Likewise.
13927 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13928 Use vect_dr_stmt instead of DR_SMTT.
13929 (vect_record_base_alignments): Likewise.
13930 (vect_calculate_target_alignment): Likewise.
13931 (vect_compute_data_ref_alignment): Likewise and make static.
13932 (vect_update_misalignment_for_peel): Likewise.
13933 (vect_verify_datarefs_alignment): Likewise.
13934 (vector_alignment_reachable_p): Likewise.
13935 (vect_get_data_access_cost): Likewise. Pass down
13936 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13937 (vect_get_peeling_costs_all_drs): Likewise.
13938 (vect_peeling_hash_get_lowest_cost): Likewise.
13939 (vect_enhance_data_refs_alignment): Likewise.
13940 (vect_find_same_alignment_drs): Likewise.
13941 (vect_analyze_data_refs_alignment): Likewise.
13942 (vect_analyze_group_access_1): Likewise.
13943 (vect_analyze_group_access): Likewise.
13944 (vect_analyze_data_ref_access): Likewise.
13945 (vect_analyze_data_ref_accesses): Likewise.
13946 (vect_vfa_segment_size): Likewise.
13947 (vect_small_gap_p): Likewise.
13948 (vectorizable_with_step_bound_p): Likewise.
13949 (vect_prune_runtime_alias_test_list): Likewise.
13950 (vect_analyze_data_refs): Likewise.
13951 (vect_supportable_dr_alignment): Likewise.
13952 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13953 (vect_gen_prolog_loop_niters): Likewise.
13954 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13955 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13957 (vect_recog_mask_conversion_pattern): Likewise.
13958 (vect_try_gather_scatter_pattern): Likewise.
13959 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13960 to vect_get_store_cost.
13961 (vect_get_store_cost): Get stmt_info instead of DR.
13962 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13963 (vect_get_load_cost): Get stmt_info instead of DR.
13965 2018-06-01 Richard Biener <rguenther@suse.de>
13967 PR middle-end/86017
13968 * gimple-fold.c (var_decl_component_p): Also allow offsetted
13969 vars wrapped in MEM_REFs.
13971 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13973 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13974 Fix subreg tests so that we only return a choice between
13975 GENERAL_REGS and FP_REGS if the original classes included both.
13977 2018-06-01 Richard Biener <rguenther@suse.de>
13980 * tree-ssa-structalias.c (get_function_part_constraint):
13981 Handle NULL fi->decl.
13982 (find_func_aliases_for_call): Properly handle indirect
13983 fi from direct call.
13984 (find_func_clobbers): Likewise.
13985 (ipa_pta_execute): Likewise.
13986 (create_variable_info_for): For functions that are ifunc_resolver
13987 resolve to a varinfo that contains the result of the resolver call.
13988 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13991 2018-05-31 Michael Collison <michael.collison@arm.com>
13993 * config/aarch64/aarch64.md:
13994 (*fix_to_zero_extenddfdi2): New pattern.
13995 * gcc.target/aarch64/fix_extend1.c: New testcase.
13997 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
13999 PR middle-end/78809
14000 PR middle-end/83026
14001 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14002 and BUILT_IN_STRNCMP_EQ.
14003 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14004 BUILT_IN_STRNCMP_EQ.
14005 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14006 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14007 (gimple_fold_builtin): Likewise.
14008 * tree-ssa-strlen.c (compute_string_length): New function.
14009 (determine_min_obsize): New function.
14010 (handle_builtin_string_cmp): New function to handle calls to
14011 string compare functions.
14012 (strlen_optimize_stmt): Add handling to builtin string compare
14014 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14015 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14016 * tree.c (build_common_builtin_nodes): Add new defines of
14017 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14019 2018-05-31 Jakub Jelinek <jakub@redhat.com>
14022 * bb-reorder.c (pass_partition_blocks::gate): Return false for
14023 functions with naked attribute.
14025 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
14027 * config/i386/sse.md (avx_vec_concat<mode>):
14028 Substitute concat_tg_mode mode attribute with xtg_mode.
14029 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14030 (concat_tg_mode): Remove mode attribute.
14032 2018-05-31 Martin Sebor <msebor@redhat.com>
14035 * calls.c (alloc_max_size): Correct a logic error/typo.
14036 Treat excessive arguments as infinite. Warn for invalid arguments.
14037 * doc/invoke.texi (-Walloc-size-larger-than): Update.
14039 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
14042 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14043 and movx for Haswell.
14045 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
14046 Cesar Philippidis <cesar@codesourcery.com>
14048 PR middle-end/85879
14049 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14050 when emitting error on private/firstprivate reductions.
14051 * omp-low.c (lower_omp_target): Avoid reference-type processing
14052 on pointers for firstprivate clause.
14054 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14056 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14059 * config/aarch64/aarch64-simd.md
14060 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14061 (aarch64_ld1_x3_<mode>): Likewise
14062 (aarch64_st1x2<VALLDIF:mode>): Likewise
14063 (aarch64_st1_x2_<mode>): Likewise
14064 (aarch64_st1x3<VALLDIF:mode>): Likewise
14065 (aarch64_st1_x3_<mode>): Likewise
14066 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14067 (vld1_s8_x3): Likewise.
14068 (vld1_u16_x3): Likewise.
14069 (vld1_s16_x3): Likewise.
14070 (vld1_u32_x3): Likewise.
14071 (vld1_s32_x3): Likewise.
14072 (vld1_u64_x3): Likewise.
14073 (vld1_s64_x3): Likewise.
14074 (vld1_f16_x3): Likewise.
14075 (vld1_f32_x3): Likewise.
14076 (vld1_f64_x3): Likewise.
14077 (vld1_p8_x3): Likewise.
14078 (vld1_p16_x3): Likewise.
14079 (vld1_p64_x3): Likewise.
14080 (vld1q_u8_x3): Likewise.
14081 (vld1q_s8_x3): Likewise.
14082 (vld1q_u16_x3): Likewise.
14083 (vld1q_s16_x3): Likewise.
14084 (vld1q_u32_x3): Likewise.
14085 (vld1q_s32_x3): Likewise.
14086 (vld1q_u64_x3): Likewise.
14087 (vld1q_s64_x3): Likewise.
14088 (vld1q_f16_x3): Likewise.
14089 (vld1q_f32_x3): Likewise.
14090 (vld1q_f64_x3): Likewise.
14091 (vld1q_p8_x3): Likewise.
14092 (vld1q_p16_x3): Likewise.
14093 (vld1q_p64_x3): Likewise.
14094 (vst1_s64_x2): Likewise.
14095 (vst1_u64_x2): Likewise.
14096 (vst1_f64_x2): Likewise.
14097 (vst1_s8_x2): Likewise.
14098 (vst1_p8_x2): Likewise.
14099 (vst1_s16_x2): Likewise.
14100 (vst1_p16_x2): Likewise.
14101 (vst1_s32_x2): Likewise.
14102 (vst1_u8_x2): Likewise.
14103 (vst1_u16_x2): Likewise.
14104 (vst1_u32_x2): Likewise.
14105 (vst1_f16_x2): Likewise.
14106 (vst1_f32_x2): Likewise.
14107 (vst1_p64_x2): Likewise.
14108 (vst1q_s8_x2): Likewise.
14109 (vst1q_p8_x2): Likewise.
14110 (vst1q_s16_x2): Likewise.
14111 (vst1q_p16_x2): Likewise.
14112 (vst1q_s32_x2): Likewise.
14113 (vst1q_s64_x2): Likewise.
14114 (vst1q_u8_x2): Likewise.
14115 (vst1q_u16_x2): Likewise.
14116 (vst1q_u32_x2): Likewise.
14117 (vst1q_u64_x2): Likewise.
14118 (vst1q_f16_x2): Likewise.
14119 (vst1q_f32_x2): Likewise.
14120 (vst1q_f64_x2): Likewise.
14121 (vst1q_p64_x2): Likewise.
14122 (vst1_s64_x3): Likewise.
14123 (vst1_u64_x3): Likewise.
14124 (vst1_f64_x3): Likewise.
14125 (vst1_s8_x3): Likewise.
14126 (vst1_p8_x3): Likewise.
14127 (vst1_s16_x3): Likewise.
14128 (vst1_p16_x3): Likewise.
14129 (vst1_s32_x3): Likewise.
14130 (vst1_u8_x3): Likewise.
14131 (vst1_u16_x3): Likewise.
14132 (vst1_u32_x3): Likewise.
14133 (vst1_f16_x3): Likewise.
14134 (vst1_f32_x3): Likewise.
14135 (vst1_p64_x3): Likewise.
14136 (vst1q_s8_x3): Likewise.
14137 (vst1q_p8_x3): Likewise.
14138 (vst1q_s16_x3): Likewise.
14139 (vst1q_p16_x3): Likewise.
14140 (vst1q_s32_x3): Likewise.
14141 (vst1q_s64_x3): Likewise.
14142 (vst1q_u8_x3): Likewise.
14143 (vst1q_u16_x3): Likewise.
14144 (vst1q_u32_x3): Likewise.
14145 (vst1q_u64_x3): Likewise.
14146 (vst1q_f16_x3): Likewise.
14147 (vst1q_f32_x3): Likewise.
14148 (vst1q_f64_x3): Likewise.
14149 (vst1q_p64_x3): Likewise.
14151 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14153 * config/msp430/msp430.c (msp430_output_labelref): Prepend
14154 user_label_prefix to name.
14156 * tree-core.h: Update comment about the format of NAME string
14157 passed to handler in attribute_spec.
14159 * config/msp430/msp430.md: Remove erroneous subreg expression from
14160 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14161 zero_extend{q,h}isi2.
14163 2018-05-30 Borislav Petkov <bp@suse.de>
14165 * doc/extend.texi: Document some architecture specific
14166 constraints and sort entries.
14168 2018-05-30 Martin Sebor <msebor@redhat.com>
14170 PR middle-end/85369
14171 * builtins.c (expand_builtin_stpcpy_1): New function.
14172 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14173 only if the former succeeds.
14175 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14177 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14180 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14182 * doc/invoke.texi (-flinker-output): Document
14184 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14186 * passes.c (ipa_write_summaries): Only modify statements if body
14188 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14189 incrementally linking.
14190 (ipa_passes): Likewise.
14191 * lto-cgraph.c (lto_output_node): When incrementally linking do not
14192 pass down resolution info.
14193 * common.opt (flag_incremental_link): Update info.
14194 * gcc.c (plugin specs): Turn flinker-output=* to
14195 -plugin-opt=-linker-output-known
14196 * toplev.c (compile_file): Also cut compilation when doing incremental
14198 * flag-types. (enum lto_partition_model): Add
14199 LTO_LINKER_OUTPUT_NOLTOREL.
14200 (invoke.texi): Add -flinker-output docs.
14201 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14202 link same way as WPA; do not stream in dead initializers.
14204 * dwarf2out.c (dwarf2out_die_ref_for_decl,
14205 darf2out_register_external_decl): Support incremental link.
14207 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14209 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14211 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14213 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14214 it down to simple_object_copy_lto_debug_sections.
14215 (run_gcc): Determine incremental LTO link time and configure
14216 lto1 into non-wpa mode, disable renaming of debug sections.
14218 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
14220 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14221 descriptions of various incorrectly documented functions.
14223 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
14226 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14227 address check not strict.
14229 2018-05-30 Richard Biener <rguenther@suse.de>
14231 PR tree-optimization/85964
14232 * tracer.c (better_p): Drop initialized count check, we only
14233 call the function with initialized counts now.
14234 (find_best_successor): Do find a best edge if one
14235 has uninitialized count.
14236 (find_best_predecessor): Likewise. Do BB frequency check only
14237 if count is initialized.
14239 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
14241 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14242 (aarch64_ldrstr_offset_compare): New.
14243 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14244 load/store orderings.
14245 (aarch64_gen_adjusted_ldpstp): Likewise.
14247 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
14249 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14250 Check for subset of GENERAL_REGS and FP_REGS.
14251 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14254 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
14256 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14257 and wi::to_poly_offset. Add the current offset and then check
14258 whether the sum fits, rather than using an unchecked addition of
14259 a checked term. Check for a shwi rather than a uhwi.
14260 * expr.c (get_bit_range): Use tree_to_poly_uint64.
14261 (store_constructor): Use poly_int_tree_p.
14262 (expand_expr_real_1): Likewise.
14263 * function.c (assign_temp): Likewise.
14264 * fold-const.c (const_binop): Use poly_int_tree_p and
14265 wi::to_poly_offset.
14266 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
14268 * ipa-icf-gimple.c (func_checker::compare_operand): Use
14269 to_poly_offset for MEM offsets.
14270 * ipa-icf.c (sem_variable::equals): Likewise.
14271 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14272 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14273 wi::to_poly_offset for BIT_FIELD_REF offsets.
14274 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14275 wi::to_poly_offset.
14276 * var-tracking.c (emit_note_insn_var_location): Use
14277 tree_to_poly_uint64.
14279 2018-05-29 Jim Wilson <jimw@sifive.com>
14281 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14283 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
14286 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
14287 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
14289 (sse4_1_round<mode>2): Use nonimmediate_operand
14290 for operand 1 predicate.
14292 2018-05-29 Martin Sebor <msebor@redhat.com>
14293 Richard Biener <rguenther@suse.de>
14296 * calls.c (get_size_range): Call determine_value_range instead
14297 of get_value_range..
14298 * tree-vrp.h (determine_value_range): Declared new function.
14299 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
14301 2018-05-29 Richard Biener <rguenther@suse.de>
14303 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
14304 sure to use non-pattern stmts for get_earlier_stmt arguments.
14305 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
14306 called on pattern stmts.
14307 (get_later_stmt): Likewise.
14309 2018-05-29 Martin Liska <mliska@suse.cz>
14311 PR gcov-profile/85759
14312 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
14315 2018-05-29 Jakub Jelinek <jakub@redhat.com>
14317 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
14319 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
14323 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14324 VEC_PACK_FLOAT_EXPR): New tree codes.
14325 * tree-pretty-print.c (op_code_prio): Handle
14326 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14327 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14328 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14329 * tree-inline.c (estimate_operator_cost): Likewise.
14330 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
14331 * fold-const.c (const_binop): Likewise.
14332 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
14333 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14334 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14335 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
14336 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14337 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14338 * expr.c (expand_expr_real_2): Likewise.
14339 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
14340 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
14341 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
14343 * optabs.c (expand_widen_pattern_expr): For
14344 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
14345 sign from result type rather than operand's type.
14346 (expand_binop_directly): For vec_packu_float_optab and
14347 vec_packs_float_optab allow result type to be different from operand's
14349 * optabs-tree.c (optab_for_tree_code): Handle
14350 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14351 VEC_PACK_FLOAT_EXPR. Formatting fixes.
14352 * tree-vect-generic.c (expand_vector_operations_1): Handle
14353 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14354 VEC_PACK_FLOAT_EXPR.
14355 * tree-vect-stmts.c (supportable_widening_operation): Handle
14357 (supportable_narrowing_operation): Handle FLOAT_EXPR.
14358 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
14359 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
14360 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
14361 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
14363 (vec_pack<floatprefix>_float_<mode>): New expander.
14364 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
14366 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
14367 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
14368 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
14369 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
14370 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
14372 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
14373 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
14374 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14375 VEC_PACK_FLOAT_EXPR): Document.
14377 2018-05-29 Richard Biener <rguenther@suse.de>
14379 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
14381 (stmt_vec_info_vec): Make pointer.
14382 (init_stmt_vec_info_vec): Remove.
14383 (free_stmt_vec_info_vec): Likewise.
14384 (set_stmt_vec_info_vec): New function.
14385 (free_stmt_vec_infos): Likewise.
14386 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
14387 (set_vinfo_for_stmt): Likewise.
14388 (get_earlier_stmt): Likewise.
14389 (get_later_stmt): Likewise.
14390 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
14391 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
14392 (vec_info::~vec_info): Free stmt_vec_infos.
14393 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
14394 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
14395 (pass_slp_vectorize::execute): Likewise.
14396 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
14397 (free_stmt_vec_info_vec): Likewise.
14398 (set_stmt_vec_info_vec): New function.
14399 (free_stmt_vec_infos): Likewise.
14400 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
14401 the global stmt_vec_info_vec.
14402 * tree-parloops.c (gather_scalar_reductions): Use
14403 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
14406 2018-05-29 Richard Biener <rguenther@suse.de>
14408 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
14410 2018-05-29 Martin Liska <mliska@suse.cz>
14411 David Malcolm <dmalcolm@redhat.com>
14413 * vec.c (test_reverse): New.
14414 (vec_c_tests): Add new test.
14415 * vec.h (vl_ptr>::reverse): New function.
14417 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
14419 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
14421 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
14424 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
14426 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
14428 2018-05-28 Richard Biener <rguenther@suse.de>
14430 PR tree-optimization/85933
14431 * tree-vect-data-refs.c (vect_record_base_alignments): Only
14432 look at stmts marked as vectorizable.
14434 2018-05-28 Richard Biener <rguenther@suse.de>
14436 PR tree-optimization/85934
14437 * tree-vect-generic.c (expand_vector_operations_1): Hoist
14438 vector boolean check before scalar optimization.
14440 2018-05-28 Jakub Jelinek <jakub@redhat.com>
14442 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
14445 2018-05-28 Mark Wielaard <mark@klomp.org>
14447 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
14448 if it is an expression containing a minus sign.
14450 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
14452 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
14454 2018-05-27 Paul Koning <ni1d@arrl.net>
14456 * config/pdp11/pdp11.md (truncsihi2): Remove.
14458 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
14459 Chung-Ju Wu <jasonwucj@gmail.com>
14461 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
14463 (unaligned_store_dw): Ditto.
14464 * config/nds32/nds32-memory-manipulation.c
14465 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
14466 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
14467 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
14468 (emit_setmem_word_loop): Rename to ...
14469 (emit_setmem_doubleword_loop): ... this.
14470 (nds32_gen_dup_4_byte_to_word_value): New function.
14471 (nds32_gen_dup_8_byte_to_double_word_value): New function.
14472 (nds32_expand_setmem_loop): Refine implementation.
14473 (nds32_expand_setmem_loop_v3m): Ditto.
14474 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
14477 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
14479 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
14481 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
14483 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
14484 (nds32_init_machine_status): Initialize machine->attr_naked_p and
14485 machine->attr_no_prologue_p.
14486 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
14487 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
14488 (nds32_expand_epilogue): Consider attr_naked_p.
14489 (nds32_expand_epilogue_v3pop): Likewise.
14490 (nds32_can_use_return_insn): Likewise.
14491 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
14492 attr_no_prologue_p fields.
14493 * config/nds32/nds32.opt (mret-in-naked-func): New option.
14495 2018-05-27 Jakub Jelinek <jakub@redhat.com>
14498 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
14500 * config/i386/sse.md
14501 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
14503 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
14505 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
14507 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
14509 (*<floatsuffix>floatv2div2sf2): Rename to ...
14510 (*float<floatunssuffix>v2div2sf2): ... this.
14511 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
14512 (float<floatunssuffix>v2div2sf2_mask): ... this.
14513 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
14514 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
14515 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
14517 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
14519 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14521 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14523 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14525 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14527 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
14528 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
14529 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
14530 gen_ufix_truncv8dfv8si2.
14531 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
14532 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
14533 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
14534 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
14535 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
14536 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
14537 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
14538 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
14540 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
14544 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
14546 2018-05-25 Jim Wilson <jimw@sifive.com>
14548 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
14549 * config/riscv/riscv.c (struct machine_function): Add
14550 interrupt_handler_p and attribute_checked_p fields.
14551 (riscv_attribute_table): Add interrupt.
14552 (riscv_interrupt_type_p): New.
14553 (riscv_save_reg_p): Save extra regs for interrupt handler.
14554 (riscv_use_save_libcall): Return false for interrupt handler.
14555 (riscv_first_stack_step): Add forward declaration.
14556 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
14557 for interrupt handler with large frame. Use it for saved reg list.
14558 (riscv_expand_prologue): Move flag_stack_usage_info support to
14559 eliminate duplication.
14560 (riscv_expand_epilogue): Generate mret for interrupt handler.
14561 (riscv_epilogue_uses): New.
14562 (riscv_can_use_return_insn): Return false for interrupt handler.
14563 (riscv_function_ok_for_sibcall): Likewise.
14564 (riscv_set_current_function): Add interrupt handler support.
14565 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
14566 * config/riscv/riscv.md (UNSPECV_MRET): New.
14568 (riscv_frflags, riscv_fsflags): Use tab after opcode.
14570 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
14572 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
14574 PR tree-optimization/85712
14575 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
14576 this candidate has already been replaced in-situ by a copy.
14578 2018-05-25 Jason Merrill <jason@redhat.com>
14580 PR c++/80485 - inline function non-zero address.
14581 * symtab.c (nonzero_address): Check DECL_COMDAT.
14583 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
14586 * config/alpha/alpha.md (ashlsi3): New insn pattern.
14587 (*ashlsi_se): Rename from *ashldi_se. Define as sign
14588 extension of SImode operation. Use const123_operand predicate.
14589 (*saddsi_1): Remove.
14590 (*saddl_se_1): Ditto.
14591 (*ssubsi_1): Ditto.
14592 (*ssubl_se_1): Ditto.
14593 * config/alpha/predicates.md (const123_operand): New predicate.
14594 * config/alpha/constraints.md (P): Use IN_RANGE.
14596 2018-05-25 Richard Biener <rguenther@suse.de>
14598 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
14600 (ref_maybe_used_by_stmt_p): Likewise.
14601 (stmt_may_clobber_ref_p): Likewise.
14602 (stmt_may_clobber_ref_p_1): Likewise.
14603 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
14605 (ref_maybe_used_by_stmt_p): Likewise.
14606 (stmt_may_clobber_ref_p): Likewise.
14607 (stmt_may_clobber_ref_p_1): Likewise.
14608 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14609 the alias oracle to disambiguate DRs with stmts DR analysis
14611 (vect_analyze_data_refs): Do not give up on not analyzable
14612 DRs for BB vectorization. Remove code truncating the dataref
14615 2018-05-25 Jakub Jelinek <jakub@redhat.com>
14618 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14619 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
14620 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
14622 2018-05-25 Richard Biener <rguenther@suse.de>
14624 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
14625 function, combining stmt data ref gathering and fatal analysis
14627 (vect_analyze_data_refs): Remove now redudnant code and simplify.
14628 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
14629 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
14630 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
14631 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
14633 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14635 PR tree-optimization/85720
14636 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
14637 SCC if all partitions are builtins.
14638 (version_loop_by_alias_check): New parameter. Generate cancelable
14639 runtime alias check if all partitions are builtins.
14640 (distribute_loop): Update call to above function.
14642 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14644 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
14645 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
14646 (parm_default_def_partition_arg): Ditto.
14647 (set_parm_default_def_partition): Ditto.
14648 (get_parm_default_def_partitions): Ditto and make it static.
14649 (get_undefined_value_partitions): Ditto and make it static.
14650 (remove_ssa_form): Refactor call to init_var_map here.
14651 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
14652 computation for loop region.
14653 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
14654 (register_default_def): Delete.
14655 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
14656 (parm_default_def_partition_arg): Ditto.
14657 (set_parm_default_def_partition): Ditto.
14658 (get_parm_default_def_partitions): Ditto and make it static.
14659 (get_undefined_value_partitions): Ditto and make it static.
14660 (coalesce_with_default, coalesce_with_default): Update comment.
14661 (create_coalesce_list_for_region): New func factored out from
14662 create_outofssa_var_map.
14663 (populate_coalesce_list_for_outofssa): New func factored out from
14664 create_outofssa_var_map and coalesce_ssa_name.
14665 (create_outofssa_var_map): Delete.
14666 (coalesce_ssa_name): Refactor to support live range computation.
14667 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
14668 (get_parm_default_def_partitions): Delete.
14669 (get_undefined_value_partitions): Ditto.
14670 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
14671 computation for loop region.
14672 (new_tree_live_info, loe_visit_block): Ditto.
14673 (live_worklist, set_var_live_on_entry): Ditto.
14674 (calculate_live_on_exit, verify_live_on_entry): Ditto.
14675 * tree-ssa-live.h (struct _var_map): New fields.
14676 (init_var_map): Change decl.
14677 (region_contains_p): New.
14679 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14681 * tree-ssa-live.h (live_merge_and_clear): Delete.
14683 2018-05-25 Richard Biener <rguenther@suse.de>
14686 * tree-dump.c (dequeue_and_dump): Remove access to removed
14687 operand 2 of a SWITCH_EXPR.
14689 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14691 * doc/sourcebuild.texi (vect_double_cond_arith): Include
14692 multiplication and division.
14693 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
14694 (cond_udiv@var{m}, cond_umod@var{m}): Document.
14695 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
14696 (cond_udiv_optab, cond_umod_optab): New optabs.
14697 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
14698 (IFN_COND_RDIV): New internal functions.
14699 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
14700 TRUNC_MOD_EXPR and RDIV_EXPR.
14701 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14702 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
14704 (SVE_INT_BINARY): Include mult.
14705 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
14706 (optab, sve_int_op): Handle mult.
14707 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
14709 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
14710 for SVE_INT_BINARY_SD.
14712 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14714 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
14715 (optab, sve_int_op): Handle div and udiv.
14716 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
14717 for SVE_INT_BINARY_SD.
14718 (*<optab><mode>3): New insn for the same.
14720 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14722 * tree-vect-patterns.c: Include predict.h.
14723 (vect_recog_divmod_pattern): Restrict check for division support
14724 to when optimizing for size.
14726 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14728 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14729 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14730 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14731 (gimple_match_op::set_op): Likewise.
14732 (gimple_resimplify4): Declare.
14733 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14734 (expr::gen_transform): Likewise.
14735 (decision_tree::gen): Generate a simplification routine for 4 operands.
14736 * gimple-match-head.c (gimple_simplify): Add an overload for
14737 4 operands. In the top-level function, handle up to 4 call
14738 arguments and call gimple_resimplify4.
14739 (gimple_resimplify4): New function.
14740 (build_call_internal): Pass a fourth operand.
14741 (maybe_push_to_seq): Likewise.
14742 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14743 Fold VEC_COND_EXPRs of an operation and a default value into
14744 an IFN_COND_* function if possible.
14745 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14747 (SVE_COND_FP_BINARY): Include them.
14748 (optab, sve_fp_op): Handle them.
14749 (SVE_INT_BINARY_REV): New code iterator.
14750 (SVE_COND_FP_BINARY_REV): New int iterator.
14751 (commutative): New int attribute.
14752 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14754 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14756 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14757 (*cond_<optab><mode>): New patterns for reversed operands.
14759 2018-05-25 Richard Biener <rguenther@suse.de>
14761 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14762 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14763 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14764 (STMT_VINFO_GROUPED_ACCESS): Adjust.
14765 * tree-vect-data-refs.c (everywhere): Adjust users.
14766 * tree-vect-loop.c (everywhere): Likewise.
14767 * tree-vect-slp.c (everywhere): Likewise.
14768 * tree-vect-stmts.c (everywhere): Likewise.
14769 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14771 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14773 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14775 (gcc_cv_as_section_exclude): ... this.
14776 Try Solaris as #exclude syntax.
14777 * configure: Regenerate.
14778 * config.in: Regenerate.
14779 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14781 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14782 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14784 * varasm.c (default_elf_asm_named_section): Don't check if
14785 HAVE_GAS_SECTION_EXCLUDE is defined.
14787 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14789 * doc/md.texi: Update the documentation of the cond_* optabs
14790 to mention the new final operand. Fix GET_MODE_NUNITS call.
14791 Describe the scalar case too.
14792 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14793 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14795 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14796 (get_conditional_internal_fn): Update comment.
14797 * tree-vect-loop.c (vectorizable_reduction): Pass the original
14798 accumulator value as a final argument to conditional functions.
14799 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14800 a define_expand and add an "else" operand. Assert for now that
14801 the else operand is equal to operand 2. Use SVE_INT_BINARY and
14802 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14803 (*cond_<optab><mode>): New patterns.
14804 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14805 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14806 (UNSPEC_COND_EOR): Delete.
14807 (optab): Remove associated mappings.
14808 (SVE_INT_BINARY): New code iterator.
14809 (sve_int_op): Remove int attribute and add "minus" to the code
14811 (SVE_COND_INT_OP): Delete.
14812 (SVE_COND_FP_OP): Rename to...
14813 (SVE_COND_FP_BINARY): ...this.
14815 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14817 * optabs.c (can_reuse_operands_p): New function.
14818 (maybe_legitimize_operands): Try to reuse the results for
14821 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14823 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14824 Add {q} suffix to insn mnemonic.
14826 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14828 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14829 (msp430_warn_func_return): New.
14831 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
14833 * fold-const.c (tree_nonzero_bits): New function.
14834 * fold-const.h (tree_nonzero_bits): Likewise.
14835 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14836 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14838 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
14842 * varasm.c (assemble_alias): Check ifunc_resolver only on
14845 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14848 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14849 when memory input operand is handled.
14851 2018-05-24 Luis Machado <luis.machado@linaro.org>
14853 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14855 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14857 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14859 * match.pd: Delay FMA folds until after vectorization.
14861 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
14864 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14865 address check not strict.
14867 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14869 * gimple-match.h (gimple_match_op): New class.
14870 (mprts_hook): Replace parameters with a gimple_match_op *.
14871 (maybe_build_generic_op): Likewise.
14872 (gimple_simplified_result_is_gimple_val): Replace parameters with
14873 a const gimple_match_op *.
14874 (gimple_simplify): Replace code_helper * and tree * parameters with
14875 a gimple_match_op * parameter.
14876 (gimple_resimplify1): Replace code_helper *, tree and tree *
14877 parameters with a gimple_match_op * parameter.
14878 (gimple_resimplify2): Likewise.
14879 (gimple_resimplify3): Likewise.
14880 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14881 parameters with a gimple_match_op * parameter.
14882 * gimple-match-head.c (gimple_simplify): Change prototypes of
14883 auto-generated functions to take a gimple_match_op * instead of
14884 separate code_helper * and tree * parameters. Make the same
14885 change in the top-level overload and update calls to the
14886 gimple_resimplify routines. Update calls to the auto-generated
14887 functions and to maybe_push_res_to_seq in the publicly-facing
14888 operation-specific gimple_simplify overloads.
14889 (gimple_match_op::MAX_NUM_OPS): Define.
14890 (gimple_resimplify1): Replace rcode and ops with a single res_op
14891 parameter. Update call to gimple_simplify.
14892 (gimple_resimplify2): Likewise.
14893 (gimple_resimplify3): Likewise.
14894 (mprts_hook): Replace parameters with a gimple_match_op *.
14895 (maybe_build_generic_op): Likewise.
14896 (build_call_internal): Replace type, nargs and ops with
14897 a gimple_match_op *.
14898 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14899 with a single gimple_match_op *. Update calls to mprts_hook,
14900 build_call_internal and gimple_simplified_result_is_gimple_val.
14901 Factor out code that is common to the tree_code and combined_fn cases.
14902 * genmatch.c (expr::gen_transform): Replace tem_code and
14903 tem_ops with a gimple_match_op called tem_op. Update calls
14904 to the gimple_resimplify functions and maybe_push_res_to_seq.
14905 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14906 res_ops. Update call to the gimple_resimplify functions.
14907 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14908 (decision_tree::gen): Make the functions take a gimple_match_op *
14909 called res_op instead of separate res_code and res_ops parameters.
14910 Update call accordingly.
14911 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14912 and ops with a single res_op parameter. Update calls to
14913 maybe_build_generic_op and maybe_push_res_to_seq.
14914 (fold_stmt_1): Update calls to gimple_simplify and
14915 replace_stmt_with_simplification.
14916 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14917 and gimple_simplified_result_is_gimple_val.
14918 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14920 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14921 with a gimple_match_op *.
14922 (vn_nary_build_or_lookup): Likewise. Update call to
14923 vn_nary_build_or_lookup_1.
14924 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14925 gimple_match_op *. Update calls to the gimple_resimplify routines
14926 and to gimple_simplified_result_is_gimple_val.
14927 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14928 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14929 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14930 (visit_nary_op): Likewise.
14931 (visit_reference_op_load): Likewise.
14933 2018-05-23 Luis Machado <luis.machado@linaro.org>
14935 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14936 modifier for printing the step amount.
14938 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
14941 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14944 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
14946 * doc/sourcebuild.texi (Endianness): New subsubsection.
14948 2018-05-23 Luis Machado <luis.machado@linaro.org>
14950 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14951 <prefetch_dynamic_strides>: New const bool field.
14952 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14953 prefetch_dynamic_strides.
14954 (exynosm1_prefetch_tune): Likewise.
14955 (thunderxt88_prefetch_tune): Likewise.
14956 (thunderx_prefetch_tune): Likewise.
14957 (thunderx2t99_prefetch_tune): Likewise.
14958 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14960 (aarch64_override_options_internal): Update to set
14961 PARAM_PREFETCH_DYNAMIC_STRIDES.
14962 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14963 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14964 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14965 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14966 prefetch-dynamic-strides setting.
14968 2018-05-23 Luis Machado <luis.machado@linaro.org>
14970 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14971 <minimum_stride>: New const int field.
14972 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14973 minimum_stride field defaulting to -1.
14974 (exynosm1_prefetch_tune): Likewise.
14975 (thunderxt88_prefetch_tune): Likewise.
14976 (thunderx_prefetch_tune): Likewise.
14977 (thunderx2t99_prefetch_tune): Likewise.
14978 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14979 <default_opt_level>: Set to 3.
14980 (aarch64_override_options_internal): Update to set
14981 PARAM_PREFETCH_MINIMUM_STRIDE.
14982 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14983 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14984 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14985 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14986 stride is constant and is below the minimum stride threshold.
14988 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14990 * config/arm/arm-cpus.in (mode26): Delete.
14991 (armv4): Delete mode26 reference.
14992 * config/arm/arm.c (arm_configure_build_target): Delete use of
14995 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14997 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14999 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15000 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
15002 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
15003 (floatunsdidf2): Ditto.
15005 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15007 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15008 (fixuns_trunc<mode>si2_avx512f): Ditto.
15009 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15010 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15011 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15013 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15015 PR rtl-optimization/79985
15016 * df-scan.c (df_insn_refs_collect): Remove special case for
15017 global registers and asm statements.
15019 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15021 * extend.texi (Global Register Variables): Rewrite the bullet list.
15022 Note that the register is available for allocation. Note that access
15023 via inline asm must use constraints. Add note about async-signal
15024 handlers. Remove paragraph about automagic register selection.
15026 2018-05-23 Richard Biener <rguenther@suse.de>
15028 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15029 of fixed offset from memset VN.
15031 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
15033 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15034 first_interp field.
15035 (alloc_cand_and_find_basis): Initialize first_interp field.
15036 (slsr_process_mul): Modify first_interp field.
15037 (slsr_process_add): Likewise.
15038 (slsr_process_cast): Modify first_interp field for each new
15040 (slsr_process_copy): Likewise.
15041 (dump_candidate): Dump first_interp field.
15042 (replace_mult_candidate): Process all interpretations, not just
15044 (replace_rhs_if_not_dup): Likewise.
15045 (replace_one_candidate): Likewise.
15047 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
15049 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15051 (aarch64_needs_frame_chain): New function.
15052 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15054 2018-05-23 Sudakshina Das <sudi.das@arm.com>
15057 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15058 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15059 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15060 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15061 as true for strict-align.
15062 (aarch64_can_inline_p): Perform checks even when callee has no
15063 attributes to check for strict alignment.
15064 * doc/extend.texi (AArch64 Function Attributes): Document
15066 * doc/invoke.texi: (AArch64 Options): Likewise.
15068 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
15070 PR tree-optimization/85853
15071 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15072 the handling of the root of the node to...
15073 (vect_slp_analyze_node_operations_1): ...this new function,
15074 and run the whole thing with the child nodes' def types
15075 set according to their SLP node's def type.
15077 2018-05-23 Richard Biener <rguenther@suse.de>
15079 PR middle-end/85874
15080 * tree-data-ref.c (create_runtime_alias_checks): Defer
15081 and ignore overflow warnings.
15083 2018-05-23 Yury Gribov <tetra2005@gmail.com>
15085 PR tree-optimization/85822
15086 * tree-vrp.c (is_masked_range_test): Fix handling of negative
15089 2018-05-23 Richard Biener <rguenther@suse.de>
15091 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15092 memset constants via native_interpret_expr.
15094 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
15097 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15099 (cgraph_node::create_alias): Likewise.
15100 (cgraph_node::get_availability): Check ifunc_resolver instead
15101 of looking up ifunc attribute.
15102 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15103 * varasm.c (do_assemble_alias): Likewise.
15104 (assemble_alias): Likewise.
15105 (default_binds_local_p_3): Likewise.
15106 * cgraph.h (cgraph_node): Add ifunc_resolver.
15107 (cgraph_node::only_called_directly_or_aliased_p): Return false
15108 for IFUNC resolver.
15109 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15111 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15112 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15113 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15114 instead of looking up ifunc attribute.
15116 2018-05-22 Luis Machado <luis.machado@linaro.org>
15118 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15120 2018-05-22 Martin Sebor <msebor@redhat.com>
15122 PR middle-end/85359
15123 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15124 only when expasion succeeds.
15125 (expand_builtin_strcmp): Same.
15126 (expand_builtin_strncmp): Same.
15128 2018-05-22 Martin Sebor <msebor@redhat.com>
15130 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15132 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15133 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15135 * config/aarch64/aarch64-ldpstp.md: Replace uses of
15136 aarch64_mem_pair_operand with memory_operand and delete operand swapping
15138 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15139 Add check for legitimate_address.
15140 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15141 (aarch64_swap_ldrstr_operands): New.
15142 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15145 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15146 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15148 * config/aarch64/aarch64.md: New patterns to generate stp
15150 (store_pair_sw, store_pair_dw): New patterns to generate stp for
15151 single words and double words.
15152 (load_pair_sw, load_pair_dw): Likewise.
15153 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15155 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15157 * config/aarch64/aarch64-ldpstp.md: Modify peephole
15158 for different mode ldpstp and add peephole for merged zero stores.
15159 Likewise for loads.
15160 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15162 (aarch64_gen_store_pair): Rename calls to match new patterns.
15163 (aarch64_gen_load_pair): Rename calls to match new patterns.
15164 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15165 (load_pair<DREG:mode><DREG2:mode>): ... This.
15166 (store_pair<mode>): Rename to...
15167 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15168 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15169 New mode iterators.
15170 (V_INT_EQUIV): Handle SImode.
15171 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15174 2018-05-22 Martin Sebor <msebor@redhat.com>
15177 * calls.c (maybe_warn_nonstring_arg): Use string length to set
15178 or ajust the presumed bound on an operation to avoid unnecessary
15181 2018-05-22 Martin Sebor <msebor@redhat.com>
15183 PR tree-optimization/85826
15184 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15185 assuming that a DECL necesarily has a constant size.
15187 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
15189 PR middle-end/85862
15190 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15192 2018-05-22 Richard Biener <rguenther@suse.de>
15194 PR tree-optimization/85834
15195 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15196 non-constant and non-zero memset arguments.
15198 2018-05-22 Martin Liska <mliska@suse.cz>
15201 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15203 2018-05-22 Richard Biener <rguenther@suse.de>
15205 PR tree-optimization/85863
15206 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15207 comparisons when vectype is specified.
15208 (vectorizable_condition): Do not specify vectype for
15209 vect_is_simple_cond when SLP vectorizing.
15211 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
15214 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15215 define __ibm128 as long double.
15216 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15217 as a distinct type when IEEE 128-bit support is enabled.
15218 (init_float128_ieee): Fix up conversions between IFmode and IEEE
15219 128-bit types to use the correct functions.
15220 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15221 convert between 128-bit floating point types that have different
15222 modes but the same representation, instead of using gen_lowpart to
15224 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15226 (IFKF_reg): New attributes to give the register constraints for
15228 (extend<mode>tf2_internal): New insns to mark an explicit
15229 conversion between 128-bit floating point types that have a
15230 different mode but share the same representation.
15232 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
15234 PR tree-optimization/85814
15235 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15236 a null return from get_strinfo when unsharing the next
15237 strinfo in the chain.
15239 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15242 * varasm.c (weak_finish): Clean up weak_decls.
15244 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15246 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15247 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15248 UNSPEC_UADALP values.
15249 * config/aarch64/iterators.md (ABAL): New int iterator.
15252 (sur): Add mappings for the above.
15253 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15255 (aarch64_<sur>abal<mode>_4): Likewise.
15256 (aarch64_<sur>adalp<mode>_3): Likewise.
15257 (<sur>sadv16qi): New define_expand.
15259 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
15261 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15262 (*movdf_internal): Ditto.
15263 (*rcpsf2_sse): Ditto.
15264 (*rsqrtsf2_sse): Ditto.
15265 (*sqrt<mode>2_sse): Ditto.
15267 2018-05-21 Tamar Christina <tamar.christina@arm.com>
15269 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15271 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15272 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15273 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15274 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15276 * config/aarch64/arm_neon.h: Likewise.
15277 * config/aarch64/iterators.md (VQ_I): New.
15279 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
15281 * config.gcc: Add arc/t-multilib-linux to tmake_file for
15283 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
15286 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
15288 * config/nds32/constraints.md (S): New constraint.
15289 * config/nds32/nds32.md (call_internal): Use constraint S.
15290 (call_value_internal): Likewise.
15291 (sibcall_internal): Likewise.
15292 (sibcall_value_internal): Likewise.
15294 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
15295 Chung-Ju Wu <jasonwucj@gmail.com>
15297 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
15298 into consideration.
15300 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
15301 Chung-Ju Wu <jasonwucj@gmail.com>
15303 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
15304 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
15305 (nds32_rtx_costs_impl): Simplify.
15306 (nds32_address_cost_impl): Simplify.
15307 (nds32_init_rtx_costs): New function.
15308 (nds32_rtx_costs_speed_prefer): Likewise.
15309 (nds32_rtx_costs_size_prefer): Likewise.
15310 (nds32_address_cost_speed_prefer): Likewise.
15311 (nds32_address_cost_speed_fwprop): Likewise.
15312 (nds32_address_cost_size_prefer): Likewise.
15313 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
15314 * config/nds32/nds32.c (nds32_option_override): Use
15315 nds32_init_rtx_costs function.
15317 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
15319 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
15320 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
15321 (TARGET_PIPELINE_N8): Likewise.
15322 (TARGET_PIPELINE_N10): Likewise.
15323 (TARGET_PIPELINE_N13): Likewise.
15324 (TARGET_PIPELINE_GRAYWOLF): Likewise.
15326 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
15328 * config/nds32/nds32-fpu.md: Update copyright year.
15330 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15332 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
15334 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15336 * config/nds32/nds32.c
15337 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
15338 * config/nds32/nds32.opt (minline-asm-r15): New option.
15340 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15342 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
15344 * config/nds32/nds32.md (abssi2): New pattern.
15346 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
15348 * config/i386/i386.md (rex64namesuffix): New mode attribute.
15349 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
15350 Merge insn pattern from sse_cvtsi2ss<round_name> and
15351 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
15352 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
15353 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
15354 using SWI48 mode iterator.
15355 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
15356 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
15357 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
15358 pattern from sse_cvttss2si<round_saeonly_name>
15359 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
15360 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
15361 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
15362 using SWI48 mode iterator.
15363 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
15364 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
15365 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
15366 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
15367 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
15368 using SWI48 mode iterator.
15369 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
15370 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
15371 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
15372 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
15373 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
15374 SWI48 mode iterator.
15375 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
15376 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
15377 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
15378 pattern from sse_cvttsd2si<round_saeonly_name>
15379 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
15381 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15383 * config/nds32/nds32-md-auxiliary.c
15384 (nds32_valid_smw_lwm_base_p): Refine.
15385 (nds32_output_smw_single_word): Refine.
15386 (nds32_output_smw_double_word): New.
15387 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
15389 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15391 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
15392 (nds32_output_stack_pop): Refine.
15393 (nds32_expand_unaligned_load): Refine.
15394 (nds32_expand_unaligned_store): Refine.
15396 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15397 Chung-Ju Wu <jasonwucj@gmail.com>
15399 * config/nds32/constants.md: Add TP_REGNUM constant.
15400 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
15401 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
15403 * config/nds32/nds32-doubleword.md: Consider flag_pic.
15404 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
15405 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
15406 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
15407 and PIC code generation.
15408 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
15410 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
15412 * config/nds32/nds32.md: Support TLS and PIC.
15413 * config/nds32/nds32.c: Support TLS and PIC.
15414 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
15415 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
15418 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15420 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
15421 mode with E_ prefix.
15423 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15424 Chung-Ju Wu <jasonwucj@gmail.com>
15426 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
15427 * config/nds32/nds32-md-auxiliary.c
15428 (symbolic_reference_mentioned_p): New.
15429 (nds32_legitimize_ict_address): New.
15430 (nds32_expand_ict_move): New.
15431 (nds32_indirect_call_referenced_p): New.
15432 (nds32_symbol_binds_local_p): Delete.
15433 (nds32_long_call_p): Modify.
15434 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
15435 * config/nds32/nds32-protos.h
15436 (symbolic_reference_mentioned_p): Declare.
15437 (nds32_legitimize_ict_address): Declare.
15438 (nds32_expand_ict_move): Declare.
15439 (nds32_indirect_call_referenced_p): Declare.
15440 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
15441 (nds32_relax_group): Use nds32_ict_const_p as condition.
15442 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
15443 (nds32_asm_file_start): Output ict_model directive in asm code.
15444 (nds32_legitimate_address_p): Consider indirect call.
15445 (nds32_print_operand): Consider indirect call.
15446 (nds32_print_operand_address): Consider indirect call.
15447 (nds32_insert_attributes): Handle "indirect_call" attribute.
15448 (TARGET_LEGITIMATE_ADDRESS_P): Define.
15449 (TARGET_LEGITIMATE_CONSTANT_P): Define.
15450 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
15451 (TARGET_DELEGITIMIZE_ADDRESS): Define.
15452 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
15453 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
15454 (TARGET_ICT_MODEL_SMALL): Define.
15455 (TARGET_ICT_MODEL_LARGE): Define.
15456 * config/nds32/nds32.md (movsi): Consider ict model.
15457 (call, call_value): Consider ict model.
15458 (sibcall, sibcall_value): Consider ict model.
15459 * config/nds32/nds32.opt (mict-model): New option.
15460 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
15463 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
15464 Monk Chiang <sh.chiang04@gmail.com>
15465 Jim Wilson <jimw@sifive.com>
15467 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
15468 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
15469 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
15470 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
15471 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
15472 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
15473 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
15474 compute save_libcall_adjustment properly.
15475 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
15476 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
15477 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
15478 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
15479 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
15480 (ABI_SPEC): Handle mabi=ilp32e.
15481 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
15482 (RVE): Add RVE mask.
15483 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
15484 <-march>: Add rv32e as an example.
15486 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
15489 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
15490 (intra_create_variable_infos): Handle C++ constructors.
15492 2018-05-18 Martin Liska <mliska@suse.cz>
15494 * passes.def: Remove a redundant pass.
15496 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
15499 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
15501 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15503 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
15505 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
15507 (armv2, armv2a, armv3, armv3m): Delete architectures.
15508 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
15509 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
15510 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
15512 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
15513 (*mulsidi3adddi): Likewise.
15514 (mulsidi3): Likewise.
15515 (*mulsidi3_nov6): Likewise.
15516 (umulsidi3): Likewise.
15517 (umulsidi3_nov6): Likewise.
15518 (umaddsidi4): Likewise.
15519 (*umulsidi3adddi): Likewise.
15520 (smulsi3_highpart): Likewise.
15521 (*smulsi3_highpart_nov6): Likewise.
15522 (umulsi3_highpart): Likewise.
15523 (*umulsi3_highpart_nov6): Likewise.
15524 * config/arm/arm.h (arm_arch3m): Delete.
15525 * config/arm/arm.c (arm_arch3m): Delete.
15526 (arm_option_override_internal): Update armv3-related comment.
15527 (arm_configure_build_target): Delete use of isa_bit_mode32.
15528 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
15529 (arm_rtx_costs_internal): Delete check of arm_arch3m.
15530 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
15531 (mulsa3): Likewise.
15532 (mulusa3): Likewise.
15533 * config/arm/arm-protos.h (arm_arch3m): Delete.
15534 * config/arm/arm-tables.opt: Regenerate.
15535 * config/arm/arm-tune.md: Likewise.
15536 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
15537 deleted architectures.
15539 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15541 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
15542 (armv5t, armv5te): New features.
15543 (ARMv5, ARMv5e): Delete fgroups.
15544 (ARMv5t, ARMv5te): Adjust for above changes.
15545 (ARMv6m): Likewise.
15546 (armv5, armv5e): Delete arches.
15547 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
15549 (*call_reg_arm): Likewise.
15550 (*call_value_reg_armv5): Likewise.
15551 (*call_value_reg_arm): Likewise.
15552 (*call_symbol): Likewise.
15553 (*call_value_symbol): Likewise.
15554 (*sibcall_insn): Likewise.
15555 (*sibcall_value_insn): Likewise.
15556 (clzsi2): Likewise.
15557 (prefetch): Likewise.
15558 (define_split and define_peephole2 dependent on arm_arch5):
15560 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
15562 (TARGET_ARM_QBIT): Likewise.
15563 (TARGET_DSP_MULTIPLY): Likewise.
15564 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
15565 (arm_arch5, arm_arch5e): Delete.
15566 (arm_arch5t, arm_arch5te): Declare.
15567 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
15568 (arm_arch5t): Declare.
15569 (arm_option_reconfigure_globals): Update for the above.
15570 (arm_options_perform_arch_sanity_checks): Update comment, replace
15571 use of arm_arch5 with arm_arch5t.
15572 (use_return_insn): Likewise.
15573 (arm_emit_call_insn): Likewise.
15574 (output_return_instruction): Likewise.
15575 (arm_final_prescan_insn): Likewise.
15576 (arm_coproc_builtin_available): Likewise.
15577 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
15578 arm_arch5e with arm_arch5t and arm_arch5te.
15579 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
15580 (arm_arch5t, arm_arch5te): Declare.
15581 * config/arm/arm-tables.opt: Regenerate.
15582 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
15583 * config/arm/t-multilib: Likewise.
15584 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
15585 instead of arm_arch5.
15586 (*call_reg_thumb1): Likewise.
15587 (*call_value_reg_thumb1_v5): Likewise.
15588 (*call_value_reg_thumb1): Likewise.
15589 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
15591 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
15593 2018-05-18 Martin Liska <mliska@suse.cz>
15595 PR gcov-profile/84846
15596 * doc/gcov.texi: Document -t option of gcov tool.
15598 2018-05-18 Martin Liska <mliska@suse.cz>
15600 PR gcov-profile/84846
15601 * gcov.c (print_usage): Add new -t option.
15602 (process_args): Handle the option.
15603 (generate_results): Use stdout as output when requested by
15606 2018-05-18 Martin Liska <mliska@suse.cz>
15608 PR gcov-profile/84846
15609 * coverage.c (coverage_init): Write PWD to .gcno file.
15610 * doc/gcov.texi: Document how working directory is printed.
15611 * gcov-dump.c (dump_gcov_file): Print PWD.
15612 * gcov.c (output_intermediate_file): Likewise.
15613 (read_graph_file): Read PWD string.
15614 (output_lines): Print PWD.
15616 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15618 PR middle-end/85817
15619 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
15620 for retval and return false if all args to phi are zero.
15622 2018-05-18 Richard Biener <rguenther@suse.de>
15624 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
15626 (evrp_dom_walker::before_dom_children): Call it.
15628 2018-05-18 Richard Biener <rguenther@suse.de>
15630 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
15631 results when processing array refs with variable index.
15633 2018-05-18 Toon Moene <toon@moene.org>
15635 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
15636 directly after that of -floop-interchange. Indicate that both
15637 options are enabled by default when specifying -O3.
15639 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15641 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
15642 iterator. Delete separate integer-mode vec_set<mode> expander.
15643 (aarch64_simd_vec_setv2di): Delete.
15644 (vec_setv2di): Delete.
15645 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
15646 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
15647 the "w, r" alternative.
15649 2018-05-18 Martin Liska <mliska@suse.cz>
15651 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
15652 * tree-pass.h (make_pass_lower_switch_O0): New function.
15653 * tree-switch-conversion.c (node_has_low_bound): Remove.
15654 (node_has_high_bound): Likewise.
15655 (node_is_bounded): Likewise.
15656 (class pass_lower_switch): Make it a template type and create
15658 (pass_lower_switch::execute): Add template argument.
15659 (make_pass_lower_switch): New function.
15660 (make_pass_lower_switch_O0): New function.
15661 (do_jump_if_equal): Remove.
15662 (emit_case_nodes): Simplify to just handle all 3 cases and leave
15663 all the hard work to tree optimization passes.
15665 2018-05-18 Martin Liska <mliska@suse.cz>
15667 * dbgcnt.c (limit_low): Renamed from limit.
15668 (limit_high): New variable.
15669 (dbg_cnt_is_enabled): Check for upper limit.
15670 (dbg_cnt): Adjust dumping.
15671 (dbg_cnt_set_limit_by_index): Add new argument for high
15673 (dbg_cnt_set_limit_by_name): Likewise.
15674 (dbg_cnt_process_single_pair): Parse new format.
15675 (dbg_cnt_process_opt): Use strtok.
15676 (dbg_cnt_list_all_counters): Remove 'value' and add
15678 * doc/invoke.texi: Document changes.
15680 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
15682 * doc/sourcebuild.texi (scalar_all_fma): Document.
15683 * tree.def (FMA_EXPR): Delete.
15684 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
15685 * internal-fn.c (ternary_direct): New macro.
15686 (expand_ternary_optab_fn): Likewise.
15687 (direct_ternary_optab_supported_p): Likewise.
15688 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
15689 * builtins.c (fold_builtin_fma): Delete.
15690 (fold_builtin_3): Don't call it.
15691 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
15692 * expr.c (expand_expr_real_2): Likewise.
15693 * fold-const.c (operand_equal_p): Likewise.
15694 (fold_ternary_loc): Likewise.
15695 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
15696 * gimple.c (DEFTREECODE): Likewise.
15697 * gimplify.c (gimplify_expr): Likewise.
15698 * optabs-tree.c (optab_for_tree_code): Likewise.
15699 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15700 * tree-eh.c (operation_could_trap_p): Likewise.
15701 (stmt_could_throw_1_p): Likewise.
15702 * tree-inline.c (estimate_operator_cost): Likewise.
15703 * tree-pretty-print.c (dump_generic_node): Likewise.
15704 (op_code_prio): Likewise.
15705 * tree-ssa-loop-im.c (stmt_cost): Likewise.
15706 * tree-ssa-operands.c (get_expr_operands): Likewise.
15707 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
15708 * fold-const-call.h (fold_fma): Delete.
15709 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
15710 CFN_FNMA and CFN_FNMS.
15711 (fold_fma): Delete.
15712 * genmatch.c (combined_fn): New enum.
15713 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
15714 (commutative_op): New function.
15715 (commutate): Use it. Handle more than 2 operands.
15716 (dt_operand::gen_gimple_expr): Use commutative_op.
15717 (parser::parse_expr): Allow :c to be used with non-binary
15718 operators if the commutative operand is known.
15719 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
15720 CFN_FMS, CFN_FNMA and CFN_FNMS.
15721 (backprop::process_assign_use): Remove FMA_EXPR handling.
15722 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
15723 (gen_hsa_fma): New function.
15724 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
15725 IFN_FNMA and IFN_FNMS.
15726 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
15727 * gimple-fold.h (follow_all_ssa_edges): Declare.
15728 * gimple-fold.c (follow_all_ssa_edges): New function.
15729 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15730 gimple_build interface and use follow_all_ssa_edges to fold the result.
15731 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15732 instead of checking for optabs directly.
15733 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15734 rather than FMA_EXPRs.
15735 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15736 call to IFN_FMA instead of an FMA_EXPR.
15738 2018-05-17 Jim Wilson <jimw@sifive.com>
15740 * expr.c (do_tablejump): When converting index to Pmode, if we have a
15741 sign extended promoted subreg, and the range does not have the sign bit
15742 set, then do a sign extend.
15744 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15745 test, check for sign extended subreg and/or constant operands, and
15746 do a sign extend in that case.
15748 2018-05-17 Steve Ellcey <sellcey@cavium.com>
15750 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15751 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15753 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15754 Change logics_shift_reg to logics_shift_imm.
15755 (thunderx2t99_fp_loadpair_basic): Delete.
15756 (thunderx2t99_fp_storepair_basic): Delete.
15757 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15758 (thunderx2t99_asimd_polynomial): Delete.
15759 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15760 and neon_fp_mul_d_scalar_q.
15761 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15762 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15763 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15764 (thunderx2t99_asimd_lut): Add missing tbl types.
15765 (thunderx2t99_asimd_ext): Delete.
15766 (thunderx2t99_asimd_load1_1_mult): Delete.
15767 (thunderx2t99_asimd_load1_2_mult): Delete.
15768 (thunderx2t99_asimd_load1_ldp): New.
15769 (thunderx2t99_asimd_load1): New.
15770 (thunderx2t99_asimd_load2): Add missing *load2* types.
15771 (thunderx2t99_asimd_load3): New.
15772 (thunderx2t99_asimd_load4): New.
15773 (thunderx2t99_asimd_store1_1_mult): Delete.
15774 (thunderx2t99_asimd_store1_2_mult): Delete.
15775 (thunderx2t99_asimd_store2_mult): Delete.
15776 (thunderx2t99_asimd_store2_onelane): Delete.
15777 (thunderx2t99_asimd_store_stp): New.
15778 (thunderx2t99_asimd_store1): New.
15779 (thunderx2t99_asimd_store2): New.
15780 (thunderx2t99_asimd_store3): New.
15781 (thunderx2t99_asimd_store4): New.
15783 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
15785 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15786 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
15788 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
15789 Segher Boessenkool <segher@kernel.crashing.org>
15792 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15795 2018-05-17 Richard Biener <rguenther@suse.de>
15797 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15798 for pruning loop and prune defs feeding only already visited PHIs.
15800 2018-05-17 Richard Biener <rguenther@suse.de>
15802 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15804 2018-05-17 Bin Cheng <bin.cheng@arm.com>
15805 Richard Biener <rguenther@suse.de>
15807 PR tree-optimization/85793
15808 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15809 for VMAT_ELEMENTWISE.
15811 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15813 * internal-fn.h (lookup_internal_fn): Declare
15814 * internal-fn.c (lookup_internal_fn): New function.
15815 * gimple.c (gimple_build_call_from_tree): Handle calls to
15816 internal functions.
15817 * gimple-pretty-print.c (dump_gimple_call): Print "." before
15818 internal function names.
15819 * tree-pretty-print.c (dump_generic_node): Likewise.
15820 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15822 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15824 * gimple-fold.h (gimple_build): Make the function forms take
15825 combined_fn rather than built_in_function.
15826 (gimple_simplify): Likewise.
15827 * gimple-match-head.c (gimple_simplify): Likewise.
15828 * gimple-fold.c (gimple_build): Likewise.
15829 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15830 rather than gimple_build_call_internal.
15831 (get_initial_defs_for_reduction): Likewise.
15832 (vect_create_epilog_for_reduction): Likewise.
15833 (vectorizable_live_operation): Likewise.
15835 2018-05-17 Martin Liska <mliska@suse.cz>
15837 * gimple-ssa-sprintf.c (format_directive): Do not use
15838 space in between 'G_' and '('.
15840 2018-05-17 Jakub Jelinek <jakub@redhat.com>
15843 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15844 even if the mask is not all ones.
15847 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15849 (ix86_gimple_fold_builtin): Likewise.
15852 * config/i386/i386.c: Include tree-vector-builder.h.
15853 (ix86_vector_shift_count): New function.
15854 (ix86_fold_builtin): Fold shift builtins by scalar count.
15855 (ix86_gimple_fold_builtin): Likewise.
15857 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15858 _mm512_setzero): New intrinsics.
15860 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
15861 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15863 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15864 code generation for cases where splatting a value is not useful.
15865 * simplify-rtx.c (simplify_ternary_operation): Simplify
15866 vec_merge across a vec_duplicate and a paradoxical subreg forming
15867 a vector mode to a vec_concat.
15869 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
15871 * config.gcc: Support "goldmont-plus".
15872 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15874 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15875 PROCESSOR_GOLDMONT_PLUS.
15876 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15877 (processor_target_table): Add "goldmont-plus".
15878 (PTA_GOLDMONT_PLUS): Define.
15879 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15880 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15881 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15882 (fold_builtin_cpu): Add "goldmont-plus".
15883 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15884 (ix86_option_override_internal): Add "goldmont-plus".
15885 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15886 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15887 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15888 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15890 2018-05-17 Richard Biener <rguenther@suse.de>
15892 PR tree-optimization/85757
15893 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15894 remove defs that only feed that PHI from further processing.
15896 2018-05-16 Jim Wilson <jimw@sifive.com>
15898 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15900 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15902 2018-05-16 Mark Wielaard <mark@klomp.org>
15904 * dwarf2out.c (count_index_strings): New function.
15905 (output_indirect_strings): Call count_index_strings and generate
15906 header for dwarf_version >= 5.
15908 2018-05-16 Mark Wielaard <mark@klomp.org>
15910 * dwarf2out.c (dwarf_FORM): New function.
15911 (set_indirect_string): Use dwarf_FORM.
15912 (reset_indirect_string): Likewise.
15913 (size_of_die): Likewise.
15914 (value_format): Likewise.
15915 (output_die): Likewise.
15916 (add_skeleton_AT_string): Likewise.
15917 (output_macinfo_op): Likewise.
15918 (index_string): Likewise.
15919 (output_index_string_offset): Likewise.
15920 (output_index_string): Likewise.
15921 (count_index_strings): Likewise.
15923 2018-05-16 Carl Love <cel@us.ibm.com>
15925 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15926 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15928 2018-05-16 Martin Jambor <mjambor@suse.cz>
15930 * ipa-prop.c (ipa_free_all_edge_args): Remove.
15931 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15933 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
15935 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15936 (fnma<mode>4): Likewise.
15937 (fms<mode>4): Likewise.
15938 (fnms<mode>4): Likewise.
15939 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15940 (aarch64_fnma<mode>4): Likewise.
15941 (aarch64_fms<mode>4): Likewise.
15942 (aarch64_fnms<mode>4): Likewise.
15943 (aarch64_fnmadd<mode>4): Likewise.
15945 2018-05-16 Jason Merrill <jason@redhat.com>
15947 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
15949 2018-05-16 Richard Biener <rguenther@suse.de>
15951 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15952 (dump_stmt_cost): Declare.
15953 (add_stmt_cost): Dump cost we add.
15954 (add_stmt_costs): New function.
15955 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15956 No longer exported.
15957 (vect_analyze_stmt): Adjust prototype.
15958 (vectorizable_condition): Likewise.
15959 (vectorizable_live_operation): Likewise.
15960 (vectorizable_reduction): Likewise.
15961 (vectorizable_induction): Likewise.
15962 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15963 cost vector to pass to vectorizable_ and record afterwards.
15964 (vect_model_reduction_cost): Take cost vector argument and adjust.
15965 (vect_model_induction_cost): Likewise.
15966 (vectorizable_reduction): Likewise.
15967 (vectorizable_induction): Likewise.
15968 (vectorizable_live_operation): Likewise.
15969 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15970 SLP_TREE_NUMBER_OF_VEC_STMTS.
15971 (vect_analyze_slp_cost_1): Remove.
15972 (vect_analyze_slp_cost): Likewise.
15973 (vect_slp_analyze_node_operations): Take visited args and
15974 a target cost vector. Avoid processing already visited stmt sets.
15975 (vect_slp_analyze_operations): Use a local cost vector to gather
15976 costs and register those of non-discarded instances.
15977 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15978 (vect_schedule_slp_instance): Remove copying of
15979 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
15981 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15982 adding cost. Record cost entry location.
15983 (vect_prologue_cost_for_slp_op): Function to compute cost of
15984 a constant or invariant generated for SLP vect in the prologue,
15985 split out from vect_analyze_slp_cost_1.
15986 (vect_model_simple_cost): Make static. Adjust for SLP costing.
15987 (vect_model_promotion_demotion_cost): Likewise.
15988 (vect_model_store_cost): Likewise, make static.
15989 (vect_model_load_cost): Likewise.
15990 (vectorizable_bswap): Add cost vector arg and adjust.
15991 (vectorizable_call): Likewise.
15992 (vectorizable_simd_clone_call): Likewise.
15993 (vectorizable_conversion): Likewise.
15994 (vectorizable_assignment): Likewise.
15995 (vectorizable_shift): Likewise.
15996 (vectorizable_operation): Likewise.
15997 (vectorizable_store): Likewise.
15998 (vectorizable_load): Likewise.
15999 (vectorizable_condition): Likewise.
16000 (vectorizable_comparison): Likewise.
16001 (can_vectorize_live_stmts): Likewise.
16002 (vect_analyze_stmt): Likewise.
16003 (vect_transform_stmt): Adjust calls to vectorizable_*.
16004 * tree-vectorizer.c: Include gimple-pretty-print.h.
16005 (dump_stmt_cost): New function.
16007 2018-05-16 Richard Biener <rguenther@suse.de>
16009 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16010 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16011 * tree-ssa-dse.c: Include tree-ssa-loop.h.
16012 (check_name): New callback.
16013 (dse_classify_store): Track cycles via a visited bitmap of PHI
16014 defs and simplify handling of in-loop and across loop dead stores
16015 and properly fail for loop-variant refs. Handle byte-tracking with
16016 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16019 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
16021 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16022 (vect_get_mask_type_for_stmt): Likewise.
16023 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16025 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
16026 to determine the statement's vector type and the vector type that
16027 should be used for calculating nunits. Deal with cases in which
16028 the type has to be deferred.
16029 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16030 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16031 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16032 (vect_determine_vf_for_stmt): New functions, split out from...
16033 (vect_determine_vectorization_factor): ...here.
16034 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16035 (vect_get_mask_type_for_stmt): New functions, split out from
16036 vect_determine_vectorization_factor.
16038 2018-05-16 Richard Biener <rguenther@suse.de>
16040 * tree-cfg.c (verify_gimple_assign_ternary): Properly
16041 verify the [VEC_]COND_EXPR embedded comparison.
16043 2018-05-15 Martin Sebor <msebor@redhat.com>
16045 PR tree-optimization/85753
16046 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16047 RECORD_TYPE in addition to ARRAY_TYPE.
16049 2018-05-15 Martin Sebor <msebor@redhat.com>
16051 PR middle-end/85643
16052 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16054 2018-05-15 Richard Biener <rguenther@suse.de>
16056 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16057 add by_clobber_p one. Change algorithm to collect all defs
16058 representing uses we need to walk and try reducing them to
16059 a single one before failing.
16060 (dse_dom_walker::dse_optimize_stmt): Adjust.
16062 2018-05-13 Mark Wielaard <mark@klomp.org>
16064 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16065 (size_of_loc_descr): Likewise.
16066 (output_loc_operands): Likewise.
16067 (output_loc_operands_raw): Likewise.
16068 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16069 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16070 (hash_loc_operands): Likewise.
16071 (compare_loc_operands): Likewise.
16073 2018-05-14 Mark Wielaard <mark@klomp.org>
16075 * dwarf2out.c (count_index_addrs): New function.
16076 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16078 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16080 PR tree-optimization/83648
16081 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16082 return value as malloc candidate.
16084 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16087 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16088 param as true in call to suggest_attribute.
16090 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
16092 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16093 -mreadonly-in-sdata.
16095 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16097 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16099 (aarch64_crypto_aesd_fused): Likewise.
16101 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
16103 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16104 (movsi_aarch64): Likewise.
16105 (load_pairsi): Likewise.
16106 (load_pairdi): Likewise.
16107 (store_pairsi): Likewise.
16108 (store_pairdi): Likewise.
16109 (load_pairsf): Likewise.
16110 (load_pairdf): Likewise.
16111 (store_pairsf): Likewise.
16112 (store_pairdf): Likewise.
16113 (zero_extend): Likewise.
16114 (trunc): Swap alternatives.
16115 (fcvt_target): Add '?' to prefer w over r.
16117 2018-05-14 Jakub Jelinek <jakub@redhat.com>
16120 * config/i386/i386.md: Disallow non-commutative arithmetics in
16121 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16122 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
16123 in the peephole2 before it.
16125 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
16127 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16128 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16129 (ix86_handle_option): Handle -mcldemote.
16130 * config.gcc: New header.
16131 * config/i386/cldemoteintrin.h: New file.
16132 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16133 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16135 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16136 OPTION_MASK_ISA_CLDEMOTE.
16137 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16138 (ix86_valid_target_attribute_inner_p): Ditto.
16139 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16140 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16141 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16142 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16143 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16145 * config/i386/i386.opt: Add -mcldemote.
16146 * config/i386/x86intrin.h: New header.
16147 * doc/invoke.texi: Add -mcldemote.
16149 2018-05-14 Richard Biener <rguenther@suse.de>
16151 * doc/match-and-simplify.texi: Adjust :s documentation.
16153 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
16155 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16156 intended memcpy size.
16157 (REORDER_45): Likewise.
16159 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
16161 * sort.cc: New file.
16162 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16163 * vec.c (qsort_chk): Use gcc_qsort.
16164 * Makefile.in (OBJS-libcommon): Add sort.o.
16165 (build/sort.o): New target. Use it...
16166 (BUILD_RTL): ... here, and...
16167 (build/gencfn-macros): ... here, and...
16168 (build/genmatch): ... here.
16170 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16171 Chung-Ju Wu <jasonwucj@gmail.com>
16173 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16174 * config/nds32/nds32-graywolf.md: New file.
16175 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16176 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16178 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16179 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16180 * config/nds32/nds32.md (pipeline_model): Add graywolf.
16181 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16182 * config/nds32/pipelines.md: Include n15 settings.
16184 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16185 Chung-Ju Wu <jasonwucj@gmail.com>
16187 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16188 * config/nds32/nds32-n13.md: New file.
16189 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16190 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16192 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16193 * config/nds32/nds32.md (pipeline_model): Add n13.
16194 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16195 * config/nds32/pipelines.md: Include n13 settings.
16197 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16198 Chung-Ju Wu <jasonwucj@gmail.com>
16200 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16201 * config/nds32/nds32-n10.md: New file.
16202 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16203 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16205 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16206 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16207 * config/nds32/nds32.md (pipeline_model): Add n10.
16208 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16209 * config/nds32/pipelines.md: Include n10 settings.
16211 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
16212 Kito Cheng <kito.cheng@gmail.com>
16213 Chung-Ju Wu <jasonwucj@gmail.com>
16215 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16216 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16217 Add enum values for DSP extension instructions.
16218 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16220 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16221 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16222 New code iterators.
16223 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16224 * config/nds32/nds32-dspext.md: New file for DSP implementation.
16225 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16226 * config/nds32/nds32-intrinsic.md: Likewise.
16227 * config/nds32/nds32_intrinsic.h: Likewise.
16228 * config/nds32/nds32-md-auxiliary.c: Likewise.
16229 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16230 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16231 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16232 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16233 * config/nds32/nds32-protos.h: New declarations for DSP extension.
16234 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16235 TYPE_DMAC in switch statement.
16236 * config/nds32/nds32.c: New checking and implementation for DSP
16237 extension instructions.
16238 * config/nds32/nds32.h: Likewise.
16239 * config/nds32/nds32.md: Likewise.
16240 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16241 * config/nds32/predicates.md: Implement new predicates for DSP
16244 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16246 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16247 Reformat alternatives and attributes so it is easier to identify
16248 which constraints/attributes go with which instruction.
16249 (mov<mode>_hardfloat32, FMOVE64): Likewise.
16250 (mov<mode>_softfloat32, FMOVE64): Likewise.
16251 (mov<mode>_hardfloat64, FMOVE64): Likewise.
16252 (mov<mode>_softfloat64, FMOVE64): Likewise.
16254 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
16256 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16258 (Basic PowerPC Built-in Functions): The new name of the
16259 subsection previously known as "PowerPC Built-in Functions".
16260 (Basic PowerPC Built-in Functions Available on all Configurations):
16262 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16263 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16264 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16265 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16267 2018-05-11 Martin Jambor <mjambor@suse.cz>
16270 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16273 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
16276 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16278 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
16280 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16281 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16282 (ix86_handle_option): Handle -mwaitpkg.
16283 * config.gcc: New header.
16284 * config/i386/cpuid.h (bit_WAITPKG): New bit.
16285 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
16286 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
16288 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16289 OPTION_MASK_ISA_WAITPKG.
16290 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
16291 (ix86_option_override_internal): Add PTA_WAITPKG.
16292 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
16293 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
16294 IX86_BUILTIN_TPAUSE.
16295 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
16296 __builtin_ia32_umwait and __builtin_ia32_tpause.
16297 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
16298 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
16299 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
16300 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
16301 UNSPECV_TPAUSE): New.
16302 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
16303 * config/i386/i386.opt: Add -mwaitpkg.
16304 * config/i386/waitpkgintrin.h: New file.
16305 * config/i386/x86intrin.h: New header.
16306 * doc/invoke.texi: Add -mwaitpkg.
16308 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
16311 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
16313 (cortex-m0): Use armv6s-m isa.
16314 (cortex-m0plus): Likewise.
16315 (cortex-m1): Likewise.
16316 (cortex-m0.small-multiply): Likewise.
16317 (cortex-m0plus.small-multiply): Likewise.
16318 (cortex-m1.small-multiply): Likewise.
16320 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
16321 Jakub Jelinek <jakub@redhat.com>
16323 PR tree-optimization/85692
16324 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
16325 source permute as well.
16327 2018-05-11 Martin Liska <mliska@suse.cz>
16330 * doc/extend.texi: Document LLVM style format for no_sanitize
16333 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
16335 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
16336 mode_supports_vsx_dform_quad to mode_supports_dq_form.
16337 (mode_supports_vsx_dform_quad): Likewise.
16338 (mode_supports_vmx_dform): Move these functions to be next to the
16339 other mode_supports functions.
16340 (mode_supports_dq_form): Likewise.
16341 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
16342 mode_supports_dq_form.
16343 (reg_offset_addressing_ok_p): Likewise.
16344 (offsettable_ok_by_alignment): Likewise.
16345 (rs6000_legitimate_offset_address_p): Likewise.
16346 (legitimate_lo_sum_address_p): Likewise.
16347 (rs6000_legitimize_address): Likewise.
16348 (rs6000_legitimize_reload_address): Likewise.
16349 (rs6000_secondary_reload_inner): Likewise.
16350 (rs6000_preferred_reload_class): Likewise.
16351 (rs6000_output_move_128bit): Likewise.
16353 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
16355 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
16356 Generate SImode target register for null target.
16357 <case IX86_BUILTIN_XGETBV>: Ditto.
16358 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
16359 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
16361 2018-05-10 Carl Love <cel@us.ibm.com>
16363 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16364 dcbtt and dcbtstt if operands[2] is 0.
16366 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
16369 * config/i386/sse.md (usadv64qi): New expander.
16371 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
16373 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
16374 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
16375 -maltivec=be support.
16376 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
16377 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
16378 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
16379 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
16380 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
16381 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
16382 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
16383 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
16384 altivec_vsumsws): Adjust.
16385 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
16386 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
16387 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
16389 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
16390 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
16391 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
16392 (altivec_lve<VI_char>x): Delete expand.
16393 (*altivec_lve<VI_char>x_internal): Rename to...
16394 (altivec_lve<VI_char>x): ... this.
16395 (altivec_lvxl_<mode>): Delete expand.
16396 (*altivec_lvxl_<mode>_internal): Rename to ...
16397 (altivec_lvxl_<mode>): ... this.
16398 (altivec_stvxl_<mode>): Delete expand.
16399 (*altivec_stvxl_<mode>_internal): Rename to ...
16400 (altivec_stvxl_<mode>): ... this.
16401 (altivec_stve<VI_char>x): Delete expand.
16402 (*altivec_stve<VI_char>x_internal): Rename to ...
16403 (altivec_stve<VI_char>x): ... this.
16404 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
16405 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
16406 reduc_plus_scal_<mode>): Adjust.
16407 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
16409 (rs6000_cpu_cpp_builtins): Adjust.
16410 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
16411 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
16412 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
16413 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
16414 -maltivec=be support.
16415 (rs6000_split_vec_extract_var): Adjust.
16416 (rs6000_split_v4si_init): Adjust.
16417 (swap_selector_for_mode): Delete.
16418 (altivec_expand_lvx_be, altivec_expand_stvx_be,
16419 altivec_expand_stvex_be): Delete.
16420 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
16421 -maltivec=be support.
16422 (rs6000_gimple_fold_builtin): Ditto.
16423 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
16425 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
16426 (TARGET_DIRECT_MOVE_64BIT): Adjust.
16427 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
16428 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
16429 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
16430 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
16431 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
16432 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
16433 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
16434 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
16435 anonymous split): Adjust.
16436 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
16437 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
16439 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
16441 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
16442 when --with-gxx-include-dir is also specified.
16443 * configure: Regenerate.
16445 2018-05-09 Jim Wilson <jimw@sifive.com>
16448 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
16449 * config/riscv/t-withmultilib: New.
16450 * config/riscv/withmultilib.h: New.
16451 * doc/install.texi: Document RISC-V --with-multilib-list support.
16453 2018-05-09 Richard Biener <rguenther@suse.de>
16455 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
16457 (vect_bb_vectorization_profitable_p): Adjust. Compute
16458 actual scalar cost using the cost vector and the add_stmt_cost
16461 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
16463 PR rtl-optimization/85645
16464 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
16465 in the REG_CFA_REGISTER note for LR, don't leave it empty.
16467 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
16469 PR rtl-optimization/85645
16470 * shrink-wrap.c (spread_components): Return a boolean saying if
16471 anything was changed.
16472 (try_shrink_wrapping_separate): Iterate spread_components until
16473 nothing changes anymore.
16475 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
16477 PR rtl-optimization/85645
16478 * regrename.c (build_def_use): Also kill the chains that include the
16479 destination of a REG_CFA_REGISTER note.
16481 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
16483 PR rtl-optimization/85645
16484 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
16485 insn that has a REG_CFA_REGISTER note.
16487 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
16489 * cfgexpand.c (expand_clobber): New function.
16490 (expand_gimple_stmt_1): Use it.
16491 * tree-vect-stmts.c (vect_clobber_variable): New function,
16493 (vectorizable_simd_clone_call): ...here.
16494 (vectorizable_store): Emit a clobber either side of an
16495 IFN_STORE_LANES sequence.
16496 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
16498 2018-05-09 Tom de Vries <tom@codesourcery.com>
16501 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
16502 (define_insn "trap_if_false"): Add exit after trap.
16504 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
16506 PR rtl-optimization/85638
16507 * bb-reorder.c: Include common/common-target.h.
16508 (create_forwarder_block): New function extracted from...
16509 (fix_up_crossing_landing_pad): ...here. Rename into...
16510 (dw2_fix_up_crossing_landing_pad): ...this.
16511 (sjlj_fix_up_crossing_landing_pad): New function.
16512 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
16513 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
16514 from both partitions and exit the loop after one iteration.
16516 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
16519 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16521 (Basic PowerPC Built-in Functions): The new name of the
16522 subsection previously known as "PowerPC Built-in Functions".
16523 (Basic PowerPC Built-in Functions Available on all Configurations):
16525 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16527 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16529 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16531 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16534 2018-05-08 Jim Wilson <jimw@sifive.com>
16536 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
16537 (LD_EMUL_SUFFIX): New.
16538 (LINK_SPEC): Use it.
16540 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
16542 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16544 (Basic PowerPC Built-in Functions): The new name of the
16545 subsection previously known as "PowerPC Built-in Functions".
16546 (Basic PowerPC Built-in Functions Available on all Configurations):
16548 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16550 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16552 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16554 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16557 2018-05-08 Jakub Jelinek <jakub@redhat.com>
16560 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
16561 after cmpelim optimization.
16563 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
16565 * config.gcc: Support "goldmont".
16566 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
16567 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16568 PROCESSOR_GOLDMONT.
16569 * config/i386/i386.c (m_GOLDMONT): Define.
16570 (processor_target_table): Add "goldmont".
16571 (PTA_GOLDMONT): Define.
16572 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
16573 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
16574 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
16575 (fold_builtin_cpu): Add "goldmont".
16576 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
16577 (ix86_option_override_internal): Add "goldmont".
16578 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
16579 (processor_type): Add PROCESSOR_GOLDMONT.
16580 * config/i386/i386.md: Add CPU "glm".
16581 * config/i386/glm.md: New file.
16582 * config/i386/x86-tune.def: Add m_GOLDMONT.
16583 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
16585 2018-05-08 Jakub Jelinek <jakub@redhat.com>
16588 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
16590 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
16591 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
16592 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
16595 * config/i386/i386.c (ix86_fold_builtin): Handle
16596 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
16599 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
16600 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
16602 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
16605 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
16606 (check_arch): Likewise.
16607 (check_fpu): Return the result rather than printing it.
16608 (end arch): Fix operator precedence.
16609 (end cpu): Likewise.
16610 (END): Print the result from check_fpu.
16612 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
16613 Alan Hayward <alan.hayward@arm.com>
16614 David Sherwood <david.sherwood@arm.com>
16616 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
16617 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
16618 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
16619 (*fcmuo<mode>_and): New patterns.
16621 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
16623 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
16624 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
16625 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
16626 (cmp_op, sve_imm_con): New code attributes.
16627 (SVE_COND_INT_CMP, imm_con): Delete.
16628 (cmp_op): Remove above unspecs from int attribute.
16629 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
16631 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
16632 comparison-specific unspecs.
16633 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
16634 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
16635 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
16636 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
16637 (*vec_fcm<cmp_op><mode>): Rename to...
16638 (*fcm<cmp_op><mode>): ...this and adjust likewise.
16639 (*vec_fcmuo<mode>): Rename to...
16640 (*fcmuo<mode>): ...this and adjust likewise.
16641 (*pred_fcm<cmp_op><mode>): New pattern.
16642 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
16643 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
16645 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
16647 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
16648 (aarch64_emit_sve_predicated_cond): New function.
16649 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
16650 (aarch64_emit_unspec_cond_or): Replace with...
16651 (aarch64_emit_sve_or_conds): ...this new function. Use
16652 aarch64_emit_sve_ptrue_op for the individual comparisons and
16653 aarch64_emit_binop to OR them together.
16654 (aarch64_emit_inverted_unspec_cond): Replace with...
16655 (aarch64_emit_sve_inverted_cond): ...this new function. Use
16656 aarch64_emit_sve_ptrue_op for the comparison and
16657 aarch64_emit_unop to invert the result.
16658 (aarch64_expand_sve_vec_cmp_float): Update after the above
16659 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
16661 2018-05-07 Nathan Sidwell <nathan@acm.org>
16663 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
16664 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
16665 (Backwards Compatibility): Likewise.
16667 2018-05-07 Luis Machado <luis.machado@linaro.org>
16671 2018-05-07 Luis Machado <luis.machado@linaro.org>
16673 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16674 <prefetch_dynamic_strides>: New const bool field.
16675 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16676 prefetch_dynamic_strides.
16677 (exynosm1_prefetch_tune): Likewise.
16678 (thunderxt88_prefetch_tune): Likewise.
16679 (thunderx_prefetch_tune): Likewise.
16680 (thunderx2t99_prefetch_tune): Likewise.
16681 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16683 (aarch64_override_options_internal): Update to set
16684 PARAM_PREFETCH_DYNAMIC_STRIDES.
16685 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16686 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16687 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16688 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16689 prefetch-dynamic-strides setting.
16691 2018-05-07 Luis Machado <luis.machado@linaro.org>
16693 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16694 <minimum_stride>: New const int field.
16695 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16696 minimum_stride field.
16697 (exynosm1_prefetch_tune): Likewise.
16698 (thunderxt88_prefetch_tune): Likewise.
16699 (thunderx_prefetch_tune): Likewise.
16700 (thunderx2t99_prefetch_tune): Likewise.
16701 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16702 (aarch64_override_options_internal): Update to set
16703 PARAM_PREFETCH_MINIMUM_STRIDE.
16704 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16705 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16706 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16707 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16708 stride is constant and is below the minimum stride threshold.
16710 2018-05-07 Luis Machado <luis.machado@linaro.org>
16712 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
16715 2018-05-07 Luis Machado <luis.machado@linaro.org>
16717 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16718 <prefetch_dynamic_strides>: New const bool field.
16719 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16720 prefetch_dynamic_strides.
16721 (exynosm1_prefetch_tune): Likewise.
16722 (thunderxt88_prefetch_tune): Likewise.
16723 (thunderx_prefetch_tune): Likewise.
16724 (thunderx2t99_prefetch_tune): Likewise.
16725 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16727 (aarch64_override_options_internal): Update to set
16728 PARAM_PREFETCH_DYNAMIC_STRIDES.
16729 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16730 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16731 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16732 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16733 prefetch-dynamic-strides setting.
16735 2018-05-07 Luis Machado <luis.machado@linaro.org>
16737 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16738 <minimum_stride>: New const int field.
16739 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16740 minimum_stride field.
16741 (exynosm1_prefetch_tune): Likewise.
16742 (thunderxt88_prefetch_tune): Likewise.
16743 (thunderx_prefetch_tune): Likewise.
16744 (thunderx2t99_prefetch_tune): Likewise.
16745 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16746 (aarch64_override_options_internal): Update to set
16747 PARAM_PREFETCH_MINIMUM_STRIDE.
16748 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16749 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16750 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16751 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16752 stride is constant and is below the minimum stride threshold.
16754 2018-05-06 Jakub Jelinek <jakub@redhat.com>
16757 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16758 the type is addressable. Don't force op into register if it has
16761 2018-05-05 Roland McGrath <mcgrathr@google.com>
16764 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16765 any section for which we don't know a specific type it should have,
16766 regardless of name. Previously this was done only for the exact
16767 names ".init_array", ".fini_array", and ".preinit_array".
16768 (default_elf_asm_named_section): Add comment about
16769 relationship with default_section_type_flags and SECTION_NOTYPE.
16770 (get_section): Don't consider it a type conflict if one side has
16771 SECTION_NOTYPE and the other doesn't, as long as neither has the
16772 SECTION_BSS et al used in the default_section_type_flags logic.
16774 2018-05-05 Tom de Vries <tom@codesourcery.com>
16777 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16778 (workaround_barsyncs): New function.
16779 (nvptx_reorg): Use workaround_barsyncs.
16780 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16781 (define_expand "nvptx_membar_cta"): New define_expand.
16782 (define_insn "*nvptx_membar_cta"): New insn.
16784 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
16786 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16787 To improve optimization opportunities.
16788 * builtin-types.def: The new needed builtin types for the above.
16790 2018-05-04 Richard Biener <rguenther@suse.de>
16792 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16793 * gimple-ssa-store-merging.c
16794 (imm_store_chain_info::output_merged_store): Remove redundant create,
16795 release split_store vector contents on failure.
16796 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16797 scalar stmt vector on cache hit.
16799 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
16801 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16803 * config.gcc (powerpc-xilinx-eabi*): Remove.
16804 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16806 (fusion_addis_mem_combo_load): Ditto.
16807 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16809 (rs6000_cpu_cpp_builtins): Ditto.
16810 * config/rs6000/rs6000-linux.c
16811 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16812 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16813 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16815 (rs6000_setup_reg_addr_masks): Ditto.
16816 (rs6000_init_hard_regno_mode_ok): Ditto.
16817 (rs6000_option_override_internal): Ditto.
16818 (legitimate_lo_sum_address_p): Ditto.
16819 (rs6000_legitimize_address): Ditto.
16820 (rs6000_legitimize_reload_address): Ditto.
16821 (rs6000_legitimate_address_p): Ditto.
16822 (abi_v4_pass_in_fpr): Ditto.
16823 (setup_incoming_varargs): Ditto.
16824 (rs6000_gimplify_va_arg): Ditto.
16825 (rs6000_split_multireg_move): Ditto.
16826 (rs6000_savres_strategy): Ditto.
16827 (rs6000_emit_prologue_components): Ditto.
16828 (rs6000_emit_epilogue_components): Ditto.
16829 (rs6000_emit_prologue): Ditto.
16830 (rs6000_emit_epilogue): Ditto.
16831 (rs6000_elf_file_end): Ditto.
16832 (rs6000_function_value): Ditto.
16833 (rs6000_libcall_value): Ditto.
16834 * config/rs6000/rs6000.h: Ditto.
16835 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16836 (TARGET_MINMAX): ... this. New.
16837 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16838 * config/rs6000/rs6000.md: Remove Xilinx FP support.
16839 (*movsi_internal1_single): Delete.
16840 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16841 mfpu=, mxilinx-fpu): Delete.
16842 * config/rs6000/singlefp.h: Delete.
16843 * config/rs6000/sysv4.h: Remove Xilinx FP support.
16844 * config/rs6000/t-rs6000: Ditto.
16845 * config/rs6000/t-xilinx: Delete.
16846 * config/rs6000/titan.md: Adjust for fp_type removal.
16847 * config/rs6000/vsx.md: Remove Xilinx FP support.
16848 (VStype_simple): Delete.
16849 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16850 * config/rs6000/xfpu.h: Delete.
16851 * config/rs6000/xfpu.md: Delete.
16852 * config/rs6000/xilinx.h: Delete.
16853 * config/rs6000/xilinx.opt: Delete.
16854 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16855 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16857 2018-05-04 Tom de Vries <tom@codesourcery.com>
16860 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16863 2018-05-04 Richard Biener <rguenther@suse.de>
16865 PR middle-end/85627
16866 * tree-complex.c (update_complex_assignment): We are always in SSA form.
16867 (expand_complex_div_wide): Likewise.
16868 (expand_complex_operations_1): Likewise.
16869 (expand_complex_libcall): Preserve EH info of the original stmt.
16870 (tree_lower_complex): Handle removed blocks.
16871 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16872 on complex multiplication and division libcall builtins.
16874 2018-05-04 Richard Biener <rguenther@suse.de>
16876 PR middle-end/85574
16877 * fold-const.c (negate_expr_p): Restrict negation of operand
16878 zero of a division to when we know that can happen without
16880 (fold_negate_expr_1): Likewise.
16882 2018-05-04 Jakub Jelinek <jakub@redhat.com>
16885 * real.h (real_nextafter): Declare.
16886 * real.c (real_nextafter): New function.
16887 * fold-const-call.c (fold_const_nextafter): New function.
16888 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16889 CASE_CFN_NEXTTOWARD.
16890 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16891 even when arg1_mode is different from arg0_mode.
16893 2018-05-03 Nathan Sidwell <nathan@acm.org>
16895 * doc/extend.texi (Deprecated Features): Remove
16896 -ffriend-injection.
16897 (Backwards Compatibility): Likewise.
16898 * doc/invoke.texi (C++ Language Options): Likewise.
16899 (C++ Dialect Options): Likewise.
16901 2018-05-03 Jakub Jelinek <jakub@redhat.com>
16904 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16905 _mm512_mask_mullox_epi64): New intrinsics.
16907 2018-05-03 Tom de Vries <tom@codesourcery.com>
16910 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16911 dump files): Add offload-tree.
16913 2018-05-03 Richard Biener <rguenther@suse.de>
16915 PR tree-optimization/85615
16916 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16917 to loops not nested in BBs loop father to avoid creating multi-entry
16920 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16922 PR tree-optimization/70291
16923 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16924 arguments. Change return type to tree. Emit libcall as a new
16925 statement rather than replacing existing one when inplace_p is true.
16926 (expand_complex_multiplication_components): New function.
16927 (expand_complex_multiplication): Expand floating-point complex
16928 multiplication using the above.
16929 (expand_complex_division): Rename inner_type parameter to type.
16930 Update expand_complex_libcall call-site.
16931 (expand_complex_operations_1): Update expand_complex_multiplication
16932 and expand_complex_division call-sites.
16934 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16937 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16938 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16939 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16940 the highest significant bit of the shift count mask is clear. In
16941 check whether and[sq]i3 is needed verify that all significant bits
16942 of the shift count other than the highest are set.
16944 2018-05-02 Tom de Vries <tom@codesourcery.com>
16947 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16948 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16949 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16950 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16951 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16952 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16953 __builtin_goacc_parlevel_size.
16955 2018-05-02 Richard Biener <rguenther@suse.de>
16957 PR tree-optimization/85597
16958 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16959 do not use split vect_get_vec_defs call but call vect_get_slp_defs
16962 2018-05-02 Tom de Vries <tom@codesourcery.com>
16965 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16966 dump files): Add ltrans-tree.
16968 2018-05-02 Tom de Vries <tom@codesourcery.com>
16971 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16972 dump files): Add wpa-ipa.
16974 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
16976 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
16977 powerpc*-*-linux*paired* target.
16978 * config/rs6000/750cl.h: Delete.
16979 * config/rs6000/paired.h: Delete.
16980 * config/rs6000/paired.md: Delete.
16981 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16983 * config/rs6000/rs6000-builtin.def: Remove paired float support.
16984 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16985 comment. Remove paired float support.
16986 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16987 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16989 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16990 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16992 * config/rs6000/rs6000.c: Remove paired float support.
16993 (paired_expand_vector_init, paired_expand_vector_move,
16994 paired_emit_vector_compare, paired_emit_vector_cond_expr,
16995 (paired_expand_lv_builtin, paired_expand_stv_builtin,
16996 paired_expand_builtin, paired_expand_predicate_builtin,
16997 paired_init_builtins): Delete.
16998 * config/rs6000/rs6000.h: Remove paired float support.
16999 * config/rs6000/rs6000.md: Remove paired float support.
17000 (move_from_CR_ov_bit): Delete.
17001 * config/rs6000/rs6000.opt (mpaired): Delete.
17002 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17003 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17005 2018-05-02 Richard Biener <rguenther@suse.de>
17007 PR middle-end/85567
17008 * gimplify.c (gimplify_save_expr): When in SSA form allow
17009 SAVE_EXPRs to compute to SSA vars.
17011 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17014 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17015 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17016 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17017 clobber operands[2], instead use a new pseudo. Formatting fixes.
17019 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
17021 PR tree-optimization/85586
17022 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17023 exit early for statements in the same group if the accesses are
17026 2018-05-02 Tom de Vries <tom@codesourcery.com>
17029 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17032 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
17034 PR tree-optimization/85143
17035 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17037 2018-05-01 Tom de Vries <tom@codesourcery.com>
17040 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17041 not found" error message.
17043 2018-05-01 Tom de Vries <tom@codesourcery.com>
17046 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17047 * vec.c (test_ordered_remove_if): New function.
17048 (vec_c_tests): Call test_ordered_remove_if.
17049 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17050 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17051 * tree-vect-patterns.c (vect_pattern_recog_1): Use
17052 VEC_ORDERED_REMOVE_IF.
17054 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17056 PR tree-optimization/82665
17057 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17058 pointer subtraction where arguments come from a memchr call.
17060 2018-05-01 Jakub Jelinek <jakub@redhat.com>
17062 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17063 --push-state --as-needed and --pop-state instead of --as-needed and
17064 --no-as-needed if ld supports it.
17065 * configure: Regenerated.
17068 * doc/install.texi2html: Replace _002d with - and _002a with * in
17069 generated html files using sed.
17071 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17074 * gcc-rich-location.c (blank_line_before_p): New function.
17075 (use_new_line): New function.
17076 (gcc_rich_location::add_fixit_insert_formatted): New function.
17077 * gcc-rich-location.h
17078 (gcc_rich_location::add_fixit_insert_formatted): New function.
17080 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17082 * selftest.c (assert_streq): Rename "expected" and "actual" to
17083 "val1" and "val2". Extend NULL-handling to cover both inputs
17084 symmetrically, while still requiring both to be non-NULL for a pass.
17085 * selftest.h (assert_streq): Rename "expected" and "actual" to
17087 (ASSERT_EQ): Likewise.
17088 (ASSERT_EQ_AT): Likewise.
17089 (ASSERT_KNOWN_EQ): Likewise.
17090 (ASSERT_KNOWN_EQ_AT): Likewise.
17091 (ASSERT_NE): Likewise.
17092 (ASSERT_MAYBE_NE): Likewise.
17093 (ASSERT_MAYBE_NE_AT): Likewise.
17094 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
17095 the assertion to pass.
17096 (ASSERT_STREQ_AT): Likewise.
17098 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17100 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17101 interaction with -pie.
17103 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17105 * selftest.h: Fix alphabetization of per-source-file selftest
17108 2018-04-30 Jason Merrill <jason@redhat.com>
17110 PR c++/61982 - dead stores to destroyed objects.
17111 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17114 2018-04-30 Jason Merrill <jason@redhat.com>
17116 * tree.c (build_clobber): New.
17117 * tree.h: Declare it.
17118 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17120 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17122 * diagnostic-show-locus.c (layout::layout): Update for
17123 location_get_source_line returning a char_span.
17124 (struct char_span): Move to input.h.
17125 (struct correction): Update for fields in char_span becoming
17127 (struct source_line): Update for location_get_source_line
17128 returning a char_span.
17129 (layout::print_line): Likewise.
17130 * edit-context.c (edited_file::print_content): Likewise.
17131 (edited_file::print_diff_hunk): Likewise.
17132 (edited_file::print_run_of_changed_lines): Likewise.
17133 (edited_file::get_num_lines): Likewise.
17134 (edited_line::edited_line): Likewise.
17135 * final.c (asm_show_source): Likewise.
17136 * input.c (location_get_source_line): Convert return type
17137 from const char * to char_span, losing the final "line_len"
17139 (dump_location_info): Update for the above.
17140 (get_substring_ranges_for_loc): Likewise. Use a char_span
17141 when handling the literal within the line.
17142 (test_reading_source_line): Update for location_get_source_line
17143 returning a char_span.
17144 * input.h (class char_span): Move here from
17145 diagnostic-show-locus.c, converting from a struct to a class.
17146 Make data members private.
17147 (char_span::operator bool): New.
17148 (char_span::length): New.
17149 (char_span::get_buffer): New.
17150 (char_span::operator[]): New.
17151 (char_span::subspan): Make const.
17152 (char_span::xstrdup): New.
17153 (location_get_source_line): Convert return type from const char *
17154 to char_span, losing the final "line_size" param.
17156 2018-04-30 Jan Hubicka <jh@suse.cz>
17158 * lto-wrapper.c (ltrans_priorities): New static var.
17159 (cmp_priority): New.
17160 (run_gcc): Read priorities and if doing parallel build order
17161 the Makefile by them.
17163 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17165 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17167 2018-04-30 Richard Biener <rguenther@suse.de>
17169 * tree-cfg.c (verify_address): Remove base argument, add
17170 flag whether to check TREE_ADDRESSABLE and do that.
17171 (verify_expr): Remove.
17172 (verify_types_in_gimple_reference): Add pieces from verify_expr.
17173 (verify_gimple_assign_single): Likewise.
17174 (verify_gimple_switch): Likewise.
17175 (verify_expr_location_1): Dereference tp once. Add (disabled)
17176 piece from verify_expr.
17177 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17179 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17181 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17183 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17185 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17186 (small_data_pattern): Likewise.
17187 (arc_rewrite_small_data): Likewise.
17188 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17189 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17190 (get_symbol_alignment): New function.
17191 (legitimate_small_data_address_p): Likewise.
17192 (legitimate_scaled_address): Update, call
17193 legitimate_small_data_address_p.
17194 (output_sdata): New static variable.
17195 (arc_print_operand): Update how we handle small data operands.
17196 (arc_print_operand_address): Likewise.
17197 (arc_legitimate_address_p): Update, use
17198 legitimate_small_data_address_p.
17199 (arc_rewrite_small_data_p): Remove.
17200 (arc_rewrite_small_data_1): Likewise.
17201 (arc_rewrite_small_data): Likewise.
17202 (small_data_pattern): Likewise.
17203 (compact_sda_memory_operand): Update to use
17204 legitimate_small_data_address_p and get_symbol_alignment.
17205 (prepare_move_operands): Don't rewite sdata pattern.
17206 (prepare_extend_operands): Remove.
17207 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17209 (zero_extendqisi2): Likewise.
17210 (zero_extendhisi2): Likewise.
17211 (extendqihi2): Likewise.
17212 (extendqisi2): Likewise.
17213 (extendhisi2): Likewise.
17214 (addsi3): Likewise.
17215 (subsi3): Likewise.
17216 (andsi3): Likewise.
17217 * config/arc/constraints.md (Usd): Change it to memory constraint.
17219 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17221 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17222 as source of std instructions.
17223 * config/arc/arc.md (movsi_insn): Update pattern predicate to
17224 allow 6-bit constants as source for store instructions.
17225 (movdi_insn): Update instruction pattern to allow 6-bit constants
17226 as source for store instructions.
17228 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17230 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17232 2018-04-30 Nathan Sidwell <nathan@acm.org>
17233 Sandra Loosemore <sandra@codesourcery.com>
17235 * dumpfile.c (dump_open): Allow '-' for stdout.
17236 * doc/invoke.texi (Developer Options): Document dump filename
17237 determination early. Document stdin/stdout selection.
17239 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
17241 Microblaze Target: PIC data text relative
17243 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17244 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17246 * config/microblaze/microblaze.h (microblaze_constant_address_p):
17247 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17248 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17249 New addressing mode for data-text relative position indepenedent code.
17250 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17251 'ADDRESS_SYMBOLIC_TXT_REL'.
17252 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17253 (microblaze_legitimate_pic_operand): Exclude function calls from
17254 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17255 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17257 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17258 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17259 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17260 for 'address + offset'.
17261 (microblaze_expand_prologue): Add new function prologue call for
17263 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17264 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17265 table in case of TARGET_PIC_DATA_TEXT_REL.
17266 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17267 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17268 Add new macros 'UNSPEC_TEXT',
17269 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17270 + exclude function calls from 'UNSPEC_PLT' in case of data text
17272 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17273 new target hook for generating address diff vector tables in case of
17275 * doc/tm.texi : Regenerate.
17276 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17277 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17278 of addr diff vector generation.
17279 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17280 target hook definition.
17281 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17282 Add default function for generate_pic_addr_diff_vec -> flag_pic.
17283 * doc/invoke.texi (Add new pic option): Add new microblaze pic
17284 option for data text relative.
17286 2018-04-30 Richard Biener <rguenther@suse.de>
17288 * tree-chrec.h (evolution_function_is_constant_p): Remove
17290 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
17292 2018-04-30 Richard Biener <rguenther@suse.de>
17295 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
17297 2018-04-30 Richard Biener <rguenther@suse.de>
17299 PR tree-optimization/28364
17300 PR tree-optimization/85275
17301 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
17302 copying first exit test.
17304 2018-04-28 Mark Wielaard <mark@klomp.org>
17306 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
17307 dwarf_version >= 5.
17308 (dwarf_AT): Handle DW_AT_addr_base.
17309 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
17311 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
17314 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
17315 (*ashl<dwi>3_doubleword_mask_1): Ditto.
17316 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
17317 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
17319 2018-04-28 Richard Biener <rguenther@suse.de>
17321 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
17322 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
17323 to reflect use. Only add interesting stmts.
17325 2018-04-27 Martin Jambor <mjambor@suse.cz>
17328 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
17329 the jump function allows for passing through aggregate values.
17331 2018-04-27 David Malcolm <dmalcolm@redhat.com>
17333 * input.h (in_system_header_at): Convert from macro to inline
17335 (from_macro_expansion_at): Likewise.
17336 (from_macro_definition_at): Likewise.
17338 2018-04-27 Jeff Law <law@redhat.com>
17340 * config.gcc: Mark tile* targets as deprecated/obsolete.
17342 2018-04-27 Richard Biener <rguenther@suse.de>
17344 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
17347 2018-04-27 Richard Biener <rguenther@suse.de>
17349 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
17351 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
17353 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
17354 with Yd constraint. Set "preferred_for_speed" attribute from
17355 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
17356 with Yd constraint.
17357 (*movdi_internal): Ditto.
17358 (movti_interunit splitters): Remove
17359 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
17360 (movdi_interunit splitters): Ditto.
17361 * config/i386/constraints.md (Ye): Remove.
17362 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
17364 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17367 * config/aarch64/constraints.md (Usg): Limit to 31.
17368 (Usj): Limit to 63.
17370 2018-04-27 Jakub Jelinek <jakub@redhat.com>
17372 PR tree-optimization/85529
17373 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
17374 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
17375 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
17376 zero extension or masking of the MSB bit.
17377 (optimize_range_tests): Add FIRST_BB argument, pass it through
17378 to optimize_range_tests_var_bound.
17379 (maybe_optimize_range_tests, reassociate_bb): Adjust
17380 optimize_range_tests callers.
17382 2018-04-26 Richard Biener <rguenther@suse.de>
17383 Jakub Jelinek <jakub@redhat.com>
17385 * cgraph.h (symbol_table): Just declare debug method here.
17386 * symtab.c (symbol_table::debug): Define.
17388 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
17390 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
17392 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
17394 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
17395 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
17396 (*movdi_internal): Substitute Yi and Yj constraint with x
17397 and Ym and Yn constraint with y constraint. Update "isa"
17398 attribute and set "preferred_for_speed" attribute from
17399 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
17400 (*movsi_internal): Ditto.
17401 (*movdf_internal): Ditto.
17402 (*movsf_internal): Ditto.
17403 (*zero_extendsidi2): Ditto.
17404 * config/i386/sse.md (vec_set<mode>_0): Ditto.
17405 (sse2_loadld): Ditto.
17406 (*vec_extract<ssevecmodelower>_0): Ditto.
17407 (*vec_extractv4si_0_zext_sse4): Ditto.
17408 (vec_concatv2di): Ditto.
17409 (*vec_dup<mode>): Ditto.
17410 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
17411 * config/i386/constraints.md (Yi): Remove.
17416 2018-04-26 Nathan Sidwell <nathan@acm.org>
17418 * dumpfile.c (dump_open): New.
17419 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
17420 (dump_finish): Detect stdio/stderr by value not name.
17422 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
17424 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
17426 2018-04-26 Tom de Vries <tom@codesourcery.com>
17429 * config/nvptx/nvptx.c (verify_neutering_jumps)
17430 (verify_neutering_labels): New function
17431 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
17433 2018-04-26 Tom de Vries <tom@codesourcery.com>
17436 * config/nvptx/nvptx.c (needs_neutering_p): New function.
17437 (nvptx_single): Use needs_neutering_p to skip over insns that do not
17440 2018-04-26 Richard Biener <rguenther@suse.de>
17441 Tom de Vries <tom@codesourcery.com>
17444 * lto-streamer-out.c (output_function): Fixup loops if required to match
17445 discovery done in the reader.
17447 2018-04-26 Richard Biener <rguenther@suse.de>
17449 PR tree-optimization/85116
17450 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
17451 have a loop exit from the single latch predecessor. Remove
17452 case of header with just condition.
17453 (ch_base::copy_headers): Exclude infinite loops from any
17455 (pass_ch::execute): Record exits.
17457 2018-04-26 Richard Biener <rguenther@suse.de>
17459 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
17460 prologue cost vector and pass it to vect_get_load_cost.
17461 (vect_get_peeling_costs_all_drs): Likewise.
17462 (vect_peeling_hash_get_lowest_cost): Likewise.
17463 (vect_enhance_data_refs_alignment): Likewise.
17465 2018-04-26 Richard Biener <rguenther@suse.de>
17467 PR middle-end/85450
17468 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
17469 checking of integer<->pointer conversions.
17470 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
17471 sign-/zero-extending pointer types.
17472 (expand_omp_for_static_chunk): Likewise.
17474 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
17475 Jean Lee <xiaoyur347@gmail.com>
17477 * config/mips/mips.c (mips_asan_shadow_offset): New function.
17478 (TARGET_ASAN_SHADOW_OFFSET): Define.
17479 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
17480 true for -fsanitize=address.
17482 2018-04-25 Mark Wielaard <mark@klomp.org>
17484 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
17487 2018-04-25 Jakub Jelinek <jakub@redhat.com>
17489 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
17490 than "alu", remove explicit "memory" and "imm_disp" attributes.
17491 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
17493 PR middle-end/85414
17494 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
17495 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
17496 gen_lowpart_no_emit.
17498 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
17501 * config/i386/i386.c (ix86_expand_builtin): Change memory
17502 operand to XI, extend p0 to Pmode.
17503 * config/i386/i386.md: Change unspec volatile and operand
17504 1 mode to XI, change operand 0 mode to P.
17506 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
17508 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
17509 GET_MODE_MASK before any checking.
17510 (nds32_can_use_bset_p): Likewise.
17511 (nds32_can_use_btgl_p): Likewise.
17513 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
17515 * config/nds32/nds32-doubleword.md: New define_split pattern for
17516 illegal register number.
17518 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
17520 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
17522 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
17524 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
17526 2018-04-25 Richard Biener <rguenther@suse.de>
17528 * lto-streamer.h (LTO_major_version): Bump to 8.
17530 2018-04-25 Jakub Jelinek <jakub@redhat.com>
17532 * BASE-VER: Set to 9.0.0.
17534 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
17536 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
17537 in __abskf2 and __powikf2.
17539 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17542 * config/aarch64/constraints.md (Usg, Usj): New constraints.
17543 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
17544 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
17545 Use the above on operand 2. Reindent.
17546 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
17548 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
17551 * common/config/i386/i386-common.c (ix86_handle_option): Don't
17553 * config/i386/i386.opt (mcet): Removed.
17554 * doc/install.texi: Remove -mcet documentation.
17555 * doc/invoke.texi: Likewise.
17557 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
17560 * doc/install.texi: Remove -mcet from bootstrap-cet.
17562 2018-04-24 Jakub Jelinek <jakub@redhat.com>
17565 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
17566 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
17570 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
17571 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
17572 containing a CONST_VECTOR.
17574 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
17576 * doc/install.texi: Update newlib dependency for nvptx.
17578 2018-04-24 Jakub Jelinek <jakub@redhat.com>
17581 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
17582 instead of INTVAL when shifting x left.
17584 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
17586 PR tree-optimization/85478
17587 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
17588 vect_grouped_store_supported for single element vectors.
17590 2018-04-24 Richard Biener <rguenther@suse.de>
17593 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
17594 load cost increase to the case of non-constant step.
17596 2018-04-24 Jakub Jelinek <jakub@redhat.com>
17599 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
17600 destination if any_malformed_asm.
17602 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
17604 PR middle-end/85496
17605 * expr.c (store_field): In the bitfield case, if the value comes from
17606 a function call and is returned in registers by means of a PARALLEL,
17607 do not change the mode of the temporary unless BLKmode and VOIDmode.
17609 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
17611 PR rtl-optimization/85423
17612 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
17613 dependencies to debug insns when the previous insn is non-debug.
17615 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
17617 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
17618 enums into a single definition.
17619 (fls): Fix predicates and printing.
17622 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
17624 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
17625 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
17626 and short u6 immediate.
17627 (check_if_valid_sleep_operand): Remove.
17628 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
17630 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17632 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
17633 flag_always_save_lp condition.
17634 * config/nds32/nds32.opt (malways-save-lp): New option.
17636 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17638 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
17639 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
17640 * config/nds32/nds32.h
17641 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
17642 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
17644 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17646 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
17647 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
17649 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17650 Chung-Ju Wu <jasonwucj@gmail.com>
17652 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
17654 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
17655 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
17657 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17659 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
17661 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17663 * config/nds32/nds32-protos.h (nds32_data_alignment,
17664 nds32_local_alignment): Declare.
17665 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
17666 nds32_local_alignment): New functions.
17667 (TARGET_CONSTANT_ALIGNMENT): Define.
17668 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
17670 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17672 * config/nds32/nds32.c
17673 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
17674 (TARGET_MODES_TIEABLE_P): Likewise.
17676 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17678 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
17679 level Ofast and Og.
17681 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
17682 Chung-Ju Wu <jasonwucj@gmail.com>
17684 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17685 for unaligned access.
17686 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17688 * config/nds32/nds32-intrinsic.md: Likewise.
17689 * config/nds32/nds32_intrinsic.h: Likewise.
17690 * config/nds32/nds32.h (nds32_builtins): Likewise.
17691 * config/nds32/nds32.opt (munaligned-access): New option.
17692 * config/nds32/nds32.c (nds32_asm_file_start): Display
17693 flag_unaligned_access status.
17695 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
17697 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
17698 -mno-relax is present.
17699 * config/riscv/linux.h (LINK_SPEC): Ditto.
17701 2018-04-20 Martin Sebor <msebor@redhat.com>
17704 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
17706 (gimple_fold_builtin_stxcpy_chk): Same.
17707 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
17709 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
17712 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
17713 __powikf2 when long double is IEEE 128-bit.
17715 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
17717 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
17718 step to make sure stack always aligned.
17720 2018-04-20 Carl Love <cel@us.ibm.com>
17723 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
17724 size check for arg0.
17726 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
17727 Tom de Vries <tom@codesourcery.com>
17730 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17731 Emit insns for calls too.
17732 (nvptx_find_par): Always look for worker-level predecessor insn.
17733 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
17735 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17736 (nvptx_process_pars): Propagate frames for calls.
17738 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
17741 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17743 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17744 (ix86_handle_option): Don't handle OPT_mibt.
17745 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17747 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17749 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17750 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17751 (ix86_target_macros): Define __CET__ with flag_cf_protection
17752 for -fcf-protection.
17753 * config/i386/i386.c (isa2_opts): Remove -mibt.
17754 * config/i386/i386.h (TARGET_IBT): Removed.
17755 (TARGET_IBT_P): Likewise.
17756 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17757 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17758 * config/i386/i386.opt (mcet): Update help message.
17759 (mshstk): Likewise.
17761 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
17762 -mcet as an alias for -mshstk.
17764 2018-04-20 Richard Biener <rguenther@suse.de>
17766 PR middle-end/85475
17767 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17768 complexity by forcing a single use of the multiply operand.
17770 2018-04-20 Martin Jambor <mjambor@suse.cz>
17773 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17774 recursion dependency to only apply to non-clones.
17776 2018-04-20 Martin Jambor <mjambor@suse.cz>
17779 * ipa-cp.c (create_specialized_node): Check that clones of
17780 self-recursive edges exist during IPA-CP.
17782 2018-04-19 Toon Moene <toon@moene.org>
17784 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17787 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17789 PR tree-optimization/85467
17790 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17791 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
17792 VECTOR_CST element to type.
17794 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17797 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17798 * config/i386/i386.md (builtin_setjmp_setup): Removed.
17799 (builtin_longjmp): Likewise.
17800 (save_stack_nonlocal): New pattern.
17801 (restore_stack_nonlocal): Likewise.
17803 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17806 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17807 Replace ASM_OUTPUT_LABEL with fprintf.
17809 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17812 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17813 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17814 * config/i386/i386-c.c (ix86_target_macros_internal): Also
17815 define __IBT__ and __SHSTK__ for -fcf-protection.
17816 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17818 (ix86_trampoline_init): Likewise.
17819 (x86_output_mi_thunk): Likewise.
17820 (ix86_notrack_prefixed_insn_p): Likewise.
17821 (ix86_option_override_internal): Don't disallow -fcf-protection.
17822 * config/i386/i386.md (rdssp<mode>): Also enable for
17824 (incssp<mode>): Likewise.
17825 (nop_endbr): Likewise.
17826 * config/i386/i386.opt (mcet): Change help message to built-in
17829 (mshstk): Likewise.
17830 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17831 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
17832 enable CET built-in functions.
17834 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
17836 * common/config/i386/i386-common.c
17837 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17838 OPTION_MASK_ISA_MOVDIRI_UNSET,
17839 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17840 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17841 * config.gcc (movdirintrin.h): New header.
17842 * config/i386/cpuid.h (bit_MOVDIRI,
17843 bit_MOVDIR64B): New bits.
17844 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17846 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17847 (VOID, PVOID, PCVOID)): New function types.
17848 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17849 __builtin_ia32_directstoreu_u64,
17850 __builtin_ia32_movdir64b): New builtins.
17851 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17852 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17854 (ix86_valid_target_attribute_inner_p): Ditto.
17855 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17856 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17857 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17858 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17859 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17860 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17861 (movdiri<mode>, movdir64b_<mode>): New.
17862 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17863 * config/i386/immintrin.h: Include movdirintrin.h.
17864 * config/i386/movdirintrin.h: New file.
17865 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17867 2018-04-19 Richard Biener <rguenther@suse.de>
17869 PR middle-end/85455
17870 * cfg.c (clear_bb_flags): When loop state says we have
17871 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17873 2018-04-19 Richard Biener <rguenther@suse.de>
17875 PR tree-optimization/84737
17876 * tree-vect-data-refs.c (vect_copy_ref_info): New function
17877 copying restrict info.
17878 (vect_setup_realignment): Use it.
17879 * tree-vectorizer.h (vect_copy_ref_info): Declare.
17880 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17881 the first DR to all generated stores.
17882 (vectorizable_load): Likewise for loads.
17884 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17886 PR tree-optimization/85446
17887 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17888 the integral and pointer types to have the same precision.
17890 * doc/install.texi: Document --disable-cet being the default and
17893 2018-04-18 Martin Liska <mliska@suse.cz>
17895 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17898 2018-04-18 Martin Liska <mliska@suse.cz>
17901 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17904 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17905 arguments if they are comparable.
17907 2018-04-18 Martin Liska <mliska@suse.cz>
17910 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17913 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17916 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
17919 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17920 ENDBR after calling __morestack.
17922 2018-04-18 David Malcolm <dmalcolm@redhat.com>
17925 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17926 by using gcc_base_ver to generate a gcc_driver_version, and use
17927 it when generating GCC_DRIVER_NAME.
17928 * configure: Regenerate.
17930 2018-04-18 Jakub Jelinek <jakub@redhat.com>
17933 * config.gcc: Obsolete powerpc*-*-*spe*.
17935 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17938 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17939 (stabstr_D): Change type of unum from unsigned int to
17940 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
17943 2018-04-17 Jim Wilson <jimw@sifive.com>
17946 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17947 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17948 Set arg_pointer_offset after using pretend_args_size.
17950 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17952 PR rtl-optimization/85431
17953 * dse.c (record_store): Ignore zero width stores.
17956 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
17957 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17958 __builtin_stack_restore rather than after it.
17959 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17960 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17961 argument instead of virtual_dynamic_stack_rtx.
17963 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
17965 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17967 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17968 Add note to error message to explain internal mapping of overloaded
17969 built-in function name to non-overloaded built-in function name.
17970 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17973 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17976 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17977 where the inputs overlap with the output.
17979 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17981 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17982 (=v, v) alternative and explicit "memory" attribute.
17983 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
17984 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17986 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17987 "sselog1" type instead of "sselog".
17988 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17989 "sselog". Remove explicit "memory" attribute.
17990 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17991 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17993 (vec_extract_hi_v32hi): Merge all alternatives into one, use
17994 "sselog1" type instead of "sselog". Remove explicit "memory"
17996 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17997 use "sselog1" type instead of "sselog". Remove explicit "memory"
17999 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18000 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18002 (vec_extract_hi_v64qi): Merge all alternatives into one, use
18003 "sselog1" type instead of "sselog". Remove explicit "memory"
18005 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18006 use "sselog1" type instead of "sselog". Remove explicit "memory"
18010 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18012 PR middle-end/85414
18013 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18016 2018-04-17 Martin Jambor <mjambor@suse.cz>
18019 * ipa-cp.c (create_specialized_node): Call
18020 expand_all_artificial_thunks if necessary.
18022 2018-04-17 Martin Liska <mliska@suse.cz>
18025 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18026 in message, remote space in between '_G' and '('.
18028 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18031 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18032 avx512f_vmcmp<mode>3<round_saeonly_name>,
18033 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18034 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18035 avx512f_rndscale<mode><round_saeonly_name>,
18036 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18037 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18038 Use %<iptr>2 instead of %2 for -masm=intel.
18039 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18040 avx512f_vcvttss2usi<round_saeonly_name>,
18041 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18043 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18044 avx512f_vcvttsd2usi<round_saeonly_name>,
18045 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18046 Use %q1 instead of %1 for -masm=intel.
18047 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18048 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18049 of %3 for -masm=intel.
18050 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18052 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18054 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18056 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18057 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18059 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18061 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18062 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18063 %g1 and one with %0 and %1.
18064 (avx512er_vmrcp28<mode><round_saeonly_name>,
18065 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18066 %1 for -masm=intel.
18067 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18068 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18069 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18070 of %0 and %{%4%} for -masm=intel.
18071 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18072 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18073 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18074 order of %0 and %{%5%}%{z%} for -masm=intel.
18076 2018-04-17 Jan Hubicka <jh@suse.cz>
18079 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18081 2018-04-17 Martin Liska <mliska@suse.cz>
18084 * multiple_target.c (create_dispatcher_calls): Set apostrophes
18085 for target_clone error message. Make default implementation
18086 clone to be a local declaration.
18087 (separate_attrs): Add new argument and check for an empty
18089 (expand_target_clones): Handle it.
18090 (ipa_target_clone): Make redirection just for target_clones
18093 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
18094 Tom de Vries <tom@codesourcery.com>
18096 PR middle-end/84955
18097 * omp-expand.c (expand_oacc_for): Add dummy false branch for
18098 tiled basic blocks without omp continue statements.
18100 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
18103 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18104 vec_extract expression as having side effects to make sure it gets
18107 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
18110 * config/i386/i386.c (get_builtin_code_for_version): Check
18113 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
18116 * config.gcc: Support "skylake".
18117 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18119 * config/i386/i386.c (m_SKYLAKE): Define.
18120 (processor_target_table): Add "skylake".
18121 (ix86_option_override_internal): Add "skylake".
18122 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18123 PROCESSOR_CANNONLAKE.
18124 (get_builtin_code_for_version): Fix priority for
18125 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18126 PROCESSOR_SKYLAKE-AVX512.
18127 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18128 (processor_type): Add PROCESSOR_SKYLAKE.
18130 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
18131 Jason Merrill <jason@redhat.com>
18134 * convert.c (convert_to_integer_1): Use direct recursion for
18135 enumeral types and types with a precision less than the number
18136 of bits in their mode.
18138 2018-04-16 Julia Koval <julia.koval@intel.com>
18141 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18142 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18144 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
18147 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18148 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18149 and -mno-direct-move.
18151 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
18154 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18155 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18156 Ensure negative shifts result in {0}.
18158 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
18160 PR rtl-optimization/79916
18161 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18162 regs (if any) to define how to gnerate SD moves when LRA is in
18165 2018-04-13 Jakub Jelinek <jakub@redhat.com>
18167 PR rtl-optimization/85393
18168 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18169 * except.c (expand_dw2_landing_pad_for_region): Make static.
18170 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18171 a label and unconditional jump to old_bb, rather than
18172 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18175 PR rtl-optimization/85376
18176 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18177 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18178 instead of a specific value.
18180 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18181 Bin Cheng <bin.cheng@arm.com>
18183 PR tree-optimization/82965
18184 PR tree-optimization/83991
18185 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18186 by_profile_only parameter.
18187 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18188 information if the loop was predicted to iterate too many times.
18189 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18191 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18194 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18197 2018-04-13 Martin Liska <mliska@suse.cz>
18198 Jakub Jelinek <jakub@redhat.com>
18200 PR middle-end/81657
18201 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18202 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18203 * builtins.c (expand_builtin_memory_copy_args): Use
18204 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18205 handle dest_addr == pc_rtx.
18207 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
18210 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18211 asked to not generate direct moves.
18212 (fix_trunc<mode>si2_stfiwx): Similar.
18213 (fix_trunc<mode>si2_internal): Similar.
18215 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18218 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18219 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18220 lookup if dest in some wider mode is known to be const0_rtx and
18221 if so, record permanent equivalence for it to be ZERO_EXTEND of
18222 the narrower mode destination.
18224 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18226 * lto-streamer-out.c (output_function): Revert 259346.
18227 * omp-expand.c (expand_oacc_for): Likewise.
18229 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
18231 PR rtl-optimization/85354
18232 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18233 * sel-sched.c (sel_global_init): ... here.
18235 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
18238 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18239 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18240 mode for PE-COFF targets.
18241 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18242 (i386_pe_asm_lto_end): Likewise.
18243 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18244 (TARGET_ASM_LTO_END): Likewise.
18245 * config/i386/winnt.c (saved_debug_info_level): New static variable.
18246 (i386_pe_asm_lto_start): New function.
18247 (i386_pe_asm_lto_end): Likewise.
18249 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18250 Richard Biener <rguenther@suse.de>
18252 PR middle-end/84955
18253 * lto-streamer-out.c (output_function): Fix CFG loop state before
18255 * omp-expand.c (expand_oacc_for): Handle calls to internal
18256 functions like regular functions.
18258 2018-04-12 Richard Biener <rguenther@suse.de>
18261 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18262 for the early LTO debug to properly generate references to it
18263 during DIE emission. Do not re-use that for the skeleton for
18265 (dwarf2out_early_finish): Likewise.
18267 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18270 * config/i386/sse.md
18271 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18272 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18273 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18274 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18275 and output is a reg, avoid creating invalid lowpart subreg, but
18276 instead split into a 512-bit move. Don't split if not AVX512VL,
18277 input is xmm16+ reg and output is a mem.
18278 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18279 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18280 xmm16+ reg and output is a mem.
18282 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18284 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
18285 also for flag_dwarf2_cfi_asm.
18287 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18289 PR rtl-optimization/85342
18290 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
18291 a bool scalar var inside of the loop instead. Don't try to update
18292 recog_data.operand after failed apply_change_group.
18294 2018-04-12 Tom de Vries <tom@codesourcery.com>
18297 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
18298 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
18299 array with flexible array member as array without given dimension.
18300 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
18301 argument for undefined param to true.
18303 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
18306 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18307 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
18308 from PowerPC section.
18309 * config/rs6000/sysv4.opt (mcall-): Improve help text.
18310 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
18311 help text that is too long.
18312 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
18313 help text that is too long.
18314 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
18315 help text that is too long.
18317 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
18319 * config/alpha/alpha.md (stack_probe_internal): Rename
18320 from "probe_stack". Update all callers.
18322 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
18324 PR rtl-optimization/84566
18325 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
18326 sched_macro_fuse_insns.
18328 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
18331 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
18332 (compute_block_dependences): ... from here.
18334 2018-04-11 Jakub Jelinek <jakub@redhat.com>
18336 PR tree-optimization/85331
18337 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
18338 from int to HOST_WIDE_INT.
18340 2018-04-11 Martin Jambor <mjambor@suse.cz>
18343 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
18344 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
18345 not the same as the source val.
18346 (cgraph_edge_brings_value_p): New parameter.
18347 (gather_edges_for_value): Pass destination value to
18348 cgraph_edge_brings_value_p.
18349 (perhaps_add_new_callers): Likewise.
18350 (get_info_about_necessary_edges): Likewise and exclude values brought
18351 only by self-recursive edges.
18352 (create_specialized_node): Redirect only clones of self-calling edges.
18353 (+self_recursive_pass_through_p): New function.
18354 (find_more_scalar_values_for_callers_subset): Use it.
18355 (find_aggregate_values_for_callers_subset): Likewise.
18356 (known_aggs_to_agg_replacement_list): Removed.
18357 (decide_whether_version_node): Re-calculate known constants for all
18358 remaining context clones.
18360 2018-04-11 Richard Biener <rguenther@suse.de>
18363 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
18364 from early DWARF output.
18365 (dwarf2out_early_finish): Output line info unconditionally into
18366 early DWARF and add reference to it.
18368 2018-04-11 Jakub Jelinek <jakub@redhat.com>
18371 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
18372 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
18373 other than V2DFmode using iptr mode attribute.
18374 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
18376 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
18378 PR rtl-optimization/84659
18379 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
18381 2018-04-11 Jakub Jelinek <jakub@redhat.com>
18384 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
18386 (output_loc_list): Pass address of a dummy size variable even in the
18387 locview handling loop.
18388 (index_location_lists): Add comment on why skip_loc_list_entry can't
18391 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
18394 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
18397 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
18400 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18401 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
18402 and -mstring-compare-inline-limit.
18404 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
18407 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
18408 for stack clash protection in a register whenever we need it to be in
18411 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
18413 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
18414 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
18416 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
18419 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
18421 (mlong-double-): Ditto.
18422 * config/rs6000/sysv4.opt (msdata=): Ditto.
18423 (mtls-size=): Ditto.
18425 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18427 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18428 erroneous entries for
18429 "vector int vec_ldl (int, long int *)", and
18430 "vector unsigned int vec_ldl (int, unsigned long int *)".
18431 Add comments and entries for
18432 "vector bool char vec_ldl (int, bool char *)",
18433 "vector bool short vec_ldl (int, bool short *)",
18434 "vector bool int vec_ldl (int, bool int *)",
18435 "vector bool long long vec_ldl (int, bool long long *)",
18436 "vector pixel vec_ldl (int, pixel *)",
18437 "vector long long vec_ldl (int, long long *)",
18438 "vector unsigned long long vec_ldl (int, unsigned long long *)".
18439 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
18440 type tree bool_long_long_type_node and correct definition of
18441 bool_V2DI_type_node to make reference to this new type tree.
18442 (rs6000_mangle_type): Replace erroneous reference to
18443 bool_long_type_node with bool_long_long_type_node.
18444 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
18445 comments to emphasize sign distinctions for char and int types and
18446 replace RS6000_BTI_bool_long constant with
18447 RS6000_BTI_bool_long_long constant. Also add comment to restrict
18448 use of RS6000_BTI_pixel.
18449 (bool_long_type_node): Remove this macro definition.
18450 (bool_long_long_type_node): New macro definition
18452 2018-04-10 Jakub Jelinek <jakub@redhat.com>
18454 PR rtl-optimization/85300
18455 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
18456 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
18457 simplify_unary_operation fails.
18459 2018-04-10 Martin Liska <mliska@suse.cz>
18461 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
18462 cgraph_edge and ipa_ref.
18464 2018-04-10 Jakub Jelinek <jakub@redhat.com>
18468 * config/i386/sse.md
18469 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
18470 computation of the VEC_MERGE selector from mask.
18471 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
18472 Fix decoding of the VEC_MERGE selector into mask.
18474 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
18476 PR tree-optimization/85286
18477 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
18479 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
18481 * final.c (final_1): Set insn_last_address as well as
18482 insn_current_address.
18484 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18487 * explow.c (emit_stack_probe): Call validize_mem on memory location
18488 before passing it to gen_probe_stack. Create address operand and
18489 legitimize it for the probe_stack_address case.
18491 2018-04-09 Jan Hubicka <jh@suse.cz>
18494 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
18495 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
18496 * tree.c (free_lang_data_in_type): Fix handling of binfos;
18498 (free_lang_data): Rebuild type inheritance graph.
18500 2018-04-09 Martin Sebor <msebor@redhat.com>
18502 * invoke.texi (-finline-small-functions): Mention other optimization
18504 (-findirect-inlining, -fpartial-inlining): Same.
18505 (-finline-functions-called-once): Same.
18506 (-freorder-blocks-and-partition): Same.
18508 2018-04-09 Jan Hubicka <jh@suse.cz>
18511 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
18512 jumps; choose last target that matches the criteria (i.e.
18513 no partition changes for non-crossing jumps).
18514 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
18515 support for redirecting crossing jumps to non-crossing.
18517 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
18519 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
18520 also for naked functions.
18522 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
18524 * config/arc/arc.md (add_shift): New pattern.
18525 (add_shift2): Likewise.
18526 (sub_shift): Likewise.
18527 (sub_shift_cmp0_noout): Likewise.
18528 (compare_si_ashiftsi): Likewise.
18529 (xbfu_cmp0_noout): New combine pattern.
18530 (xbfu_cmp0"): Likewise.
18531 (movsi_set_cc_insn): Place the predicable variant first.
18532 (commutative_binary_cmp0_noout): Remove clobber.
18533 (commutative_binary_cmp0): New pattern.
18534 (noncommutative_binary_cmp0): Likewise.
18535 (noncommutative_binary_cmp0_noout): Likewise.
18536 (noncommutative_binary_comparison_result_used): Removed.
18537 (rsub_cmp0): New pattern.
18538 (rsub_cmp0_noout): Likewise.
18539 (extzvsi): Changed, keep only meaningful variants.
18540 (SQH, SEZ): New iterators.
18541 (SQH_postfix): New mode attribute.
18542 (SEZ_prefix): New code attribute.
18543 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
18544 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
18545 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
18546 of numerical value.
18547 (noncommutative_operator): Check the availability of barrel
18550 2018-04-09 Richard Biener <rguenther@suse.de>
18552 PR tree-optimization/85284
18553 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
18554 Only use the niter constraining form of simple_iv when the exit
18555 is always executed.
18557 2018-04-09 Tom de Vries <tom@codesourcery.com>
18560 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18561 (define_expand "*memory_barrier"): New define_expand.
18562 (define_insn "memory_barrier"): New insn.
18564 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18566 PR rtl-optimization/80463
18567 PR rtl-optimization/83972
18568 PR rtl-optimization/83480
18570 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
18571 correct producer for the insn.
18572 (tidy_control_flow): Fixup seqnos in case of debug insns.
18574 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18576 PR rtl-optimization/83913
18578 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
18579 different sched-times when merging exprs.
18581 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18583 PR rtl-optimization/83962
18585 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
18586 tidy_fallthru_edge and tidy_control_flow.
18588 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18590 PR rtl-optimization/83530
18592 * sel-sched.c (force_next_insn): New global variable.
18593 (remove_insn_for_debug): When force_next_insn is true, also leave only
18594 next insn in the ready list.
18595 (sel_sched_region): When the region wasn't scheduled, make another pass
18596 over it with force_next_insn set to 1.
18598 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
18600 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
18602 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18603 for interrupt control.
18604 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18605 functions for interrupt control.
18606 * config/nds32/nds32-intrinsic.md: Likewise.
18607 * config/nds32/nds32_intrinsic.h: Likewise.
18608 * config/nds32/nds32.h (nds32_builtins): Likewise.
18610 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
18612 * config/nds32/nds32.c (nds32_init_machine_status,
18613 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
18614 strict_aligned_p field.
18615 (nds32_expand_to_rtl_hook): New function.
18616 (TARGET_EXPAND_TO_RTL_HOOK): Define.
18617 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
18619 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18620 Chung-Ju Wu <jasonwucj@gmail.com>
18622 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
18623 * config/nds32/nds32-n7.md: New file.
18624 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
18625 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
18627 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
18628 * config/nds32/nds32.md (pipeline_model): Add n7.
18629 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
18630 * config/nds32/pipelines.md: Include n7 settings.
18632 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18633 Chung-Ju Wu <jasonwucj@gmail.com>
18635 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
18636 * config/nds32/nds32-e8.md: New file.
18637 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
18638 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
18640 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
18641 * config/nds32/nds32.md (pipeline_model): Add e8.
18642 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
18643 * config/nds32/pipelines.md: Include e8 settings.
18645 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18646 Chung-Ju Wu <jasonwucj@gmail.com>
18648 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
18649 * config/nds32/nds32-n8.md: New file.
18650 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
18651 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
18653 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
18654 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
18655 * config/nds32/nds32.md (pipeline_model): Add n8.
18656 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
18657 * config/nds32/pipelines.md: Include n8 settings.
18659 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18660 Chung-Ju Wu <jasonwucj@gmail.com>
18662 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
18663 * config/nds32/nds32-n9-2r1w.md: New file.
18664 * config/nds32/nds32-n9-3r2w.md: New file.
18665 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
18666 nds32_register_ports): New or modify for cpu n9.
18667 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
18669 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
18670 * config/nds32/nds32-utils.c: New file.
18671 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
18672 TARGET_MUL_SLOW): Define.
18673 * config/nds32/nds32.md (pipeline_model): New attribute.
18674 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
18675 New options that support cpu n9.
18676 * config/nds32/pipelines.md: Include n9 settings.
18677 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
18679 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
18681 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
18682 information if necessary.
18683 (output_cond_branch_compare_zero): Likewise.
18684 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
18685 (nds32_target_alignment): Refine for alignment.
18686 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
18687 (FUNCTION_BOUNDARY): Modify.
18688 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
18690 * config/nds32/nds32.opt (malways-align, malign-functions): New.
18692 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
18694 * config/nds32/constants.md (unspec_volatile_element): Add values for
18695 TLB operation and data prefetch.
18696 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18697 functions for TLB operation and data prefetch.
18698 * config/nds32/nds32-intrinsic.md: Likewise.
18699 * config/nds32/nds32_intrinsic.h: Likewise.
18700 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
18701 (nds32_print_operand): Likewise.
18702 * config/nds32/nds32.h (nds32_builtins): Likewise.
18704 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
18705 Andrew Pinski <pinsika@gcc.gnu.org>
18707 PR middle-end/82976
18708 * match.pd: Use constant_boolean_node of correct type instead of
18709 boolean_true_node or boolean_false_node for simplifying
18710 pointer comparisons to zero.
18712 2018-04-07 Jakub Jelinek <jakub@redhat.com>
18714 PR tree-optimization/80021
18715 * tree.c (verify_type_variant): Make error call in verify_variant_match
18716 translatable and remove final full stop.
18718 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18720 * config/nds32/constants.md (unspec_volatile_element): Add
18721 UNSPEC_VOLATILE_EH_RETURN.
18722 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
18723 nds32_output_stack_pop): Support dwarf exception handling process.
18724 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
18725 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
18726 exception handling process.
18727 (nds32_compute_stack_frame): Likewise.
18728 (nds32_return_addr_rtx): Likewise.
18729 (nds32_initial_elimination_offset): Likewise.
18730 (nds32_expand_prologue): Likewise.
18731 (nds32_expand_epilogue): Likewise.
18732 (nds32_dynamic_chain_address): New function.
18733 * config/nds32/nds32.h (machine_function): Add fields for dwarf
18734 exception handling.
18735 (DYNAMIC_CHAIN_ADDRESS): Define.
18736 (EH_RETURN_DATA_REGNO): Define.
18737 (EH_RETURN_STACKADJ_RTX): Define.
18738 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18739 patterns for dwarf exception handling.
18741 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18743 * config/nds32/nds32.h: Clean up obsolete macros.
18745 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18747 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18748 Add enum values for particular instructions.
18749 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18750 particular intrinsic functions.
18751 * config/nds32/nds32-intrinsic.md: Likewise.
18752 * config/nds32/nds32_intrinsic.h: Likewise.
18753 * config/nds32/nds32.h (nds32_builtins): Likewise.
18754 * config/nds32/nds32.md (type): Add pbsad and pbsada.
18755 (btst, ave): New patterns for particular instructions.
18757 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18759 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18760 Add enum values for atomic load/store and memory sync.
18761 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18763 * config/nds32/nds32-intrinsic.md: Likewise.
18764 * config/nds32/nds32_intrinsic.h: Likewise.
18765 * config/nds32/nds32.h (nds32_builtins): Likewise.
18767 2018-04-07 Jakub Jelinek <jakub@redhat.com>
18769 PR tree-optimization/85257
18770 * fold-const.c (native_encode_vector): If not all elts could fit
18771 and off is -1, return 0 rather than offset.
18772 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18773 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18774 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
18775 adjust buffer in native_interpret_expr call.
18777 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18779 * config/nds32/constants.md (unspec_volatile_element): Add cache
18780 control enum values.
18781 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18782 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18783 * config/nds32/nds32.c (nds32_cctl_names): New.
18784 (nds32_print_operand): Handle cache control register names.
18785 * config/nds32/nds32.h (nds32_builtins): New enum values.
18786 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18788 * config/nds32/nds32.md (type): Add mmu.
18789 * config/nds32/pipelines.md (simple_insn): Add mmu.
18791 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18793 * config/nds32/nds32.md (type): Remove call.
18794 * config/nds32/pipelines.md (simple_insn): Likewise.
18796 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18798 * config/nds32/constants.md (unspec_volatile_element): Add
18799 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18800 UNSPEC_VOLATILE_FMFCFG.
18801 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18802 description for fmfcfg and fmfcsr.
18803 (bdesc_1arg): Add fmtcsr.
18804 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18805 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18806 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18807 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18808 unspec_fmfcfg): New patterns.
18809 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18810 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18811 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18812 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18813 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18814 __nds32__fmfcfg): Define.
18816 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18818 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18819 intrinsic register names.
18820 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18821 intrinsic register enum values and macros.
18823 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18825 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18826 for load/store addressing form.
18827 (nds32_print_operand_address): Likewise.
18829 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
18832 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18833 based on LABEL_REF. Remove useless assertion.
18834 (pic_address_needs_scratch): Fix formatting.
18835 (sparc_legitimize_pic_address): Minor tweaks.
18836 (sparc_delegitimize_address): Adjust assertion accordingly.
18837 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18838 into symbolic_operand.
18839 (movsi_high_pic_label_ref): Likewise.
18840 (movsi_lo_sum_pic_label_ref): Likewise.
18841 (movdi_pic_label_ref): Likewise.
18842 (movdi_high_pic_label_ref): Likewise.
18843 (movdi_lo_sum_pic_label_ref): Likewise.
18845 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
18847 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18848 custom LIB_SPEC setup.
18850 2018-04-06 Ruslan Bukin <br@bsdpad.com>
18851 Kito Cheng <kito.cheng@gmail.com>
18853 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18854 * config/riscv/freebsd.h: New.
18856 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18858 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18859 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18862 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18863 Kito Cheng <kito.cheng@gmail.com>
18865 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18866 nds32_output_call, nds32_symbol_binds_local_p): New functions.
18867 * config/nds32/nds32-protos.h (nds32_output_call,
18868 nds32_output_return): Declare.
18869 * config/nds32/nds32.md: Refine all the call and return patterns.
18871 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18874 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18875 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18877 PR rtl-optimization/84872
18878 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18879 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18880 EDGE_CROSSING edge.
18882 2018-04-06 Tamar Christina <tamar.christina@arm.com>
18884 * expr.c (copy_blkmode_to_reg): Revert 254862.
18885 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18887 2018-04-06 Richard Biener <rguenther@suse.de>
18889 PR middle-end/85244
18890 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18891 after seeing a component reference with an adjacent field. Treat
18892 refs to arrays at struct end of external decls similar to
18893 refs to unconstrained commons.
18895 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18898 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18899 look through SAVE_EXPRs with non-side-effects argument. Adjust
18901 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18904 2018-04-06 Richard Biener <rguenther@suse.de>
18906 PR middle-end/85180
18907 * alias.c (find_base_term): New wrapper around find_base_term
18908 unwinding CSELIB_VAL_PTR changes.
18909 (find_base_term): Do not restore CSELIB_VAL_PTR during the
18912 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18914 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18916 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18917 constant definitions.
18918 ("nop"): lr 0,0 -> nopr r0
18919 ("nop_lr0", "nop_lr1"): New insn definitions.
18921 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18923 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18924 NDS32_V3PUSH_AVAILABLE_P macro.
18926 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
18927 Chung-Ju Wu <jasonwucj@gmail.com>
18929 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18930 (nds32*-*-*): Add float and fpu_config into supported_defaults.
18931 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18932 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18933 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18934 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18935 * config/nds32/constraints.md: New constraints and checking for hard
18936 float configuration.
18937 * config/nds32/iterators.md: New mode iterator and attribute for hard
18938 float configuration.
18939 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18941 * config/nds32/nds32-fpu.md: New file.
18942 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18943 deal with hard float code generation.
18944 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18946 (abi_type, float_reg_number): New enum type.
18947 * config/nds32/nds32-predicates.c: New predicates for hard float.
18948 * config/nds32/nds32-protos.h: Declare functions for hard float.
18949 * config/nds32/nds32.c: Implementation for hard float configuration.
18950 * config/nds32/nds32.h: Definitions for hard float configuration.
18951 * config/nds32/nds32.md: Include hard float machine description and
18952 modify patterns for hard float configuration.
18953 * config/nds32/nds32.opt: New options for hard float configuration.
18954 * config/nds32/predicates.md: New predicates for hard float
18957 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18959 * common/config/nds32/nds32-common.c
18960 (nds32_option_optimization_table): Enable -mreleax-hint by default.
18962 2018-04-05 Jakub Jelinek <jakub@redhat.com>
18964 PR middle-end/85195
18965 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18966 CONSTRUCTOR_ELT (ctor, ...)->value.
18968 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
18971 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18973 2018-04-05 Tom de Vries <tom@codesourcery.com>
18976 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18979 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18980 Kito Cheng <kito.cheng@gmail.com>
18982 * config/nds32/constraints.md (U33): Fine-tune checking condition.
18983 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18984 * config/nds32/nds32.h (nds32_16bit_address_type): Add
18985 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18987 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18988 Kito Cheng <kito.cheng@gmail.com>
18990 * config/nds32/constraints.md (Ufe): New memory constraint.
18991 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18992 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18993 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18995 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18996 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18998 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19000 * config/nds32/nds32.md: Use optimize_size in the condition for
19001 alu-shift instructions.
19003 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19005 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19007 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19009 * config/nds32/nds32.md (negsi2): Refine pattern.
19011 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19012 Chung-Ju Wu <jasonwucj@gmail.com>
19014 * config/nds32/iterators.md (shift_rotate): New code iterator.
19015 (shift): New code attribute.
19016 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19017 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19018 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19019 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19020 bit-wise operations.
19021 (andsi3, *andsi3): Ditto.
19022 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19023 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19024 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19025 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19026 nds32_ior_operand, nds32_xor_operand): New predicates.
19028 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19030 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19031 (addsi3, subsi3): ... this.
19033 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19035 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19037 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19039 * config/nds32/nds32.md: Adjust indention.
19041 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19043 * config/nds32/nds32.md (feature): New attribute.
19045 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19047 * config/nds32/nds32.md (subtype): New attribute.
19049 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
19052 * config/arm/arm-builtins.c (arm_expand_builtin): Change
19053 expansion to perform a bitwise AND of the argument followed by a
19054 boolean negation of the result.
19056 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
19058 PR rtl-optimization/84878
19059 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19060 the basic block. Assert the use reference is not artificial and that
19061 it has an associated insn.
19063 2018-04-04 Michael Matz <matz@suse.de>
19065 * builtins.c (compute_objsize): Pass correct operand
19066 to array_at_struct_end_p.
19068 2018-04-04 Richard Biener <rguenther@suse.de>
19071 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19072 from contexts for DINFO_LEVEL_TERSE and below.
19074 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19076 * config/nds32/nds32-doubleword.md (move_<mode>): Require
19077 resiter_operand condition.
19078 * config/nds32/nds32.md (*move<mode>): Ditto.
19080 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19081 Monk Chiang <sh.chiang04@gmail.com>
19083 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19085 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19087 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19089 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19090 Kito Cheng <kito.cheng@gmail.com>
19092 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19093 nds32_cond_code_str, output_cond_branch,
19094 output_cond_branch_compare_zero, nds32_expand_cbranch,
19095 nds32_expand_cstore, nds32_expand_movcc,
19096 nds32_output_cbranchsi4_equality_zero,
19097 nds32_output_cbranchsi4_equality_reg,
19098 nds32_output_cbranchsi4_equality_reg_or_const_int,
19099 nds32_output_cbranchsi4_greater_less_zero: New functions.
19100 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19101 nds32_expand_cstore, nds32_expand_movcc,
19102 nds32_output_cbranchsi4_equality_zero,
19103 nds32_output_cbranchsi4_equality_reg,
19104 nds32_output_cbranchsi4_equality_reg_or_const_int,
19105 nds32_output_cbranchsi4_greater_less_zero): Declare.
19106 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19107 nds32_rimm11s_operand): New predicates.
19108 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19109 * config/nds32/nds32.md: Rewrite all the branch and conditional move
19112 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19114 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19115 * config/nds32/nds32.md: Ditto.
19116 * config/nds32/pipelines.md: Ditto.
19118 2018-04-04 Richard Biener <rguenther@suse.de>
19120 PR tree-optimization/85168
19121 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19122 propagating abnormals.
19124 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19126 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19128 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19129 Kito Cheng <kito.cheng@gmail.com>
19131 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19132 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19133 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19134 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19135 * config/nds32/nds32.md (sibcall_internal): New.
19136 (sibcall_register): Remove.
19137 (sibcall_immediate): Remove.
19138 (sibcall_value_internal): New.
19139 (sibcall_value_register): Remove.
19140 (sibcall_value_immediate): Remove.
19141 * config/nds32/predicates.md (nds32_general_register_operand): New.
19142 (nds32_call_address_operand): New.
19144 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19146 PR rtl-optimization/85167
19147 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19148 bb_defs if *split_p, instead preinitialize it to NULL.
19150 PR tree-optimization/85156
19151 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19152 evaluating the argument multiple times.
19154 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
19156 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19158 (_mm_cvtpd_ps): Likewise.
19159 (_mm_cvttpd_epi32): Likewise.
19160 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19161 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19162 vector, pixel, and bool following altivec.h include.
19164 2018-04-03 Martin Sebor <msebor@redhat.com>
19166 * doc/extend.texi (Common Function Attributes): Clarify.
19167 (const attribute): Likewise.
19168 (pure attribute): Likewise.
19170 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19173 * config/i386/i386.c (ix86_expand_vector_set): Use
19174 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
19176 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
19178 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19179 instructions when changing rounding bits to preserve precision bits
19180 in the x87 control word.
19182 2018-04-03 Martin Liska <mliska@suse.cz>
19184 PR tree-optimization/82491
19185 * rtl.h (strip_offset_and_add): Replace += suboffset with
19186 poly_uint64 () + suboffset.
19188 2018-03-29 Martin Liska <mliska@suse.cz>
19189 Martin Jambor <mjambor@suse.cz>
19192 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19193 param_type is not an integral or pointer type.
19195 2018-04-03 Richard Biener <rguenther@suse.de>
19197 * sese.h (recompute_all_dominators): Remove.
19199 2018-04-02 Martin Sebor <msebor@redhat.com>
19201 * doc/invoke.texi (-Wrestrict): Fix typos.
19203 2018-04-02 Jim Wilson <jimw@sifive.com>
19205 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19206 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19207 (<optab>di3, <optab>si3_extend): Likewise.
19208 (<optab>si3_mask, <optab>si3_mask_1): New.
19209 (<optab>di3_mask, <optab>di3_mask_1): New.
19210 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19211 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19212 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19214 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
19216 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19219 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
19221 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19222 (nds32_canonicalize_comparison): New function.
19224 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19225 Kito Cheng <kito.cheng@gmail.com>
19226 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19228 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19229 * config/nds32/constants.md (unspec_volatile_element): Add
19230 UNSPEC_VOLATILE_RELAX_GROUP.
19231 * config/nds32/nds32-relax-opt.c: New file.
19232 * config/nds32/nds32-predicates.c
19233 (nds32_symbol_load_store_p): New function.
19234 * config/nds32/nds32-protos.h
19235 (nds32_symbol_load_store_p): Declare function.
19236 (make_pass_nds32_relax_opt): Declare new rtl pass function.
19237 * config/nds32/nds32.c
19238 (nds32_register_pass): New function to register pass.
19239 (nds32_register_passes): New function to register passes.
19240 * config/nds32/nds32.md (relax_group): New pattern.
19241 * config/nds32/nds32.opt (mrelax-hint): New option.
19242 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19244 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
19246 * config/nds32/t-nds32: Modify files dependency.
19248 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19250 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19251 (PROFILE_HOOK): Define its implementation.
19253 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19255 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19256 type and 32-bit size.
19258 2018-04-01 Jakub Jelinek <jakub@redhat.com>
19260 PR middle-end/85090
19261 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19262 (V_128_256): New mode iterator.
19263 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19264 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19265 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19267 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19268 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19270 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
19273 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19274 NaN inputs correctly.
19276 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
19279 * config/rs6000/vsx.md (??r): New mode attribute.
19280 (*vsx_mov<mode>_64bit): Use it.
19281 (*vsx_mov<mode>_32bit): Likewise.
19283 2018-03-30 Martin Sebor <msebor@redhat.com>
19285 PR tree-optimization/84818
19286 * builtins.c (check_access): Use warning_n.
19288 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19291 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
19293 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
19296 2018-03-30 Julia Koval <julia.koval@intel.com>
19299 * x86-tune.def (movx, partial_reg_dependency): Enable for
19302 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
19304 PR inline-asm/84985
19305 * lra-constraints.c (process_alt_operands): Move setting
19306 this_alternative_matches below.
19308 2018-03-29 Martin Liska <mliska@suse.cz>
19311 * doc/invoke.texi: Document how LTO works with debug info.
19312 Describe auto-load support of binutils. Mention 'x86-64'
19313 as valid option value of -march option.
19315 2018-03-29 Jakub Jelinek <jakub@redhat.com>
19317 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
19320 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
19321 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
19322 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
19325 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
19328 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
19329 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
19330 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
19331 for RS6000_BTM_POWERPC64.
19332 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
19333 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
19334 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
19337 (DIVDEU): Likewise.
19339 2018-03-28 Carl Love <cel@us.ibm.com>
19342 2017-09-27 Carl Love <cel@us.ibm.com>
19344 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
19345 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
19346 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
19349 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19351 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
19352 instead of __vector bool.
19353 (_mm_max_pu8): Likewise.
19354 (_mm_min_pi16): Likewise.
19356 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
19359 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
19360 (DIVWEUO): Likewise.
19361 (DIVDEO): Likewise.
19362 (DIVDEUO): Likewise.
19363 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
19364 DIVWEUO and DIVDEUO.
19365 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
19366 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
19367 (div_extend): Likewise.
19368 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
19370 (__builtin_divweuo): Likewise.
19371 (__builtin_divdeo): Likewise.
19372 (__builtin_divdeuo): Likewise.
19374 2018-03-28 Jakub Jelinek <jakub@redhat.com>
19377 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
19378 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
19380 PR tree-optimization/82004
19381 * gimple-match-head.c (optimize_pow_to_exp): New function.
19382 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
19383 Don't fold to exp if optimize_pow_to_exp is false.
19385 2018-03-28 Martin Liska <mliska@suse.cz>
19388 * calls.c (initialize_argument_information): Fix trailing space.
19389 * common.opt: Fix typo and provide better explanation for
19390 -fsanitize-coverage option.
19391 * config/i386/i386.opt: Fix typo.
19393 2018-03-28 Jakub Jelinek <jakub@redhat.com>
19394 Martin Liska <mliska@suse.cz>
19397 * gimplify.c (asan_poison_variable): Don't do the check for
19398 gimplify_omp_ctxp here.
19399 (gimplify_decl_expr): Do it here.
19400 (gimplify_target_expr): Likewise.
19402 2018-03-28 Martin Liska <mliska@suse.cz>
19405 * config/i386/i386.c (ix86_function_arg_advance): Do not call
19406 chkp_type_bounds_count if MPX is not enabled.
19408 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
19410 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
19412 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
19415 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
19416 function to create the function decl for complex long double
19417 multiply and divide for -mabi=ieeelongdouble.
19418 (init_float128_ieee): Call it.
19420 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
19423 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
19424 -fcf-protection=branch -mibt.
19425 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
19427 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
19430 * config/arm/arm.c (arm_valid_symbolic_address): Handle
19431 arm_word_relocations.
19433 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
19436 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
19437 extern array declarations.
19439 2018-03-27 Richard Biener <rguenther@suse.de>
19441 PR middle-end/84067
19442 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
19443 explicit single_use checks.
19445 2018-03-27 Richard Biener <rguenther@suse.de>
19447 PR tree-optimization/85082
19448 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
19451 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
19453 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
19454 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
19455 Turn on fasynchronous-unwind-tables and funwind-tables.
19457 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
19460 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
19461 (*bmi_blsr_<mode>_ccz): Ditto.
19463 2018-03-26 Tom de Vries <tom@codesourcery.com>
19465 PR tree-optimization/85063
19466 * omp-general.c (offloading_function_p): New function. Factor out
19468 * omp-offload.c (pass_omp_target_link::gate): ... here.
19469 * omp-general.h (offloading_function_p): Declare.
19470 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
19471 with attribute omp declare target for offloading functions.
19473 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
19475 PR tree-optimization/84005
19476 * tree-data-ref.h (get_base_for_alignment): Declare.
19477 * tree-data-ref.c (get_base_for_alignment_1): New function.
19478 (get_base_for_alignment): Likewise.
19479 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
19480 get_base_for_alignment to find a suitable base object, instead
19481 of always using drb->base_address.
19483 2018-03-23 Jakub Jelinek <jakub@redhat.com>
19485 PR inline-asm/85022
19486 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
19487 known size by default.
19489 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
19491 PR inline-asm/85030
19492 * lra-constraints.c (process_alt_operands): Don't match BLKmode
19493 and non BLKmode operands.
19495 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19498 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
19499 Clean up attributes.
19501 2018-03-23 Richard Biener <rguenther@suse.de>
19504 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
19505 we are going to emit early debug for LTO.
19507 2018-03-23 Jakub Jelinek <jakub@redhat.com>
19509 PR inline-asm/85034
19510 * function.c (match_asm_constraints_1): Don't optimize if input
19511 doesn't satisfy general_operand predicate for output's mode.
19513 PR inline-asm/85022
19514 * alias.c (write_dependence_p): Don't require for x_canonicalized
19515 non-VOIDmode if x has VOIDmode.
19518 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
19519 just don't try to optimize it rather than assert it never happens.
19521 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
19523 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
19524 macro expansions for definition of ST_INTERNAL_<mode> and
19525 LD_INTERNAL_<mode> builtins.
19526 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
19528 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
19530 (altivec_expand_st_builtin): Likewise.
19531 (altivec_expand_builtin): Remove calls to deleted functions.
19532 (rs6000_address_for_altivec): Delete this function.
19533 * config/rs6000/vector.md: Remove expands for
19534 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
19536 2018-03-22 Sudakshina Das <sudi.das@arm.com>
19539 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
19540 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
19541 re-computing once computed.
19542 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
19543 (arm_init_machine_status): Initialize
19544 machine->static_chain_stack_bytes.
19546 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
19549 * doc/extend.texi: Add four new prototypes for vec_ld.
19550 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
19551 definitions for more logical presentation.
19552 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
19553 entries for V1TI variants of __builtin_altivec_ld builtin.
19554 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
19555 handling of V1TI variant of LVX icode pattern.
19556 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
19557 (rs6000_gimple_fold_builtin): Likewise.
19558 (altivec_init_builtins): Add code to define
19559 __builtin_altivec_lvx_v1ti function.
19561 2018-03-22 Jakub Jelinek <jakub@redhat.com>
19563 PR inline-asm/84941
19564 * function.c (match_asm_constraints_1): Don't do the optimization
19565 if input isn't a REG, SUBREG, MEM or constant.
19567 2018-03-22 Tom de Vries <tom@codesourcery.com>
19569 PR tree-optimization/84956
19570 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
19571 bb_has_abnormal_pred.
19573 2018-03-22 Jakub Jelinek <jakub@redhat.com>
19576 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
19577 DECL_INITIAL (decl) to decl at the end.
19578 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
19579 adjust the comment.
19581 2018-03-21 Joseph Myers <joseph@codesourcery.com>
19583 * doc/extend.texi (__builtin_tgmath): Document when complex
19584 integer types are treated as _Complex _Float64.
19586 2018-03-21 Tom de Vries <tom@codesourcery.com>
19588 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
19590 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19592 PR tree-optimization/84960
19593 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
19594 if it is ENTRY block, move them into single succ of ENTRY in that case.
19596 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
19598 PR tree-optimization/84811
19599 * poly-int.h (poly_span_traits): Remove the T3 parameter and
19600 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
19601 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
19602 (known_subrange_p): Update accordingly. Cast each value involved
19603 in the size comparison, rather than casting the result of the
19606 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19608 PR tree-optimization/84982
19609 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
19610 by flipping the least significant bit rather than all bits from
19611 bitpos to bitpos + bitsize - 1.
19613 2018-03-21 Nathan Sidwell <nathan@acm.org>
19615 * doc/extend.texi (Deprecated Features): Remove mention of
19616 long-deleted deprecations.
19618 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19621 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
19622 * configure: Regenerate.
19624 2018-03-21 Tom de Vries <tom@codesourcery.com>
19626 PR tree-optimization/83126
19627 * tree-parloops.c (num_phis): New function.
19628 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
19630 2018-03-21 Nathan Sidwell <nathan@acm.org>
19632 * doc/extend.texi (Deprecated Features): Update deprecated flags,
19633 mention anon-struct/union members and trailing attributes.
19635 2018-03-21 Bin Cheng <bin.cheng@arm.com>
19637 PR tree-optimization/84969
19638 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
19639 builtin memset partitions if they set different rhs values.
19641 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19643 PR rtl-optimization/84989
19644 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
19645 VEC_DUPLICATE with scalar result mode.
19647 2018-03-21 Martin Liska <mliska@suse.cz>
19650 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
19651 not intended return statement.
19653 2018-03-21 Martin Liska <mliska@suse.cz>
19656 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
19657 (chkp_find_bound_slots_1): Limit number of iterations.
19659 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
19662 * Minor grammar fixes for x86 options.
19664 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19667 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
19668 holding REG_CFA_RESTORE notes, instead turn them into a USE.
19670 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
19673 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
19674 (altivec_lvx_<mode>_1op): Likewise.
19675 (altivec_stvx_<mode>_2op): Likewise.
19676 (altivec_stvx_<mode>_1op): Likewise.
19677 (altivec_lvx_<VM2:mode>): New define_expand.
19678 (altivec_stvx_<VM2:mode>): Likewise.
19679 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
19680 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19681 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
19682 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19683 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
19684 (rs6000_gen_lvx): Likewise.
19685 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
19686 (altivec_expand_stv_builtin): Likewise.
19687 (altivec_expand_builtin): Likewise.
19688 * config/rs6000/vector.md: Likewise.
19690 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19693 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
19696 2018-03-20 Richard Biener <rguenther@suse.de>
19699 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
19700 sign-conversions as zero, fall back to standard scalar_stmt
19703 2018-03-20 Martin Liska <mliska@suse.cz>
19706 * predict.c (rebuild_frequencies): Handle case when we have
19707 PROFILE_ABSENT, but flag_guess_branch_prob is false.
19709 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19712 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
19713 flag_section_anchors.
19714 * varasm.c (use_blocks_for_decl_p): Remove hack for
19715 dw2_force_const_mem.
19718 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
19720 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
19721 be created, use lowpart_subreg of operands[0] rather than operands[0]
19723 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
19724 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
19725 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
19726 and n constraint instead of aarch64_shift_imm_di and Usd.
19727 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19728 (*aarch64_<optab>_reg_minus<mode>3): ... this.
19730 2018-03-20 Sudakshina Das <sudi.das@arm.com>
19733 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19734 to favor GPR over NEON registers.
19735 (<shift>di3_neon): Likewise.
19737 2018-03-20 Tom de Vries <tom@codesourcery.com>
19740 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19741 (nvptx_process_pars): Emit bar.sync asap and alap.
19743 2018-03-20 Tom de Vries <tom@codesourcery.com>
19746 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19747 seen_label if seen_label is already set.
19749 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19752 * config/i386/i386.c (fold_builtin_cpu): For features above 31
19753 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19754 Use 1U instead of 1. Formatting fixes.
19757 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19758 instead of TREE_TYPE (s1) for the return value.
19760 2018-03-19 Jakub Jelinek <jakub@redhat.com>
19762 PR tree-optimization/84946
19763 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19764 bitsize + bitsize in poly_uint64 rather than poly_int64.
19767 * dwarf2asm.c: Include fold-const.c.
19768 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19769 of decl rather than decl itself.
19771 PR rtl-optimization/84643
19772 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19774 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
19777 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19778 calling assemble_variable.
19780 2018-03-19 Sudakshina Das <sudi.das@arm.com>
19783 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19784 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19786 2018-03-19 Jim Wilson <jimw@sifive.com>
19789 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19790 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19791 (riscv_first_stack_step): Likewise.
19792 (riscv_option_override): Use STACK_BOUNDARY instead of
19793 MIN_STACK_BOUNDARY.
19794 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19795 MIN_STACK_BOUNDARY.
19796 (BIGGEST_ALIGNMENT): Set to 128.
19797 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19798 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19801 2018-03-19 Richard Biener <rguenther@suse.de>
19803 PR tree-optimization/84933
19804 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19805 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19807 2018-03-19 Richard Biener <rguenther@suse.de>
19809 PR tree-optimization/84859
19810 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19811 (cond_if_else_store_replacement): Perform sinking operation on
19812 single-store BBs regardless of MAX_STORES_TO_SINK setting.
19813 Generalize what a BB with a single eligible store is.
19815 2018-03-19 Richard Biener <rguenther@suse.de>
19817 PR tree-optimization/84929
19818 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19819 chrec_is_positive against non-chrec arg.
19821 2018-03-19 Tamar Christina <tamar.christina@arm.com>
19824 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19826 2018-03-18 Martin Liska <mliska@suse.cz>
19828 PR rtl-optimization/84635
19829 * regrename.c (build_def_use): Use matches_mode only when
19832 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
19834 PR tree-optimization/84913
19835 * tree-vect-loop.c (vectorizable_reduction): Don't try to
19836 vectorize chains of COND_EXPRs.
19838 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19840 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19842 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19844 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19846 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19848 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19850 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19851 Kito Cheng <kito.cheng@gmail.com>
19853 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19854 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19855 (nds32_adjust_reg_alloc_order): New function.
19856 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19858 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
19860 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19861 nds32_print_operand, nds32_print_operand_address): Use
19862 HOST_WIDE_INT_PRINT_DEC instead.
19864 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19866 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19868 2018-03-17 Jakub Jelinek <jakub@redhat.com>
19871 * config/i386/i386.c (initial_ix86_tune_features,
19872 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19873 unsigned long long.
19874 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19875 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19876 rather than 1u << ix86_tune. Formatting fix.
19877 (ix86_option_override_internal): Change ix86_arch_mask from
19878 unsigned int to unsigned HOST_WIDE_INT, initialize to
19879 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19880 (ix86_function_specific_restore): Likewise.
19882 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19885 * postreload.c (reload_combine_recognize_pattern): Perform
19886 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19887 truncate_int_for_mode the result for the destination's mode.
19890 * hsa-gen.c (mem_type_for_type): Fix comment typo.
19891 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19893 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19896 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
19899 * lra-assigns.c (lra_split_hard_reg_for): Don't use
19900 regno_allocno_class_array and sorted_pseudos.
19901 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19902 insns where regno is used.
19904 2018-03-16 Martin Liska <mliska@suse.cz>
19907 * multiple_target.c (create_dispatcher_calls): Redirect
19908 reference in the symbol table.
19910 2018-03-16 Martin Liska <mliska@suse.cz>
19913 * multiple_target.c (create_dispatcher_calls): Redirect also
19916 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19920 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19921 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19922 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19924 2018-03-16 Julia Koval <julia.koval@intel.com>
19926 * doc/invoke.texi (Skylake Server): Add CLWB.
19927 Cannonlake): Remove CLWB.
19929 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19931 PR tree-optimization/84841
19932 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19934 (FLOAT_ONE_CONST_TYPE): Define.
19935 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19936 (sort_by_operand_rank): Put entries with higher constant_type last
19937 rather than first to match comments.
19939 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
19941 * config/nios2/nios2.md (movsi_internal): Fix thinko in
19944 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19947 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19948 check and use address of target always.
19950 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
19953 * config/i386/i386.c (indirect_thunk_needed): Update comments.
19954 (indirect_thunk_bnd_needed): Likewise.
19955 (indirect_thunks_used): Likewise.
19956 (indirect_thunks_bnd_used): Likewise.
19957 (indirect_return_needed): New.
19958 (indirect_return_bnd_needed): Likewise.
19959 (output_indirect_thunk_function): Add a bool argument for
19961 (output_indirect_thunk_function): Don't generate alias for
19962 function return thunk.
19963 (ix86_code_end): Call output_indirect_thunk_function to generate
19964 function return thunks.
19965 (ix86_output_function_return): Set indirect_return_bnd_needed
19966 and indirect_return_needed instead of indirect_thunk_bnd_needed
19967 and indirect_thunk_needed.
19969 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
19971 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19972 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19973 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19975 2018-03-15 David Malcolm <dmalcolm@redhat.com>
19976 Paul Hua <paul.hua.gm@gmail.com>
19979 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19981 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
19983 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19984 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19985 resp. SFmode cases.
19987 2018-03-15 Tamar Christina <tamar.christina@arm.com>
19990 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19991 instead of GET_MODE_SIZE when comparing Units.
19993 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19996 * varasm.c (hash_section): Return an unchangeble hash value
19997 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19998 Return !aarch64_can_use_per_function_literal_pools_p ().
20000 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20003 * optabs.c (emit_conditional_move): Pass address of cmode's copy
20004 rather than address of cmode as last argument to prepare_cmp_insn.
20006 2018-03-15 Julia Koval <julia.koval@intel.com>
20008 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20009 F_AVX512VNNI, F_AVX512BITALG): New.
20011 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
20014 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
20015 insn for floating-point loads and stores.
20017 2018-03-14 Carl Love <cel@us.ibm.com>
20019 * config/rs6000/rs6000-c.c: Add macro definitions for
20020 ALTIVEC_BUILTIN_VEC_PERMXOR.
20021 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20022 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20023 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20024 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20026 * config/doc/extend.texi: Add prototypes for vec_permxor.
20028 2018-03-14 David Malcolm <dmalcolm@redhat.com>
20031 * diagnostic-show-locus.c (class layout_point): Convert m_line
20032 from int to linenum_type.
20033 (line_span::comparator): Use linenum "compare" function when
20034 comparing line numbers.
20035 (test_line_span): New function.
20036 (layout_range::contains_point): Convert param "row" from int to
20038 (layout_range::intersects_line_p): Likewise.
20039 (layout::will_show_line_p): Likewise.
20040 (layout::print_source_line): Likewise.
20041 (layout::should_print_annotation_line_p): Likewise.
20042 (layout::print_annotation_line): Likewise.
20043 (layout::print_leading_fixits): Likewise.
20044 (layout::annotation_line_showed_range_p): Likewise.
20045 (struct line_corrections): Likewise for field m_row.
20046 (line_corrections::line_corrections): Likewise for param "row".
20047 (layout::print_trailing_fixits): Likewise.
20048 (layout::get_state_at_point): Likewise.
20049 (layout::get_x_bound_for_row): Likewise.
20050 (layout::print_line): Likewise.
20051 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20052 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20053 * input.c (selftest::test_linenum_comparisons): New function.
20054 (selftest::input_c_tests): Call it.
20055 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20056 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20057 * selftest.h (ASSERT_GT): New macro.
20058 (ASSERT_GT_AT): New macro.
20059 (ASSERT_LT): New macro.
20060 (ASSERT_LT_AT): New macro.
20062 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
20064 PR rtl-optimization/84780
20065 * combine.c (distribute_links): Don't make a link based on pc_rtx.
20067 2018-03-14 Martin Liska <mliska@suse.cz>
20069 * tree.c (record_node_allocation_statistics): Use
20070 get_stats_node_kind.
20071 (get_stats_node_kind): New function extracted from
20072 record_node_allocation_statistics.
20073 (free_node): Use get_stats_node_kind.
20075 2018-03-14 Richard Biener <rguenther@suse.de>
20077 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20078 that the value-set of ANTIC_IN doesn't grow.
20081 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20083 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20084 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20086 2018-03-14 Julia Koval <julia.koval@intel.com>
20088 * config.gcc (icelake-client, icelake-server): New.
20090 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20091 (initial_ix86_arch_features): Ditto.
20092 (PTA_SKYLAKE): Add SGX.
20093 (PTA_ICELAKE): Remove.
20094 (PTA_ICELAKE_CLIENT): New.
20095 (PTA_ICELAKE_SERVER): New.
20096 (ix86_option_override_internal): Split up icelake on icelake client and
20098 (get_builtin_code_for_version): Ditto.
20099 (fold_builtin_cpu): Ditto.
20100 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20101 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20102 * config/i386/i386.h (processor_type): Ditto.
20103 * doc/invoke.texi: Ditto.
20105 2018-03-14 Jakub Jelinek <jakub@redhat.com>
20108 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20109 INTEGER_CST offset, add it together with bitpos / 8 and
20110 sign extend based on POINTER_SIZE.
20114 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
20117 * config/i386/constraints.md (Yc): New register constraint.
20118 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20119 Use Yc constraint for alternative 2 of operand 0. Remove
20120 preferred_for_speed attribute.
20122 2018-03-14 Richard Biener <rguenther@suse.de>
20124 PR tree-optimization/84830
20125 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20126 with the old one to avoid oscillations.
20128 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
20131 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20133 (assign_by_spills): Return a flag of reload assignment failure.
20134 Do not process the reload assignment failures. Do not spill other
20135 reload pseudos if they has the same reg class. Update n if
20137 (lra_assign): Add a return arg. Set up from the result of
20138 assign_by_spills call.
20139 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20140 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
20141 usage_insns if it is not NULL.
20142 (spill_hard_reg_in_range): New function.
20143 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20144 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20145 function prototypes.
20146 (lra_assign): Change prototype.
20147 * lra.c (lra): Add code to deal with fails by splitting hard reg
20150 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
20152 * config/riscv/riscv.opt (mrelax): New option.
20153 * config/riscv/riscv.c (riscv_file_start): Emit ".option
20154 "norelax" when riscv_mrelax is disabled.
20155 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20157 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20160 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20161 reassociation for int modes.
20163 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20165 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20166 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20168 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20169 * config/aarch64/aarch64-sve.md
20170 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20171 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20172 (*extend<mode><Vwide>2): Rename to...
20173 (aarch64_sve_extend<mode><Vwide>2): ...this.
20174 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20175 renaming the old pattern to...
20176 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
20178 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20179 define_expand, renaming the old pattern to...
20180 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20181 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20182 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20183 account when deciding which SVE instruction the optab should use.
20184 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20186 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20188 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20189 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20190 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20191 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20192 (tlsdesc_small_<mode>): Turn a define_expand and use
20193 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
20194 (tlsdesc_small_advsimd_<mode>): ...this.
20195 (tlsdesc_small_sve_<mode>): New pattern.
20197 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20199 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20200 (UNSPEC_UMUL_HIGHPART): New constants.
20201 (MUL_HIGHPART): New int iteraor.
20202 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20203 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20205 (*<su>mul<mode>3_highpart): New define_insn.
20207 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20210 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20213 2018-03-13 Martin Liska <mliska@suse.cz>
20216 * (sem_item_optimizer::sem_item_optimizer): Initialize new
20218 (sem_item_optimizer::~sem_item_optimizer): Release it.
20219 (sem_item_optimizer::merge_classes): Register variable aliases.
20220 (sem_item_optimizer::fixup_pt_set): New function.
20221 (sem_item_optimizer::fixup_points_to_sets): Likewise.
20222 * ipa-icf.h: Declare new variables and functions.
20224 2018-03-13 Jakub Jelinek <jakub@redhat.com>
20226 PR middle-end/84834
20227 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20228 integer_pow2p@2 and test integer_pow2p in condition.
20229 (A < 0 ? C : 0): Similarly for @1.
20231 PR middle-end/84831
20232 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20233 characters starting at p contain '\0' character, don't look beyond
20237 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20238 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20241 * reg-stack.c (change_stack): Change update_end var from int to
20242 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20243 also call set_block_for_insn on the newly added insns and rescan.
20246 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20247 on the last operand.
20250 * tree.c (stabilize_reference_1): Return save_expr (e) for
20251 STATEMENT_LIST even if it doesn't have side-effects.
20253 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
20255 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20257 2018-03-12 Renlin Li <renlin.li@arm.com>
20259 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20260 aarch64_output_scalar_simd_mov_immediate.
20262 2018-03-12 Martin Sebor <msebor@redhat.com>
20264 PR tree-optimization/83456
20265 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20266 for perfectly overlapping calls to memcpy.
20267 (gimple_fold_builtin_memory_chk): Same.
20268 (gimple_fold_builtin_strcpy): Handle no-warning.
20269 (gimple_fold_builtin_stxcpy_chk): Same.
20270 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20272 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20274 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20275 parameter. Use it for SFmode.
20276 (rs6000_function_arg_advance_1): Adjust.
20277 (rs6000_function_arg): Adjust.
20278 (rs6000_gimplify_va_arg): Pass false for that new parameter.
20280 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20282 PR rtl-optimization/84169
20283 PR rtl-optimization/84780
20284 * combine.c (can_combine_p): Check for a 2-insn combination whether
20285 the destination register is used between the two insns, too.
20287 2018-03-12 Richard Biener <rguenther@suse.de>
20289 PR tree-optimization/84803
20290 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
20291 for refs DR analysis didn't process.
20293 2018-03-12 Richard Biener <rguenther@suse.de>
20295 PR tree-optimization/84777
20296 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
20297 force-vectorize loops ignore whether we are optimizing for size.
20299 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
20301 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
20302 (TARGET_MD_ASM_ADJUST): Define.
20304 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
20305 Kito Cheng <kito.cheng@gmail.com>
20306 Chung-Ju Wu <jasonwucj@gmail.com>
20308 * config/nds32/nds32.c (nds32_compute_stack_frame,
20309 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
20310 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
20311 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
20312 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
20313 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
20314 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
20315 * config/nds32/nds32.md (prologue, epilogue): Use macro
20316 NDS32_V3PUSH_AVAILABLE_P to do checking.
20318 2018-03-11 Jakub Jelinek <jakub@redhat.com>
20321 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
20322 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
20323 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
20324 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
20325 addition of most attributes on !orig_type_die or the attribute not
20326 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
20328 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
20329 Chung-Ju Wu <jasonwucj@gmail.com>
20331 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
20332 __NDS32_VH__ macro.
20333 * config/nds32/nds32.opt (mvh): New option.
20335 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
20336 Chung-Ju Wu <jasonwucj@gmail.com>
20338 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
20340 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
20341 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
20344 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
20345 Chung-Ju Wu <jasonwucj@gmail.com>
20347 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
20349 * config/nds32/nds32-multiple.md (strlensi): New pattern.
20350 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
20352 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
20353 Kito Cheng <kito.cheng@gmail.com>
20354 Chung-Ju Wu <jasonwucj@gmail.com>
20356 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
20357 UNSPEC_FFMISM and UNSPEC_FLMISM.
20358 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
20359 for ffb, ffmism and flmism.
20360 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
20361 (unspec_ffmism): Ditto.
20362 (unspec_flmism): Ditto.
20363 (nds32_expand_builtin_impl): Check if string extension is available.
20364 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
20365 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
20367 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
20370 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
20373 * lra-assigns.c (assign_by_spills): Return a flag of reload
20374 assignment failure. Do not process the reload assignment
20375 failures. Do not spill other reload pseudos if they has the same
20377 (lra_assign): Add a return arg. Set up from the result of
20378 assign_by_spills call.
20379 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20380 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
20381 usage_insns if it is not NULL.
20382 (spill_hard_reg_in_range): New function.
20383 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20384 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20385 function prototypes.
20386 (lra_assign): Change prototype.
20387 * lra.c (lra): Add code to deal with fails by splitting hard reg
20390 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
20393 * config/i386/i386.opt: Replace Enforcment with Enforcement.
20395 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
20398 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
20399 (dw_val_node): Add val_symbolic_view.
20400 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
20401 (symview_upper_bound): New.
20402 (new_line_info_table): Initialize symviews_since_reset.
20403 (dwarf2out_source_line): Count symviews_since_reset and set
20404 symview_upper_bound.
20405 (dw_val_equal_p): Handle symview.
20406 (add_AT_symview): New.
20407 (print_dw_val): Handle symview.
20408 (attr_checksum, attr_checksum_ordered): Likewise.
20409 (same_dw_val_p, size_of_die): Likewise.
20410 (value_format, output_die): Likewise.
20411 (add_high_low_attributes): Use add_AT_symview for entry_view.
20412 (dwarf2out_finish): Reset symview_upper_bound, clear
20415 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
20418 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
20419 Add strict argument and use it.
20420 (rs6000_split_multireg_move): Update for new strict argument.
20421 (mem_operand_gpr): Disallow all non-offsettable addresses.
20422 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
20424 2018-03-09 Jakub Jelinek <jakub@redhat.com>
20427 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
20428 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
20429 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
20432 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
20433 decl, use remap_type if we want to use the type.
20435 2018-03-09 Martin Sebor <msebor@redhat.com>
20437 PR tree-optimization/84526
20438 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20440 (builtin_access::generic_overlap): Be prepared to handle non-array
20443 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
20445 PR rtl-optimization/84682
20446 * lra-constraints.c (process_address_1): Check is_address flag
20447 for address constraints.
20448 (process_alt_operands): Likewise.
20449 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
20450 preprocess_constraints.
20451 * recog.h (preprocess_constraints): Add oploc parameter.
20453 * recog.c (preprocess_constraints): Test address_operand for
20454 CT_ADDRESS constraints.
20456 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
20459 * lra-assigns.c (assign_by_spills): Return a flag of reload
20460 assignment failure. Do not process the reload assignment
20461 failures. Do not spill other reload pseudos if they has the same
20463 (lra_assign): Add a return arg. Set up from the result of
20464 assign_by_spills call.
20465 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20466 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
20467 usage_insns if it is not NULL.
20468 (spill_hard_reg_in_range): New function.
20469 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20470 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20471 function prototypes.
20472 (lra_assign): Change prototype.
20473 * lra.c (lra): Add code to deal with fails by splitting hard reg
20476 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20479 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
20480 Accept complain bool parameter. Only emit errors if it is true.
20481 (arm_parse_cpu_option_name): Likewise.
20482 (arm_target_thumb_only): Adjust callers of the above.
20483 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
20484 prototype to take a default true bool parameter.
20485 (arm_parse_arch_option_name): Likewise.
20487 2018-03-09 David Malcolm <dmalcolm@redhat.com>
20488 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
20492 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
20493 * configure: Regenerate.
20494 * configure.ac ("linker --version-script option"): New.
20495 ("linker soname option"): New.
20497 2018-03-09 Richard Biener <rguenther@suse.de>
20499 PR tree-optimization/84775
20500 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
20501 immediate uses of predicate stmts and mark them modified.
20504 PR tree-optimization/84178
20505 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20507 (version_loop_for_if_conversion): Delay update_ssa call.
20508 (tree_if_conversion): Delay update_ssa until after predicate
20511 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
20514 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
20515 when the function accesses prior frames.
20517 2018-03-08 Jakub Jelinek <jakub@redhat.com>
20520 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
20521 gen_llsym, otherwise call maybe_gen_llsym.
20523 PR inline-asm/84742
20524 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
20525 has ',' character inside of it.
20527 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20530 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
20531 as clobbering CC_REGNUM.
20533 2018-03-08 Richard Biener <rguenther@suse.de>
20535 PR middle-end/84552
20536 * tree-scalar-evolution.c: Include tree-into-ssa.h.
20537 (follow_copies_to_constant): Do not follow SSA names registered
20540 2018-03-08 Richard Biener <rguenther@suse.de>
20542 PR tree-optimization/84178
20543 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20545 (version_loop_for_if_conversion): Delay update_ssa call.
20546 (tree_if_conversion): Delay update_ssa until after predicate
20549 2018-03-08 David Malcolm <dmalcolm@redhat.com>
20551 PR tree-optimization/84178
20552 * tree-if-conv.c (release_bb_predicate): Remove the
20553 the assertion that the stmts have NULL use_ops.
20554 Discard the statements, asserting that they haven't
20555 yet been added to a BB.
20557 2018-03-08 Richard Biener <rguenther@suse.de>
20559 PR tree-optimization/84746
20560 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
20561 (phi_translate): Pass in destination ANTIC_OUT set.
20562 (phi_translate_1): Likewise. For a simplified result lookup
20563 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
20564 (phi_translate_set): Adjust.
20565 (do_pre_regular_insertion): Likewise.
20566 (do_pre_partial_partial_insertion): Likewise.
20568 2018-03-08 Martin Liska <mliska@suse.cz>
20570 PR gcov-profile/84735
20571 * doc/gcov.texi: Document usage of profile files.
20572 * gcov-io.h: Document changes in the format.
20574 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
20578 * dwarf2out.c (struct dw_line_info_table): Update comments for
20580 (FORCE_RESET_NEXT_VIEW): New.
20581 (FORCE_RESETTING_VIEW_P): New.
20582 (RESETTING_VIEW_P): Check for -1 too.
20583 (ZERO_VIEW_P): Likewise.
20584 (new_line_info_table): Force-reset next view.
20585 (dwarf2out_begin_function): Likewise.
20586 (dwarf2out_source_line): Simplify zero_view_p initialization.
20587 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
20588 view directly. Omit view when omitting .loc at line 0.
20590 2018-03-08 Jakub Jelinek <jakub@redhat.com>
20592 PR tree-optimization/84740
20593 * tree-switch-conversion.c (process_switch): Call build_constructors
20594 only if info.phi_count is non-zero.
20596 PR tree-optimization/84739
20597 * tree-tailcall.c (find_tail_calls): Check call arguments against
20598 DECL_ARGUMENTS (current_function_decl) rather than
20599 DECL_ARGUMENTS (func) when checking for tail recursion.
20601 2018-03-07 Jakub Jelinek <jakub@redhat.com>
20603 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
20604 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
20605 Volker Reichelt's entry and add entries for people that perform
20606 GCC fuzzy testing and report numerous bugs.
20608 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
20611 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
20612 readonly data in sdata, if that is disabled.
20613 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
20614 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
20615 -mreadonly-in-sdata option.
20617 2018-03-07 Martin Sebor <msebor@redhat.com>
20619 PR tree-optimization/84468
20620 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
20621 basic block when looking for nul assignment.
20623 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
20626 * except.h (output_function_exception_table): Adjust prototype.
20627 * except.c (output_function_exception_table): Remove FNNAME parameter
20628 and add SECTION parameter. Ouput one part of the table at a time.
20629 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
20630 the first part of the exception table and emit unwind directives.
20631 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
20632 (i386_pe_seh_cold_init): Likewise.
20633 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
20634 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
20635 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
20636 (ix86_output_call_insn): Emit a nop in one more case for SEH.
20637 * config/i386/winnt.c: Include except.h.
20638 (struct seh_frame_state): Add reg_offset, after_prologue and
20639 in_cold_section fields.
20640 (i386_pe_seh_end_prologue): Set seh->after_prologue.
20641 (i386_pe_seh_cold_init): New function.
20642 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
20643 to seh->in_cold_section.
20644 (seh_emit_push): Record the offset of the push.
20645 (seh_emit_save): Record the offet of the save.
20646 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
20647 Test seh->after_prologue to disregard the epilogue.
20648 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
20649 (i386_pe_end_cold_function): New function.
20651 2018-03-07 Jakub Jelinek <jakub@redhat.com>
20654 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
20655 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
20658 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
20660 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
20661 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
20663 PR middle-end/84723
20664 * multiple_target.c: Include tree-inline.h and intl.h.
20665 (expand_target_clones): Diagnose and fail if node->definition and
20666 !tree_versionable_function_p (node->decl).
20668 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
20670 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
20672 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
20673 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
20674 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
20676 2018-03-06 Jakub Jelinek <jakub@redhat.com>
20679 * combine.c (try_combine): Use reg_or_subregno instead of handling
20680 just paradoxical SUBREGs and REGs.
20682 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
20684 * config/arc/arc.c (arc_finalize_pic): Remove function.
20685 (arc_must_save_register): We use single base PIC register, remove
20686 checks to save/restore the PIC register.
20687 (arc_expand_prologue): Likewise.
20688 * config/arc/arc-protos.h (arc_set_default_type_attributes):
20690 (arc_verify_short): Likewise.
20691 (arc_attr_type): Likewise.
20692 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
20693 (walk_stores): Likewise.
20694 (arc_address_cost): Make it static.
20695 (arc_verify_short): Likewise.
20696 (branch_dest): Likewise.
20697 (arc_attr_type): Likewise.
20698 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
20699 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
20700 (arc_final_prescan_insn): Remove inserting the nops due to
20701 hardware hazards. It is done in reorg step.
20702 (insn_length_variant_t): Remove.
20703 (insn_length_parameters_t): Likewise.
20704 (arc_insn_length_parameters): Likewise.
20705 (arc_get_insn_variants): Likewise.
20706 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
20708 2018-03-06 Jakub Jelinek <jakub@redhat.com>
20710 PR inline-asm/84683
20711 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
20714 PR tree-optimization/84687
20715 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
20717 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
20719 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20721 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
20722 Rename to ppc_speculation_barrier.
20723 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
20724 __builtin_ppc_speculation_barrier.
20726 2018-03-05 Jakub Jelinek <jakub@redhat.com>
20729 * combine.c (combine_simplify_rtx): Don't try to simplify if
20730 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20733 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
20735 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20736 to 32 bytes when compiling for POWER9.
20738 2018-03-05 Jakub Jelinek <jakub@redhat.com>
20741 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20742 regparm >= 3 with no arg reg available also for calls with
20743 flag_force_indirect_call. Pass decl to ix86_function_regparm.
20746 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20748 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
20750 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
20753 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20755 2018-03-05 Richard Biener <rguenther@suse.de>
20757 PR tree-optimization/84486
20758 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20759 When inserting a __builtin_assume_aligned call set the LHS
20760 SSA name alignment info accordingly.
20762 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
20764 PR tree-optimization/84114
20765 * config/aarch64/aarch64.c (aarch64_reassociation_width)
20766 Avoid reassociation of FLOAT_MODE addition.
20768 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
20770 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20771 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20772 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20773 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20774 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20775 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20776 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20778 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20779 __builtin_ia32_wbinvd): New builtins.
20780 (SPECIAL_ARGS2): New.
20781 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20782 (SPECIAL_ARGS2): New.
20783 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20784 (ix86_valid_target_attribute_inner_p): Ditto.
20785 (ix86_init_mmx_sse_builtins): Add special_args2.
20786 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20787 TARGET_WBNOINVD_P): New.
20788 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20789 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20790 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20791 * config/i386/immintrin.h (_wbinvd): New intrinsic.
20792 * config/i386/pconfigintrin.h: New file.
20793 * config/i386/wbnoinvdintrin.h: Ditto.
20794 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20796 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20798 2018-03-05 Richard Biener <rguenther@suse.de>
20800 PR tree-optimization/84670
20801 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20803 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20804 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20805 (compute_antic_aux): Only assert the number of values in ANTIC_IN
20806 doesn't grow if all successors (recursively) were visited at least
20809 2018-03-05 Richard Biener <rguenther@suse.de>
20811 PR tree-optimization/84650
20812 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20813 if executed in the loop pipeline.
20815 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
20817 * doc/configfiles.texi (Configuration Files): Move info about
20818 conditionalizing $target-protos.h to...
20819 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
20820 differs from $target-protos.h.
20822 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
20823 Chung-Ju Wu <jasonwucj@gmail.com>
20825 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20826 * config/nds32/nds32-multiple.md (setmemsi): Define.
20827 * config/nds32/nds32-memory-manipulation.c
20828 (nds32_gen_dup_4_byte_to_word_value): New.
20829 (emit_setmem_word_loop): New.
20830 (emit_setmem_byte_loop): New.
20831 (nds32_expand_setmem_loop): New.
20832 (nds32_expand_setmem_loop_v3m): New.
20833 (nds32_expand_setmem_unroll): New.
20834 (nds32_expand_setmem): New.
20836 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20837 Chung-Ju Wu <jasonwucj@gmail.com>
20839 * config/nds32/nds32-memory-manipulation.c
20840 (nds32_emit_load_store): New.
20841 (nds32_emit_post_inc_load_store): New.
20842 (nds32_emit_mem_move): New.
20843 (nds32_emit_mem_move_block): New.
20844 (nds32_expand_movmemsi_loop_unknown_size): New.
20845 (nds32_expand_movmemsi_loop_known_size): New.
20846 (nds32_expand_movmemsi_loop): New.
20847 (nds32_expand_movmemsi_unroll): New.
20848 (nds32_expand_movmemqi): Rename ...
20849 (nds32_expand_movmemsi): ... to this.
20850 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20851 (movmemsi): ... to this.
20852 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20853 (nds32_expand_movmemsi): ... to this.
20855 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20856 Monk Chiang <sh.chiang04@gmail.com>
20857 Chung-Ju Wu <jasonwucj@gmail.com>
20859 * config/nds32/nds32-protos.h
20860 (nds32_expand_load_multiple): New arguments.
20861 (nds32_expand_store_multiple): Ditto.
20862 (nds32_valid_multiple_load_store): Rename ...
20863 (nds32_valid_multiple_load_store_p): ... to this.
20864 * config/nds32/nds32-memory-manipulation.c
20865 (nds32_expand_load_multiple): Refine implementation.
20866 (nds32_expand_store_multiple): Ditto.
20867 * config/nds32/nds32-multiple.md
20868 (load_multiple): Update nds32_expand_load_multiple interface.
20869 (store_multiple): Update nds32_expand_store_multiple interface.
20870 * config/nds32/nds32-predicates.c
20871 (nds32_valid_multiple_load_store): Rename ...
20872 (nds32_valid_multiple_load_store_p): ... to this and refine
20874 * config/nds32/predicates.md
20875 (nds32_load_multiple_and_update_address_operation): New predicate.
20876 (nds32_store_multiple_and_update_address_operation): New predicate.
20878 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20879 Chung-Ju Wu <jasonwucj@gmail.com>
20881 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20882 (combo): New attribute.
20883 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20885 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
20887 * config/nds32/nds32.opt: Change -mcmodel= default value.
20889 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
20890 Monk Chiang <sh.chiang04@gmail.com>
20891 Chung-Ju Wu <jasonwucj@gmail.com>
20893 * config/nds32/constants.md (unspec_element): New enum.
20894 * config/nds32/constraints.md (Umw): New constraint.
20895 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20896 * config/nds32/nds32-intrinsic.md: Likewise.
20897 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20898 (nds32_valid_smw_lwm_base_p): New.
20899 (nds32_output_smw_single_word): New.
20900 (nds32_output_lmw_single_word): New.
20901 (nds32_expand_unaligned_load): New.
20902 (nds32_expand_unaligned_store): New.
20903 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20904 (nds32_output_smw_single_word): Declare.
20905 (nds32_output_lmw_single_word): Declare.
20906 (nds32_expand_unaligned_load): Declare.
20907 (nds32_expand_unaligned_store): Declare.
20908 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20909 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20910 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20911 NDS32_BUILTIN_UASTORE_DW.
20912 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20915 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
20916 Kito Cheng <kito.cheng@gmail.com>
20917 Chung-Ju Wu <jasonwucj@gmail.com>
20919 * config/nds32/nds32-intrinsic.c
20920 (nds32_expand_builtin_null_ftype_reg): Delete.
20921 (nds32_expand_builtin_reg_ftype_imm): Ditto.
20922 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20923 (nds32_read_argument): New.
20924 (nds32_legitimize_target): Ditto.
20925 (nds32_legitimize_argument): Ditto.
20926 (nds32_check_constant_argument): Ditto.
20927 (nds32_expand_unop_builtin): Ditto.
20928 (nds32_expand_unopimm_builtin): Ditto.
20929 (nds32_expand_binop_builtin): Ditto.
20930 (nds32_builtin_decl_impl): Ditto.
20931 (builtin_description): Ditto.
20932 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20933 (nds32_init_builtins_impl): Ditto.
20934 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20935 (nds32_builtin_decl): New.
20936 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20937 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20939 2018-03-02 Jeff Law <law@redhat.com>
20941 * reorg.c (stop_search_p): Handle DEBUG_INSN.
20942 (redundant_insn, fill_simple_delay_slots): Likewise.
20943 (fill_slots_from_thread): Likewise.
20944 * resource.c (mark_referenced_resources): Likewise.
20945 (mark_set_resources, find_dead_or_set_registers): Likewise.
20947 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20949 * substring-locations.h (format_warning_va): Formatting fix for
20950 ATTRIBUTE_GCC_DIAG.
20951 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20953 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20954 * substring-locations.c: Include intl.h.
20955 (format_warning_va): Turned into small wrapper around
20956 format_warning_n_va, renamed to ...
20957 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20958 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20960 (format_warning_at_substring_n): New function.
20961 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20962 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
20963 format_warning_at_substring with just a shorter name instead of
20964 const function pointer.
20965 (fmtwarn_n): New function.
20966 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20967 appropriate, get rid of all the fmtstr temporaries, move conditionals
20968 with G_() wrapped string literals directly into fmtwarn arguments,
20969 cast dir.len to (int), formatting fixes.
20971 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
20973 * doc/invoke.texi: Remove "Cilk Plus" references.
20975 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20976 Richard Biener <rguenther@suse.de>
20979 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20980 for error or warning attributes if CALL_FROM_THUNK_P is set.
20983 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20986 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20987 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20990 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20991 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20993 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20994 instead of -1U in last predictors element's probability member.
20996 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20999 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21000 arguments if they are comparable.
21002 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21004 PR tree-optimization/84634
21005 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21006 masks and masked_loop_p with a single loop_masks, making sure it's
21007 null for bb vectorization.
21009 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21011 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21012 (vect_analyze_data_ref_access): Use loop->safe_len rather than
21013 loop->force_vectorize to check whether there is no alias.
21015 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21018 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21020 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21022 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21023 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21024 instead of a loop around prev_real_insn.
21025 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21028 PR inline-asm/84625
21029 * config/i386/i386.c (ix86_print_operand): Use conditional
21030 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21033 2018-03-02 Richard Biener <rguenther@suse.de>
21035 PR tree-optimization/84427
21036 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21037 (bitmap_set_subtract_values): Rewrite to handle multiple
21040 (prune_clobbered_mems): Likewise.
21041 (phi_translate): Take edge instead of pred/phiblock.
21042 (phi_translate_1): Likewise.
21043 (phi_translate_set): Likewise. Insert all translated
21044 exprs for a value into the set, keeping possibly multiple
21045 expressions per value.
21046 (compute_antic_aux): Adjust for phi_translate changes.
21047 When intersecting union the expressions and prune those
21048 not in the final value set, keeping possibly multiple
21049 expressions per value. Do not use value-insertion
21050 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21051 all expressions. Add verification that the value-sets
21052 only shrink during iteration.
21053 (compute_partial_antic_aux): Adjust for the phi_translate changes.
21054 (do_pre_regular_insertion): Likewise.
21055 (do_pre_partial_partial_insertion): Likewise.
21057 2018-03-02 Richard Biener <rguenther@suse.de>
21060 * config/darwin.c (saved_debug_info_level): New static global.
21061 (darwin_asm_lto_start): Disable debug info generation for LTO out.
21062 (darwin_asm_lto_end): Restore debug info generation settings.
21064 2018-03-01 Martin Liska <mliska@suse.cz>
21067 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21068 volatile arguments.
21070 2018-03-01 Richard Biener <rguenther@suse.de>
21073 * dwarf2out.c (gen_variable_die): Properly handle late VLA
21074 type annotation with LTO when debug was disabled at compile-time.
21076 2018-03-01 Matthew Fortune <mfortune@gmail.com>
21078 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21080 (mips_final_postscan_insn): Likewise.
21082 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
21084 PR rtl-optimization/84528
21085 * alias.c (init_alias_target): Add commentary.
21086 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21087 a unique base value if the frame pointer is not eliminated
21088 to the stack pointer.
21090 2018-03-01 Tom de Vries <tom@codesourcery.com>
21092 PR rtl-optimization/83327
21093 * lra-int.h (hard_regs_spilled_into): Declare.
21094 * lra.c (hard_regs_spilled_into): Define.
21095 (init_reg_info): Init hard_regs_spilled_into.
21096 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21097 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21098 (process_bb_lives): Handle hard_regs_spilled_into.
21099 (lra_create_live_ranges_1): Before doing liveness propagation, clear
21100 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21102 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
21104 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21105 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21106 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21107 * config/rs6000/aix72.h: New file.
21109 2018-02-28 Jakub Jelinek <jakub@redhat.com>
21111 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21112 instead of warning_at with conditional singular and plural messages
21116 * stor-layout.c (update_alignment_for_field): For
21117 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21118 && !DECL_PACKED (field), do the alignment update, just use
21119 only desired_align instead of MAX (type_align, desired_align)
21121 (place_field): Don't do known_align < desired_align handling
21122 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21123 is non-NULL, instead do it after rli->prev_field handling and
21124 only if not within a bitfield word. For DECL_PACKED (field)
21125 use type_align of BITS_PER_UNIT.
21127 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
21129 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21130 superfluous parentheses and trailing spaces.
21132 2018-02-28 Richard Biener <rguenther@suse.de>
21134 PR tree-optimization/84584
21135 * graphite-scop-detection.c (scop_detection::add_scop): Discard
21136 SCoPs with fake exit edge.
21138 2018-02-28 Martin Liska <mliska@suse.cz>
21141 * timevar.c (timer::print): Fix format to properly print 100%
21144 2018-02-28 Richard Biener <rguenther@suse.de>
21146 PR middle-end/84607
21147 * genmatch.c (capture_info::walk_match): Do not mark
21148 captured expressions without operands as expr_p given
21149 they act more like predicates and should be subject to
21150 "lost tail" side-effect preserving.
21152 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
21154 PR rtl-optimization/81611
21155 * auto-inc-dec.c (attempt_change): Move dead note from
21156 mem_insn if it's the next use of regno
21157 (find_address): Take address use of reg holding
21158 non-incremented value. Add parm to limit search to the named
21160 (merge_in_block): Attempt to use a mem insn that is the next
21161 use of the original regno.
21163 2018-02-27 Martin Sebor <msebor@redhat.com>
21166 * doc/invoke.texi (-Wmissing-attributes): New option.
21167 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21169 2018-02-27 Martin Sebor <msebor@redhat.com>
21171 PR translation/84207
21172 * diagnostic-core.h (warning_n, error_n, inform_n): Change
21173 n argument to unsigned HOST_WIDE_INT.
21174 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21175 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
21176 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21177 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21179 2018-02-27 Richard Biener <rguenther@suse.de>
21181 PR tree-optimization/84512
21182 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21183 Do not use the estimate returned from record_stmt_cost for
21184 the scalar iteration cost but sum properly using add_stmt_cost.
21186 2018-02-27 Richard Biener <rguenther@suse.de>
21188 PR tree-optimization/84466
21189 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21190 Adjust last change to less strictly validate use operands.
21192 2018-02-27 Martin Liska <mliska@suse.cz>
21194 PR gcov-profile/84548
21195 * gcov.c (process_file): Allow partial overlap and consider it
21196 also as group functions.
21197 (output_lines): Properly calculate range of lines for a group.
21199 2018-02-27 Martin Liska <mliska@suse.cz>
21201 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21202 'ggc' suffixes. Change first column width.
21203 (timer::print): Fix formatting of the column.
21205 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
21207 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21208 preserve inline entry blocks for the sake of debug inline
21209 entry point markers alone.
21210 (remove_unused_locals): Suggest in comments a better place to
21211 force the preservation of inline entry blocks that are
21212 otherwise unused, but do not preserve them.
21214 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21216 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21218 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21221 * config/i386/constraints.md (Bs): Replace
21222 ix86_indirect_branch_register with
21223 TARGET_INDIRECT_BRANCH_REGISTER.
21225 * config/i386/i386.md (indirect_jump): Likewise.
21226 (tablejump): Likewise.
21227 (*sibcall_memory): Likewise.
21228 (*sibcall_value_memory): Likewise.
21229 Peepholes of indirect call and jump via memory: Likewise.
21230 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21231 (*sibcall_value_GOT_32): Likewise.
21232 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21233 (GOT_memory_operand): Likewise.
21234 (call_insn_operand): Likewise.
21235 (sibcall_insn_operand): Likewise.
21236 (GOT32_symbol_operand): Likewise.
21237 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21239 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21241 PR rtl-optimization/83496
21242 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21243 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
21244 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21245 redundant insn, if any.
21246 (relax_delay_slots): Likewise.
21247 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21249 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
21251 PR tree-optimization/83965
21252 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21253 that grouped statements are part of a reduction chain. Return
21254 true if the statement is not marked as a reduction itself but
21255 is part of a group.
21256 (vect_recog_dot_prod_pattern): Don't check whether the statement
21257 is part of a group here.
21258 (vect_recog_sad_pattern): Likewise.
21259 (vect_recog_widen_sum_pattern): Likewise.
21261 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21264 * final.c (rest_of_clean_state): Also look for calls inside sequences.
21266 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21269 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21271 (ix86_output_indirect_function_return): New prototype.
21272 (ix86_split_simple_return_pop_internal): Likewise.
21273 * config/i386/i386.c (indirect_return_via_cx): New.
21274 (indirect_return_via_cx_bnd): Likewise.
21275 (indirect_thunk_name): Handle return va CX_REG.
21276 (output_indirect_thunk_function): Create alias for
21277 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21278 (ix86_output_indirect_jmp): Remove the bool argument.
21279 (ix86_output_indirect_function_return): New function.
21280 (ix86_split_simple_return_pop_internal): Likewise.
21281 * config/i386/i386.md (*indirect_jump): Don't pass false
21282 to ix86_output_indirect_jmp.
21283 (*tablejump_1): Likewise.
21284 (simple_return_pop_internal): Change it to define_insn_and_split.
21285 Call ix86_split_simple_return_pop_internal to split it for
21286 -mfunction-return=.
21287 (simple_return_indirect_internal): Call
21288 ix86_output_indirect_function_return instead of
21289 ix86_output_indirect_jmp.
21291 2018-02-26 Jakub Jelinek <jakub@redhat.com>
21294 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
21295 memset and value initialization afterwards.
21297 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
21299 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
21301 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21304 * common/config/aarch64/aarch64-common.c
21305 (aarch_option_optimization_table[]): Switch
21306 off fomit-frame-pointer
21308 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
21309 Chung-Ju Wu <jasonwucj@gmail.com>
21311 * config/nds32/nds32-multiple.md (load_multiple): Disallow
21313 (store_multiple): Ditto.
21315 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
21317 * config.gcc: Add --with-cpu support for nds32 target.
21318 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
21319 * config/nds32/nds32.opt: Add -mcpu= option.
21321 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
21323 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
21324 isel=yes): Warn for these deprecated options.
21326 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
21328 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
21329 ISA_2_5_MASKS_EMBEDDED.
21331 2018-02-23 Jakub Jelinek <jakub@redhat.com>
21333 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
21334 p->max as pointers rather than using iterative_hash_expr.
21336 2018-02-23 Carl Love <cel@us.ibm.com>
21338 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
21339 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
21341 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
21342 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
21343 P8V_BUILTIN_VEC_VUNSIGNED2.
21345 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
21348 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
21349 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
21351 * lra-constraints.c (curr_insn_transform): Set up
21352 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
21354 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
21355 * lra-eliminations.c (spill_pseudos): Ditto.
21356 (process_insn_for_elimination): Ditto.
21357 * lra-lives.c (reg_early_clobber_p): Use the new macros.
21358 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
21359 LRA_NON_CLOBBERED_ALT.
21361 2018-02-22 Martin Sebor <msebor@redhat.com>
21363 PR tree-optimization/84480
21364 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
21365 to maybe_diag_stxncpy_trunc. Call it.
21366 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
21367 from gimple_fold_builtin_strcpy. Print inlining stack.
21368 (handle_builtin_stxncpy): Print inlining stack.
21369 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
21371 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
21374 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
21375 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
21376 and -fcheck-pointer-bounds are used together.
21377 (indirect_thunk_prefix): New enum.
21378 (indirect_thunk_need_prefix): New function.
21379 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
21380 "_nt" instead of "_bnd" for NOTRACK prefix.
21381 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
21382 (output_indirect_thunk_function): Likewise.
21384 (ix86_code_end): Update output_indirect_thunk_function calls.
21385 (ix86_output_indirect_branch_via_reg): Replace
21386 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
21387 (ix86_output_indirect_branch_via_push): Likewise.
21388 (ix86_output_function_return): Likewise.
21389 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
21390 incompatible with -fcf-protection=branch and
21391 -fcheck-pointer-bounds.
21393 2018-02-22 Steve Ellcey <sellcey@cavium.com>
21396 * config/aarch64/aarch64.c (aarch64_print_address_internal):
21397 Change gcc_assert call to output_operand_lossage.
21399 2018-02-22 Steve Ellcey <sellcey@cavium.com>
21401 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
21403 2018-02-22 DJ Delorie <dj@redhat.com>
21404 Sebastian Perta <sebastian.perta@renesas.com>
21405 Oleg Endo <olegendo@gcc.gnu.org>
21407 * config/rx/rx.c (rx_rtx_costs): New function.
21408 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
21410 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
21412 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
21414 2018-02-22 Martin Liska <mliska@suse.cz>
21417 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
21418 Add "native" as a possible value.
21420 2018-02-22 Martin Liska <mliska@suse.cz>
21423 * config/i386/i386.c (ix86_option_override_internal):
21424 Add "native" as a possible value for -march and -mtune.
21426 2018-02-22 Jakub Jelinek <jakub@redhat.com>
21429 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
21430 to all type variants.
21432 PR tree-optimization/84503
21433 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
21434 width as info->bitpos + info->bitsize - start.
21435 (merged_store_group::merge_overlapping): Simplify width computation.
21436 (check_no_overlap): New function.
21437 (imm_store_chain_info::try_coalesce_bswap): Compute expected
21438 start + width and last_order of the group, fail if check_no_overlap
21440 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
21441 to group if check_no_overlap fails.
21443 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
21445 * config/rs6000/altivec.md: Delete contraint arguments to
21446 define_expand, define_split, and define_peephole2, and in
21447 define_insn_and_split if always unused.
21448 * config/rs6000/darwin.md: Ditto.
21449 * config/rs6000/dfp.md: Ditto.
21450 * config/rs6000/rs6000.md: Ditto.
21451 * config/rs6000/sync.md: Ditto.
21452 * config/rs6000/vector.md: Ditto.
21453 * config/rs6000/vsx.md: Ditto.
21455 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
21457 * config/rs6000/altivec.md: Write output control strings as braced
21458 blocks instead of double-quoted strings.
21459 * config/rs6000/darwin.md: Ditto.
21460 * config/rs6000/rs6000.md: Ditto.
21461 * config/rs6000/vector.md: Ditto.
21462 * config/rs6000/vsx.md: Ditto.
21464 2018-02-21 Jason Merrill <jason@redhat.com>
21466 PR c++/84314 - ICE with templates and fastcall attribute.
21467 * attribs.c (build_type_attribute_qual_variant): Remove assert.
21469 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
21471 * ipa-cp.c (determine_versionability): Fix comment typos.
21473 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
21476 * ipa-cp.c (determine_versionability): Do not version functions caling
21479 2018-02-21 Martin Liska <mliska@suse.cz>
21482 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
21483 Add "native" as a possible value.
21484 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
21485 the macro when native cpu detection is available.
21487 2018-02-21 Martin Liska <mliska@suse.cz>
21490 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
21491 Add "native" as a possible value.
21492 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
21493 when native cpu detection is available.
21495 2018-02-21 Jakub Jelinek <jakub@redhat.com>
21496 Martin Sebor <msebor@redhat.com>
21498 PR tree-optimization/84478
21499 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
21501 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
21502 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
21503 support which is conservatively correct, for 2 only stay conservative
21504 for maxlen. Formatting and comment capitalization fixes. Add STRICT
21505 argument to the 2 argument get_range_strlen, adjust 6 arg
21506 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
21508 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
21509 (gimple_fold_builtin_strlen): Pass true as last argument to
21512 2018-02-20 Martin Sebor <msebor@redhat.com>
21514 PR middle-end/84095
21515 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
21516 (builtin_memref::set_base_and_offset): Same. Handle inner references.
21517 (builtin_memref::builtin_memref): Factor out parts into
21518 set_base_and_offset and call it.
21520 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
21522 PR middle-end/84406
21523 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
21524 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
21525 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
21526 search at the associated MODE_INT.
21528 2018-02-20 Jeff Law <law@redhat.com>
21530 PR middle-end/82123
21531 PR tree-optimization/81592
21532 PR middle-end/79257
21533 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
21534 for range data rather than using global data.
21535 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
21536 range data rather than using global data.
21537 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
21538 pass it to children as needed.
21539 (struct directive::fmtresult): Similarly.
21540 (struct directive::set_width): Similarly.
21541 (struct directive::set_precision): Similarly.
21542 (format_integer, format_directive, parse_directive): Similarly.
21543 (format_none): Accept unnamed vr_values parameter.
21544 (format_percent, format_floating, format_character): Similarly.
21545 (format_string, format_plain): Similarly.
21546 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
21547 the EVRP range analyzer for range data rather than using global data.
21548 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
21549 gimple-ssa-evrp-analyze.h
21550 (class sprintf_dom_walker): Add after_dom_children member function.
21551 Add evrp_range_analyzer member.
21552 (sprintf_dom_walker::before_dom_children): Call into the EVRP
21553 range analyzer as needed.
21554 (sprintf_dom_walker::after_dom_children): New member function.
21555 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
21557 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
21558 (evrp_range_analyzer::pop_to_marker): Likewise.
21560 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
21562 PR tree-optimization/84419
21563 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
21564 with the required type if its current type is compatible but
21567 2018-02-20 Jakub Jelinek <jakub@redhat.com>
21569 PR middle-end/82004
21570 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
21571 after vectorization.
21573 2018-02-20 Martin Liska <mliska@suse.cz>
21576 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
21577 possible values if we don't have a hint.
21579 2018-02-20 Martin Liska <mliska@suse.cz>
21583 * final.c (shorten_branches): Build align_tab array with one
21585 * opts.c (finish_options): Add alignment option limit check.
21586 (MAX_CODE_ALIGN): Likewise.
21587 (MAX_CODE_ALIGN_VALUE): Likewise.
21588 * doc/invoke.texi: Document maximum allowed option value for
21589 all -falign-* options.
21591 2018-02-19 Jakub Jelinek <jakub@redhat.com>
21594 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
21595 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
21596 * var-tracking.c (emit_note_insn_var_location): Remove all references
21597 to NOTE_INSN_CALL_ARG_LOCATION.
21598 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
21599 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
21600 Use copy_rtx_if_shared.
21601 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
21602 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
21603 (dwarf2out_var_location): Remove handling of
21604 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
21606 * final.c (final_scan_insn): Remove all references to
21607 NOTE_INSN_CALL_ARG_LOCATION.
21608 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
21609 before dumping final insns.
21610 * except.c (emit_note_eh_region_end): Remove all references to
21611 NOTE_INSN_CALL_ARG_LOCATION.
21612 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
21613 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
21614 * config/arc/arc.c (hwloop_optimize): Likewise.
21615 * config/arm/arm.c (create_fix_barrier): Likewise.
21616 * config/s390/s390.c (s390_chunkify_start): Likewise.
21617 * config/sh/sh.c (find_barrier): Likewise.
21618 * config/i386/i386.c (rest_of_insert_endbranch,
21619 ix86_seh_fixup_eh_fallthru): Likewise.
21620 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
21621 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
21622 * config/frv/frv.c (frv_function_prologue): Likewise.
21623 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
21625 (note_outside_basic_block_p): Remove all references to
21626 NOTE_INSN_CALL_ARG_LOCATION.
21627 * gengtype.c (adjust_field_rtx_def): Likewise.
21628 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
21630 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
21631 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
21634 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
21637 PR tree-optimization/84452
21638 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
21639 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
21642 2018-02-19 Martin Liska <mliska@suse.cz>
21645 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
21647 2018-02-19 Martin Liska <mliska@suse.cz>
21648 Richard Sandiford <richard.sandiford@linaro.org>
21650 PR tree-optimization/82491
21651 * gimple-fold.c (get_base_constructor): Make earlier bail out
21654 2018-02-19 Carl Love <cel@us.ibm.com>
21656 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
21657 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
21659 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
21660 P8V_BUILTIN_VEC_NEG.
21662 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
21664 * config/rl78/rl78.md (movdf): New define expand.
21666 2018-02-19 Martin Liska <mliska@suse.cz>
21669 * doc/invoke.texi: Fix typo.
21670 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
21672 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
21674 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
21675 handle rs6000_single_float and rs6000_double_float specially for
21678 2018-02-16 Jeff Law <law@redhat.com>
21680 * config/rx/rx.c (add_pop_cfi_notes): New function.;
21681 (pop_regs): Use it.
21683 2018-02-16 Jakub Jelinek <jakub@redhat.com>
21686 * ipa-inline.c (inline_small_functions): Fix a typo.
21688 2018-02-16 Nathan Sidwell <nathan@acm.org>
21690 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
21692 2018-02-16 Carl Love <cel@us.ibm.com>
21694 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
21695 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
21696 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
21697 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
21698 expansion to P8V_BUILTIN_VEC_FLOAT2.
21700 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
21702 PR rtl-optimization/70023
21703 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
21704 src_regno into account.
21706 2018-02-16 Carl Love <cel@us.ibm.com>
21708 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
21709 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
21710 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
21711 * config/rs6000/rs6000.c: Remove case statements for
21712 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
21713 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
21714 and P9V_BUILTIN_VEC_VINSERT4B.
21715 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
21716 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
21717 * config/rs6000/vsx.md:
21718 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
21721 2018-02-16 Carl Love <cel@us.ibm.com>
21723 * config/rs6000/altivec.h: Add builtin names vec_extract4b
21725 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
21727 * config/rs6000/rs6000-c.c: Add the definitions for
21728 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21729 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21730 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21731 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
21732 definition for insert4b and define insn *insert3b_internal.
21733 * doc/extend.texi: Add documentation for vec_extract4b.
21735 2018-02-16 Nathan Sidwell <nathan@acm.org>
21737 * doc/extend.texi (Backwards Compatibility): Mention friend
21738 injection. Note for-scope is deprecated.
21739 * doc/invoke.texi (-ffriend-injection): Deprecate.
21741 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
21743 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21744 that moved to I2, also allow destinations that are a paradoxical
21745 subreg (instead of a normal reg).
21747 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
21750 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21753 2018-02-16 Richard Biener <rguenther@suse.de>
21755 PR tree-optimization/84037
21756 PR tree-optimization/84016
21758 * config/i386/i386.c (ix86_builtin_vectorization_cost):
21759 Adjust vec_construct for the fact we need additional higher latency
21760 128bit inserts for AVX256 and AVX512 vector builds.
21761 (ix86_add_stmt_cost): Scale vector construction cost for
21764 2018-02-16 Richard Biener <rguenther@suse.de>
21766 PR tree-optimization/84417
21767 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21768 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21769 (non_rewritable_lvalue_p): Likewise, use poly-ints.
21771 2018-02-16 Martin Liska <mliska@suse.cz>
21774 * internal-fn.def (ASAN_CHECK): Set proper flags.
21775 (ASAN_MARK): Likewise.
21777 2018-02-16 Julia Koval <julia.koval@intel.com>
21779 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21780 from PTA_CANNONLAKE.
21782 2018-02-16 Jakub Jelinek <jakub@redhat.com>
21785 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21786 Use ++iter rather than iter++ for std::list iterators.
21787 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
21788 defer deleting them until all nodes in the forest are processed. Do
21789 free even leaf nodes. Change to_process into auto_vec.
21792 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21793 * vec.h (vec_default_construct): Use memset instead of placement new
21794 if BROKEN_VALUE_INITIALIZATION is defined.
21795 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21796 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21799 PR rtl-optimization/83723
21800 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21801 * lra.c (lra_substitute_pseudo): Likewise. If true, use
21802 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
21804 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21806 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21808 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
21810 PR rtl-optimization/81443
21811 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21812 from inner REGs to paradoxical SUBREGs.
21814 2018-02-16 Richard Biener <rguenther@suse.de>
21816 PR tree-optimization/84399
21817 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21818 For operands we can analyze at their definition make sure we can
21819 analyze them at each use as well.
21821 2018-02-16 Richard Biener <rguenther@suse.de>
21823 PR tree-optimization/84190
21824 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21825 volatile accesses if the decl isn't volatile.
21827 2018-02-15 Jason Merrill <jason@redhat.com>
21829 PR c++/84314 - ICE with templates and fastcall attribute.
21830 * attribs.c (build_type_attribute_qual_variant): Don't clobber
21831 TYPE_CANONICAL on an existing type.
21833 2018-02-15 Jakub Jelinek <jakub@redhat.com>
21835 PR tree-optimization/84383
21836 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21837 dstoff nor call operand_equal_p if dstbase is NULL.
21839 PR tree-optimization/84334
21840 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21841 also a CONSTANT_CLASS_P, punt.
21843 2018-02-14 Jim Wilson <jimw@sifive.com>
21845 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21846 first SMALL_OPERAND check. New local min_second_step. Move assert
21847 to where locals are set. Add TARGET_RVC support.
21848 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21850 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
21852 * doc/invoke.texi: Correct -Wformat-overflow code sample.
21854 2018-02-14 Martin Sebor <msebor@redhat.com>
21856 PR tree-optimization/83698
21857 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21858 arrays constrain the offset range to their bounds.
21859 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21860 (builtin_access::overlap): Avoid setting the size of overlap if it's
21862 (maybe_diag_overlap): Also consider arrays when deciding what values
21863 of offsets to include in diagnostics.
21865 2018-02-14 Martin Sebor <msebor@redhat.com>
21868 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21869 that correspond to the kind of a declaration.
21871 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
21874 * config/pa/pa.md: Load address of PIC label using the linkage table
21875 if the label is nonlocal.
21877 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
21879 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21880 warning message if user requests -maltivec=be.
21881 * doc/invoke.texi: Document deprecation of -maltivec=be.
21883 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
21886 * config/rs6000/rs6000-c.c: Update definitions for
21887 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21888 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21890 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21893 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21894 add _get_ssp intrinsics. Remove argument from
21895 __builtin_ia32_rdssp[d|q].
21896 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21897 * config/i386/i386-builtin.def: Remove argument from
21898 __builtin_ia32_rdssp[d|q].
21899 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21900 ix86_expand_special_args_builtin for _rdssp[d|q].
21901 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21902 Clear register before usage.
21903 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21904 Add documentation for new _get_ssp and _inc_ssp intrinsics.
21906 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
21908 PR tree-optimization/84357
21909 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21910 operand 1 of an ARRAY_REF too.
21912 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
21915 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21916 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21918 (set_of_reg): New struct.
21919 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21920 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21921 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21923 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21924 Split into bitclr, bitset, bitinvert patterns if appropriate.
21925 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21926 use rx_fuse_in_memory_bitop.
21927 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21928 to named insn, correct maximum insn length.
21930 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
21933 * machmode.def: Define a complex mode for PARTIAL_INT.
21934 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21936 * doc/rtl.texi: Document CSPImode.
21937 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21939 (msp430_hard_regno_nregs_with_padding): Likewise.
21941 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
21944 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21946 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
21948 PR rtl-optimization/84169
21949 * combine.c (try_combine): New variable split_i2i3. Set it to true if
21950 we generated a parallel as new i3 and we split that to new i2 and i3
21951 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
21952 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
21953 those to i2, not i1. Partially rewrite this scan code.
21955 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21958 * stor-layout.c (place_field): For variable length fields, adjust
21959 offset_align afterwards not just based on the field's alignment,
21960 but also on the size.
21962 PR middle-end/84309
21963 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21964 of exps and logs in the use_exp2 case.
21966 2018-02-13 Jeff Law <law@redhat.com>
21968 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21969 entry for "vector".
21971 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21974 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
21978 * common.opt (gas-loc-support, gas-locview-support): New.
21979 (ginline-points, ginternal-reset-location-views): New.
21980 * doc/invoke.texi: Document them. Use @itemx where intended.
21981 (gvariable-location-views): Adjust.
21982 * target.def (reset_location_view): New.
21983 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21984 (TARGET_RESET_LOCATION_VIEW): New.
21985 * doc/tm.texi: Rebuilt.
21986 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21987 (dwarf2out_default_as_locview_support): New.
21988 (output_asm_line_debug_info): Use option variables.
21989 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21990 (output_loc_list): Likewise.
21991 (add_high_low_attributes): Check option variables.
21992 Don't output entry view attribute in strict mode.
21993 (gen_inlined_subroutine_die): Check option variables.
21994 (dwarf2out_inline_entry): Likewise.
21995 (init_sections_and_labels): Likewise.
21996 (dwarf2out_early_finish): Likewise.
21997 (maybe_reset_location_view): New, from...
21998 (dwarf2out_var_location): ... here. Call it.
21999 * debug.h (dwarf2out_default_as_loc_support): Declare.
22000 (dwarf2out_default_as_locview_support): Declare.
22001 * hooks.c (hook_int_rtx_insn_0): New.
22002 * hooks.h (hook_int_rtx_insn_0): Declare.
22003 * toplev.c (process_options): Take -gas-loc-support and
22004 -gas-locview-support from dwarf2out. Enable
22005 -gvariable-location-views by default only with locview
22006 assembler support. Enable -ginternal-reset-location-views by
22007 default only if the target defines the corresponding hook.
22008 Enable -ginline-points by default if location views are
22009 enabled; force it disabled if statement frontiers are
22011 * tree-inline.c (expand_call_inline): Check option variables.
22012 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22014 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
22016 PR tree-optimization/84321
22017 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22018 handling. Also check whether the anti-range contains any values
22019 that satisfy the mask; switch to a VR_RANGE if not.
22021 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
22024 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22026 2018-02-13 Martin Jambor <mjambor@suse.cz>
22029 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22030 of call statements, also set location of a load to a temporary.
22032 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
22034 * config/rl78/rl78.c (add_vector_labels): New function.
22035 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22036 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22037 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22038 which checks that no arguments are passed.
22039 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22040 * doc/extend.texi: Documentation for the new attribute.
22042 2018-02-13 Andreas Schwab <schwab@suse.de>
22044 * config/riscv/linux.h (CPP_SPEC): Define.
22046 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22049 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22050 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22051 OPTION_MASK_ISA_AES as first argument to def_builtin_const
22052 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22053 instead of OPTION_MASK_ISA_PCLMUL as first argument to
22054 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22055 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22056 temporarily for AES and PCLMUL builtins.
22058 PR tree-optimization/84339
22059 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22060 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22063 PR middle-end/84309
22064 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22065 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22066 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22068 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22070 * omp-simd-clone.h: New file.
22071 * omp-simd-clone.c: Include omp-simd-clone.h.
22072 (expand_simd_clones): No longer static.
22073 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22074 cgraph.h and omp-simd-clone.h.
22075 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22076 (vect_recog_widen_shift_pattern): Formatting fix.
22077 (vect_pattern_recog_1): Don't check optab for calls.
22080 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22081 operands[2] into a REG before using gen_lowpart on it.
22083 2018-02-12 Jeff Law <law@redhat.com>
22086 * config/sh/sh.c (find_barrier): Consider a sibling call
22089 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22090 successfully back substituting a reg.
22092 2018-02-12 Richard Biener <rguenther@suse.de>
22094 PR tree-optimization/84037
22095 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22096 parameter, move visited init to caller.
22097 (vect_slp_analyze_operations): Separate cost from validity
22098 check, initialize visited once for all instances.
22099 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22101 * tree-vect-stmts.c (vect_model_simple_cost): Make early
22103 (vect_model_promotion_demotion_cost): Likewise.
22104 (vectorizable_bswap): Guard cost modeling with !slp_node
22105 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22107 (vectorizable_call): Likewise.
22108 (vectorizable_conversion): Likewise.
22109 (vectorizable_assignment): Likewise.
22110 (vectorizable_shift): Likewise.
22111 (vectorizable_operation): Likewise.
22112 (vectorizable_store): Likewise.
22113 (vectorizable_load): Likewise.
22114 (vectorizable_condition): Likewise.
22115 (vectorizable_comparison): Likewise.
22117 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
22120 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22121 (ASAN_MARK): Fix fnspec to account for return value, change pointer
22122 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22124 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
22126 PR middle-end/83665
22127 * params.def (inline-min-speedup): Increase from 8 to 15.
22128 (max-inline-insns-auto): Decrease from 40 to 30.
22129 * ipa-split.c (consider_split): Add some buffer for function to
22130 be considered inlining candidate.
22131 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22134 2018-02-12 Richard Biener <rguenther@suse.de>
22136 PR tree-optimization/84037
22137 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22138 matched stmts if we cannot swap the non-matched ones.
22140 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22142 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22143 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22144 _mm_maskz_scalef_round_ss): New intrinsics.
22145 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22146 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22147 __builtin_ia32_scalefss_round): Remove.
22148 (__builtin_ia32_scalefsd_mask_round,
22149 __builtin_ia32_scalefss_mask_round): New intrinsics.
22150 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22151 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22152 ((match_operand:VF_128 2 "<round_nimm_predicate>"
22153 "<round_constraint>")): Changed to ...
22154 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22155 "<round_scalar_constraint>")): ... this.
22156 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22157 %0, %1, %2<round_op3>}"): Changed to ...
22158 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22159 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22160 %2<round_scalar_mask_op3>}"): ... this.
22161 * config/i386/subst.md (round_scalar_nimm_predicate): New.
22163 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22165 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22166 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22167 (_mm_maskz_sqrt_round_ss): New intrinsics.
22168 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22169 (__builtin_ia32_sqrtsd_mask_round)
22170 (__builtin_ia32_sqrtss_mask_round): New builtins.
22171 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22172 (__builtin_ia32_sqrtss_round): Remove.
22173 (__builtin_ia32_sqrtsd_mask_round)
22174 (__builtin_ia32_sqrtss_mask_round): New builtins.
22175 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22176 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22177 ((match_operand:VF_128 1 "vector_operand"
22178 "xBm,<round_constraint>")): Changed to ...
22179 ((match_operand:VF_128 1 "vector_operand"
22180 "xBm,<round_scalar_constraint>")): ... this.
22181 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22182 %0, %2, %<iptr>1<round_op3>}): Changed to ...
22183 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22184 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22185 %<iptr>1<round_scalar_mask_op3>}): ... this.
22186 ((set_attr "prefix" "<round_prefix>")): Changed to ...
22187 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22189 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
22192 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22193 Cast vec_cmpeq result to correct type.
22194 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22195 Cast vec_cmpgt result to correct type.
22197 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
22199 * final.c (final_scan_insn_1): Renamed from...
22200 (final_scan_insn): ... this. New wrapper, to recover
22201 seen from the outermost call in recursive ones.
22202 * config/sparc/sparc.c (output_return): Drop seen from call.
22203 (output_sibcall): Likewise.
22204 * config/visium/visium.c (output_branch): Likewise.
22206 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
22208 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22211 2018-02-10 Alan Modra <amodra@gmail.com>
22214 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22215 Specify LR as an input.
22217 2018-02-10 Jakub Jelinek <jakub@redhat.com>
22220 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22221 remove_member_access_dummy_vars): New functions.
22222 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22223 lower_omp_1, execute_lower_omp): Use them.
22225 PR rtl-optimization/84308
22226 * shrink-wrap.c (spread_components): Release todo vector.
22228 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
22230 PR rtl-optimization/57193
22231 * ira-color.c (struct allocno_color_data): Add member
22232 conflict_allocno_hard_prefs.
22233 (update_conflict_allocno_hard_prefs): New.
22234 (bucket_allocno_compare_func): Add a preference based on
22235 conflict_allocno_hard_prefs.
22236 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22237 (color_allocnos): Remove a dead code. Initiate
22238 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
22240 2018-02-09 Jakub Jelinek <jakub@redhat.com>
22243 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22244 constraint from =wa to wa. Avoid a subreg on the output operand,
22245 instead use a pseudo and subreg it in a move.
22246 (p9_xxbrd_<mode>): Changed to ...
22247 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22248 (p9_xxbrd_v2df): New expander.
22249 (p9_xxbrw_<mode>): Changed to ...
22250 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22251 (p9_xxbrw_v4sf): New expander.
22253 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22255 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22257 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
22260 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22261 multiply in 32-bit mode.
22262 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22263 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22266 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22268 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22269 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22270 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22271 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22273 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
22276 * dwarf2out.c (is_trivial_indirect_ref): New function.
22277 (dwarf2out_late_global_decl): Do not generate a location
22278 attribute for variables that have a non-trivial DECL_VALUE_EXPR
22279 and that are not defined in the current unit.
22281 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
22283 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22284 instead of a libcall for UNORDERED.
22286 2018-02-09 Tamar Christina <tamar.christina@arm.com>
22289 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
22290 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
22292 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22295 * config/s390/s390.c (s390_set_current_function): Invoke
22296 s390_indirect_branch_settings also if fndecl didn't change.
22298 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
22300 * config/rs6000/rs6000.md (blockage): Set length to zero.
22302 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
22304 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
22306 2018-02-09 Jakub Jelinek <jakub@redhat.com>
22309 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
22310 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
22314 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
22315 PARALLEL incoming that failed vt_get_decl_and_offset check.
22317 PR middle-end/84237
22318 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
22319 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
22321 (get_variable_section): For decls in named .bss* sections pass true as
22322 second argument to bss_initializer_p.
22324 2018-02-09 Marek Polacek <polacek@redhat.com>
22325 Jakub Jelinek <jakub@redhat.com>
22328 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
22329 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
22330 Sync some changes from cxx_fold_indirect_ref.
22332 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
22334 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
22336 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
22337 (BLOCK_INLINE_ENTRY_LABEL): New.
22338 (dwarf2out_var_location): Disregard inline entry markers.
22339 (inline_entry_data): New struct.
22340 (inline_entry_data_hasher): New hashtable type.
22341 (inline_entry_data_hasher::hash): New.
22342 (inline_entry_data_hasher::equal): New.
22343 (inline_entry_data_table): New variable.
22344 (add_high_low_attributes): Add DW_AT_entry_pc and
22345 DW_AT_GNU_entry_view attributes if a pending entry is found
22346 in inline_entry_data_table. Add old entry_pc attribute only
22347 if debug nonbinding markers are disabled.
22348 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
22349 markers are enabled.
22350 (block_within_block_p, dwarf2out_inline_entry): New.
22351 (dwarf2out_finish): Check that no entries remained in
22352 inline_entry_data_table.
22353 * final.c (reemit_insn_block_notes): Handle inline entry notes.
22354 (final_scan_insn, notice_source_line): Likewise.
22355 (rest_of_clean_state): Skip inline entry markers.
22356 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
22358 * gimple.c (gimple_build_debug_inline_entry): New.
22359 * gimple.h (enum gimple_debug_subcode): Add
22360 GIMPLE_DEBUG_INLINE_ENTRY.
22361 (gimple_build_debug_inline_entry): Declare.
22362 (gimple_debug_inline_entry_p): New.
22363 (gimple_debug_nonbind_marker_p): Adjust.
22364 * insn-notes.def (INLINE_ENTRY): New.
22365 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
22366 inline entry marker notes.
22367 (print_insn): Likewise.
22368 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
22369 (INSN_DEBUG_MARKER_KIND): Likewise.
22370 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
22371 * tree-inline.c (expand_call_inline): Build and insert
22372 debug_inline_entry stmt.
22373 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
22374 inline entry blocks early, if nonbind markers are enabled.
22375 (dump_scope_block): Dump fragment info.
22376 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
22377 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
22378 (gimple_build_debug_inline_entry): New.
22379 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
22380 Enable/disable inline entry points too.
22381 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
22382 (DEBUG_INSN): Describe inline entry markers.
22384 * common.opt (gvariable-location-views): New.
22385 (gvariable-location-views=incompat5): New.
22386 * config.in: Rebuilt.
22387 * configure: Rebuilt.
22388 * configure.ac: Test assembler for view support.
22389 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
22390 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
22391 * dwarf2out.c (var_loc_view): New typedef.
22392 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
22393 (dwarf2out_locviews_in_attribute): New.
22394 (dwarf2out_locviews_in_loclist): New.
22395 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
22396 (enum dw_line_info_opcode): Add LI_adv_address.
22397 (struct dw_line_info_table): Add view.
22398 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
22399 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
22400 (zero_view_p): New variable.
22401 (ZERO_VIEW_P): New macro.
22402 (output_asm_line_debug_info): New.
22403 (struct var_loc_node): Add view.
22404 (add_AT_view_list, AT_loc_list): New.
22405 (add_var_loc_to_decl): Add view param. Test it against last.
22406 (new_loc_list): Add view params. Record them.
22407 (AT_loc_list_ptr): Handle loc and view lists.
22408 (view_list_to_loc_list_val_node): New.
22409 (print_dw_val): Handle dw_val_class_view_list.
22410 (size_of_die): Likewise.
22411 (value_format): Likewise.
22412 (loc_list_has_views): New.
22413 (gen_llsym): Set vl_symbol too.
22414 (maybe_gen_llsym, skip_loc_list_entry): New.
22415 (dwarf2out_maybe_output_loclist_view_pair): New.
22416 (output_loc_list): Output view list or entries too.
22417 (output_view_list_offset): New.
22418 (output_die): Handle dw_val_class_view_list.
22419 (output_dwarf_version): New.
22420 (output_compilation_unit_header): Use it.
22421 (output_skeleton_debug_sections): Likewise.
22422 (output_rnglists, output_line_info): Likewise.
22423 (output_pubnames, output_aranges): Update version comments.
22424 (output_one_line_info_table): Output view numbers in asm comments.
22425 (dw_loc_list): Determine current endview, pass it to new_loc_list.
22426 Call maybe_gen_llsym.
22427 (loc_list_from_tree_1): Adjust.
22428 (add_AT_location_description): Create view list attribute if
22429 needed, check it's absent otherwise.
22430 (convert_cfa_to_fb_loc_list): Adjust.
22431 (maybe_emit_file): Call output_asm_line_debug_info for test.
22432 (dwarf2out_var_location): Reset views as needed. Precompute
22433 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
22434 attribute. Set view.
22435 (new_line_info_table): Reset next view.
22436 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
22437 (dwarf2out_source_line): Likewise. Output view resets and labels to
22438 the assembler, or select appropriate line info opcodes.
22439 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
22440 (optimize_string_length): Catch it. Adjust.
22441 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
22442 dw_val_class_view_list, and remove it if no longer needed.
22443 (hash_loc_list): Hash view numbers.
22444 (loc_list_hasher::equal): Compare them.
22445 (optimize_location_lists): Check whether a view list symbol is
22446 needed, and whether the locview attribute is present, and
22447 whether they match. Remove the locview attribute if no longer
22449 (index_location_lists): Call skip_loc_list_entry for test.
22450 (dwarf2out_finish): Call output_asm_line_debug_info for test.
22451 Use output_dwarf_version.
22452 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
22453 (struct dw_val_node): Add val_view_list.
22454 * final.c (SEEN_NEXT_VIEW): New.
22455 (set_next_view_needed): New.
22456 (clear_next_view_needed): New.
22457 (maybe_output_next_view): New.
22458 (final_start_function): Rename to...
22459 (final_start_function_1): ... this. Take pointer to FIRST,
22460 add SEEN parameter. Emit param bindings in the initial view.
22461 (final_start_function): Reintroduce SEEN-less interface.
22462 (final): Rename to...
22463 (final_1): ... this. Take SEEN parameter. Output final pending
22464 next view at the end.
22465 (final): Reintroduce seen-less interface.
22466 (final_scan_insn): Output pending next view before switching
22467 sections or ending a block. Mark the next view as needed when
22468 outputting variable locations. Notify debug backend of section
22469 changes, and of location view changes.
22470 (rest_of_handle_final): Adjust.
22471 * toplev.c (process_options): Autodetect value for debug variable
22472 location views option. Warn on incompat5 without -gdwarf-5.
22473 * doc/invoke.texi (gvariable-location-views): New.
22474 (gvariable-location-views=incompat5): New.
22475 (gno-variable-location-views): New.
22477 2018-02-08 David Malcolm <dmalcolm@redhat.com>
22479 PR tree-optimization/84136
22480 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
22481 that the result of find_edge is non-NULL.
22483 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
22486 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
22487 storing integer register in SImode. Fix cost of 256 and 512
22488 byte aligned SSE register store.
22490 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
22492 * config/i386/i386.c (ix86_multiplication_cost): Fix
22493 multiplication cost for TARGET_AVX512DQ.
22495 2018-02-08 Marek Polacek <polacek@redhat.com>
22497 PR tree-optimization/84238
22498 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
22501 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
22503 PR tree-optimization/84265
22504 * tree-vect-stmts.c (vectorizable_store): Don't treat
22505 VMAT_CONTIGUOUS accesses as grouped.
22506 (vectorizable_load): Likewise.
22508 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
22510 PR tree-optimization/81635
22511 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
22512 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
22513 (test_round_for_mask): New functions.
22514 (wide_int_cc_tests): Call test_round_for_mask.
22515 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
22516 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
22517 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
22518 range returned by get_range_info.
22520 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
22523 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
22524 * symtab.c: Include builtins.h
22525 (symtab_node::output_to_lto_symbol_table_p): Move here
22526 from lto-streamer-out.c:output_symbol_p.
22527 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
22528 (output_symbol_p): Move all logic to symtab.c
22529 (produce_symtab): Update.
22531 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22533 * config/s390/s390-opts.h (enum indirect_branch): Define.
22534 * config/s390/s390-protos.h (s390_return_addr_from_memory)
22535 (s390_indirect_branch_via_thunk)
22536 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
22537 (enum s390_indirect_branch_type): Define.
22538 * config/s390/s390.c (struct s390_frame_layout, struct
22539 machine_function): Remove.
22540 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
22541 (indirect_branch_table_label_no, indirect_branch_table_name):
22543 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
22544 (enum s390_indirect_branch_option): Define.
22545 (s390_return_addr_from_memory): New function.
22546 (s390_handle_string_attribute): New function.
22547 (s390_attribute_table): Add new attribute handler.
22548 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
22549 (s390_indirect_branch_via_thunk): New function.
22550 (s390_indirect_branch_via_inline_thunk): New function.
22551 (s390_function_ok_for_sibcall): When jumping via thunk disallow
22552 sibling call optimization for non z10 compiles.
22553 (s390_emit_call): Force indirect branch target to be a single
22554 register. Add r1 clobber for non-z10 compiles.
22555 (s390_emit_epilogue): Emit return jump via return_use expander.
22556 (s390_reorg): Handle JUMP_INSNs as execute targets.
22557 (s390_option_override_internal): Perform validity checks for the
22558 new command line options.
22559 (s390_indirect_branch_attrvalue): New function.
22560 (s390_indirect_branch_settings): New function.
22561 (s390_set_current_function): Invoke s390_indirect_branch_settings.
22562 (s390_output_indirect_thunk_function): New function.
22563 (s390_code_end): Implement target hook.
22564 (s390_case_values_threshold): Implement target hook.
22565 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
22567 * config/s390/s390.h (struct s390_frame_layout)
22568 (struct machine_function): Move here from s390.c.
22569 (TARGET_INDIRECT_BRANCH_NOBP_RET)
22570 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
22571 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
22572 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
22573 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
22574 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
22575 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
22576 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
22577 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
22578 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
22579 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
22580 (mnemonic attribute): Add values which aren't recognized
22582 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
22583 pattern for branch conversion. Fix mnemonic attribute.
22584 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
22585 indirect branch via thunk if requested.
22586 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
22587 ("*indirect_jump"): Disable for branch conversion using out of
22589 ("indirect_jump_via_thunk<mode>_z10")
22590 ("indirect_jump_via_thunk<mode>")
22591 ("indirect_jump_via_inlinethunk<mode>_z10")
22592 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
22593 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
22594 ("casesi_jump_via_inlinethunk<mode>_z10")
22595 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
22596 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
22597 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
22598 ("*indirect2_jump"): Disable for branch conversion.
22599 ("casesi_jump"): Turn into expander and expand patterns for branch
22601 ("return_use"): New expander.
22602 ("*return"): Emit return via thunk and rename it to ...
22603 ("*return<mode>"): ... this one.
22604 * config/s390/s390.opt: Add new options and and enum for the
22607 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
22609 * lra-constraints.c (match_reload): Unconditionally use
22610 gen_lowpart_SUBREG, rather than selecting between that
22611 and equivalent gen_rtx_SUBREG code.
22613 2018-02-08 Richard Biener <rguenther@suse.de>
22615 PR tree-optimization/84233
22616 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
22617 changed flag instead of boguously re-using phi_inserted.
22619 2018-02-08 Martin Jambor <mjambor@suse.cz>
22621 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
22622 static local variables.
22624 2018-02-08 Richard Biener <rguenther@suse.de>
22626 PR tree-optimization/84278
22627 * tree-vect-stmts.c (vectorizable_store): When looking for
22628 smaller vector types to perform grouped strided loads/stores
22629 make sure the mode is supported by the target.
22630 (vectorizable_load): Likewise.
22632 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
22634 * config/aarch64/aarch64.c (aarch64_components_for_bb):
22635 Increase LDP/STP opportunities by adding adjacent callee-saves.
22637 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
22639 PR rtl-optimization/84068
22640 PR rtl-optimization/83459
22641 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
22643 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
22645 PR tree-optimization/84224
22646 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
22647 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
22648 non-zero arguments.
22650 2018-02-07 Iain Sandoe <iain@codesourcery.com>
22653 * config/rs6000/altivec.md (*restore_world): Remove LR use.
22654 * config/rs6000/predicates.md (restore_world_operation): Adjust op
22655 count, remove one USE.
22657 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
22659 * doc/install.texi (Configuration): Document the
22660 --with-long-double-format={ibm,ieee} PowerPC configuration
22664 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
22665 Convert from define_expand to be define_insn_and_split. Rework
22666 float/double/_Float128 conversions to QI/HI/SImode to work with
22667 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
22668 conversions to QI/HImode types did a store and then a load to
22669 truncate the value. For conversions to VSX registers, don't split
22670 the insn, instead emit the code directly. Use the code iterator
22671 any_fix to combine signed and unsigned conversions.
22672 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
22673 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
22674 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22675 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
22676 (fix_<mode>di2_hw): Likewise.
22677 (fixuns_<mode>di2_hw): Likewise.
22678 (fix_<mode>si2_hw): Likewise.
22679 (fixuns_<mode>si2_hw): Likewise.
22680 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
22681 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22682 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
22683 fix<uns>_trunc<SFDF:mode>si2_p8.
22684 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
22685 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22686 (fix<uns>_<mode>_mem): Likewise.
22687 (fctiw<u>z_<mode>_mem): Likewise.
22688 (fix<uns>_<mode>_mem): Likewise.
22689 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
22690 the register allocator from doing a direct move to the GPRs to do
22691 a store, and instead use the ISA 3.0 store byte/half-word from
22692 vector register instruction. For IEEE 128-bit floating point,
22693 also optimize stores of 32-bit ints.
22694 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
22696 2018-02-07 Alan Hayward <alan.hayward@arm.com>
22698 * genextract.c (push_pathstr_operand): New function to support
22700 (walk_rtx): Call push_pathstr_operand.
22701 (print_path): Support [a-zA-Z].
22703 2018-02-07 Richard Biener <rguenther@suse.de>
22705 PR tree-optimization/84037
22706 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
22707 (cse_and_gimplify_to_preheader): Declare.
22708 (vect_get_place_in_interleaving_chain): Likewise.
22709 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22711 (_loop_vec_info::~_loop_vec_info): Delete it.
22712 (cse_and_gimplify_to_preheader): New function.
22713 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
22714 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
22715 (vectorizable_load): Likewise. For grouped stores always base
22716 the IV on the first element.
22717 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
22718 condition before gimplifying.
22720 2018-02-07 Jakub Jelinek <jakub@redhat.com>
22722 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
22723 *DIV_EXPR and *MOD_EXPR.
22725 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
22728 * config/i386/i386.c (ix86_option_override_internal): Mask out
22729 the CF_SET bit when checking -fcf-protection.
22731 2018-02-07 Tom de Vries <tom@codesourcery.com>
22734 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22737 2018-02-07 Richard Biener <rguenther@suse.de>
22739 PR tree-optimization/84204
22740 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22743 PR tree-optimization/84205
22744 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22745 special-case isl_ast_op_zdiv_r.
22747 PR tree-optimization/84223
22748 * graphite-scop-detection.c (gather_bbs::before_dom_children):
22749 Only add conditions from within the region.
22750 (gather_bbs::after_dom_children): Adjust.
22752 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
22755 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22756 * config/avr/avr.md: Only post-reload split REG-REG moves if
22757 either register is GENERAL_REG_P.
22759 2018-02-07 Jakub Jelinek <jakub@redhat.com>
22761 PR tree-optimization/84235
22762 * tree-ssa-scopedtables.c
22763 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22764 if the subtraction is performed in floating point type where NaNs are
22765 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22766 build 1. Formatting fix.
22768 2018-02-06 Jakub Jelinek <jakub@redhat.com>
22771 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22772 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22773 and skip it regardless of bb boundaries. Use CALL_P macro,
22774 don't test INSN_P (insn) together with CALL_P or JUMP_P check
22775 unnecessarily, formatting fix.
22777 2018-02-06 Michael Collison <michael.collison@arm.com>
22779 * config/arm/thumb2.md:
22780 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22781 (*thumb_mov_notscc): Ditto.
22783 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
22786 * config/rs6000/rs6000.md (su code attribute): Use "u" for
22787 unsigned_fix, not "s".
22789 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22791 * configure.ac (gcc_fn_eh_frame_ro): New function.
22792 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22793 correct .eh_frame permissions.
22794 * configure: Regenerate.
22796 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
22798 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22799 irrelevant options.
22801 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22803 * config/rs6000/rs6000.c (rs6000_option_override_internal):
22804 Display warning message for -mno-speculate-indirect-jumps.
22806 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
22808 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22810 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22812 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
22814 PR tree-optimization/84225
22815 * tree-eh.c (find_trapping_overflow): Only call
22816 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22818 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22821 * config/i386/i386.c: Reimplement the check of possible options
22822 -mibt/-mshstk conbination. Change error messages.
22823 * doc/invoke.texi: Fix a typo: remove extra '='.
22825 2018-02-06 Marek Polacek <polacek@redhat.com>
22827 PR tree-optimization/84228
22828 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22830 2018-02-06 Tamar Christina <tamar.christina@arm.com>
22833 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22834 emitted arch directives.
22835 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22836 __ARM_FEATURE_COPROC before changing architectures.
22838 2018-02-06 Richard Biener <rguenther@suse.de>
22840 * config/i386/i386.c (print_reg): Fix typo.
22841 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22843 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
22845 * configure: Regenerate.
22847 2018-02-05 Martin Sebor <msebor@redhat.com>
22849 PR tree-optimization/83369
22850 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22853 2018-02-05 Martin Liska <mliska@suse.cz>
22855 * doc/invoke.texi: Cherry-pick upstream r323995.
22857 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
22859 * ira.c (ira_init_register_move_cost): Adjust comment.
22861 2018-02-05 Martin Liska <mliska@suse.cz>
22863 PR gcov-profile/84137
22864 * doc/gcov.texi: Fix typo in documentation.
22866 2018-02-05 Martin Liska <mliska@suse.cz>
22868 PR gcov-profile/83879
22869 * doc/gcov.texi: Document necessity of --dynamic-list-data when
22870 using dlopen functionality.
22872 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
22874 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22875 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22876 _mm_maskz_range_ss, _mm_mask_range_round_ss,
22877 _mm_maskz_range_round_ss): New intrinsics.
22878 (__builtin_ia32_rangesd128_round)
22879 (__builtin_ia32_rangess128_round): Remove.
22880 (__builtin_ia32_rangesd128_mask_round,
22881 __builtin_ia32_rangess128_mask_round): New builtins.
22882 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22883 __builtin_ia32_rangess128_round): Remove.
22884 (__builtin_ia32_rangesd128_mask_round,
22885 __builtin_ia32_rangess128_mask_round): New builtins.
22886 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22887 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22888 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22889 "<round_saeonly_constraint>")): Changed to ...
22890 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22891 "<round_saeonly_scalar_constraint>")): ... this.
22892 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22893 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22894 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22895 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22896 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22898 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
22900 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22902 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22903 Remove all values except native, 8540 and 8548.
22905 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
22907 * config/i386/i386.c (ix86_output_function_return): Pass
22908 INVALID_REGNUM, instead of -1, as invalid register number to
22909 indirect_thunk_name and output_indirect_thunk.
22911 2018-02-02 Julia Koval <julia.koval@intel.com>
22913 * config.gcc: Add -march=icelake.
22914 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22915 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22916 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22917 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22918 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22919 (processor_target_table): Add icelake.
22920 (ix86_option_override_internal): Handle new PTAs.
22921 (get_builtin_code_for_version): Handle icelake.
22922 (M_INTEL_COREI7_ICELAKE): New.
22923 (fold_builtin_cpu): Handle icelake.
22924 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22925 * doc/invoke.texi: Add -march=icelake.
22927 2018-02-02 Julia Koval <julia.koval@intel.com>
22929 * config/i386/i386.c (ix86_option_override_internal): Change flags type
22930 to wide_int_bitmask.
22931 * wide-int-bitmask.h: New.
22933 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22936 * config/i386/i386.md: Replace Pmode with word_mode in
22937 builtin_setjmp_setup and builtin_longjmp to support x32.
22939 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
22943 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22945 (rs6000_supported_cpu_names): New static variable.
22946 (linux_cpu_translation_table): Likewise.
22947 (elf_platform) <cpu>: Define new static variable and use it.
22948 Translate kernel AT_PLATFORM name to canonical name if needed.
22949 Error if platform name is unknown.
22951 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
22954 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22956 2018-02-01 Jeff Law <law@redhat.com>
22959 * config/i386/i386.c (release_scratch_register_on_entry): Add new
22960 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
22961 the scratch if RELEASE_VIA_POP is false.
22962 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22963 If we have to save a temporary register, decrement SIZE appropriately.
22964 Pass new arguments to release_scratch_register_on_entry.
22965 (ix86_adjust_stack_and_probe): Likewise.
22966 (ix86_emit_probe_stack_range): Pass new arguments to
22967 release_scratch_register_on_entry.
22969 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
22971 PR rtl-optimization/84157
22972 * combine.c (change_zero_ext): Use REG_P predicate in
22973 front of HARD_REGISTER_P predicate.
22975 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
22977 * config/avr/avr.c (avr_option_override): Move disabling of
22978 -fdelete-null-pointer-checks to...
22979 * common/config/avr/avr-common.c (avr_option_optimization_table):
22982 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22984 PR tree-optimization/81635
22985 * tree-data-ref.c (split_constant_offset_1): For types that
22986 wrap on overflow, try to use range info to prove that wrapping
22989 2018-02-01 Renlin Li <renlin.li@arm.com>
22992 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22993 TAILCALL_ADDR_REGS.
22994 (aarch64_register_move_cost): Likewise.
22995 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22996 TAILCALL_ADDR_REGS.
22997 (REG_CLASS_NAMES): Likewise.
22998 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22999 TAILCALL_ADDR_REGS. Remove IP registers.
23000 * config/aarch64/aarch64.md (Ucs): Update register constraint.
23002 2018-02-01 Richard Biener <rguenther@suse.de>
23004 * domwalk.h (dom_walker::dom_walker): Add additional constructor
23005 for specifying RPO order and allow NULL for that.
23006 * domwalk.c (dom_walker::dom_walker): Likewise.
23007 (dom_walker::walk): Handle NULL RPO order.
23008 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23010 (rewrite_update_dom_walker): Likewise.
23011 (mark_def_dom_walker): Likewise.
23013 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23015 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23016 (aarch64_maybe_expand_sve_subreg_move): Declare.
23017 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23018 * config/aarch64/predicates.md (aarch64_any_register_operand): New
23020 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23021 that are semantically a reverse operation.
23022 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23023 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23024 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23026 (aarch64_can_change_mode_class): For big-endian, forbid changes
23027 between two SVE modes if they have different element sizes.
23029 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23031 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23032 the TImode handling for big-endian targets.
23034 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23036 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23037 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
23039 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23040 Remove BSWAP handing for big-endian targets and use the form of
23041 LD1RQ appropariate for the mode.
23043 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23045 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23046 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23047 duplicated element.
23049 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23052 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23053 check for operands that need to go through aarch64_sve_reload_be.
23055 2018-02-01 Jakub Jelinek <jakub@redhat.com>
23057 PR tree-optimization/81661
23058 PR tree-optimization/84117
23059 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23060 * tree-eh.c: Include gimplify.h.
23061 (find_trapping_overflow, replace_trapping_overflow,
23062 rewrite_to_non_trapping_overflow): New functions.
23063 * tree-vect-loop.c: Include tree-eh.h.
23064 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23065 * tree-data-ref.c: Include tree-eh.h.
23066 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23068 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
23070 PR rtl-optimization/84123
23071 * combine.c (change_zero_ext): Check if hard register satisfies
23072 can_change_dest_mode before calling gen_lowpart_SUBREG.
23074 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
23077 * ira.c (ira_init_register_move_cost): Remove assert.
23079 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23081 PR rtl-optimization/84071
23082 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23083 * doc/tm.texi: Regenerate.
23085 2018-01-31 Richard Biener <rguenther@suse.de>
23087 PR tree-optimization/84132
23088 * tree-data-ref.c (analyze_miv_subscript): Properly
23089 check whether evolution_function_is_affine_multivariate_p
23090 before calling gcd_of_steps_may_divide_p.
23092 2018-01-31 Julia Koval <julia.koval@intel.com>
23095 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23096 * config/i386/i386.md (rdpid_rex64) New.
23097 (rdpid): Make 32bit only.
23099 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
23102 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23103 an IDENTIFIER_NODE for FUNCTION_TYPE's.
23105 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23108 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23110 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23112 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23114 PR rtl-optimization/84071
23115 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23116 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23118 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23120 * config/arc/arc.c (arc_handle_aux_attribute): New function.
23121 (arc_attribute_table): Add 'aux' attribute.
23122 (arc_in_small_data_p): Consider aux like variables.
23123 (arc_is_aux_reg_p): New function.
23124 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23125 (arc_get_aux_arg): New function.
23126 (prepare_move_operands): Handle aux-register access.
23127 (arc_handle_aux_attribute): New function.
23128 * doc/extend.texi (ARC Variable attributes): Add subsection.
23130 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23132 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23133 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23134 (arc_attribute_table): Add 'uncached' attribute.
23135 (arc_print_operand): Print '.di' flag for uncached memory
23137 (arc_in_small_data_p): Do not consider for small data the uncached
23139 (arc_is_uncached_mem_p): New function.
23140 * config/arc/predicates.md (compact_store_memory_operand): Check
23141 for uncached memory accesses.
23142 (nonvol_nonimm_operand): Likewise.
23143 * doc/extend.texi (ARC Type Attribute): New subsection.
23145 2018-01-31 Jakub Jelinek <jakub@redhat.com>
23148 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23149 falign-loops=): Add Optimization flag.
23151 2018-01-30 Jeff Law <law@redhat.com>
23154 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23155 INT_REGISTERS_SAVED. Check it prior to calling
23156 get_scratch_register_on_entry.
23157 (ix86_adjust_stack_and_probe): Similarly.
23158 (ix86_emit_probe_stack_range): Similarly.
23159 (ix86_expand_prologue): Corresponding changes.
23161 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23164 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23165 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23167 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
23170 * lra-constraints.c (curr_insn_transform): Process AND in the
23173 2018-01-30 Jakub Jelinek <jakub@redhat.com>
23175 PR rtl-optimization/83986
23176 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23177 dependence against last_pending_memory_flush in addition to
23178 pending_jump_insns.
23180 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
23182 PR tree-optimization/81611
23183 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23186 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23189 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23192 2018-01-30 Richard Biener <rguenther@suse.de>
23193 Jakub Jelinek <jakub@redhat.com>
23195 PR tree-optimization/84111
23196 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23197 inner loops added during recursion, as they don't have up-to-date
23200 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23203 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23204 (can_inline_edge_by_limits_p): ... here.
23205 (can_early_inline_edge_p, check_callers,
23206 update_caller_keys, update_callee_keys, recursive_inlining,
23207 add_new_edges_to_heap, speculation_useful_p,
23208 inline_small_functions,
23209 inline_small_functions, flatten_function,
23210 inline_to_all_callers_1): Update.
23212 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23214 * profile-count.c (profile_count::combine_with_ipa_count): Handle
23217 2018-01-30 Richard Biener <rguenther@suse.de>
23219 PR tree-optimization/83008
23220 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23221 invariant and constant vector uses in stmts when they need
23222 more than one stmt.
23224 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23227 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23228 * configure: Regenerate.
23230 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23232 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23234 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23235 Use gen_rtx_REG rather than gen_lowpart.
23237 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23239 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23240 rather than 0 when creating partial subregs.
23242 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23244 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23247 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
23250 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23251 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23252 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23253 flags. This restores the settings used before the 2017-07-24.
23254 Turning off pre increment/decrement/modify allows IVOPTS to
23255 optimize DF/SF loops where the index is an int.
23257 2018-01-29 Richard Biener <rguenther@suse.de>
23258 Kelvin Nilsen <kelvin@gcc.gnu.org>
23261 * tree-vect-stmts.c (vectorizable_call): Don't call
23262 targetm.vectorize_builtin_md_vectorized_function if callee is
23265 2018-01-22 Carl Love <cel@us.ibm.com>
23267 * doc/extend.tex: Fix typo in second arg in
23268 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23270 2018-01-29 Richard Biener <rguenther@suse.de>
23272 PR tree-optimization/84086
23273 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23274 (flush_ssaname_freelist): When SSA names were released reset
23275 the SCEV hash table.
23277 2018-01-29 Richard Biener <rguenther@suse.de>
23279 PR tree-optimization/84057
23280 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23281 removed paths when removing edges.
23283 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
23285 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
23286 -mfunction-return=@var{choice}.
23288 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
23290 PR diagnostic/84034
23291 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
23292 Handle CR like TAB.
23293 (layout::print_source_line): Likewise.
23294 (test_get_line_width_without_trailing_whitespace): Add test cases.
23296 2018-01-27 Jakub Jelinek <jakub@redhat.com>
23298 PR middle-end/84040
23299 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
23302 2018-01-26 Jim Wilson <jimw@sifive.com>
23304 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
23306 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
23309 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23311 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
23312 and CMP + SUB-immediate -> SUBS.
23314 2018-01-26 Martin Sebor <msebor@redhat.com>
23316 PR tree-optimization/83896
23317 * tree-ssa-strlen.c (get_string_len): Rename...
23318 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
23319 Avoid assuming length is constant.
23320 (handle_char_store): Use HOST_WIDE_INT for string length.
23322 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
23325 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
23326 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
23328 2018-01-26 Richard Biener <rguenther@suse.de>
23330 PR rtl-optimization/84003
23331 * dse.c (record_store): Only record redundant stores when
23332 the earlier store aliases at least all accesses the later one does.
23334 2018-01-26 Jakub Jelinek <jakub@redhat.com>
23336 PR rtl-optimization/83985
23337 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
23338 REG_CFA_RESTORE insns.
23339 (delete_unmarked_insns): Don't ignore separate shrink wrapping
23340 REG_CFA_RESTORE insns here.
23343 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
23344 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
23346 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
23348 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
23349 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
23350 (arc_init): Likewise.
23351 (arc_override_options): Likewise.
23352 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
23354 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
23356 * config/arc/arc.h (TARGET_DBNZ): Define.
23357 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
23358 properly set the tune attribute.
23359 (dbnz): Use TARGET_DBNZ guard.
23360 * config/arc/arc.opt (mtune): Add core3 option.
23362 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
23364 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
23365 recognize new pic like addresses.
23366 (arc_delegitimize_address): Clean up.
23368 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
23370 * config/arc/arc-arches.def: Option mrf16 valid for all
23372 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
23373 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
23374 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
23375 * config/arc/arc-tables.opt: Regenerate.
23376 * config/arc/arc.c (arc_conditional_register_usage): Handle
23377 reduced register file case.
23378 (arc_file_start): Set must have build attributes.
23379 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
23380 mrf16 option value.
23381 * config/arc/arc.opt (mrf16): Add new option.
23382 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
23383 * config/arc/genmultilib.awk: Handle new mrf16 option.
23384 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
23385 * config/arc/t-multilib: Regenerate.
23386 * doc/invoke.texi (ARC Options): Document mrf16 option.
23388 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
23390 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
23391 * config/arc/arc.c (arc_handle_secure_attribute): New function.
23392 (arc_attribute_table): Add 'secure_call' attribute.
23393 (arc_print_operand): Print secure call operand.
23394 (arc_function_ok_for_sibcall): Don't optimize tail calls when
23396 (arc_is_secure_call_p): New function. * config/arc/arc.md
23397 (call_i): Add support for sjli instruction.
23398 (call_value_i): Likewise.
23399 * config/arc/constraints.md (Csc): New constraint.
23401 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
23402 John Eric Martin <John.Martin@emmicro-us.com>
23404 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
23405 * config/arc/arc.c (_arc_jli_section): New struct.
23406 (arc_jli_section): New type.
23407 (rc_jli_sections): New static variable.
23408 (arc_handle_jli_attribute): New function.
23409 (arc_attribute_table): Add jli_always and jli_fixed attribute.
23410 (arc_file_end): New function.
23411 (TARGET_ASM_FILE_END): Define.
23412 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
23413 (arc_add_jli_section): New function.
23414 (jli_call_scan): Likewise.
23415 (arc_reorg): Call jli_call_scan.
23416 (arc_output_addsi): Remove 'S' from printing asm operand.
23417 (arc_is_jli_call_p): New function.
23418 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
23420 (movhi_insn): Likewise.
23421 (movsi_insn): Likewise.
23422 (movsi_set_cc_insn): Likewise.
23423 (loadqi_update): Likewise.
23424 (load_zeroextendqisi_update): Likewise.
23425 (load_signextendqisi_update): Likewise.
23426 (loadhi_update): Likewise.
23427 (load_zeroextendhisi_update): Likewise.
23428 (load_signextendhisi_update): Likewise.
23429 (loadsi_update): Likewise.
23430 (loadsf_update): Likewise.
23431 (movsicc_insn): Likewise.
23432 (bset_insn): Likewise.
23433 (bxor_insn): Likewise.
23434 (bclr_insn): Likewise.
23435 (bmsk_insn): Likewise.
23436 (bicsi3_insn): Likewise.
23437 (cmpsi_cc_c_insn): Likewise.
23438 (movsi_ne): Likewise.
23439 (movsi_cond_exec): Likewise.
23440 (clrsbsi2): Likewise.
23441 (norm_f): Likewise.
23451 (call_i): Remove 'S' asm letter, add jli instruction.
23452 (call_value_i): Likewise.
23453 * config/arc/arc.op (mjli-always): New option.
23454 * config/arc/constraints.md (Cji): New constraint.
23455 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
23457 (subsf3_fpx): Likewise.
23458 (mulsf3_fpx): Likewise.
23459 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
23461 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
23462 function attrbutes.
23463 * doc/invoke.texi (ARC): Document mjli-always option.
23465 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
23467 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
23468 avoid addition with 0 and use incw and decw where possible.
23470 2018-01-26 Richard Biener <rguenther@suse.de>
23472 PR tree-optimization/81082
23473 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
23474 association if it requires casting to unsigned.
23475 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
23476 from fold_plusminus_mult_expr to catch important cases late when
23477 range info is available.
23479 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23481 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
23482 * configure.ac (hidden_linkonce): New test.
23483 * configure: Regenerate.
23484 * config.in: Regenerate.
23486 2018-01-26 Julia Koval <julia.koval@intel.com>
23488 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
23489 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
23490 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
23491 _mm_mask_bitshuffle_epi64_mask): Fix type.
23492 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
23493 USI_FTYPE_V4DI_V4DI_USI): Remove.
23494 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
23495 __builtin_ia32_vpshufbitqmb256_mask,
23496 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
23497 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
23498 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
23500 2018-01-26 Alan Modra <amodra@gmail.com>
23503 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
23504 UNSPEC_VBPERMQ. Sort other unspecs.
23506 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
23508 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
23510 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
23512 PR middle-end/83055
23513 * predict.c (drop_profile): Do not push/pop cfun; update also
23515 (handle_missing_profiles): Fix logic looking for zero profiles.
23517 2018-01-25 Jakub Jelinek <jakub@redhat.com>
23519 PR middle-end/83977
23520 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
23521 on functions with #pragma omp declare simd or functions with simd
23523 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
23524 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
23525 Remove trailing \n from warning_at calls.
23527 2018-01-25 Tom de Vries <tom@codesourcery.com>
23530 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23531 for neutered workers.
23533 2018-01-24 Joseph Myers <joseph@codesourcery.com>
23536 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
23537 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
23539 2018-01-24 Jeff Law <law@redhat.com>
23542 * i386.c (get_probe_interval): Move to earlier point.
23543 (ix86_compute_frame_layout): If -fstack-clash-protection and
23544 the frame is larger than the probe interval, then use pushes
23545 to save registers rather than reg->mem moves.
23546 (ix86_expand_prologue): Remove conditional for int_registers_saved
23549 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
23552 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
23553 min/max for never referenced object.
23555 2018-01-24 Jakub Jelinek <jakub@redhat.com>
23557 PR middle-end/83977
23558 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
23560 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
23561 attributes from DECL_ATTRIBUTES (decl) without affecting
23562 DECL_ATTRIBUTES (current_function_decl).
23563 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
23564 functions with non-NULL DECL_ABSTRACT_ORIGIN.
23566 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
23568 PR tree-optimization/83979
23569 * fold-const.c (fold_comparison): Use constant_boolean_node
23570 instead of boolean_{true,false}_node.
23572 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
23574 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
23577 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23579 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23580 Simplify the clause that sets the length attribute.
23581 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23582 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
23583 clause that sets the length attribute.
23584 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23586 2018-01-24 Tom de Vries <tom@codesourcery.com>
23589 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
23590 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
23591 Add strict parameter.
23592 (prevent_branch_around_nothing): Insert dummy insn between branch to
23593 label and label with no ptx insn inbetween.
23594 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
23596 2018-01-24 Tom de Vries <tom@codesourcery.com>
23599 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23600 for neutered threads in warp.
23601 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
23603 2018-01-24 Richard Biener <rguenther@suse.de>
23605 PR tree-optimization/83176
23606 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
23609 2018-01-24 Richard Biener <rguenther@suse.de>
23611 PR tree-optimization/82819
23612 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
23613 code generating pluses that are no-ops in the target precision.
23615 2018-01-24 Richard Biener <rguenther@suse.de>
23617 PR middle-end/84000
23618 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
23620 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23622 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
23623 to merge probabilities.
23624 * predict.c (probably_never_executed): Also mark as cold functions
23625 with global 0 profile and guessed local profile.
23626 * profile-count.c (profile_probability::combine_with_count): New
23628 * profile-count.h (profile_probability::operator*,
23629 profile_probability::operator*=, profile_probability::operator/,
23630 profile_probability::operator/=): Reduce precision to adjusted
23631 and set value to guessed on contradictory divisions.
23632 (profile_probability::combine_with_freq): Remove.
23633 (profile_probability::combine_wiht_count): Declare.
23634 (profile_count::force_nonzero):: Set to adjusted.
23635 (profile_count::probability_in):: Set quality to adjusted.
23636 * tree-ssa-tail-merge.c (replace_block_by): Use
23637 combine_with_count.
23639 2018-01-23 Andrew Waterman <andrew@sifive.com>
23640 Jim Wilson <jimw@sifive.com>
23642 * config/riscv/riscv.c (riscv_stack_boundary): New.
23643 (riscv_option_override): Set riscv_stack_boundary. Handle
23644 riscv_preferred_stack_boundary_arg.
23645 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
23646 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
23647 (STACK_BOUNDARY): Set to riscv_stack_boundary.
23648 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
23649 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
23650 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
23652 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
23655 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
23656 of struct ix86_frame.
23657 (ix86_expand_epilogue): Likewise. Add a local variable for
23658 the reg_save_offset field in struct ix86_frame.
23660 2018-01-23 Bin Cheng <bin.cheng@arm.com>
23662 PR tree-optimization/82604
23663 * tree-loop-distribution.c (enum partition_kind): New enum item
23664 PKIND_PARTIAL_MEMSET.
23665 (partition_builtin_p): Support above new enum item.
23666 (generate_code_for_partition): Ditto.
23667 (compute_access_range): Differentiate cases that equality can be
23668 proven at all loops, the innermost loops or no loops.
23669 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
23670 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
23671 (finalize_partitions, distribute_loop): Don't fuse partition of
23672 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
23673 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
23674 parloop is enabled.
23676 2018-01-23 Martin Liska <mliska@suse.cz>
23678 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
23679 order to ignore the predictor.
23680 (PRED_POLYMORPHIC_CALL): Likewise.
23681 (PRED_RECURSIVE_CALL): Likewise.
23683 2018-01-23 Martin Liska <mliska@suse.cz>
23685 * tree-profile.c (tree_profiling): Print function header to
23686 aware reader which function we are working on.
23687 * value-prof.c (gimple_find_values_to_profile): Do not print
23688 not interesting value histograms.
23690 2018-01-23 Martin Liska <mliska@suse.cz>
23692 * profile-count.h (enum profile_quality): Add
23693 profile_uninitialized as the first value. Do not number values
23694 as they are zero based.
23695 (profile_count::verify): Update sanity check.
23696 (profile_probability::verify): Likewise.
23698 2018-01-23 Nathan Sidwell <nathan@acm.org>
23700 * doc/invoke.texi (ffor-scope): Deprecate.
23702 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23704 PR tree-optimization/83510
23705 * domwalk.c (set_all_edges_as_executable): New function.
23706 (dom_walker::dom_walker): Convert bool param
23707 "skip_unreachable_blocks" to enum reachability. Move setup of
23708 edge flags to set_all_edges_as_executable and only do it when
23709 reachability is REACHABLE_BLOCKS.
23710 * domwalk.h (enum dom_walker::reachability): New enum.
23711 (dom_walker::dom_walker): Convert bool param
23712 "skip_unreachable_blocks" to enum reachability.
23713 (set_all_edges_as_executable): New decl.
23714 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
23715 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
23717 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
23718 but converting true to REACHABLE_BLOCKS.
23719 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
23721 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
23722 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
23723 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
23725 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
23726 if check_all_array_refs will be called.
23728 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23730 * tree.c (selftest::test_location_wrappers): Add more test
23733 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23735 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23736 (selftest::test_bit_in_range): Likewise.
23738 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
23741 * doc/sourcebuild.texi (vect_float): Say that the selector
23742 only describes the situation when -funsafe-math-optimizations is on.
23743 (vect_float_strict): Document.
23745 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
23747 PR tree-optimization/83965
23748 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23749 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23750 instead of checking only for a reduction.
23751 (vect_recog_widen_sum_pattern): Likewise.
23753 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23755 * predict.c (probably_never_executed): Only use precise profile info.
23756 (compute_function_frequency): Skip after inlining hack since we now
23757 have quality checking.
23759 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23761 * profile-count.h (profile_probability::very_unlikely,
23762 profile_probability::unlikely, profile_probability::even): Set
23763 precision to guessed.
23765 2018-01-23 Richard Biener <rguenther@suse.de>
23767 PR tree-optimization/83963
23768 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23769 Properly terminate dominator walk when crossing the exit edge not
23770 when visiting its source block.
23772 2018-01-23 Jakub Jelinek <jakub@redhat.com>
23775 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23776 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23778 2018-01-22 Jakub Jelinek <jakub@redhat.com>
23780 PR tree-optimization/83957
23781 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
23782 semicolon after for body surrounded by braces.
23784 PR tree-optimization/83081
23785 * profile-count.h (profile_probability::split): New method.
23786 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23787 Use profile_probability::split.
23788 (do_compare_rtx_and_jump): Fix adjustment of probabilities
23789 when splitting a single conditional jump into 2.
23791 2018-01-22 David Malcolm <dmalcolm@redhat.com>
23793 PR tree-optimization/69452
23794 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23797 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23799 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23800 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23801 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23803 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23805 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23807 * config/rl78/rl78.md (movdi): New define_expand.
23808 * config/rl78/rl78.c (rl78_split_movdi): New function.
23810 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
23813 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23815 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23816 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23817 128-bit to produce an UNSPEC move to get the double word with the
23818 signbit and then a shift directly to do signbit.
23819 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23820 implementation with a new version that just does either a direct
23821 move or a regular move. Move memory interface to separate insns.
23822 Move insns so they are next to the expander.
23823 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23824 with signbit move. Split big and little endian case.
23825 (signbit<mode>2_dm_mem_le): Likewise.
23826 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23827 (signbit<mode>2_dm2): Likewise.
23829 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23831 * config/rl78/rl78.md (anddi3): New define_expand.
23833 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23835 * config/rl78/rl78.md (umindi3): New define_expand.
23837 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23839 * config/rl78/rl78.md (smindi3): New define_expand.
23841 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23843 * config/rl78/rl78.md (smaxdi3): New define_expand.
23845 2018-01-22 Carl Love <cel@us.ibm.com>
23847 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23848 LVX_V1TI): Add macro expansion.
23849 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23850 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23851 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23852 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23853 Change check to determine if the instruction is a byte reversing
23854 entry. Fix typo in comment.
23855 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23856 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23857 Add def_builtin calls for new builtins.
23858 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23859 Add define_insn expansion.
23861 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23863 * config/rl78/rl78.md (umaxdi3): New define_expand.
23865 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23867 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23868 for non-QImode registers.
23870 2018-01-22 Richard Biener <rguenther@suse.de>
23872 PR tree-optimization/83963
23873 * graphite-scop-detection.c (scop_detection::get_sese): Delay
23874 including the loop exit block.
23875 (scop_detection::merge_sese): Likewise.
23876 (scop_detection::add_scop): Do it here instead.
23878 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23880 * doc/sourcebuild.texi (arm_softfloat): Document.
23882 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
23885 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23886 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23887 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23889 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23890 David Edelsohn <dje.gcc@gmail.com>
23893 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23894 Change "crset eq" to "crset 2".
23895 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23896 (*call_indirect_aix<mode>_nospec): Likewise.
23897 (*call_value_indirect_aix<mode>_nospec): Likewise.
23898 (*call_indirect_elfv2<mode>_nospec): Likewise.
23899 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23900 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23901 change assembly output from . to $.
23902 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23903 (indirect_jump<mode>_nospec): Change assembly output from . to $.
23904 (*tablejump<mode>_internal1_nospec): Likewise.
23906 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
23909 * config/sh/sh_optimize_sett_clrt.cc:
23910 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23912 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
23914 PR tree-optimization/83940
23915 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23916 offset_dt to vect_constant_def rather than vect_unknown_def_type.
23917 (vect_check_load_store_mask): Add a mask_dt_out parameter and
23918 use it to pass back the definition type.
23919 (vect_check_store_rhs): Likewise rhs_dt_out.
23920 (vect_build_gather_load_calls): Add a mask_dt argument and use
23921 it instead of a call to vect_is_simple_use.
23922 (vectorizable_store): Update calls to vect_check_load_store_mask
23923 and vect_check_store_rhs. Use the dt returned by the latter instead
23924 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
23925 instead of calls to vect_is_simple_use. Pass the scalar rather
23926 than the vector operand to vect_is_simple_use when handling
23927 second and subsequent copies of an rhs value.
23928 (vectorizable_load): Update calls to vect_check_load_store_mask
23929 and vect_build_gather_load_calls. Use the cached mask_dt and
23930 gs_info.offset_dt instead of calls to vect_is_simple_use.
23932 2018-01-20 Jakub Jelinek <jakub@redhat.com>
23934 PR middle-end/83945
23935 * tree-emutls.c: Include gimplify.h.
23936 (lower_emutls_2): New function.
23937 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23938 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23939 it before further processing.
23942 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23943 UINTVAL (trueop1) instead of INTVAL (op1).
23945 2018-01-19 Jakub Jelinek <jakub@redhat.com>
23949 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23950 INCOMING_FRAME_SP_OFFSET if not defined.
23951 (scan_trace): Add ENTRY argument. If true and
23952 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23953 emit a note to adjust the CFA offset.
23954 (create_cfi_notes): Adjust scan_trace callers.
23955 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23956 INCOMING_FRAME_SP_OFFSET in the CIE.
23957 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23958 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23960 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23961 * doc/tm.texi: Regenerated.
23963 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23965 PR rtl-optimization/83147
23966 * lra-constraints.c (remove_inheritance_pseudos): Use
23967 lra_substitute_pseudo_within_insn.
23969 2018-01-19 Tom de Vries <tom@codesourcery.com>
23970 Cesar Philippidis <cesar@codesourcery.com>
23973 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23975 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
23978 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23979 spaces for function labels.
23981 2018-01-19 Martin Liska <mliska@suse.cz>
23983 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23984 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23985 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23986 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23987 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23988 (PRED_CONST_RETURN): Change from 69 to 65.
23989 (PRED_NULL_RETURN): Change from 91 to 71.
23990 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23991 (PRED_LOOP_GUARD): Change from 66 to 73.
23993 2018-01-19 Martin Liska <mliska@suse.cz>
23995 * predict.c (predict_insn_def): Add new assert.
23996 (struct branch_predictor): Change type to signed integer.
23997 (test_prediction_value_range): Amend test to cover
23998 PROB_UNINITIALIZED.
23999 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24000 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24001 (PRED_LOOP_ITERATIONS_MAX): Likewise.
24002 (PRED_LOOP_IV_COMPARE): Likewise.
24003 * predict.h (PROB_UNINITIALIZED): Define new constant.
24005 2018-01-19 Martin Liska <mliska@suse.cz>
24007 * predict.c (dump_prediction): Add new format for
24008 analyze_brprob.py script which is enabled with -details
24010 * profile-count.h (precise_p): New function.
24012 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24014 PR tree-optimization/83922
24015 * tree-vect-loop.c (vect_verify_full_masking): Return false if
24016 there are no statements that need masking.
24017 (vect_active_double_reduction_p): New function.
24018 (vect_analyze_loop_operations): Use it when handling phis that
24019 are not in the loop header.
24021 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24023 PR tree-optimization/83914
24024 * tree-vect-loop.c (vectorizable_induction): Don't convert
24025 init_expr or apply the peeling adjustment for inductions
24026 that are nested within the vectorized loop.
24028 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24030 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24033 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24037 * function.h (gimplify_parameters): Add gimple_seq * argument.
24038 * function.c: Include gimple.h and options.h.
24039 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24040 for the added local temporaries if needed.
24041 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24042 if there are any parameter cleanups, wrap whole body into a
24043 try/finally with the cleanups.
24045 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
24048 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24049 Use GET_MODE_CLASS for scalar floating point.
24051 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24055 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24056 Fix call of call_cgraph_insertion_hooks.
24058 2018-01-18 Martin Sebor <msebor@redhat.com>
24060 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24062 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24065 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24068 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
24071 * common.opt: (-ffile-prefix-map): New option.
24072 * opts.c (common_handle_option): Defer it.
24073 * opts-global.c (handle_common_deferred_options): Handle it.
24074 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24075 * file-prefix-map.h: New file.
24076 (remap_debug_filename, add_debug_prefix_map): ...here.
24077 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24078 * final.c (debug_prefix_map, add_debug_prefix_map
24079 remap_debug_filename): Move to...
24080 * file-prefix-map.c: New file.
24081 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24082 generalize, get rid of alloca(), use strrchr() instead of strchr().
24083 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24084 Implement in terms of add_prefix_map().
24085 (remap_macro_filename, remap_debug_filename): Implement in term of
24087 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24088 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24089 * dbxout.c: Include file-prefix-map.h.
24090 * varasm.c: Likewise.
24091 * vmsdbgout.c: Likewise.
24092 * xcoffout.c: Likewise.
24093 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24094 * doc/cppopts.texi (-fmacro-prefix-map): Document.
24095 * doc/invoke.texi (-ffile-prefix-map): Document.
24096 (-fdebug-prefix-map): Update description.
24098 2018-01-18 Martin Liska <mliska@suse.cz>
24100 * config/i386/i386.c (indirect_thunk_name): Document that also
24102 (output_indirect_thunk): Document why both instructions
24103 (pause and lfence) are generated.
24105 2018-01-18 Richard Biener <rguenther@suse.de>
24107 PR tree-optimization/83887
24108 * graphite-scop-detection.c
24109 (scop_detection::get_nearest_dom_with_single_entry): Remove.
24110 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24111 (scop_detection::merge_sese): Re-implement with a flood-fill
24112 algorithm that properly finds a SESE region if it exists.
24114 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24117 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24118 pointer_diff optimizations use view_convert instead of convert.
24120 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24122 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24123 Generate different code for -mno-speculate-indirect-jumps.
24124 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24125 (*call_indirect_aix<mode>): Disable for
24126 -mno-speculate-indirect-jumps.
24127 (*call_indirect_aix<mode>_nospec): New define_insn.
24128 (*call_value_indirect_aix<mode>): Disable for
24129 -mno-speculate-indirect-jumps.
24130 (*call_value_indirect_aix<mode>_nospec): New define_insn.
24131 (*sibcall_nonlocal_sysv<mode>): Generate different code for
24132 -mno-speculate-indirect-jumps.
24133 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24135 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
24137 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24138 long double type, set the flags for noting the default long double
24139 type, even if we don't pass or return a long double type.
24141 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
24144 * ipa-inline.c (flatten_function): Do not overwrite final inlining
24147 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
24149 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24150 support for merge[hl].
24151 (fold_mergehl_helper): New helper function.
24152 (tree-vector-builder.h): New #include for tree_vector_builder usage.
24153 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24154 (altivec_vmrglw_direct): Add xxmrglw insn.
24156 2018-01-17 Andrew Waterman <andrew@sifive.com>
24158 * config/riscv/riscv.c (riscv_conditional_register_usage): If
24159 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24161 2018-01-17 David Malcolm <dmalcolm@redhat.com>
24164 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24165 call the lto_location_cache before reading the
24166 DECL_SOURCE_LOCATION of the types.
24168 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
24169 Richard Sandiford <richard.sandiford@linaro.org>
24171 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24172 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24173 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24174 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24175 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24177 * config/aarch64/constraints.md (aarch64_movti_operand):
24179 * config/aarch64/predicates.md (Uti): Add new constraint.
24181 2018-01-17 Carl Love <cel@us.ibm.com>
24183 * config/rs6000/vsx.md (define_expand xl_len_r,
24184 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24185 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24187 (define_expand, define_insn): Move the shift left from the
24188 define_insn to the define_expand for lxvl and stxvl instructions.
24189 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24190 and XL_LEN_R definitions to PURE.
24192 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
24194 * config/i386/i386.c (indirect_thunk_name): Declare regno
24195 as unsigned int. Compare regno with INVALID_REGNUM.
24196 (output_indirect_thunk): Ditto.
24197 (output_indirect_thunk_function): Ditto.
24198 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
24199 in the call to output_indirect_thunk_function.
24201 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
24203 PR middle-end/83884
24204 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24205 rather than the size of inner_type to determine the stack slot size
24206 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24208 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
24211 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24214 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
24216 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24217 endian Linux systems to optionally enable multilibs for selecting
24218 the long double type if the user configured an explicit type.
24219 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24220 have no long double multilibs if not defined.
24221 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24222 warn if the user used -mabi={ieee,ibm}longdouble and we built
24223 multilibs for long double.
24224 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24225 appropriate multilib option.
24226 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24228 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24229 for building long double multilibs.
24230 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24232 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
24234 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24237 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24239 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24242 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24245 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24248 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24250 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24251 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24253 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
24255 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24256 different rtl trees depending on TARGET_64BIT.
24257 (rs6000_gen_lvx): Likewise.
24259 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24261 * config/visium/visium.md (nop): Tweak comment.
24262 (hazard_nop): Likewise.
24264 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24266 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24267 -mspeculate-indirect-jumps.
24268 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24269 for -mno-speculate-indirect-jumps.
24270 (*call_indirect_elfv2<mode>_nospec): New define_insn.
24271 (*call_value_indirect_elfv2<mode>): Disable for
24272 -mno-speculate-indirect-jumps.
24273 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24274 (indirect_jump): Emit different RTL for
24275 -mno-speculate-indirect-jumps.
24276 (*indirect_jump<mode>): Disable for
24277 -mno-speculate-indirect-jumps.
24278 (*indirect_jump<mode>_nospec): New define_insn.
24279 (tablejump): Emit different RTL for
24280 -mno-speculate-indirect-jumps.
24281 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24282 (tablejumpsi_nospec): New define_expand.
24283 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24284 (tablejumpdi_nospec): New define_expand.
24285 (*tablejump<mode>_internal1): Disable for
24286 -mno-speculate-indirect-jumps.
24287 (*tablejump<mode>_internal1_nospec): New define_insn.
24288 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
24291 2018-01-16 Artyom Skrobov tyomitch@gmail.com
24293 * caller-save.c (insert_save): Drop unnecessary parameter. All
24296 2018-01-16 Jakub Jelinek <jakub@redhat.com>
24297 Richard Biener <rguenth@suse.de>
24300 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
24301 return early, inline manually is_gimple_sizepos. Make sure if we
24302 call gimplify_expr we don't end up with a gimple constant.
24303 * tree.c (variably_modified_type_p): Don't return true for
24304 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
24305 * gimplify.h (is_gimple_sizepos): Remove.
24307 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24309 PR tree-optimization/83857
24310 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
24311 vectorizable_live_operation for pure SLP statements.
24312 (vectorizable_live_operation): Handle PHIs.
24314 2018-01-16 Richard Biener <rguenther@suse.de>
24316 PR tree-optimization/83867
24317 * tree-vect-stmts.c (vect_transform_stmt): Precompute
24318 nested_in_vect_loop_p since the scalar stmt may get invalidated.
24320 2018-01-16 Jakub Jelinek <jakub@redhat.com>
24323 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
24324 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
24325 If off is not INTEGER_CST, issue a may not be aligned warning
24326 rather than isn't aligned. Use isn%'t rather than isn't.
24327 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
24329 <case MULT_EXPR>: Improve the case when bottom and one of the
24330 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
24331 operand, in that case check if the other operand is multiple of
24332 bottom divided by the INTEGER_CST operand.
24334 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24337 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
24338 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
24339 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
24340 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
24341 * config/pa/pa.c (pa_function_arg_advance): Likewise.
24342 (pa_function_arg, pa_arg_partial_bytes): Likewise.
24343 (pa_function_arg_size): New function.
24345 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24347 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
24348 in a separate statement.
24350 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24352 PR tree-optimization/83847
24353 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
24354 group gathers and scatters.
24356 2018-01-16 Jakub Jelinek <jakub@redhat.com>
24358 PR rtl-optimization/86620
24359 * params.def (max-sched-ready-insns): Bump minimum value to 1.
24361 PR rtl-optimization/83213
24362 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
24363 to last if both are JUMP_INSNs.
24365 PR tree-optimization/83843
24366 * gimple-ssa-store-merging.c
24367 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
24368 store_immediate_info for bswap/nop orig_stores.
24370 2018-01-15 Andrew Waterman <andrew@sifive.com>
24372 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
24374 <UDIV>: Increase cost if !TARGET_DIV.
24376 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
24378 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
24379 (define_attr "cr_logical_3op"): New.
24380 (cceq_ior_compare): Adjust.
24381 (cceq_ior_compare_complement): Adjust.
24382 (*cceq_rev_compare): Adjust.
24383 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
24384 (is_cracked_insn): Adjust.
24385 (insn_must_be_first_in_group): Adjust.
24386 * config/rs6000/40x.md: Adjust.
24387 * config/rs6000/440.md: Adjust.
24388 * config/rs6000/476.md: Adjust.
24389 * config/rs6000/601.md: Adjust.
24390 * config/rs6000/603.md: Adjust.
24391 * config/rs6000/6xx.md: Adjust.
24392 * config/rs6000/7450.md: Adjust.
24393 * config/rs6000/7xx.md: Adjust.
24394 * config/rs6000/8540.md: Adjust.
24395 * config/rs6000/cell.md: Adjust.
24396 * config/rs6000/e300c2c3.md: Adjust.
24397 * config/rs6000/e500mc.md: Adjust.
24398 * config/rs6000/e500mc64.md: Adjust.
24399 * config/rs6000/e5500.md: Adjust.
24400 * config/rs6000/e6500.md: Adjust.
24401 * config/rs6000/mpc.md: Adjust.
24402 * config/rs6000/power4.md: Adjust.
24403 * config/rs6000/power5.md: Adjust.
24404 * config/rs6000/power6.md: Adjust.
24405 * config/rs6000/power7.md: Adjust.
24406 * config/rs6000/power8.md: Adjust.
24407 * config/rs6000/power9.md: Adjust.
24408 * config/rs6000/rs64.md: Adjust.
24409 * config/rs6000/titan.md: Adjust.
24411 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
24413 * config/i386/predicates.md (indirect_branch_operand): Rewrite
24414 ix86_indirect_branch_register logic.
24416 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
24418 * config/i386/constraints.md (Bs): Update
24419 ix86_indirect_branch_register check. Don't check
24420 ix86_indirect_branch_register with GOT_memory_operand.
24422 * config/i386/predicates.md (GOT_memory_operand): Don't check
24423 ix86_indirect_branch_register here.
24424 (GOT32_symbol_operand): Likewise.
24426 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
24428 * config/i386/predicates.md (constant_call_address_operand):
24429 Rewrite ix86_indirect_branch_register logic.
24430 (sibcall_insn_operand): Likewise.
24432 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
24434 * config/i386/constraints.md (Bs): Replace
24435 ix86_indirect_branch_thunk_register with
24436 ix86_indirect_branch_register.
24438 * config/i386/i386.md (indirect_jump): Likewise.
24439 (tablejump): Likewise.
24440 (*sibcall_memory): Likewise.
24441 (*sibcall_value_memory): Likewise.
24442 Peepholes of indirect call and jump via memory: Likewise.
24443 * config/i386/i386.opt: Likewise.
24444 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24445 (GOT_memory_operand): Likewise.
24446 (call_insn_operand): Likewise.
24447 (sibcall_insn_operand): Likewise.
24448 (GOT32_symbol_operand): Likewise.
24450 2018-01-15 Jakub Jelinek <jakub@redhat.com>
24452 PR middle-end/83837
24453 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
24454 type rather than type addr's type points to.
24455 (expand_omp_atomic_mutex): Likewise.
24456 (expand_omp_atomic): Likewise.
24458 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
24461 * config/i386/i386.c (output_indirect_thunk_function): Use
24462 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
24463 for __x86_return_thunk.
24465 2018-01-15 Richard Biener <rguenther@suse.de>
24467 PR middle-end/83850
24468 * expmed.c (extract_bit_field_1): Fix typo.
24470 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24473 * config/arm/iterators.md (VF): New mode iterator.
24474 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
24475 Remove integer-related logic from pattern.
24476 (neon_vabd<mode>_3): Likewise.
24478 2018-01-15 Jakub Jelinek <jakub@redhat.com>
24480 PR middle-end/82694
24481 * common.opt (fstrict-overflow): No longer an alias.
24482 (fwrapv-pointer): New option.
24483 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
24484 also for pointer types based on flag_wrapv_pointer.
24485 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
24486 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
24487 opts->x_flag_wrapv got set.
24488 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
24489 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
24490 POINTER_TYPE_OVERFLOW_UNDEFINED.
24491 * match.pd: Likewise in address comparison pattern.
24492 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
24494 2018-01-15 Richard Biener <rguenther@suse.de>
24497 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
24498 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
24499 Reset type names to their identifier if their TYPE_DECL doesn't
24500 have linkage (and thus is used for ODR and devirt).
24501 (save_debug_info_for_decl): Remove.
24502 (save_debug_info_for_type): Likewise.
24503 (add_tree_to_fld_list): Adjust.
24504 * tree-pretty-print.c (dump_generic_node): Make dumping of
24505 type names more robust.
24507 2018-01-15 Richard Biener <rguenther@suse.de>
24509 * BASE-VER: Bump to 8.0.1.
24511 2018-01-14 Martin Sebor <msebor@redhat.com>
24514 * builtins.c (check_access): Avoid warning when the no-warning bit
24517 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
24519 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
24520 * ira-color (allocno_hard_regs_compare): Likewise.
24522 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
24525 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
24526 Use .pushsection/.popsection.
24528 2018-01-14 Martin Sebor <msebor@redhat.com>
24531 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
24533 2018-01-14 Jakub Jelinek <jakub@redhat.com>
24535 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
24536 entry from extra_headers.
24537 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
24538 extra_headers, make the list bitwise identical to the i?86-*-* one.
24540 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24542 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
24543 -mcmodel=large with -mindirect-branch=thunk,
24544 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
24545 -mfunction-return=thunk-extern.
24546 * doc/invoke.texi: Document -mcmodel=large is incompatible with
24547 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
24548 -mfunction-return=thunk and -mfunction-return=thunk-extern.
24550 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24552 * config/i386/i386.c (print_reg): Print the name of the full
24553 integer register without '%'.
24554 (ix86_print_operand): Handle 'V'.
24555 * doc/extend.texi: Document 'V' modifier.
24557 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24559 * config/i386/constraints.md (Bs): Disallow memory operand for
24560 -mindirect-branch-register.
24562 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24563 (GOT_memory_operand): Likewise.
24564 (call_insn_operand): Likewise.
24565 (sibcall_insn_operand): Likewise.
24566 (GOT32_symbol_operand): Likewise.
24567 * config/i386/i386.md (indirect_jump): Call convert_memory_address
24568 for -mindirect-branch-register.
24569 (tablejump): Likewise.
24570 (*sibcall_memory): Likewise.
24571 (*sibcall_value_memory): Likewise.
24572 Disallow peepholes of indirect call and jump via memory for
24573 -mindirect-branch-register.
24574 (*call_pop): Replace m with Bw.
24575 (*call_value_pop): Likewise.
24576 (*sibcall_pop_memory): Replace m with Bs.
24577 * config/i386/i386.opt (mindirect-branch-register): New option.
24578 * doc/invoke.texi: Document -mindirect-branch-register option.
24580 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24582 * config/i386/i386-protos.h (ix86_output_function_return): New.
24583 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
24584 set function_return_type.
24585 (indirect_thunk_name): Add ret_p to indicate thunk for function
24587 (output_indirect_thunk_function): Pass false to
24588 indirect_thunk_name.
24589 (ix86_output_indirect_branch_via_reg): Likewise.
24590 (ix86_output_indirect_branch_via_push): Likewise.
24591 (output_indirect_thunk_function): Create alias for function
24592 return thunk if regno < 0.
24593 (ix86_output_function_return): New function.
24594 (ix86_handle_fndecl_attribute): Handle function_return.
24595 (ix86_attribute_table): Add function_return.
24596 * config/i386/i386.h (machine_function): Add
24597 function_return_type.
24598 * config/i386/i386.md (simple_return_internal): Use
24599 ix86_output_function_return.
24600 (simple_return_internal_long): Likewise.
24601 * config/i386/i386.opt (mfunction-return=): New option.
24602 (indirect_branch): Mention -mfunction-return=.
24603 * doc/extend.texi: Document function_return function attribute.
24604 * doc/invoke.texi: Document -mfunction-return= option.
24606 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24608 * config/i386/i386-opts.h (indirect_branch): New.
24609 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
24610 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
24611 with local indirect jump when converting indirect call and jump.
24612 (ix86_set_indirect_branch_type): New.
24613 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
24614 (indirectlabelno): New.
24615 (indirect_thunk_needed): Likewise.
24616 (indirect_thunk_bnd_needed): Likewise.
24617 (indirect_thunks_used): Likewise.
24618 (indirect_thunks_bnd_used): Likewise.
24619 (INDIRECT_LABEL): Likewise.
24620 (indirect_thunk_name): Likewise.
24621 (output_indirect_thunk): Likewise.
24622 (output_indirect_thunk_function): Likewise.
24623 (ix86_output_indirect_branch_via_reg): Likewise.
24624 (ix86_output_indirect_branch_via_push): Likewise.
24625 (ix86_output_indirect_branch): Likewise.
24626 (ix86_output_indirect_jmp): Likewise.
24627 (ix86_code_end): Call output_indirect_thunk_function if needed.
24628 (ix86_output_call_insn): Call ix86_output_indirect_branch if
24630 (ix86_handle_fndecl_attribute): Handle indirect_branch.
24631 (ix86_attribute_table): Add indirect_branch.
24632 * config/i386/i386.h (machine_function): Add indirect_branch_type
24633 and has_local_indirect_jump.
24634 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
24636 (tablejump): Likewise.
24637 (*indirect_jump): Use ix86_output_indirect_jmp.
24638 (*tablejump_1): Likewise.
24639 (simple_return_indirect_internal): Likewise.
24640 * config/i386/i386.opt (mindirect-branch=): New option.
24641 (indirect_branch): New.
24644 (thunk-inline): Likewise.
24645 (thunk-extern): Likewise.
24646 * doc/extend.texi: Document indirect_branch function attribute.
24647 * doc/invoke.texi: Document -mindirect-branch= option.
24649 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
24652 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
24654 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
24656 * ipa-inline.c (want_inline_small_function_p): Return false if
24657 inlining has already failed with CIF_FINAL_ERROR.
24658 (update_caller_keys): Call want_inline_small_function_p before
24660 (update_callee_keys): Likewise.
24662 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
24664 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
24666 (rs6000_quadword_masked_address_p): Likewise.
24667 (quad_aligned_load_p): Likewise.
24668 (quad_aligned_store_p): Likewise.
24669 (const_load_sequence_p): Add comment to describe the outer-most loop.
24670 (mimic_memory_attributes_and_flags): New function.
24671 (rs6000_gen_stvx): Likewise.
24672 (replace_swapped_aligned_store): Likewise.
24673 (rs6000_gen_lvx): Likewise.
24674 (replace_swapped_aligned_load): Likewise.
24675 (replace_swapped_load_constant): Capitalize argument name in
24676 comment describing this function.
24677 (rs6000_analyze_swaps): Add a third pass to search for vector loads
24678 and stores that access quad-word aligned addresses and replace
24679 with stvx or lvx instructions when appropriate.
24680 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
24681 New function prototype.
24682 (rs6000_quadword_masked_address_p): Likewise.
24683 (rs6000_gen_lvx): Likewise.
24684 (rs6000_gen_stvx): Likewise.
24685 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
24686 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
24687 when memory address is aligned.
24688 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
24689 this split to select lvx instruction when memory address is aligned.
24690 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
24691 instruction when memory address is aligned.
24692 (*vsx_le_perm_load_v16qi): Likewise.
24693 (four unnamed splitters): Modify to select the stvx instruction
24694 when memory is aligned.
24696 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
24698 * predict.c (determine_unlikely_bbs): Handle correctly BBs
24699 which appears in the queue multiple times.
24701 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24702 Alan Hayward <alan.hayward@arm.com>
24703 David Sherwood <david.sherwood@arm.com>
24705 * tree-vectorizer.h (vec_lower_bound): New structure.
24706 (_loop_vec_info): Add check_nonzero and lower_bounds.
24707 (LOOP_VINFO_CHECK_NONZERO): New macro.
24708 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
24709 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
24710 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
24711 fields. Make seg_len the distance travelled, not including the
24713 (dr_direction_indicator): Declare.
24714 (dr_zero_step_indicator): Likewise.
24715 (dr_known_forward_stride_p): Likewise.
24716 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
24718 (runtime_alias_check_p): Allow runtime alias checks with
24720 (operator ==): Compare access_size and align.
24721 (prune_runtime_alias_test_list): Rework for new distinction between
24722 the access_size and seg_len.
24723 (create_intersect_range_checks_index): Likewise. Cope with polynomial
24725 (get_segment_min_max): New function.
24726 (create_intersect_range_checks): Use it.
24727 (dr_step_indicator): New function.
24728 (dr_direction_indicator): Likewise.
24729 (dr_zero_step_indicator): Likewise.
24730 (dr_known_forward_stride_p): Likewise.
24731 * tree-loop-distribution.c (data_ref_segment_size): Return
24732 DR_STEP * (niters - 1).
24733 (compute_alias_check_pairs): Update call to the dr_with_seg_len
24735 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24736 (vect_preserves_scalar_order_p): New function, split out from...
24737 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
24738 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24739 (vect_vfa_access_size): New function.
24740 (vect_vfa_align): Likewise.
24741 (vect_compile_time_alias): Take access_size_a and access_b arguments.
24742 (dump_lower_bound): New function.
24743 (vect_check_lower_bound): Likewise.
24744 (vect_small_gap_p): Likewise.
24745 (vectorizable_with_step_bound_p): Likewise.
24746 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24747 depencies if the vectorization factor is 1. Convert the checks
24748 for nonzero steps into checks on the bounds of DR_STEP. Try using
24749 a bunds check for variable steps if the minimum required step is
24750 relatively small. Update calls to the dr_with_seg_len
24751 constructor and to vect_compile_time_alias.
24752 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24754 (vect_loop_versioning): Call it.
24755 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24757 (vect_estimate_min_profitable_iters): Account for any bounds checks.
24759 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24760 Alan Hayward <alan.hayward@arm.com>
24761 David Sherwood <david.sherwood@arm.com>
24763 * doc/sourcebuild.texi (vect_scatter_store): Document.
24764 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24766 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24768 * genopinit.c (main): Add supports_vec_scatter_store and
24769 supports_vec_scatter_store_cached to target_optabs.
24770 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24771 IFN_MASK_SCATTER_STORE.
24772 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24774 * internal-fn.h (internal_store_fn_p): Declare.
24775 (internal_fn_stored_value_index): Likewise.
24776 * internal-fn.c (scatter_store_direct): New macro.
24777 (expand_scatter_store_optab_fn): New function.
24778 (direct_scatter_store_optab_supported_p): New macro.
24779 (internal_store_fn_p): New function.
24780 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24781 IFN_MASK_SCATTER_STORE.
24782 (internal_fn_mask_index): Likewise.
24783 (internal_fn_stored_value_index): New function.
24784 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24785 for scatter stores.
24786 * optabs-query.h (supports_vec_scatter_store_p): Declare.
24787 * optabs-query.c (supports_vec_scatter_store_p): New function.
24788 * tree-vectorizer.h (vect_get_store_rhs): Declare.
24789 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24790 true for scatter stores.
24791 (vect_gather_scatter_fn_p): Handle scatter stores too.
24792 (vect_check_gather_scatter): Consider using scatter stores if
24793 supports_vec_scatter_store_p.
24794 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24795 scatter stores too.
24796 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24797 internal_fn_stored_value_index.
24798 (check_load_store_masking): Handle scatter stores too.
24799 (vect_get_store_rhs): Make public.
24800 (vectorizable_call): Use internal_store_fn_p.
24801 (vectorizable_store): Handle scatter store internal functions.
24802 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24803 when deciding whether the end of the group has been reached.
24804 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24805 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24806 (mask_scatter_store<mode>): New insns.
24808 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24809 Alan Hayward <alan.hayward@arm.com>
24810 David Sherwood <david.sherwood@arm.com>
24812 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24813 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24814 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24816 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24817 Use vect_truncate_gather_scatter_offset if we can't treat the
24818 operation as a normal gather load or scatter store.
24819 (get_group_load_store_type): Take the gather_scatter_info
24820 as argument. Try using a gather load or scatter store for
24821 single-element groups.
24822 (get_load_store_type): Update calls to get_group_load_store_type
24823 and vect_use_strided_gather_scatters_p.
24825 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24826 Alan Hayward <alan.hayward@arm.com>
24827 David Sherwood <david.sherwood@arm.com>
24829 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24830 optional tree argument.
24831 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24833 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24834 but continue to use the current value as a fallback.
24835 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24836 to compare the updates.
24837 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24838 (get_load_store_type): Use it when handling a strided access.
24839 (vect_get_strided_load_store_ops): New function.
24840 (vect_get_data_ptr_increment): Likewise.
24841 (vectorizable_load): Handle strided gather loads. Always pass
24842 a step to vect_create_data_ref_ptr and bump_vector_ptr.
24844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24845 Alan Hayward <alan.hayward@arm.com>
24846 David Sherwood <david.sherwood@arm.com>
24848 * doc/md.texi (gather_load@var{m}): Document.
24849 (mask_gather_load@var{m}): Likewise.
24850 * genopinit.c (main): Add supports_vec_gather_load and
24851 supports_vec_gather_load_cached to target_optabs.
24852 * optabs-tree.c (init_tree_optimization_optabs): Use
24853 ggc_cleared_alloc to allocate target_optabs.
24854 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24855 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24857 * internal-fn.h (internal_load_fn_p): Declare.
24858 (internal_gather_scatter_fn_p): Likewise.
24859 (internal_fn_mask_index): Likewise.
24860 (internal_gather_scatter_fn_supported_p): Likewise.
24861 * internal-fn.c (gather_load_direct): New macro.
24862 (expand_gather_load_optab_fn): New function.
24863 (direct_gather_load_optab_supported_p): New macro.
24864 (direct_internal_fn_optab): New function.
24865 (internal_load_fn_p): Likewise.
24866 (internal_gather_scatter_fn_p): Likewise.
24867 (internal_fn_mask_index): Likewise.
24868 (internal_gather_scatter_fn_supported_p): Likewise.
24869 * optabs-query.c (supports_at_least_one_mode_p): New function.
24870 (supports_vec_gather_load_p): Likewise.
24871 * optabs-query.h (supports_vec_gather_load_p): Declare.
24872 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24873 and memory_type field.
24874 (NUM_PATTERNS): Bump to 15.
24875 * tree-vect-data-refs.c: Include internal-fn.h.
24876 (vect_gather_scatter_fn_p): New function.
24877 (vect_describe_gather_scatter_call): Likewise.
24878 (vect_check_gather_scatter): Try using internal functions for
24879 gather loads. Recognize existing calls to a gather load function.
24880 (vect_analyze_data_refs): Consider using gather loads if
24881 supports_vec_gather_load_p.
24882 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24883 (vect_get_gather_scatter_offset_type): Likewise.
24884 (vect_convert_mask_for_vectype): Likewise.
24885 (vect_add_conversion_to_patterm): Likewise.
24886 (vect_try_gather_scatter_pattern): Likewise.
24887 (vect_recog_gather_scatter_pattern): New pattern recognizer.
24888 (vect_vect_recog_func_ptrs): Add it.
24889 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24890 internal_fn_mask_index and internal_gather_scatter_fn_p.
24891 (check_load_store_masking): Take the gather_scatter_info as an
24892 argument and handle gather loads.
24893 (vect_get_gather_scatter_ops): New function.
24894 (vectorizable_call): Check internal_load_fn_p.
24895 (vectorizable_load): Likewise. Handle gather load internal
24897 (vectorizable_store): Update call to check_load_store_masking.
24898 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24899 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24900 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24901 (aarch64_gather_scale_operand_d): New predicates.
24902 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24903 (mask_gather_load<mode>): New insns.
24905 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24906 Alan Hayward <alan.hayward@arm.com>
24907 David Sherwood <david.sherwood@arm.com>
24909 * optabs.def (fold_left_plus_optab): New optab.
24910 * doc/md.texi (fold_left_plus_@var{m}): Document.
24911 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24912 * internal-fn.c (fold_left_direct): Define.
24913 (expand_fold_left_optab_fn): Likewise.
24914 (direct_fold_left_optab_supported_p): Likewise.
24915 * fold-const-call.c (fold_const_fold_left): New function.
24916 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24917 * tree-parloops.c (valid_reduction_p): New function.
24918 (gather_scalar_reductions): Use it.
24919 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24920 (vect_finish_replace_stmt): Declare.
24921 * tree-vect-loop.c (fold_left_reduction_fn): New function.
24922 (needs_fold_left_reduction_p): New function, split out from...
24923 (vect_is_simple_reduction): ...here. Accept reductions that
24924 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24925 (vect_force_simple_reduction): Also store the reduction type in
24926 the assignment's STMT_VINFO_REDUC_TYPE.
24927 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24928 (merge_with_identity): New function.
24929 (vect_expand_fold_left): Likewise.
24930 (vectorize_fold_left_reduction): Likewise.
24931 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
24932 scalar phi in place for it. Check for target support and reject
24933 cases that would reassociate the operation. Defer the transform
24934 phase to vectorize_fold_left_reduction.
24935 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24936 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24937 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24939 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24941 * tree-if-conv.c (predicate_mem_writes): Remove redundant
24942 call to ifc_temp_var.
24944 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24945 Alan Hayward <alan.hayward@arm.com>
24946 David Sherwood <david.sherwood@arm.com>
24948 * target.def (legitimize_address_displacement): Take the original
24949 offset as a poly_int.
24950 * targhooks.h (default_legitimize_address_displacement): Update
24952 * targhooks.c (default_legitimize_address_displacement): Likewise.
24953 * doc/tm.texi: Regenerate.
24954 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24955 as an argument, moving assert of ad->disp == ad->disp_term to...
24956 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
24957 Try calling targetm.legitimize_address_displacement before expanding
24958 the address rather than afterwards, and adjust for the new interface.
24959 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24960 Match the new hook interface. Handle SVE addresses.
24961 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24962 new hook interface.
24964 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24966 * Makefile.in (OBJS): Add early-remat.o.
24967 * target.def (select_early_remat_modes): New hook.
24968 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24969 * doc/tm.texi: Regenerate.
24970 * targhooks.h (default_select_early_remat_modes): Declare.
24971 * targhooks.c (default_select_early_remat_modes): New function.
24972 * timevar.def (TV_EARLY_REMAT): New timevar.
24973 * passes.def (pass_early_remat): New pass.
24974 * tree-pass.h (make_pass_early_remat): Declare.
24975 * early-remat.c: New file.
24976 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24978 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24980 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24981 Alan Hayward <alan.hayward@arm.com>
24982 David Sherwood <david.sherwood@arm.com>
24984 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24985 vfm1 with a bound_epilog parameter.
24986 (vect_do_peeling): Update calls accordingly, and move the prologue
24987 call earlier in the function. Treat the base bound_epilog as 0 for
24988 fully-masked loops and retain vf - 1 for other loops. Add 1 to
24989 this base when peeling for gaps.
24990 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24991 with fully-masked loops.
24992 (vect_estimate_min_profitable_iters): Handle the single peeled
24993 iteration in that case.
24995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24996 Alan Hayward <alan.hayward@arm.com>
24997 David Sherwood <david.sherwood@arm.com>
24999 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25000 single-element interleaving even if the size is not a power of 2.
25001 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25002 accesses for single-element interleaving if the group size is
25005 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25006 Alan Hayward <alan.hayward@arm.com>
25007 David Sherwood <david.sherwood@arm.com>
25009 * doc/md.texi (fold_extract_last_@var{m}): Document.
25010 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25011 * optabs.def (fold_extract_last_optab): New optab.
25012 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25013 * internal-fn.c (fold_extract_direct): New macro.
25014 (expand_fold_extract_optab_fn): Likewise.
25015 (direct_fold_extract_optab_supported_p): Likewise.
25016 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25017 * tree-vect-loop.c (vect_model_reduction_cost): Handle
25018 EXTRACT_LAST_REDUCTION.
25019 (get_initial_def_for_reduction): Do not create an initial vector
25020 for EXTRACT_LAST_REDUCTION reductions.
25021 (vectorizable_reduction): Leave the scalar phi in place for
25022 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
25023 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
25024 epilogue code for EXTRACT_LAST_REDUCTION and defer the
25025 transform phase to vectorizable_condition.
25026 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25028 (vect_finish_stmt_generation): ...here.
25029 (vect_finish_replace_stmt): New function.
25030 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25031 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25033 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25035 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25036 Alan Hayward <alan.hayward@arm.com>
25037 David Sherwood <david.sherwood@arm.com>
25039 * doc/md.texi (extract_last_@var{m}): Document.
25040 * optabs.def (extract_last_optab): New optab.
25041 * internal-fn.def (EXTRACT_LAST): New internal function.
25042 * internal-fn.c (cond_unary_direct): New macro.
25043 (expand_cond_unary_optab_fn): Likewise.
25044 (direct_cond_unary_optab_supported_p): Likewise.
25045 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25046 loops using EXTRACT_LAST.
25047 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25048 (extract_last_<mode>): ...this optab.
25049 (vec_extract<mode><Vel>): Update accordingly.
25051 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25052 Alan Hayward <alan.hayward@arm.com>
25053 David Sherwood <david.sherwood@arm.com>
25055 * target.def (empty_mask_is_expensive): New hook.
25056 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25057 * doc/tm.texi: Regenerate.
25058 * targhooks.h (default_empty_mask_is_expensive): Declare.
25059 * targhooks.c (default_empty_mask_is_expensive): New function.
25060 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25061 if the target says that empty masks are expensive.
25062 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25064 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25066 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25067 Alan Hayward <alan.hayward@arm.com>
25068 David Sherwood <david.sherwood@arm.com>
25070 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25071 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25072 (vect_use_loop_mask_for_alignment_p): New function.
25073 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25074 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25075 niters_skip argument. Make sure that the first niters_skip elements
25076 of the first iteration are inactive.
25077 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25078 Update call to vect_set_loop_masks_directly.
25079 (get_misalign_in_elems): New function, split out from...
25080 (vect_gen_prolog_loop_niters): ...here.
25081 (vect_update_init_of_dr): Take a code argument that specifies whether
25082 the adjustment should be added or subtracted.
25083 (vect_update_init_of_drs): Likewise.
25084 (vect_prepare_for_masked_peels): New function.
25085 (vect_do_peeling): Skip prologue peeling if we're using a mask
25086 instead. Update call to vect_update_inits_of_drs.
25087 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25089 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25090 alignment. Do not include the number of peeled iterations in
25091 the minimum threshold in that case.
25092 (vectorizable_induction): Adjust the start value down by
25093 LOOP_VINFO_MASK_SKIP_NITERS iterations.
25094 (vect_transform_loop): Call vect_prepare_for_masked_peels.
25095 Take the number of skipped iterations into account when calculating
25097 * tree-vect-stmts.c (vect_gen_while_not): New function.
25099 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25100 Alan Hayward <alan.hayward@arm.com>
25101 David Sherwood <david.sherwood@arm.com>
25103 * doc/sourcebuild.texi (vect_fully_masked): Document.
25104 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25105 default value to 0.
25106 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25108 (vect_analyze_loop_2): ...here. Don't check the vectorization
25109 factor against the number of loop iterations if the loop is
25112 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25113 Alan Hayward <alan.hayward@arm.com>
25114 David Sherwood <david.sherwood@arm.com>
25116 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25117 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25118 (dump_groups): Update accordingly.
25119 (iv_use::mem_type): New member variable.
25120 (address_p): New function.
25121 (record_use): Add a mem_type argument and initialize the new
25123 (record_group_use): Add a mem_type argument. Use address_p.
25124 Remove obsolete null checks of base_object. Update call to record_use.
25125 (find_interesting_uses_op): Update call to record_group_use.
25126 (find_interesting_uses_cond): Likewise.
25127 (find_interesting_uses_address): Likewise.
25128 (get_mem_type_for_internal_fn): New function.
25129 (find_address_like_use): Likewise.
25130 (find_interesting_uses_stmt): Try find_address_like_use before
25131 calling find_interesting_uses_op.
25132 (addr_offset_valid_p): Use the iv mem_type field as the type
25133 of the addressed memory.
25134 (add_autoinc_candidates): Likewise.
25135 (get_address_cost): Likewise.
25136 (split_small_address_groups_p): Use address_p.
25137 (split_address_groups): Likewise.
25138 (add_iv_candidate_for_use): Likewise.
25139 (autoinc_possible_for_pair): Likewise.
25140 (rewrite_groups): Likewise.
25141 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25142 (determine_group_iv_cost): Update after split of USE_ADDRESS.
25143 (get_alias_ptr_type_for_ptr_address): New function.
25144 (rewrite_use_address): Rewrite address uses in calls that were
25145 identified by find_address_like_use.
25147 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25148 Alan Hayward <alan.hayward@arm.com>
25149 David Sherwood <david.sherwood@arm.com>
25151 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25153 * gimple-expr.h (is_gimple_addressable: Likewise.
25154 * gimple-expr.c (is_gimple_address): Likewise.
25155 * internal-fn.c (expand_call_mem_ref): New function.
25156 (expand_mask_load_optab_fn): Use it.
25157 (expand_mask_store_optab_fn): Likewise.
25159 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25160 Alan Hayward <alan.hayward@arm.com>
25161 David Sherwood <david.sherwood@arm.com>
25163 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25164 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25165 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25166 (cond_umax@var{mode}): Document.
25167 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25168 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25169 (cond_umin_optab, cond_umax_optab): New optabs.
25170 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25171 (COND_IOR, COND_XOR): New internal functions.
25172 * internal-fn.h (get_conditional_internal_fn): Declare.
25173 * internal-fn.c (cond_binary_direct): New macro.
25174 (expand_cond_binary_optab_fn): Likewise.
25175 (direct_cond_binary_optab_supported_p): Likewise.
25176 (get_conditional_internal_fn): New function.
25177 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25178 Cope with reduction statements that are vectorized as calls rather
25180 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25181 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25182 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25183 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25184 (UNSPEC_COND_EOR): New unspecs.
25185 (optab): Add mappings for them.
25186 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25187 (sve_int_op, sve_fp_op): New int attributes.
25189 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25190 Alan Hayward <alan.hayward@arm.com>
25191 David Sherwood <david.sherwood@arm.com>
25193 * optabs.def (while_ult_optab): New optab.
25194 * doc/md.texi (while_ult@var{m}@var{n}): Document.
25195 * internal-fn.def (WHILE_ULT): New internal function.
25196 * internal-fn.h (direct_internal_fn_supported_p): New override
25197 that takes two types as argument.
25198 * internal-fn.c (while_direct): New macro.
25199 (expand_while_optab_fn): New function.
25200 (convert_optab_supported_p): Likewise.
25201 (direct_while_optab_supported_p): New macro.
25202 * wide-int.h (wi::udiv_ceil): New function.
25203 * tree-vectorizer.h (rgroup_masks): New structure.
25204 (vec_loop_masks): New typedef.
25205 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25206 and fully_masked_p.
25207 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25208 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25209 (vect_max_vf): New function.
25210 (slpeel_make_loop_iterate_ntimes): Delete.
25211 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25212 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25213 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25214 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25215 internal-fn.h, stor-layout.h and optabs-query.h.
25216 (vect_set_loop_mask): New function.
25217 (add_preheader_seq): Likewise.
25218 (add_header_seq): Likewise.
25219 (interleave_supported_p): Likewise.
25220 (vect_maybe_permute_loop_masks): Likewise.
25221 (vect_set_loop_masks_directly): Likewise.
25222 (vect_set_loop_condition_masked): Likewise.
25223 (vect_set_loop_condition_unmasked): New function, split out from
25224 slpeel_make_loop_iterate_ntimes.
25225 (slpeel_make_loop_iterate_ntimes): Rename to..
25226 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
25227 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25228 (vect_do_peeling): Update call accordingly.
25229 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25231 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25232 mask_compare_type, can_fully_mask_p and fully_masked_p.
25233 (release_vec_loop_masks): New function.
25234 (_loop_vec_info): Use it to free the loop masks.
25235 (can_produce_all_loop_masks_p): New function.
25236 (vect_get_max_nscalars_per_iter): Likewise.
25237 (vect_verify_full_masking): Likewise.
25238 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25239 retries, and free the mask rgroups before retrying. Check loop-wide
25240 reasons for disallowing fully-masked loops. Make the final decision
25241 about whether use a fully-masked loop or not.
25242 (vect_estimate_min_profitable_iters): Do not assume that peeling
25243 for the number of iterations will be needed for fully-masked loops.
25244 (vectorizable_reduction): Disable fully-masked loops.
25245 (vectorizable_live_operation): Likewise.
25246 (vect_halve_mask_nunits): New function.
25247 (vect_double_mask_nunits): Likewise.
25248 (vect_record_loop_mask): Likewise.
25249 (vect_get_loop_mask): Likewise.
25250 (vect_transform_loop): Handle the case in which the final loop
25251 iteration might handle a partial vector. Call vect_set_loop_condition
25252 instead of slpeel_make_loop_iterate_ntimes.
25253 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25254 (check_load_store_masking): New function.
25255 (prepare_load_store_mask): Likewise.
25256 (vectorizable_store): Handle fully-masked loops.
25257 (vectorizable_load): Likewise.
25258 (supportable_widening_operation): Use vect_halve_mask_nunits for
25260 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25261 (vect_gen_while): New function.
25262 * config/aarch64/aarch64.md (umax<mode>3): New expander.
25263 (aarch64_uqdec<mode>): New insn.
25265 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25266 Alan Hayward <alan.hayward@arm.com>
25267 David Sherwood <david.sherwood@arm.com>
25269 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25270 (reduc_xor_scal_optab): New optabs.
25271 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25272 (reduc_xor_scal_@var{m}): Document.
25273 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25274 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25275 internal functions.
25276 * fold-const-call.c (fold_const_call): Handle them.
25277 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25278 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25279 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25280 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25281 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25282 (UNSPEC_XORV): New unspecs.
25283 (optab): Add entries for them.
25284 (BITWISEV): New int iterator.
25285 (bit_reduc_op): New int attributes.
25287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25288 Alan Hayward <alan.hayward@arm.com>
25289 David Sherwood <david.sherwood@arm.com>
25291 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
25292 * internal-fn.def (VEC_SHL_INSERT): New internal function.
25293 * optabs.def (vec_shl_insert_optab): New optab.
25294 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
25295 (duplicate_and_interleave): Likewise.
25296 * tree-vect-loop.c: Include internal-fn.h.
25297 (neutral_op_for_slp_reduction): New function, split out from
25298 get_initial_defs_for_reduction.
25299 (get_initial_def_for_reduction): Handle option 2 for variable-length
25300 vectors by loading the neutral value into a vector and then shifting
25301 the initial value into element 0.
25302 (get_initial_defs_for_reduction): Replace the code argument with
25303 the neutral value calculated by neutral_op_for_slp_reduction.
25304 Use gimple_build_vector for constant-length vectors.
25305 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
25306 but the first group_size elements have a neutral value.
25307 Use duplicate_and_interleave otherwise.
25308 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
25309 Update call to get_initial_defs_for_reduction. Handle SLP
25310 reductions for variable-length vectors by creating one vector
25311 result for each scalar result, with the elements associated
25312 with other scalar results stubbed out with the neutral value.
25313 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
25314 Require IFN_VEC_SHL_INSERT for double reductions on
25315 variable-length vectors, or SLP reductions that have
25316 a neutral value. Require can_duplicate_and_interleave_p
25317 support for variable-length unchained SLP reductions if there
25318 is no neutral value, such as for MIN/MAX reductions. Also require
25319 the number of vector elements to be a multiple of the number of
25320 SLP statements when doing variable-length unchained SLP reductions.
25321 Update call to vect_create_epilog_for_reduction.
25322 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
25323 and remove initial values.
25324 (duplicate_and_interleave): Make public.
25325 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
25326 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
25328 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25329 Alan Hayward <alan.hayward@arm.com>
25330 David Sherwood <david.sherwood@arm.com>
25332 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
25333 (can_duplicate_and_interleave_p): New function.
25334 (vect_get_and_check_slp_defs): Take the vector of statements
25335 rather than just the current one. Remove excess parentheses.
25336 Restriction rejectinon of vect_constant_def and vect_external_def
25337 for variable-length vectors to boolean types, or types for which
25338 can_duplicate_and_interleave_p is false.
25339 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
25340 (duplicate_and_interleave): New function.
25341 (vect_get_constant_vectors): Use gimple_build_vector for
25342 constant-length vectors and suitable variable-length constant
25343 vectors. Use duplicate_and_interleave for other variable-length
25344 vectors. Don't defer the update when inserting new statements.
25346 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25347 Alan Hayward <alan.hayward@arm.com>
25348 David Sherwood <david.sherwood@arm.com>
25350 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
25351 min_profitable_iters doesn't go negative.
25353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25354 Alan Hayward <alan.hayward@arm.com>
25355 David Sherwood <david.sherwood@arm.com>
25357 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
25358 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
25359 * optabs.def (vec_mask_load_lanes_optab): New optab.
25360 (vec_mask_store_lanes_optab): Likewise.
25361 * internal-fn.def (MASK_LOAD_LANES): New internal function.
25362 (MASK_STORE_LANES): Likewise.
25363 * internal-fn.c (mask_load_lanes_direct): New macro.
25364 (mask_store_lanes_direct): Likewise.
25365 (expand_mask_load_optab_fn): Handle masked operations.
25366 (expand_mask_load_lanes_optab_fn): New macro.
25367 (expand_mask_store_optab_fn): Handle masked operations.
25368 (expand_mask_store_lanes_optab_fn): New macro.
25369 (direct_mask_load_lanes_optab_supported_p): Likewise.
25370 (direct_mask_store_lanes_optab_supported_p): Likewise.
25371 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
25373 (vect_load_lanes_supported): Likewise.
25374 * tree-vect-data-refs.c (strip_conversion): New function.
25375 (can_group_stmts_p): Likewise.
25376 (vect_analyze_data_ref_accesses): Use it instead of checking
25377 for a pair of assignments.
25378 (vect_store_lanes_supported): Take a masked_p parameter.
25379 (vect_load_lanes_supported): Likewise.
25380 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
25381 vect_store_lanes_supported and vect_load_lanes_supported.
25382 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
25383 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
25384 parameter. Don't allow gaps for masked accesses.
25385 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
25386 and vect_load_lanes_supported.
25387 (get_load_store_type): Take a masked_p parameter and update
25388 call to get_group_load_store_type.
25389 (vectorizable_store): Update call to get_load_store_type.
25390 Handle IFN_MASK_STORE_LANES.
25391 (vectorizable_load): Update call to get_load_store_type.
25392 Handle IFN_MASK_LOAD_LANES.
25394 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25395 Alan Hayward <alan.hayward@arm.com>
25396 David Sherwood <david.sherwood@arm.com>
25398 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
25400 * config/aarch64/aarch64-protos.h
25401 (aarch64_sve_struct_memory_operand_p): Declare.
25402 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
25403 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
25404 (VPRED, vpred): Handle SVE structure modes.
25405 * config/aarch64/constraints.md (Utx): New constraint.
25406 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
25407 (aarch64_sve_struct_nonimmediate_operand): New predicates.
25408 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
25409 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
25410 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
25411 structure modes. Split into pieces after RA.
25412 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
25413 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
25415 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
25416 SVE structure modes.
25417 (aarch64_classify_address): Likewise.
25418 (sizetochar): Move earlier in file.
25419 (aarch64_print_operand): Handle SVE register lists.
25420 (aarch64_array_mode): New function.
25421 (aarch64_sve_struct_memory_operand_p): Likewise.
25422 (TARGET_ARRAY_MODE): Redefine.
25424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25425 Alan Hayward <alan.hayward@arm.com>
25426 David Sherwood <david.sherwood@arm.com>
25428 * target.def (array_mode): New target hook.
25429 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
25430 * doc/tm.texi: Regenerate.
25431 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
25432 * hooks.c (hook_optmode_mode_uhwi_none): New function.
25433 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
25434 targetm.array_mode.
25435 * stor-layout.c (mode_for_array): Likewise. Support polynomial
25438 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25439 Alan Hayward <alan.hayward@arm.com>
25440 David Sherwood <david.sherwood@arm.com>
25442 * fold-const.c (fold_binary_loc): Check the argument types
25443 rather than the result type when testing for a vector operation.
25445 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25447 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
25448 * doc/tm.texi: Regenerate.
25450 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25451 Alan Hayward <alan.hayward@arm.com>
25452 David Sherwood <david.sherwood@arm.com>
25454 * doc/invoke.texi (-msve-vector-bits=): Document new option.
25455 (sve): Document new AArch64 extension.
25456 * doc/md.texi (w): Extend the description of the AArch64
25457 constraint to include SVE vectors.
25458 (Upl, Upa): Document new AArch64 predicate constraints.
25459 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
25461 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
25462 (msve-vector-bits=): New option.
25463 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
25464 SVE when these are disabled.
25465 (sve): New extension.
25466 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
25467 modes. Adjust their number of units based on aarch64_sve_vg.
25468 (MAX_BITSIZE_MODE_ANY_MODE): Define.
25469 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
25470 aarch64_addr_query_type.
25471 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
25472 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
25473 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
25474 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
25475 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
25476 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
25477 (aarch64_simd_imm_zero_p): Delete.
25478 (aarch64_check_zero_based_sve_index_immediate): Declare.
25479 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25480 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25481 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25482 (aarch64_sve_float_mul_immediate_p): Likewise.
25483 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25484 rather than an rtx.
25485 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
25486 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
25487 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
25488 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
25489 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
25490 (aarch64_regmode_natural_size): Likewise.
25491 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
25492 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
25494 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
25495 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
25496 for VG and the SVE predicate registers.
25497 (V_ALIASES): Add a "z"-prefixed alias.
25498 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
25499 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
25500 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
25501 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
25502 (REG_CLASS_NAMES): Add entries for them.
25503 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
25504 and the predicate registers.
25505 (aarch64_sve_vg): Declare.
25506 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
25507 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
25508 (REGMODE_NATURAL_SIZE): Define.
25509 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
25511 * config/aarch64/aarch64.c: Include cfgrtl.h.
25512 (simd_immediate_info): Add a constructor for series vectors,
25513 and an associated step field.
25514 (aarch64_sve_vg): New variable.
25515 (aarch64_dbx_register_number): Handle VG and the predicate registers.
25516 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
25517 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
25518 (VEC_ANY_DATA, VEC_STRUCT): New constants.
25519 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
25520 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
25521 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
25522 (aarch64_get_mask_mode): New functions.
25523 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
25524 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
25525 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
25526 predicate modes and predicate registers. Explicitly restrict
25527 GPRs to modes of 16 bytes or smaller. Only allow FP registers
25528 to store a vector mode if it is recognized by
25529 aarch64_classify_vector_mode.
25530 (aarch64_regmode_natural_size): New function.
25531 (aarch64_hard_regno_caller_save_mode): Return the original mode
25533 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
25534 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
25535 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
25536 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
25538 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
25539 does not overlap dest if the function is frame-related. Handle
25541 (aarch64_split_add_offset): New function.
25542 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
25543 them aarch64_add_offset.
25544 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
25545 and update call to aarch64_sub_sp.
25546 (aarch64_add_cfa_expression): New function.
25547 (aarch64_expand_prologue): Pass extra temporary registers to the
25548 functions above. Handle the case in which we need to emit new
25549 DW_CFA_expressions for registers that were originally saved
25550 relative to the stack pointer, but now have to be expressed
25551 relative to the frame pointer.
25552 (aarch64_output_mi_thunk): Pass extra temporary registers to the
25554 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
25555 IP0 and IP1 values for SVE frames.
25556 (aarch64_expand_vec_series): New function.
25557 (aarch64_expand_sve_widened_duplicate): Likewise.
25558 (aarch64_expand_sve_const_vector): Likewise.
25559 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
25560 Handle SVE constants. Use emit_move_insn to move a force_const_mem
25561 into the register, rather than emitting a SET directly.
25562 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
25563 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
25564 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
25565 (offset_9bit_signed_scaled_p): New functions.
25566 (aarch64_replicate_bitmask_imm): New function.
25567 (aarch64_bitmask_imm): Use it.
25568 (aarch64_cannot_force_const_mem): Reject expressions involving
25569 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
25570 (aarch64_classify_index): Handle SVE indices, by requiring
25571 a plain register index with a scale that matches the element size.
25572 (aarch64_classify_address): Handle SVE addresses. Assert that
25573 the mode of the address is VOIDmode or an integer mode.
25574 Update call to aarch64_classify_symbol.
25575 (aarch64_classify_symbolic_expression): Update call to
25576 aarch64_classify_symbol.
25577 (aarch64_const_vec_all_in_range_p): New function.
25578 (aarch64_print_vector_float_operand): Likewise.
25579 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
25580 "vN" for FP registers with SVE modes. Handle (const ...) vectors
25581 and the FP immediates 1.0 and 0.5.
25582 (aarch64_print_address_internal): Handle SVE addresses.
25583 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
25584 (aarch64_regno_regclass): Handle predicate registers.
25585 (aarch64_secondary_reload): Handle big-endian reloads of SVE
25587 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
25588 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
25589 (aarch64_convert_sve_vector_bits): New function.
25590 (aarch64_override_options): Use it to handle -msve-vector-bits=.
25591 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25592 rather than an rtx.
25593 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
25594 Handle SVE vector and predicate modes. Accept VL-based constants
25595 that need only one temporary register, and VL offsets that require
25596 no temporary registers.
25597 (aarch64_conditional_register_usage): Mark the predicate registers
25598 as fixed if SVE isn't available.
25599 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
25600 Return true for SVE vector and predicate modes.
25601 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
25602 rather than an unsigned int. Handle SVE modes.
25603 (aarch64_preferred_simd_mode): Update call accordingly. Handle
25605 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
25607 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25608 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25609 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25610 (aarch64_sve_float_mul_immediate_p): New functions.
25611 (aarch64_sve_valid_immediate): New function.
25612 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
25613 Explicitly reject structure modes. Check for INDEX constants.
25614 Handle PTRUE and PFALSE constants.
25615 (aarch64_check_zero_based_sve_index_immediate): New function.
25616 (aarch64_simd_imm_zero_p): Delete.
25617 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
25618 vector modes. Accept constants in the range of CNT[BHWD].
25619 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
25620 ask for an Advanced SIMD mode.
25621 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
25622 (aarch64_simd_vector_alignment): Handle SVE predicates.
25623 (aarch64_vectorize_preferred_vector_alignment): New function.
25624 (aarch64_simd_vector_alignment_reachable): Use it instead of
25626 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
25627 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
25629 (MAX_VECT_LEN): Delete.
25630 (expand_vec_perm_d): Add a vec_flags field.
25631 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
25632 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
25633 (aarch64_evpc_ext): Don't apply a big-endian lane correction
25635 (aarch64_evpc_rev): Rename to...
25636 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
25637 (aarch64_evpc_rev_global): New function.
25638 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
25639 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
25641 (aarch64_evpc_sve_tbl): New function.
25642 (aarch64_expand_vec_perm_const_1): Update after rename of
25643 aarch64_evpc_rev. Handle SVE permutes too, trying
25644 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
25645 than aarch64_evpc_tbl.
25646 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
25647 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
25648 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
25649 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
25650 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
25651 (aarch64_expand_sve_vcond): New functions.
25652 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
25653 of aarch64_vector_mode_p.
25654 (aarch64_dwarf_poly_indeterminate_value): New function.
25655 (aarch64_compute_pressure_classes): Likewise.
25656 (aarch64_can_change_mode_class): Likewise.
25657 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
25658 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
25659 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
25660 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
25661 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
25662 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
25663 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
25664 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
25666 (Dn, Dl, Dr): Accept const as well as const_vector.
25667 (Dz): Likewise. Compare against CONST0_RTX.
25668 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
25669 of "vector" where appropriate.
25670 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
25671 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
25672 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
25673 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
25674 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
25675 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
25676 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
25677 (v_int_equiv): Extend to SVE modes.
25678 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
25680 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
25681 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
25682 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
25683 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
25684 (SVE_COND_FP_CMP): New int iterators.
25685 (perm_hilo): Handle the new unpack unspecs.
25686 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
25688 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
25689 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
25690 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
25691 (aarch64_equality_operator, aarch64_constant_vector_operand)
25692 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
25693 (aarch64_sve_nonimmediate_operand): Likewise.
25694 (aarch64_sve_general_operand): Likewise.
25695 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
25696 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
25697 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
25698 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
25699 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
25700 (aarch64_sve_float_arith_immediate): Likewise.
25701 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
25702 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
25703 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
25704 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
25705 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
25706 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
25707 (aarch64_sve_float_arith_operand): Likewise.
25708 (aarch64_sve_float_arith_with_sub_operand): Likewise.
25709 (aarch64_sve_float_mul_operand): Likewise.
25710 (aarch64_sve_vec_perm_operand): Likewise.
25711 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
25712 (aarch64_mov_operand): Accept const_poly_int and const_vector.
25713 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
25714 as well as const_vector.
25715 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
25716 in file. Use CONST0_RTX and CONSTM1_RTX.
25717 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
25718 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
25719 Use aarch64_simd_imm_zero.
25720 * config/aarch64/aarch64-sve.md: New file.
25721 * config/aarch64/aarch64.md: Include it.
25722 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
25723 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
25724 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
25725 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
25726 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
25727 (sve): New attribute.
25728 (enabled): Disable instructions with the sve attribute unless
25730 (movqi, movhi): Pass CONST_POLY_INT operaneds through
25731 aarch64_expand_mov_immediate.
25732 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25733 CNT[BHSD] immediates.
25734 (movti): Split CONST_POLY_INT moves into two halves.
25735 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25736 Split additions that need a temporary here if the destination
25737 is the stack pointer.
25738 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25739 (*add<mode>3_poly_1): New instruction.
25740 (set_clobber_cc): New expander.
25742 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25744 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25745 parameter and use it instead of GET_MODE_SIZE (innermode). Use
25746 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25747 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25748 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
25749 Change innermode from fixed_mode_size to machine_mode.
25750 (simplify_subreg): Update call accordingly. Handle a constant-sized
25751 subreg of a variable-length CONST_VECTOR.
25753 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25754 Alan Hayward <alan.hayward@arm.com>
25755 David Sherwood <david.sherwood@arm.com>
25757 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25758 (add_offset_to_base): New function, split out from...
25759 (create_mem_ref): ...here. When handling a scale other than 1,
25760 check first whether the address is valid without the offset.
25761 Add it into the base if so, leaving the index and scale as-is.
25763 2018-01-12 Jakub Jelinek <jakub@redhat.com>
25766 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25767 fold_for_warn before checking if arg2 is INTEGER_CST.
25769 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
25771 * config/rs6000/predicates.md (load_multiple_operation): Delete.
25772 (store_multiple_operation): Delete.
25773 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25774 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25775 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25776 guarded by TARGET_STRING.
25777 (rs6000_output_load_multiple): Delete.
25778 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25779 OPTION_MASK_STRING / TARGET_STRING handling.
25780 (print_operand) <'N', 'O'>: Add comment that these are unused now.
25781 (const rs6000_opt_masks) <"string">: Change mask to 0.
25782 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25783 (MASK_STRING): Delete.
25784 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25786 (load_multiple): Delete.
25793 (store_multiple): Delete.
25800 (movmemsi_8reg): Delete.
25801 (corresponding unnamed define_insn): Delete.
25802 (movmemsi_6reg): Delete.
25803 (corresponding unnamed define_insn): Delete.
25804 (movmemsi_4reg): Delete.
25805 (corresponding unnamed define_insn): Delete.
25806 (movmemsi_2reg): Delete.
25807 (corresponding unnamed define_insn): Delete.
25808 (movmemsi_1reg): Delete.
25809 (corresponding unnamed define_insn): Delete.
25810 * config/rs6000/rs6000.opt (mno-string): New.
25811 (mstring): Replace by deprecation warning stub.
25812 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25814 2018-01-12 Jakub Jelinek <jakub@redhat.com>
25816 * regrename.c (regrename_do_replace): If replacing the same
25817 reg multiple times, try to reuse last created gen_raw_REG.
25820 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25821 main to workaround a bug in GDB.
25823 2018-01-12 Tom de Vries <tom@codesourcery.com>
25826 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25828 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
25830 PR rtl-optimization/80481
25831 * ira-color.c (get_cap_member): New function.
25832 (allocnos_conflict_by_live_ranges_p): Use it.
25833 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25834 (setup_slot_coalesced_allocno_live_ranges): Ditto.
25836 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
25839 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25840 (*saddl_se_1): Ditto.
25841 (*ssubsi_1): Ditto.
25842 (*ssubl_se_1): Ditto.
25844 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25846 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25847 rather than wi::to_widest for DR_INITs.
25848 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25849 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25850 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25852 (vect_analyze_group_access_1): Note that here.
25854 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25856 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25857 polynomial type sizes.
25859 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25861 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25862 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25863 (gimple_add_tmp_var): Likewise.
25865 2018-01-12 Martin Liska <mliska@suse.cz>
25867 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25868 (gimple_alloc_sizes): Likewise.
25869 (dump_gimple_statistics): Use PRIu64 in printf format.
25870 * gimple.h: Change uint64_t to int.
25872 2018-01-12 Martin Liska <mliska@suse.cz>
25874 * tree-core.h: Use uint64_t instead of int.
25875 * tree.c (tree_node_counts): Likewise.
25876 (tree_node_sizes): Likewise.
25877 (dump_tree_statistics): Use PRIu64 in printf format.
25879 2018-01-12 Martin Liska <mliska@suse.cz>
25881 * Makefile.in: As qsort_chk is implemented in vec.c, add
25882 vec.o to linkage of gencfn-macros.
25883 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25884 passing the info to record_node_allocation_statistics.
25885 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25887 * ggc-common.c (struct ggc_usage): Add operator== and use
25888 it in operator< and compare function.
25889 * mem-stats.h (struct mem_usage): Likewise.
25890 * vec.c (struct vec_usage): Remove operator< and compare
25891 function. Can be simply inherited.
25893 2018-01-12 Martin Jambor <mjambor@suse.cz>
25896 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25897 * tree-ssa-math-opts.c: Include domwalk.h.
25898 (convert_mult_to_fma_1): New function.
25899 (fma_transformation_info): New type.
25900 (fma_deferring_state): Likewise.
25901 (cancel_fma_deferring): New function.
25902 (result_of_phi): Likewise.
25903 (last_fma_candidate_feeds_initial_phi): Likewise.
25904 (convert_mult_to_fma): Added deferring logic, split actual
25905 transformation to convert_mult_to_fma_1.
25906 (math_opts_dom_walker): New type.
25907 (math_opts_dom_walker::after_dom_children): New method, body moved
25908 here from pass_optimize_widening_mul::execute, added deferring logic
25910 (pass_optimize_widening_mul::execute): Moved most of code to
25911 math_opts_dom_walker::after_dom_children.
25912 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25913 * config/i386/i386.c (ix86_option_override_internal): Added
25914 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25916 2018-01-12 Richard Biener <rguenther@suse.de>
25919 * dwarf2out.c (gen_variable_die): Do not reset old_die for
25920 inline instance vars.
25922 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
25925 * config/rx/rx.c (rx_is_restricted_memory_address):
25926 Handle SUBREG case.
25928 2018-01-12 Richard Biener <rguenther@suse.de>
25930 PR tree-optimization/80846
25931 * target.def (split_reduction): New target hook.
25932 * targhooks.c (default_split_reduction): New function.
25933 * targhooks.h (default_split_reduction): Declare.
25934 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25935 target requests first reduce vectors by combining low and high
25937 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25938 (get_vectype_for_scalar_type_and_size): Export.
25939 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25940 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25941 * doc/tm.texi: Regenerate.
25942 * config/i386/i386.c (ix86_split_reduction): Implement
25943 TARGET_VECTORIZE_SPLIT_REDUCTION.
25945 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25948 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25949 in PIC mode except for TARGET_VXWORKS_RTP.
25950 * config/sparc/sparc.c: Include cfgrtl.h.
25951 (TARGET_INIT_PIC_REG): Define.
25952 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25953 (sparc_pic_register_p): New predicate.
25954 (sparc_legitimate_address_p): Use it.
25955 (sparc_legitimize_pic_address): Likewise.
25956 (sparc_delegitimize_address): Likewise.
25957 (sparc_mode_dependent_address_p): Likewise.
25958 (gen_load_pcrel_sym): Remove 4th parameter.
25959 (load_got_register): Adjust call to above. Remove obsolete stuff.
25960 (sparc_expand_prologue): Do not call load_got_register here.
25961 (sparc_flat_expand_prologue): Likewise.
25962 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25963 (sparc_use_pseudo_pic_reg): New function.
25964 (sparc_init_pic_reg): Likewise.
25965 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25966 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25968 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
25970 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25971 Add item for branch_cost.
25973 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25975 PR rtl-optimization/83565
25976 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25977 not extend the result to a larger mode for rotate operations.
25978 (num_sign_bit_copies1): Likewise.
25980 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25983 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25985 Use values-Xc.o for -pedantic.
25986 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25988 2018-01-12 Martin Liska <mliska@suse.cz>
25991 * ipa-devirt.c (final_warning_record::grow_type_warnings):
25993 (possible_polymorphic_call_targets): Use it.
25994 (ipa_devirt): Likewise.
25996 2018-01-12 Martin Liska <mliska@suse.cz>
25998 * profile-count.h (enum profile_quality): Use 0 as invalid
25999 enum value of profile_quality.
26001 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
26003 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26004 -mext-string options.
26006 2018-01-12 Richard Biener <rguenther@suse.de>
26008 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26009 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26010 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26012 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26014 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26016 * configure.ac (--with-long-double-format): Add support for the
26017 configuration option to change the default long double format on
26019 * config.gcc (powerpc*-linux*-*): Likewise.
26020 * configure: Regenerate.
26021 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26022 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26023 used without modification.
26025 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26027 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26028 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26029 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26030 MISC_BUILTIN_SPEC_BARRIER.
26031 (rs6000_init_builtins): Likewise.
26032 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26034 (speculation_barrier): New define_insn.
26035 * doc/extend.texi: Document __builtin_speculation_barrier.
26037 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26040 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26041 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26042 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26044 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
26045 integral modes instead of "ss" and "sd".
26046 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26047 vectors with 32-bit and 64-bit elements.
26048 (vecdupssescalarmodesuffix): New mode attribute.
26049 (vec_dup<mode>): Use it.
26051 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
26054 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26055 frame if argument is passed on stack.
26057 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26060 * ree.c (combine_reaching_defs): Optimize also
26061 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26062 reg2=any_extend(exp); reg1=reg2;, formatting fix.
26064 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26066 PR middle-end/83189
26067 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26069 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26071 PR middle-end/83718
26072 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26073 after they are computed.
26075 2018-01-11 Bin Cheng <bin.cheng@arm.com>
26077 PR tree-optimization/83695
26078 * gimple-loop-linterchange.cc
26079 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26080 reset cached scev information after interchange.
26081 (pass_linterchange::execute): Remove call to scev_reset_htab.
26083 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26085 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26086 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26087 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26088 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26089 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26090 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26091 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26092 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26093 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26094 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26095 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26096 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26097 (V_lane_reg): Likewise.
26098 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26100 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26101 (vfmal_lane_low<mode>_intrinsic,
26102 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26103 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26104 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26105 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26106 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26107 vfmsl_lane_high<mode>_intrinsic): New define_insns.
26109 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26111 * config/arm/arm-cpus.in (fp16fml): New feature.
26112 (ALL_SIMD): Add fp16fml.
26113 (armv8.2-a): Add fp16fml as an option.
26114 (armv8.3-a): Likewise.
26115 (armv8.4-a): Add fp16fml as part of fp16.
26116 * config/arm/arm.h (TARGET_FP16FML): Define.
26117 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26119 * config/arm/arm-modes.def (V2HF): Define.
26120 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26121 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26122 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26123 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26124 vfmsl_low, vfmsl_high): New set of builtins.
26125 * config/arm/iterators.md (PLUSMINUS): New code iterator.
26126 (vfml_op): New code attribute.
26127 (VFMLHALVES): New int iterator.
26128 (VFML, VFMLSEL): New mode attributes.
26129 (V_reg): Define mapping for V2HF.
26130 (V_hi, V_lo): New mode attributes.
26131 (VF_constraint): Likewise.
26132 (vfml_half, vfml_half_selector): New int attributes.
26133 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26135 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26136 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26138 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26139 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26140 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26141 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
26143 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26144 Document new effective target and option set.
26146 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26148 * config/arm/arm-cpus.in (armv8_4): New feature.
26149 (ARMv8_4a): New fgroup.
26150 (armv8.4-a): New arch.
26151 * config/arm/arm-tables.opt: Regenerate.
26152 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26153 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26154 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26155 Add matching rules for -march=armv8.4-a and extensions.
26156 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26158 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
26161 * config/rx/rx.md (BW): New mode attribute.
26162 (sync_lock_test_and_setsi): Add mode suffix to insn output.
26164 2018-01-11 Richard Biener <rguenther@suse.de>
26166 PR tree-optimization/83435
26167 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26168 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26169 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26171 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26172 Alan Hayward <alan.hayward@arm.com>
26173 David Sherwood <david.sherwood@arm.com>
26175 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26177 (aarch64_classify_address): Initialize it. Track polynomial offsets.
26178 (aarch64_print_address_internal): Use it to check for a zero offset.
26180 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26181 Alan Hayward <alan.hayward@arm.com>
26182 David Sherwood <david.sherwood@arm.com>
26184 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26185 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26186 Return a poly_int64 rather than a HOST_WIDE_INT.
26187 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26188 rather than a HOST_WIDE_INT.
26189 * config/aarch64/aarch64.h (aarch64_frame): Protect with
26190 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
26191 hard_fp_offset, frame_size, initial_adjust, callee_offset and
26192 final_offset from HOST_WIDE_INT to poly_int64.
26193 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26194 to_constant when getting the number of units in an Advanced SIMD
26196 (aarch64_builtin_vectorized_function): Check for a constant number
26198 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26200 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26201 attribute instead of GET_MODE_NUNITS.
26202 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26203 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26204 GET_MODE_SIZE for fixed-size registers.
26205 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26206 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26207 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26208 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26209 (aarch64_print_operand, aarch64_print_address_internal)
26210 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26211 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26212 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26213 Handle polynomial GET_MODE_SIZE.
26214 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
26215 wider than SImode without modification.
26216 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26217 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26218 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26219 passing and returning SVE modes.
26220 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26221 rather than GEN_INT.
26222 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26223 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26224 (aarch64_allocate_and_probe_stack_space): Likewise.
26225 (aarch64_layout_frame): Cope with polynomial offsets.
26226 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26227 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
26228 polynomial offsets.
26229 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26230 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26231 poly_int64 rather than a HOST_WIDE_INT.
26232 (aarch64_get_separate_components, aarch64_process_components)
26233 (aarch64_expand_prologue, aarch64_expand_epilogue)
26234 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26235 (aarch64_anchor_offset): New function, split out from...
26236 (aarch64_legitimize_address): ...here.
26237 (aarch64_builtin_vectorization_cost): Handle polynomial
26238 TYPE_VECTOR_SUBPARTS.
26239 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26241 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26242 number of elements from the PARALLEL rather than the mode.
26243 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26244 rather than GET_MODE_BITSIZE.
26245 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26246 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26247 (aarch64_expand_vec_perm_const_1): Handle polynomial
26248 d->perm.length () and d->perm elements.
26249 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
26250 Apply to_constant to d->perm elements.
26251 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26252 polynomial CONST_VECTOR_NUNITS.
26253 (aarch64_move_pointer): Take amount as a poly_int64 rather
26255 (aarch64_progress_pointer): Avoid temporary variable.
26256 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26257 the mode attribute instead of GET_MODE.
26259 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26260 Alan Hayward <alan.hayward@arm.com>
26261 David Sherwood <david.sherwood@arm.com>
26263 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26264 x exists before using it.
26265 (aarch64_add_constant_internal): Rename to...
26266 (aarch64_add_offset_1): ...this. Replace regnum with separate
26267 src and dest rtxes. Handle the case in which they're different,
26268 including when the offset is zero. Replace scratchreg with an rtx.
26269 Use 2 additions if there is no spare register into which we can
26270 move a 16-bit constant.
26271 (aarch64_add_constant): Delete.
26272 (aarch64_add_offset): Replace reg with separate src and dest
26273 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
26274 Use aarch64_add_offset_1.
26275 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26276 an rtx rather than an int. Take the delta as a poly_int64
26277 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
26278 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26279 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26280 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26281 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26282 and aarch64_add_sp.
26283 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26284 aarch64_add_constant.
26286 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26288 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
26289 Use scalar_float_mode.
26291 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26293 * config/aarch64/aarch64-simd.md
26294 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
26295 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
26296 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
26297 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
26298 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
26299 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
26300 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
26301 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
26302 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
26303 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
26305 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26308 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
26309 targ_options->x_arm_arch_string is non NULL.
26311 2018-01-11 Tamar Christina <tamar.christina@arm.com>
26313 * config/aarch64/aarch64.h
26314 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
26316 2018-01-11 Sudakshina Das <sudi.das@arm.com>
26319 * expmed.c (emit_store_flag_force): Swap if const op0
26320 and change VOIDmode to mode of op0.
26322 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26324 PR rtl-optimization/83761
26325 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
26326 than bytes to mode_for_size.
26328 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
26330 PR middle-end/83189
26331 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
26332 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
26335 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
26337 PR middle-end/83575
26338 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
26339 when in layout mode.
26340 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
26341 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
26344 2018-01-10 Michael Collison <michael.collison@arm.com>
26346 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
26347 * config/aarch64/aarch64-option-extension.def: Add
26348 AARCH64_OPT_EXTENSION of 'fp16fml'.
26349 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26350 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
26351 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
26352 * config/aarch64/constraints.md (Ui7): New constraint.
26353 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
26354 (VFMLA_SEL_W): Ditto.
26357 (VFMLA16_LOW): New int iterator.
26358 (VFMLA16_HIGH): Ditto.
26359 (UNSPEC_FMLAL): New unspec.
26360 (UNSPEC_FMLSL): Ditto.
26361 (UNSPEC_FMLAL2): Ditto.
26362 (UNSPEC_FMLSL2): Ditto.
26363 (f16mac): New code attribute.
26364 * config/aarch64/aarch64-simd-builtins.def
26365 (aarch64_fmlal_lowv2sf): Ditto.
26366 (aarch64_fmlsl_lowv2sf): Ditto.
26367 (aarch64_fmlalq_lowv4sf): Ditto.
26368 (aarch64_fmlslq_lowv4sf): Ditto.
26369 (aarch64_fmlal_highv2sf): Ditto.
26370 (aarch64_fmlsl_highv2sf): Ditto.
26371 (aarch64_fmlalq_highv4sf): Ditto.
26372 (aarch64_fmlslq_highv4sf): Ditto.
26373 (aarch64_fmlal_lane_lowv2sf): Ditto.
26374 (aarch64_fmlsl_lane_lowv2sf): Ditto.
26375 (aarch64_fmlal_laneq_lowv2sf): Ditto.
26376 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
26377 (aarch64_fmlalq_lane_lowv4sf): Ditto.
26378 (aarch64_fmlsl_lane_lowv4sf): Ditto.
26379 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
26380 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
26381 (aarch64_fmlal_lane_highv2sf): Ditto.
26382 (aarch64_fmlsl_lane_highv2sf): Ditto.
26383 (aarch64_fmlal_laneq_highv2sf): Ditto.
26384 (aarch64_fmlsl_laneq_highv2sf): Ditto.
26385 (aarch64_fmlalq_lane_highv4sf): Ditto.
26386 (aarch64_fmlsl_lane_highv4sf): Ditto.
26387 (aarch64_fmlalq_laneq_highv4sf): Ditto.
26388 (aarch64_fmlsl_laneq_highv4sf): Ditto.
26389 * config/aarch64/aarch64-simd.md:
26390 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
26391 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26392 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
26393 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26394 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
26395 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
26396 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
26397 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
26398 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
26399 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
26400 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
26401 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
26402 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
26403 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
26404 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
26405 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
26406 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
26407 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
26408 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
26409 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
26410 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
26411 (vfmlsl_low_u32): Ditto.
26412 (vfmlalq_low_u32): Ditto.
26413 (vfmlslq_low_u32): Ditto.
26414 (vfmlal_high_u32): Ditto.
26415 (vfmlsl_high_u32): Ditto.
26416 (vfmlalq_high_u32): Ditto.
26417 (vfmlslq_high_u32): Ditto.
26418 (vfmlal_lane_low_u32): Ditto.
26419 (vfmlsl_lane_low_u32): Ditto.
26420 (vfmlal_laneq_low_u32): Ditto.
26421 (vfmlsl_laneq_low_u32): Ditto.
26422 (vfmlalq_lane_low_u32): Ditto.
26423 (vfmlslq_lane_low_u32): Ditto.
26424 (vfmlalq_laneq_low_u32): Ditto.
26425 (vfmlslq_laneq_low_u32): Ditto.
26426 (vfmlal_lane_high_u32): Ditto.
26427 (vfmlsl_lane_high_u32): Ditto.
26428 (vfmlal_laneq_high_u32): Ditto.
26429 (vfmlsl_laneq_high_u32): Ditto.
26430 (vfmlalq_lane_high_u32): Ditto.
26431 (vfmlslq_lane_high_u32): Ditto.
26432 (vfmlalq_laneq_high_u32): Ditto.
26433 (vfmlslq_laneq_high_u32): Ditto.
26434 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
26435 (AARCH64_FL_FOR_ARCH8_4): New.
26436 (AARCH64_ISA_F16FML): New ISA flag.
26437 (TARGET_F16FML): New feature flag for fp16fml.
26438 (doc/invoke.texi): Document new fp16fml option.
26440 2018-01-10 Michael Collison <michael.collison@arm.com>
26442 * config/aarch64/aarch64-builtins.c:
26443 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
26444 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26445 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
26446 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
26447 (AARCH64_ISA_SHA3): New ISA flag.
26448 (TARGET_SHA3): New feature flag for sha3.
26449 * config/aarch64/iterators.md (sha512_op): New int attribute.
26450 (CRYPTO_SHA512): New int iterator.
26451 (UNSPEC_SHA512H): New unspec.
26452 (UNSPEC_SHA512H2): Ditto.
26453 (UNSPEC_SHA512SU0): Ditto.
26454 (UNSPEC_SHA512SU1): Ditto.
26455 * config/aarch64/aarch64-simd-builtins.def
26456 (aarch64_crypto_sha512hqv2di): New builtin.
26457 (aarch64_crypto_sha512h2qv2di): Ditto.
26458 (aarch64_crypto_sha512su0qv2di): Ditto.
26459 (aarch64_crypto_sha512su1qv2di): Ditto.
26460 (aarch64_eor3qv8hi): Ditto.
26461 (aarch64_rax1qv2di): Ditto.
26462 (aarch64_xarqv2di): Ditto.
26463 (aarch64_bcaxqv8hi): Ditto.
26464 * config/aarch64/aarch64-simd.md:
26465 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
26466 (aarch64_crypto_sha512su0qv2di): Ditto.
26467 (aarch64_crypto_sha512su1qv2di): Ditto.
26468 (aarch64_eor3qv8hi): Ditto.
26469 (aarch64_rax1qv2di): Ditto.
26470 (aarch64_xarqv2di): Ditto.
26471 (aarch64_bcaxqv8hi): Ditto.
26472 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
26473 (vsha512h2q_u64): Ditto.
26474 (vsha512su0q_u64): Ditto.
26475 (vsha512su1q_u64): Ditto.
26476 (veor3q_u16): Ditto.
26477 (vrax1q_u64): Ditto.
26478 (vxarq_u64): Ditto.
26479 (vbcaxq_u16): Ditto.
26480 * config/arm/types.md (crypto_sha512): New type attribute.
26481 (crypto_sha3): Ditto.
26482 (doc/invoke.texi): Document new sha3 option.
26484 2018-01-10 Michael Collison <michael.collison@arm.com>
26486 * config/aarch64/aarch64-builtins.c:
26487 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
26488 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26489 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
26490 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
26491 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
26492 (AARCH64_ISA_SM4): New ISA flag.
26493 (TARGET_SM4): New feature flag for sm4.
26494 * config/aarch64/aarch64-simd-builtins.def
26495 (aarch64_sm3ss1qv4si): Ditto.
26496 (aarch64_sm3tt1aq4si): Ditto.
26497 (aarch64_sm3tt1bq4si): Ditto.
26498 (aarch64_sm3tt2aq4si): Ditto.
26499 (aarch64_sm3tt2bq4si): Ditto.
26500 (aarch64_sm3partw1qv4si): Ditto.
26501 (aarch64_sm3partw2qv4si): Ditto.
26502 (aarch64_sm4eqv4si): Ditto.
26503 (aarch64_sm4ekeyqv4si): Ditto.
26504 * config/aarch64/aarch64-simd.md:
26505 (aarch64_sm3ss1qv4si): Ditto.
26506 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
26507 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
26508 (aarch64_sm4eqv4si): Ditto.
26509 (aarch64_sm4ekeyqv4si): Ditto.
26510 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
26511 (sm3part_op): Ditto.
26512 (CRYPTO_SM3TT): Ditto.
26513 (CRYPTO_SM3PART): Ditto.
26514 (UNSPEC_SM3SS1): New unspec.
26515 (UNSPEC_SM3TT1A): Ditto.
26516 (UNSPEC_SM3TT1B): Ditto.
26517 (UNSPEC_SM3TT2A): Ditto.
26518 (UNSPEC_SM3TT2B): Ditto.
26519 (UNSPEC_SM3PARTW1): Ditto.
26520 (UNSPEC_SM3PARTW2): Ditto.
26521 (UNSPEC_SM4E): Ditto.
26522 (UNSPEC_SM4EKEY): Ditto.
26523 * config/aarch64/constraints.md (Ui2): New constraint.
26524 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
26525 * config/arm/types.md (crypto_sm3): New type attribute.
26526 (crypto_sm4): Ditto.
26527 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
26528 (vsm3tt1aq_u32): Ditto.
26529 (vsm3tt1bq_u32): Ditto.
26530 (vsm3tt2aq_u32): Ditto.
26531 (vsm3tt2bq_u32): Ditto.
26532 (vsm3partw1q_u32): Ditto.
26533 (vsm3partw2q_u32): Ditto.
26534 (vsm4eq_u32): Ditto.
26535 (vsm4ekeyq_u32): Ditto.
26536 (doc/invoke.texi): Document new sm4 option.
26538 2018-01-10 Michael Collison <michael.collison@arm.com>
26540 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
26541 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
26542 (AARCH64_FL_FOR_ARCH8_4): New.
26543 (AARCH64_FL_V8_4): New flag.
26544 (doc/invoke.texi): Document new armv8.4-a option.
26546 2018-01-10 Michael Collison <michael.collison@arm.com>
26548 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26549 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
26550 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
26551 * config/aarch64/aarch64-option-extension.def: Add
26552 AARCH64_OPT_EXTENSION of 'sha2'.
26553 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
26554 (crypto): Disable sha2 and aes if crypto disabled.
26555 (crypto): Enable aes and sha2 if enabled.
26556 (simd): Disable sha2 and aes if simd disabled.
26557 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
26559 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
26560 (TARGET_SHA2): New feature flag for sha2.
26561 (TARGET_AES): New feature flag for aes.
26562 * config/aarch64/aarch64-simd.md:
26563 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
26564 conditional on TARGET_AES.
26565 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
26566 (aarch64_crypto_sha1hsi): Make pattern conditional
26568 (aarch64_crypto_sha1hv4si): Ditto.
26569 (aarch64_be_crypto_sha1hv4si): Ditto.
26570 (aarch64_crypto_sha1su1v4si): Ditto.
26571 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
26572 (aarch64_crypto_sha1su0v4si): Ditto.
26573 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
26574 (aarch64_crypto_sha256su0v4si): Ditto.
26575 (aarch64_crypto_sha256su1v4si): Ditto.
26576 (doc/invoke.texi): Document new aes and sha2 options.
26578 2018-01-10 Martin Sebor <msebor@redhat.com>
26580 PR tree-optimization/83781
26581 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
26584 2018-01-11 Martin Sebor <msebor@gmail.com>
26585 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26587 PR tree-optimization/83501
26588 PR tree-optimization/81703
26590 * tree-ssa-strlen.c (get_string_cst): Rename...
26591 (get_string_len): ...to this. Handle global constants.
26592 (handle_char_store): Adjust.
26594 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
26595 Jim Wilson <jimw@sifive.com>
26597 * config/riscv/riscv-protos.h (riscv_output_return): New.
26598 * config/riscv/riscv.c (struct machine_function): New naked_p field.
26599 (riscv_attribute_table, riscv_output_return),
26600 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
26601 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
26602 (riscv_compute_frame_info): Only compute frame->mask if not a naked
26604 (riscv_expand_prologue): Add early return for naked function.
26605 (riscv_expand_epilogue): Likewise.
26606 (riscv_function_ok_for_sibcall): Return false for naked function.
26607 (riscv_set_current_function): New.
26608 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
26609 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
26610 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
26611 * doc/extend.texi (RISC-V Function Attributes): New.
26613 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
26615 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
26616 check for 128-bit long double before checking TCmode.
26617 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
26618 128-bit long doubles before checking TFmode or TCmode.
26619 (FLOAT128_IBM_P): Likewise.
26621 2018-01-10 Martin Sebor <msebor@redhat.com>
26623 PR tree-optimization/83671
26624 * builtins.c (c_strlen): Unconditionally return zero for the empty
26626 Use -Warray-bounds for warnings.
26627 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
26628 for non-constant array indices with COMPONENT_REF, arrays of
26629 arrays, and pointers to arrays.
26630 (gimple_fold_builtin_strlen): Determine and set length range for
26631 non-constant character arrays.
26633 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
26635 PR middle-end/81897
26636 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
26639 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
26641 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
26643 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
26646 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
26647 VECTOR_MEM_ALTIVEC_OR_VSX_P.
26648 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
26649 indexed_or_indirect_operand predicate.
26650 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
26651 (*vsx_le_perm_load_v8hi): Likewise.
26652 (*vsx_le_perm_load_v16qi): Likewise.
26653 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
26654 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
26655 (*vsx_le_perm_store_v8hi): Likewise.
26656 (*vsx_le_perm_store_v16qi): Likewise.
26657 (eight unnamed splitters): Likewise.
26659 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
26661 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
26662 * config/rs6000/emmintrin.h: Likewise.
26663 * config/rs6000/mmintrin.h: Likewise.
26664 * config/rs6000/xmmintrin.h: Likewise.
26666 2018-01-10 David Malcolm <dmalcolm@redhat.com>
26669 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
26671 * tree.c (tree_nop_conversion): Return true for location wrapper
26673 (maybe_wrap_with_location): New function.
26674 (selftest::check_strip_nops): New function.
26675 (selftest::test_location_wrappers): New function.
26676 (selftest::tree_c_tests): Call it.
26677 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
26678 (maybe_wrap_with_location): New decl.
26679 (EXPR_LOCATION_WRAPPER_P): New macro.
26680 (location_wrapper_p): New inline function.
26681 (tree_strip_any_location_wrapper): New inline function.
26683 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
26686 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
26687 stack_realign_offset for the largest alignment of stack slot
26689 (ix86_find_max_used_stack_alignment): New function.
26690 (ix86_finalize_stack_frame_flags): Use it. Set
26691 max_used_stack_alignment if we don't realign stack.
26692 * config/i386/i386.h (machine_function): Add
26693 max_used_stack_alignment.
26695 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
26697 * config/arm/arm.opt (-mbranch-cost): New option.
26698 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
26701 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
26704 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
26705 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
26707 2018-01-10 Richard Biener <rguenther@suse.de>
26710 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
26711 early out so it also covers the case where we have a non-NULL
26714 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
26716 PR tree-optimization/83753
26717 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
26718 for non-strided grouped accesses if the number of elements is 1.
26720 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
26723 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
26724 * i386.h (TARGET_USE_GATHER): Define.
26725 * x86-tune.def (X86_TUNE_USE_GATHER): New.
26727 2018-01-10 Martin Liska <mliska@suse.cz>
26730 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26731 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26733 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26734 CLEANUP_NO_PARTITIONING is not set.
26736 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
26738 * doc/rtl.texi: Remove documentation of (const ...) wrappers
26739 for vectors, as a partial revert of r254296.
26740 * rtl.h (const_vec_p): Delete.
26741 (const_vec_duplicate_p): Don't test for vector CONSTs.
26742 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26743 * expmed.c (make_tree): Likewise.
26746 * common.md (E, F): Use CONSTANT_P instead of checking for
26748 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26749 checking for CONST_VECTOR.
26751 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26753 PR middle-end/83575
26754 * predict.c (force_edge_cold): Handle in more sane way edges
26755 with no prediction.
26757 2018-01-09 Carl Love <cel@us.ibm.com>
26759 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26761 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26762 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26763 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26764 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
26765 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26766 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
26767 * config/rs6000/rs6000-protos.h: Add extern defition for
26768 rs6000_generate_float2_double_code.
26769 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26771 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26772 (float2_v2df): Add define_expand.
26774 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
26777 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26778 op_mode in the force_to_mode call.
26780 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26782 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26783 instead of checking each element individually.
26784 (aarch64_evpc_uzp): Likewise.
26785 (aarch64_evpc_zip): Likewise.
26786 (aarch64_evpc_ext): Likewise.
26787 (aarch64_evpc_rev): Likewise.
26788 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26789 instead of checking each element individually. Return true without
26791 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26792 whether all selected elements come from the same input, instead of
26793 checking each element individually. Remove calls to gen_rtx_REG,
26794 start_sequence and end_sequence and instead assert that no rtl is
26797 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26799 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26800 order of HIGH and CONST checks.
26802 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26804 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26805 if the destination isn't an SSA_NAME.
26807 2018-01-09 Richard Biener <rguenther@suse.de>
26809 PR tree-optimization/83668
26810 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26812 (canonicalize_loop_form): ... here, renamed from ...
26813 (canonicalize_loop_closed_ssa_form): ... this and amended to
26814 swap successor edges for loop exit blocks to make us use
26815 the RPO order we need for initial schedule generation.
26817 2018-01-09 Joseph Myers <joseph@codesourcery.com>
26819 PR tree-optimization/64811
26820 * match.pd: When optimizing comparisons with Inf, avoid
26821 introducing or losing exceptions from comparisons with NaN.
26823 2018-01-09 Martin Liska <mliska@suse.cz>
26826 * asan.c (shadow_mem_size): Add gcc_assert.
26828 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
26830 Don't save registers in main().
26833 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26834 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26835 * config/avr/avr.c (avr_set_current_function): Don't error if
26836 naked, OS_task or OS_main are specified at the same time.
26837 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26839 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26841 * common/config/avr/avr-common.c (avr_option_optimization_table):
26842 Switch on -mmain-is-OS_task for optimizing compilations.
26844 2018-01-09 Richard Biener <rguenther@suse.de>
26846 PR tree-optimization/83572
26847 * graphite.c: Include cfganal.h.
26848 (graphite_transform_loops): Connect infinite loops to exit
26849 and remove fake edges at the end.
26851 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26853 * ipa-inline.c (edge_badness): Revert accidental checkin.
26855 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26858 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26859 symbols; not inline clones.
26861 2018-01-09 Jakub Jelinek <jakub@redhat.com>
26864 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26865 hard registers. Formatting fixes.
26867 PR preprocessor/83722
26868 * gcc.c (try_generate_repro): Pass
26869 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26870 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26873 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
26874 Kito Cheng <kito.cheng@gmail.com>
26876 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26877 (riscv_leaf_function_p): Delete.
26878 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26880 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26882 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26884 (do_ifelse): New function.
26885 (do_isel): New function.
26886 (do_sub3): New function.
26887 (do_add3): New function.
26888 (do_load_mask_compare): New function.
26889 (do_overlap_load_compare): New function.
26890 (expand_compare_loop): New function.
26891 (expand_block_compare): Call expand_compare_loop() when appropriate.
26892 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26893 option description.
26894 (-mblock-compare-inline-loop-limit): New option.
26896 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26899 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26900 Reverse order of second and third operands in first alternative.
26901 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26902 of first and second elements in UNSPEC_VPERMR vector.
26903 (altivec_expand_vec_perm_le): Likewise.
26905 2018-01-08 Jeff Law <law@redhat.com>
26907 PR rtl-optimizatin/81308
26908 * tree-switch-conversion.c (cfg_altered): New file scoped static.
26909 (process_switch): If group_case_labels makes a change, then set
26911 (pass_convert_switch::execute): If a switch is converted, then
26912 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
26914 PR rtl-optimization/81308
26915 * recog.c (split_all_insns): Conditionally cleanup the CFG after
26918 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
26920 PR target/83663 - Revert r255946
26921 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26922 generation for cases where splatting a value is not useful.
26923 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26924 across a vec_duplicate and a paradoxical subreg forming a vector
26925 mode to a vec_concat.
26927 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26929 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26930 -march=armv8.3-a variants.
26931 * config/arm/t-multilib: Likewise.
26932 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
26934 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26936 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26938 (cceq_ior_compare_complement): Give it a name so I can use it, and
26939 change boolean_or_operator predicate to boolean_operator so it can
26940 be used to generate a crand.
26941 (eqne): New code iterator.
26942 (bd/bd_neg): New code_attrs.
26943 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26944 a single define_insn.
26945 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26946 decrement (bdnzt/bdnzf/bdzt/bdzf).
26947 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26948 with the new names of the branch decrement patterns, and added the
26949 names of the branch decrement conditional patterns.
26951 2018-01-08 Richard Biener <rguenther@suse.de>
26953 PR tree-optimization/83563
26954 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26957 2018-01-08 Richard Biener <rguenther@suse.de>
26959 PR middle-end/83713
26960 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26962 2018-01-08 Richard Biener <rguenther@suse.de>
26964 PR tree-optimization/83685
26965 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26966 references to abnormals.
26968 2018-01-08 Richard Biener <rguenther@suse.de>
26971 * dwarf2out.c (output_indirect_strings): Handle empty
26972 skeleton_debug_str_hash.
26973 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26975 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26977 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26978 (emit_store_direct): Likewise.
26979 (arc_trampoline_adjust_address): Likewise.
26980 (arc_asm_trampoline_template): New function.
26981 (arc_initialize_trampoline): Use asm_trampoline_template.
26982 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26983 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26984 * config/arc/arc.md (flush_icache): Delete pattern.
26986 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26988 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26989 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26992 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26995 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26996 by not USED_FOR_TARGET.
26997 (make_pass_resolve_sw_modes): Likewise.
26999 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27001 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27004 2018-01-08 Richard Biener <rguenther@suse.de>
27006 PR middle-end/83580
27007 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27009 2018-01-08 Richard Biener <rguenther@suse.de>
27011 PR middle-end/83517
27012 * match.pd ((t * 2) / 2) -> t): Add missing :c.
27014 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
27016 PR middle-end/81897
27017 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27018 basic blocks with a small number of successors.
27019 (convert_control_dep_chain_into_preds): Improve handling of
27021 (dump_predicates): Split apart into...
27022 (dump_pred_chain): ...here...
27023 (dump_pred_info): ...and here.
27024 (can_one_predicate_be_invalidated_p): Add debugging printfs.
27025 (can_chain_union_be_invalidated_p): Improve check for invalidation
27027 (uninit_uses_cannot_happen): Avoid unnecessary if
27028 convert_control_dep_chain_into_preds yielded nothing.
27030 2018-01-06 Martin Sebor <msebor@redhat.com>
27032 PR tree-optimization/83640
27033 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27034 subtracting negative offset from size.
27035 (builtin_access::overlap): Adjust offset bounds of the access to fall
27036 within the size of the object if possible.
27038 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
27040 PR rtl-optimization/83699
27041 * expmed.c (extract_bit_field_1): Restrict the vector usage of
27042 extract_bit_field_as_subreg to cases in which the extracted
27043 value is also a vector.
27045 * lra-constraints.c (process_alt_operands): Test for the equivalence
27046 substitutions when detecting a possible reload cycle.
27048 2018-01-06 Jakub Jelinek <jakub@redhat.com>
27051 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27052 by default if flag_selective_schedling{,2}. Formatting fixes.
27054 PR rtl-optimization/83682
27055 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27056 if it has non-VECTOR_MODE element mode.
27057 (vec_duplicate_p): Likewise.
27059 PR middle-end/83694
27060 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27061 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27063 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27066 * config/i386/i386-builtin.def
27067 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27068 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27069 Require also OPTION_MASK_ISA_AVX512F in addition to
27070 OPTION_MASK_ISA_GFNI.
27071 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27072 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27073 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27074 to OPTION_MASK_ISA_GFNI.
27075 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27076 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27077 OPTION_MASK_ISA_AVX512BW.
27078 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27079 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27080 addition to OPTION_MASK_ISA_GFNI.
27081 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27082 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27083 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27084 to OPTION_MASK_ISA_GFNI.
27085 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27086 a requirement for all ISAs rather than any of them with a few
27088 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27090 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27091 bitmasks to be enabled with 3 exceptions, instead of requiring any
27092 enabled ISA with lots of exceptions.
27093 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27094 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27095 Change avx512bw in isa attribute to avx512f.
27096 * config/i386/sgxintrin.h: Add license boilerplate.
27097 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
27098 to __AVX512F__ and __AVX512VL to __AVX512VL__.
27099 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27100 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27102 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27103 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27104 temporarily sse2 rather than sse if not enabled already.
27107 * config/i386/sse.md (VI248_VLBW): Rename to ...
27108 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
27109 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27110 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27111 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27112 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27113 mode iterator instead of VI248_VLBW.
27115 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
27117 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27118 (record_modified): Skip clobbers; add debug output.
27119 (param_change_prob): Use sreal frequencies.
27121 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27123 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27124 punt for user-aligned variables.
27126 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27128 * tree-chrec.c (chrec_contains_symbols): Return true for
27131 2018-01-05 Sudakshina Das <sudi.das@arm.com>
27134 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27135 of (x|y) == x for BICS pattern.
27137 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27139 PR tree-optimization/83605
27140 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27141 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27144 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
27146 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27147 * config/epiphany/rtems.h: New file.
27149 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27150 Uros Bizjak <ubizjak@gmail.com>
27153 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27154 QIreg_operand instead of register_operand predicate.
27155 * config/i386/i386.c (ix86_rop_should_change_byte_p,
27156 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27157 comments instead of -fmitigate[-_]rop.
27159 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27162 * cgraphunit.c (symbol_table::compile): Switch to text_section
27163 before calling assembly_start debug hook.
27164 * run-rtl-passes.c (run_rtl_passes): Likewise.
27167 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27169 * tree-vrp.c (extract_range_from_binary_expr_1): Check
27170 range_int_cst_p rather than !symbolic_range_p before calling
27171 extract_range_from_multiplicative_op_1.
27173 2018-01-04 Jeff Law <law@redhat.com>
27175 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27176 redundant test in assertion.
27178 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27180 * doc/rtl.texi: Document machine_mode wrapper classes.
27182 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27184 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27185 using tree_to_uhwi.
27187 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27189 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27190 the VEC_PERM_EXPR fold to fail.
27192 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27195 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27196 to switched_sections.
27198 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27201 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27202 test for d.testing.
27204 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
27207 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27208 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27210 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27213 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27214 is BLKmode and bitpos not zero or mode change is needed.
27216 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27219 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27222 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
27225 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27226 instead of MULT rtx. Update all corresponding splitters.
27227 (*saddl_se): Ditto.
27228 (*ssub<modesuffix>): Ditto.
27229 (*ssubl_se): Ditto.
27230 (*cmp_sadd_di): Update split patterns.
27231 (*cmp_sadd_si): Ditto.
27232 (*cmp_sadd_sidi): Ditto.
27233 (*cmp_ssub_di): Ditto.
27234 (*cmp_ssub_si): Ditto.
27235 (*cmp_ssub_sidi): Ditto.
27236 * config/alpha/predicates.md (const23_operand): New predicate.
27237 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27238 Look for ASHIFT, not MULT inner operand.
27239 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27241 2018-01-04 Martin Liska <mliska@suse.cz>
27243 PR gcov-profile/83669
27244 * gcov.c (output_intermediate_file): Add version to intermediate
27246 * doc/gcov.texi: Document new field 'version' in intermediate
27247 file format. Fix location of '-k' option of gcov command.
27249 2018-01-04 Martin Liska <mliska@suse.cz>
27252 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27254 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27256 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27258 2018-01-03 Martin Sebor <msebor@redhat.com>
27260 PR tree-optimization/83655
27261 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27262 checking calls with invalid arguments.
27264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27266 * tree-vect-stmts.c (vect_get_store_rhs): New function.
27267 (vectorizable_mask_load_store): Delete.
27268 (vectorizable_call): Return false for masked loads and stores.
27269 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
27270 instead of gimple_assign_rhs1.
27271 (vectorizable_load): Handle IFN_MASK_LOAD.
27272 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27274 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27276 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27278 (vectorizable_mask_load_store): ...here.
27279 (vectorizable_load): ...and here.
27281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27283 * tree-vect-stmts.c (vect_build_all_ones_mask)
27284 (vect_build_zero_merge_argument): New functions, split out from...
27285 (vectorizable_load): ...here.
27287 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27289 * tree-vect-stmts.c (vect_check_store_rhs): New function,
27291 (vectorizable_mask_load_store): ...here.
27292 (vectorizable_store): ...and here.
27294 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27296 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
27298 (vectorizable_mask_load_store): ...here.
27300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27302 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
27303 (vect_model_store_cost): Take a vec_load_store_type instead of a
27305 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
27306 (vect_model_store_cost): Take a vec_load_store_type instead of a
27308 (vectorizable_mask_load_store): Update accordingly.
27309 (vectorizable_store): Likewise.
27310 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
27312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27314 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
27315 IFN_MASK_LOAD calls here rather than...
27316 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
27318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27319 Alan Hayward <alan.hayward@arm.com>
27320 David Sherwood <david.sherwood@arm.com>
27322 * expmed.c (extract_bit_field_1): For vector extracts,
27323 fall back to extract_bit_field_as_subreg if vec_extract
27326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27327 Alan Hayward <alan.hayward@arm.com>
27328 David Sherwood <david.sherwood@arm.com>
27330 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
27331 they are variable or constant sized.
27332 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
27333 slots for constant-sized data.
27335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27336 Alan Hayward <alan.hayward@arm.com>
27337 David Sherwood <david.sherwood@arm.com>
27339 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
27340 handling COND_EXPRs with boolean comparisons, try to find a better
27341 basis for the mask type than the boolean itself.
27343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27345 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
27346 is calculated and how it can be overridden.
27347 * genmodes.c (max_bitsize_mode_any_mode): New variable.
27348 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
27350 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
27353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27354 Alan Hayward <alan.hayward@arm.com>
27355 David Sherwood <david.sherwood@arm.com>
27357 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
27358 Remove the mode argument.
27359 (aarch64_simd_valid_immediate): Remove the mode and inverse
27361 * config/aarch64/iterators.md (bitsize): New iterator.
27362 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
27363 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
27364 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
27365 aarch64_simd_valid_immediate.
27366 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
27367 (aarch64_reg_or_bic_imm): Likewise.
27368 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
27369 with an insn_type enum and msl with a modifier_type enum.
27370 Replace element_width with a scalar_mode. Change the shift
27371 to unsigned int. Add constructors for scalar_float_mode and
27372 scalar_int_mode elements.
27373 (aarch64_vect_float_const_representable_p): Delete.
27374 (aarch64_can_const_movi_rtx_p)
27375 (aarch64_simd_scalar_immediate_valid_for_move)
27376 (aarch64_simd_make_constant): Update call to
27377 aarch64_simd_valid_immediate.
27378 (aarch64_advsimd_valid_immediate_hs): New function.
27379 (aarch64_advsimd_valid_immediate): Likewise.
27380 (aarch64_simd_valid_immediate): Remove mode and inverse
27381 arguments. Rewrite to use the above. Use const_vec_duplicate_p
27382 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
27383 and aarch64_float_const_representable_p on the result.
27384 (aarch64_output_simd_mov_immediate): Remove mode argument.
27385 Update call to aarch64_simd_valid_immediate and use of
27386 simd_immediate_info.
27387 (aarch64_output_scalar_simd_mov_immediate): Update call
27390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27391 Alan Hayward <alan.hayward@arm.com>
27392 David Sherwood <david.sherwood@arm.com>
27394 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
27395 (mode_nunits): Likewise CONST_MODE_NUNITS.
27396 * machmode.def (ADJUST_NUNITS): Document.
27397 * genmodes.c (mode_data::need_nunits_adj): New field.
27398 (blank_mode): Update accordingly.
27399 (adj_nunits): New variable.
27400 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
27402 (emit_mode_size_inline): Set need_bytesize_adj for all modes
27403 listed in adj_nunits.
27404 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
27405 listed in adj_nunits. Don't emit case statements for such modes.
27406 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
27407 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
27408 nothing if adj_nunits is nonnull.
27409 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
27410 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
27411 (emit_mode_fbit): Update use of print_maybe_const_decl.
27412 (emit_move_size): Likewise. Treat the array as non-const
27414 (emit_mode_adjustments): Handle adj_nunits.
27416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27418 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
27419 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
27420 (VECTOR_MODES): Use it.
27421 (make_vector_modes): Take the prefix as an argument.
27423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27424 Alan Hayward <alan.hayward@arm.com>
27425 David Sherwood <david.sherwood@arm.com>
27427 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
27428 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
27429 for MODE_VECTOR_BOOL.
27430 * machmode.def (VECTOR_BOOL_MODE): Document.
27431 * genmodes.c (VECTOR_BOOL_MODE): New macro.
27432 (make_vector_bool_mode): New function.
27433 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
27435 * lto-streamer-in.c (lto_input_mode_table): Likewise.
27436 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
27438 * stor-layout.c (int_mode_for_mode): Likewise.
27439 * tree.c (build_vector_type_for_mode): Likewise.
27440 * varasm.c (output_constant_pool_2): Likewise.
27441 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
27442 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
27443 for MODE_VECTOR_BOOL.
27444 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
27445 of mode class checks.
27446 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
27447 instead of a list of mode class checks.
27448 (expand_vector_scalar_condition): Likewise.
27449 (type_for_widest_vector_mode): Handle BImode as an inner mode.
27451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27452 Alan Hayward <alan.hayward@arm.com>
27453 David Sherwood <david.sherwood@arm.com>
27455 * machmode.h (mode_size): Change from unsigned short to
27457 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
27458 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27459 or if measurement_type is not polynomial.
27460 (fixed_size_mode::includes_p): Check for constant-sized modes.
27461 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
27462 return a poly_uint16 rather than an unsigned short.
27463 (emit_mode_size): Change the type of mode_size from unsigned short
27464 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
27465 (emit_mode_adjustments): Cope with polynomial vector sizes.
27466 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27468 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27470 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
27471 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
27472 * caller-save.c (setup_save_areas): Likewise.
27473 (replace_reg_with_saved_mem): Likewise.
27474 * calls.c (emit_library_call_value_1): Likewise.
27475 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
27476 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
27477 (gen_lowpart_for_combine): Likewise.
27478 * convert.c (convert_to_integer_1): Likewise.
27479 * cse.c (equiv_constant, cse_insn): Likewise.
27480 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
27481 (cselib_subst_to_values): Likewise.
27482 * dce.c (word_dce_process_block): Likewise.
27483 * df-problems.c (df_word_lr_mark_ref): Likewise.
27484 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
27485 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
27486 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
27487 (rtl_for_decl_location): Likewise.
27488 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
27489 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
27490 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
27491 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
27492 (expand_expr_real_1): Likewise.
27493 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
27494 (pad_below): Likewise.
27495 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27496 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
27497 * ira.c (get_subreg_tracking_sizes): Likewise.
27498 * ira-build.c (ira_create_allocno_objects): Likewise.
27499 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
27500 (ira_sort_regnos_for_alter_reg): Likewise.
27501 * ira-costs.c (record_operand_costs): Likewise.
27502 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
27503 (resolve_simple_move): Likewise.
27504 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
27505 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
27506 (lra_constraints): Likewise.
27507 (CONST_POOL_OK_P): Reject variable-sized modes.
27508 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
27509 (add_pseudo_to_slot, lra_spill): Likewise.
27510 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27511 * optabs-query.c (get_best_extraction_insn): Likewise.
27512 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27513 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
27514 (expand_mult_highpart, valid_multiword_target_p): Likewise.
27515 * recog.c (offsettable_address_addr_space_p): Likewise.
27516 * regcprop.c (maybe_mode_change): Likewise.
27517 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
27518 * regrename.c (build_def_use): Likewise.
27519 * regstat.c (dump_reg_info): Likewise.
27520 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
27521 (find_reloads, find_reloads_subreg_address): Likewise.
27522 * reload1.c (eliminate_regs_1): Likewise.
27523 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
27524 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
27525 (simplify_binary_operation_1, simplify_subreg): Likewise.
27526 * targhooks.c (default_function_arg_padding): Likewise.
27527 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
27528 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
27529 (verify_gimple_assign_ternary): Likewise.
27530 * tree-inline.c (estimate_move_cost): Likewise.
27531 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27532 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
27533 (get_address_cost_ainc): Likewise.
27534 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
27535 (vect_supportable_dr_alignment): Likewise.
27536 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27537 (vectorizable_reduction): Likewise.
27538 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
27539 (vectorizable_operation, vectorizable_load): Likewise.
27540 * tree.c (build_same_sized_truth_vector_type): Likewise.
27541 * valtrack.c (cleanup_auto_inc_dec): Likewise.
27542 * var-tracking.c (emit_note_insn_var_location): Likewise.
27543 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
27544 (ADDR_VEC_ALIGN): Likewise.
27546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27547 Alan Hayward <alan.hayward@arm.com>
27548 David Sherwood <david.sherwood@arm.com>
27550 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
27552 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27553 or if measurement_type is polynomial.
27554 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
27555 * combine.c (make_extraction): Likewise.
27556 * dse.c (find_shift_sequence): Likewise.
27557 * dwarf2out.c (mem_loc_descriptor): Likewise.
27558 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
27559 (extract_bit_field, extract_low_bits): Likewise.
27560 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
27561 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
27562 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
27563 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
27564 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27565 * reload.c (find_reloads): Likewise.
27566 * reload1.c (alter_reg): Likewise.
27567 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
27568 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
27569 * tree-if-conv.c (predicate_mem_writes): Likewise.
27570 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
27571 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
27572 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
27573 * valtrack.c (dead_debug_insert_temp): Likewise.
27574 * varasm.c (mergeable_constant_section): Likewise.
27575 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
27577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27578 Alan Hayward <alan.hayward@arm.com>
27579 David Sherwood <david.sherwood@arm.com>
27581 * expr.c (expand_assignment): Cope with polynomial mode sizes
27582 when assigning to a CONCAT.
27584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27585 Alan Hayward <alan.hayward@arm.com>
27586 David Sherwood <david.sherwood@arm.com>
27588 * machmode.h (mode_precision): Change from unsigned short to
27590 (mode_to_precision): Return a poly_uint16 rather than an unsigned
27592 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
27593 or if measurement_type is not polynomial.
27594 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
27595 in which the mode is already known to be a scalar_int_mode.
27596 * genmodes.c (emit_mode_precision): Change the type of mode_precision
27597 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
27599 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27600 for GET_MODE_PRECISION.
27601 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27602 for GET_MODE_PRECISION.
27603 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
27605 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
27606 (expand_field_assignment, make_extraction): Likewise.
27607 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
27608 (get_last_value): Likewise.
27609 * convert.c (convert_to_integer_1): Likewise.
27610 * cse.c (cse_insn): Likewise.
27611 * expr.c (expand_expr_real_1): Likewise.
27612 * lra-constraints.c (simplify_operand_subreg): Likewise.
27613 * optabs-query.c (can_atomic_load_p): Likewise.
27614 * optabs.c (expand_atomic_load): Likewise.
27615 (expand_atomic_store): Likewise.
27616 * ree.c (combine_reaching_defs): Likewise.
27617 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
27618 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
27619 * tree.h (type_has_mode_precision_p): Likewise.
27620 * ubsan.c (instrument_si_overflow): Likewise.
27622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27623 Alan Hayward <alan.hayward@arm.com>
27624 David Sherwood <david.sherwood@arm.com>
27626 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
27627 polynomial numbers of units.
27628 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
27629 (valid_vector_subparts_p): New function.
27630 (build_vector_type): Remove temporary shim and take the number
27631 of units as a poly_uint64 rather than an int.
27632 (build_opaque_vector_type): Take the number of units as a
27633 poly_uint64 rather than an int.
27634 * tree.c (build_vector_from_ctor): Handle polynomial
27635 TYPE_VECTOR_SUBPARTS.
27636 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
27637 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
27638 (build_vector_from_val): If the number of units is variable,
27639 use build_vec_duplicate_cst for constant operands and
27640 VEC_DUPLICATE_EXPR otherwise.
27641 (make_vector_type): Remove temporary is_constant ().
27642 (build_vector_type, build_opaque_vector_type): Take the number of
27643 units as a poly_uint64 rather than an int.
27644 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
27646 * cfgexpand.c (expand_debug_expr): Likewise.
27647 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
27648 (store_constructor, expand_expr_real_1): Likewise.
27649 (const_scalar_mask_from_tree): Likewise.
27650 * fold-const-call.c (fold_const_reduction): Likewise.
27651 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
27652 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
27653 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
27654 (fold_relational_const): Likewise.
27655 (native_interpret_vector): Likewise. Change the size from an
27656 int to an unsigned int.
27657 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
27658 TYPE_VECTOR_SUBPARTS.
27659 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
27660 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
27661 duplicating a non-constant operand into a variable-length vector.
27662 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
27663 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
27664 * ipa-icf.c (sem_variable::equals): Likewise.
27665 * match.pd: Likewise.
27666 * omp-simd-clone.c (simd_clone_subparts): Likewise.
27667 * print-tree.c (print_node): Likewise.
27668 * stor-layout.c (layout_type): Likewise.
27669 * targhooks.c (default_builtin_vectorization_cost): Likewise.
27670 * tree-cfg.c (verify_gimple_comparison): Likewise.
27671 (verify_gimple_assign_binary): Likewise.
27672 (verify_gimple_assign_ternary): Likewise.
27673 (verify_gimple_assign_single): Likewise.
27674 * tree-pretty-print.c (dump_generic_node): Likewise.
27675 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27676 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
27677 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
27678 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
27679 (vect_shift_permute_load_chain): Likewise.
27680 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
27681 (expand_vector_condition, optimize_vector_constructor): Likewise.
27682 (lower_vec_perm, get_compute_type): Likewise.
27683 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27684 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
27685 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
27686 (vect_recog_mask_conversion_pattern): Likewise.
27687 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
27688 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
27689 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27690 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
27691 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
27692 (vectorizable_shift, vectorizable_operation, vectorizable_store)
27693 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
27694 (supportable_widening_operation): Likewise.
27695 (supportable_narrowing_operation): Likewise.
27696 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
27698 * varasm.c (output_constant): Likewise.
27700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27701 Alan Hayward <alan.hayward@arm.com>
27702 David Sherwood <david.sherwood@arm.com>
27704 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
27705 so that both the length == 3 and length != 3 cases set up their
27706 own permute vectors. Add comments explaining why we know the
27707 number of elements is constant.
27708 (vect_permute_load_chain): Likewise.
27710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27711 Alan Hayward <alan.hayward@arm.com>
27712 David Sherwood <david.sherwood@arm.com>
27714 * machmode.h (mode_nunits): Change from unsigned char to
27716 (ONLY_FIXED_SIZE_MODES): New macro.
27717 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
27718 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
27719 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
27721 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
27722 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
27723 or if measurement_type is not polynomial.
27724 * genmodes.c (ZERO_COEFFS): New macro.
27725 (emit_mode_nunits_inline): Make mode_nunits_inline return a
27727 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27728 Use ZERO_COEFFS when emitting initializers.
27729 * data-streamer.h (bp_pack_poly_value): New function.
27730 (bp_unpack_poly_value): Likewise.
27731 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27732 for GET_MODE_NUNITS.
27733 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27734 for GET_MODE_NUNITS.
27735 * tree.c (make_vector_type): Remove temporary shim and make
27736 the real function take the number of units as a poly_uint64
27737 rather than an int.
27738 (build_vector_type_for_mode): Handle polynomial nunits.
27739 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27740 * emit-rtl.c (const_vec_series_p_1): Likewise.
27741 (gen_rtx_CONST_VECTOR): Likewise.
27742 * fold-const.c (test_vec_duplicate_folding): Likewise.
27743 * genrecog.c (validate_pattern): Likewise.
27744 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27745 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27746 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27747 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27748 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27749 * rtlanal.c (subreg_get_info): Likewise.
27750 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27751 (vect_grouped_load_supported): Likewise.
27752 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27753 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27754 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27755 (simplify_const_unary_operation, simplify_binary_operation_1)
27756 (simplify_const_binary_operation, simplify_ternary_operation)
27757 (test_vector_ops_duplicate, test_vector_ops): Likewise.
27758 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27759 instead of CONST_VECTOR_NUNITS.
27760 * varasm.c (output_constant_pool_2): Likewise.
27761 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27762 explicit-encoded elements in the XVEC for variable-length vectors.
27764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27766 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27768 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27769 Alan Hayward <alan.hayward@arm.com>
27770 David Sherwood <david.sherwood@arm.com>
27772 * coretypes.h (fixed_size_mode): Declare.
27773 (fixed_size_mode_pod): New typedef.
27774 * builtins.h (target_builtins::x_apply_args_mode)
27775 (target_builtins::x_apply_result_mode): Change type to
27776 fixed_size_mode_pod.
27777 * builtins.c (apply_args_size, apply_result_size, result_vector)
27778 (expand_builtin_apply_args_1, expand_builtin_apply)
27779 (expand_builtin_return): Update accordingly.
27781 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27783 * cse.c (hash_rtx_cb): Hash only the encoded elements.
27784 * cselib.c (cselib_hash_rtx): Likewise.
27785 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27786 CONST_VECTOR encoding.
27788 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27789 Jeff Law <law@redhat.com>
27792 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27793 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27794 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27795 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27798 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27799 explicitly probe *sp in a noreturn function if there were any callee
27800 register saves or frame pointer is needed.
27802 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27805 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27806 BLKmode for ternary, binary or unary expressions.
27809 * var-tracking.c (delete_vta_debug_insn): New inline function.
27810 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27811 insns from get_insns () to NULL instead of each bb separately.
27812 Use delete_vta_debug_insn. No longer static.
27813 (vt_debug_insns_local, variable_tracking_main_1): Adjust
27814 delete_vta_debug_insns callers.
27815 * rtl.h (delete_vta_debug_insns): Declare.
27816 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27817 instead of variable_tracking_main.
27819 2018-01-03 Martin Sebor <msebor@redhat.com>
27821 PR tree-optimization/83603
27822 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27823 arguments past the endof the argument list in functions declared
27824 without a prototype.
27825 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27826 Avoid checking when arguments are null.
27828 2018-01-03 Martin Sebor <msebor@redhat.com>
27831 * doc/extend.texi (attribute const): Fix a typo.
27832 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27833 issuing -Wsuggest-attribute for void functions.
27835 2018-01-03 Martin Sebor <msebor@redhat.com>
27837 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27838 offset_int::from instead of wide_int::to_shwi.
27839 (maybe_diag_overlap): Remove assertion.
27840 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27841 * gimple-ssa-sprintf.c (format_directive): Same.
27842 (parse_directive): Same.
27843 (sprintf_dom_walker::compute_format_length): Same.
27844 (try_substitute_return_value): Same.
27846 2018-01-03 Jeff Law <law@redhat.com>
27848 PR middle-end/83654
27849 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27850 non-constant residual for zero at runtime and avoid probing in
27851 that case. Reorganize code for trailing problem to mirror handling
27854 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27856 PR tree-optimization/83501
27857 * tree-ssa-strlen.c (get_string_cst): New.
27858 (handle_char_store): Call get_string_cst.
27860 2018-01-03 Martin Liska <mliska@suse.cz>
27862 PR tree-optimization/83593
27863 * tree-ssa-strlen.c: Include tree-cfg.h.
27864 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27865 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27866 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27868 (strlen_dom_walker::before_dom_children): Call
27869 gimple_purge_dead_eh_edges. Dump tranformation with details
27871 (strlen_dom_walker::before_dom_children): Update call by adding
27872 new argument cleanup_eh.
27873 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27875 2018-01-03 Martin Liska <mliska@suse.cz>
27878 * cif-code.def (VARIADIC_THUNK): New enum value.
27879 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27882 2018-01-03 Jan Beulich <jbeulich@suse.com>
27884 * sse.md (mov<mode>_internal): Tighten condition for when to use
27885 vmovdqu<ssescalarsize> for TI and OI modes.
27887 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27889 Update copyright years.
27891 2018-01-03 Martin Liska <mliska@suse.cz>
27894 * ipa-visibility.c (function_and_variable_visibility): Skip
27895 functions with noipa attribure.
27897 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27899 * gcc.c (process_command): Update copyright notice dates.
27900 * gcov-dump.c (print_version): Ditto.
27901 * gcov.c (print_version): Ditto.
27902 * gcov-tool.c (print_version): Ditto.
27903 * gengtype.c (create_file): Ditto.
27904 * doc/cpp.texi: Bump @copying's copyright year.
27905 * doc/cppinternals.texi: Ditto.
27906 * doc/gcc.texi: Ditto.
27907 * doc/gccint.texi: Ditto.
27908 * doc/gcov.texi: Ditto.
27909 * doc/install.texi: Ditto.
27910 * doc/invoke.texi: Ditto.
27912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27914 * vector-builder.h (vector_builder::m_full_nelts): Change from
27915 unsigned int to poly_uint64.
27916 (vector_builder::full_nelts): Update prototype accordingly.
27917 (vector_builder::new_vector): Likewise.
27918 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27919 (vector_builder::operator ==): Likewise.
27920 (vector_builder::finalize): Likewise.
27921 * int-vector-builder.h (int_vector_builder::int_vector_builder):
27922 Take the number of elements as a poly_uint64 rather than an
27924 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27925 from unsigned int to poly_uint64.
27926 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27927 (vec_perm_indices::new_vector): Likewise.
27928 (vec_perm_indices::length): Likewise.
27929 (vec_perm_indices::nelts_per_input): Likewise.
27930 (vec_perm_indices::input_nelts): Likewise.
27931 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27932 number of elements per input as a poly_uint64 rather than an
27933 unsigned int. Use the original encoding for variable-length
27934 vectors, rather than clamping each individual element.
27935 For the second and subsequent elements in each pattern,
27936 clamp the step and base before clamping their sum.
27937 (vec_perm_indices::series_p): Handle polynomial element counts.
27938 (vec_perm_indices::all_in_range_p): Likewise.
27939 (vec_perm_indices_to_tree): Likewise.
27940 (vec_perm_indices_to_rtx): Likewise.
27941 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27942 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27943 (tree_vector_builder::new_binary_operation): Handle polynomial
27944 element counts. Return false if we need to know the number
27945 of elements at compile time.
27946 * fold-const.c (fold_vec_perm): Punt if the number of elements
27947 isn't known at compile time.
27949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27951 * vec-perm-indices.h (vec_perm_builder): Change element type
27952 from HOST_WIDE_INT to poly_int64.
27953 (vec_perm_indices::element_type): Update accordingly.
27954 (vec_perm_indices::clamp): Handle polynomial element_types.
27955 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27956 (vec_perm_indices::all_in_range_p): Likewise.
27957 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27959 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27960 polynomial vec_perm_indices element types.
27961 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27962 * fold-const.c (fold_vec_perm): Likewise.
27963 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27964 * tree-vect-generic.c (lower_vec_perm): Likewise.
27965 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27966 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27967 element type to HOST_WIDE_INT.
27969 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27970 Alan Hayward <alan.hayward@arm.com>
27971 David Sherwood <david.sherwood@arm.com>
27973 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27974 rather than an int. Use plus_constant.
27975 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27976 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27979 Alan Hayward <alan.hayward@arm.com>
27980 David Sherwood <david.sherwood@arm.com>
27982 * calls.c (emit_call_1, expand_call): Change struct_value_size from
27983 a HOST_WIDE_INT to a poly_int64.
27985 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27986 Alan Hayward <alan.hayward@arm.com>
27987 David Sherwood <david.sherwood@arm.com>
27989 * calls.c (load_register_parameters): Cope with polynomial
27990 mode sizes. Require a constant size for BLKmode parameters
27991 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
27992 forces a parameter to be padded at the lsb end in order to
27993 fill a complete number of words, require the parameter size
27994 to be ordered wrt UNITS_PER_WORD.
27996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27997 Alan Hayward <alan.hayward@arm.com>
27998 David Sherwood <david.sherwood@arm.com>
28000 * reload1.c (spill_stack_slot_width): Change element type
28001 from unsigned int to poly_uint64_pod.
28002 (alter_reg): Treat mode sizes as polynomial.
28004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28005 Alan Hayward <alan.hayward@arm.com>
28006 David Sherwood <david.sherwood@arm.com>
28008 * reload.c (complex_word_subreg_p): New function.
28009 (reload_inner_reg_of_subreg, push_reload): Use it.
28011 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28012 Alan Hayward <alan.hayward@arm.com>
28013 David Sherwood <david.sherwood@arm.com>
28015 * lra-constraints.c (process_alt_operands): Reject matched
28016 operands whose sizes aren't ordered.
28017 (match_reload): Refer to this check here.
28019 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28020 Alan Hayward <alan.hayward@arm.com>
28021 David Sherwood <david.sherwood@arm.com>
28023 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28024 that the mode size is in the set {1, 2, 4, 8, 16}.
28026 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28027 Alan Hayward <alan.hayward@arm.com>
28028 David Sherwood <david.sherwood@arm.com>
28030 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28031 Use plus_constant instead of gen_rtx_PLUS.
28033 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28034 Alan Hayward <alan.hayward@arm.com>
28035 David Sherwood <david.sherwood@arm.com>
28037 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28038 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28039 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28040 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28041 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28042 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28043 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28044 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28045 * config/i386/i386.c (ix86_push_rounding): ...this new function.
28046 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28048 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28049 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28050 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28051 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28052 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28053 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28054 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28055 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28056 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28057 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28059 * expr.c (emit_move_resolve_push): Treat the input and result
28060 of PUSH_ROUNDING as a poly_int64.
28061 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28062 (emit_push_insn): Likewise.
28063 * lra-eliminations.c (mark_not_eliminable): Likewise.
28064 * recog.c (push_operand): Likewise.
28065 * reload1.c (elimination_effects): Likewise.
28066 * rtlanal.c (nonzero_bits1): Likewise.
28067 * calls.c (store_one_arg): Likewise. Require the padding to be
28068 known at compile time.
28070 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28071 Alan Hayward <alan.hayward@arm.com>
28072 David Sherwood <david.sherwood@arm.com>
28074 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28075 Use plus_constant instead of gen_rtx_PLUS.
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 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28082 rather than an int.
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 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28089 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28090 via stack temporaries. Treat the mode size as polynomial too.
28092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28093 Alan Hayward <alan.hayward@arm.com>
28094 David Sherwood <david.sherwood@arm.com>
28096 * expr.c (expand_expr_real_2): When handling conversions involving
28097 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28098 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
28099 as a poly_uint64 too.
28101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28102 Alan Hayward <alan.hayward@arm.com>
28103 David Sherwood <david.sherwood@arm.com>
28105 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28108 Alan Hayward <alan.hayward@arm.com>
28109 David Sherwood <david.sherwood@arm.com>
28111 * combine.c (can_change_dest_mode): Handle polynomial
28112 REGMODE_NATURAL_SIZE.
28113 * expmed.c (store_bit_field_1): Likewise.
28114 * expr.c (store_constructor): Likewise.
28115 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28116 and polynomial REGMODE_NATURAL_SIZE.
28117 (gen_lowpart_common): Likewise.
28118 * reginfo.c (record_subregs_of_mode): Likewise.
28119 * rtlanal.c (read_modify_subreg_p): Likewise.
28121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28122 Alan Hayward <alan.hayward@arm.com>
28123 David Sherwood <david.sherwood@arm.com>
28125 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28126 numbers of elements.
28128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28129 Alan Hayward <alan.hayward@arm.com>
28130 David Sherwood <david.sherwood@arm.com>
28132 * match.pd: Cope with polynomial numbers of vector elements.
28134 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28135 Alan Hayward <alan.hayward@arm.com>
28136 David Sherwood <david.sherwood@arm.com>
28138 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28139 in a POINTER_PLUS_EXPR.
28141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28142 Alan Hayward <alan.hayward@arm.com>
28143 David Sherwood <david.sherwood@arm.com>
28145 * omp-simd-clone.c (simd_clone_subparts): New function.
28146 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28147 (ipa_simd_modify_function_body): Likewise.
28149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28150 Alan Hayward <alan.hayward@arm.com>
28151 David Sherwood <david.sherwood@arm.com>
28153 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28154 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28155 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28156 (expand_vector_condition, vector_element): Likewise.
28157 (subparts_gt): New function.
28158 (get_compute_type): Use subparts_gt.
28159 (count_type_subparts): Delete.
28160 (expand_vector_operations_1): Use subparts_gt instead of
28161 count_type_subparts.
28163 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28164 Alan Hayward <alan.hayward@arm.com>
28165 David Sherwood <david.sherwood@arm.com>
28167 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28168 (vect_compile_time_alias): ...this new function. Do the calculation
28169 on poly_ints rather than trees.
28170 (vect_prune_runtime_alias_test_list): Update call accordingly.
28172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28173 Alan Hayward <alan.hayward@arm.com>
28174 David Sherwood <david.sherwood@arm.com>
28176 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28178 (vect_schedule_slp_instance): Likewise.
28180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28181 Alan Hayward <alan.hayward@arm.com>
28182 David Sherwood <david.sherwood@arm.com>
28184 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28185 constant and extern definitions for variable-length vectors.
28186 (vect_get_constant_vectors): Note that the number of units
28187 is known to be constant.
28189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28190 Alan Hayward <alan.hayward@arm.com>
28191 David Sherwood <david.sherwood@arm.com>
28193 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28194 of units as polynomial. Choose between WIDE and NARROW based
28197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28198 Alan Hayward <alan.hayward@arm.com>
28199 David Sherwood <david.sherwood@arm.com>
28201 * tree-vect-stmts.c (simd_clone_subparts): New function.
28202 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28204 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28205 Alan Hayward <alan.hayward@arm.com>
28206 David Sherwood <david.sherwood@arm.com>
28208 * tree-vect-stmts.c (vectorizable_call): Treat the number of
28209 vectors as polynomial. Use build_index_vector for
28210 IFN_GOMP_SIMD_LANE.
28212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28213 Alan Hayward <alan.hayward@arm.com>
28214 David Sherwood <david.sherwood@arm.com>
28216 * tree-vect-stmts.c (get_load_store_type): Treat the number of
28217 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28218 for variable-length vectors.
28219 (vectorizable_mask_load_store): Treat the number of units as
28220 polynomial, asserting that it is constant if the condition has
28221 already been enforced.
28222 (vectorizable_store, vectorizable_load): Likewise.
28224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28225 Alan Hayward <alan.hayward@arm.com>
28226 David Sherwood <david.sherwood@arm.com>
28228 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28229 of units as polynomial. Punt if we can't tell at compile time
28230 which vector contains the final result.
28232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28233 Alan Hayward <alan.hayward@arm.com>
28234 David Sherwood <david.sherwood@arm.com>
28236 * tree-vect-loop.c (vectorizable_induction): Treat the number
28237 of units as polynomial. Punt on SLP inductions. Use an integer
28238 VEC_SERIES_EXPR for variable-length integer reductions. Use a
28239 cast of such a series for variable-length floating-point
28242 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28243 Alan Hayward <alan.hayward@arm.com>
28244 David Sherwood <david.sherwood@arm.com>
28246 * tree.h (build_index_vector): Declare.
28247 * tree.c (build_index_vector): New function.
28248 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28249 of units as polynomial, forcibly converting it to a constant if
28250 vectorizable_reduction has already enforced the condition.
28251 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
28252 to create a {1,2,3,...} vector.
28253 (vectorizable_reduction): Treat the number of units as polynomial.
28254 Choose vectype_in based on the largest scalar element size rather
28255 than the smallest number of units. Enforce the restrictions
28258 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28259 Alan Hayward <alan.hayward@arm.com>
28260 David Sherwood <david.sherwood@arm.com>
28262 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28263 number of units as polynomial.
28265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28266 Alan Hayward <alan.hayward@arm.com>
28267 David Sherwood <david.sherwood@arm.com>
28269 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28270 * target.def (autovectorize_vector_sizes): Return the vector sizes
28271 by pointer, using vector_sizes rather than a bitmask.
28272 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28273 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28274 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28276 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28277 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28278 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28279 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28280 * omp-general.c (omp_max_vf): Likewise.
28281 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28282 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28283 * tree-vect-loop.c (vect_analyze_loop): Likewise.
28284 * tree-vect-slp.c (vect_slp_bb): Likewise.
28285 * doc/tm.texi: Regenerate.
28286 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
28288 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
28289 the vector size as a poly_uint64 rather than an unsigned int.
28290 (current_vector_size): Change from an unsigned int to a poly_uint64.
28291 (get_vectype_for_scalar_type): Update accordingly.
28292 * tree.h (build_truth_vector_type): Take the size and number of
28293 units as a poly_uint64 rather than an unsigned int.
28294 (build_vector_type): Add a temporary overload that takes
28295 the number of units as a poly_uint64 rather than an unsigned int.
28296 * tree.c (make_vector_type): Likewise.
28297 (build_truth_vector_type): Take the number of units as a poly_uint64
28298 rather than an unsigned int.
28300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28301 Alan Hayward <alan.hayward@arm.com>
28302 David Sherwood <david.sherwood@arm.com>
28304 * target.def (get_mask_mode): Take the number of units and length
28305 as poly_uint64s rather than unsigned ints.
28306 * targhooks.h (default_get_mask_mode): Update accordingly.
28307 * targhooks.c (default_get_mask_mode): Likewise.
28308 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
28309 * doc/tm.texi: Regenerate.
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 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
28316 * omp-general.c (omp_max_vf): Likewise.
28317 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
28318 (expand_omp_simd): Handle polynomial safelen.
28319 * omp-low.c (omplow_simd_context): Add a default constructor.
28320 (omplow_simd_context::max_vf): Change from int to poly_uint64.
28321 (lower_rec_simd_input_clauses): Update accordingly.
28322 (lower_rec_input_clauses): Likewise.
28324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28325 Alan Hayward <alan.hayward@arm.com>
28326 David Sherwood <david.sherwood@arm.com>
28328 * tree-vectorizer.h (vect_nunits_for_cost): New function.
28329 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
28330 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
28331 (vect_analyze_slp_cost): Likewise.
28332 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
28333 (vect_model_load_cost): Likewise.
28335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28336 Alan Hayward <alan.hayward@arm.com>
28337 David Sherwood <david.sherwood@arm.com>
28339 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
28340 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
28341 from an unsigned int * to a poly_uint64_pod *.
28342 (calculate_unrolling_factor): New function.
28343 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
28345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28346 Alan Hayward <alan.hayward@arm.com>
28347 David Sherwood <david.sherwood@arm.com>
28349 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
28350 from an unsigned int to a poly_uint64.
28351 (_loop_vec_info::slp_unrolling_factor): Likewise.
28352 (_loop_vec_info::vectorization_factor): Change from an int
28354 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
28355 (vect_get_num_vectors): New function.
28356 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
28357 (vect_get_num_copies): Use vect_get_num_vectors.
28358 (vect_analyze_data_ref_dependences): Change max_vf from an int *
28359 to an unsigned int *.
28360 (vect_analyze_data_refs): Change min_vf from an int * to a
28362 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28363 than an unsigned HOST_WIDE_INT.
28364 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
28365 (vect_analyze_data_ref_dependence): Change max_vf from an int *
28366 to an unsigned int *.
28367 (vect_analyze_data_ref_dependences): Likewise.
28368 (vect_compute_data_ref_alignment): Handle polynomial vf.
28369 (vect_enhance_data_refs_alignment): Likewise.
28370 (vect_prune_runtime_alias_test_list): Likewise.
28371 (vect_shift_permute_load_chain): Likewise.
28372 (vect_supportable_dr_alignment): Likewise.
28373 (dependence_distance_ge_vf): Take the vectorization factor as a
28374 poly_uint64 rather than an unsigned HOST_WIDE_INT.
28375 (vect_analyze_data_refs): Change min_vf from an int * to a
28377 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
28378 vfm1 as a poly_uint64 rather than an int. Make the same change
28379 for the returned bound_scalar.
28380 (vect_gen_vector_loop_niters): Handle polynomial vf.
28381 (vect_do_peeling): Likewise. Update call to
28382 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
28383 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
28385 * tree-vect-loop.c (vect_determine_vectorization_factor)
28386 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
28387 (vect_get_known_peeling_cost): Likewise.
28388 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
28389 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
28390 (vect_transform_loop): Likewise. Use the lowest possible VF when
28391 updating the upper bounds of the loop.
28392 (vect_min_worthwhile_factor): Make static. Return an unsigned int
28393 rather than an int.
28394 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
28395 polynomial unroll factors.
28396 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
28397 (vect_make_slp_decision): Likewise.
28398 (vect_supported_load_permutation_p): Likewise, and polynomial
28400 (vect_analyze_slp_cost): Handle polynomial vf.
28401 (vect_slp_analyze_node_operations): Likewise.
28402 (vect_slp_analyze_bb_1): Likewise.
28403 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28404 than an unsigned HOST_WIDE_INT.
28405 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
28406 (vectorizable_load): Handle polynomial vf.
28407 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
28409 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
28411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28412 Alan Hayward <alan.hayward@arm.com>
28413 David Sherwood <david.sherwood@arm.com>
28415 * match.pd: Handle bit operations involving three constants
28416 and try to fold one pair.
28418 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28420 * tree-vect-loop-manip.c: Include gimple-fold.h.
28421 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
28422 niters_maybe_zero parameters. Handle other cases besides a step of 1.
28423 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
28424 Add a path that uses a step of VF instead of 1, but disable it
28426 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
28427 and niters_no_overflow parameters. Update calls to
28428 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
28429 Create a new SSA name if the latter choses to use a ste other
28430 than zero, and return it via niters_vector_mult_vf_var.
28431 * tree-vect-loop.c (vect_transform_loop): Update calls to
28432 vect_do_peeling, vect_gen_vector_loop_niters and
28433 slpeel_make_loop_iterate_ntimes.
28434 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
28435 (vect_gen_vector_loop_niters): Update declarations after above changes.
28437 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
28439 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
28440 128-bit round to integer instructions.
28441 (ceil<mode>2): Likewise.
28442 (btrunc<mode>2): Likewise.
28443 (round<mode>2): Likewise.
28445 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28447 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
28448 unaligned VSX load/store on P8/P9.
28449 (expand_block_clear): Allow the use of unaligned VSX
28450 load/store on P8/P9.
28452 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28454 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
28456 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
28457 swap associated with both a load and a store.
28459 2018-01-02 Andrew Waterman <andrew@sifive.com>
28461 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
28462 * config/riscv/riscv.md (clear_cache): Use it.
28464 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
28466 * web.c: Remove out-of-date comment.
28468 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28470 * expr.c (fixup_args_size_notes): Check that any existing
28471 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
28472 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
28473 (emit_single_push_insn): ...here.
28475 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28477 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
28478 (const_vector_encoded_nelts): New function.
28479 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
28480 (const_vector_int_elt, const_vector_elt): Declare.
28481 * emit-rtl.c (const_vector_int_elt_1): New function.
28482 (const_vector_elt): Likewise.
28483 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
28484 of CONST_VECTOR_ELT.
28486 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28488 * expr.c: Include rtx-vector-builder.h.
28489 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
28490 directly on the tree encoding.
28491 (const_vector_from_tree): Likewise.
28492 * optabs.c: Include rtx-vector-builder.h.
28493 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
28494 sequence of "u" values.
28495 * vec-perm-indices.c: Include rtx-vector-builder.h.
28496 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
28497 directly on the vec_perm_indices encoding.
28499 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28501 * doc/rtl.texi (const_vector): Describe new encoding scheme.
28502 * Makefile.in (OBJS): Add rtx-vector-builder.o.
28503 * rtx-vector-builder.h: New file.
28504 * rtx-vector-builder.c: Likewise.
28505 * rtl.h (rtx_def::u2): Add a const_vector field.
28506 (CONST_VECTOR_NPATTERNS): New macro.
28507 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
28508 (CONST_VECTOR_DUPLICATE_P): Likewise.
28509 (CONST_VECTOR_STEPPED_P): Likewise.
28510 (CONST_VECTOR_ENCODED_ELT): Likewise.
28511 (const_vec_duplicate_p): Check for a duplicated vector encoding.
28512 (unwrap_const_vec_duplicate): Likewise.
28513 (const_vec_series_p): Check for a non-duplicated vector encoding.
28514 Say that the function only returns true for integer vectors.
28515 * emit-rtl.c: Include rtx-vector-builder.h.
28516 (gen_const_vec_duplicate_1): Delete.
28517 (gen_const_vector): Call gen_const_vec_duplicate instead of
28518 gen_const_vec_duplicate_1.
28519 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
28520 (gen_const_vec_duplicate): Use rtx_vector_builder.
28521 (gen_const_vec_series): Likewise.
28522 (gen_rtx_CONST_VECTOR): Likewise.
28523 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
28524 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28525 Build a new vector rather than modifying a CONST_VECTOR in-place.
28526 (handle_special_swappables): Update call accordingly.
28527 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
28528 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28529 Build a new vector rather than modifying a CONST_VECTOR in-place.
28530 (handle_special_swappables): Update call accordingly.
28532 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28534 * simplify-rtx.c (simplify_const_binary_operation): Use
28535 CONST_VECTOR_ELT instead of XVECEXP.
28537 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28539 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
28540 the selector elements to be different from the data elements
28541 if the selector is a VECTOR_CST.
28542 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
28543 ssizetype for the selector.
28545 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28547 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
28548 before testing each element individually.
28549 * tree-vect-generic.c (lower_vec_perm): Likewise.
28551 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28553 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
28554 * selftest-run-tests.c (selftest::run_tests): Call it.
28555 * vector-builder.h (vector_builder::operator ==): New function.
28556 (vector_builder::operator !=): Likewise.
28557 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
28558 (vec_perm_indices::all_from_input_p): New function.
28559 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28560 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
28561 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
28562 instead of reading the VECTOR_CST directly. Detect whether both
28563 vector inputs are the same before constructing the vec_perm_indices,
28564 and update the number of inputs argument accordingly. Use the
28565 utility functions added above. Only construct sel2 if we need to.
28567 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28569 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
28570 the broadcast of the low byte.
28571 (expand_mult_highpart): Use an explicit encoding for the permutes.
28572 * optabs-query.c (can_mult_highpart_p): Likewise.
28573 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
28574 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28575 (vectorizable_bswap): Likewise.
28576 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
28577 explicit encoding for the power-of-2 permutes.
28578 (vect_permute_store_chain): Likewise.
28579 (vect_grouped_load_supported): Likewise.
28580 (vect_permute_load_chain): Likewise.
28582 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28584 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
28585 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
28586 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
28587 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28588 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
28589 (vect_gen_perm_mask_any): Likewise.
28591 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28593 * int-vector-builder.h: New file.
28594 * vec-perm-indices.h: Include int-vector-builder.h.
28595 (vec_perm_indices): Redefine as an int_vector_builder.
28596 (auto_vec_perm_indices): Delete.
28597 (vec_perm_builder): Redefine as a stand-alone class.
28598 (vec_perm_indices::vec_perm_indices): New function.
28599 (vec_perm_indices::clamp): Likewise.
28600 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
28601 (vec_perm_indices::new_vector): New function.
28602 (vec_perm_indices::new_expanded_vector): Update for new
28603 vec_perm_indices class.
28604 (vec_perm_indices::rotate_inputs): New function.
28605 (vec_perm_indices::all_in_range_p): Operate directly on the
28606 encoded form, without computing elided elements.
28607 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
28608 encoding. Update for new vec_perm_indices class.
28609 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
28610 the given vec_perm_builder.
28611 (expand_vec_perm_var): Update vec_perm_builder constructor.
28612 (expand_mult_highpart): Use vec_perm_builder instead of
28613 auto_vec_perm_indices.
28614 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
28615 vec_perm_indices instead of auto_vec_perm_indices. Use a single
28616 or double series encoding as appropriate.
28617 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
28618 vec_perm_indices instead of auto_vec_perm_indices.
28619 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28620 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28621 (vect_permute_store_chain): Likewise.
28622 (vect_grouped_load_supported): Likewise.
28623 (vect_permute_load_chain): Likewise.
28624 (vect_shift_permute_load_chain): Likewise.
28625 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28626 (vect_transform_slp_perm_load): Likewise.
28627 (vect_schedule_slp_instance): Likewise.
28628 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28629 (vectorizable_mask_load_store): Likewise.
28630 (vectorizable_bswap): Likewise.
28631 (vectorizable_store): Likewise.
28632 (vectorizable_load): Likewise.
28633 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
28634 vec_perm_indices instead of auto_vec_perm_indices. Use
28635 tree_to_vec_perm_builder to read the vector from a tree.
28636 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
28637 vec_perm_builder instead of a vec_perm_indices.
28638 (have_whole_vector_shift): Use vec_perm_builder and
28639 vec_perm_indices instead of auto_vec_perm_indices. Leave the
28640 truncation to calc_vec_perm_mask_for_shift.
28641 (vect_create_epilog_for_reduction): Likewise.
28642 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
28643 from auto_vec_perm_indices to vec_perm_indices.
28644 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28645 instead of changing individual elements.
28646 (aarch64_vectorize_vec_perm_const): Use new_vector to install
28647 the vector in d.perm.
28648 * config/arm/arm.c (expand_vec_perm_d::perm): Change
28649 from auto_vec_perm_indices to vec_perm_indices.
28650 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28651 instead of changing individual elements.
28652 (arm_vectorize_vec_perm_const): Use new_vector to install
28653 the vector in d.perm.
28654 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
28655 Update vec_perm_builder constructor.
28656 (rs6000_expand_interleave): Likewise.
28657 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
28658 (rs6000_expand_interleave): Likewise.
28660 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28662 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
28663 to qimode could truncate the indices.
28664 * optabs.c (expand_vec_perm_var): Likewise.
28666 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28668 * Makefile.in (OBJS): Add vec-perm-indices.o.
28669 * vec-perm-indices.h: New file.
28670 * vec-perm-indices.c: Likewise.
28671 * target.h (vec_perm_indices): Replace with a forward class
28673 (auto_vec_perm_indices): Move to vec-perm-indices.h.
28674 * optabs.h: Include vec-perm-indices.h.
28675 (expand_vec_perm): Delete.
28676 (selector_fits_mode_p, expand_vec_perm_var): Declare.
28677 (expand_vec_perm_const): Declare.
28678 * target.def (vec_perm_const_ok): Replace with...
28679 (vec_perm_const): ...this new hook.
28680 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
28681 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
28682 * doc/tm.texi: Regenerate.
28683 * optabs.def (vec_perm_const): Delete.
28684 * doc/md.texi (vec_perm_const): Likewise.
28685 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
28686 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
28687 expand_vec_perm for constant permutation vectors. Assert that
28688 the mode of variable permutation vectors is the integer equivalent
28689 of the mode that is being permuted.
28690 * optabs-query.h (selector_fits_mode_p): Declare.
28691 * optabs-query.c: Include vec-perm-indices.h.
28692 (selector_fits_mode_p): New function.
28693 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
28694 is defined, instead of checking whether the vec_perm_const_optab
28695 exists. Use targetm.vectorize.vec_perm_const instead of
28696 targetm.vectorize.vec_perm_const_ok. Check whether the indices
28697 fit in the vector mode before using a variable permute.
28698 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
28699 vec_perm_indices instead of an rtx.
28700 (expand_vec_perm): Replace with...
28701 (expand_vec_perm_const): ...this new function. Take the selector
28702 as a vec_perm_indices rather than an rtx. Also take the mode of
28703 the selector. Update call to shift_amt_for_vec_perm_mask.
28704 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
28705 Use vec_perm_indices::new_expanded_vector to expand the original
28706 selector into bytes. Check whether the indices fit in the vector
28707 mode before using a variable permute.
28708 (expand_vec_perm_var): Make global.
28709 (expand_mult_highpart): Use expand_vec_perm_const.
28710 * fold-const.c: Includes vec-perm-indices.h.
28711 * tree-ssa-forwprop.c: Likewise.
28712 * tree-vect-data-refs.c: Likewise.
28713 * tree-vect-generic.c: Likewise.
28714 * tree-vect-loop.c: Likewise.
28715 * tree-vect-slp.c: Likewise.
28716 * tree-vect-stmts.c: Likewise.
28717 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
28719 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
28720 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
28721 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
28722 (aarch64_vectorize_vec_perm_const): ...this new function.
28723 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28724 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28725 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
28726 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
28727 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28728 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28729 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28731 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
28732 check for NEON modes.
28733 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28734 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28735 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28736 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28738 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
28739 the old VEC_PERM_CONST conditions.
28740 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28741 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28742 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28743 (ia64_vectorize_vec_perm_const_ok): Merge into...
28744 (ia64_vectorize_vec_perm_const): ...this new function.
28745 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28746 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28747 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28748 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28749 * config/mips/mips.c (mips_expand_vec_perm_const)
28750 (mips_vectorize_vec_perm_const_ok): Merge into...
28751 (mips_vectorize_vec_perm_const): ...this new function.
28752 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28753 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28754 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28755 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28756 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28757 (rs6000_expand_vec_perm_const): Delete.
28758 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28760 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28761 (altivec_expand_vec_perm_const_le): Take each operand individually.
28762 Operate on constant selectors rather than rtxes.
28763 (altivec_expand_vec_perm_const): Likewise. Update call to
28764 altivec_expand_vec_perm_const_le.
28765 (rs6000_expand_vec_perm_const): Delete.
28766 (rs6000_vectorize_vec_perm_const_ok): Delete.
28767 (rs6000_vectorize_vec_perm_const): New function.
28768 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28769 an element count and rtx array.
28770 (rs6000_expand_extract_even): Update call accordingly.
28771 (rs6000_expand_interleave): Likewise.
28772 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28773 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28774 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28775 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28776 (rs6000_expand_vec_perm_const): Delete.
28777 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28778 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28779 (altivec_expand_vec_perm_const_le): Take each operand individually.
28780 Operate on constant selectors rather than rtxes.
28781 (altivec_expand_vec_perm_const): Likewise. Update call to
28782 altivec_expand_vec_perm_const_le.
28783 (rs6000_expand_vec_perm_const): Delete.
28784 (rs6000_vectorize_vec_perm_const_ok): Delete.
28785 (rs6000_vectorize_vec_perm_const): New function. Remove stray
28786 reference to the SPE evmerge intructions.
28787 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28788 an element count and rtx array.
28789 (rs6000_expand_extract_even): Update call accordingly.
28790 (rs6000_expand_interleave): Likewise.
28791 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28792 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28794 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28796 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28798 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28799 vector mode and that that mode matches the mode of the data
28801 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28802 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
28803 directly using expand_vec_perm_1 when forcing selectors into
28805 (expand_vec_perm_var): New function, split out from expand_vec_perm.
28807 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28809 * optabs-query.h (can_vec_perm_p): Delete.
28810 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28811 * optabs-query.c (can_vec_perm_p): Split into...
28812 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28813 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28814 particular selector is valid.
28815 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28816 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28817 (vect_grouped_load_supported): Likewise.
28818 (vect_shift_permute_load_chain): Likewise.
28819 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28820 (vect_transform_slp_perm_load): Likewise.
28821 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28822 (vectorizable_bswap): Likewise.
28823 (vect_gen_perm_mask_checked): Likewise.
28824 * fold-const.c (fold_ternary_loc): Likewise. Don't take
28825 implementations of variable permutation vectors into account
28826 when deciding which selector to use.
28827 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28828 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28829 with a false third argument.
28830 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28831 to test whether the constant selector is valid and can_vec_perm_var_p
28832 to test whether a variable selector is valid.
28834 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28836 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28837 * optabs-query.c (can_vec_perm_p): Likewise.
28838 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28839 instead of vec_perm_indices.
28840 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28841 (vect_gen_perm_mask_checked): Likewise,
28842 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28843 (vect_gen_perm_mask_checked): Likewise,
28845 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28847 * optabs-query.h (qimode_for_vec_perm): Declare.
28848 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28849 (qimode_for_vec_perm): ...this new function.
28850 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28852 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28854 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28855 does not have a conditional at the top.
28857 2018-01-02 Richard Biener <rguenther@suse.de>
28859 * ipa-inline.c (big_speedup_p): Fix expression.
28861 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28864 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28867 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28871 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28872 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28873 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28874 cond_taken_branch_cost 3->4.
28876 2018-01-01 Jakub Jelinek <jakub@redhat.com>
28878 PR tree-optimization/83581
28879 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28880 TODO_cleanup_cfg if any changes have been made.
28882 PR middle-end/83608
28883 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28884 convert_modes if target mode has the right side, but different mode
28887 PR middle-end/83609
28888 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28889 last argument when extracting from CONCAT. If either from_real or
28890 from_imag is NULL, use expansion through memory. If result is not
28891 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28892 the parts directly to inner mode, if even that fails, use expansion
28895 PR middle-end/83623
28896 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28897 check for bswap in mode rather than HImode and use that in expand_unop
28900 Copyright (C) 2018 Free Software Foundation, Inc.
28902 Copying and distribution of this file, with or without modification,
28903 are permitted in any medium without royalty provided the copyright
28904 notice and this notice are preserved.