Revert r263947.
[official-gcc.git] / gcc / ChangeLog
blob8bf143438d5210f0ee616a402e7f0ee7e48c15ab
1 2018-10-22  Martin Liska  <mliska@suse.cz>
3   PR tree-optimization/87686
4         Revert
5         2018-08-29  Martin Liska  <mliska@suse.cz>
7         * tree-switch-conversion.c (switch_conversion::expand):
8         Strenghten assumption about gswitch statements.
10 2018-10-22  Martin Liska  <mliska@suse.cz>
12         * ipa-icf.c (sem_item::compare_attributes): Remove.
13         (sem_item::compare_referenced_symbol_properties): Use
14         attribute_list_equal instead.
15         (sem_function::equals_wpa): Likewise.
16         * ipa-icf.h: Remove compare_attributes.
18 2018-10-22  Richard Biener  <rguenther@suse.de>
20         PR middle-end/87682
21         * mem-stats.h (mem_usage::operator==): Fix pasto.
23 2018-10-22  Richard Biener  <rguenther@suse.de>
25         PR tree-optimization/87640
26         * tree-vrp.c (set_value_range_with_overflow): Decompose
27         incomplete result.
28         (extract_range_from_binary_expr_1): Adjust.
30 2018-10-22  Martin Jambor  <mjambor@suse.cz>
32         * tree-eh.h (stmt_could_throw_p): Add function parameter.
33         (stmt_can_throw_external): Likewise.
34         (stmt_can_throw_internal): Likewise.
35         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
36         (lower_eh_constructs_2): Likewise.
37         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
38         (stmt_can_throw_external): Likewise.
39         (stmt_can_throw_internal): Likewise.
40         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
41         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
42         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
43         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
44         (pass_lower_eh_dispatch::execute): Pass cfun to
45         stmt_can_throw_external.
46         (cleanup_empty_eh): Likewise.
47         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
48         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
49         stmt_can_throw_external instead of pushing it to cfun.
50         (symbol_table::create_edge): Likewise.
51         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
52         stmt_can_throw_internal.
53         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
54         to stmt_could_throw_p.
55         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
56         stmt_can_throw_internal.
57         (pass_store_merging::execute): Likewise.
58         * gimple-ssa-strength-reduction.c
59         (find_candidates_dom_walker::before_dom_children): Pass cfun to
60         stmt_could_throw_p.
61         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
62         stmt_can_throw_internal.
63         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
64         to stmt_can_throw_external.
65         (check_stmt): Pass cfun to stmt_could_throw_p.
66         (check_stmt): Pass cfun to stmt_can_throw_external.
67         (pass_nothrow::execute): Likewise.
68         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
69         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
70         stmt_can_throw_internal.
71         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
72         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
73         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
74         * tree-complex.c (expand_complex_libcall): Pass cfun to
75         stmt_could_throw_p and to stmt_can_throw_internal.
76         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
77         * tree-inline.c (copy_edges_for_bb): Likewise.
78         (maybe_move_debug_stmts_to_successors): Likewise.
79         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
80         stmt_could_throw_p.
81         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
82         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
83         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
84         stmt_can_throw_internal.
85         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
86         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
87         stmt_could_throw_p.
88         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
89         stmt_can_throw_internal.
90         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
91         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
92         stmt_could_throw_p.
93         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
94         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
95         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
96         (convert_mult_to_fma_1): Likewise.
97         (convert_to_divmod): Likewise.
98         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
99         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
100         * tree-ssa-propagate.c
101         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
102         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
103         (maybe_optimize_range_tests): Likewise.
104         (linearize_expr_tree): Likewise.
105         (reassociate_bb): Likewise.
106         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
107         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
108         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
109         (handle_char_store): Likewise.
110         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
111         stmt_can_throw_internal.
112         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
113         stmt_could_throw_p.
114         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
115         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
116         (vectorizable_simd_clone_call): Likewise.
117         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
118         (gimple_stringop_fixed_value): Likewise.
120 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
122         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
123         literal pool references.
124         (s390_check_qrst_address): Adapt to the new behavior of
125         s390_loadrelative_operand_p ().
127 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
129         PR target/72782
130         * config/i386/sse.md (*andnot<mode>3_bcst): New.
132 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
134         PR target/72782
135         * config/i386/sse.md (*<code><mode>3_bcst): New.
137 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
139         PR target/72782
140         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
141         V4DI, V16SI and V8DI.
142         (*sub<mode>3<mask_name>_bcst): New.
143         (*add<mode>3<mask_name>_bcst): Likewise.
145 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
147         PR target/72782
148         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
149         __builtin_ia32_vfnmsubpd512_mask.
150         (_mm512_mask_fnmsub_round_pd): Likewise.
151         (_mm512_fnmsub_pd): Likewise.
152         (_mm512_mask_fnmsub_pd): Likewise.
153         (_mm512_maskz_fnmsub_round_pd): Use
154         __builtin_ia32_vfnmsubpd512_maskz.
155         (_mm512_maskz_fnmsub_pd): Likewise.
156         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
157         (_mm512_mask_fnmsub_round_ps): Likewise.
158         (_mm512_fnmsub_ps): Likewise.
159         (_mm512_mask_fnmsub_ps): Likewise.
160         (_mm512_maskz_fnmsub_round_ps): Use
161         __builtin_ia32_vfnmsubps512_maskz.
162         (_mm512_maskz_fnmsub_ps): Likewise.
163         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
164         __builtin_ia32_vfnmsubpd256_mask.
165         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
166         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
167         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
168         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
169         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
170         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
171         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
172         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
173         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
174         __builtin_ia32_vfnmsubpd.
175         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
176         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
177         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
178         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
179         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
180         * config/i386/i386-builtin.def: Add
181         __builtin_ia32_vfnmsubpd256_mask,
182         __builtin_ia32_vfnmsubpd256_maskz,
183         __builtin_ia32_vfnmsubpd128_mask,
184         __builtin_ia32_vfnmsubpd128_maskz,
185         __builtin_ia32_vfnmsubps256_mask,
186         __builtin_ia32_vfnmsubps256_maskz,
187         __builtin_ia32_vfnmsubps128_mask,
188         __builtin_ia32_vfnmsubps128_maskz,
189         __builtin_ia32_vfnmsubpd512_mask,
190         __builtin_ia32_vfnmsubpd512_maskz,
191         __builtin_ia32_vfnmsubps512_mask,
192         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
193         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
194         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
195         __builtin_ia32_vfnmsubpd256.
196         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
197         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
198         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
199         Likewise.
200         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
201         Likewise.
202         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
203         Likewise.
204         (fmai_vmfnmsub_<mode><round_name>): Likewise.
206 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
208         PR target/72782
209         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
210         __builtin_ia32_vfnmaddpd512_mask.
211         (_mm512_mask_fnmadd_round_pd): Likewise.
212         (_mm512_fnmadd_pd): Likewise.
213         (_mm512_mask_fnmadd_pd): Likewise.
214         (_mm512_maskz_fnmadd_round_pd): Use
215         __builtin_ia32_vfnmaddpd512_maskz.
216         (_mm512_maskz_fnmadd_pd): Likewise.
217         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
218         (_mm512_mask_fnmadd_round_ps): Likewise.
219         (_mm512_fnmadd_ps): Likewise.
220         (_mm512_mask_fnmadd_ps): Likewise.
221         (_mm512_maskz_fnmadd_round_ps): Use
222         __builtin_ia32_vfnmaddps512_maskz.
223         (_mm512_maskz_fnmadd_ps): Likewise.
224         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
225         __builtin_ia32_vfnmaddpd256_mask.
226         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
227         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
228         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
229         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
230         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
231         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
232         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
233         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
234         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
235         __builtin_ia32_vfnmaddpd.
236         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
237         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
238         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
239         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
240         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
241         * config/i386/i386-builtin.def: Add
242         __builtin_ia32_vfnmaddpd256_mask,
243         __builtin_ia32_vfnmaddpd256_maskz,
244         __builtin_ia32_vfnmaddpd128_mask,
245         __builtin_ia32_vfnmaddpd128_maskz,
246         __builtin_ia32_vfnmaddps256_mask,
247         __builtin_ia32_vfnmaddps256_maskz,
248         __builtin_ia32_vfnmaddps128_mask,
249         __builtin_ia32_vfnmaddps128_maskz,
250         __builtin_ia32_vfnmaddpd512_mask,
251         __builtin_ia32_vfnmaddpd512_maskz,
252         __builtin_ia32_vfnmaddps512_mask,
253         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
254         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
255         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
256         __builtin_ia32_vfnmaddpd256.
257         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
258         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
259         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
260         Likewise.
261         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
262         Likewise.
263         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
264         Likewise.
265         (fmai_vmfnmadd_<mode><round_name>): Likewise.
267 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
269         PR target/72782
270         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
271         __builtin_ia32_vfmsubpd512_mask.
272         (_mm512_mask_fmsub_round_pd): Likewise.
273         (_mm512_fmsub_pd): Likewise.
274         (_mm512_mask_fmsub_pd): Likewise.
275         (_mm512_maskz_fmsub_round_pd): Use
276         __builtin_ia32_vfmsubpd512_maskz.
277         (_mm512_maskz_fmsub_pd): Likewise.
278         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
279         (_mm512_mask_fmsub_round_ps): Likewise.
280         (_mm512_fmsub_ps): Likewise.
281         (_mm512_mask_fmsub_ps): Likewise.
282         (_mm512_maskz_fmsub_round_ps): Use
283         __builtin_ia32_vfmsubps512_maskz.
284         (_mm512_maskz_fmsub_ps): Likewise.
285         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
286         __builtin_ia32_vfmsubpd256_mask.
287         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
288         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
289         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
290         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
291         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
292         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
293         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
294         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
295         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
296         __builtin_ia32_vfmsubpd.
297         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
298         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
299         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
300         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
301         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
302         * config/i386/i386-builtin.def: Add
303         __builtin_ia32_vfmsubpd256_mask,
304         __builtin_ia32_vfmsubpd256_maskz,
305         __builtin_ia32_vfmsubpd128_mask,
306         __builtin_ia32_vfmsubpd128_maskz,
307         __builtin_ia32_vfmsubps256_mask,
308         __builtin_ia32_vfmsubps256_maskz,
309         __builtin_ia32_vfmsubps128_mask,
310         __builtin_ia32_vfmsubps128_maskz,
311         __builtin_ia32_vfmsubpd512_mask,
312         __builtin_ia32_vfmsubpd512_maskz,
313         __builtin_ia32_vfmsubps512_mask,
314         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
315         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
316         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
317         __builtin_ia32_vfmsubpd256.
318         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
319         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
320         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
321         Likewise.
322         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
323         Likewise.
324         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
325         Likewise.
326         (fmai_vmfmsub_<mode><round_name>): Likewise.
328 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
330         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
331         Remove plus.  Renamed to ...
332         (*sub<mode>3<mask_name>_bcst): This.
333         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
334         (*add<mode>3<mask_name>_bcst): This.
336 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
338         PR target/72782
339         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
341 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
343         PR target/87662
344         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
345         (_mm_or_epi32): Likewise.
346         (_mm256_xor_epi32): Likewise.
347         (_mm_xor_epi32): Likewise.
348         (_mm256_or_epi64): Likewise.
349         (_mm_or_epi64): Likewise.
350         (_mm256_xor_epi64): Likewise.
351         (_mm_xor_epi64): Likewise.
353 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
355         PR target/72782
356         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
358 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
360         PR middle-end/87647
361         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
363 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
365         * doc/ux.texi: Move @section directly after @node.
367 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
369         PR middle-end/85488
370         PR middle-end/87649
371         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
372         depend closely nested inside of loop with ordered clause with
373         a parameter.
375 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
377         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
378         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
379         * doc/ux.texi: New file.
381 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
383         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
384         be the first CR field allocated.
386 2018-10-19  Richard Biener  <rguenther@suse.de>
388         PR target/87657
389         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
390         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
392 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
394         PR target/72782
395         * config/i386/sse.md
396         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
397         (*add<mode>3<mask_name>_bcst_2): Likewise.
399 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
401         * config/i386/sse.md
402         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
403         Replace nonimmediate_operand with register_operand.
404         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
405         Likewise.
406         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
407         Likewise.
409 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
411         PR rtl-optimization/87596
412         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
413         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
414         for instructions in FROM..TO range.
416 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
418         * cfgexpand.c (expand_one_var): Use specific wording in error message
419         for non-local frame variables.
420         * stor-layout.c (layout_decl): Do not issue a warning for them.
422 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
424         * haifa-sched.c (priority): Add force_recompute parameter.
425         (apply_replacement): Call priority () with force_recompute = true.
426         (restore_pattern): Likewise.
428 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
430         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
431         HOST_BITS_PER_WIDE_INT.
432         (test_vector_ops_duplicate): Likewise.
434 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
436         PR target/72782
437         * config/i386/sse.md (VF_AVX512): New.
438         (avx512bcst): Likewise.
439         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
440         Likewise.
441         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
442         Likewise.
443         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
444         Likewise.
446 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
448         * doc/invoke.texi (-dumpversion): Improve grammar.
449         (-dumpfullversion): Make more consistent with -dumpversion.
451 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
453         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
454         Set JUMP_LABEL to the jump insn.
455         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
456         Predict emitted jump and add label to jump insn.
458 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
460         PR tree-optimization/87562
461         * input.c (get_substring_ranges_for_loc): Use
462         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
463         getting the linemap for the endpoint.  Verify that it's either
464         in the same linemap as the start point's spelling location, or
465         at least in the same file.
467 2018-10-18  Richard Biener  <rguenther@suse.de>
469         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
470         feed width-specific load/store costs through ix86_vec_cost.
471         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
472         (k8_cost): Likewise.
473         (bdver_cost): Likewise.
474         (znver1_cost): Likewise.
475         (btver1_cost): Likewise.
476         (btver2_cost): Likewise.
478 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
480         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
481         to simplify subreg of vec_merge.
483 2018-10-18  Richard Biener  <rguenther@suse.de>
485         * config/i386/i386.c: Fix costing of vector FMA.
487 2018-10-18  Richard Biener  <rguenther@suse.de>
489         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
490         and argument.
491         (ix86_builtin_vectorization_cost): For vec_construct properly
492         cost insertion into SSE regs.
493         (...): Adjust calls to ix86_vec_cost.
495 2018-10-18  Richard Biener  <rguenther@suse.de>
497         PR middle-end/87087
498         Revert
499         2018-02-07  Richard Biener  <rguenther@suse.de>
501         PR tree-optimization/84204
502         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
503         this place.
505 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
507         PR target/87537
508         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
509         of vec_duplicate.
510         (test_vector_ops_duplicate): Add test for a scalar subreg of a
511         VEC_MERGE of a VEC_DUPLICATE.
513 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
515         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
516         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
517         * doc/standards.texi (C Language): Document C2X.
518         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
519         (rl78_option_override): Handle "GNU C2X" language name.
521 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
523         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
524         Document C17 as published in 2018.
526 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
528         PR middle-end/87623
529         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
530         bail out if both sides do not have the same storage order.
532 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
534         * bitmap.c (bitmap_head::dump): New.
535         * bitmap.h (bitmap_head): Add dump().
536         * gimple-ssa-evrp-analyze.c
537         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
538         (evrp_range_analyzer::set_ssa_range_info): Same.
539         (evrp_range_analyzer::record_ranges_from_phis): Same.
540         (evrp_range_analyzer::record_ranges_from_stmt): Same.
541         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
542         * gimple-ssa-sprintf.c (get_int_range): Same.
543         (format_integer): Same.
544         (sprintf_dom_walker::handle_gimple_call): Same.
545         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
546         (ipcp_vr_lattice::top_p): Same.
547         (ipcp_vr_lattice::bottom_p): Same.
548         (ipcp_vr_lattice::set_to_bottom): Same.
549         (ipa_vr_operation_and_type_effects): Same.
550         (propagate_vr_across_jump_function): Same.
551         (ipcp_store_vr_results): Same.
552         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
553         (ipa_print_node_jump_functions_for_edge): Same.
554         (ipa_get_value_range): Same.
555         (ipa_compute_jump_functions_for_edge): Same.
556         (ipa_write_jump_function): Same.
557         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
558         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
559         Same.
560         * vr-values.c (set_value_range_to_nonnegative): Same.
561         (set_value_range_to_truthvalue): Same.
562         (vr_values::get_value_range): Same.
563         (vr_values::set_defs_to_varying): Same.
564         (vr_values::update_value_range): Same.
565         (symbolic_range_based_on_p): Same.
566         (vr_values::op_with_boolean_value_range_p): Same.
567         (vr_values::extract_range_for_var_from_comparison_expr): Same.
568         (vr_values::extract_range_from_ssa_name): Same.
569         (vr_values::extract_range_from_binary_expr): Same.
570         (vr_values::extract_range_from_unary_expr): Same.
571         (vr_values::extract_range_from_cond_expr): Same.
572         (vr_values::extract_range_from_comparison): Same.
573         (vr_values::check_for_binary_op_overflow): Same.
574         (vr_values::extract_range_basic): Same.
575         (vr_values::extract_range_from_assignment): Same.
576         (compare_ranges): Same.
577         (compare_range_with_value): Same.
578         (vr_values::adjust_range_with_scev): Same.
579         (vrp_valueize): Same.
580         (vrp_valueize_1): Same.
581         (vr_values::get_vr_for_comparison): Same.
582         (vr_values::compare_name_with_value): Same.
583         (vr_values::compare_names): Same.
584         (vr_values::vrp_evaluate_conditional): Same.
585         (find_case_label_ranges): Same.
586         (vr_values::vrp_visit_switch_stmt): Same.
587         (vr_values::extract_range_from_phi_node): Same.
588         (vr_values::simplify_div_or_mod_using_ranges): Same.
589         (vr_values::simplify_bit_ops_using_ranges): Same.
590         (test_for_singularity): Same.
591         (range_fits_type_p): Same.
592         (vr_values::simplify_cond_using_ranges_1): Same.
593         (vr_values::simplify_switch_using_ranges): Same.
594         (vr_values::simplify_float_conversion_using_ranges): Same.
595         (vr_values::two_valued_val_range_p): Same.
596         (vr_values::add_equivalence): Move to value_range::equiv_add.
597         * vr-values.h (vr_values::add_equivalence): Remove.
598         (VR_INITIALIZER): Remove.
599         * tree-vrp.c (value_range::set): New.
600         (value_range::equiv_add): New.
601         (value_range::value_range): New.
602         (value_range::deep_copy): New.
603         (value_range::check): New.
604         (value_range::equal_p): New.
605         (value_range::ignore_equivs_equal_p): New.
606         (value_range::operator==): New.
607         (value_range::operator!=): New.
608         (value_range::symbolic_p): New.
609         (value_range::numeric_p): New.
610         (value_range::set_undefined): New.
611         (value_range::set_varying): New.
612         (value_range::may_contain_p): New.
613         (value_range::equiv_clear): New.
614         (value_range::singleton_p): New.
615         (value_range::intersect): New.
616         (value_range::dump): New.
617         (value_range::set_and_canonicalize): New.
618         (set_value_range): Adjust for value_range API.
619         (set_value_range_to_undefined): Same.
620         (set_value_range_to_varying): Same.
621         (set_and_canonicalize_value_range): Same.
622         (set_value_range_to_nonnull): Same.
623         (set_value_range_to_null): Same.
624         (range_is_null): Same.
625         (range_is_nonnull): Same.
626         (range_int_cst_p): Same.
627         (range_int_cst_singleton_p): Same.
628         (symbolic_range_p): Same.
629         (range_includes_zero_p): Same.
630         (value_range_constant_singleton): Same.
631         (vrp_set_zero_nonzero_bits): Same.
632         (ranges_from_anti_range): Same.
633         (extract_range_into_wide_ints): Same.
634         (extract_range_from_multiplicative_op): Same.
635         (set_value_range_with_overflow): Same.
636         (extract_range_from_binary_expr_1): Same.
637         (extract_range_from_unary_expr): Same.
638         (dump_value_range): Same.
639         (debug_value_range): Same.
640         (vrp_prop::check_array_ref): Same.
641         (vrp_prop::check_mem_ref): Same.
642         (vrp_prop::vrp_initialize): Same.
643         (vrp_prop::visit_stmt): Same.
644         (intersect_ranges): Same.
645         (vrp_prop::visit_phi): Same.
646         (vrp_prop::vrp_finalize): Same.
647         (determine_value_range_1): Same.
648         (determine_value_range): Same.
649         (vrp_intersect_ranges_1): Rename to...
650         (vrp_intersect_1): this.
651         (vrp_intersect_ranges): Rename to...
652         (value_range::intersect_helper): ...this.
653         (vrp_meet_1): Rename to...
654         (value_range::union_helper): ...this.
655         (vrp_meet): Rename to...
656         (value_range::union_): ...this.
657         (copy_value_range): Remove.
658         * tree-vrp.h (struct value_range): Rewrite into a proper class.
659         (value_range::vrtype): New.
660         (value_range::type): New.
661         (value_range::equiv): New.
662         (value_range::min): New.
663         (value_range::max): New.
664         (value_range::varying_p): New.
665         (value_range::undefined_p): New.
666         (value_range::null_p): New.
667         (value_range::equiv_add): New.
668         (copy_value_range): Remove.
670 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
672         * Makefile.in (SELFTEST_TARGETS): New.
673         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
674         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
675         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
676         c/Make-lang.in.
677         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
678         (selftest-c++-gdb, selftest-c++-valgrind): Move to
679         cp/Make-lang.in.
680         * configure: Regenerate.
681         * configure.ac (selftest_languages): New.
683 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
685         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
686         overflow wraps argument.
687         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
688         wide_int_range_multiplicative_op.
689         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
690         overflow wraps argument.
691         (wide_int_range_multiplicative_op): Same.
692         (wide_int_range_lshift): Same.
693         (wide_int_range_div): Same.
694         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
695         (wide_int_range_lshift): Same.
696         (wide_int_range_div): Same.
698 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
700         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
701         use sign as argument.
702         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
703         wide_int_range_shift_undefined_p.
705 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
707         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
708         Rename to...
709         (@despeculate_copy<ALLI_TI:mode>): ... This.
710         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
711         switch statement.
713 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
715         * config.gcc: Obsolete *-*-solaris2.10*.
716         * doc/install.texi (Specific, *-*-solaris2*): Document it.
718 2018-10-12  Jeff Law  <law@redhat.com>
720         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
721         reg + sym +- const_int addressing modes.
723 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
725         * common.opt (fdiagnostics-minimum-margin-width=): New option.
726         * diagnostic-show-locus.c (layout::layout): Apply the minimum
727         margin width.
728         (layout::start_annotation_line): Only print up to 3 of the
729         margin character, to avoid touching the left-hand side.
730         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
731         minimum margin width, as set by test_diagnostic_context's ctor.
732         (selftest::test_fixit_insert_containing_newline): Likewise.
733         (selftest::test_fixit_insert_containing_newline_2): Likewise.
734         (selftest::test_line_numbers_multiline_range): Clear
735         dc.min_margin_width.
736         * diagnostic.c (diagnostic_initialize): Initialize
737         min_margin_width.
738         * diagnostic.h (struct diagnostic_context): Add field
739         "min_margin_width".
740         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
741         * opts.c (common_handle_option): Handle
742         OPT_fdiagnostics_minimum_margin_width_.
743         * selftest-diagnostic.c
744         (selftest::test_diagnostic_context::test_diagnostic_context):
745         Initialize min_margin_width to 6.
746         * toplev.c (general_init): Initialize global_dc->min_margin_width.
748 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
750         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
751         Fix usage of "error_at_rich_loc" in the comment.
753 2018-10-15  Renlin Li  <renlin.li@arm.com>
755         PR target/87563
756         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
757         if-conversioned loop when it contains ifn with types not
758         supported by backend.
759         * internal-fn.c (expand_direct_optab_fn): Add an assert.
760         (direct_internal_fn_supported_p): New helper function.
761         * internal-fn.h (direct_internal_fn_supported_p): Declare.
763 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
765         PR target/87572
766         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
767         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
768         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
770 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
772         PR tree-optimization/87022
773         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
774         bits in dist vector rather than the first one.
776 2018-10-15  Richard Biener  <rguenther@suse.de>
778         PR middle-end/87610
779         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
780         (visit_loadstore): When a used restrict tag escaped verify that
781         the points-to solution of "other" pointers do not include
782         escaped.
783         (compute_dependence_clique): If a used restrict tag escaped
784         communicated that down to visit_loadstore.
786 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
788         * config/s390/s390.c (s390_expand_vec_init): Force vector element
789         into reg if it isn't a general operand.
791 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
793         PR target/87599
794         * config/i386/sse.md (*vec_dupv2di): Add register source to
795         movddup.
797 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
799         PR target/87572
800         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
801         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
802         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
803         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
805 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
807         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
808         (notice_args_size): Set it in the current trace if no insn that can
809         throw internally has been seen yet.
810         (connect_traces): When connecting args_size between traces, allow the
811         incoming values not to match if there is an insn setting it before the
812         first insn that can throw internally; in that case, force the creation
813         of a CFI note on this latter insn.
815 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
817         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
818         the base class, because using the injected-class-name was not clearly
819         specified until DR 176.
821 2018-10-12  Paul Koning  <ni1d@arrl.net>
823         * config/pdp11/pdp11.md (doloop_end): New expander.
824         (doloop_end_insn): renamed from "doloop_end".
825         (addqi3): New pattern.
826         (subqi3): New pattern.
827         * config/pdp11/predicates.md (incdec_operand): New predicate.
829 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
831         PR middle-end/81376
832         * real.c (format_helper::can_represent_integral_type_p): New function
833         * real.h (format_helper::can_represent_integral_type_p): Ditto.
834         * match.pd: New pattern.
836 2018-10-12  Alexandre Oliva <oliva@adacore.com>
838         * configure.ac: Introduce --enable-large-address-aware
839         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
840         * doc/install.texi: Document it.
841         * configure, config.in: Rebuilt.
842         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
843         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
844         (LINK_SPEC): Insert it.
845         * config/i386/mingw-264.h: Likewise.
847         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
849 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
851         PR rtl-optimization/87600
852         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
854 2018-10-12  Paul Koning  <ni1d@arrl.net>
856         * doc/md.texi (doloop_end): Document that the pattern code may
857         need to check operand mode.
859 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
861         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
862         to zero-extend between int and floating-point registers.
863         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
864         ldp into floating-point registers.  Add type and arch attributes.
865         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
866         Use f_loads for type attribute.
868 2018-10-11  Martin Sebor  <msebor@redhat.com>
870         * doc/extend.texi (attribute packed): Correct typos.
872 2018-10-11  Martin Sebor  <msebor@redhat.com>
874         * doc/extend.texi (attribute flatten): Mention interaction with
875         noinline.
877 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
879         PR target/87156
880         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
881         Set new_decl virtual flag to zero.
883 2018-10-11  Martin Sebor  <msebor@redhat.com>
885         PR middle-end/87593
886         * doc/extend.texi (attribute format_arg): Discuss using multiple
887         attributes on a single function.
889 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
891         PR tree-optimization/86829
892         * match.pd (sin (atan (x))): New simplification rules.
893         (cos (atan (x))): Likewise.
894         * real.c (build_sinatan_real): New function.
895         * real.h (build_sinatan_real): Prototype.
897 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
899         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
900         function.
901         (fold_mergeeo_helper): New helper function.
902         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
903         intrinsics.  Correct some whitespace indentation issues.
905 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
907         PR target/87511
908         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
909         Use HOST_WIDE_INT_1U for shift.
911 2018-10-11  Doug Rupp  <rupp@adacore.com>
912             Olivier Hainque  <hainque@adacore.com>
914         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
915         Pass --relax to the linker for RTPs.
916         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
918 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
919             Jan Hubicka  <jh@suse.cz>
920             Martin Jambor  <mjambor@suse.cz>
922         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
923         the same elements are repeated rather than printing all of them.
924         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
925         "repeated" elements.
926         * read-rtl-function.c (test_loading_repeat): New function.
927         (read_rtl_function_c_tests): Call test_loading_repeat.
928         * rtl-tests.c (test_dumping_repeat): New function.
929         (rtl_tests_c_tests): Call test_dumping_repeat.
931 2018-10-11  Richard Biener  <rguenther@suse.de>
933         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
934         bdver?_cost): Unify to ...
935         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
936         * config/i386/i386.c (processor_cost_table): Adjust.
938 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
940         PR middle-end/87574
941         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
942         the thunk when expanding to GIMPLE.
944 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
946         * varasm.c (mergeable_string_section): Don't try to move zero-length
947         strings to the merge section.
949 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
951         PR target/87573
952         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
954 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
956         PR target/87550
957         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
958         to special_args set.
960 2018-10-10  Richard Biener  <rguenther@suse.de>
962         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
963         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
964         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
965         and recursing and pattern terminating the recursion on SSE
966         vector width using ix86_expand_reduc.
967         (reduc_sminmax_scal_<mode>): Split into part reducing to half
968         width and recursing and SSE2 vector variant doing the final
969         reduction with ix86_expand_reduc.
970         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
971         with terminating the recursion at AVX level, splitting that
972         to SSE there.
974 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
976         * genmatch.c (error_cb): Rename to...
977         (diagnostic_cb): ...this, converting int params to enums.
978         (fatal_at): Update for renaming.
979         (warning_at): Likewise.
980         (main): Likewise.
981         * input.c (selftest::ebcdic_execution_charset::apply):
982         Update for renaming of...
983         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
984         to...
985         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
986         converting level and reason to enums.
987         (class selftest::lexer_error_sink): Rename to...
988         (class selftest::lexer_test_options): ...this, renaming field
989         "m_errors" to "m_diagnostics".
990         (selftest::lexer_test_options::apply): Update for renaming of...
991         (selftest::lexer_test_options::on_error): ...this, renaming to...
992         (selftest::lexer_test_options::on_diagnostic): ...this
993         converting level and reason to enums.
994         (selftest::test_lexer_string_locations_raw_string_unterminated):
995         Update for renamings.
996         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
997         "reason".
999 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
1001         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1002         * config/rs6000/pmmintrin.h: New file.
1004 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1006         PR tree-optimization/86659
1007         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1009 2018-10-09  Richard Biener  <rguenther@suse.de>
1011         PR tree-optimization/63155
1012         * tree-ssa-structalias.c: Include tree-ssa.h.
1013         (get_constraint_for_ssa_var): For undefs return nothing_id.
1014         (find_func_aliases): Cleanup PHI handling.
1016 2018-10-09  Richard Biener  <rguenther@suse.de>
1018         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1019         replacements.
1021 2018-10-09  Martin Liska  <mliska@suse.cz>
1023         * asan.c (asan_emit_stack_protection): If a stack variable
1024         is located in a same file as current function, then emit
1025         line info into variable definition string.
1027 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1029         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1030         information.
1032 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1034         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1035         on the thunk.
1037 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1039         PR tree-optimization/86659
1040         * gimple-match.h (struct gimple_match_op): Add reverse field.
1041         (gimple_match_op::set_op): New overloaded method.
1042         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1043         the REF_REVERSE_STORAGE_ORDER flag on the value.
1044         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1045         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1046         
1047 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
1049         PR middle-end/63155
1050         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1051         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1053 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
1055         PR target/87517
1056         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1057         Defined with __builtin_ia32_vfmaddsubpd512_mask.
1059 2018-10-08  Richard Biener  <rguenther@suse.de>
1061         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1062         cost the same as AVX128 ones.
1064 2018-10-08  Paul Koning  <ni1d@arrl.net>
1066         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1067         (expand_block_move): New function.
1068         * config/pdp11/pdp11.c (output_block_move): Remove.
1069         (expand_block_move): New function.
1070         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1071         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1072         (*movmemhi1): Remove.
1074 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
1076         * config/s390/2827.md: Increase latencies for some FP instructions.
1078 2018-10-08  Richard Biener  <rguenther@suse.de>
1080         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1081         Open a dump scope.
1082         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1083         * tree-vectorizer.h (dump_stmt_cost): Adjust.
1084         (add_stmt_cost): Dump return value of the hook.
1086 2018-10-08  Richard Biener  <rguenther@suse.de>
1088         PR tree-optimization/63155
1089         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1090         (ssa_propagation_engine::ssa_propagate): Remove redundant
1091         bitmap bit clearing.
1093 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
1095         PR rtl-optimization/86939
1096         PR rtl-optimization/87479
1097         * ira.h (non_conflicting_reg_copy_p): New prototype.
1098         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1099         (make_hard_regno_dead): Don't add conflicts for register
1100         ignore_reg_for_conflicts.
1101         (make_object_dead): Likewise.
1102         (non_conflicting_reg_copy_p): New function.
1103         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1104         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1105         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1106         (make_hard_regno_dead): Don't add conflicts for register
1107         ignore_reg_for_conflicts.  Remove special conflict handling of
1108         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
1109         check_pic_pseudo_p and update callers.
1110         (mark_pseudo_dead): Don't add conflicts for register
1111         ignore_reg_for_conflicts.
1112         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1114 2018-10-05  Andrew Waterman  <andrew@sifive.com>
1115             Jim Wilson  <jimw@sifive.com>
1117         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1118         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
1119         new pattern using HONOR_SNANS that emits one extra instruction.
1121 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1123         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1124         patterns): Merge SI and DI patterns to a GPR pattern.
1125         (unnamed define_insn and define_split for record form of that): Merge
1126         to a single define_insn_and_split pattern.
1128 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
1130         PR c++/56856
1131         * input.c (expand_location_to_spelling_point): Add param "aspect"
1132         and use rather than hardcoding LOCATION_ASPECT_CARET.
1133         (get_substring_ranges_for_loc): Handle the case of a single token
1134         within a macro expansion.
1135         * input.h (expand_location_to_spelling_point): Add "aspect" param,
1136         defaulting to LOCATION_ASPECT_CARET.
1138 2018-10-05  Paul Koning  <ni1d@arrl.net>
1140         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1141         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1142         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1143         (pdp11_guard_type): New function.
1145 2018-10-05  Paul Koning  <ni1d@arrl.net>
1147         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1148         * config/pdp11/pdp11.opt (mfloat32): Remove.
1149         (mfloat64): Remove.
1150         * doc/invoke.texi (pdp11 -mfloat32): Remove:
1151         (pdp11 -mfloat64): Remove.
1153 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1155         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1156         (*cmp<mode>_cc_i387): Ditto.
1157         (*cmpu<mode>_cc_i387): Ditto.
1158         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1159         * config/i386/i386.c (ix86_expand_fp_compare): Remove
1160         "scratch" argument.
1161         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1162         Emit x86_sahf_1 pattern.
1163         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1164         (ix86_expand_carry_flag_compare): Ditto.
1166 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1168         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1169         to reg_or_0_operand.  Add "C" constraint.
1170         (*cmpxf_cc_i387): Ditto.
1171         (*cmp<mode>_i387): Change operand 2 predicate
1172         to nonimm_or_0_operand.  Add "C" constraint.
1173         (*cmp<mode>_cc_i387): Ditto.
1174         (*cmp<mode>_0_i387): Remove insn pattern.
1175         (*cmp<mode>_0_cc_i387): Ditto.
1177 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1179         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1180         * config/i386/predicates.md (nonimm_or_0_operand): Rename
1181         from vector_move_operand.  Update all uses.
1183 2018-10-05  Martin Sebor  <msebor@redhat.com>
1185         PR tree-optimization/87490
1186         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1187         consistently.
1189 2018-10-05  Richard Biener  <rguenther@suse.de>
1191         PR tree-optimization/63155
1192         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1193         vertical space in dumpfiles.
1194         * tree-ssa-propagate.h
1195         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1196         * tree-ssa-propagate.c (cfg_blocks_back): New global.
1197         (ssa_edge_worklist_back): Likewise.
1198         (curr_order): Likewise.
1199         (cfg_blocks_get): Remove abstraction.
1200         (cfg_blocks_add): Likewise.
1201         (cfg_blocks_empty_p): Likewise.
1202         (add_ssa_edge): Add to current or next worklist based on
1203         RPO index.
1204         (add_control_edge): Likewise.
1205         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1206         into ...
1207         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
1208         iteration from CFG and SSA edge worklist so we process
1209         everything in RPO order, prioritizing forward progress
1210         over iteration.
1211         (ssa_prop_init): Allocate new worklists, do not dump
1212         immediate uses.
1213         (ssa_prop_fini): Free new worklists.
1215 2018-10-05  Richard Biener  <rguenther@suse.de>
1217         * tree-core.h (tree_block::abstract_flag): Remove.
1218         (tree_block::block_num): Make full 32bits.
1219         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1220         * tree.h (BLOCK_ABSTRACT): Remove.
1221         * dwarf2out.c (gen_lexical_block_die): Remove dead code
1222         resulting from BLOCK_ABSTRACT being always false.
1223         (gen_inlined_subroutine_die): Likewise.
1224         (gen_block_die): Likewise.
1225         * tree.c (block_ultimate_origin): Likewise.
1226         * tree-pretty-print.c (dump_block_node): Remove code dealing
1227         with BLOCK_ABSTRACT.
1228         * tree-ssa-live.c (dump_scope_block): Likewise.
1229         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
1230         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
1232 2018-10-05   Richard Biener  <rguenther@suse.de>
1234         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
1235         is asked for initialize mode to the component mode of the
1236         vector type.
1238 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
1240         PR target/87522
1241         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
1242         assembler for -mavx.
1243         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
1245 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1247         PR target/87509
1248         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
1249         RS6000_BTM_DFP.
1250         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
1251         to be DImode.  When using mffscrn, force the operand to a register.
1253 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
1255         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
1256         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
1257         X87MODEF mode iterator.
1258         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
1259         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
1260         X87MODEF mode iterator.
1262 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
1264         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
1265         -Wno-prio-ctor-dtor.
1267 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1269         * Makefile.in (OBJS): Add opt-problem.o.
1270         * dump-context.h: Include "selftest.h.
1271         (selftest::temp_dump_context): New forward decl.
1272         (class dump_context): Make friend of class
1273         selftest::temp_dump_context.
1274         (dump_context::dump_loc_immediate): New decl.
1275         (class dump_pretty_printer): Move here from dumpfile.c.
1276         (class temp_dump_context): Move to namespace selftest.
1277         (temp_dump_context::temp_dump_context): Add param
1278         "forcibly_enable_dumping".
1279         (selftest::verify_dumped_text):
1280         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
1281         (selftest::verify_item):
1282         (ASSERT_IS_TEXT): Move here from dumpfile.c.
1283         (ASSERT_IS_TREE): Likewise.
1284         (ASSERT_IS_GIMPLE): Likewise.
1285         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
1286         to...
1287         (dump_context::dump_loc_immediate): ...this new function.
1288         (class dump_pretty_printer): Move to dump-context.h.
1289         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
1290         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
1291         (temp_dump_context::temp_dump_context): Move to "selftest"
1292         namespace.  Add param "forcibly_enable_dumping", and use it to
1293         conditionalize the use of m_pp;
1294         (selftest::verify_dumped_text): Make non-static.
1295         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
1296         (selftest::verify_item): Make non-static.
1297         (ASSERT_IS_TEXT): Move to dump-context.h.
1298         (ASSERT_IS_TREE): Likewise.
1299         (ASSERT_IS_GIMPLE): Likewise.
1300         (selftest::test_capture_of_dump_calls): Pass "true" for new
1301         param of temp_dump_context.
1302         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
1303         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
1304         TDF_COMPARE_DEBUG.
1305         * opt-problem.cc: New file.
1306         * opt-problem.h: New file.
1307         * optinfo-emit-json.cc
1308         (selftest::test_building_json_from_dump_calls): Pass "true" for
1309         new param of temp_dump_context.
1310         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
1311         (optinfo::emit_for_opt_problem): New function.
1312         (optinfo::emit): Clarity which emit_item is used.
1313         * optinfo.h (optinfo::get_dump_location): New accessor.
1314         (optinfo::emit_for_opt_problem): New decl.
1315         (optinfo::emit): Make const.
1316         * selftest-run-tests.c (selftest::run_tests): Call
1317         selftest::opt_problem_cc_tests.
1318         * selftest.h (selftest::opt_problem_cc_tests): New decl.
1319         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
1320         bool to opt_result, converting fprintf messages to
1321         opt_result::failure_at calls.  Add "stmt" param for use by the
1322         failure_at calls.
1323         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
1324         (runtime_alias_check_p): Convert return type from bool to
1325         opt_result, converting dump_printf calls to
1326         opt_result::failure_at, using the statement DDR_A for their
1327         location.
1328         (find_data_references_in_stmt): Convert return type from bool to
1329         opt_result, converting "return false" to opt_result::failure_at
1330         with a new message.
1331         * tree-data-ref.h: Include "opt-problem.h".
1332         (dr_analyze_innermost): Convert return type from bool to opt_result,
1333         and add a const gimple * param.
1334         (find_data_references_in_stmt): Convert return type from bool to
1335         opt_result.
1336         (runtime_alias_check_p): Likewise.
1337         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
1338         dr_analyze_innermost.
1339         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
1340         Convert return type from bool to opt_result, adding a message for
1341         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
1342         (vect_analyze_data_ref_dependence): Convert return type from bool
1343         to opt_result.  Change sense of return type from "false"
1344         effectively meaning "no problems" to "false" meaning a problem,
1345         so that "return false" becomes "return opt_result::success".
1346         Convert "return true" calls to opt_result::failure_at, using
1347         the location of statement A rather than vect_location.
1348         (vect_analyze_data_ref_dependences): Convert return type from bool
1349         to opt_result.
1350         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
1351         calls to opt_result::failure_at, using the stmt location rather
1352         than vect_location.
1353         (vect_verify_datarefs_alignment): Convert return type from bool
1354         to opt_result.
1355         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
1356         into multiple more-tightly-scoped copies.
1357         (vect_analyze_data_refs_alignment): Convert return type from bool
1358         to opt_result.
1359         (vect_analyze_data_ref_accesses): Likewise, converting a
1360         "return false" to a "return opt_result::failure_at", adding a
1361         new message.
1362         (vect_prune_runtime_alias_test_list): Convert return type from
1363         bool to opt_result, converting dump_printf_loc to
1364         opt_result::failure_at.  Add a %G to show the pertinent statement,
1365         and use the stmt's location rather than vect_location.
1366         (vect_find_stmt_data_reference): Convert return type from
1367         bool to opt_result, converting dump_printf_loc to
1368         opt_result::failure_at, using stmt's location.
1369         (vect_analyze_data_refs):  Convert return type from bool to
1370         opt_result.  Convert "return false" to "return
1371         opt_result::failure_at", adding messages as needed.
1372         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
1373         type from bool to opt_result.
1374         (vect_determine_vf_for_stmt): Likewise.
1375         (vect_determine_vectorization_factor): Likewise, converting
1376         dump_printf_loc to opt_result::failure_at, using location of phi
1377         rather than vect_location.
1378         (vect_analyze_loop_form_1): Convert return type from bool to
1379         opt_result, converting dump_printf_loc calls, retaining the use of
1380         vect_location.
1381         (vect_analyze_loop_form): Convert return type from loop_vec_info
1382         to opt_loop_vec_info.
1383         (vect_analyze_loop_operations): Convert return type from bool to
1384         opt_result, converting dump_printf_loc calls, using the location
1385         of phi/stmt rather than vect_location where available.  Convert
1386         various "return false" to "return opt_result::failure_at" with
1387         "unsupported phi" messages.
1388         (vect_get_datarefs_in_loop): Convert return type from bool to
1389         opt_result.  Add a message for the
1390         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
1391         (vect_analyze_loop_2): Convert return type from bool to
1392         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
1393         each "goto again;", adding new messages where needed.
1394         Add "unsupported grouped {store|load}" messages.
1395         (vect_analyze_loop): Convert return type from loop_vec_info to
1396         opt_loop_vec_info.
1397         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
1398         bool to opt_result.
1399         * tree-vect-stmts.c (process_use): Likewise, converting
1400         dump_printf_loc call and using stmt location, rather than
1401         vect_location.
1402         (vect_mark_stmts_to_be_vectorized): Likeise.
1403         (vect_analyze_stmt): Likewise, adding a %G.
1404         (vect_get_vector_types_for_stmt): Convert return type from bool to
1405         opt_result, converting dump_printf_loc calls and using stmt
1406         location, rather than vect_location.
1407         (vect_get_mask_type_for_stmt): Convert return type from tree to
1408         opt_tree, converting dump_printf_loc calls and using stmt location.
1409         * tree-vectorizer.c: Include "opt-problem.h.
1410         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
1411         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
1412         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
1413         enabled, use it to report at the top level "couldn't vectorize
1414         loop" followed by the problem.
1415         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
1416         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
1417         to opt_result.
1418         (vect_analyze_stmt): Likewise.
1419         (vect_get_vector_types_for_stmt): Likewise.
1420         (tree vect_get_mask_type_for_stmt): Likewise.
1421         (vect_analyze_data_ref_dependences): Likewise.
1422         (vect_enhance_data_refs_alignment): Likewise.
1423         (vect_analyze_data_refs_alignment): Likewise.
1424         (vect_verify_datarefs_alignment): Likewise.
1425         (vect_analyze_data_ref_accesses): Likewise.
1426         (vect_prune_runtime_alias_test_list): Likewise.
1427         (vect_find_stmt_data_reference): Likewise.
1428         (vect_analyze_data_refs): Likewise.
1429         (vect_analyze_loop): Convert return type from loop_vec_info to
1430         opt_loop_vec_info.
1431         (vect_analyze_loop_form): Likewise.
1432         (vect_analyze_slp): Convert return type from bool to opt_result.
1434 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1436         * doc/invoke.texi (-fopt-info): Document new "internals"
1437         sub-option.
1438         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
1439         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
1440         MSG_ALL_KINDS.
1441         (optinfo_verbosity_options): Add "internals".
1442         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
1443         (dump_context::apply_dump_filter_p): New member function.
1444         (dump_context::dump_loc): Use apply_dump_filter_p rather than
1445         explicitly masking the dump_kind.
1446         (dump_context::begin_scope): Increment the scope depth first.  Use
1447         apply_dump_filter_p rather than explicitly masking the dump_kind.
1448         (dump_context::emit_item): Use apply_dump_filter_p rather than
1449         explicitly masking the dump_kind.
1450         (dump_dec): Likewise.
1451         (dump_hex): Likewise.
1452         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
1453         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
1454         (opt_info_switch_p): Update handling of default
1455         MSG_OPTIMIZED_LOCATIONS to cope with default of
1456         MSG_PRIORITY_USER_FACING.
1457         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
1458         masking the dump_kind.
1459         (selftest::test_capture_of_dump_calls): Update test_dump_context
1460         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
1461         than MSG_ALL.  Generalize scope test to be run at all four
1462         combinations of with/without MSG_PRIORITY_USER_FACING and
1463         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
1464         for each of the two values.
1465         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
1466         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
1467         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
1468         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
1469         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
1470         with MSG_PRIORITY_*.
1471         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
1472         dump messages as MSG_PRIORITY_USER_FACING.
1473         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
1474         about the interaction with MSG_PRIORITY_*.
1476 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1478         * varasm.c (output_constant): Add new parameter merge_strings.
1479         Make strings properly zero terminated in merge string sections.
1480         (mergeable_string_section): Don't fail if the last char is non-zero.
1481         (assemble_variable_contents): Handle merge string sections.
1482         (assemble_variable): Likewise.
1483         (assemble_constant_contents): Likewise.
1484         (output_constant_def_contents): Likewise.
1485         (output_constructor_array_range,
1486         output_constructor_regular_field): Adjust call to output_constant.
1487         (output_object_block): Adjust call to assemble_constant_contents
1488         and assemble_variable_contents.
1490 2018-10-04  Martin Liska  <mliska@suse.cz>
1492         PR c/87483
1493         * cgraphunit.c (process_function_and_variable_attributes):
1494         Warn about a function with alias attribute and a body.
1496 2018-10-04  Martin Liska  <mliska@suse.cz>
1498         PR ipa/82625
1499         * multiple_target.c (redirect_to_specific_clone): New function.
1500         (ipa_target_clone): Use it.
1501         * tree-inline.c: Fix comment.
1503 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1505         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
1506         fields.
1507         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
1508         (gcc::dump_manager::register_pass): New member function, adapted
1509         from loop body in gcc::pass_manager::register_pass, adding a
1510         call to update_dfi_for_opt_info.
1511         (gcc::dump_manager::opt_info_enable_passes): Store the
1512         -fopt-info options into the new fields.  Move the loop
1513         bodies into...
1514         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
1515         function.
1516         * dumpfile.h (struct opt_pass): New forward decl.
1517         (gcc::dump_manager::register_pass): New decl.
1518         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
1519         (class gcc::dump_manager): Add fields "m_optgroup_flags",
1520         "m_optinfo_flags", and "m_optinfo_filename".
1521         * passes.c (gcc::pass_manager::register_pass): Move all of the
1522         dump-handling code to gcc::dump_manager::register_pass.
1524 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
1526         PR rtl-optimization/87466
1527         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
1528         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
1529         * doc/tm.texi: Regenerate.
1530         * ira-lives.c (process_bb_node_lives): Use the new target hook.
1531         * lra-lives.c (process_bb_lives): Likewise.
1532         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
1533         Define.
1535 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
1537         * params.c (add_params): Fix initialization.
1539 2018-10-04  Martin Liska  <mliska@suse.cz>
1541         PR gcov-profile/84107
1542         * tree-profile.c (init_ic_make_global_vars):
1543         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
1544         Come up with new ic_tuple* variables.  Emit
1545         __gcov_indirect_call{,_topn} variables.
1546         (gimple_gen_ic_profiler): Access the variable
1547         and emit gimple.
1548         (gimple_gen_ic_func_profiler): Access
1549         __gcov_indirect_call.callee field.
1550         (gimple_init_gcov_profiler): Use ptr_type_node.
1551         * value-prof.c (gimple_ic): Use ptr_type_node.
1553 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1555         PR tree-optimization/85787
1556         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
1557         into this function and add support for detecting multiple phis.
1558         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
1560 2018-10-04  Martin Liska  <mliska@suse.cz>
1562         PR ipa/87491
1563         * ipa-inline.c (inline_to_all_callers_1):
1564         Call ultimate_alias_target for node being inlined.
1566 2018-10-03  Jeff Law  <law@redhat.com>
1568         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
1569         target's wchar_t.
1570         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
1571         * tree.h (get_typenode_from_name): Prototype.
1573 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1575         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1576         Change operand 2 predicate to nonimmediate_operand.
1577         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1579 2018-10-03  Martin Sebor  <msebor@redhat.com>
1580             Jeff Law  <law@redhat.com>
1582         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
1583         initialize it.
1584         (get_string_length): Detect unterminated arrays.
1585         (format_string): Same.
1586         (format_directive): Warn about unterminated arrays.
1587         (handle_gimple_call): Mark statements with no_warning as needed.
1589 2018-10-03  Jim Wilson  <jimw@sifive.com>
1591         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
1592         also define __riscv_abi_rve.  Delete trailing white space.
1594 2018-10-03  Paul Koning  <ni1d@arrl.net>
1596         Enable LRA register allocator for PDP11.
1597         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
1598         (R): Likewise.
1599         (D): Likewise.
1600         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
1601         * config/pdp11/pdp11.opt (-mlra): New option.
1602         * doc/invoke.texi (PDP-11 Options): Document -mlra.
1604 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1606         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
1607         (*<absneg:code>extend<mode>xf2): Ditto.
1609 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1611         PR tree-optimization/87415
1612         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
1613         precision fields.
1615 2018-10-02  Jeff Law  <law@redhat.com>
1617         * gimple-fold.c (get_range_strlen): Only set *nonstr when
1618         an unterminated string is discovered.  Bubble up range
1619         even for unterminated strings.
1620         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
1621         indicates the string was not terminated via NONSTR.
1623 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1625         * tree-vrp.c (extract_range_from_unary_expr): Special case all
1626         pointer conversions.
1627         Do not do anything special for anti-ranges.
1629 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
1631         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
1632         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
1634 2018-10-03  Martin Liska  <mliska@suse.cz>
1636         PR gcov-profile/86109
1637         * coverage.c (coverage_begin_function): Do not
1638         mark lambdas as artificial.
1639         * tree-core.h (struct GTY): Remove tm_clone_flag
1640         and introduce new lambda_function.
1641         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
1643 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1645         PR target/87474
1646         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
1647         P8_VECTOR and VSX are enabled.
1649 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1651         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
1652         0x3907 as CPU model number.
1654 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1656         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
1657         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
1658         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
1659         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
1660         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
1661         * config/s390/s390.md: Likewise. Rename also the cpu attribute
1662         value from arch12 to z14.
1664 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1666         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
1667         (isinfxf2): Ditto.
1668         (isinf<mode>2): Ditto.
1670 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1672         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1673         before emitting fxam.  Perform calculations in XFmode.
1675 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1677         * match.pd (((X /[ex] A) +- B) * A): New transformation.
1679 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1681         PR middle-end/87319
1682         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1683         * tree.c (signed_or_unsigned_type_for): Handle complex.
1685 2018-10-02  Jeff Law  <law@redhat.com>
1687         * gimple-fold.c (get_range_strlen): Remove dead code.
1689 2018-10-02  Martin Sebor  <msebor@redhat.com>
1690             Jeff Law  <law@redhat.com>
1692         * builtins.c (unterminated_array): Add new arguments.
1693         If argument is not terminated, bubble up size and exact
1694         state to callers.
1695         (expand_builtin_strnlen): Detect, avoid expanding
1696         and diagnose unterminated arrays.
1697         (c_strlen): Fill in offset of start of unterminated strings.
1698         * builtins.h (unterminated_array): Update prototype.
1700 2018-10-02  Richard Biener  <rguenther@suse.de>
1702         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1703         of haddv4df, first reduce to SSE width and exploit the fact
1704         that we only need element zero with the reduction result.
1705         (reduc_plus_scal_v2df): Likewise.
1707 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1709         * dojump.h (do_jump): Delete.
1710         (do_jump_1): Likewise.
1711         (split_comparison): Move around.
1712         * dojump.c (do_jump): Make static.
1713         (do_jump_1): Likewise.
1714         (jumpifnot): Move around.
1715         (jumpifnot_1): Likewise.
1716         (jumpif): Likewise.
1717         (jumpif_1): Likewise.
1718         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1720 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1722         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1723         insns in the delay slot and add_insn_after for the jump insn.
1725 2018-10-02  Richard Biener  <rguenther@suse.de>
1727         * tree-inline.c (expand_call_inline): Use the location of
1728         the callee declaration for the inline-entry marker.
1729         * final.c (notice_source_line): Remove special-casing of
1730         NOTE_INSN_INLINE_ENTRY.
1732 2018-10-01  Carl Love  <cel@us.ibm.com>
1734         PR 69431
1735         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1736         (__builtin_mtfsb0): New.
1737         (__builtin_mtfsb1): New.
1738         ( __builtin_set_fpscr_rn): New.
1739         (__builtin_set_fpscr_drn): New.
1740         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1741         (rs6000_expand_set_fpscr_rn_builtin): Add.
1742         (rs6000_expand_set_fpscr_drn_builtin): Add.
1743         (rs6000_expand_builtin): Add case statement entries for
1744         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1745         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1746         RS6000_BUILTIN_MFFSL.
1747         (rs6000_init_builtins): Add ftype initialization and def_builtin
1748         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1749         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1750         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1751         rs6000_mffscdrn): Add define_insn.
1752         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1753         * doc/extend.texi: Add documentation for the builtins.
1755 2018-10-01  Richard Biener  <rguenther@suse.de>
1757         PR tree-optimization/87465
1758         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1759         causing branch miscounts.
1761 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1763         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1764         aarch64_option_default_param):  New.
1765         (params.h): Include.
1766         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1767         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1768         stack-clash protection validation code.
1770 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1772         * params.c (validate_param): New.
1773         (add_params): Use it.
1774         (set_param_value): Refactor param validation into validate_param.
1775         (diagnostic.h): Include.
1776         * diagnostic.h (diagnostic_ready_p): New.
1778 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1780         * params.c (set_param_value):
1781         Add index of parameter being validated.
1782         * common/common-target.def (option_validate_param): New.
1783         * common/common-targhooks.h (default_option_validate_param): New.
1784         * common/common-targhooks.c (default_option_validate_param): New.
1785         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1786         * doc/tm.texi: Regenerate.
1788 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1790         PR target/86486
1791         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1792         Add validation for stack-clash parameters and set defaults.
1794 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1796         PR target/86486
1797         * configure.ac: Add stack-clash-protection-guard-size.
1798         * doc/install.texi: Document it.
1799         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1800         * params.def: Update comment for guard-size.
1801         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1802         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1803         * configure: Regenerate.
1805 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1807         PR target/86486
1808         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1809         STACK_DYNAMIC_OFFSET): New.
1810         * config/aarch64/aarch64.c (aarch64_layout_frame):
1811         Update outgoing args size.
1812         (aarch64_stack_clash_protection_alloca_probe_range,
1813         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1815 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1817         PR target/86486
1818         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1819         probe ranges.
1820         * target.def (stack_clash_protection_alloca_probe_range): New.
1821         (stack_clash_protection_final_dynamic_probe): Remove.
1822         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1823         (default_stack_clash_protection_final_dynamic_probe): Remove.
1824         * targhooks.c: Likewise.
1825         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1826         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1827         * doc/tm.texi: Regenerate.
1829 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1831         PR target/86486
1832         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1833         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1834         aarch64_clamp_to_uimm12_shift): New.
1835         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1836         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1838 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1840         PR target/86486
1841         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1843 2018-10-01  Jeff Law  <law@redhat.com>
1844             Richard Sandiford <richard.sandiford@linaro.org>
1845             Tamar Christina  <tamar.christina@arm.com>
1847         PR target/86486
1848         * config/aarch64/aarch64.md
1849         (probe_stack_range): Add k (SP) constraint.
1850         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1851         STACK_CLASH_MAX_UNROLL_PAGES): New.
1852         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1853         stack probes for stack clash.
1854         (aarch64_allocate_and_probe_stack_space): New.
1855         (aarch64_expand_prologue): Use it.
1856         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1857         (aarch64_sub_sp): Add emit_move_imm optional param.
1859 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
1861         PR tree-optimization/87261
1862         * match.pd: Remove trailing whitespace.
1863         Add (x & y) | ~(x | y) -> ~(x ^ y),
1864         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1866 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1868         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1869         constraints.
1870         (ashlsi3_insn): Update instruction constraints.
1871         (ashrsi3_insn): Likewise.
1872         (rotrsi3): Likewise.
1873         (add_shift): Likewise.
1874         * config/arc/constraints.md (Csz): New 32 bit constraint. It
1875         avoids placing in the limm field small constants which, otherwise,
1876         could end into a small instruction.
1878 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
1880         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1881         destination register is not odd-even.
1882         (umaddsidi4_split): Likewise.
1884 2018-10-01  Richard Biener  <rguenther@suse.de>
1886         * tree-inline.c (expand_call_inline): Store origin of fn
1887         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1888         * tree.c (block_ultimate_origin): Simplify and do some
1889         checking.
1891 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
1893         * config/i386/mmx.md (EMMS): New int iterator.
1894         (emms): New int attribute.
1895         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1896         EMMS int iterator.  Explicitly declare clobbers.
1897         (mmx_emms): Remove expander.
1898         (mmx_femms): Ditto.
1899         * config/i386/predicates.md (emms_operation): Remove predicate.
1900         (vzeroall_pattern): New predicate.
1901         (vzeroupper_pattern): Rename from vzeroupper_operation.
1902         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1903         vzeroupper_pattern and vzeroall_pattern predicates.
1905 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
1907         PR rtl-optimization/86939
1908         * ira-lives.c (make_hard_regno_born): Rename from this...
1909         (make_hard_regno_live): ... to this.  Remove update to conflict
1910         information.  Update function comment.
1911         (make_hard_regno_dead): Add conflict information update.  Update
1912         function comment.
1913         (make_object_born): Rename from this...
1914         (make_object_live): ... to this.  Remove update to conflict information.
1915         Update function comment.
1916         (make_object_dead):  Add conflict information update.  Update function
1917         comment.
1918         (mark_pseudo_regno_live): Call make_object_live.
1919         (mark_pseudo_regno_subword_live): Likewise.
1920         (mark_hard_reg_dead): Update function comment.
1921         (mark_hard_reg_live): Call make_hard_regno_live.
1922         (process_bb_node_lives): Likewise.
1923         * lra-lives.c (make_hard_regno_born): Rename from this...
1924         (make_hard_regno_live): ... to this.  Remove update to conflict
1925         information.  Remove now uneeded check_pic_pseudo_p argument.
1926         Update function comment.
1927         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1928         to conflict information.  Update function comment.
1929         (mark_pseudo_live): Remove update to conflict information.  Update
1930         function comment.
1931         (mark_pseudo_dead): Add conflict information update.
1932         (mark_regno_live): Call make_hard_regno_live.
1933         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1934         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1936 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
1938         PR target/87370
1939         * config/i386/i386.c (construct_container): Use TImode for
1940         BLKmode values in 2 integer registers.
1942 2018-09-29  Jeff Law  <law@redhat.com>
1944         * builtins.c (unterminated_array): Pass in c_strlen_data * to
1945         c_strlen rather than just a tree *.
1946         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1947         Update recursive calls appropriately.  If caller did not provide a
1948         suitable data pointer, create a local one.  When a non-terminated
1949         string is discovered, bubble up information about the string via the
1950         c_strlen_data object.
1951         * builtins.h (c_strlen): Update prototype.
1952         (c_strlen_data): New structure.
1953         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1954         For a type 2 call, if c_strlen indicates a non-terminated string
1955         use the length of the non-terminated string.
1956         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1958 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
1960         PR target/87467
1961         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1962         __m512d type for __A argument rather than __m512.
1964 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
1966         * match.pd (simple_comparison): Don't optimize if either operand is
1967         a function pointer when target needs function pointer canonicalization.
1969 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1971         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1972         power5 .. power9 to remove indirection.
1973         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1974         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1975         ASM_CPU_476_SPEC): Delete.
1976         (ASM_CPU_SPEC): Adjust.
1977         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1978         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1980 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1982         * config.in: Delete HAVE_AS_DCI.
1983         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1984         * config/rs6000/rs6000.h: Ditto.
1985         * configure.ac: Delete HAVE_AS_DCI.
1986         * configure: Regenerate.
1988 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
1990         * config.in (HAVE_AS_LWSYNC): Delete.
1991         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1992         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1993         do it as a .long .
1994         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1995         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1996         as a .long .
1997         * configure.ac: Delete HAVE_AS_LWSYNC.
1998         * configure: Regenerate.
2000 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2001             Pierre-Marie de Rodat  <derodat@adacore.com>
2003         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2004         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2005         (cgraph_node::create_thunk): Add indirect_offset parameter.
2006         (thunk_adjust): Likewise.
2007         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2008         and initialize the corresponding field with it.
2009         (cgraph_node::dump): Dump indirect_offset field.
2010         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2011         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2012         (thunk_adjust): Add indirect_offset parameter and deal with it.
2013         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2014         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
2015         or if the thunk is external or local.  Fix formatting.  Do not chain
2016         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
2017         if any, in the GIMPLE representation.
2018         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2019         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2020         (input_node): Read indirect_offset field.
2021         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2022         call to thunk_adjust.
2023         * tree-nested.c (struct nesting_info): Add thunk_p field.
2024         (create_nesting_tree): Set it.
2025         (convert_all_function_calls): Copy static chain from targets to thunks.
2026         (finalize_nesting_tree_1): Return early for thunks.
2027         (unnest_nesting_tree_1): Do not finalize thunks.
2028         (gimplify_all_functions): Do not gimplify thunks.
2030 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2032         * opt-suggestions.c (option_proposer::build_option_suggestions):
2033         Release "option_values".
2035 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2037         * coverage.c (get_coverage_counts): Convert problem-reporting dump
2038         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2039         * dumpfile.c (kind_as_string): New function.
2040         (dump_loc): Rather than a hardcoded prefix of "note: ", use
2041         kind_as_string to vary the prefix based on dump_kind.
2042         (selftest::test_capture_of_dump_calls): Update for above.
2044 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2046         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2047         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
2049 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2051         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2052         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2053         INVALID_REGNUM instead of FPSR_REG.
2054         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2055         * config/i386/i386.md: Update comment of FP compares.
2056         (fldenv): Do not clobber FPSR_REG.
2058 2018-09-28  Richard Biener  <rguenther@suse.de>
2060         * tree.h (BLOCK_ORIGIN): New.
2061         * omp-expand.c (grid_expand_target_grid_body): Assign
2062         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2063         * tree-inline.c (remap_block): Likewise.
2064         * auto-profile.c (get_function_decl_from_block): Simplify
2065         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2066         * langhooks.c (lhd_print_error_function): Likewise.
2067         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2068         Likewise.
2069         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2070         * tree.c (block_nonartificial_location): Likewise.
2071         (block_ultimate_origin): Likewise.
2072         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
2073         no longer needed LTO case.
2075 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
2076             Jan Hubicka  <jh@suse.cz>
2077             Martin Jambor  <mjambor@suse.cz>
2079         * simplify-rtx.c (simplify_merge_mask): New function.
2080         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2081         same masks are used in op1 or op2.
2082         (test_vec_merge): New function.
2083         (test_vector_ops): Call test_vec_merge.
2085 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2087         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2088         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2089         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2090         (cypress_costs): Set it.
2091         (supersparc_costs): Likewise.
2092         (hypersparc_costs): Likewise.
2093         (leon_cost): Likewise.
2094         (leon3_costs): Likewise.
2095         (sparclet_costs): Likewise.
2096         (ultrasparc_costs): Likewise.
2097         (ultrasparc_costs): Likewise.
2098         (niagara_costs): Likewise.
2099         (niagara2_costs): Likewise.
2100         (niagara3_costs): Likewise.
2101         (niagara4_costs): Likewise.
2102         (niagara7_costs): Likewise.
2103         (m8_costs): Likewise.
2104         (TARGET_CAN_FOLLOW_JUMP): Define.
2105         (pass_work_around_errata::gate): Minor tweak.
2106         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2107         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2108         Automaitcally clear MASK_FSMULD mask for V7 processors.
2109         (sparc_can_follow_jump): New static function.
2110         (output_ubranch): Deal with CROSSING_JUMP_P.
2111         (sparc_use_sched_lookahead): Rewrite using switch statement.
2112         (sparc_issue_rate): Reorder.
2113         (sparc_branch_cost): New function.
2115 2018-09-27  Martin Sebor  <msebor@redhat.com>
2117         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2118         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2119         (int_fits_type_p): Same.
2121 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
2123         * config/i386/i386.md (FPCR_REG): Remove.
2124         (UNSPEC_FLDCW): Remove.
2125         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2126         (x86_fldcw_1): Remove insn pattern.
2127         (fnstenv): Do not clobber FPCR_REG.
2128         (fldenv): Ditto.
2129         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2130         (CALL_USED_REGISTERS): Ditto.
2131         (REG_ALLOC_ORDER): Ditto.
2132         (REG_CLASS_CONTENTS): Ditto.
2133         (HI_REGISTER_NAMES): Ditto.
2134         (ADDITIONAL_REGISTER_NAMES): Use defines instead
2135         of numerical constants.
2136         * config/i386/i386.c (regclass_map): Remove fpsr register.
2137         (dbx_register_map): Ditto.
2138         (dbx64_register_map): Ditto.
2139         (svr4_dbx_register_map): Ditto.
2140         (print_reg): Do not handle FPCR_REG.
2142 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
2144         PR target/87149
2145         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2146         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2147         Delete, always treat as true.
2148         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2149         Ditto.  Simplify remaining code.
2150         * config/powerpcspe/powerpcspe.h: Ditto.
2151         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2152         Simplify remaining code.
2153         (rs6000_expand_builtin): Ditto.
2154         * config/rs6000/rs6000.h: Ditto.
2155         * configure.ac: Ditto.
2156         * configure: Regenerate.
2158 2018-09-27  Martin Liska  <mliska@suse.cz>
2160         * coverage.c (get_coverage_counts): Revert the formatting
2161         of missing profile opt info.
2163 2018-09-27  Richard Biener  <rguenther@suse.de>
2165         PR debug/37801
2166         PR debug/87440
2167         * dwarf2out.c (set_block_origin_self): Do not mark outermost
2168         block as we do not output that.
2169         (gen_inlined_subroutine_die): Elide the originally outermost
2170         block, matching what we do for concrete instances.
2171         (decls_for_scope): Add parameter specifying whether to recurse
2172         to subblocks.
2174 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
2175             Tom de Vries  <tom@codesourcery.com>
2177         PR 82089
2179         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2180         STORE_FLAG_VALUE == 1.
2182 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
2184         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2185         constant definitions.
2186         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2187         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2188         ("speculation_barrier"): New expander definition.
2190 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
2192         PR gcov-profile/86957
2193         * common.opt: New warning option -Wmissing-profile.
2194         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2195         * doc/invoke.texi: Document -Wmissing-profile.
2197 2018-09-26  Jim Wilson  <jimw@sifive.com>
2199         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2200         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2202 2018-09-26  Martin Sebor  <msebor@redhat.com>
2204         * tree.c (zerop): Change return type to bool.
2205         (integer_zerop, integer_onep, integer_each_onep): Same.
2206         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2207         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2208         (real_onep, real_minus_onep, chain_index): Same.
2209         (print_type_hash_statistics, type_list_equal): Same.
2210         * tree.h (zerop): Same.
2211         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2212         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2213         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2214         (real_onep, real_minus_onep, chain_index): Same.
2215         (print_type_hash_statistics, type_list_equal): Same.
2217 2018-09-26  Jim Wilson  <jimw@sifive.com>
2219         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2221 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
2223         PR target/87414
2224         * config/i386/i386.c: Include debug.h and dwarf2out.h.
2225         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2226         call.
2228 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
2230         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
2232 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2234         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
2235         and FP_SECOND_SSE_REGS.
2236         (REG_CLASS_NAMES): Ditto.
2237         (REG_CLASS_CONTENTS): Ditto.
2238         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
2239         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
2240         (ix86_preferred_output_reload_class): Ditto.
2241         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
2242         clobber constraint to "=&f".
2243         (fix_truncdi_i387): Ditto.
2244         (lrintxfdi2): Ditto.
2245         (fistdi2_<rounding>): Ditto.
2246         (fpremxf4_i387): Change "=u" constraint to "=f".
2247         (fprem1xf4_i387): Ditto.
2248         (sincosxf3): Ditto.
2249         (fptanxf4_i387): Ditto.
2250         (fxtractxf3_i387): Ditto.
2251         (fscalexf4_i387): Ditto.
2252         (atan2xf3): Change "u" constraint to "f".
2253         (fyl2xxf3_i387): Ditto.
2254         (fyl2xp1xf3_i387): Ditto.
2256 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2258         PR target/87439
2259         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
2260         for removed I387_MASK_PM entity.
2263 2018-09-26  Jeff Law  <law@redhat.com>
2264         Revert
2265         2018-09-26  Alexey Neyman  <stilor@att.net>
2267         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2268         headers are no longer pulled in by <isl/val.h>.
2270 2018-09-26  Richard Biener  <rguenther@suse.de>
2272         PR debug/87443
2273         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
2274         or concrete instance DIE to the tree.  Create abstract origin
2275         attributes also for concrete instances.
2277 2018-09-26  Alexey Neyman  <stilor@att.net>
2279         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2280         headers are no longer pulled in by <isl/val.h>.
2282 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
2284         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
2285         Use new helper functions.
2286         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
2287         Use new helper functions.
2288         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
2289         aarch_mm_needs_release): New declarations.
2290         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
2291         aarch_mm_needs_release): New.
2293 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2295         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
2296         (arm32_output_mi_thunk): Deal with long calls.
2298 2018-09-26  Richard Biener  <rguenther@suse.de>
2300         PR debug/87428
2301         PR debug/87362
2302         * tree-inline.c (expand_call_inline): When the location
2303         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2304         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2305         the inserted BLOCK to make inlined_function_outer_scope_p
2306         recognize it.
2307         * dwarf2out.c (add_call_src_coords_attributes): Do not add
2308         coords for reserved locations.
2310 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2312         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
2313         (*call_indirect_nonlocal_sysv<mode>): Ditto.
2314         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
2315         (*sibcall_nonlocal_sysv<mode>): Ditto.
2316         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
2317         (<bd>_<mode>): Ditto.
2318         (<bd>tf_<mode>): Ditto.
2320 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2322         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
2323         control string as a list of templates instead of as C code.
2324         (*altivec_movti): Ditto.
2325         * config/rs6000/darwin.md (movdf_low_di): Ditto.
2327 2018-09-25  Jim Wilson  <jimw@sifive.com>
2329         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
2330         when target symbol is weak.
2332 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2334         PR c/87387
2335         * builtins.c (unterminated_array): Simplify.
2336         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
2337         where pointer arithmetic is safe.
2339 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2341         PR target/86987
2342         * config/rs6000/altivec.md (altivec_vspltb): Use
2343         const_0_to_15_operand instead of u5bit_cint_operand.
2344         (*altivec_vspltb_internal): Ditto.
2345         (altivec_vspltb_direct): Ditto.
2346         (altivec_vsplth): Use const_0_to_7_operand instead of
2347         u5bit_cint_operand.
2348         (*altivec_vsplth_internal): Ditto.
2349         (altivec_vsplth_direct): Ditto.
2350         (altivec_vspltw): Use const_0_to_3_operand instead of
2351         u5bit_cint_operand.
2352         (*altivec_vspltw_internal): Ditto.
2353         (altivec_vspltw_direct): Ditto.
2354         (altivec_vspltsf): Ditto.
2355         (*altivec_vspltsf_internal): Ditto.
2356         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
2357         various splats with the proper size immediate.  Reorder the various
2358         cases by ascending size of immediate, and put all such together.
2360 2018-09-25  Richard Biener  <rguenther@suse.de>
2362         PR debug/83941
2363         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
2364         GC-ification.
2365         (maybe_create_die_with_external_ref): Do not create
2366         DW_TAG_imported_unit here.
2367         (add_abstract_origin_attribute): Handle external BLOCK refs.
2368         (dwarf2out_abstract_function): Simplify LTO case.
2369         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
2370         rather than using maybe_create_die_with_external_ref.
2372 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
2374         PR target/71278
2375         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
2376         (frndintxf2_mask_pm_i387): Ditto.
2377         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
2378         Enable for !flag_trapping_math.
2379         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
2380         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
2381         Change operand 1 predicate to nonimmediate_operand.
2382         (attr "i387_cw"): Remove mask_pm.
2383         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
2384         (enum ix86_entity): Remove I387_MASK_PM.
2385         * config/i386/i386.c (ix86_i387_mode_needed): Do not
2386         handle I387_MASK_PM.
2387         (ix86_mode_needed): Ditto.
2388         (ix86_mode_after): Ditto.
2389         (ix86_mode_entry): Ditto.
2390         (ix86_mode_exit): Ditto.
2391         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
2393 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
2395         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
2396         to_update_switch_stmts to vNULL instead of calling create on them
2397         immediately.
2399 2018-09-25  Richard Biener  <rguenther@suse.de>
2401         PR tree-optimization/87402
2402         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
2403         (visit_phi): Re-instantiate handling of supposed to be VARYING
2404         but non-VARYING backedge value.
2406 2018-09-25  Richard Biener  <rguenther@suse.de>
2408         PR debug/83941
2409         * dwarf2out.c (struct sym_off_pair): New.
2410         (external_die_map): New global.
2411         (lookup_decl_die): When in LTO create DIEs lazily from the
2412         external_die_map.
2413         (lookup_block_die): New function, create DIEs lazily in LTO.
2414         (equate_block_to_die): New function.
2415         (dwarf2out_die_ref_for_decl): During WPA get the association
2416         from the external DIE map.
2417         (dwarf2out_register_external_die): Record mapping into the
2418         external DIE map.
2419         (maybe_create_die_with_external_ref): New function split out from
2420         DIE generation part of old dwarf2out_register_external_die.
2421         (add_abstract_origin_attribute): Do not return the DIE.  When
2422         in LTO reference externals directly.
2423         (dwarf2out_abstract_function): When in LTO ignore calls for
2424         decls with external DIEs (already present abstract instances).
2425         (gen_call_site_die): Adjust.
2426         (add_high_low_attributes): Likewise.
2427         (gen_lexical_block_die): Likewise.
2428         (gen_inlined_subroutine_die): Likewie.
2429         (gen_block_die): Likewise.
2430         (dwarf2out_inline_entry): Likewise.
2431         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
2432         DIEs.
2434 2018-09-25  Martin Liska  <mliska@suse.cz>
2436         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
2437         integers and not by a float value.
2439 2018-09-25  Martin Liska  <mliska@suse.cz>
2441         PR fortran/87394
2442         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
2443         instead of NULL.
2444         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
2445         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
2446         * godump.c (go_format_type): Remove extra parenthesis.
2448 2018-09-25  Martin Liska  <mliska@suse.cz>
2450         * alias.c (set_dest_equal_p): Remove unused function.
2451         * config/i386/i386.c (def_builtin_pure2): Likewise.
2452         * diagnostic-show-locus.c (class layout): Remove
2453         unused field.
2454         (layout::layout): Likewise here.
2455         * dump-context.h (class temp_dump_context): Likewise.
2456         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
2457         (add_AT_loclistsptr): Likewise.
2458         (add_AT_offset): Likewise.
2459         (get_AT_hi_pc): Likewise.
2460         (is_comdat_die): Likewise.
2461         (type_is_enum): Likewise.
2462         (ceiling): Likewise.
2463         (add_AT_vms_delta): Likewise.
2464         (is_class_die): Likewise.
2465         * edit-context.c (class line_event): Remove unused field.
2466         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
2467         unused function.
2468         * ipa-cp.c (ipa_get_vr_lat): Likewise.
2469         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
2470         (ok_for_base_p_nonstrict): Likewise.
2471         * tree-chrec.c (is_not_constant_evolution): Likewise.
2472         (chrec_fold_poly_cst): Likewise.
2473         * tree-if-conv.c (has_pred_critical_p): Likewise.
2474         * tree-ssa-coalesce.c (print_exprs): Likewise.
2475         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
2476         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
2477         * tree-vrp.c (value_ranges_intersect_p): Likewise.
2478         (value_range_nonnegative_p): Likewise.
2480 2018-09-25  Martin Liska  <mliska@suse.cz>
2482         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2483         Do not handle "GNU Pascal".
2484         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2485         Likewise.
2486         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
2487         from documentation. Likewise.
2488         * dbxout.c (dbxout_range_type): Likewise.
2489         * doc/cpp.texi: Likewise.
2490         * doc/extend.texi: Likewise.
2491         * doc/frontends.texi: Likewise.
2492         * doc/invoke.texi: Remove Pascal entry.
2493         * tree.def (CLEANUP_POINT_EXPR): Likewise.
2494         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
2496 2018-09-25  Martin Liska  <mliska@suse.cz>
2498         PR middle-end/86078
2499         * doc/invoke.texi: Document all parameters and remove default
2500         of the parameters.
2502 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2504         PR bootstrap/87417
2505         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
2506         contains HOST_WIDE_INTs when computing its size.
2508 2018-09-24  Jim Wilson  <jimw@sifive.com>
2510         PR target/87391
2511         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
2512         not TARGET_RVE.
2513         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
2515 2018-09-24  Andrew Pinski  <apinski@marvell.com>
2517         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2518         access prev before checking it for NULLness in the
2519         AARCH64_FUSE_CMP_BRANCH case.
2521 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
2523         PR target/82699
2524         * config/i386/i386.c (rest_of_insert_endbranch): Set
2525         endbr_queued_at_entrance to true and don't insert ENDBR if
2526         x86_function_profiler will be called.
2527         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2528         is true.
2529         * config/i386/i386.h (machine_function): Add
2530         endbr_queued_at_entrance.
2532 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2534         * genattrtab.c (mk_attr_alt): Use alternative_mask.
2535         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
2536         types.
2537         (check_attr_test): Use alternative_mask.
2538         (get_attr_value): Likewise.
2539         (compute_alternative_mask): Use alternative_mask and XWINT.
2540         (make_alternative_compare): Use alternative_mask.
2541         (attr_alt_subset_p): Use XWINT.
2542         (attr_alt_subset_of_compl_p): Likewise.
2543         (attr_alt_intersection): Use alternative_mask and XWINT.
2544         (attr_alt_union): Likewise.
2545         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
2546         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
2547         (simplify_test_exp): Use alternative_mask and XWINT.
2548         (write_test_expr): Use alternative_mask and XWINT, adjust bit
2549         number calculation to support 64 bits.  Generate code that
2550         checks 64-bit masks.
2551         (main): Use alternative_mask.
2552         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2554 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2556         PR target/80080
2557         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
2558         RETURN+USE when returning via %r14.
2560 2018-09-24  Martin Liska  <mliska@suse.cz>
2562         * gcov.c (output_lines): Print colorization legend
2563         for both flag_use_colors and flag_use_hotness_colors.
2564         Reword the help.
2566 2018-09-24  Martin Liska  <mliska@suse.cz>
2568         * coverage.c (get_coverage_counts): Use warning_at
2569         with current_function_decl location. Use %qD in warning
2570         message.
2572 2018-09-24  Martin Liska  <mliska@suse.cz>
2574         * memory-block.h (memory_block_pool::release): Annotate with
2575         valgrind that the memory is not accessible.
2577 2018-09-24  Martin Liska  <mliska@suse.cz>
2579         PR sanitizer/85774
2580         * asan.c: Make asan_handled_variables extern.
2581         * asan.h: Likewise.
2582         * cfgexpand.c (expand_stack_vars): Make sure
2583         a representative is unpoison if another
2584         variable in the partition is handled by
2585         use-after-scope sanitization.
2587 2018-09-24  Richard Biener  <rguenther@suse.de>
2589         PR tree-optimization/63155
2590         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2591         the worklist when the edge of the respective argument isn't
2592         executable.
2594 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2596         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
2597         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
2598         (MASK_CLASS_P): Update for rename.
2599         (MAYBE_MASK_CLASS_P): Ditto.
2600         (REG_CLASS_NAMES): Update.
2601         (REG_CLASS_CONTENT): Update.
2602         * config/i386/i386.c (regclass_map): Update for MASK_REG
2603         and ALL_MASK_REGS rename.
2604         * config/i386/constraints.md (Yk): Update for rename.
2605         (k): Ditto.
2607 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2609         * config/i386/i386.h (enum reg_class): Remove
2610         EVEX_SSE_REGS and MOD4_SSE_REGS.
2611         (REG_CLASS_NAMES): Update.
2612         (REG_CLASS_CONTENT): Update.
2613         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
2614         registers as ALL_SSE_REGS.
2615         (ix86_additional_allocno_class_p): Remove.
2616         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
2617         (ix86_register_priority): Lower priority of EVEX SSE registers.
2618         Use IN_RANGE macro where appropriate.
2619         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
2620         AVX-5124VNNIW checks.
2621         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
2622         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
2623         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
2624         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
2625         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
2626         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
2627         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
2628         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
2629         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
2630         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
2631         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
2632         * config/i386/constraints.md (Yh): Remove.
2634 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2636         * config/i386/i386.c (regclass_map): Declare integer REX registers
2637         as GENERAL_REGS.
2639 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
2641         * doc/service.texi (Service): Switch the fsf.org link to https.
2643 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2645         PR target/86798
2646         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2647         Define to speculation_safe_value_not_needed.
2649 2018-09-21  Florian Weimer  <fweimer@redhat.com>
2651         PR middle-end/81035
2652         * doc/extend.texi (Common Function Attributes): Mention that
2653         noreturn suppresses tail call optimization.
2655 2018-09-21  Jeff Law  <law@redhat.com>
2657         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
2658         vr_values::cleanup_edges_and_switches.
2659         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
2660         vr_values class.
2661         (identify_jump_threads): Remove EDGE_IGNORE handling.
2662         (execute_vrp): Move handling of to_remove_edges and
2663         to_update_switch_stmts into vr_values class member functions.
2664         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
2665         (to_update_switch_stmts): Likewise.
2666         * vr-values.c: Include cfghooks.h.
2667         (vr_values::vr_values): Initialize to_remove_edges and
2668         to_update_switch_stmts.
2669         (vr_values::~vr_values): Verify to_remove_edges and
2670         to_update_switch_stmts are empty.
2671         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2672         (vr_values::cleanup_edges_and_switches): New member function.
2673         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2674         function.  Add new data members.
2676 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
2678         PR tree-optimization/87309
2679         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2680         calls with pflags and alt_flags.
2681         (selftest::test_capture_of_dump_calls): Add test of interaction of
2682         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2684 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2686         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2688 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2690         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2692 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2694         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2695         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2696         (VXWORKS_LIBS_RTP): Minor reordering.
2698 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2700         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2701         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2703 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2705         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2706         (PTRDIFF_TYPE): Likewise.
2708 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2710         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2711         triplet, similar to support for VxWorks7.
2712         * config/vxworks-dummy.h: Provide a default definition
2713         of TARGET_VXWORKS64 to 0.
2715 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2717         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2718         * config/vxworks-dummy.h: here.
2720 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2722         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2724 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
2725             Bo Zhou  <zbo.zhou@hisilicon.com>
2727         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2728         * config/aarch64/aarch64-tune.md: Regenerated.
2729         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2730         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2731         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2733 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
2734             Julian Brown  <julian@codesourcery.com>
2736         * builtins.c (get_builtin_sync_mem): Handle address spaces.
2738 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2740         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2741         if the call takes a static chain.
2743 2018-09-21  Martin Liska  <mliska@suse.cz>
2745         * auto-profile.c (autofdo_source_profile::read): Do not
2746         set sum_all.
2747         (read_profile): Do not add working sets.
2748         (read_autofdo_file): Remove sum_all.
2749         (afdo_callsite_hot_enough_for_early_inline): Remove const
2750         qualifier.
2751         * coverage.c (struct counts_entry): Remove gcov_summary.
2752         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2753         do not support GCOV_TAG_PROGRAM_SUMMARY.
2754         (get_coverage_counts): Remove summary and expected
2755         arguments.
2756         * coverage.h (get_coverage_counts): Likewise.
2757         * doc/gcov-dump.texi: Remove -w option.
2758         * gcov-dump.c (dump_working_sets): Remove.
2759         (main): Do not support '-w' option.
2760         (print_usage): Likewise.
2761         (tag_summary): Likewise.
2762         * gcov-io.c (gcov_write_summary): Do not dump
2763         histogram.
2764         (gcov_read_summary): Likewise.
2765         (gcov_histo_index): Remove.
2766         (gcov_histogram_merge): Likewise.
2767         (compute_working_sets): Likewise.
2768         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2769         it not obsolete.
2770         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2771         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2772         (GCOV_HISTOGRAM_SIZE): Remove.
2773         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2774         (struct gcov_summary): Simplify rapidly just
2775         to runs and sum_max fields.
2776         (gcov_histo_index): Remove.
2777         (NUM_GCOV_WORKING_SETS): Likewise.
2778         (compute_working_sets): Likewise.
2779         * gcov-tool.c (print_overlap_usage_message): Remove
2780         trailing empty line.
2781         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2782         (output_lines): Remove program related line.
2783         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2784         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2785         histogram.
2786         (input_profile_summary): Do not read it.
2787         (merge_profile_summaries): And do not merge it.
2788         (input_symtab): Do not call removed function.
2789         * modulo-sched.c (sms_schedule): Do not print sum_max.
2790         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2791         removed when histogram method was invented.
2792         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2793         mode.
2794         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2795         GCOV coding style.
2796         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2797         and dump selected value.
2798         * profile.c (add_working_set): Remove.
2799         (get_working_sets): Likewise.
2800         (find_working_set): Likewise.
2801         (get_exec_counts): Do not work with working sets.
2802         (read_profile_edge_counts): Do not inform as sum_max is removed.
2803         (compute_branch_probabilities): Likewise.
2804         (compute_value_histograms): Remove argument for call of
2805         get_coverage_counts.
2806         * profile.h: Do not make gcov_summary const.
2808 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
2810         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2812 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2814         PR tree-optimization/86990
2815         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2816         Check that the entire merged store group is made of constants only for
2817         overlapping stores.
2819 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2821         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2822         (VTABLE_VERIFICATION_SPEC): Likewise.
2823         (SANITIZER_EARLY_SPEC): Likewise.
2824         (SANITIZER_SPEC): Likewise.
2825         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2826         * doc/invoke.texi (Link Options): Document -r.
2828 2018-09-20  Richard Biener <rguenther@suse.de>
2830         PR middle-end/87054
2831         * gimplify.c (gimplify_expr): Retain alignment of
2832         addressable lvalue in dereference.
2834 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
2836         PR bootstrap/87013
2837         * configure.ac: Check for .loc is_stmt support.
2838         * configure, config.in: Rebuilt.
2839         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2840         if not supported.
2842 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2844         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2845         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2846         -misel=no.
2848 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
2850         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2851         VECTOR_OTHER.
2852         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2853         case VECTOR_OTHER.
2855 2018-09-20  Marek Polacek  <polacek@redhat.com>
2857         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2859 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2861         PR tree-optimization/87288
2862         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2863         into account when determining PEELING_FOR_NITERS.
2865 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
2867         PR tree-optimization/86877
2868         * tree-vect-loop.c (vect_analyze_loop_2): Call
2869         vect_verify_datarefs_alignment.
2871 2018-09-19  Marek Polacek  <polacek@redhat.com>
2873         * doc/invoke.texi: Document -Wclass-conversion.
2875 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
2877         * config/pa/pa.c (pa_adjust_priority): Delete.
2878         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2880         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2881         (atomic_storehi): Likewise.
2882         (atomic_storesi): Likewise.
2883         (atomic_loaddi): Restore compare and swap exchange loop code.
2885 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
2887         PR rtl-optimization/86902
2888         * combine.c (try_combine): When changing the CC mode used, don't change
2889         an unrelated mode in other_insn to that new CC mode.
2891 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
2893         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2894         with %T in place of calls to dump_generic_expr.
2895         (prune_runtime_alias_test_list): Likewise.
2896         (create_runtime_alias_checks): Likewise.
2897         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2898         (vect_analyze_data_ref_dependence): Likewise.
2899         (vect_slp_analyze_data_ref_dependence): Likewise.
2900         (vect_record_base_alignment): Likewise.  Use %G in place of call
2901         to dump_gimple_stmt.
2902         (vect_compute_data_ref_alignment): Likewise.
2903         (verify_data_ref_alignment): Likewise.
2904         (vect_find_same_alignment_drs): Likewise.
2905         (vect_analyze_group_access_1): Likewise.
2906         (vect_analyze_data_ref_accesses): Likewise.
2907         (dependence_distance_ge_vf): Likewise.
2908         (dump_lower_bound): Likewise.
2909         (vect_prune_runtime_alias_test_list): Likewise.
2910         (vect_find_stmt_data_reference): Likewise.
2911         (vect_analyze_data_refs): Likewise.
2912         (vect_create_addr_base_for_vector_ref): Likewise.
2913         (vect_create_data_ref_ptr): Likewise.
2914         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2915         (vect_can_advance_ivs_p): Likewise.
2916         (vect_update_ivs_after_vectorizer): Likewise.
2917         (vect_gen_prolog_loop_niters): Likewise.
2918         (vect_prepare_for_masked_peels): Likewise.
2919         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2920         (vect_determine_vectorization_factor): Likewise.
2921         (vect_is_simple_iv_evolution): Likewise.
2922         (vect_analyze_scalar_cycles_1): Likewise.
2923         (vect_analyze_loop_operations): Likewise.
2924         (report_vect_op): Likewise.
2925         (vect_is_slp_reduction): Likewise.
2926         (check_reduction_path): Likewise.
2927         (vect_is_simple_reduction): Likewise.
2928         (vect_create_epilog_for_reduction): Likewise.
2929         (vect_finalize_reduction:): Likewise.
2930         (vectorizable_induction): Likewise.
2931         (vect_transform_loop_stmt): Likewise.
2932         (vect_transform_loop): Likewise.
2933         (optimize_mask_stores): Likewise.
2934         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2935         (vect_split_statement): Likewise.
2936         (vect_recog_over_widening_pattern): Likewise.
2937         (vect_recog_average_pattern): Likewise.
2938         (vect_determine_min_output_precision_1): Likewise.
2939         (vect_determine_precisions_from_range): Likewise.
2940         (vect_determine_precisions_from_users): Likewise.
2941         (vect_mark_pattern_stmts): Likewise.
2942         (vect_pattern_recog_1): Likewise.
2943         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2944         (vect_record_max_nunits): Likewise.
2945         (vect_build_slp_tree_1): Likewise.
2946         (vect_build_slp_tree_2): Likewise.
2947         (vect_print_slp_tree): Likewise.
2948         (vect_analyze_slp_instance): Likewise.
2949         (vect_detect_hybrid_slp_stmts): Likewise.
2950         (vect_detect_hybrid_slp_1): Likewise.
2951         (vect_slp_analyze_operations): Likewise.
2952         (vect_slp_analyze_bb_1): Likewise.
2953         (vect_transform_slp_perm_load): Likewise.
2954         (vect_schedule_slp_instance): Likewise.
2955         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2956         (vect_mark_stmts_to_be_vectorized): Likewise.
2957         (vect_init_vector_1): Likewise.
2958         (vect_get_vec_def_for_operand): Likewise.
2959         (vect_finish_stmt_generation_1): Likewise.
2960         (vect_check_load_store_mask): Likewise.
2961         (vectorizable_call): Likewise.
2962         (vectorizable_conversion): Likewise.
2963         (vectorizable_operation): Likewise.
2964         (vectorizable_load): Likewise.
2965         (vect_analyze_stmt): Likewise.
2966         (vect_is_simple_use): Likewise.
2967         (vect_get_vector_types_for_stmt): Likewise.
2968         (vect_get_mask_type_for_stmt): Likewise.
2969         * tree-vectorizer.c (increase_alignment): Likewise.
2971 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
2973         * doc/rtl.texi: Adjust vec_select description.
2974         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2975         non-constant selectors.
2977 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
2979         * config/aarch64/aarch64-protos.h
2980         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2981         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2982         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2983         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2984         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2985         (AARCH64_FL_PROFILE): Move index so flags are ordered.
2986         (AARCH64_ISA_RCPC8_4): New flag.
2987         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2988         to aarch64_offset_9bit_signed_unscaled_p.
2989         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2990         and use stlur.
2991         * config/aarch64/constraints.md (Ust): New constraint.
2992         * config/aarch64/predicates.md.
2993         (aarch64_9bit_offset_memory_operand): New predicate.
2994         (aarch64_rcpc_memory_operand): New predicate.
2996 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
2998         PR rtl-optimization/87361
2999         * rtlanal.c (nonzero_bits1): Revert accidental change.
3001 2018-09-19  Richard Biener  <rguenther@suse.de>
3003         PR tree-optimization/87349
3004         PR tree-optimization/87342
3005         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3007 2018-09-18  Marek Polacek  <polacek@redhat.com>
3009         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3010         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3012 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3014         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3016 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3018         PR rtl-optimization/86882
3019         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3021 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
3023         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3024         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3026 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
3028         PR other/87353
3029         * doc/invoke.texi (Link Options): Fix formatting and grammar.
3031 2018-09-18  Richard Biener  <rguenther@suse.de>
3033         PR middle-end/63155
3034         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3035         (compute_samebase_partition_bases): Likewise.
3036         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3037         (gimple_can_coalesce_p): Simplify.
3039 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
3041         Handle a library implementation of ffs calling __builtin_ffs.
3042         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3043         (mmix_init_libfuncs): New function: make __builtin_ffs expand
3044         to __ffsdi2.
3046 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3048         * diagnostic-show-locus.c (class layout_range): Add field
3049         "m_original_idx".
3050         (layout_range::layout_range): Add "original_idx" param and use it
3051         to initialize new field.
3052         (make_range): Use 0 for original_idx.
3053         (layout::layout): Pass in index to calls to
3054         maybe_add_location_range.
3055         (layout::maybe_add_location_range): Add param "original_idx" and
3056         pass it on to layout_range.
3057         (layout::print_any_labels): Pass on range->m_original_idx to
3058         get_text call.
3059         (gcc_rich_location::add_location_if_nearby): Use 0 for
3060         original_idx.
3061         * gcc-rich-location.h (text_range_label::get_text): Update for new
3062         param.
3063         (range_label_for_type_mismatch::get_text): Likewise.
3065 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3067         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3069 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3071         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3072         format_string_diagnostic_t.
3073         (fmtwarn_n): Likewise.
3074         * substring-locations.c
3075         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3076         (format_warning_n_va): Convert to...
3077         (format_string_diagnostic_t::emit_warning_n_va): ...this.
3078         (format_warning_va): Convert to...
3079         (format_string_diagnostic_t::emit_warning_va): ...this.
3080         (format_warning_at_substring): Convert to...
3081         (format_string_diagnostic_t::emit_warning): ...this.
3082         (format_warning_at_substring_n): Convert to...
3083         (format_string_diagnostic_t::emit_warning_n): ...this.
3084         * substring-locations.h (class format_string_diagnostic_t): New
3085         class.
3086         (format_warning_va): Convert to
3087         format_string_diagnostic_t::emit_warning_va.
3088         (format_warning_n_va): Convert to
3089         format_string_diagnostic_t::emit_warning_n_va.
3090         (format_warning_at_substring): Convert to
3091         format_string_diagnostic_t::emit_warning.
3092         (format_warning_at_substring_n): Convert to
3093         format_string_diagnostic_t::emit_warning_n.
3095 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
3096             Bernd Schmidt <bernds_cb1@t-online.de>
3098         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3099         SImode args.
3101 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3103         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3104         operand 0 predicate to nonimmediate operand.
3105         (rint<mode>2_frndint): Remove insn pattern.
3106         (rint<mode>2): Change operand 1 predicate to general_operand.
3107         Extend operand 1 to XFmode and generate rintxf2 insn.
3108         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3109         Do not use X87MODEF mode macro.
3110         (frndintxf2_<rounding>_i387): Rename from
3111         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
3112         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3113         to XFmode and generate significandxf3 insn.
3115 2018-09-17  Richard Biener  <rguenther@suse.de>
3117         PR tree-optimization/87328
3118         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3119         visiting unexecutable backedges when not iterating.
3120         (do_rpo_vn): Mark all edges not executable even when not
3121         iterating.
3123 2018-09-17  Martin Jambor  <mjambor@suse.cz>
3125         PR c/63886
3126         * doc/invoke.texi (Warning Options): Likewise.
3128 2018-09-17  Richard Biener  <rguenther@suse.de>
3130         PR tree-optimization/87301
3131         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3132         clean EH info from leftover copy assignments.
3134 2018-09-17  Martin Liska  <mliska@suse.cz>
3136         PR gcov-profile/85871
3137         * gcov.c (output_intermediate_file): Fix out of bounds
3138         access.
3140 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
3142         * config/arc/arc.c: Object attributes for core4 not reflected
3143         correctly.
3144         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3145         core3).
3147 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
3149         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3151 2018-09-17  Martin Liska  <mliska@suse.cz>
3153         * doc/gcov.texi: Document new option --use-hotness-colors.
3154         * gcov.c (struct source_info): Declare new field.
3155         (source_info::source_info): Set default for maximum_count.
3156         (print_usage): Add new -q option.
3157         (process_args): Process it.
3158         (accumulate_line_info): Save src->maximum_count.
3159         (output_line_beginning): Make color line number if
3160         flag_use_hotness_colors is set.
3161         (output_line_details): Pass default argument value.
3162         (output_lines): Pass src->maximum_count.
3164 2018-09-17  Martin Liska  <mliska@suse.cz>
3166         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3167         Use processor_names table.
3168         * config/i386/i386.c (ix86_default_align): Use
3169         processor_cost_table for alignment values.
3170         (ix86_option_override_internal): Use processor_names.
3171         (ix86_function_specific_print): Likewise.
3172         * config/i386/i386.h (struct processor_costs):
3173         Add alignment values.
3174         (struct ptt): Remove and replace with const char *.
3175         * config/i386/x86-tune-costs.h (struct processor_costs):
3176         Declare default alignments for all costs.
3178 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
3180         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3181         symbolics or VR_VARYING ranges for ABS_EXPR.
3182         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3183         when range will wrap.
3185 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
3187         PR middle-end/86864
3188         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3189         before and after a JUMP_TABLE_DATA.
3191 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
3193         PR middle-end/87188
3194         * dojump.c (do_compare_and_jump): Canonicalize function pointers
3195         when one operand is a function pointer.  Use POINTER_TYPE_P and
3196         FUNC_OR_METHOD_TYPE_P.
3197         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3198         * fold-const.c (build_range_check): Likewise.
3199         * match.pd (simple_comparison): Likewise.
3201 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
3203         PR c/82967
3204         * spellcheck.c (get_edit_distance_cutoff): New function.
3205         (selftest::test_edit_distance_unit_test_oneway): Rename to...
3206         (selftest::test_get_edit_distance_one_way): ...this.
3207         (selftest::test_get_edit_distance_unit): Rename to...
3208         (selftest::test_get_edit_distance_both_ways): ...this.
3209         (selftest::test_edit_distances): Move tests to this new function,
3210         and test some more pairs of strings.  Update for above renaming.
3211         (selftest::get_old_cutoff): New function.
3212         (selftest::test_get_edit_distance_cutoff): New function.
3213         (selftest::assert_suggested_for): New function.
3214         (ASSERT_SUGGESTED_FOR): New macro.
3215         (selftest::assert_not_suggested_for): New function.
3216         (ASSERT_NOT_SUGGESTED_FOR): New macro.
3217         (selftest::test_suggestions): New function.
3218         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3219         tests to selftest::test_edit_distances and call it.  Add calls to
3220         selftest::test_get_edit_distance_cutoff and
3221         selftest::test_suggestions.
3222         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3223         (best_match::consider): Replace hard-coded cutoff calculation with
3224         a call to...
3225         (best_match::get_cutoff): New declaration.
3226         (best_match::get_best_meaningful_candidate): Likewise.
3228 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3230         * builtins.c (fold_builtin_strlen): Remove TODO comment.
3232 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3234         revert:
3235         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3237         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3238         terminated string literal.
3240 2018-09-14  Martin Sebor  <msebor@redhat.com>
3242         * builtins.c (unterminated_array): Handle ARRAY_REF.
3243         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
3244         * builtins.h (unterminated_array): Declare extern.
3245         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
3246         arrays.
3247         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
3248         calls.
3250 2018-09-14  Martin Sebor  <msebor@redhat.com>
3251             Jeff Law  <law@redhat.com>
3253         * builtins.c (unterminated_array): New.
3254         (expand_builtin_strcpy): Adjust.
3255         (expand_builtin_strcpy_args): Detect unterminated arrays.
3256         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
3257         unterminated arrays.
3258         * gimple-fold.h (get_maxval_strlen): Add argument.
3259         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
3261         * gimple-fold.c (get_range_strlen): Add argument.
3262         (get_maxval_strlen): Adjust.
3263         * gimple-fold.h (get_range_strlen): Add argument.
3265 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
3267         * config/i386/movdirintrin.h: Fix copyright year.
3269 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
3271         * reg-stack.c: Include regs.h.
3272         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
3273         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
3274         FIRST_STACK_REG, not DFmode.
3275         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
3276         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
3277         (change stack): Default register mode to the reg_raw_mode of
3278         FIRST_STACK_REG, not DFmode.
3279         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
3280         (*swapxf): Rename from swapxf.
3282 2018-09-14  Carl Love  <cel@us.ibm.com>
3284         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
3285         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
3287 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
3289         PR target/87224
3290         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
3291         alternatives.
3293 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
3295         PR target/85628
3296         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
3298 2018-09-14  Jason Merrill  <jason@redhat.com>
3300         Fix --enable-gather-detailed-mem-stats.
3301         * hash-table.c (hash_table_usage): Change from variable to function.
3302         * hash-table.h: Adjust.
3303         * Makefile.in: Add missing dependencies on hash-table.h.
3305 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3307         PR tree-optimization/87259
3308         PR lto/87283
3309         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
3310         execute_cse_reciprocals_1 has tried transforming.
3312 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
3314         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
3315         VR_VARYING for PLUS/MINUS_EXPR.
3317 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
3319         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
3320         formatting.
3322 2018-09-14  Richard Biener  <rguenther@suse.de>
3324         PR middle-end/63155
3325         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
3326         bits for the merged partition.
3328 2018-09-13  Martin Sebor  <msebor@redhat.com>
3329             Bernd Edlinger  <bernd.edlinger@hotmail.de>
3331         * builtins.h (c_srlen): Add argument.
3332         * builtins.c (warn_string_no_nul): New function.
3333         (c_strlen): Add argument and use it.  Update recursive calls.
3334         Pass DECL argument to string_constant to get info on non
3335         terminated strings.  Update *NONSTR as needed.
3336         (fold_builtin_strlen): Add argument to calls to c_strlen.
3337         Warn for unterminated arrays.
3338         (warn_string_no_null): Add prototype.
3339         * expr.c (string_constant): Update arguments.  Update recursive
3340         calls appropriately.  Detect missing NUL terminator and outermost
3341         declaration its missing in.
3342         Improve checks for arrays with nonzero lower bound or elements
3343         that are not a single byte.  Simplify offset computation.
3344         Simplify checks for non-NUL terminated strings.
3345         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
3346         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
3348 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3350         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
3351         correctly.
3352         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
3353         argument.  Fix range checks.
3354         * fold-const.h (c_getstr): Adjust protoype.
3355         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
3356         string is constant but contains no NUL byte.
3358         * expr.c (string_constant): Adjust function comment.
3359         Remove bogus check for zero termination.
3361         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
3363         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
3364         (get_constant_size): Don't make STRING_CSTs larger than they are.
3365         (check_string_literal): New check function for STRING_CSTs.
3366         (output_constant): Use it.
3368 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3370         PR target/86812
3371         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
3373 2018-09-13  Richard Biener  <rguenther@suse.de>
3375         PR tree-optimization/87263
3376         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
3377         (struct unwind_state): Add max_rpo field.
3378         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
3379         Compute max_rpo, the max RPO number a block can be backwards reached
3380         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
3381         separating it from the iterating mode.
3383 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
3385         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
3386         (rfs_decision): New scheduling decision.
3388 2018-09-13  Richard Biener  <rguenther@suse.de>
3390         PR bootstrap/87134
3391         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
3392         (vn_nary_op_insert_pieces_predicated): Do not write useless
3393         valid_dominated_by_p entry outside of the allocated storage.
3395 2018-09-13  Omar Sandoval  <osandov@osandov.com>
3396             Tom de Vries  <tdevries@suse.de>
3398         PR debug/86985
3399         * dwarf2out.c (is_c): New function.
3400         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
3402 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
3404         PR target/85628
3405         * config/aarch64/aarch64.md (*aarch64_bfxil):
3406         Define.
3407         * config/aarch64/constraints.md (Ulc): Define.
3408         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
3409         Define.
3410         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
3411         New function.
3413 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
3415         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
3416         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
3417         aarch64_layout_frame call.
3418         (aarch64_expand_epilogue): Likewise.
3419         (aarch64_initial_elimination_offset): Likewise.
3420         (aarch64_get_separate_components): Likewise.
3421         (aarch64_use_return_insn_p): Likewise.
3422         (aarch64_layout_frame): Remove unneeded check.
3424 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3426         * configure.ac: Only append
3427         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
3428         gcc_config_arguments if it was never reconfigured or last reconfigure
3429         was with different arguments.
3430         * configure: Regenerated.
3432 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3433             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3435         PR middle-end/87290
3436         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
3437         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
3439 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3441         PR tree-optimization/87287
3442         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
3443         X % C == 0 to X % (unsigned) C == 0 optimization to ...
3444         * match.pd (X % C == 0): ... here.  New optimization.
3446 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3448         PR middle-end/82853
3449         * expr.h (maybe_optimize_mod_cmp): Declare.
3450         * expr.c (mod_inv): New function.
3451         (maybe_optimize_mod_cmp): New function.
3452         (do_store_flag): Use it.
3453         * cfgexpand.c (expand_gimple_cond): Likewise.
3455 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
3456             Julian Brown  <julian@codesourcery.com>
3458         PR middle-end/86336
3459         * gimplify.c (gimplify_scan_omp_clauses): Set
3460         target_firstprivatize_array_bases in OpenACC parallel and kernels
3461         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
3462         OpenACC data regions.
3464 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
3466         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
3467         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
3469 2018-09-12  Richard Biener  <rguenther@suse.de>
3471         PR tree-optimization/87280
3472         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
3473         edge but unreachable target.
3474         (do_rpo_vn): For conservatively handling a PHI only mark
3475         the backedge executable but not the block reachable.
3477 2018-09-12  Richard Biener  <rguenther@suse.de>
3479         PR tree-optimization/87266
3480         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
3481         visited blocks.
3483 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
3485         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3486         constants.
3487         ("trunc<BFP:mode><DFP_ALL:mode>2")
3488         ("trunc<DFP_ALL:mode><BFP:mode>2")
3489         ("extend<BFP:mode><DFP_ALL:mode>2")
3490         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3491         according to the target operand type.
3493 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3494             Andreas Krebbel  <krebbel@linux.ibm.com>
3496         PR tree-optimization/86844
3497         * gimple-ssa-store-merging.c
3498         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
3499         there are any overlapping stores in between them, make sure they are
3500         also coalesced or we give up completely.
3502 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3504         PR middle-end/87248
3505         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3506         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
3508 2018-09-12  Tom de Vries  <tdevries@suse.de>
3510         * common.opt (gdescribe-dies): Add option.
3511         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
3512         attribute for artifical and nameless decls.
3513         (dwarf2out_register_external_die): Add description attribute to
3514         external reference die.
3515         (add_desc_attribute): New functions.
3516         (gen_subprogram_die): Add description attribute to
3517         DW_TAG_call_site_parameter.
3518         * tree-pretty-print.c (print_generic_expr_to_str): New function.
3519         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
3520         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
3521         -gno-describe-dies.
3522         (@item -gdescribe-dies): Add.
3524 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3526         * tree-vrp.c (vrp_shift_undefined_p): Remove.
3527         (extract_range_from_binary_expr_1: Call
3528         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
3529         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
3530         depend on sign.
3532 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3534         * gimple-ssa-warn-alloca.c
3535         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
3536         field for ALLOCA_BOUND_*_LARGE.
3538 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3540         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
3542 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3544         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
3545         for clobbers.  Remove obsolete comment.
3547 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3549         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
3550         mpxchk, mpxld and mpxst types.
3551         (define_attr length_immediate): Remove all processing of mpx types.
3552         (define_attr prefix_0f): Ditto.
3553         (define_attr memory): Ditto.
3555 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3557         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
3558         (log<mode>2): Change operand 1 predicate to general_operand.
3559         Extend operand 1 to XFmode and generate logxf3 insn.
3560         (log10<mode>2): Change operand 1 predicate to general_operand.
3561         Extend operand 1 to XFmode and generate log10xf3 insn.
3562         (log2<mode>2): Change operand 1 predicate to general_operand.
3563         Extend operand 1 to XFmode and generate log2xf3 insn.
3564         (fyl2xp1_extend<mode>xf3_i387): Remove.
3565         (log1p<mode>2): Change operand 1 predicate to general_operand.
3566         Extend operand 1 to XFmode and generate log1pxf3 insn.
3567         (fxtract_extend<mode>xf3_i387): Remove.
3568         (logb<mode>2): Change operand 1 predicate to general_operand.
3569         Extend operand 1 to XFmode and generate logbxf3 insn.
3570         (ilogb<mode>2): Change operand 1 predicate to general_operand.
3571         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
3572         (significand<mode>2): Change operand 1 predicate to general_operand.
3573         Extend operand 1 to XFmode and generate significandxf3 insn.
3575 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3577         * gcc.c (perror_with_name, pfatal_with_name): Delete.
3578         (load_specs): Use fatal_error.
3579         (DELETE_IF_ORDINARY, process_command): Use error.
3580         (execute, run_attempt): Use fatal_error.
3582 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
3584         * diagnostic-core.h (sorry_at): New prototype.
3585         * diagnostic.c (sorry_at): New function.
3587 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
3589         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
3590         by zero as VR_UNDEFINED.
3592 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3594         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
3595         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
3596         (<sincos>mode2): New expander.
3597         (sincos_extend<mode>xf3_i387): Remove insn pattern.
3598         (sincos -> sin, cos splitters): Remove splitter patterns.
3599         (sincos<mode>3): Change operand 2 predicate to general_operand.
3600         Extend operand 2 to XFmode and generate sincosxf3 insn.
3601         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
3602         Change operand 3 predicate to const1_operand.
3603         (fptan_extend<mode>xf4_i387): Remove insn pattern.
3604         (tanxf2): Update operands in the call to fptanxf4_i387.
3605         (tan<mode>2): Change operand 1 predicate to general_operand.
3606         Extend operand 1 to XFmode and generate tanxf3 insn.
3607         (atan2xf3): Rename from *fpatanxf3_i387.
3608         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
3609         (atan2xf3): Remove expander.
3610         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
3611         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
3612         (atan<mode>2): Change operand 1 predicate to general_operand.
3613         Extend operand 1 to XFmode and generate atanxf3 insn.
3615 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3617         * config/i386/i386.md (x87/SSE constant load splitter): Use
3618         memory_operand instead of nonimmediate_operand for input operand
3619         predicate.
3621 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
3623         * config/i386/i386.md (float partial SSE register stall splitter): Move
3624         splitter near its instruction pattern.
3625         (float_extend partial SSE register stall splitter): Ditto.
3626         (float_truncate partial SSE register stall splitter): Ditto.
3628 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
3630         PR target/86794
3631         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3632         to speculation_safe_value_not_needed.
3634         PR target/85666
3635         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3636         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3637         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3638         leaf_function_p, instead use has_hard_reg_initial_val.
3640 2018-09-09  Nathan Sidwell  <nathan@acm.org>
3642         * gcc.h (pfatal_with_name): Don't declare here.
3643         * gcc.c (pfatal_with_name): Make static.
3645 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3647         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
3648         earlyclobber.
3650 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
3652         PR rtl-optimization/85458
3653         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
3654         priority hook to reduce the priority of EXPR.
3656 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
3658         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
3659         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
3660         with X87_ENABLE_FLOAT.  Remove preparation code.
3661         (*float<SWI48:mode><MODEF:mode>2): Rename from
3662         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
3663         math using "enabled" attribute.
3664         (*floatdi<MODEF:mode>2_i387): Rename from
3665         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
3666         enable for 32bit targets only.
3667         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
3668         splitter.
3669         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3670         as operand 1 predicate.  Rewrite as define_insn_and_split.
3671         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3673 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3675         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3676         to fallthru to FLOAT case.
3678 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3680         PR target/86731
3681         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3682         around folding of vec_sl to handle out of range shift values.
3684 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3686         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3687         Update callers to gen_fix_trunc<mode>_i387_fisttp
3688         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3689         nonimmediate_operand.
3690         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3691         and corresponding splitters.
3692         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3693         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3694         (fix_truncdi_i387_with_temp): Remove insn pattern
3695         and corresponding splitters.
3696         (fix_trunc<mode>_i387): Change operand 0 predicate to
3697         nonimmediate_operand.
3698         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3699         and corresponding splitters.
3700         (*fistdi2_1): Remove.
3701         (fistdi2): Ditto.
3702         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3703         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
3704         (*fist<mode>2_1): Remove.
3705         (fist<mode>2): Ditto.
3706         (fist<mode>2_with_temp): Remove insn pattern and corresponding
3707         splitters.
3708         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
3709         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3710         (fistdi2_<rounding>): Change operand 0 predicate to
3711         nonimmediate_operand.
3712         (fistdi2_<rounding>_with_temp): Remove insn pattern
3713         and corresponding splitters.
3714         (fist<mode>2_<rounding>): Change operand 0 predicate to
3715         nonimmediate_operand.
3716         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3717         and corresponding splitters.
3719         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3721 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3723         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3724         the init value.
3726 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3728         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3729         early gimple folding of vec_splat().
3730         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3731         * gimple-fold.h: Add an extern define for tree_vec_extract().
3733 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3735         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3736         wrappers around TREE_TYPE comparisons.
3738 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3740         PR target/80080
3741         * config/s390/predicates.md: Add nonsym_memory_operand.
3742         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3743         contains a SYMBOL_REF, load it into an intermediate pseudo.
3744         (s390_emit_compare_and_swap): Legitimize operand.
3745         * config/s390/s390.md: Use the new nonsym_memory_operand
3746         with UNSPECV_CAS patterns.
3748 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3750         PR target/80080
3751         * config/s390/s390-passes.def: New file.
3752         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3753         declaration.
3754         (make_pass_s390_early_mach): Add declaration.
3755         * config/s390/s390.c (make_pass_s390_early_mach):
3756         (s390_option_override): Remove dynamic registration.
3757         * config/s390/t-s390: Add s390-passes.def.
3759 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3761         * config/s390/s390.c (s390_decompose_constant_pool_ref):
3762         Remove UNSPEC_LTREL_BASE check.
3763         (annotate_constant_pool_refs): Likewise.
3764         (find_constant_pool_ref): Likewise.
3765         (find_ltrel_base): Removed.
3766         (replace_ltrel_base): Removed.
3767         (s390_mainpool_finish): Remove replace_ltrel_base call.
3768         (s390_chunkify_start): Remove pending LTREL_BASE logic.
3769         (s390_chunkify_finish): Remove replace_ltrel_base call.
3770         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3772 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
3774         PR target/86779
3775         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3776         to speculation_safe_value_not_needed.
3778 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
3779             Bernd Schmidt  <bernds_cb1@t-online.de>
3781         * config/nvptx/nvptx-opts.h: New file.
3782         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3783         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3784         (ASM_SPEC): Define.
3785         (TARGET_SM35): New macro.
3786         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3787         correct predicate.
3788         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3789         values.
3790         (misa=): New option.
3791         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3793 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
3795         * config/i386/i386.md (truncdfsf2): Remove expander.
3796         (truncdfsf2_with_temp): Ditto.
3797         (truncxf<mode>2): Ditto.
3798         (*truncdfsf_fast_mixed): Remove insn pattern.
3799         (*truncdfsf_fast_i387): Ditto.
3800         (*truncdfsf_mixed): Ditto.
3801         (*truncdfsf_i387): Ditto.
3802         (*truncdfsf2_i387_1): Ditto.
3803         (*truncxfsf2_mixed): Ditto.
3804         (*truncxfdf2_mixed): Ditto.
3805         (*truncxf<mode>2_i387_noop): Ditto. Update callers
3806         to call gen_truncxf<mode>2 instead.
3807         (*truncxf<mode>2_i387): Remove.
3808         (reg->reg splitters): Remove splitter pattern.
3809         (reg->mem splitters): Ditto.
3811         (truncdfsf2): New insn pattern.
3812         (truncxf<mode>2): Ditto.
3814 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3816         * tree-ssa-math-opts.c (is_mult_by): New function.
3817         (is_square_of): Use the above.
3818         (optimize_recip_sqrt): New function.
3819         (pass_cse_reciprocals::execute): Use the above.
3821 2018-09-05  Richard Biener  <rguenther@suse.de>
3823         PR bootstrap/87134
3824         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3825         to zero-init the emplaced vec.
3827 2018-09-05  Martin Liska  <mliska@suse.cz>
3829         PR tree-optimization/87205
3830         * tree-switch-conversion.c (pass_lower_switch::execute):
3831         Group cases for switch statements.
3833 2018-09-05  Richard Biener  <rguenther@suse.de>
3835         PR tree-optimization/87217
3836         * tree-ssa-sccvn.c (vuse_valueize): New.
3837         (vn_reference_lookup_pieces): Use it.
3838         (vn_reference_lookup): Likewise.
3840 2018-09-05  Nathan Sidwell  <nathan@acm.org>
3842         PR c++/87137
3843         * stor-layout.c (place_field): Scan forwards to check last
3844         bitfield when ms_bitfield_placement is in effect.
3846 2018-09-05  Richard Biener  <rguenther@suse.de>
3848         PR bootstrap/87225
3849         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3850         return.
3852 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3853             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3855         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3856         * config.gcc (extra_objs): Build it.
3857         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3858         Likewise.
3859         * config/aarch64/aarch64-passes.def
3860         (pass_tag_collision_avoidance): New pass.
3861         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3862         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3863         (aarch64_classify_address): Remove static qualifier.
3864         (aarch64_address_info, aarch64_address_type): Move to...
3865         * config/aarch64/aarch64-protos.h: ... here.
3866         (make_pass_tag_collision_avoidance): New function.
3867         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3868         New tuning flag.
3870 2018-09-05  Martin Liska  <mliska@suse.cz>
3872         * doc/gcov.texi: Update documentation of humar
3873         readable mode.
3874         * gcov.c (format_count): Print one decimal place, it provides
3875         more fine number of situations like '1G' vs. '1.4G'.
3877 2018-09-05  Martin Liska  <mliska@suse.cz>
3879         PR target/87164
3880         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3881         * optc-gen.awk: Allow 'Var' for Deprecated options in order
3882         to generate a MASK value.
3884 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
3886         PR debug/86593
3887         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3888         if frame pointer isn't used.
3889         (compute_frame_pointer_to_fb_displacement): Likewise.
3891 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
3893         PR target/87198
3894         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3895         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3896         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3897         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3898         and OPTION_MASK_ISA_XSAVEC_UNSET.
3900 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
3902         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3903         XOR operations in NAND case.
3905 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3907         * wide-int-range.cc (wide_int_range_convert): New.
3908         * wide-int-range.h (wide_int_range_convert): New.
3909         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3910         code into wide_int_range_convert.
3911         (extract_range_into_wide_ints): Do not munge anti range constants
3912         into the entire domain.  Just return the range back.
3914 2018-09-04  Martin Liska  <mliska@suse.cz>
3916         * genmatch.c (output_line_directive): Add new argument
3917         fnargs.
3918         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3920 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3922         * doc/invoke.texi (Option Summary): Add whitespace.
3924         * doc/invoke.texi (Option Summary): Add -Waligned-new.
3926 2018-09-04  Richard Biener  <rguenther@suse.de>
3928         PR tree-optimization/87211
3929         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3930         backedge value we're supposed to treat as VARYING also number
3931         the PHI to VARYING in case it got a different value-number already.
3933 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
3935         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3936         (extract_range_from_binary_expr_1): Do not call
3937         vrp_can_optimize_bit_op.
3938         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3939         static.
3940         (wide_int_range_get_mask_and_bounds): New.
3941         (wide_int_range_optimize_bit_op): New.
3942         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3943         (wide_int_range_bit_and): Same.
3944         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3945         (wide_int_range_optimize_bit_op): New.
3946         (wide_int_range_get_mask_and_bounds): New.
3948 2018-09-04  Richard Biener  <rguenther@suse.de>
3950         PR tree-optimization/87176
3951         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3952         variable.  When value-numbering a virtual PHI node make sure
3953         to not value-number to the backedge value.
3955 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
3957         * doc/extend.texi (Long Long, Hex Floats): Document support for
3958         long long and hex floats in more recent versions of ISO C++.
3960 2018-09-03  Richard Biener  <rguenther@suse.de>
3962         PR tree-optimization/87177
3963         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3964         cleanup.
3966 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3968         * bb-reorder.c (edge_order): Convert to C-qsort-style
3969         tri-state comparator.
3970         (reorder_basic_blocks_simple): Change std::stable_sort to
3971         gcc_stablesort.
3973 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3975         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3976         tri-state comparator.
3977         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3979 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3981         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
3982         (mergesort): ... here as maximum count for using netsort.
3983         (gcc_qsort): Set nlim to 3 if stable sort is requested.
3984         (gcc_stablesort): New.
3985         * system.h (gcc_stablesort): Declare.
3987 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
3989         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3990         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
3991         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
3993 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
3995         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3996         lxsdx and stxsdx alternatives.
3997         (*mov<mode>_hardfloat64): Ditto.
3998         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4000 2018-09-03  Richard Biener  <rguenther@suse.de>
4002         PR tree-optimization/87200
4003         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4004         simplify result.
4006 2018-09-03  Martin Liska  <mliska@suse.cz>
4008         PR tree-optimization/87201
4009         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4010         Fix parenthesis in an expression.
4012 2018-09-03  Richard Biener  <rguenther@suse.de>
4014         PR tree-optimization/87197
4015         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4016         visited.  CSE the VN_INFO hashtable lookup.
4018         PR tree-optimization/87169
4019         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4020         iterating make sure there's no extra backedges from irreducible
4021         regions feeding the header.  Mark the destination block
4022         executable.
4024 2018-09-03  Martin Liska  <mliska@suse.cz>
4026         PR driver/83193
4027         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4028         * common/common-targhooks.c (default_get_valid_option_values):
4029         New function.
4030         * common/common-targhooks.h (default_get_valid_option_values):
4031         Likewise.
4032         * common/config/i386/i386-common.c: Move processor_target_table
4033         from i386.c.
4034         (ix86_get_valid_option_values): New function.
4035         (TARGET_GET_VALID_OPTION_VALUES): New macro.
4036         * config/i386/i386.c (struct ptt): Move to i386-common.c.
4037         (PTA_*): Move all defined masks into i386-common.c.
4038         (ix86_function_specific_restore): Use new processor_cost_table.
4039         * config/i386/i386.h (struct ptt): Moved from i386.c.
4040         (struct pta): Likewise.
4041         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4042         * doc/tm.texi.in: Likewise.
4043         * opt-suggestions.c (option_proposer::suggest_option):
4044         Pass prefix to build_option_suggestions.
4045         (option_proposer::get_completions): Likewise.
4046         (option_proposer::build_option_suggestions): Use the new target
4047         hook.
4048         * opts.c (struct option_help_tuple): New struct.
4049         (print_filtered_help): Use the new target hook.
4051 2018-09-03  Martin Liska  <mliska@suse.cz>
4053         PR middle-end/59521
4054         * predict.c (set_even_probabilities): Add likely_edges
4055         argument and handle cases where we have precisely one
4056         likely edge.
4057         (combine_predictions_for_bb): Catch also likely_edges.
4058         (tree_predict_by_opcode): Handle gswitch statements.
4059         * tree-cfg.h (find_case_label_for_value): New declaration.
4060         (find_taken_edge_switch_expr): Likewise.
4061         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4062         Find pivot in decision tree based on probabily, not by number of
4063         nodes.
4065 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
4067         * doc/standards.texi (Standards): Update Objective-C reference.
4069 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4071         * doc/install.texi (Prerequisites): Update link for MPC.
4073 2018-09-01  Michael Matz  <matz@suse.de>
4075         PR tree-optimization/87074
4076         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4077         PHIs for outer-loop uses.
4079 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4081         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4082         * doc/invoke.texi (C Dialect Options): Ditto.
4084 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4086         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4088 2018-08-31  Richard Biener  <rguenther@suse.de>
4090         PR tree-optimization/87168
4091         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4092         (rpo_elim::eliminate_avail): When OP was not visited it must
4093         be available.
4095 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
4097         * tree-vrp.c (copy_value_range): Convert param "from" from
4098         "value_range *" to "const value_range *".
4099         (range_is_null): Likewise for param "vr".
4100         (range_int_cst_p): Likewise.
4101         (range_int_cst_singleton_p): Likewise.
4102         (symbolic_range_p): Likewise.
4103         (value_ranges_intersect_p): Likewise for both params.
4104         (value_range_nonnegative_p): Likewise for param "vr".
4105         (value_range_constant_singleton): Likewise.
4106         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4107         (extract_range_into_wide_ints): Likewise for param "vr".
4108         (extract_range_from_multiplicative_op): Likewise for params "vr0"
4109         and "vr1".
4110         (vrp_can_optimize_bit_op): Likewise.
4111         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4112         "vr1_".
4113         (extract_range_from_unary_expr): Likewise.
4114         (debug_value_range): Likewise for param "vr".
4115         (value_range::dump): Add "const" qualifier.
4116         (vrp_prop::check_array_ref): Convert local "vr" from
4117         "value_range *" to "const value_range *".
4118         (vrp_prop::check_mem_ref): Likewise.
4119         (vrp_prop::visit_stmt): Likewise for local "old_vr".
4120         (vrp_intersect_ranges_1): Likewise for param "vr_1".
4121         (vrp_intersect_ranges): Likewise.
4122         (simplify_stmt_for_jump_threading): Likewise for local "vr".
4123         (vrp_prop::vrp_finalize): Likewise.
4124         * tree-vrp.h (value_range::dump): Add "const" qualifier.
4125         (vrp_intersect_ranges): Add "const" qualifier to params as above.
4126         (extract_range_from_unary_expr): Likewise.
4127         (value_range_constant_singleton): Likewise.
4128         (symbolic_range_p): Likewise.
4129         (copy_value_range): Likewise.
4130         (extract_range_from_binary_expr_1): Likewise.
4131         (range_int_cst_p): Likewise.
4132         (vrp_set_zero_nonzero_bits): Likewise.
4133         (range_int_cst_singleton_p): Likewise.
4135 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
4137         * config/aarch64/arm_neon.h (vabsd_s64): New.
4138         (vnegd_s64): Likewise.
4140 2018-08-31  Martin Jambor  <mjambor@suse.cz>
4142         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4144 2018-08-31  Martin Liska  <mliska@suse.cz>
4146         * ipa-icf.c (sem_item::add_type): Use
4147         sem_item::m_type_hash_cache.
4148         * ipa-icf.h: Move the cache from sem_item_optimizer
4149         to sem_item.
4151 2018-08-31  Nathan Sidwell  <nathan@acm.org>
4153         * doc/extend.texi (Backwards Compatibility): Remove implicit
4154         extern C leeway of () being (...).
4156 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4158         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4160 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
4162         PR target/86684
4163         PR target/87149
4164         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4166 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
4168         PR middle-end/87138
4169         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4170         gen_int_mode.  Formatting fixes.
4172 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
4174         * target.def (custom_function_descriptors): Improve documentation.
4175         * doc/tm.texi.in (Trampolines): Expand discussion of function
4176         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4177         beginning of the section.
4178         * doc/tm.texi: Regenerated.
4180 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
4182         * cfg.h (class auto_edge_flag): Spell out the template-id of the
4183         base class in the initializer list.  This is a workaround for
4184         building with older GCC.
4185         (class auto_bb_flag): Likewise.
4187 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
4189         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4190         (altivec_vcmpequ<VI_char>_p): Remove star.
4191         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4192         vector load modes.
4193         (expand_strncmp_vec_sequence): New function.
4194         (emit_final_str_compare_vec): New function.
4195         (expand_strn_compare): Add support for vector strncmp.
4196         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4197         length specification to bytes.
4198         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4199         (vcmpnezb_p): New pattern.
4200         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4201         for option -mstring-compare-inline-limit.
4203 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
4205         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4206         (PTA_SKYLAKE): Add PTA_AES.
4207         (PTA_GOLDMONT): Likewise.
4209 2018-08-29  Jan Hubicka  <jh@suse.cz>
4211         PR lto/86517
4212         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4213         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4215 2018-08-29  Jan Hubicka  <jh@suse.cz>
4217         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4218         TYPE_STUB_DECL.
4219         (hash_tree): Do not visit TYPE_STUB_DECL.
4220         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4221         stream TYPE_STUB_DECL.
4222         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4223         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4224         after free_lang_data.
4225         (type_in_anonymous_namespace_p): Likewise.
4227 2018-08-29  Jan Hubicka  <jh@suse.cz>
4229         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4230         comment that it has to be even number.
4231         (class sreal): Change m_sig type to int32_t.
4232         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4233         int64_t for temporary calculations.
4234         (sreal_verify_basics): Drop one bit from minimum and maximum.
4236 2018-08-30  Richard Biener  <rguenther@suse.de>
4238         PR tree-optimization/87147
4239         * tree-ssa-sccvn.c (SSA_VISITED): New function.
4240         (visit_phi): When the degenerate result is from the backedge and
4241         we didn't visit its definition yet drop to VARYING.
4242         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
4244 2018-08-29  Jan Hubicka  <jh@suse.cz>
4246         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
4247         DECL_VINDEX.
4248         (hash_tree): Likewise.
4250 2018-08-29  Jan Hubicka  <jh@suse.cz>
4252         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
4253         and TYPE_NEXT_REF_TO.
4255 2018-08-29  Jan Hubicka  <jh@suse.cz>
4257         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4258         comment that it has to be even number.
4259         (class sreal): Change m_sig type to int32_t.
4260         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4261         int64_t for temporary calculations.
4262         (sreal_verify_basics): Drop one bit from minimum and maximum.
4264 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
4266         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
4268 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
4270         PR middle-end/86995
4271         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
4272         if to_add is negative.
4274 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4276         PR middle-end/87053
4277         * builtins.c (c_strlen): Improve range checks.
4279 2018-08-29  Martin Sebor  <msebor@redhat.com>
4280             Jeff Law  <law@redhat.com>
4282         PR tree-optimization/86714
4283         PR tree-optimization/86711
4284         * builtins.c (c_strlen): Add arguments to call to string_constant.
4285         * expr.c (string_constant): Add argument.  Detect missing nul
4286         terminator and outermost declaration it's missing in.
4287         * expr.h (string_constant): Add argument.
4288         * fold-const.c (read_from_constant_string): Add arguments to call to
4289         string_constant.
4290         (c_getstr): Likewise.
4291         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4292         to string_constant.
4293         * tree-ssa-strlen.c (get_stridx): Likewise.
4295 2018-08-29  Jan Hubicka  <jh@suse.cz>
4297         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
4298         Do not stream DECL_VINDEX.
4299         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
4300         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
4301         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
4303 2018-08-29  Richard Biener  <rguenther@suse.de>
4305         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
4306         virtual operands that are not default defs to honor region
4307         boundaries.
4308         (rpo_vn_valueize): Remove ineffective code here.
4310 2018-08-29  Richard Biener  <rguenther@suse.de>
4312         PR tree-optimization/87132
4313         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
4314         when skipping defs reachable over backedges.
4316 2018-08-29  Richard Biener  <rguenther@suse.de>
4318         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
4319         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
4320         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
4321         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
4322         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
4323         (vn_reference_lookup_3): Remove use of const_parms.
4324         (free_rpo_vn): Do not free const_parms.
4325         (do_rpo_vn): Do not call init_const_parms.
4326         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
4327         SSA_NAME_POINTS_TO_READONLY_MEMORY.
4328         (call_may_clobber_ref_p_1): Likewise.
4330 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
4332         PR other/86726
4333         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
4334         (-O): Ditto.
4335         (-ftree-scev-cprop): Document.
4337 2018-08-29  Jan Hubicka  <jh@suse.cz>
4339         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
4340         parameters.
4341         (sreal constructor): Update.
4342         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
4343         sreal:operator/): Update.
4345 2018-08-29  Martin Liska  <mliska@suse.cz>
4347         * tree-switch-conversion.c (switch_conversion::expand):
4348         Strenghten assumption about gswitch statements.
4350 2018-08-29  Richard Biener  <rguenther@suse.de>
4352         PR tree-optimization/87117
4353         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
4354         re-value-number released SSA VDEFs.
4356 2018-08-29  Richard Biener  <rguenther@suse.de>
4358         PR tree-optimization/87126
4359         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
4361 2018-08-28  Jim Wilson  <jimw@sifive.com>
4363         * config/riscv/pic.md: Rewrite.
4364         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
4365         invalid address.
4366         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
4367         (SOFTF, default_load, softload, softstore): New.
4369 2018-08-28  Jeff Law  <law@redhat.com>
4371         * fold-const.c (fold_binary_loc): Remove recently added assert.
4373 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
4375         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
4376         to OP parmeter of generated function.
4378 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
4380         PR tree-optimization/87009
4381         * match.pd: Add boolean optimizations.
4383 2018-08-28  Martin Sebor  <msebor@redhat.com>
4385         PR middle-end/86631
4386         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
4387         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
4388         (pass_walloca::gate): Use it.
4389         (alloca_call_type): Same.
4390         (pass_walloca::execute): Same.
4391         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
4393 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
4395         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
4396         GCC_VERSION for usage of "__gcc_dump_printf__" format from
4397         >= 3005 to >= 9000.
4399 2018-08-28  Richard Biener  <rguenther@suse.de>
4401         PR tree-optimization/87124
4402         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
4403         constants before looking up avail.
4405 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
4407         PR middle-end/87099
4408         * calls.c (maybe_warn_nonstring_arg): Punt early if
4409         warn_stringop_overflow is zero.  Don't call get_range_strlen
4410         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
4411         Swap comparison operands to have constants on rhs.  Only use
4412         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
4413         increment lenrng[0].
4415 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
4417         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
4418         use of tree_to_shwi.  Remove duplicated test for the size being
4419         a whole number of bytes.
4421 2018-08-28  Richard Biener  <rguenther@suse.de>
4423         PR tree-optimization/87117
4424         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
4425         Handle removed stmt without LHS (GIMPLE_NOP).
4427 2018-08-28  Richard Biener  <rguenther@suse.de>
4429         PR tree-optimization/87117
4430         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
4431         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
4433 2018-08-28  Richard Biener  <rguenther@suse.de>
4435         PR tree-optimization/87117
4436         * tree-ssa-pre.c (compute_avail): Do not make expressions
4437         with predicated values available.
4438         (get_expr_value_id): Assert we do not run into predicated value
4439         expressions.
4441 2018-08-28  Richard Biener  <rguenther@suse.de>
4443         PR tree-optimization/87117
4444         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
4445         get virtual operands.
4446         (get_expr_operands): Handle STRING_CST like other decls.
4448 2018-08-28  Martin Liska  <mliska@suse.cz>
4450         * tree.h: Update documentation of fndecl_built_in_p
4451         functions.
4454 2018-08-27  Jeff Law  <law@redhat.com>
4455         PR tree-optimization/87110
4456         * tree-ssa-dse.c (compute_trims): Handle non-constant
4457         TYPE_SIZE_UNIT.
4459 2018-08-27  Martin Sebor  <msebor@redhat.com>
4461         PR tree-optimization/86914
4462         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
4464 2018-08-27  Martin Sebor  <msebor@redhat.com>
4466         PR tree-optimization/87112
4467         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
4468         the type of the bound argument.
4470 2018-08-27  Jeff Law  <law@redhat.com>
4472         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
4473         type does not have a TYPE_SIZE_UNIT.
4475 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
4477         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
4478         with include of backend.h.
4480 2018-08-27  Richard Biener  <rguenther@suse.de>
4482         PR tree-optimization/86927
4483         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
4484         use const cond reduction code.
4486 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
4488         PR tree-optimization/85758
4489         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
4491 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4493         PR c++/87091
4494         * diagnostic-show-locus.c (class layout_range): Update for
4495         conversion of show_caret_p to a tri-state.
4496         (layout_range::layout_range): Likewise.
4497         (make_range): Likewise.
4498         (layout::maybe_add_location_range): Likewise.
4499         (layout::should_print_annotation_line_p): Don't show annotation
4500         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
4501         (layout::get_state_at_point): Update for conversion of
4502         show_caret_p to a tri-state.  Bail out early for
4503         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
4504         underlining or source colorization.
4505         (gcc_rich_location::add_location_if_nearby): Update for conversion
4506         of show_caret_p to a tri-state.
4507         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
4508         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
4509         Likewise.
4510         (selftest::test_one_liner_labels): Likewise.
4511         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
4512         conversion of show_caret_p to a tri-state.
4513         * pretty-print.c (text_info::set_location): Likewise.
4514         * pretty-print.h (text_info::set_location): Likewise.
4515         * substring-locations.c (format_warning_n_va): Likewise.
4516         * tree-diagnostic.c (default_tree_printer): Likewise.
4517         * tree-pretty-print.c (newline_and_indent): Likewise.
4519 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4521         PR c++/87091
4522         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
4523         line above for line-insertion fix-it hints.
4524         (selftest::test_fixit_insert_containing_newline): Update the
4525         expected results, and add a test with line-numbering enabled.
4527 2018-08-27  Martin Liska  <mliska@suse.cz>
4529         PR sanitizer/86962
4530         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
4531         params with DECL_HAS_VALUE_EXPR_P.
4533 2018-08-27  Martin Liska  <mliska@suse.cz>
4535         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4536         selected expansion strategy.
4538 2018-08-27  Martin Liska  <mliska@suse.cz>
4540         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
4541         * builtins.c (is_builtin_fn): Likewise.
4542         * attribs.c (diag_attr_exclusions): Use new function
4543         fndecl_built_in_p and remove check for FUNCTION_DECL if
4544         possible.
4545         (builtin_mathfn_code): Likewise.
4546         (fold_builtin_expect): Likewise.
4547         (fold_call_expr): Likewise.
4548         (fold_builtin_call_array): Likewise.
4549         (fold_call_stmt): Likewise.
4550         (set_builtin_user_assembler_name): Likewise.
4551         (is_simple_builtin): Likewise.
4552         * calls.c (gimple_alloca_call_p): Likewise.
4553         (maybe_warn_nonstring_arg): Likewise.
4554         * cfgexpand.c (expand_call_stmt): Likewise.
4555         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
4556         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
4557         (cgraph_node::verify_node): Likewise.
4558         * cgraphclones.c (build_function_decl_skip_args): Likewise.
4559         (cgraph_node::create_clone): Likewise.
4560         * config/arm/arm.c (arm_insert_attributes): Likewise.
4561         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
4562         * dse.c (scan_insn): Likewise.
4563         * expr.c (expand_expr_real_1): Likewise.
4564         * fold-const.c (operand_equal_p): Likewise.
4565         (fold_binary_loc): Likewise.
4566         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4567         * gimple-low.c (lower_stmt): Likewise.
4568         * gimple-pretty-print.c (dump_gimple_call): Likewise.
4569         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
4570         Likewise.
4571         * gimple.c (gimple_build_call_from_tree): Likewise.
4572         (gimple_call_builtin_p): Likewise.
4573         (gimple_call_combined_fn): Likewise.
4574         * gimplify.c (gimplify_call_expr): Likewise.
4575         (gimple_boolify): Likewise.
4576         (gimplify_modify_expr): Likewise.
4577         (gimplify_addr_expr): Likewise.
4578         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
4579         * ipa-cp.c (determine_versionability): Likewise.
4580         * ipa-fnsummary.c (compute_fn_summary): Likewise.
4581         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
4582         * ipa-split.c (visit_bb): Likewise.
4583         (split_function): Likewise.
4584         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4585         * lto-cgraph.c (input_node): Likewise.
4586         * lto-streamer-out.c (write_symbol): Likewise.
4587         * omp-low.c (setjmp_or_longjmp_p): Likewise.
4588         (lower_omp_1): Likewise.
4589         * predict.c (strip_predict_hints): Likewise.
4590         * print-tree.c (print_node): Likewise.
4591         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
4592         * trans-mem.c (is_tm_irrevocable): Likewise.
4593         (is_tm_load): Likewise.
4594         (is_tm_simple_load): Likewise.
4595         (is_tm_store): Likewise.
4596         (is_tm_simple_store): Likewise.
4597         (is_tm_abort): Likewise.
4598         (tm_region_init_1): Likewise.
4599         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
4600         * tree-cfg.c (verify_gimple_call): Likewise.
4601         (move_stmt_r): Likewise.
4602         (stmt_can_terminate_bb_p): Likewise.
4603         * tree-eh.c (lower_eh_constructs_2): Likewise.
4604         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
4605         * tree-inline.c (remap_gimple_stmt): Likewise.
4606         (copy_bb): Likewise.
4607         (estimate_num_insns): Likewise.
4608         (fold_marked_statements): Likewise.
4609         * tree-sra.c (scan_function): Likewise.
4610         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
4611         (optimize_stack_restore): Likewise.
4612         (pass_fold_builtins::execute): Likewise.
4613         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
4614         (mark_all_reaching_defs_necessary_1): Likewise.
4615         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
4616         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4617         (pass_forwprop::execute): Likewise.
4618         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4619         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4620         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
4621         * tree-ssa-strlen.c (get_string_length): Likewise.
4622         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
4623         (find_func_aliases_for_call): Likewise.
4624         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
4625         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
4626         * tree-tailcall.c (find_tail_calls): Likewise.
4627         * tree.c (need_assembler_name_p): Likewise.
4628         (free_lang_data_in_decl): Likewise.
4629         (get_call_combined_fn): Likewise.
4630         * ubsan.c (is_ubsan_builtin_p): Likewise.
4631         * varasm.c (incorporeal_function_p): Likewise.
4632         * tree.h (DECL_BUILT_IN): Remove and replace with
4633         fndecl_built_in_p.
4634         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
4635         (fndecl_built_in_p): New.
4637 2018-08-27  Martin Liska  <mliska@suse.cz>
4639         PR tree-optimization/86847
4640         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
4641         Dump also subtree probability.
4642         (switch_decision_tree::do_jump_if_equal): New function.
4643         (switch_decision_tree::emit_case_nodes): Handle special
4644         situations in balanced tree that can be emitted much simpler.
4645         Fix calculation of probabilities that happen in tree expansion.
4646         * tree-switch-conversion.h (struct cluster): Add
4647         is_single_value_p.
4648         (struct simple_cluster): Likewise.
4649         (struct case_tree_node): Add new function has_child.
4650         (do_jump_if_equal): New.
4652 2018-08-27  Martin Liska  <mliska@suse.cz>
4654         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
4655         Add new argument to bit_test_cluster constructor.
4656         (bit_test_cluster::emit): Set bits really number of values
4657         handlel by a test.
4658         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
4659         probability argument.
4660         * tree-switch-conversion.h (struct bit_test_cluster):
4661         Add m_handles_entire_switch.
4663 2018-08-27  Martin Liska  <mliska@suse.cz>
4665         PR tree-optimization/86702
4666         * tree-switch-conversion.c (jump_table_cluster::emit):
4667         Make probabilities even for values in jump table
4668         according to number of cases handled.
4669         (switch_decision_tree::compute_cases_per_edge): Pass
4670         argument to reset_out_edges_aux function.
4671         (switch_decision_tree::analyze_switch_statement): Likewise.
4672         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4673         Make it static.
4675 2018-08-27  Martin Liska  <mliska@suse.cz>
4677         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4678         cfun argument explicitly.
4679         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4680         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4681         function gimple_switch_default_bb.
4682         (convert_switch_statements):
4683         (expand_builtins):
4684         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4685         * stmt.c (label_to_block_fn): Use label_to_block and pass
4686         cfun argument explicitly and use gimple_switch_label_bb.
4687         (expand_case): Likewise.
4688         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4689         cfun argument explicitly. Likewise.
4690         (make_edges_bb): Likewise.
4691         (make_cond_expr_edges): Likewise.
4692         (get_cases_for_edge): Likewise.
4693         (make_gimple_switch_edges): Likewise.
4694         (label_to_block_fn): Likewise.
4695         (label_to_block): Likewise.
4696         (make_goto_expr_edges): Likewise.
4697         (make_gimple_asm_edges): Likewise.
4698         (main_block_label): Likewise.
4699         (group_case_labels_stmt): Likewise.
4700         (find_taken_edge_computed_goto): Likewise.
4701         (find_taken_edge_switch_expr): Likewise.
4702         (gimple_verify_flow_info): Likewise.
4703         (gimple_redirect_edge_and_branch): Likewise.
4704         (gimple_switch_label_bb): New function.
4705         (gimple_switch_default_bb): Likewise.
4706         (gimple_switch_edge): Likewise.
4707         (gimple_switch_default_edge): Likewise.
4708         * tree-cfg.h (label_to_block_fn): Remove and replace ...
4709         (label_to_block): ... with this.
4710         (gimple_switch_label_bb): New.
4711         (gimple_switch_default_bb): Likewise.
4712         (gimple_switch_edge): Likewise.
4713         (gimple_switch_default_edge): Likewise.
4714         * tree-cfgcleanup.c (convert_single_case_switch): Use
4715         new gimple functions and pass new argument to label_to_block.
4716         (cleanup_control_flow_bb):
4717         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4718         cfun argument explicitly.
4719         (make_eh_edges): Likewise.
4720         (redirect_eh_dispatch_edge): Likewise.
4721         (lower_resx): Likewise.
4722         (lower_eh_dispatch): Likewise.
4723         (maybe_remove_unreachable_handlers): Likewise.
4724         (unsplit_eh): Likewise.
4725         (cleanup_empty_eh): Likewise.
4726         (verify_eh_edges): Likewise.
4727         (verify_eh_dispatch_edge): Likewise.
4728         * tree-ssa-dom.c (record_edge_info): Likewise.
4729         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4730         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4731         (thread_through_normal_block): Likewise.
4732         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4733         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4734         * tree-switch-conversion.c (switch_conversion::collect): Use new
4735         gimple functions.
4736         (switch_conversion::check_final_bb): Likewise.
4737         (switch_conversion::gather_default_values): Pass new argument
4738         to label_to_block.
4739         (switch_conversion::build_constructors): Likewise.
4740         (switch_decision_tree::compute_cases_per_edge): Use new
4741         gimple_switch_edge function.
4742         (switch_decision_tree::analyze_switch_statement): Pass new argument
4743         to label_to_block.
4744         (switch_decision_tree::try_switch_expansion): Use
4745         gimple_switch_default_edge.
4746         * tree-vrp.c (find_switch_asserts): Pass new argument
4747         to label_to_block.
4748         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4749         (vr_values::simplify_switch_using_ranges): Likewise.
4751 2018-08-27  Richard Biener  <rguenther@suse.de>
4753         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4754         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4756         * tree-ssa-sccvn.h (struct vn_pval): New structure.
4757         (struct vn_nary_op_s): Add unwind_to member.  Add
4758         predicated_values flag and put result into a union together
4759         with a linked list of vn_pval.
4760         (struct vn_ssa_aux): Add name member to make maintaining
4761         a map of SSA name to vn_ssa_aux possible.  Remove no longer
4762         needed info, dfsnum, low, visited, on_sccstack, use_processed
4763         and range_info_anti_range_p members.
4764         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4765         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4766         New functions.
4767         (vn_valueize): New global.
4768         (vn_context_bb): Likewise.
4769         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4770         VN_INFO_PTR_INFO): Remove.
4771         * tree-ssa-sccvn.c: ... (rewrite)
4772         (pass_fre::execute): For -O2+ initialize loops and run
4773         RPO VN in optimistic mode (iterating).  For -O1 and -Og
4774         run RPO VN in non-optimistic mode.
4775         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4776         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4777         * doc/invoke.texi (sccvn-max-scc-size): Remove.
4778         (rpo-vn-max-loop-depth): Document.
4779         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4780         when valuezing the VUSE signals we walked out of the region.
4781         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4782         (phi_translate): Set VN context block to use for availability
4783         lookup.
4784         (compute_avail): Likewise.
4785         (pre_valueize): New function.
4786         (pass_pre::execute): Adjust to the RPO VN API.
4788         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4789         (propagate_constants_for_unrolling): Remove.
4790         (tree_unroll_loops_completely): Perform value-numbering
4791         on the unrolled bodies loop parent.
4793 2018-08-27  Richard Biener  <rguenther@suse.de>
4795         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4796         for partial antic compute.
4798 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
4800         PR rtl-optimization/87065
4801         * combine.c (simplify_if_then_else): Formatting fix.
4802         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4803         check.
4804         (known_cond): Don't return const_true_rtx for vector modes.  Use
4805         CONST0_RTX instead of const0_rtx.  Formatting fixes.
4807 2018-08-27  Martin Liska  <mliska@suse.cz>
4809         PR gcov-profile/87069
4810         * gcov.c (process_file): Record files already processed
4811         and warn about a file being processed multiple times.
4813 2018-08-27  Martin Liska  <mliska@suse.cz>
4815         PR driver/83193
4816         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4817         Set default values for x_aarch64_*_string strings.
4818         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4819         prefix.  For -mabi do not print '=ABI' in help and use
4820         <option_value> format for -msve-vector-bits and -moverride
4821         options.
4823 2018-08-26  Jeff Law  <law@redhat.com>
4825         * config/mips/frame-header-opt.c: Include "backend.h" rather than
4826         "cfg.h"
4828 2018-08-26  Marek Polacek  <polacek@redhat.com>
4830         PR c++/87029, Implement -Wredundant-move.
4831         * doc/invoke.texi: Document -Wredundant-move.
4833 2018-08-25  Martin Sebor  <msebor@redhat.com>
4835         PR tree-optimization/87059
4836         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4837         to the same type as the other.
4838         * fold-const.c (fold_binary_loc): Assert expectation.
4840 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
4842         * config/darwin.c (machopic_legitimize_pic_address): Clean up
4843         extraneous parentheses, dead code section and formatting.
4845 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
4847         PR c++/87091
4848         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4849         wide enough for jumps in the line-numbering to be visible.
4850         (layout::print_gap_in_line_numbering): New member function.
4851         (layout::calculate_line_spans): When using line numbering, merge
4852         line spans that are only 1 line apart.
4853         (diagnostic_show_locus): When printing line numbers, show gaps in
4854         line numbering directly, rather than printing headers.
4855         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4856         line-numbering with multiple line spans.
4857         (selftest::test_fixit_insert_containing_newline_2): Add test of
4858         line-numbering, in which the spans are close enough to be merged.
4860 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4862         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4863         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
4864         * tree-vrp.c (range_is_nonnull): Remove.
4865         (range_includes_zero_p): Accept value_range instead of min/max.
4866         (extract_range_from_binary_expr_1): Do not early bail on
4867         POINTER_PLUS_EXPR.
4868         Use range_includes_zero_p instead of range_is_nonnull.
4869         (extract_range_from_unary_expr): Use range_includes_zero_p instead
4870         of range_is_nonnull.
4871         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
4872         special case VR_ANTI_RANGE.
4873         (vrp_finalize): Same.
4874         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4875         instead of min/max.
4876         (range_is_nonnull): Remove.
4877         * vr-values.c (vrp_stmt_computes_nonzero): Use
4878         range_includes_zero_p instead of range_is_nonnull.
4879         (extract_range_basic): Pass value_range to range_includes_zero_p
4880         instead of range_is_nonnull.
4882 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
4884         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4885         * emit-rtl.h (rtl_data): Remove return_bnd.
4886         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4887         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4888         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4889         (POINTER_BOUNDS_MODE): Remove definition.
4890         (make_pointer_bounds_mode): Remove.
4891         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4892         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4893         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4894         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4895         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4896         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4897         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4899         * config/i386/i386-modes.def (BND32, BND64): Remove.
4900         * config/i386/i386.c (dbx_register_map): Remove bound registers.
4901         (dbx64_register_map): Ditto.
4902         (svr4_dbx_register_map): Ditto.
4903         (indirect_thunk_bnd_needed): Remove.
4904         (indirect_thunks_bnd_used): Ditto.
4905         (indirect_return_bnd_needed): Ditto.
4906         (indirect_return_via_cx_bnd): Ditto.
4907         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4908         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4909         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
4910         (output_indirect_thunk_function): Remove handling of
4911         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4912         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4913         (ix86_save_reg): Remove handling of crtl->return_bnd.
4914         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4915         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4916         and UNSPEC_BNDLX_ADDR.
4917         (ix86_output_indirect_branch_via_reg): Remove handling of
4918         indirect_thunk_prefix_bnd.
4919         (ix86_output_indirect_branch_via_push): Ditto.
4920         (ix86_output_function_return): Ditto.
4921         (ix86_output_indirect_function_return): Ditto.
4922         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4923         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4924         (CALL_USED_REGISTERS): Ditto.
4925         (REG_ALLOC_ORDER): Update for removal of bound registers.
4926         (HI_REGISTER_NAMES): Ditto.
4927         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4928         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4929         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4930         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4931         (FIRST_PSEUDO_REG): Update.
4932         (BND): Remove mode iterator.
4933         * config/i386/predicates.md (bnd_mem_operator): Remove.
4935 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4937         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4938         vectors.
4940 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
4942         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4943         the case in which the permute needs only a single element and
4944         repeats for every vector of the result.  Extend that case to
4945         handle variable-length vectors.
4946         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4948 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
4950         PR debug/79342
4951         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4952         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4954 2018-08-24  Richard Biener  <rguenther@suse.de>
4956         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4957         bb_flags_allocated members.
4958         (auto_flag): New RAII class for allocating flags.
4959         (auto_edge_flag): New RAII class for allocating edge flags.
4960         (auto_bb_flag): New RAII class for allocating bb flags.
4961         * cfgloop.c (verify_loop_structure): Allocate temporary edge
4962         flag dynamically.
4963         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4964         in favor of temporarily allocated BB flag.
4965         * hsa-brig.c: Re-order includes.
4966         * hsa-dump.c: Likewise.
4967         * hsa-regalloc.c: Likewise.
4968         * print-rtl.c: Likewise.
4969         * profile-count.c: Likewise.
4971 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
4973         PR target/86989
4974         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4975         the TOC register.
4977 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
4979         PR 87073/bootstrap
4980         * wide-int-range.cc (wide_int_range_div): Do not ignore result
4981         from wide_int_range_multiplicative_op.
4983 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4985         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4986         "permutaion".
4988 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4990         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4991         to 'expanded'.
4993 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
4995         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4996         full GENERIC expression used for replacement.
4998 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
5000         * tree-vrp.c (abs_extent_range): Remove.
5001         (extract_range_into_wide_ints): Pass wide ints by reference.
5002         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5003         Pass wide ints by reference in all calls to
5004         extract_range_into_wide_ints.
5005         * wide-int-range.cc (wide_int_range_div): New.
5006         * wide-int-range.h (wide_int_range_div): New.
5007         (wide_int_range_includes_zero_p): New.
5008         (wide_int_range_zero_p): New.
5010 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
5012         * config/aarch64/aarch64.md (arches): New enum.
5013         (arch): New enum attr.
5014         (arch_enabled): New attr.
5015         (enabled): Now uses arch_enabled only.
5016         (simd, sve, fp16): Removed attribute.
5017         (fp): Attr now defined in terms of 'arch'.
5018         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5019         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5020         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5021         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5022         attributes into 'arch'.
5023         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5024         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5025         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5026         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5027         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5028         'simd' attribute into 'arch'.
5029         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5030         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5031         Convert use of 'fp' attribute to 'arch'.
5032         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5033         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5034         into 'arch'.
5035         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5036         (different modes) Merge 'fp' and 'simd' into 'arch'.
5037         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5038         'simd' into 'arch'.
5040 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
5042         PR rtl-optimization/87026
5043         * expmed.c (canonicalize_comparison): If we can no longer create
5044         pseudoregisters, don't.
5046 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
5048         PR target/86951
5049         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5050         prototype.
5051         * config/arm/arm.c (speculation_barrier_libfunc): New static
5052         variable.
5053         (arm_init_libfuncs): Initialize it.
5054         (arm_emit_speculation_barrier): New function.
5055         * config/arm/arm.md (speculation_barrier): Call
5056         arm_emit_speculation_barrier for architectures that do not have
5057         DSB or ISB.
5058         (speculation_barrier_insn): Only match on Armv7 or later.
5060 2018-08-23  Richard Biener  <rguenther@suse.de>
5062         PR middle-end/87024
5063         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5064         calls.
5066 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5068         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5069         of single-vector TBLs.
5070         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5071         one input is given.
5073 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5075         PR target/85910
5076         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5077         aarch64_evpc_tbl guard.
5079 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5081         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5082         behaviour.
5084 2018-08-22  Martin Sebor  <msebor@redhat.com>
5086         PR middle-end/87052
5087         * tree-pretty-print.c (pretty_print_string): Add argument.
5088         (dump_generic_node): Call to pretty_print_string with string size.
5090 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
5092         PR rtl-optimization/86771
5093         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5094         of two SETs into those two SETs, one to be placed at i2, if that SETs
5095         destination is modified between i2 and i3.
5097 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5099         PR tree-optimization/86725
5100         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5101         function.
5102         (vect_analyze_scalar_cycles_1): Check it.
5104 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5106         PR tree-optimization/86725
5107         * tree-vect-loop.c (vect_is_simple_reduction): When treating
5108         an outer loop phi as a double reduction, make sure that the
5109         single user of the phi result is an inner loop phi.
5111 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5113         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5114         grouped stores with gaps to a strided group.
5116 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5118         * tree-vect-stmts.c (get_group_load_store_type)
5119         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5120         first statement in a group.
5122 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5124         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5125         the sequence used in gcc/gcc.c.
5127 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5129         PR other/704
5130         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5131         building it.
5133 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5135         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5136         Darwin10-specific unwinder-shim.
5137         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5138         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5139         New to cater for Darwin10 Rosetta.
5141 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5143         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5144         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5146 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5148         PR bootstrap/81033
5149         PR target/81733
5150         PR target/52795
5151         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5152         (dwarf2out_switch_text_section): Generate a local label for the
5153         second function sub-section and apply it as the second FDE start
5154         label.
5155         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5156         second sub-section start.
5158 2018-08-22  Richard Biener  <rguenther@suse.de>
5160         PR tree-optimization/86988
5161         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5163 2018-08-22  Richard Biener  <rguenther@suse.de>
5165         PR tree-optimization/86945
5166         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5168 2018-08-22  Alexandre Oliva <oliva@adacore.com>
5170         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5171         a comment about how uses of r2 for .sdata2 come about.
5173 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
5175         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5177 2018-08-21  Marek Polacek  <polacek@redhat.com>
5179         PR c++/86981, Implement -Wpessimizing-move.
5180         * doc/invoke.texi: Document -Wpessimizing-move.
5182 2018-08-21  Jan Hubicka  <jh@suse.cz>
5184         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5185         * tree.h (is_redundant_typedef): Remove.
5186         * dwarf2out.c (is_redundant_typedef): Turn into static function.
5188 2018-08-21  Jan Hubicka  <jh@suse.cz>
5190         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5191         when possible.
5193 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
5195         * expmed.c (extract_low_bits): Reject invalid subregs early.
5197 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5199         PR middle-end/86121
5200         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5201         behaviour.
5203 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5205         * config/vxworks.h: Guard vxworks_asm_out_constructor and
5206         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5207         * config/vxworks.c: Likewise.
5209 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5211         * config/vxworks.c: Set targetm.have_ctors_dtors
5212         if HAVE_INITFINI_ARRAY_SUPPORT.
5213         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5214         if HAVE_INITFINI_ARRAY_SUPPORT.
5216 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5218         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5219         default search path for VxWorks < 7.
5221 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5223         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5224         (get_format_string): Refer to c_getstr.
5226 2018-08-21  Tom de Vries  <tdevries@suse.de>
5228         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5229         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5230         (debuginfo_early_stop): Declare.
5231         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5232         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5233         (debuginfo_early_stop): New function.
5234         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
5235         and debuginfo_early_stop.
5236         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
5237         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
5238         (general_init): Call debuginfo_early_init.
5239         (finalize): Call debuginfo_fini.
5240         (do_compile): Call debuginfo_init.
5241         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
5242         -fdump-early-debug.
5243         (@item -fdump-debug, @item -fdump-earlydebug): Add.
5245 2018-08-21  Tom de Vries  <tdevries@suse.de>
5247         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
5248         flag_dump_noaddr and flag_dump_unnumbered.
5250 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
5252         * wide-int-range.cc (wide_int_range_abs): New.
5253         (wide_int_range_order_set): Rename from wide_int_range_min_max.
5254         * wide-int-range.h (wide_int_range_abs): New.
5255         (wide_int_range_min_max): New.
5256         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
5257         case to call wide_int_range_abs.
5258         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
5259         (extract_range_from_abs_expr): Delete.
5261 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
5263         PR target/87033
5264         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
5265         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
5266         for indexed loads.
5268 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5269             Jeff Law <law@redhat.com>
5271         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
5272         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
5274 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
5276         PR other/84889
5277         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
5278         (decl_attributes): Likewise.
5279         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
5280         instance.
5281         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5282         * diagnostic-core.h (class auto_diagnostic_group): New class.
5283         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
5284         (diagnostic_report_diagnostic): Handle the first diagnostics within
5285         a group.
5286         (emit_diagnostic): Add auto_diagnostic_group instance.
5287         (inform): Likewise.
5288         (inform_n): Likewise.
5289         (warning): Likewise.
5290         (warning_at): Likewise.
5291         (warning_n): Likewise.
5292         (pedwarn): Likewise.
5293         (permerror): Likewise.
5294         (error): Likewise.
5295         (error_n): Likewise.
5296         (error_at): Likewise.
5297         (sorry): Likewise.
5298         (fatal_error): Likewise.
5299         (internal_error): Likewise.
5300         (internal_error_no_backtrace): Likewise.
5301         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
5302         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
5303         * diagnostic.h (struct diagnostic_context): Add fields
5304         "diagnostic_group_nesting_depth",
5305         "diagnostic_group_emission_count", "begin_group_cb",
5306         "end_group_cb".
5307         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
5308         Add auto_diagnostic_group instance(s).
5309         (find_explicit_erroneous_behavior): Likewise.
5310         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
5311         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
5312         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
5313         (gimplify_va_arg_expr): Likewise.
5314         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
5315         (HSA_SORRY_AT): Likewise.
5316         * ipa-devirt.c (compare_virtual_tables): Likewise.
5317         (warn_odr): Likewise.
5318         * multiple_target.c (expand_target_clones): Likewise.
5319         * opts-common.c (cmdline_handle_error): Likewise.
5320         * reginfo.c (globalize_reg): Likewise.
5321         * substring-locations.c (format_warning_n_va): Likewise.
5322         * tree-inline.c (expand_call_inline): Likewise.
5323         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
5324         * tree-ssa-loop-niter.c
5325         (do_warn_aggressive_loop_optimizations): Likewise.
5326         * tree-ssa-uninit.c (warn_uninit): Likewise.
5327         * tree.c (warn_deprecated_use): Likewise.
5329 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
5331         PR target/87014
5332         * config/i386/i386.md (eh_return): Always update EH return
5333         address in word_mode.
5335 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
5337         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
5338         TARGET_SPLIT_COMPLEX_ARG is defined.
5340 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5342         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
5344 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5346         PR target/86984
5347         * expr.c (expand_assignment): Assert that bitpos is positive.
5348         (store_field): Likewise
5349         (expand_expr_real_1): Make sure that bitpos is positive.
5350         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
5351         integer overflow.
5353 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5355         * Makefile.in (CPP_ID_DATA_H): Delete.
5356         (CPP_INTERNAL_H): Don't add it.
5357         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
5358         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
5360 2018-08-20  Richard Biener  <rguenther@suse.de>
5362         PR tree-optimization/78655
5363         * tree-vrp.c (extract_range_from_binary_expr_1): Make
5364         pointer + offset nonnull if either operand is nonnull work.
5366 2018-08-20  Tom de Vries  <tdevries@suse.de>
5368         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
5369         unless the referenced die describes the added property using
5370         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
5371         Otherwise, add a DW_AT_location to the referenced die.
5373 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
5375         PR target/86994
5376         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
5377         register_operand when calling ix86_set_reg_reg_cost.
5378         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
5379         Set *total to 0 for operands that satisfy x86_64_immediate_operand
5380         predicate and to 1 otherwise.
5382 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
5384         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
5385         emit a diagnostic that it is not supported and reset the option.
5386         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
5387         supported and consume the option.  (ASM_FINAL_SPEC): New.
5389 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
5391         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
5392         a sentence.
5394 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
5396         C-SKY port: Documentation
5398         * doc/extend.texi (C-SKY Function Attributes): New section.
5399         * doc/invoke.texi (Option Summary): Add C-SKY options.
5400         (C-SKY Options): New section.
5401         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
5403 2018-08-17  Jojo  <jijie_rong@c-sky.com>
5404             Huibin Wang  <huibin_wang@c-sky.com>
5405             Sandra Loosemore  <sandra@codesourcery.com>
5406             Chung-Lin Tang  <cltang@codesourcery.com>
5408         C-SKY port: Backend implementation
5410         * config/csky/*: New.
5411         * common/config/csky/*: New.
5413 2018-08-17  Jojo  <jijie_rong@c-sky.com>
5414             Huibin Wang  <huibin_wang@c-sky.com>
5415             Sandra Loosemore  <sandra@codesourcery.com>
5416             Chung-Lin Tang  <cltang@codesourcery.com>
5417             Andrew Jenner  <andrew@codesourcery.com>
5419         C-SKY port: Configury
5421         * config.gcc (csky-*-*): New.
5422         * configure.ac: Add csky to targets for dwarf2 debug_line support.
5423         * configure: Regenerated.
5425 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
5427         * dump-context.h: Include "dumpfile.h".
5428         (dump_context::dump_printf_va): Convert final param from va_list
5429         to va_list *.  Convert from ATTRIBUTE_PRINTF to
5430         ATTRIBUTE_GCC_DUMP_PRINTF.
5431         (dump_context::dump_printf_loc_va): Likewise.
5432         * dumpfile.c: Include "stringpool.h".
5433         (make_item_for_dump_printf_va): Delete.
5434         (make_item_for_dump_printf): Delete.
5435         (class dump_pretty_printer): New class.
5436         (dump_pretty_printer::dump_pretty_printer): New ctor.
5437         (dump_pretty_printer::emit_items): New member function.
5438         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
5439         function.
5440         (dump_pretty_printer::emit_item): New member function.
5441         (dump_pretty_printer::stash_item): New member function.
5442         (dump_pretty_printer::format_decoder_cb): New member function.
5443         (dump_pretty_printer::decode_format): New member function.
5444         (dump_context::dump_printf_va): Reimplement in terms of
5445         dump_pretty_printer.
5446         (dump_context::dump_printf_loc_va): Convert final param from va_list
5447         to va_list *.
5448         (dump_context::begin_scope): Reimplement call to
5449         make_item_for_dump_printf.
5450         (dump_printf): Update for change to dump_printf_va.
5451         (dump_printf_loc): Likewise.
5452         (selftest::test_capture_of_dump_calls): Convert "stmt" from
5453         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
5454         with %T, %E, and %G.
5455         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
5456         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
5457         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
5458         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
5459         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
5460         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
5461         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
5462         within a dump_printf_loc call to "%wu".
5463         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
5464         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
5465         missing space after "=".
5466         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
5467         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
5468         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
5469         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
5470         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
5471         duplicate "vectorized" from message.
5473 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5475         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
5476         polyNxK_t element's TYPE_STRING_FLAG.
5478 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
5480         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
5481         (they were unnamed before).  Fix comments.
5483 2018-08-17  Nathan Sidwell  <nathan@acm.org>
5485         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
5487 2018-08-17  Richard Biener  <rguenther@suse.de>
5489         PR tree-optimization/86841
5490         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
5492 2018-08-17  Martin Liska  <mliska@suse.cz>
5494         * common.opt: Remove Warn, Init and Report for options with
5495         Ignore/Deprecated flag. Warning is done automatically for
5496         Deprecated flags.
5497         * config/i386/i386.opt: Likewise.
5498         * config/ia64/ia64.opt: Likewise.
5499         * config/rs6000/rs6000.opt: Likewise.
5500         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
5501         Remove usage of flag_check_pointer_bounds.
5502         * lto-wrapper.c (merge_and_complain): Do not handle
5503         OPT_fcheck_pointer_bounds.
5504         (append_compiler_options): Likewise.
5505         * opt-functions.awk: Do not handle Deprecated.
5506         * optc-gen.awk: Check that Var, Report and Init are not
5507         used for an option with Ignore/Deprecated flag.
5508         * opts-common.c (decode_cmdline_option): Do not report
5509         CL_ERR_DEPRECATED.
5510         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
5511         options.
5512         * opts.h (struct cl_option): Remove cl_deprecated flag.
5513         (CL_ERR_DEPRECATED): Remove error enum value.
5515 2018-08-17  Richard Biener  <rguenther@suse.de>
5517         PR middle-end/86505
5518         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
5519         across a va-arg-pack using call adjust its return value accordingly.
5521 2018-08-16  Martin Sebor  <msebor@redhat.com>
5523         PR tree-optimization/86853
5524         * gimple-ssa-sprintf.c (struct format_result): Rename member.
5525         (struct fmtresult): Add member and initialize it in ctors.
5526         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
5527         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
5528         (format_directive): Set POSUNDER4K when MAYFAIL is set.
5529         (parse_directive): Handle %C same as %c.
5530         (sprintf_dom_walker::compute_format_length): Adjust.
5531         (is_call_safe): Adjust.
5533 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5535         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
5536         for determining how to count the elements.
5537         * builtins.h (c_strlen): Adjust prototype.
5538         * expr.c (string_constant): Add new parameter mem_size.
5539         Set *mem_size appropriately.
5540         * expr.h (string_constant): Adjust protoype.
5541         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
5542         * gimple-fold.h (get_range_strlen): Adjust prototype.
5543         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
5544         (format_string): Call get_string_length with eltsize.
5546 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5548         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
5549         to emit the span, rather than setting it as the prefix.
5551 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5553         * diagnostic-show-locus.c (layout::start_annotation_line): Add
5554         "margin_char" parameter, defaulting to space.  Use it in place
5555         of pp_space for the initial part of the margin.
5556         (layout::print_leading_fixits): Use '+' when filling the margin
5557         of line-insertion fix-it hints.
5559 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5561         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
5562         Delete.
5564 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5566         * config/rs6000/altivec.md: Don't set length attribute to the default
5567         value.
5568         * config/rs6000/darwin.md: Ditto.
5569         * config/rs6000/dfp.md: Ditto.
5570         * config/rs6000/htm.md: Ditto.
5571         * config/rs6000/rs6000.md: Ditto.
5572         * config/rs6000/sync.md: Ditto.
5573         * config/rs6000/vsx.md: Ditto.
5575 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5577         * config/rs6000/altivec.md: Don't set length attribute to the default
5578         value, for branch instructions.
5579         * config/rs6000/darwin.md: Ditto.
5580         * config/rs6000/rs6000.md: Ditto.
5582 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5584         * config/rs6000/rs6000.md (length): Always define as const_int 4.
5585         (unnamed conditional branch define_insn): Set length to 4 or 8
5586         depending on offset.
5587         (<bd>_<mode>): Similar, for alternative 0.
5588         (<bd>tf_<mode>): Ditto.
5590 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5592         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5594 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
5596         * doc/rtl.texi: Replace old RTX class names with new names.
5599 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
5601         * expmed.h (canonicalize_comparison): New declaration.
5602         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5603         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
5604         * optabs.c (prepare_cmp_insn): Likewise.
5605         * rtl.h (unsigned_condition_p): New function which checks if a
5606         comparison operator is unsigned.
5608 2018-08-16  Nathan Sidwell  <nathan@acm.org>
5610         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
5611         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
5613 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5615         PR target/84711
5616         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
5617         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
5618         (mov<mov>): ..this and enable unconditionally.
5620 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5622         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
5624 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
5626         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
5627         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
5628         "Common" with "Target".
5630 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5632         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
5633         * doc/invoke.texi (mmitigate-rop): Remove.
5634         * config/i386/i386.c: Do not include "regrename.h".
5635         (ix86_rop_should_change_byte_p, reg_encoded_number)
5636         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
5637         Remove.
5638         (ix86_reorg): Remove call to ix86_mitigate_rop.
5639         * config/i386/i386.md (attr "modrm_class"): Remove.
5640         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
5641         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
5642         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
5644 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
5646         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
5647         allow folding of mergeh() and mergel() for the float and double types.
5648         (fold_mergehl_helper): Rework to handle building a permute tree
5649         for float vectors.
5651 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5653         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
5654         for TARGET_SSE.
5656 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
5658         * common.opt (fdiagnostics-show-labels): New option.
5659         * diagnostic-show-locus.c (class layout_range): Add field
5660         "m_label".
5661         (class layout): Add field "m_show_labels_p".
5662         (layout_range::layout_range): Add param "label" and use it to
5663         initialize m_label.
5664         (make_range): Pass in NULL for new "label" param of layout_range's
5665         ctor.
5666         (layout::layout): Initialize m_show_labels_p.
5667         (layout::maybe_add_location_range): Pass in loc_range->m_label
5668         when constructing layout_range instances.
5669         (struct line_label): New struct.
5670         (layout::print_any_labels): New member function.
5671         (layout::print_line): Call it if label-printing is enabled.
5672         (selftest::test_one_liner_labels): New test.
5673         (selftest::test_diagnostic_show_locus_one_liner): Call it.
5674         * diagnostic.c (diagnostic_initialize): Initialize
5675         context->show_labels_p.
5676         * diagnostic.h (struct diagnostic_context): Add field
5677         "show_labels_p".
5678         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5679         -fno-diagnostics-show-labels.
5680         * dwarf2out.c (gen_producer_string): Add
5681         OPT_fdiagnostics_show_labels to the ignored options.
5682         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5683         param.
5684         (gcc_rich_location::maybe_add_expr): Likewise.
5685         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5686         label" param, defaulting to NULL.
5687         (gcc_rich_location::add_expr): Add "label" param.
5688         (gcc_rich_location::maybe_add_expr): Likewise.
5689         (class text_range_label): New class.
5690         (class range_label_for_type_mismatch): New class.
5691         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5692         of format_warning_va.
5693         (fmtwarn_n): Likewise for new params of format_warning_n_va.
5694         * lto-wrapper.c (merge_and_complain): Add
5695         OPT_fdiagnostics_show_labels to the "pick one setting" options.
5696         (append_compiler_options): Likewise to the dropped options.
5697         (append_diag_options): Likewise to the passed-on options.
5698         * opts.c (common_handle_option): Handle the new option.
5699         * selftest-diagnostic.c
5700         (test_diagnostic_context::test_diagnostic_context): Enable
5701         show_labels_p.
5702         * substring-locations.c: Include "gcc-rich-location.h".
5703         (format_warning_n_va): Add "fmt_label" and "param_label" params
5704         and use them as appropriate.
5705         (format_warning_va): Add "fmt_label" and "param_label" params,
5706         passing them on to format_warning_n_va.
5707         (format_warning_at_substring): Likewise.
5708         (format_warning_at_substring_n): Likewise.
5709         * substring-locations.h (format_warning_va): Add "fmt_label" and
5710         "param_label" params.
5711         (format_warning_n_va): Likewise.
5712         (format_warning_at_substring): Likewise.
5713         (format_warning_at_substring_n): Likewise.
5714         * toplev.c (general_init): Initialize global_dc->show_labels_p.
5716 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
5718         PR testsuite/86519
5719         * builtins.c (expand_builtin_memcmp): Do not expand the call
5720         when overflow is detected.
5722 2018-08-15  Martin Sebor  <msebor@redhat.com>
5724         PR tree-optimization/71625
5725         * config/aarch64/aarch64-builtins.c
5726         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5728 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
5730         * config/s390/s390.c (s390_reorg): Remove loop.
5732 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5734         * config/darwin.c
5735          (darwin_function_switched_text_sections): Delete.
5736         * gcc/config/darwin.h
5737          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5739 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5741         PR target/81685
5742         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5743         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
5744         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5746 2018-08-15  Martin Liska  <mliska@suse.cz>
5748         PR tree-optimization/86925
5749         * predict.c (expr_expected_value_1): When taking
5750         later predictor, assign also probability.
5751         Use fold_build2_initializer_loc in order to fold
5752         the expression in -frounding-math.
5754 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
5756         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5757         patterns.
5758         (expand_vec_perm_1): Try the new method.
5760 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
5762         PR target/86547
5763         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5764         Check whether lra_live_max_point is 0 before dividing.
5766 2018-08-14  Martin Sebor  <msebor@redhat.com>
5768         PR tree-optimization/86650
5769         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5770         (vrp_prop::check_mem_ref): Same.
5772 2018-08-13  Liu Hao <lh_mouse@126.com>
5774         * pretty-print.c (eat_esc_sequence): Swap the foreground and
5775         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5776         and clear it thereafter, as it only works for DBCS.
5778 2018-08-13  Liu Hao <lh_mouse@126.com>
5780         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5781         handle returned by _get_osf_handle().
5783 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5785         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5786         for folding vec_perm.
5788 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5790         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5791         Add support for gimple-folding of vec_pack() and vec_unpack()
5792         intrinsics.
5794 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
5796         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5797         vec_xst variants to the list.
5798         (rs6000_gimple_fold_builtin): Add support for folding unaligned
5799         vector loads and stores.
5801 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
5803         * config.gcc (rs6000-ibm-aix4.x): Delete.
5804         (rs6000-ibm-aix5.1): Delete.
5805         (rs6000-ibm-aix5.2): Delete.
5806         (rs6000-ibm-aix5.3): Delete.
5807         * config/rs6000/aix43.h: Delete.
5808         * config/rs6000/aix51.h: Delete.
5809         * config/rs6000/aix52.h: Delete.
5810         * config/rs6000/t-aix43: Delete.
5812 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
5814         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5815         New function.
5816         (s390_decompose_address): Factor out constant pool ref
5817         decomposition.
5819 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5821         * config/nds32/nds32-predicates.c
5822         (nds32_can_use_bclr_p): Change return type as bool.
5823         (nds32_can_use_bset_p): Ditto.
5824         (nds32_can_use_btgl_p): Ditto.
5825         (nds32_can_use_bitci_p): Ditto.
5826         * config/nds32/nds32-protos.h
5827         (nds32_can_use_bclr_p): Change declaration.
5828         (nds32_can_use_bset_p): Ditto.
5829         (nds32_can_use_btgl_p): Ditto.
5830         (nds32_can_use_bitci_p): Ditto.
5832 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5834         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5835         Support -msched-prolog-epilog option.
5836         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5838 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5840         * common/config/nds32/nds32-common.c
5841         (nds32_option_optimization_table): Enalbe -malways-align.
5843 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5845         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5846         extra_headers.
5847         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5848         OPT_misr_secure_ case.
5849         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5850         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5851         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5852         secure attribute.
5853         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5854         (nds32_isr_info): New field security_level.
5855         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5856         * config/nds32/nds32.md (return_internal): Consider critical attribute.
5857         * config/nds32/nds32.opt (misr-secure): New option.
5858         * config/nds32/nds32_init.inc: New file.
5859         * config/nds32/nds32_isr.h: New file.
5861 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
5863         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5864         Update comment for atomic instructions.
5865         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5866         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5867         Remove.
5868         (atomic_loaddi): Revise fence expansion to only emit fence prior to
5869         load for __ATOMIC_SEQ_CST model.
5870         (atomic_loaddi_1): Remove float register target.
5871         (atomic_storedi): Handle CONST_INT values.
5872         (atomic_storedi_1): Remove float register source.  Add special case
5873         for zero value.
5874         (memory_barrier): New expander and insn.
5876 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
5878         PR tree-optimization/86835
5879         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5880         new_stmt after def_gsi, make sure to insert new_square_stmt after
5881         that stmt, not 2 stmts before it.
5883 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
5885         PR target/82418
5886         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5887         instead of SWI48.
5889 2018-08-10  Martin Liska  <mliska@suse.cz>
5891         PR target/83610
5892         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5893         function type.
5894         * builtins.c (expand_builtin_expect_with_probability):
5895         New function.
5896         (expand_builtin_expect_with_probability): New function.
5897         (build_builtin_expect_predicate): Add new argumnet probability
5898         for BUILT_IN_EXPECT_WITH_PROBABILITY.
5899         (fold_builtin_expect):
5900         (fold_builtin_2):
5901         (fold_builtin_3):
5902         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5903         * builtins.h (fold_builtin_expect): Set new argument.
5904         * doc/extend.texi: Document __builtin_expect_with_probability.
5905         * doc/invoke.texi: Likewise.
5906         * gimple-fold.c (gimple_fold_call): Pass new argument.
5907         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5908         also BUILT_IN_EXPECT_WITH_PROBABILITY.
5909         * predict.c (get_predictor_value): New function.
5910         (expr_expected_value): Add new argument probability. Assume
5911         that predictor and probability are always non-null.
5912         (expr_expected_value_1): Likewise.  For __builtin_expect and
5913         __builtin_expect_with_probability set probability.  Handle
5914         combination in binary expressions.
5915         (tree_predict_by_opcode): Simplify code by simply calling
5916         get_predictor_value.
5917         (pass_strip_predict_hints::execute): Add handling of
5918         BUILT_IN_EXPECT_WITH_PROBABILITY.
5919         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5920         new predictor.
5921         * tree.h (DECL_BUILT_IN_P): New function.
5923 2018-08-10  Martin Liska  <mliska@suse.cz>
5925         PR tree-optimization/85799
5926         * passes.def: Add argument for pass_strip_predict_hints.
5927         * predict.c (class pass_strip_predict_hints): Add new argument
5928         early_p.
5929         (strip_predictor_early): New function.
5930         (pass_strip_predict_hints::execute): Call the function to
5931         strip predictors.
5932         (strip_predict_hints): New function.
5933         * predict.def: Fix comment.
5935 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
5937         * Makefile.in: Clarify which tm.texi to copy over to assert the
5938         right to grant a GFDL license for all.
5940 2018-08-09  Jeff Law  <law@redhat.com>
5942         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5943         unused variable.
5945 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
5947         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5948         prototype.
5950 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
5952         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5953         reductions for variable-length vectors.
5955 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
5957         PR other/84889
5958         * common.opt (fdiagnostics-show-line-numbers): New option.
5959         * diagnostic-show-locus.c (class layout): Add fields
5960         "m_show_line_numbers_p" and "m_linenum_width";
5961         (num_digits): New function.
5962         (test_num_digits): New function.
5963         (layout::layout): Initialize new fields.  Update m_x_offset
5964         logic to handle any left margin.
5965         (layout::print_source_line): Print line number when requested.
5966         (layout::start_annotation_line): New member function.
5967         (layout::print_annotation_line): Call it.
5968         (layout::print_leading_fixits): Likewise.
5969         (layout::print_trailing_fixits): Likewise.  Update calls to
5970         move_to_column for new parameter.
5971         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5972         it to potentially call start_annotation_line.
5973         (layout::show_ruler): Call start_annotation_line.
5974         (selftest::test_line_numbers_multiline_range): New selftest.
5975         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5976         and selftest::test_line_numbers_multiline_range.
5977         * diagnostic.c (diagnostic_initialize): Initialize
5978         show_line_numbers_p.
5979         * diagnostic.h (struct diagnostic_context): Add field
5980         "show_line_numbers_p".
5981         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5982         -fno-diagnostics-show-line-numbers.
5983         * dwarf2out.c (gen_producer_string): Add
5984         OPT_fdiagnostics_show_line_numbers to the ignored options.
5985         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5986         one setting" options.
5987         (append_compiler_options): Likewise to the dropped options.
5988         (append_diag_options): Likewise to the passed-on options.
5989         * opts.c (common_handle_option): Handle the new option.
5990         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5992 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5994         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5995         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
5996         third argument of type "const signed char" to descriptions of
5997         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5998         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5999         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6000         __builtin_bcdsub_ov functions.
6002 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6004         PR tree-optimization/86858
6005         * tree-vect-loop.c (vect_is_simple_reduction): Restore
6006         flow_bb_inside_loop_p calls.
6008 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6010         PR tree-optimization/86871
6011         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6012         instead of gimple_assign_lhs.
6014 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
6016         PR target/86887
6017         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6018         register constraint to operand 0.
6019         (add<mode>3_carryinC): Likewise.
6020         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6022 2018-08-09  Martin Liska  <mliska@suse.cz>
6024         PR c/86895
6025         * common.opt: Remove extra line.
6027 2018-08-09  Martin Liska  <mliska@suse.cz>
6029         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6030         at the end of a line, make first letter capital and end up
6031         a sentence with a dot.
6032         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6033         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6034         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6035         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6036         (PARAM_MAX_ISL_OPERATIONS): Likewise.
6037         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6038         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6039         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6040         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6041         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6042         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6043         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6044         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6045         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6046         (PARAM_TREE_REASSOC_WIDTH): Likewise.
6047         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6048         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6049         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6051 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
6053         PR target/84332
6054         * config/s390/s390.c (s390_option_override_internal): Reduce the
6055         stack-clash-protection-probe-interval param if it would be too big
6056         for z900.
6058 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
6060         PR target/46179
6061         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6062         * config/m68k/m68k.c (handle_move_double): Don't call
6063         m68k_final_prescan_insn.
6064         (m68k_adjust_decorated_operand): Renamed from
6065         m68k_final_prescan_insn, remove first and third operand and
6066         simplify.
6067         (print_operand): Call it.
6068         (print_operand_address): Call it.
6070 2018-08-08  Nathan Sidwell  <nathan@acm.org>
6072         * diagnostic.c (diagnostic_report_current_module): Use
6073         linemap_included_from & linemap_included_from_linemap.
6075 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
6077         * config/aarch64/aarch64-cores.def: Add phecda core.
6078         * config/aarch64/aarch64-tune.md: Regenerate.
6079         * doc/invoke.texi: Add phecda core.
6081 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6083         PR target/85295
6084         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6085         definitions.
6086         * config/s390/s390.md ("movti"): Add more alternatives for
6087         constant to GPR copies.
6089 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6091         * config/s390/s390.c: Fix whitespace damage throughout the file.
6092         * config/s390/s390.h: Likewise.
6093         * config/s390/tpf.h: Likewise.
6095 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6097         * config/s390/s390.c (s390_loadrelative_operand_p):
6098         Remove TARGET_CPU_ZARCH usages.
6099         (s390_rtx_costs): Likewise.
6100         (s390_legitimate_constant_p): Likewise.
6101         (s390_cannot_force_const_mem): Likewise.
6102         (legitimate_reload_constant_p): Likewise.
6103         (s390_preferred_reload_class): Likewise.
6104         (legitimize_pic_address): Likewise.
6105         (legitimize_tls_address): Likewise.
6106         (s390_split_branches): Removed.
6107         (s390_add_execute): Removed.
6108         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6109         (s390_mainpool_start): Likewise.
6110         (s390_mainpool_finish): Likewise.
6111         (s390_mainpool_cancel): Removed.
6112         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6113         (s390_chunkify_cancel): Likewise.
6114         (s390_return_addr_rtx): Likewise.
6115         (s390_register_info): Remove split_branches_pending_p uages.
6116         (s390_optimize_register_info): Likewise.
6117         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6118         split_branches_pending_p usages.
6119         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6120         (s390_load_got): Likewise.
6121         (s390_expand_split_stack_prologue): Likewise.
6122         (output_asm_nops): Likewise.
6123         (s390_function_profiler): Likewise.
6124         (s390_emit_call): Likewise.
6125         (s390_conditional_register_usage): Likewise.
6126         (s390_optimize_prologue): Likewise.
6127         (s390_reorg): Remove TARGET_CPU_ZARCH and
6128         split_branches_pending_p usages.
6129         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6130         usages.
6131         (s390_output_indirect_thunk_function): Likewise.
6132         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6133         (TARGET_CPU_ZARCH_P): Removed.
6134         (struct machine_function): Remove split_branches_pending_p.
6135         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6137 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6139         * common/config/s390/s390-common.c (processor_flags_table):
6140         Remove flags.
6141         * config.gcc: Remove with_arch/with_tune support.
6142         * config/s390/2064.md: Remove cpu attribute comparisons.
6143         * config/s390/driver-native.c (s390_host_detect_local_cpu):
6144         Remove MTN.
6145         * config/s390/linux.h (ASM_SPEC):
6146         Remove -march support.
6147         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6148         Use a table to get an arch level.
6149         * config/s390/s390-opts.h (enum processor_type):
6150         Remove enum values.
6151         * config/s390/s390.c
6152         (processor_table): Remove entries, add arch_level values.
6153         (s390_issue_rate): Remove cases.
6154         (s390_option_override): Adjust
6155         s390_option_override_internal() call.
6156         (s390_option_override_internal): Remove deprecation warning.
6157         (s390_valid_target_attribute_tree): Adjust
6158         s390_option_override_internal() call.
6159         * config/s390/s390.h (struct s390_processor):
6160         Share with s390-c.c, add arch_level field.
6161         * config/s390/s390.md:
6162         Remove occurrences in cpu attribute.
6163         * config/s390/s390.opt: Remove -march/-mtune support.
6164         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6165         * doc/invoke.texi: Remove deprecation warning.
6167 2018-08-08  Luis Machado  <luis.machado@linaro.org>
6169         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6170         global.
6171         (qdf24xx_tunings): Set vector cost structure to
6172         qdf24xx_vector_cost.
6174         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6175         <register_sextend>: Set to 3.
6177 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
6179         PR target/86838
6180         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6181         * config/aarch64/aarch64-simd.md
6182         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6183         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6184         (aarch64_frecpx<mode>): ...this new pattern.
6185         * config/aarch64/aarch64-simd-builtins.def: Remove comment
6186         about aarch64_frecp<FRECP:frecp_suffix><mode>.
6188 2018-08-07  Martin Liska  <mliska@suse.cz>
6190         PR middle-end/83023
6191         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6192         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6193         * predict.def (PRED_MALLOC_NONNULL): New predictor.
6194         * doc/extend.texi: Document that malloc attribute adds
6195         hit to compiler.
6197 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
6199         PR target/86785
6200         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6201         Define to speculation_safe_value_not_needed.
6203 2018-08-06  Jeff Law  <law@redhat.com>
6205         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6206         the vr_values instance to cprop_into_stmt.
6207         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6208         (cprop_operand): Also query EVRP to determine if OP is a constant.
6210 2018-08-06  Nathan Sidwell  <nathan@acm.org>
6212         * diagnostic.c (diagnostic_report_current_module): Reroll
6213         included-at loop.  Translate text.
6215 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
6217         * function-tests.c (selftest::test_expansion_to_rtl): Call
6218         free_after_compilation.
6220 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6222         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6224 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
6226         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
6227         loops with memory block operations from getting unrolled.
6229 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
6231         PR target/86807
6232         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6233         Define to speculation_safe_value_not_needed.
6235 2018-08-06  Jeff Law  <law@redhat.com>
6237         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
6238         assert.
6240 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6242         PR target/86662
6243         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
6244         with all enabled __intN types.
6246         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
6248 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6250         * alias.c (record_set): Check for clobber high.
6251         * cfgexpand.c (expand_gimple_stmt): Likewise.
6252         * combine-stack-adj.c (single_set_for_csa): Likewise.
6253         * combine.c (find_single_use_1): Likewise.
6254         (set_nonzero_bits_and_sign_copies): Likewise.
6255         (get_combine_src_dest): Likewise.
6256         (is_parallel_of_n_reg_sets): Likewise.
6257         (try_combine): Likewise.
6258         (record_dead_and_set_regs_1): Likewise.
6259         (reg_dead_at_p_1): Likewise.
6260         (reg_dead_at_p): Likewise.
6261         * dce.c (deletable_insn_p): Likewise.
6262         (mark_nonreg_stores_1): Likewise.
6263         (mark_nonreg_stores_2): Likewise.
6264         * df-scan.c (df_find_hard_reg_defs): Likewise.
6265         (df_uses_record): Likewise.
6266         (df_get_call_refs): Likewise.
6267         * dwarf2out.c (mem_loc_descriptor): Likewise.
6268         * haifa-sched.c (haifa_classify_rtx): Likewise.
6269         * ira-build.c (create_insn_allocnos): Likewise.
6270         * ira-costs.c (scan_one_insn): Likewise.
6271         * ira.c (equiv_init_movable_p): Likewise.
6272         (rtx_moveable_p): Likewise.
6273         (interesting_dest_for_shprep): Likewise.
6274         * jump.c (mark_jump_label_1): Likewise.
6275         * postreload-gcse.c (record_opr_changes): Likewise.
6276         * postreload.c (reload_cse_simplify): Likewise.
6277         (struct reg_use): Add source expr.
6278         (reload_combine): Check for clobber high.
6279         (reload_combine_note_use): Likewise.
6280         (reload_cse_move2add): Likewise.
6281         (move2add_note_store): Likewise.
6282         * print-rtl.c (print_pattern): Likewise.
6283         * recog.c (decode_asm_operands): Likewise.
6284         (store_data_bypass_p): Likewise.
6285         (if_test_bypass_p): Likewise.
6286         * regcprop.c (kill_clobbered_value): Likewise.
6287         (kill_set_value): Likewise.
6288         * reginfo.c (reg_scan_mark_refs): Likewise.
6289         * reload1.c (maybe_fix_stack_asms): Likewise.
6290         (eliminate_regs_1): Likewise.
6291         (elimination_effects): Likewise.
6292         (mark_not_eliminable): Likewise.
6293         (scan_paradoxical_subregs): Likewise.
6294         (forget_old_reloads_1): Likewise.
6295         * reorg.c (find_end_label): Likewise.
6296         (try_merge_delay_insns): Likewise.
6297         (redundant_insn): Likewise.
6298         (own_thread_p): Likewise.
6299         (fill_simple_delay_slots): Likewise.
6300         (fill_slots_from_thread): Likewise.
6301         (dbr_schedule): Likewise.
6302         * resource.c (update_live_status): Likewise.
6303         (mark_referenced_resources): Likewise.
6304         (mark_set_resources): Likewise.
6305         * rtl.c (copy_rtx): Likewise.
6306         * rtlanal.c (reg_referenced_p): Likewise.
6307         (single_set_2): Likewise.
6308         (noop_move_p): Likewise.
6309         (note_stores): Likewise.
6310         * sched-deps.c (sched_analyze_reg): Likewise.
6311         (sched_analyze_insn): Likewise.
6313 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6315         * cse.c (invalidate_reg): New function extracted from...
6316         (invalidate): ...here.
6317         (canonicalize_insn): Check for clobber high.
6318         (invalidate_from_clobbers): invalidate clobber highs.
6319         (invalidate_from_sets_and_clobbers): Likewise.
6320         (count_reg_usage): Check for clobber high.
6321         (insn_live_p): Likewise.
6322         * cselib.c (cselib_expand_value_rtx_1):Likewise.
6323         (cselib_invalidate_regno): Check for clobber in setter.
6324         (cselib_invalidate_rtx): Pass through setter.
6325         (cselib_invalidate_rtx_note_stores):
6326         (cselib_process_insn): Check for clobber high.
6327         * cselib.h (cselib_invalidate_rtx): Add operand.
6329 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6331         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
6332         (mark_not_eliminable): Likewise.
6333         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
6334         * lra-lives.c (process_bb_lives): Check for clobber high.
6335         * lra.c (new_insn_reg): Remember clobber highs.
6336         (collect_non_operand_hard_regs): Check for clobber high.
6337         (lra_set_insn_recog_data): Likewise.
6338         (add_regs_to_insn_regno_info): Likewise.
6339         (lra_update_insn_regno_info): Likewise.
6341 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6343         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
6344         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
6346 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6348         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
6349         (copy_insn_1): Likewise.
6350         (gen_hard_reg_clobber_high): New gen function.
6351         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
6352         * genemit.c (gen_exp): Likewise.
6353         (gen_emit_seq): Pass through info.
6354         (gen_insn): Check for CLOBBER_HIGH.
6355         (gen_expand): Pass through info.
6356         (gen_split): Likewise.
6357         (output_add_clobbers): Likewise.
6358         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
6359         (remove_clobbers): Likewise.
6360         * rtl.h (gen_hard_reg_clobber_high): New declaration.
6362 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6364         * doc/rtl.texi (clobber_high): Add.
6365         (parallel): Add in clobber high
6366         * rtl.c (rtl_check_failed_code3): Add function.
6367         * rtl.def (CLOBBER_HIGH): Add expression.
6368         * rtl.h (RTL_CHECKC3): Add macro.
6369         (rtl_check_failed_code3): Add declaration.
6370         (XC3EXP): Add macro.
6372 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
6374         PR target/86386
6375         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
6376         cfun->machine->max_used_stack_alignment if needed.
6378 2018-08-04  Martin Sebor  <msebor@redhat.com>
6380         PR tree-optimization/86571
6381         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
6382         NaN output to 4.
6384 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
6386         PR target/86799
6387         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6388         Define.
6390 2018-08-03  Jeff Law  <law@redhat.com>
6392         PR target/86795
6393         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6394         Define to speculation_safe_value_not_needed.
6396 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
6398         * doc/gcov.texi (-x): Remove duplicate "to".
6399         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
6400         (-Wif-not-aligned): Remove duplicate "is".
6401         (-flto): Remove duplicate "the".
6402         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
6403         duplicate "v5.00.b".
6404         (MSP430 Options): Remove duplicate "and" from the description
6405         of "-mgprel-sec=regexp".
6406         (x86 Options): Remove duplicate copies of "vmldLog102" and
6407         vmlsLog104 from description of "-mveclibabi=type".
6409 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
6411         * internal-fn.h (first_commutative_argument): Declare.
6412         * internal-fn.c (first_commutative_argument): New function.
6413         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
6414         restrictions for pattern statements.  Use first_commutative_argument
6415         to look for commutative operands in calls to internal functions.
6417 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
6419         * Makefile.in (wide-int-range.o): New.
6420         * tree-vrp.c: Move all the wide_int_* functions to...
6421         * wide-int-range.cc: ...here.
6422         * tree-vrp.h: Move all the wide_int_* prototypes to...
6423         * wide-int-range.h: ...here.
6425 2018-08-03  Tom de Vries  <tdevries@suse.de>
6427         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
6428         UI_NONE.
6429         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
6430         * except.c (output_function_exception_table): Do early exit if
6431         targetm_common.except_unwind_info (&global_options) == UI_NONE.
6433 2018-08-03  Martin Liska  <mliska@suse.cz>
6435         * predict.c (dump_prediction): Change to 2 digits
6436         in fraction part.
6438 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6440         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
6441         neon_dup_q to...
6442         (falkor_am_1_gtov_gtov): ... a new insn reservation.
6444 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
6446         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
6447         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
6448         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
6449         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
6450         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
6452 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
6454         * diagnostic-show-locus.c (diagnostic_show_locus): Use
6455         pp_take_prefix when saving the existing prefix.
6456         * diagnostic.c (diagnostic_append_note): Likewise.
6457         * langhooks.c (lhd_print_error_function): Likewise.
6458         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
6459         param's type.  Free the existing prefix.
6460         (pp_take_prefix): New function.
6461         (pretty_printer::pretty_printer): Drop the prefix parameter.
6462         Rename the length parameter to match the comment.
6463         (pretty_printer::~pretty_printer): Free the prefix.
6464         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
6465         parameter.
6466         (struct pretty_printer): Drop the "const" from "prefix" field's
6467         type and clarify memory management.
6468         (pp_set_prefix): Drop the "const" from the 2nd param.
6469         (pp_take_prefix): New decl.
6471 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
6473         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
6474         for word_mode_ok here instead of passing as argument.
6475         (expand_block_compare): Change select_block_compare_mode() call.
6476         (expand_strncmp_gpr_sequence): New function.
6477         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
6479 2018-08-02  Jeff Law  <law@redhat.com>
6481         PR target/86790
6482         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6483         Define to speculation_safe_value_not_needed.
6485         PR target/86784
6486         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6487         Define to speculation_safe_value_not_needed.
6489 2018-08-02  Tom de Vries  <tdevries@suse.de>
6491         PR target/86660
6492         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
6493         function.  Return UI_TARGET unconditionally.
6494         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
6495         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
6497 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6499         * genemit.c (print_overload_test): Fix typo.
6501 2018-08-02  Richard Biener  <rguenther@suse.de>
6503         PR tree-optimization/86816
6504         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
6505         which checks for value availability before querying it.
6506         (gvn_uses_equal): Use it.
6507         (same_succ_hash): Likewise.
6508         (gimple_equal_p): Likewise.
6510 2018-08-02  Nick Clifton  <nickc@redhat.com>
6512         PR target/86813
6513         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6514         Define to speculation_safe_value_not_needed.
6516         PR target/86810
6517         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6518         Define to speculation_safe_value_not_needed.
6520         PR target/86810
6521         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6522         Define to speculation_safe_value_not_needed.
6524         PR target/86803
6525         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6526         Define to speculation_safe_value_not_needed.
6528         PR target/86797
6529         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6530         Define to speculation_safe_value_not_needed.
6532         PR target/86791
6533         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6534         Define to speculation_safe_value_not_needed.
6536         PR target/86789
6537         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6538         Define to speculation_safe_value_not_needed.
6540         PR target/86787
6541         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6542         Define to speculation_safe_value_not_needed.
6544         PR target/86782
6545         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6546         speculation_safe_value_not_needed.
6548         PR target/86781
6549         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
6550         to speculation_safe_value_not_needed.
6552 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6554         * doc/md.texi: Expand the documentation of instruction names
6555         to mention port-local uses.  Document '@' in pattern names.
6556         * read-md.h (overloaded_instance, overloaded_name): New structs.
6557         (mapping): Declare.
6558         (md_reader::handle_overloaded_name): New member function.
6559         (md_reader::get_overloads): Likewise.
6560         (md_reader::m_first_overload): New member variable.
6561         (md_reader::m_next_overload_ptr): Likewise.
6562         (md_reader::m_overloads_htab): Likewise.
6563         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
6564         m_next_overload_ptr and m_overloads_htab.
6565         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
6566         (get_mode_token, get_code_token, get_int_token): New functions.
6567         (map_attr_string): Add an optional argument that passes back
6568         the associated iterator.
6569         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
6570         (md_reader::handle_overloaded_name, add_overload_instance): New
6571         functions.
6572         (apply_iterators): Handle '@' names.  Report an error if '@'
6573         is used without iterators.
6574         (initialize_iterators): Initialize the new iterator_group fields.
6575         * genopinit.c (handle_overloaded_code_for)
6576         (handle_overloaded_gen): New functions.
6577         (main): Use them to print declarations of maybe_code_for_* and
6578         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
6579         * genemit.c (print_overload_arguments, print_overload_test)
6580         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
6581         (main): Use it to print definitions of maybe_code_for_* and
6582         maybe_gen_* functions.
6583         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
6584         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
6585         instead of explicit mode checks.
6586         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
6587         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
6588         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
6589         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
6590         (aarch64_expand_compare_and_swap): Likewise
6591         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
6592         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
6593         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
6594         (aarch64_constant_pool_reload_icode): Delete.
6595         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
6596         instead of aarch64_constant_pool_reload_icode.  Use
6597         code_for_aarch64_reload_mov instead of explicit mode checks.
6598         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
6599         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
6600         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
6601         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
6602         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
6603         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
6604         (aarch64_atomic_load_op_code): Delete.
6605         (aarch64_emit_atomic_load_op): Likewise.
6606         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
6607         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
6608         instead of aarch64_emit_atomic_load_op.
6609         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
6610         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
6611         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
6612         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
6613         character before the pattern name.
6614         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6615         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
6616         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
6617         (aarch64_frecps<mode>): Likewise.
6618         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
6619         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
6620         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
6621         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
6622         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
6624 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6626         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
6627         Allow HFmode constants if TARGET_FP_F16INST.
6629 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
6631         PR target/86014
6632         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
6633         No longer check last store for clobber of address register.
6635 2018-08-02  Martin Liska  <mliska@suse.cz>
6637         PR gcov-profile/86817
6638         * gcov.c (process_all_functions): New function.
6639         (main): Call it.
6640         (process_file): Move functions processing to
6641         process_all_functions.
6643 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
6645         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
6646         "const" to the "gimple *" and "rtx_insn *" parameters.
6647         * dumpfile.h (dump_user_location_t::dump_user_location_t):
6648         Likewise.
6649         (dump_location_t::dump_location_t): Likewise.
6651 2018-08-01  Martin Sebor  <msebor@redhat.com>
6653         PR tree-optimization/86650
6654         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
6655         rather than a "gcall *".  Directly pass the data of interest
6656         to percent_K_format, rather than building a temporary CALL_EXPR
6657         to hold it.
6658         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
6659         (gimple_fold_builtin_strncat): Adjust.
6660         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
6661         gcall* argument with gimple*.
6662         * gimple-ssa-warn-restrict.c (check_call): Same.
6663         (wrestrict_dom_walker::before_dom_children): Same.
6664         (builtin_access::builtin_access): Same.
6665         (check_bounds_or_overlap): Same
6666         (maybe_diag_overlap): Same.
6667         (maybe_diag_offset_bounds): Same.
6668         * tree-diagnostic.c (default_tree_printer): Move usage of
6669         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6670         to this callsite.
6671         * tree-pretty-print.c (percent_K_format): Add argument.
6672         * tree-pretty-print.h: Add argument.
6673         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6674         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6675         (maybe_diag_stxncpy_trunc): Same.
6676         (handle_builtin_stxncpy): Same.
6677         (handle_builtin_strcat): Same.
6679 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6681         * match.pd: Optimise pointer range checks.
6683 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6685         PR tree-optimization/86758
6686         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6687         to remove pattern statements.
6689 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6691         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6692         result of dfs_enumerate_from when constructing stmt_vec_infos,
6693         instead of additionally calling get_loop_body.
6695 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6697         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6698         parameter.
6699         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6700         When creating an iv, assert that the step is not known to be zero.
6701         (vect_setup_realignment): Update call accordingly.
6702         * tree-vect-stmts.c (vectorizable_store): Likewise.
6703         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
6705 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6707         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6708         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6709         (vectorizable_reduction): Likewise.
6710         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6711         (vect_detect_hybrid_slp_stmts): Likewise.
6712         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6714 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
6716         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6717         (wide_int_set_zero_nonzero_bits): ...this.
6718         (zero_nonzero_bits_from_vr): Rename to...
6719         (vrp_set_zero_nonzero_bits): ...this.
6720         (extract_range_from_multiplicative_op_1): Abstract wide int
6721         code...
6722         (wide_int_range_multiplicative_op): ...here.
6723         (extract_range_from_binary_expr_1): Extract wide int binary
6724         operations into their own functions.
6725         (wide_int_range_lshift): New.
6726         (wide_int_range_can_optimize_bit_op): New.
6727         (wide_int_range_shift_undefined_p): New.
6728         (wide_int_range_bit_xor): New.
6729         (wide_int_range_bit_ior): New.
6730         (wide_int_range_bit_and): New.
6731         (wide_int_range_trunc_mod): New.
6732         (extract_range_into_wide_ints): New.
6733         (vrp_shift_undefined_p): New.
6734         (extract_range_from_multiplicative_op): New.
6735         (vrp_can_optimize_bit_op): New.
6736         * tree-vrp.h (value_range::dump): New.
6737         (wide_int_range_multiplicative_op): New.
6738         (wide_int_range_lshift):New.
6739         (wide_int_range_shift_undefined_p): New.
6740         (wide_int_range_bit_xor): New.
6741         (wide_int_range_bit_ior): New.
6742         (wide_int_range_bit_and): New.
6743         (wide_int_range_trunc_mod): New.
6744         (zero_nonzero_bits_from_bounds): Rename to...
6745         (wide_int_set_zero_nonzero_bits): ...this.
6746         (zero_nonzero_bits_from_vr): Rename to...
6747         (vrp_set_zero_nonzero_bits): ...this.
6748         (range_easy_mask_min_max): Rename to...
6749         (wide_int_range_can_optimize_bit_op): this.
6750         * vr-values.c (simplify_bit_ops_using_ranges): Rename
6751         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6753 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6755         * tree-vectorizer.h (vect_orig_stmt): New function.
6756         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6757         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6758         (vect_create_epilog_for_reduction): Likewise.
6759         (vectorizable_live_operation): Likewise.
6760         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6761         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6762         * tree-vect-stmts.c (vectorizable_call): Likewise.
6763         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6765 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6767         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6768         argument.
6769         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6770         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6771         (vect_transform_loop): Likewise.
6772         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6774 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6776         * tree-vectorizer.h (vect_schedule_slp): Return void.
6777         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6778         (vect_schedule_slp): Likewise.
6780 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6782         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6783         argument.
6784         (vect_transform_loop): Update calls accordingly.  Schedule SLP
6785         instances before the main loop, if any exist.
6787 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6789         PR tree-optimization/86749
6790         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6791         If the lhs is used in a COND_EXPR, check that it is being used
6792         as the "then" or "else" value.
6794 2018-08-01  Tom de Vries  <tdevries@suse.de>
6796         PR target/86800
6797         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6798         speculation_safe_value_not_needed.
6800 2018-08-01  Richard Biener  <rguenther@suse.de>
6802         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6803         as base and offset.
6805 2018-08-01  Martin Liska  <mliska@suse.cz>
6807         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6808         format how successful transformation is dumped.
6809         (gimple_mod_pow2_value_transform): Likewise.
6810         (gimple_mod_subtract_transform): Likewise.
6811         (gimple_stringops_transform): Likewise.
6813 2018-08-01  Martin Liska  <mliska@suse.cz>
6815         PR value-prof/35543
6816         * value-prof.c (interesting_stringop_to_profile_p):
6817         Simplify the code and add BUILT_IN_MEMMOVE.
6818         (gimple_stringops_transform): Likewise.
6820 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
6822         * config/aarch64/aarch64-simd.md
6823         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6824         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6825         use GPI iterator instead of SI mode.
6827 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6829         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6830         rs6000_speculation_barrier.
6831         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6832         new barrier pattern name.
6834 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6836         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6837         (speculation_barrier): New insn.
6839 2018-08-01  Richard Biener  <rguenther@suse.de>
6841         PR bootstrap/86724
6842         * graphite.h: Include isl/id.h and isl/space.h to allow build
6843         with ISL 0.20.
6845 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
6847         PR target/86651
6848         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6849         mode for COFF targets.
6850         * defaults.h (TARGET_COFF): Define.
6851         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6852         TARGET_COFF): Define.
6853         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6854         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6855         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6857 2018-07-31  Alexandre Oliva <oliva@adacore.com>
6859         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6860         * gimple-streamer-out.c (output_bb): Save it.
6861         * lto-streamer-in.c (input_struct_function_base): Restore
6862         instance discriminator if available.  Create map on demand.
6863         * lto-streamer-out.c (output_struct_function_base): Save it if
6864         available.
6865         * final.c (decl_to_instance_map): Document LTO strategy.
6867 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
6868             Olivier Hainque  <hainque@adacore.com>
6870         * debug.h (decl_to_instance_map_t): New type.
6871         (decl_to_instance_map): Declare.
6872         (maybe_create_decl_to_instance_map): New inline function.
6873         * final.c (bb_discriminator, last_bb_discriminator): New statics,
6874         to track basic block discriminators.
6875         (final_start_function_1): Initialize them.
6876         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6877         bb_discriminator.
6878         (decl_to_instance_map): New variable.
6879         (map_decl_to_instance, maybe_set_discriminator): New functions.
6880         (notice_source_line): Set discriminator.
6882 2018-07-31  Ian Lance Taylor  <iant@golang.org>
6884         * targhooks.c (default_have_speculation_safe_value): Add
6885         ATTRIBUTE_UNUSED.
6887 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
6889         * dump-context.h: Include "pretty-print.h".
6890         (dump_context::refresh_dumps_are_enabled): New decl.
6891         (dump_context::emit_item): New decl.
6892         (class dump_context): Add fields "m_test_pp" and
6893         "m_test_pp_flags".
6894         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6895         (temp_dump_context::get_dumped_text): New decl.
6896         (class temp_dump_context): Add field "m_pp".
6897         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6898         (dump_context::refresh_dumps_are_enabled): ...and add a test for
6899         m_test_pp.
6900         (set_dump_file): Update for above change.
6901         (set_alt_dump_file): Likewise.
6902         (dump_loc): New overload, taking a pretty_printer *.
6903         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
6904         to any test pretty-printer.
6905         (make_item_for_dump_gimple_stmt): New function, adapted from
6906         optinfo::add_gimple_stmt.
6907         (dump_context::dump_gimple_stmt): Call it, and use the result,
6908         eliminating the direct usage of dump_file and alt_dump_file in
6909         favor of indirectly using them via emit_item.
6910         (make_item_for_dump_gimple_expr): New function, adapted from
6911         optinfo::add_gimple_expr.
6912         (dump_context::dump_gimple_expr): Call it, and use the result,
6913         eliminating the direct usage of dump_file and alt_dump_file in
6914         favor of indirectly using them via emit_item.
6915         (make_item_for_dump_generic_expr): New function, adapted from
6916         optinfo::add_tree.
6917         (dump_context::dump_generic_expr): Call it, and use the result,
6918         eliminating the direct usage of dump_file and alt_dump_file in
6919         favor of indirectly using them via emit_item.
6920         (make_item_for_dump_printf_va): New function, adapted from
6921         optinfo::add_printf_va.
6922         (make_item_for_dump_printf): New function.
6923         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6924         and use the result, eliminating the direct usage of dump_file and
6925         alt_dump_file in favor of indirectly using them via emit_item.
6926         (make_item_for_dump_dec): New function.
6927         (dump_context::dump_dec): Call it, and use the result,
6928         eliminating the direct usage of dump_file and alt_dump_file in
6929         favor of indirectly using them via emit_item.
6930         (make_item_for_dump_symtab_node): New function, adapted from
6931         optinfo::add_symtab_node.
6932         (dump_context::dump_symtab_node): Call it, and use the result,
6933         eliminating the direct usage of dump_file and alt_dump_file in
6934         favor of indirectly using them via emit_item.
6935         (dump_context::begin_scope): Reimplement, avoiding direct usage
6936         of dump_file and alt_dump_file in favor of indirectly using them
6937         via emit_item.
6938         (dump_context::emit_item): New member function.
6939         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6940         Set up test pretty-printer on the underlying context.  Call
6941         refresh_dumps_are_enabled.
6942         (temp_dump_context::~temp_dump_context): Call
6943         refresh_dumps_are_enabled.
6944         (temp_dump_context::get_dumped_text): New member function.
6945         (selftest::verify_dumped_text): New function.
6946         (ASSERT_DUMPED_TEXT_EQ): New macro.
6947         (selftest::test_capture_of_dump_calls): Run all tests twice, with
6948         and then without optinfo enabled.  Add uses of
6949         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
6950         * dumpfile.h: Update comment for the dump_* API.
6951         * optinfo-emit-json.cc
6952         (selftest::test_building_json_from_dump_calls): Update for new
6953         param for temp_dump_context ctor.
6954         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6955         and "m_owned" field.
6956         (optinfo_item::~optinfo_item): Likewise.
6957         (optinfo::add_item): New member function.
6958         (optinfo::emit): Update comment.
6959         (optinfo::add_string): Delete.
6960         (optinfo::add_printf): Delete.
6961         (optinfo::add_printf_va): Delete.
6962         (optinfo::add_gimple_stmt): Delete.
6963         (optinfo::add_gimple_expr): Delete.
6964         (optinfo::add_tree): Delete.
6965         (optinfo::add_symtab_node): Delete.
6966         (optinfo::add_dec): Delete.
6967         * optinfo.h (class dump_context): New forward decl.
6968         (optinfo::add_item): New decl.
6969         (optinfo::add_string): Delete.
6970         (optinfo::add_printf): Delete.
6971         (optinfo::add_printf_va): Delete.
6972         (optinfo::add_gimple_stmt): Delete.
6973         (optinfo::add_gimple_expr): Delete.
6974         (optinfo::add_tree): Delete.
6975         (optinfo::add_symtab_node): Delete.
6976         (optinfo::add_dec): Delete.
6977         (optinfo::add_poly_int): Delete.
6978         (optinfo_item::optinfo_item): Remove "owned" param.
6979         (class optinfo_item): Remove field "m_owned".
6981 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6983         PR middle-end/86705
6984         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6985         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6986         requested variable alignment.
6987         (expand_one_ssa_partition): Likewise.
6988         (expand_one_var): Likewise.
6990 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6992         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6993         to speculation_safe_value_not_needed.
6995 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
6997         * targhooks.h (speculation_safe_value_not_needed): New prototype.
6998         * targhooks.c (speculation_safe_value_not_needed): New function.
6999         * target.def (have_speculation_safe_value): Update documentation.
7000         * doc/tm.texi: Regenerated.
7002 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7004         * config/aarch64/iterators.md (ALLI_TI): New iterator.
7005         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7006         expand.
7007         (despeculate_copy<ALLI:mode>_insn): New insn.
7008         (despeculate_copyti_insn): New insn.
7009         (despeculate_simple<ALLI:mode>): New insn
7010         (despeculate_simpleti): New insn.
7011         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7012         function.
7013         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7014         aarch64_speculation_safe_value.
7015         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7017 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7019         * config/aarch64/aarch64-speculation.cc: New file.
7020         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7021         before pass_reorder_blocks.
7022         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7023         prototype.
7024         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7025         X14 and X15 when tracking speculation.
7026         * config/aarch64/aarch64.md (register name constants): Add
7027         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7028         (unspec): Add UNSPEC_SPECULATION_TRACKER.
7029         (speculation_barrier): New insn attribute.
7030         (cmp<mode>): Allow SP in comparisons.
7031         (speculation_tracker): New insn.
7032         (speculation_barrier): Add speculation_barrier attribute.
7033         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7034         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7035         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7037 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7039         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7040         aarch64_track_speculation is true.
7041         (tb<optab><mode>1): Likewise.
7042         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7043         generate CB[N]Z when tracking speculation.
7044         (aarch64_split_compare_and_swap): Likewise.
7045         (aarch64_split_atomic_op): Likewise.
7047 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7049         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7051 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7053         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7054         (speculation_barrier): New insn.
7056 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7058         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7059         * config/arm/arm.md (speculation_barrier): New expand.
7060         (speculation_barrier_insn): New pattern.
7062 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7064         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7065         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7066         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7067         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7068         list.
7069         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7070         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7071         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7072         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7073         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7074         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7075         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7076         * builtins.c (expand_speculation_safe_value): New function.
7077         (expand_builtin): Call it.
7078         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7079         * doc/extend.texi: Document __builtin_speculation_safe_value.
7080         * doc/md.texi: Document "speculation_barrier" pattern.
7081         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7082         TARGET_HAVE_SPECULATION_SAFE_VALUE.
7083         * doc/tm.texi: Regenerated.
7084         * target.def (have_speculation_safe_value, speculation_safe_value): New
7085         hooks.
7086         * targhooks.c (default_have_speculation_safe_value): New function.
7087         (default_speculation_safe_value): New function.
7088         * targhooks.h (default_have_speculation_safe_value): Add prototype.
7089         (default_speculation_safe_value): Add prototype.
7091 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7093         * dump-context.h (dump_context::dump_loc): New decl.
7094         * dumpfile.c (dump_context::dump_loc): New member function.
7095         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7096         and dump_gimple_stmt.
7097         (dump_context::dump_gimple_expr_loc): Likewise, using
7098         dump_gimple_expr.
7099         (dump_context::dump_generic_expr_loc): Likewise, using
7100         dump_generic_expr.
7101         (dump_context::dump_printf_loc_va): Likewise, using
7102         dump_printf_va.
7103         (dump_context::begin_scope): Explicitly using the global function
7104         "dump_loc", rather than the member function.
7106 2018-07-31  Martin Sebor  <msebor@redhat.com>
7108         PR tree-optimization/86741
7109         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7111 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
7113         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7114         depend on whether prefetch instructions will be emitted or not.
7115         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7116         will be emitted or not.
7117         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7118         (TARGET_SETMEM_PFD): New macros.
7120 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7122         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7123         (NULL_STMT_VEC_INFO): Delete.
7124         (stmt_vec_info::operator*): Likewise.
7125         (stmt_vec_info::operator gimple *): Likewise.
7126         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7127         of NULL_STMT_VEC_INFO.
7128         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7129         (vect_reassociating_reduction_p): Likewise.
7130         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7131         (vectorizable_store): Likewise.
7132         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7133         (vec_info::free_stmt_vec_infos): Likewise.
7135 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7137         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7138         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7140 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7142         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7143         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7144         (vec_info::free_stmt_vec_info): New private member functions.
7145         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7146         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7147         * tree-parloops.c (gather_scalar_reductions): Remove calls to
7148         set_stmt_vec_info_vec and free_stmt_vec_infos.
7149         * tree-vect-loop.c (_loop_vec_info): Remove call to
7150         set_stmt_vec_info_vec.
7151         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7152         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7153         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7154         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7155         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
7156         assignments in {vec_info::,}new_stmt_vec_info that are redundant
7157         with the clearing in the xcalloc.
7158         (stmt_vec_info_vec): Delete.
7159         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7160         (vectorize_loops): Likewise.
7161         (vec_info::~vec_info): Remove argument from call to
7162         free_stmt_vec_infos.
7163         (vec_info::add_stmt): Remove vinfo argument from call to
7164         new_stmt_vec_info.
7166 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7168         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7169         rather than a gimple stmt.
7170         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
7171         information for pattern statements when passed the original
7172         statement; instead wait to be passed the pattern statement itself.
7173         Don't call set_vinfo_for_stmt here.
7174         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7175         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7176         stmt_vec_infos here.
7177         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7178         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7179         stmt_vec_infos entry.
7181 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7183         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7184         * tree-vectorizer.c (vec_info::replace_stmt): New function.
7185         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7186         * tree-vect-stmts.c (vectorizable_call): Likewise.
7187         (vectorizable_simd_clone_call): Likewise.
7189 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7191         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7192         * tree-vectorizer.c (vec_info::remove_stmt): New function.
7193         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7194         * tree-vect-loop.c (vect_transform_loop): Likewise.
7195         * tree-vect-slp.c (vect_schedule_slp): Likewise.
7196         * tree-vect-stmts.c (vect_remove_stores): Likewise.
7198 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7200         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7201         (vect_dr_stmt): Delete.
7202         * tree-vectorizer.c (vec_info::lookup_dr): New function.
7203         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7204         of DR_VECT_AUX.
7205         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7206         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7207         (vect_verify_datarefs_alignment, vect_peeling_supportable)
7208         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7209         (vect_analyze_data_refs): Likewise.
7210         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
7211         argument.
7212         (vect_find_same_alignment_drs): Likewise.
7213         (vect_slp_analyze_node_dependences): Update calls accordingly.
7214         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7215         instead of DR_VECT_AUX.
7216         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7217         of a vector data references.  Use vec_info::lookup_dr instead of
7218         DR_VECT_AUX.
7219         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7220         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7221         instead of DR_VECT_AUX.
7223 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7225         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
7226         dr_vec_info.
7227         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7228         accordingly.
7229         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7230         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7231         (vect_gen_prolog_loop_niters): Likewise.
7233 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7235         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
7236         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
7237         (vect_known_alignment_in_bytes, vect_dr_behavior)
7238         (vect_get_scalar_dr_size): Take references as dr_vec_infos
7239         instead of data_references.  Update calls to other routines for
7240         which the same change has been made.
7241         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
7242         dr_vec_infos instead of stmt_vec_infos.
7243         (vect_analyze_data_ref_dependence): Update call accordingly.
7244         (vect_slp_analyze_data_ref_dependence)
7245         (vect_record_base_alignments): Use DR_VECT_AUX.
7246         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
7247         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
7248         (vector_alignment_reachable_p, vect_get_data_access_cost)
7249         (vect_peeling_supportable, vect_analyze_group_access_1)
7250         (vect_analyze_group_access, vect_analyze_data_ref_access)
7251         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
7252         (vect_compile_time_alias, vect_small_gap_p)
7253         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
7254         (vect_supportable_dr_alignment): Take references as dr_vec_infos
7255         instead of data_references.  Update calls to other routines for
7256         which the same change has been made.
7257         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
7258         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7259         (vect_slp_analyze_and_verify_node_alignment)
7260         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7261         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7262         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
7263         above changes.
7264         (_vect_peel_info::dr): Replace with...
7265         (_vect_peel_info::dr_info): ...this new field.
7266         (vect_peeling_hash_get_most_frequent)
7267         (vect_peeling_hash_choose_best_peeling): Update accordingly.
7268         (vect_peeling_hash_get_lowest_cost):
7269         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
7270         routines for which the same change has been made.
7271         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
7272         data_reference.
7273         * tree-vect-loop-manip.c (get_misalign_in_elems)
7274         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
7275         above changes.
7276         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7277         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
7278         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
7279         (get_group_load_store_type, get_negative_load_store_type)
7280         (vect_get_data_ptr_increment, vectorizable_store)
7281         (vectorizable_load): Likewise.
7282         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
7283         Update calls to other routines for which the same change has been made.
7285 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7287         * tree-vectorizer.h (vec_info::move_dr): New member function.
7288         (dataref_aux): Rename to...
7289         (dr_vec_info): ...this and add "dr" and "stmt" fields.
7290         (_stmt_vec_info::dr_aux): Update accordingly.
7291         (_stmt_vec_info::data_ref_info): Delete.
7292         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
7293         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
7294         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
7295         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
7296         of data_ref.
7297         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
7298         (STMT_VINFO_DR_INFO): New macro.
7299         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
7300         (set_dr_misalignment): Update after rename of dataref_aux.
7301         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
7302         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
7303         initialization of STMT_VINFO_DATA_REF.
7304         * tree-vectorizer.c (vec_info::move_dr): New function.
7305         * tree-vect-patterns.c (vect_recog_bool_pattern)
7306         (vect_recog_mask_conversion_pattern)
7307         (vect_recog_gather_scatter_pattern): Use it.
7308         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
7309         the "dr" and "stmt" fields of dr_vec_info instead of
7310         STMT_VINFO_DATA_REF.
7312 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7314         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
7315         (is_pattern_stmt_p): Use it.
7316         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
7317         on pattern statements.
7319 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7321         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
7322         original stmt as a stmt_vec_info rather than a gimple stmt.
7323         (vect_pattern_recog_1): Take the statement directly as a
7324         stmt_vec_info, rather than via a gimple_stmt_iterator.
7325         Update call to vect_mark_pattern_stmts.
7326         (vect_pattern_recog): Update calls accordingly.
7328 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7330         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
7331         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
7332         a vect_def_type for the first argument.
7333         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
7334         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
7335         operand if it isn't defined by a vectorized statement.
7336         (vect_build_gather_load_calls): Remove the mask_dt argument and
7337         update calls to vect_get_vec_def_for_stmt_copy.
7338         (vectorizable_bswap): Likewise the dt argument.
7339         (vectorizable_call): Update calls to vectorizable_bswap and
7340         vect_get_vec_def_for_stmt_copy.
7341         (vectorizable_simd_clone_call, vectorizable_assignment)
7342         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
7343         (vectorizable_comparison): Update calls to
7344         vect_get_vec_def_for_stmt_copy.
7345         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
7346         vect_is_simple_use.
7347         (vect_get_loop_based_defs): Remove dt argument and update call
7348         to vect_get_vec_def_for_stmt_copy.
7349         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
7350         and vect_get_vec_def_for_stmt_copy.
7351         (vectorizable_load): Update calls to vect_build_gather_load_calls
7352         and vect_get_vec_def_for_stmt_copy.
7353         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7354         (vectorizable_reduction, vectorizable_live_operation): Update calls
7355         to vect_get_vec_def_for_stmt_copy.
7357 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7359         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
7360         and gimple stmt arguments with a stmt_vec_info.
7361         (vect_record_base_alignments): Update calls accordingly.
7362         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
7363         and gimple stmt arguments with a stmt_vec_info.
7364         (vect_build_slp_tree_1): Remove vinfo argument and update call
7365         to vect_record_max_nunits.
7366         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
7367         and vect_record_max_nunits.
7369 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7371         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
7372         file and take a stmt_vec_info instead of a gimple stmt.
7373         (supportable_widening_operation, vect_finish_replace_stmt)
7374         (vect_finish_stmt_generation, vect_get_store_rhs)
7375         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
7376         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
7377         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
7378         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
7379         (vect_create_data_ref_ptr, bump_vector_ptr)
7380         (vect_permute_store_chain, vect_setup_realignment)
7381         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
7382         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
7383         (vectorizable_reduction, vectorizable_induction)
7384         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
7385         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
7386         than gimple stmts as arguments.
7387         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
7388         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
7389         (can_group_stmts_p, vect_check_gather_scatter)
7390         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7391         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
7392         (vect_permute_load_chain, vect_shift_permute_load_chain)
7393         (vect_transform_grouped_load)
7394         (vect_record_grouped_load_vectors): Likewise.
7395         * tree-vect-loop.c (vect_fixup_reduc_chain)
7396         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
7397         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
7398         (vectorizable_reduction, vectorizable_induction)
7399         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
7400         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
7401         (vect_get_load_store_mask): Likewise.
7402         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
7403         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
7404         * tree-vect-stmts.c (vect_mark_relevant)
7405         (is_simple_and_all_uses_invariant)
7406         (exist_non_indexing_operands_for_use_p, process_use)
7407         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
7408         (vect_get_vec_def_for_operand, vect_get_vec_defs)
7409         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
7410         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
7411         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
7412         (get_negative_load_store_type, get_load_store_type)
7413         (vect_check_load_store_mask, vect_check_store_rhs)
7414         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
7415         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7416         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7417         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7418         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
7419         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
7420         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
7421         (supportable_widening_operation): Likewise.
7423 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7425         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
7426         a stmt_vec_info instead of a gcall.
7427         (vect_check_gather_scatter): Update call accordingly.
7428         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
7429         of a gphi.
7430         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
7431         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
7432         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
7433         instead of a gimple stmt.
7434         (vect_transform_loop): Update calls accordingly.
7435         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
7436         stmt_vec_infos instead of gimple stmts.
7437         (vect_analyze_slp_instance): Update use accordingly.
7438         * tree-vect-stmts.c (read_vector_array, write_vector_array)
7439         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
7440         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
7441         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
7442         (vect_gen_widened_results_half, vect_get_loop_based_defs)
7443         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
7444         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
7445         down to subroutines.
7447 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7449         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
7450         of the worklist from a vector of gimple stmts to a vector of
7451         stmt_vec_infos.
7452         * tree-vect-stmts.c (vect_mark_relevant, process_use)
7453         (vect_mark_stmts_to_be_vectorized): Likewise
7455 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7457         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
7458         statement before passing it to vect_analyze_stmt.
7459         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
7460         the chain of phi vector definitions.  Track the exit phi via its
7461         stmt_vec_info.
7462         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
7463         STMT_VINFO_REDUC_DEF.
7464         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
7465         stmt_vec_infos to handle the statement chains.
7466         (vect_get_slp_defs): Record the first statement in the node
7467         using a stmt_vec_info.
7468         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
7469         statements here and pass their stmt_vec_info down to subroutines.
7470         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
7471         down to vect_finish_stmt_generation.
7472         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
7473         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
7474         stmt_vec_infos to subroutines.
7475         (vect_remove_stores): Use stmt_vec_infos to handle the statement
7476         chains.
7478 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7480         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
7481         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
7482         (vect_permute_store_chain, vect_setup_realignment)
7483         (vect_permute_load_chain, vect_shift_permute_load_chain)
7484         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
7485         stmts internally, and when passing values to other vectorizer routines.
7486         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7487         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
7488         (vect_analyze_loop_operations, get_initial_def_for_reduction)
7489         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
7490         (vectorizable_reduction, vectorizable_induction)
7491         (vectorizable_live_operation, vect_transform_loop_stmt)
7492         (vect_transform_loop): Likewise.
7493         * tree-vect-patterns.c (vect_reassociating_reduction_p)
7494         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
7495         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
7496         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7497         (vect_slp_analyze_node_operations_1): Likewise.
7498         * tree-vect-stmts.c (vect_mark_relevant, process_use)
7499         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
7500         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
7501         (vect_finish_stmt_generation_1, get_group_load_store_type)
7502         (get_load_store_type, vect_build_gather_load_calls)
7503         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7504         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7505         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7506         (vectorizable_store, vectorizable_load, vectorizable_condition)
7507         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
7508         (supportable_widening_operation): Likewise.
7509         (vect_get_vector_types_for_stmt): Likewise.
7510         * tree-vectorizer.h (vect_dr_behavior): Likewise.
7512 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7514         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7515         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
7516         (vect_permute_store_chain, vect_permute_load_chain)
7517         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
7518         repeated stmt_vec_info lookups.
7519         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7520         (vect_update_ivs_after_vectorizer): Likewise.
7521         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
7522         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7523         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
7524         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7525         (vect_bb_slp_scalar_cost): Likewise.
7526         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
7528 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7530         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
7531         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
7532         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
7533         to get gassigns and gcalls, rather than operating on generc gimple
7534         stmts.
7535         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
7536         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
7537         (vectorizable_load, vect_analyze_stmt): Likewise.
7538         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
7540 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7542         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
7543         return stmt_vec_infos rather than gimple stmts.  Do not accept
7544         null arguments.
7545         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7546         of a gimple stmt.
7547         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7548         Update use of get_later_stmt.
7549         (vect_get_constant_vectors): Update call accordingly.
7550         (vect_schedule_slp_instance): Likewise
7551         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
7552         (vect_slp_analyze_instance_dependence): Likewise.
7553         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
7555 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7557         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
7558         (stmt_info_for_cost::stmt_info): ...this new field.
7559         (add_stmt_costs): Update accordingly.
7560         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7561         (vect_get_known_peeling_cost): Likewise.
7562         (vect_estimate_min_profitable_iters): Likewise.
7563         * tree-vect-stmts.c (record_stmt_cost): Likewise.
7565 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7567         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
7568         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7569         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7570         accordingly.
7571         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
7573 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7575         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
7576         a gimple stmt to a stmt_vec_info.
7577         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7579 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7581         * tree-vectorizer.h (vec_info::grouped_stores): Change from
7582         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7583         (_loop_vec_info::reduction_chains): Likewise.
7584         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
7585         accordingly.
7586         * tree-vect-slp.c (vect_analyze_slp): Likewise.
7588 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7590         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
7591         a gimple stmt to a stmt_vec_info.
7592         (_stmt_vec_info::next_element): Likewise.
7593         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
7594         (vect_slp_analyze_and_verify_node_alignment)
7595         (vect_analyze_group_access_1, vect_analyze_group_access)
7596         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
7597         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
7598         (vect_supportable_dr_alignment): Update accordingly.
7599         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
7600         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
7601         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
7602         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7603         * tree-vect-slp.c (vect_build_slp_tree_1)
7604         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
7605         (vect_split_slp_store_group, vect_analyze_slp_instance)
7606         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
7607         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
7608         (get_group_load_store_type, get_load_store_type)
7609         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
7610         (vect_transform_stmt, vect_remove_stores): Likewise.
7612 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7614         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
7615         than a gimple stmt.
7616         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7617         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
7618         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
7619         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
7620         (vector_alignment_reachable_p, vect_get_data_access_cost)
7621         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
7622         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
7623         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7624         (vect_analyze_group_access_1, vect_analyze_group_access)
7625         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
7626         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
7627         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
7628         result of vect_dr_stmt and use the stmt_vec_info instead of
7629         the associated gimple stmt.
7630         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7631         (vect_gen_prolog_loop_niters): Likewise.
7632         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7634 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7636         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
7637         to a vec<stmt_vec_info>.
7638         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
7639         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
7640         vec<stmt_vec_info>.
7641         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
7642         to a vec<stmt_vec_info>.
7643         (bst_traits::value_type, bst_traits::value_type): Likewise.
7644         (bst_traits::hash): Update accordingly.
7645         (vect_get_and_check_slp_defs): Change the stmts parameter from
7646         a vec<gimple *> to a vec<stmt_vec_info>.
7647         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
7648         (vect_build_slp_tree): Likewise.
7649         (vect_build_slp_tree_2): Likewise.  Update uses of
7650         SLP_TREE_SCALAR_STMTS.
7651         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
7652         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
7653         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
7654         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
7655         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
7656         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
7657         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
7658         (vect_get_constant_vectors, vect_get_slp_defs)
7659         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
7660         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
7661         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
7662         instead of gimple stmts.
7663         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
7664         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
7665         (vect_slp_analyze_instance_dependence): Update uses of
7666         SLP_TREE_SCALAR_STMTS.
7667         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7668         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7669         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7670         (get_initial_defs_for_reduction): Likewise.
7671         (vect_create_epilog_for_reduction): Likewise.
7672         (vectorize_fold_left_reduction): Likewise.
7673         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7674         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7675         (can_vectorize_live_stmts): Likewise.
7677 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7679         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7680         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7681         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7682         than gimple stmts.
7683         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7684         of a gimple stmt.
7685         (gather_scalar_reductions): Update after above interface changes.
7686         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7687         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7688         than gimple stmts.
7689         (vect_force_simple_reduction): Likewise.
7690         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7691         LOOP_VINFO_REDUCTIONS.
7692         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7694 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7696         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7697         a gimple stmt to a stmt_vec_info.
7698         * tree-vect-loop.c (vect_active_double_reduction_p)
7699         (vect_force_simple_reduction, vectorizable_reduction): Update
7700         accordingly.
7702 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7704         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7705         vec<gimple *> to a vec<stmt_vec_info>.
7706         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7707         the reduction_phis argument from a vec<gimple *> to a
7708         vec<stmt_vec_info>.
7709         (vectorizable_reduction): Likewise the phis local variable that
7710         is passed to vect_create_epilog_for_reduction.  Update for new type
7711         of SLP_TREE_VEC_STMTS.
7712         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7713         (vectorizable_live_operation): Likewise.
7714         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7715         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7717 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7719         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7720         a gimple stmt to a stmt_vec_info.
7721         (vectorizable_condition, vectorizable_live_operation)
7722         (vectorizable_reduction, vectorizable_induction): Pass back the
7723         vectorized statement as a stmt_vec_info.
7724         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7725         use of STMT_VINFO_VEC_STMT.
7726         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7727         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7728         as stmt_vec_infos rather than gimple stmts.
7729         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7730         to a stmt_vec_info.
7731         (vectorizable_live_operation): Likewise.
7732         (vectorizable_reduction, vectorizable_induction): Likewise,
7733         updating use of STMT_VINFO_VEC_STMT.
7734         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7735         of STMT_VINFO_VEC_STMT.
7736         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7737         (vectorizable_simd_clone_call, vectorizable_conversion)
7738         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7739         (vectorizable_store, vectorizable_load, vectorizable_condition)
7740         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7741         from a gimple stmt to a stmt_vec_info.
7742         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
7743         pointer to a stmt_vec_info to the vectorizable_* routines.
7745 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7747         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7748         a gimple stmt to a stmt_vec_info.
7749         (is_pattern_stmt_p): Update accordingly.
7750         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7751         (vect_record_grouped_load_vectors): Likewise.
7752         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7753         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7754         (vect_model_reduction_cost): Likewise.
7755         (vect_create_epilog_for_reduction): Likewise.
7756         (vectorizable_reduction, vectorizable_induction): Likewise.
7757         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7758         Return the stmt_vec_info for the pattern statement.
7759         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7760         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7761         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7762         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7763         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7764         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7765         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7766         (free_stmt_vec_info, vect_is_simple_use): Likewise.
7768 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7770         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7771         (vect_finish_stmt_generation): Likewise.
7772         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7773         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7774         (vect_build_gather_load_calls): Use the return value of the above
7775         functions instead of a separate call to vinfo_for_stmt.  Use narrow
7776         scopes for the input gimple stmt and wider scopes for the associated
7777         stmt_vec_info.  Use vec_info::lookup_def when setting these
7778         stmt_vec_infos from an SSA_NAME definition.
7779         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7780         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7781         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7782         (vectorizable_store, vectorizable_load, vectorizable_condition)
7783         (vectorizable_comparison): Likewise.
7784         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7785         (vectorizable_reduction): Likewise.
7787 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7789         * tree-vectorizer.h (vect_is_simple_use): Add an optional
7790         stmt_vec_info * parameter before the optional gimple **.
7791         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7792         (process_use, vect_get_vec_def_for_operand_1): Update callers.
7793         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7794         * tree-vect-loop.c (vectorizable_reduction): Likewise.
7795         (vectorizable_live_operation): Likewise.
7796         * tree-vect-patterns.c (type_conversion_p): Likewise.
7797         (vect_look_through_possible_promotion): Likewise.
7798         (vect_recog_rotate_pattern): Likewise.
7799         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7801 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7803         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7804         a typedef to a wrapper class.
7805         (NULL_STMT_VEC_INFO): New macro.
7806         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7807         (stmt_vec_info::operator*): New function.
7808         (stmt_vec_info::operator gimple *): Likewise.
7809         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7810         (add_stmt_costs): Likewise.
7811         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7812         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7813         (vect_get_known_peeling_cost): Likewise.
7814         (vect_estimate_min_profitable_iters): Likewise.
7815         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7816         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7817         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7818         (vectorizable_store, free_stmt_vec_infos): Likewise.
7819         (new_stmt_vec_info): Change return type of xcalloc to
7820         _stmt_vec_info *.
7822 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7824         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7825         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7826         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7827         a single_imm_use-based sequence.
7828         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7830 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7832         * tree-vectorizer.h (vec_info::lookup_def): Declare.
7833         * tree-vectorizer.c (vec_info::lookup_def): New function.
7834         * tree-vect-patterns.c (vect_get_internal_def): Use it.
7835         (vect_widened_op_tree): Likewise.
7836         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7837         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7838         (vectorizable_reduction): Likewise.
7839         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7840         of a gimple *.
7841         (vect_is_slp_reduction): Update calls accordingly.  Use
7842         vec_info::lookup_def.
7843         (vect_is_simple_reduction): Likewise
7844         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7846 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7848         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7849         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7850         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7851         of vinfo_for_stmt.
7852         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7853         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7854         (vect_update_vf_for_slp, vect_analyze_loop_operations)
7855         (vect_is_slp_reduction, vectorizable_induction)
7856         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7857         * tree-vect-patterns.c (vect_init_pattern_stmt):
7858         (vect_determine_min_output_precision_1, vect_determine_precisions)
7859         (vect_pattern_recog): Likewise.
7860         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7861         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7862         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7863         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7864         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7865         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
7866         info field from a loop to a loop_vec_info.
7868 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7870         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7871         (vec_info::add_stmt): Declare.
7872         * tree-vectorizer.c (vec_info::add_stmt): New function.
7873         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7874         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7875         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7876         (vectorizable_induction): Likewise.
7877         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7878         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7879         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7880         (vectorizable_load): Likewise.
7881         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7882         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7883         (vect_recog_gather_scatter_pattern): Likewise.
7884         (append_pattern_def_seq): Likewise.  Remove a check that is
7885         performed by add_stmt itself.
7887 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7889         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7890         which make_ssa_name was called with new_stmt before new_stmt
7891         had been created.
7893 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7895         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7896         split out from...
7897         (vect_is_slp_reduction): ...here...
7898         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
7899         that are already known to be false.
7901 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7903         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7904         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
7905         STMT_VINFO_NUM_SLP_USES when it's true.
7906         (vect_free_slp_instance): Add a final_p parameter and pass it to
7907         vect_free_slp_tree.
7908         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7909         (vect_analyze_slp_instance): Likewise.
7910         (vect_slp_analyze_operations): Likewise.
7911         (vect_slp_analyze_bb_1): Likewise.
7912         * tree-vectorizer.c (vec_info): Likewise.
7913         * tree-vect-loop.c (vect_transform_loop): Likewise.
7915 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7917         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7918         function is not called for second and subsequent members of
7919         a reduction group.
7921 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7923         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7924         cases for nested loops from here to ...
7925         (vect_create_epilog_for_reduction): ...here.  Only call
7926         vect_is_simple_use for inner-loop reductions.
7928 2018-07-31  Martin Liska  <mliska@suse.cz>
7930         PR gcov-profile/85338
7931         PR gcov-profile/85350
7932         PR gcov-profile/85372
7933         * profile.c (struct location_triplet): New.
7934         (struct location_triplet_hash): Likewise.
7935         (output_location): Do not output a BB that
7936         is already recorded for a line.
7937         (branch_prob): Use streamed_locations.
7939 2018-07-31  Martin Liska  <mliska@suse.cz>
7941         PR gcov-profile/85370
7942         * coverage.c (coverage_begin_function): Do not mark target
7943         clones as artificial functions.
7945 2018-07-31  Martin Liska  <mliska@suse.cz>
7947         PR gcov-profile/83813
7948         PR gcov-profile/84758
7949         PR gcov-profile/85217
7950         PR gcov-profile/85332
7951         * profile.c (branch_prob): Do not record GOTO expressions
7952         for GIMPLE statements which locations are already streamed.
7954 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7956         * gcc.c (handle_spec_function): Accept a soft_matched_part
7957         argument, as do_spec_1.  Pass it down to ...
7958         (eval_spec_function): Accept a soft_matched_part argument,
7959         and pass it down to ...
7960         (do_spec_2): Accept a soft_matched_part argument, and pass
7961         it down to do_spec_1.
7962         (do_spec_1): Pass soft_matched_part to handle_spec_function.
7963         (handle_braces): Update call to handle_spec_function.
7964         (driver::set_up_specs): Update calls to do_spec_2.
7965         (compare_debug_dump_opt_spec_function): Likewise.
7966         (compare_debug_self_opt_spec_function): Likewise.
7968 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7970         * common.opt (nolibc): New option.
7971         * doc/invoke.texi (Link Options): Document it.
7972         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7973         * config/alpha/linux.h: Likewise.
7974         * config/arc/elf.h: Likewise.
7975         * config/arm/uclinux-elf.h: Likewise.
7976         * config/arm/unknown-elf.h: Likewise.
7977         * config/avr/avrlibc.h: Likewise.
7978         * config/bfin/bfin.h: Likewise.
7979         * config/bfin/linux.h: Likewise.
7980         * config/bfin/uclinux.h: Likewise.
7981         * config/darwin.h: Likewise.
7982         * config/darwin10.h: Likewise.
7983         * config/darwin12.h: Likewise.
7984         * config/gnu-user.h: Likewise.
7985         * config/lm32/uclinux-elf.h: Likewise.
7986         * config/pa/pa-hpux11.h: Likewise.
7987         * config/pa/pa64-hpux.h: Likewise.
7988         * config/sparc/sparc.h: Likewise.
7990 2018-07-31  Olivier Hainque  <hainque@adacore.com>
7992         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7993         undefined variables.
7995 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
7997         PR target/86640
7998         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7999         instead of GEN_INT.
8001 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8003         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8004         terminated string literal.
8006 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8008         PR rtl-optimization/85160
8009         * combine.c (is_just_move): New function.
8010         (try_combine): Allow combining two instructions into two if neither of
8011         the original instructions was a move.
8013 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
8015         PR target/86673
8016         * doc/extend.texi (Global Register Variables): Discourage use of type
8017         qualifiers.
8018         (Local Register Variables): Likewise.
8020 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
8022         PR tree-optimization/86506
8023         * hwint.h (ceil_log2): Resync with hwint.c implementation.
8025 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
8027         PR target/86547
8028         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8029         hard_regno, make sure no insn between `from` and `to` clobbers it.
8031 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
8032             Tom de Vries  <tdevries@suse.de>
8034         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8035         (PTX_DEFAULT_RUNTIME_DIM): ... this.
8036         (nvptx_goacc_validate_dims): Set default worker and gang dims to
8037         PTX_DEFAULT_RUNTIME_DIM.
8038         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8040 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
8042         * config/pa/pa.c (pa_output_addr_vec): Align address table.
8043         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8044         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8046 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
8048         * config/rs6000/constraints.md (wG constraint): Delete, no longer
8049         used.
8050         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8051         predicate to reflect toc fusion has been deleted.
8052         (toc_fusion_mem_raw): Delete, no longer used.
8053         (toc_fusion_mem_wrapped): Likewise.
8054         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8055         fusion mask bit.
8056         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8057         Delete, no longer used.
8058         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8059         meant to be used for toc fusion.
8060         (rs6000_debug_print_mode): Delete toc fusion debugging.
8061         (rs6000_debug_reg_global): Likewise.
8062         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8063         fusion and secondary reload support that were never used.
8064         (rs6000_option_override_internal): Delete TOC fusion, that was only
8065         partially defined, and it did not work unless you also used the
8066         -mcmodel= switch.
8067         (rs6000_legitimate_address_p): Delete TOC fusion support.
8068         (rs6000_opt_masks): Likewise.
8069         (fusion_wrap_memory_address): Delete function, no longer used.
8070         (fusion_split_address); Delete TOC fusion support.
8071         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8072         longer used with toc fusion being deleted.
8073         (TARGET_TOC_FUSION_FP): Likewise.
8074         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8075         UNSPEC.
8076         (toc fusion spliter): Delete TOC fusion support.
8077         (toc_fusionload_<mode>): Likewise.
8078         (toc_fusionload_di): Likewise.
8079         (fusion_gpr_load_<mode>): Delete generator function, this insn no
8080         longer needs to be named.  Rename predicate to delete TOC fusion.
8081         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8082         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8083         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8084         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8085         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8087 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8089         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8090         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
8091         __int128 in built-in function prototypes.
8092         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8093         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8095 2018-07-27  Martin Sebor  <msebor@redhat.com>
8097         PR tree-optimization/86696
8098         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8099         types, including enums.
8100         (handle_char_store): Be prepared for the above function to fail.
8102 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
8104         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8105         when optimization level is lower than 2 or optimize for size.
8107 2018-07-26  Martin Sebor  <msebor@redhat.com>
8109         PR tree-optimization/86043
8110         PR tree-optimization/86042
8111         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8112         (get_string_cst_length): Rename...
8113         (get_min_string_length): ...to this.  Add argument.
8114         (handle_char_store): Extend to handle multi-character stores by
8115         MEM_REF.
8116         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
8117         * tree.h (initializer_zerop): Add argument.
8119 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
8121         PR middle-end/86660
8122         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8123         declare target to variables if they have always,{to,from,tofrom} map
8124         kinds.
8126 2018-07-26  Martin Liska  <mliska@suse.cz>
8128         PR lto/86548
8129         * lto-wrapper.c: Add linker_output as prefix
8130         for ltrans_output_file.
8132 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
8134         PR rtl-optimization/85805
8135         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8136         value for hard registers if that was written in the same mode.
8138 2018-07-26  Martin Liska  <mliska@suse.cz>
8140         PR gcov-profile/86536
8141         * gcov.c (format_gcov): Use printf format %.*f directly
8142         and do not handle special values.
8144 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8146         * common/config/arc/arc-common.c (arc_option_optimization_table):
8147         Update default optimizations for size.
8149 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8151         * config/arc/arc.md (movsf_insn): Add short instruction selection.
8152         * config/arc/constraints.md (CfZ): New constraint.
8153         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8154         (subsf3_fpu): Likewise.
8155         (cmpsf_fpu): Likewise.
8156         (cmpsf_fpu_uneq): Likewise.
8158 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8160         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8161         accesses as well.
8162         (arc_is_uncached_mem_p): uncached applies to both the variable and
8163         the pointer.
8165 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8167         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8168         register names.
8170 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
8172         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8173         field "m_scopes" from vec to auto_vec.
8175 2018-07-25  Martin Liska  <mliska@suse.cz>
8177         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8178         return type.
8180 2018-07-25  Richard Biener  <rguenther@suse.de>
8182         PR debug/86654
8183         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8184         special wrt context_die late.
8185         (gen_subprogram_die): Re-use DIEs in local scope.
8187 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
8189         PR tree-optimization/86644
8190         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
8192 2018-07-25  Martin Liska  <mliska@suse.cz>
8194         PR middle-end/86645
8195         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8196         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8198 2018-07-25  Martin Liska  <mliska@suse.cz>
8200         PR sanitizer/79635
8201         * params.def: Explain ASan abbreviation and provide
8202         a documentation link.
8204 2018-07-24  Martin Sebor  <msebor@redhat.com>
8206         PR tree-optimization/86622
8207         PR tree-optimization/86532
8208         * builtins.h (string_length): Declare.
8209         * builtins.c (c_strlen): Correct handling of non-constant offsets.
8210         (check_access): Be prepared for non-constant length ranges.
8211         (string_length): Make extern.
8212         * expr.c (string_constant): Only handle the minor non-constant
8213         array index.  Use string_constant to compute the length of
8214         a generic string constant.
8216 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
8218         PR tree-optimization/86618
8219         * tree-vect-stmts.c (vectorizable_call): Don't take the address
8220         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8222 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
8224         PR tree-optimization/86636
8225         * json.cc (json::object::set): Fix comment.  Add assertions.
8226         (json::array::append): Move here from json.h.  Add comment and an
8227         assertion.
8228         (json::string::string): Likewise.
8229         * json.h (json::array::append): Move to json.cc.
8230         (json::string::string): Likewise.
8231         * optinfo-emit-json.cc
8232         (optrecord_json_writer::impl_location_to_json): Assert that we
8233         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
8234         wrapper around it.  Expand the location once, rather than three
8235         times.
8236         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
8237         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
8238         wrappers.
8239         (optrecord_json_writer::optinfo_to_json): Likewise, in four
8240         places.  Fix some overlong lines.
8242 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
8244         * config/aarch64/aarch64-simd.md
8245         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
8246         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
8247         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
8248         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
8249         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
8250         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
8251         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
8252         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
8253         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
8255 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
8257         PR middle-end/86627
8258         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
8259         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
8260         and abs_d == d, do the power of two handling if profitable.
8262 2018-07-24  Richard Biener  <rguenther@suse.de>
8264         * match.pd: Add BIT_FIELD_REF canonicalizations.
8266 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8268         PR c/86617
8269         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
8271 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8273         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
8274         terminated STRING_CST object.
8276 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8278         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
8280 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8282         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
8283         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
8284         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
8285         the elements into a register.
8286         (rs6000_split_v4si_init_di_reg): Delete.
8287         (rs6000_split_v4si_init): Delete.
8288         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
8289         (vsx_init_v4si): Rewrite as a define_expand.
8291 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8293         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
8294         zero_extend argument from memory): New.
8296 2018-07-22  Martin Sebor  <msebor@redhat.com>
8298         PR bootstrap/86621
8299         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
8300         diagnosing calls with unknown arguments unless -Walloca-larger-than
8301         is restricted to less than PTRDIFF_MAX bytes.
8303 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
8305         * doc/gcov.texi (Invoking Gcov): Editorial changes.
8307 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
8309         * pretty-print.c (text_info::set_location): Remove redundant
8310         "line_table" parameter from call to rich_location::set_range.
8312 2018-07-20  Martin Sebor  <msebor@redhat.com>
8314         PR middle-end/82063
8315         * builtins.c (expand_builtin_alloca): Adjust.
8316         * calls.c (alloc_max_size): Simplify.
8317         * cgraphunit.c (cgraph_node::expand): Adjust.
8318         * common.opt (larger_than_size, warn_frame_larger_than): Remove
8319         variables.
8320         (frame_larger_than_size): Same.
8321         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
8322         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
8323         Initialize.
8324         * doc/invoke.texi (GCC Command Options): Document option arguments.
8325         Explain byte-size arguments and suffixes.
8326         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
8327         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
8328         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
8329         * doc/options.texi (UInteger): Expand.
8330         (Host_Wide_Int, ByteSize): Document new properties.
8331         * final.c (final_start_function_1): Include sizes in an error message.
8332         * function.c (frame_offset_overflow): Same.
8333         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
8334         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
8335         Diagnose unbounded alloca calls only for limits of less than
8336         PTRDIFF_MAX.
8337         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
8338         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
8339         for alloca(0).
8340         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
8341         only for limits of less than PTRDIFF_MAX.
8342         * langhooks-def.h (lhd_handle_option): Change function argument
8343         to HOST_WIDE_INT.
8344         * langhooks.c (lhd_handle_option): Same.
8345         * langhooks.h (handle_option): Same.
8346         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
8347         ByteSize flags.
8348         (var_type, var_type_struct): Same.
8349         (var_set): Handle ByteSize flag.
8350         * optc-gen.awk: Add comments to output to ease debugging.  Make
8351         use of HOST_WIDE_INT where appropriate.
8352         * opts-gen-save.awk:  Use %lx to format unsigned long.
8353         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
8354         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
8355         arguments.  Parse bytes-size suffixes.
8356         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
8357         (enum_value_to_arg): Same.
8358         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
8359         (handle_option): Adjust.
8360         (generate_option): Change function argument to HOST_WIDE_INT.
8361         (cmdline_handle_error): Adjust.
8362         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
8363         (set_option): Change function argument to HOST_WIDE_INT.
8364         (option_enabled): Handle cl_host_wide_int.
8365         (get_option_state): Handle CLVC_SIZE.
8366         (control_warning_option): Same.
8367         * opts.c (common_handle_option): Change function argument to
8368         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
8369         OPT_Wvla_larger_than_.
8370         * opts.h (enum cl_var_type): Add an enumerator.
8371         * stor-layout.c (layout_decl): Print a more meaningful warning.
8372         * toplev.c (output_stack_usage): Adjust.
8374 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
8376         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
8377         call to inline_expand_builtin_string_cmp.
8378         (expand_builtin_strcmp): Likewise.
8379         (expand_builtin_strncmp): Likewise.
8380         (inline_string_cmp): Delete the last parameter, change char_type_node
8381         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
8382         two operands.
8383         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
8384         the inlining expansion on target where the type of the call has same or
8385         narrower precision than unsigned char.
8387 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
8389         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
8390         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
8391         * common.opt (fsave-optimization-record): New option.
8392         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
8393         * doc/invoke.texi (-fsave-optimization-record): New option.
8394         * dumpfile.c: Include "optinfo-emit-json.h".
8395         (struct kv_pair): Move to coretypes.h.
8396         (optgroup_options): Make non-static.
8397         (dump_context::end_scope): Call
8398         optimization_records_maybe_pop_dump_scope.
8399         * dumpfile.h (optgroup_options): New decl.
8400         * json.cc: New file.
8401         * json.h: New file.
8402         * optinfo-emit-json.cc: New file.
8403         * optinfo-emit-json.h: New file.
8404         * optinfo.cc: Include "optinfo-emit-json.h".
8405         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
8406         (optinfo_enabled_p): Check optimization_records_enabled_p.
8407         (optinfo_wants_inlining_info_p): Likewise.
8408         * optinfo.h: Update comment.
8409         * profile-count.c (profile_quality_as_string): New function.
8410         * profile-count.h (profile_quality_as_string): New decl.
8411         (profile_count::quality): New accessor.
8412         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
8413         and optinfo_emit_json_cc_tests.
8414         * selftest.h (selftest::json_cc_tests): New decl.
8415         (selftest::optinfo_emit_json_cc_tests): New decl.
8416         * toplev.c: Include "optinfo-emit-json.h".
8417         (compile_file): Call optimization_records_finish.
8418         (do_compile): Call optimization_records_start.
8419         * tree-ssa-live.c: Include optinfo.h.
8420         (remove_unused_scope_block_p): Retain inlining information if
8421         optinfo_wants_inlining_info_p returns true.
8423 2018-07-20  Richard Biener  <rguenther@suse.de>
8425         PR debug/86585
8426         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
8427         to cover -flto-partition=none.
8429 2018-07-20  Martin Liska  <mliska@suse.cz>
8431         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
8432         (get_decl_source_range): Remove unused function.
8434 2018-07-20  Richard Biener  <rguenther@suse.de>
8436         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
8437         (struct vn_phi_s): Likewise.
8438         (struct vn_reference_s): Likewise.
8439         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
8440         for searching the slot of an entry known to be in the hash itself.
8441         (vn_phi_hasher::equal): Likewise.
8442         (vn_reference_hasher::equal): Likewise.
8443         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
8444         globals.
8445         (optimistic_info, current_info): Remove, keeping only valid_info.
8446         (vn_reference_lookup_1): Remove fallback lookup.
8447         (vn_reference_lookup_2): Likewise.
8448         (vn_nary_op_lookup_1): Likewise.
8449         (vn_phi_lookup): Likewise.
8450         (vn_nary_build_or_lookup_1): Make sure to not chain the built
8451         hash element.
8452         (vn_reference_insert): Adjust, chain the inserted hash element
8453         at last_inserted_ref.
8454         (vn_reference_insert_pieces): Likewise.
8455         (visit_reference_op_call): Likewise.
8456         (vn_nary_op_insert_into): Chain the inserted hash element at
8457         last_inserted_nary.
8458         (vn_nary_op_insert_pieces): Adjust.
8459         (vn_nary_op_insert): Likewise.
8460         (vn_nary_op_insert_stmt): Likewise.
8461         (vn_phi_insert): Adjust, chain the inserted hash element at
8462         last_inserted_phi.
8463         (process_scc): Remove clearing and copying the optimistic
8464         table.  Instead remove elements inserted during an optimistic
8465         iteration from the single table we maintain.
8466         (init_scc_vn): Adjust.
8467         (free_scc_vn): Likewise.
8468         (sccvn_dom_walker::record_cond): Likewise.
8469         (sccvn_dom_walker::after_dom_children): Likewise.
8471 2018-07-19  Martin Sebor  <msebor@redhat.com>
8473         PR tree-optimization/84047
8474         PR tree-optimization/83776
8475         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
8476         (check_array_bounds): Call it.
8478 2018-07-19  Martin Sebor  <msebor@redhat.com>
8480         * align.h (align_flags): Use member initialization.
8482 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
8484         * Makefile.in (OBJS): Add optinfo.o.
8485         * coretypes.h (class symtab_node): New forward decl.
8486         (struct cgraph_node): New forward decl.
8487         (class varpool_node): New forward decl.
8488         * dump-context.h: New file.
8489         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
8490         "tree-pass.h".
8491         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
8492         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
8493         (set_alt_dump_file): Likewise.
8494         (dump_context::~dump_context): New dtor.
8495         (dump_gimple_stmt): Move implementation to...
8496         (dump_context::dump_gimple_stmt): ...this new member function.
8497         Add the stmt to any pending optinfo, creating one if need be.
8498         (dump_gimple_stmt_loc): Move implementation to...
8499         (dump_context::dump_gimple_stmt_loc): ...this new member function.
8500         Start a new optinfo and add the stmt to it.
8501         (dump_gimple_expr): Move implementation to...
8502         (dump_context::dump_gimple_expr): ...this new member function.
8503         Add the stmt to any pending optinfo, creating one if need be.
8504         (dump_gimple_expr_loc): Move implementation to...
8505         (dump_context::dump_gimple_expr_loc): ...this new member function.
8506         Start a new optinfo and add the stmt to it.
8507         (dump_generic_expr): Move implementation to...
8508         (dump_context::dump_generic_expr): ...this new member function.
8509         Add the tree to any pending optinfo, creating one if need be.
8510         (dump_generic_expr_loc): Move implementation to...
8511         (dump_context::dump_generic_expr_loc): ...this new member
8512         function.  Add the tree to any pending optinfo, creating one if
8513         need be.
8514         (dump_printf): Move implementation to...
8515         (dump_context::dump_printf_va): ...this new member function.  Add
8516         the text to any pending optinfo, creating one if need be.
8517         (dump_printf_loc): Move implementation to...
8518         (dump_context::dump_printf_loc_va): ...this new member function.
8519         Start a new optinfo and add the stmt to it.
8520         (dump_dec): Move implementation to...
8521         (dump_context::dump_dec): ...this new member function.  Add the
8522         value to any pending optinfo, creating one if need be.
8523         (dump_context::dump_symtab_node): New member function.
8524         (dump_context::get_scope_depth): New member function.
8525         (dump_context::begin_scope): New member function.
8526         (dump_context::end_scope): New member function.
8527         (dump_context::ensure_pending_optinfo): New member function.
8528         (dump_context::begin_next_optinfo): New member function.
8529         (dump_context::end_any_optinfo): New member function.
8530         (dump_context::s_current): New global.
8531         (dump_context::s_default): New global.
8532         (dump_scope_depth): Delete global.
8533         (dumpfile_ensure_any_optinfo_are_flushed): New function.
8534         (dump_symtab_node): New function.
8535         (get_dump_scope_depth): Reimplement in terms of dump_context.
8536         (dump_begin_scope): Likewise.
8537         (dump_end_scope): Likewise.
8538         (selftest::temp_dump_context::temp_dump_context): New ctor.
8539         (selftest::temp_dump_context::~temp_dump_context): New dtor.
8540         (selftest::verify_item): New function.
8541         (ASSERT_IS_TEXT): New macro.
8542         (ASSERT_IS_TREE): New macro.
8543         (ASSERT_IS_GIMPLE): New macro.
8544         (selftest::test_capture_of_dump_calls): New test.
8545         (selftest::dumpfile_c_tests): Call it.
8546         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
8547         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
8548         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
8549         descriptive comment.
8550         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
8551         (dump_node, dump_bb): Move these unrelated decls.
8552         (class dump_manager): Add leading comment.
8553         * optinfo.cc: New file.
8554         * optinfo.h: New file.
8556 2018-07-19  Michael Collison  <michael.collison@arm.com>
8557             Richard Henderson <rth@redhat.com>
8559         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
8560         (subti): Handle op1 zero.
8561         (subvti4, usub4ti4): New.
8562         (*sub<GPI>3_compare1_imm): New.
8563         (sub<GPI>3_carryinCV): New.
8564         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
8565         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
8567 2018-07-19  Michael Collison  <michael.collison@arm.com>
8568             Richard Henderson <rth@redhat.com>
8570         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
8571         (addti3): Create simpler code if low part is already known to be 0.
8572         (addvti4, uaddvti4): New.
8573         (*add<GPI>3_compareC_cconly_imm): New.
8574         (*add<GPI>3_compareC_cconly): New.
8575         (*add<GPI>3_compareC_imm): New.
8576         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
8577         handle constants within this pattern..
8578         (*add<GPI>3_compareV_cconly_imm): New.
8579         (*add<GPI>3_compareV_cconly): New.
8580         (*add<GPI>3_compareV_imm): New.
8581         (add<GPI>3_compareV): New.
8582         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
8583         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
8584         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
8585         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
8586         with 'comparison' operator.
8587         (*add<GPI>3_compareV_cconly_imm): Ditto.
8588         (*add<GPI>3_compareV_cconly): Ditto.
8589         (*add<GPI>3_compareV_imm): Ditto.
8590         (add<GPI>3_compareV): Ditto.
8591         (add<mode>3_carryinC): Ditto.
8592         (*add<mode>3_carryinC_zero): Ditto.
8593         (*add<mode>3_carryinC): Ditto.
8594         (add<mode>3_carryinV): Ditto.
8595         (*add<mode>3_carryinV_zero): Ditto.
8596         (*add<mode>3_carryinV): Ditto.
8598 2018-07-19  Michael Collison  <michael.collison@arm.com>
8599             Richard Henderson <rth@redhat.com>
8601         * config/aarch64/aarch64-modes.def (CC_V): New.
8602         * config/aarch64/aarch64-protos.h
8603         (aarch64_addti_scratch_regs): Declare
8604         (aarch64_subvti_scratch_regs): Declare.
8605         (aarch64_expand_subvti): Declare.
8606         (aarch64_gen_unlikely_cbranch): Declare
8607         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
8608         for signed overflow using CC_Vmode.
8609         (aarch64_get_condition_code_1): Handle CC_Vmode.
8610         (aarch64_gen_unlikely_cbranch): New function.
8611         (aarch64_addti_scratch_regs): New function.
8612         (aarch64_subvti_scratch_regs): New function.
8613         (aarch64_expand_subvti): New function.
8615 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8617         * config/aarch64/aarch64-option-extensions.def: New entry for profile
8618         extension.
8619         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
8620         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
8621         extension.
8623 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8625         PR target/83009
8626         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8627         address check not strict.
8629 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8631         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
8632         Umq with Umn.
8633         (store_pair_lanes<mode>): Likewise.
8634         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
8635         enum value 'ADDR_QUERY_LDP_STP_N'.
8636         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
8637         (aarch64_print_address_internal): Add declaration.
8638         (aarch64_print_ldpstp_address): Remove.
8639         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
8640         (aarch64_print_operand): Change printing of 'y'.
8641         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
8642         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
8643         'true' rather than '1'.
8644         * config/aarch64/constraints.md (Uml): Likewise.
8645         (Uml): Rename to Umn.
8646         (Umq): Remove.
8648 2018-07-19  Richard Biener  <rguenther@suse.de>
8650         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
8651         a trailing array.
8652         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
8653         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
8654         (vn_reference_hasher): Likewise.
8655         (struct vn_tables_s): Remove obstack and alloc-pool members.
8656         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
8657         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
8658         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
8659         (vn_reference_insert_pieces): Likewise.
8660         (alloc_vn_nary_op_noinit): Adjust.
8661         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
8662         (vn_phi_eq): Adjust.
8663         (shared_lookup_phiargs): Remove.
8664         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
8665         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
8666         (visit_reference_op_call): Likewise.
8667         (copy_nary, copy_phi, copy_reference): Remove.
8668         (process_scc): Rewind the obstack when iterating.  Do not
8669         copy the elements to valid_info but just move them from one
8670         hashtable to the other.
8671         (allocate_vn_table): Adjust.
8672         (free_vn_table): Likewise.
8673         (init_scc_vn): Likewise.
8674         (free_scc_vn): Likewise.
8676 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
8678         PR target/86560
8679         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8680         indirect_return as function type attribute.
8681         (ix86_attribute_table): Change indirect_return to function
8682         type attribute.
8683         * doc/extend.texi: Update indirect_return attribute.
8685 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
8687         * wide-int.h (widest2_int): New.
8688         * gimple-fold.c (arith_overflowed_p): Use it.
8689         * tree.h (widest2_int_cst): New.
8690         * tree-vrp.c (wide_int_binop_overflow): Rename from
8691         vrp_int_const_binop.
8692         Rewrite to work on trees.
8693         (extract_range_from_multiplicative_op_1): Abstract code to...
8694         (wide_int_range_min_max): ...here.
8695         (wide_int_range_cross_product): ...and here.
8696         (extract_range_from_binary_expr_1): Abstract overflow code to...
8697         (wide_int_range_mult_wrapping): ...here.
8698         * tree-vrp.h (wide_int_range_cross_product): New.
8699         (wide_int_range_mult_wrapping): New.
8701 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
8702             Julia Koval  <julia.koval@intel.com>
8704         * config/i386/x86-tune-costs.h (skylake_memcpy,
8705         skylake_memset): Replace rep_prefix with unrolling for size 512.
8707 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
8709         PR middle-end/86544
8710         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8711         comparision with EQ_EXPR in last stmt.
8713 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8715         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8716         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8717         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8718         previously known as "PowerPC AltiVec Built-in Functions".  Move
8719         some material to new subsubsections "PowerPC AltiVec Built-in
8720         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8721         ISA 2.07".
8722         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8723         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8724         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8725         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8727 2018-07-18  Richard Biener  <rguenther@suse.de>
8729         PR tree-optimization/86557
8730         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8731         EXACT_DIV_EXPR.
8733 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
8735         * config/s390/s390.c (s390_function_profiler): Generate CFI.
8737 2018-07-17  Jeff Law  <law@redhat.com>
8739         * config/arm/arm.c (get_label_padding): Update for recent
8740         changes to label_to_alignment.
8742         PR tree-optimization/86010
8743         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8745         * config/mips/mips.c (vr4130_align_insns): Update for recent
8746         changes to label_to_alignment.
8748         * config/frv/frv.c (frv_label_align): Update for recent changes
8749         to label_to_alignment.
8751         * config/nios2/nios2.c (nios2_label_align): Update for recent
8752         changes which dropped ALIGN_LABELS_LOG.
8754 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
8756         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8757         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8759 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
8761         * config/arc/arc.c (arc_label_align): Use align_labels instead of
8762         deprecated align_labels_log.
8764 2018-07-17  Richard Biener  <rguenther@suse.de>
8766         PR lto/86456
8767         * dwarf2out.c (init_sections_and_labels): Always generate
8768         a debug_line_str_section for early LTO debug.
8769         (dwarf2out_finish): Reset debug_line_str_hash output early.
8770         Bump counter for extra dwarf5 .debug_loc labels to not conflict
8771         with fat LTO part.
8772         (dwarf2out_early_finish): Output debug_line_str.
8774 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8776         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8777         index register on z196 or later.
8779 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8781         * config/s390/s390.c (s390_default_align): Set default function
8782         alignment to 16.
8783         (s390_override_options_after_change): Call s390_default align.
8784         (s390_option_override_internal): Call s390_default_align.
8785         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8787 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8789         PR middle-end/86542
8790         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8791         to _looptemp_ clauses, other than the first two.
8793 2018-07-17  Martin Liska  <mliska@suse.cz>
8795         * opts.c: Do not enable OPT_falign_* for -Os.
8797 2018-07-17  Martin Liska  <mliska@suse.cz>
8799         * align.h (MAX_CODE_ALIGN): New.
8800         (MAX_CODE_ALIGN_VALUE): New.
8801         * common/config/i386/i386-common.c (ix86_handle_option):
8802         (MAX_CODE_ALIGN): Moved to align.h.
8803         * final.c (MAX_CODE_ALIGN): Likewise.
8804         * opts.c (parse_and_check_align_values):
8805         (MAX_CODE_ALIGN): Likewise.
8806         (MAX_CODE_ALIGN_VALUE): Likewise.
8808 2018-07-17  Martin Liska  <mliska@suse.cz>
8810         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8811         in order to fulfil coding style.
8812         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8813         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8814         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8815         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8816         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8817         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8818         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8819         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8820         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8822 2018-07-17  Martin Liska  <mliska@suse.cz>
8824         * align.h: New file.
8825         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8826         directly.
8827         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8828         align_flags of label_to_alignment.
8829         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8830         align_flags class.
8831         * config/m68k/m68k.c: Do not use removed align_labels_value and
8832         align_loops_value.
8833         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8834         (LOOP_ALIGN): Likewise.
8835         (LABEL_ALIGN): Likewise.
8836         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8837         Remove not used macro.
8838         (rs6000_loop_align): Change return type to align_flags.
8839         (rs6000_loop_align_max_skip): Remove.
8840         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8841         Change return type to align_flags.
8842         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8843         Remove not used macro.
8844         (rs6000_loop_align):  Change return type to align_flags.
8845         (rs6000_loop_align_max_skip): Remove.
8846         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8847         * config/rx/rx-protos.h (rx_align_for_label): Make it
8848         static function.
8849         * config/rx/rx.c (rx_align_for_label): Change return type
8850         to align_flags.
8851         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8852         macro definitions.
8853         into align_flags class.
8854         (LABEL_ALIGN): Likewise.
8855         (LOOP_ALIGN): Likewise.
8856         * config/s390/s390.c (s390_label_align): Use align_flags
8857         class member.
8858         (s390_asm_output_function_label): Likewise.
8859         * config/sh/sh.c (sh_override_options_after_change):
8860         Use align_flags class directly without macros.
8861         (find_barrier): Likewise.
8862         (barrier_align): Likewise.
8863         (sh_loop_align): Likewise.
8864         * config/spu/spu.c (spu_option_override):
8865         Use align_flags_tuple::get_value instead of removed macros.
8866         (spu_sched_init): Likewise.
8867         * config/spu/spu.h (GTY): Likewise.
8868         * config/visium/visium.c (visium_option_override):
8869         Set "8" as default secondary alignment.
8870         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8871         in order to guarantee secondary alignment of 8.
8872         * coretypes.h: Include align.h header file.
8873         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8874         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8875         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8876         * doc/tm.texi.in: Likewise.
8877         * final.c (struct label_alignment): Remove not used structure.
8878         (LABEL_ALIGN): Change type to align_flags.
8879         (LOOP_ALIGN): Likewise.
8880         (JUMP_ALIGN): Likewise.
8881         (default_loop_align_max_skip): Remove.
8882         (default_label_align_max_skip): Likewise.
8883         (default_jump_align_max_skip): Likewise.
8884         (default_label_align_after_barrier_max_skip):
8885         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8886         (LABEL_TO_MAX_SKIP): Remove.
8887         (label_to_alignment): Return align_flags type instead of integer.
8888         (label_to_max_skip): Remove.
8889         (align_fuzz): Use align_flags type.
8890         (compute_alignments): Use align_flags type and use align_flags::max
8891         to combine multiple alignments.
8892         (grow_label_align): Grow vec instead of C array.
8893         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8894         (shorten_branches):  Use align_flags type and use align_flags::max
8895         to combine multiple alignments.
8896         (final_scan_insn_1): Remove usage of secondary alignment that comes
8897         from label alignment, but instead use proper secondary alignment
8898         which is computed in grow_label_align.
8899         * flags.h (struct align_flags_tuple): Move to align.h.
8900         (struct align_flags): Likewise.
8901         (state_align_loops): Rename to align_loops.
8902         (state_align_jumps): Rename to align_jumps.
8903         (state_align_labels): Rename to align_labels.
8904         (state_align_functions): Rename to align_functions.
8905         (align_loops_log): Remove.
8906         (align_jumps_log): Remove.
8907         (align_labels_log): Remove.
8908         (align_functions_log): Remove.
8909         (align_loops_max_skip): Remove.
8910         (align_jumps_max_skip): Remove.
8911         (align_labels_max_skip): Remove.
8912         (align_functions_max_skip): Remove.
8913         (align_loops_value): Remove.
8914         (align_jumps_value): Remove.
8915         (align_labels_value): Remove.
8916         (align_functions_value): Remove.
8917         * output.h (label_to_alignment): Change return type to align_flags.
8918         (label_to_max_skip): Remove.
8919         * target.def: Remove loop_align_max_skip, label_align_max_skip,
8920         jump_align_max_skip macros.
8921         * targhooks.h (default_loop_align_max_skip): Remove.
8922         (default_label_align_max_skip): Likewise.
8923         (default_jump_align_max_skip): Likewise.
8924         (default_label_align_after_barrier_max_skip): Remove.
8925         * toplev.c (read_log_maxskip): Use ::normalize function.
8926         (parse_N_M): Remove not used argument and also call ::normalize.
8927         (parse_alignment_opts): Do not pass unused arguments.
8928         * varasm.c (assemble_start_function): Use directly align_functions
8929         instead of removed macros.
8930         * system.h: Do not poison removed macros.
8932 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8934         PR middle-end/86539
8935         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8936         and cond temporaries don't have reference type if iterator has
8937         pointer type.  For init use &for_pre_body instead of pre_p if
8938         for_pre_body is non-empty.
8940 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8942         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8943         double-double modes to SFmode directly directly.
8944         (trunc<mode>sf2_fprs): Delete.
8946 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8948         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8949         for conversions between IFmode and the decimal floating point modes.
8950         (init_float128_ieee): Use the correct names for conversions between
8951         KFmode and the decimal floating point modes.
8953 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
8955         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8956         for the conversions between TDmode and IFmode.
8957         (init_float128_ieee): Use more correct names for the conversions
8958         between TDmode and KFmode.
8960 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
8962         PR tree-optimization/86526
8963         * builtins.c (expand_builtin_memcmp): Formatting fixes.
8964         (inline_expand_builtin_string_cmp): Likewise.
8965         (inline_string_cmp): Likewise.  Use c_readstr instead of
8966         builtin_memcpy_read_str.  Add unit_mode temporary.
8968 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8970         PR middle-end/86528
8971         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8972         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8974 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8976         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8977         Alphabetize prototypes of built-in functions, separating out
8978         built-in functions that are listed in this section but should be
8979         described elsewhere.
8981 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
8983         PR target/86511
8984         * expmed.c (emit_store_flag): Do not emit setcc followed by a
8985         conditional move when trapping comparison was split to a
8986         non-trapping one (and vice versa).
8988 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8990         * config/s390/s390.c (s390_function_profiler): Generate nops
8991         instead of profiler call sequences.
8992         * config/s390/s390.opt: Add the new option.
8994 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
8996         * config/s390/s390.c (s390_function_profiler): Generate
8997         __mcount_loc section.
8998         * config/s390/s390.opt: Add the new option.
9000 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9002         * common.opt: Add the new warning.
9003         * config/s390/s390.c (s390_function_profiler): Emit "brasl
9004         %r0,__fentry__" when -mfentry is specified.
9005         (s390_option_override_internal): Disallow -mfentry for 31-bit
9006         CPUs.
9007         * config/s390/s390.opt: Add the new option.
9009 2018-07-16  Richard Biener  <rguenther@suse.de>
9011         PR lto/86523
9012         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9013         for function-local FUNCTION_DECL and RESULT_DECL immediately.
9015 2018-07-16  Martin Liska  <mliska@suse.cz>
9017         PR ipa/86529
9018         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9019         to ::get_create.
9021 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9023         * config/arc/arcHS.md: Update ARCHS scheduling rules.
9025 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9027         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9028         for ARCHS4x.
9029         * config/arc/arc-cpus.def (hs4x): New cpu.
9030         (hs4xd): Likewise.
9031         * config/arc/arc-tables.opt: Regenerate.
9032         * config/arc/arc.c (arc_sched_issue_rate): New function.
9033         (TARGET_SCHED_ISSUE_RATE): Define.
9034         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9035         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9036         fpu_cvt.
9037         (attr tune): Add ARCHS4x tune values.
9038         (attr tune_dspmpy): Define.
9039         (*tst): Correct instruction type.
9040         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9041         * config/arc/arcHS4x.md: New file.
9042         * config/arc/fpu.md: Update instruction type attributes.
9043         * config/arc/t-multilib: Regenerate.
9045 2018-07-16  Tom de Vries  <tdevries@suse.de>
9047         PR debug/86455
9048         * var-tracking.c (vt_initialize): Fix pre_dec handling.
9050 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9052         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9053         early clobber.
9055 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
9057         PR tree-optimization/86514
9058         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9059         conversion to a boolean type from a type with greater precision.
9061 2018-07-16  Tom de Vries  <tdevries@suse.de>
9063         * var-tracking.c (vt_initialize): Print adjusted insn slim if
9064         dump_flags request TDF_SLIM.
9066 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
9068         * fold-const.c (int_const_binop_1): Abstract...
9069         (wide_int_binop): ...wide int code here.
9070         (poly_int_binop): ...poly int code here.
9071         Abstract the rest of int_const_binop_1 into int_const_binop.
9072         * fold-const.h (wide_int_binop): New.
9073         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9074         Remove useless PLUS/MINUS_EXPR case.
9075         (zero_nonzero_bits_from_vr): Move wide int code...
9076         (zero_nonzero_bits_from_bounds): ...here.
9077         (extract_range_from_binary_expr_1): Move mask optimization code...
9078         (range_easy_mask_min_max): ...here.
9079         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9080         (range_easy_mask_min_max): New.
9082 2018-07-15  Jeff Law  <law@redhat.com>
9084         PR target/85993
9085         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9086         block.
9088 2018-07-14  Jim Wilson  <jimw@sifive.com>
9090         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9092 2018-07-14  Paul Koning  <ni1d@arrl.net>
9094         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9096 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
9098         * lto-streamer-out.c (copy_function_or_variable): Dump info about
9099         copying section.
9101 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
9102             Steve Munroe  <munroesj52@gmail.com>
9104         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9105         (_mm_andnot_si128): Likewise.
9106         (_mm_or_si128): Likewise.
9107         (_mm_xor_si128): Likewise.
9109 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
9111         PR middle-end/78809
9112         * builtins.c (expand_builtin_memcmp): Inline the calls first
9113         when result_eq is false.
9114         (expand_builtin_strcmp): Inline the calls first.
9115         (expand_builtin_strncmp): Likewise.
9116         (inline_string_cmp): New routine. Expand a string compare
9117         call by using a sequence of char comparison.
9118         (inline_expand_builtin_string_cmp): New routine. Inline expansion
9119         a call to str(n)cmp/memcmp.
9120         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9121         New option.
9122         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9124 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
9126         * config/arm/driver-arm.c: Include arm-native.h.
9127         (host_detect_local_cpu): Use auto-generated data tables.
9128         (vendors, arm_cpu_table): Delete.  Move part information to ...
9129         * config/arm/arm-cpus.in: ... here.
9130         * config/arm/parsecpu.awk (gen_native): New function.
9131         (vendor, part): New CPU fields.
9132         (END): Add support for building the native CPU detection tables.
9133         * config/arm/t-arm (arm-native.h): Add build rule.
9134         (driver-arm.o): Add dependency on arm-native.h.
9136 2018-07-13  Richard Biener  <rguenther@suse.de>
9138         PR middle-end/85974
9139         * match.pd (addr1 - addr2): Allow either of the operand to
9140         have a conversion.
9142 2018-07-13  Tom de Vries  <tdevries@suse.de>
9144         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9145         in remap_ssa_name.
9147 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
9149         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9150         arrays instead of numbered variables.
9152 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9154         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9155         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9157 2018-07-13  Richard Biener  <rguenther@suse.de>
9159         PR debug/86452
9160         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9161         instead of get_context_die.
9163 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
9164             Richard Biener  <rguenther@suse.de>
9166         PR middle-end/86489
9167         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9168         that the loop latch destination where phi is defined.
9170 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
9172         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9173         (riscv_expand_epilogue): Add assertion to check interrupt mode.
9174         (riscv_set_current_function): Extract getting interrupt type to new
9175         function.
9176         (riscv_get_interrupt_type): New function.
9177         (riscv_merge_decl_attributes): New function, checking interrupt type is
9178         same.
9179         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9181 2018-07-12  Paul Koning  <ni1d@arrl.net>
9183         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9184         directive.
9186 2018-07-12  Paul Koning  <ni1d@arrl.net>
9188         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9189         zero reference, add doloop_end instead.
9190         * doc/md.texi (decrement_and_branch_until_zero): Remove.
9191         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
9192         detail for doloop_end.
9194 2018-07-12  Martin Sebor  <msebor@redhat.com>
9196         PR c/86453
9197         * attribs.c (decl_attributes): Reject conflicting attributes before
9198         calling attribute handlers.
9200 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
9202         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9203          parameter.
9204         (gcc::dump_manager::get_dump_file_name): likewise.
9205         (dump_begin): Likewise.
9206         * dumpfile.h (dump_begin): Update prototype.
9207         (gcc::dump_manager::get_dump_file_name,
9208         gcc::dump_manager::get_dump_file_name): Update prototype.
9210 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9212         * internal-fn.h (vectorizable_internal_fn_p): New function.
9213         * tree-vect-slp.c (compatible_calls_p): Likewise.
9214         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
9215         to internal functions.
9216         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9218 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9220         * fold-const.h (inverse_conditions_p): Declare.
9221         * fold-const.c (inverse_conditions_p): New function.
9222         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
9223         that test the inverse condition of a conditional internal function.
9224         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9225         * internal-fn.c (internal_fn_mask_index): Handle conditional
9226         internal functions.
9227         (vectorized_internal_fn_supported_p): New function.
9228         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
9229         (any_pred_load_store): Replace with...
9230         (need_to_predicate): ...this new variable.
9231         (redundant_ssa_names): New variable.
9232         (ifcvt_can_use_mask_load_store): Move initial checks to...
9233         (ifcvt_can_predicate): ...this new function.  Handle tree codes
9234         for which a conditional internal function exists.
9235         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
9236         instead of ifcvt_can_use_mask_load_store.  Update after variable
9237         name change.
9238         (predicate_load_or_store): New function, split out from
9239         predicate_mem_writes.
9240         (check_redundant_cond_expr): New function.
9241         (value_available_p): Likewise.
9242         (predicate_rhs_code): Likewise.
9243         (predicate_mem_writes): Rename to...
9244         (predicate_statements): ...this.  Use predicate_load_or_store
9245         and predicate_rhs_code.
9246         (combine_blocks, tree_if_conversion): Update after above name changes.
9247         (ifcvt_local_dce): Handle redundant_ssa_names.
9248         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
9249         general conditional functions.
9250         * tree-vect-stmts.c (vectorizable_call): Likewise.
9252 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9253             Alan Hayward  <alan.hayward@arm.com>
9254             David Sherwood  <david.sherwood@arm.com>
9256         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
9257         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
9258         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
9259         plus and minus and convert them into IFN_COND_FMA-based sequences.
9260         (convert_mult_to_fma): Handle conditional plus and minus.
9262 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9264         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
9265         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
9266         (cond_fnms_optab): New optabs.
9267         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
9268         internal functions.
9269         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
9270         * internal-fn.h (get_conditional_internal_fn): Declare.
9271         (get_unconditional_internal_fn): Likewise.
9272         * internal-fn.c (cond_ternary_direct): New macro.
9273         (expand_cond_ternary_optab_fn): Likewise.
9274         (direct_cond_ternary_optab_supported_p): Likewise.
9275         (FOR_EACH_COND_FN_PAIR): Likewise.
9276         (get_conditional_internal_fn): New function.
9277         (get_unconditional_internal_fn): Likewise.
9278         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
9279         (gimple_match_op::gimple_match_op): Add a new overload for 5
9280         operands.
9281         (gimple_match_op::set_op): Likewise.
9282         (gimple_resimplify5): Declare.
9283         * genmatch.c (decision_tree::gen): Generate simplifications for
9284         5 operands.
9285         * gimple-match-head.c (gimple_simplify): Define an overload for
9286         5 operands.  Handle calls with 5 arguments in the top-level overload.
9287         (convert_conditional_op): Handle conversions from unconditional
9288         internal functions to conditional ones.
9289         (gimple_resimplify5): New function.
9290         (build_call_internal): Pass a fifth operand.
9291         (maybe_push_res_to_seq): Likewise.
9292         (try_conditional_simplification): Try converting conditional
9293         internal functions to unconditional internal functions.
9294         Handle 3-operand unconditional forms.
9295         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
9296         Define ternary equivalents of the current rules for binary conditional
9297         internal functions.
9298         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
9299         ternary operations.
9300         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
9301         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
9302         (optab): Handle them.
9303         (SVE_COND_FP_TERNARY): New int iterator.
9304         (sve_fmla_op, sve_fmad_op): New int attributes.
9305         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
9306         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
9307         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
9309 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9311         * target.def (preferred_else_value): New target hook.
9312         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
9313         * doc/tm.texi: Regenerate.
9314         * targhooks.h (default_preferred_else_value): Declare.
9315         * targhooks.c (default_preferred_else_value): New function.
9316         * internal-fn.h (conditional_internal_fn_code): Declare.
9317         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
9318         (get_conditional_internal_fn): Use it.
9319         (conditional_internal_fn_code): New function.
9320         * gimple-match.h (gimple_match_cond): New struct.
9321         (gimple_match_op): Add a cond member function.
9322         (gimple_match_op::gimple_match_op): Update all forms to take a
9323         gimple_match_cond.
9324         * genmatch.c (expr::gen_transform): Use the same condition as res_op
9325         for the suboperation, but don't specify a particular else_value.
9326         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
9327         (visit_nary_op, visit_reference_op_load): Pass
9328         gimple_match_cond::UNCOND to the gimple_match_op constructor.
9329         * gimple-match-head.c: Include tree-eh.h
9330         (convert_conditional_op): New function.
9331         (maybe_resimplify_conditional_op): Likewise.
9332         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
9333         (gimple_resimplify2): Likewise.
9334         (gimple_resimplify3): Likewise.
9335         (gimple_resimplify4): Likewise.
9336         (maybe_push_res_to_seq): Return null for conditional operations.
9337         (try_conditional_simplification): New function.
9338         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
9339         constructor.
9340         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
9341         IFN_COND_* call.
9342         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
9343         function.
9344         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
9346 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
9348         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
9349         DECL_FCONTEXT
9350         (hash_tree): Do not hash DECL_FCONTEXT
9351         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
9352         Do not stream DECL_FCONTEXT.
9353         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
9354         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
9356 2018-07-12  Richard Biener  <rguenther@suse.de>
9358         PR debug/86462
9359         * dwarf2out.c (gen_block_die): Only output blocks when they have
9360         at least one !DECL_IGNORED_P variable.
9362 2018-07-12  Richard Biener  <rguenther@suse.de>
9364         PR target/84829
9365         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
9366         Remove -mieee-fp handling.
9368 2018-07-12  Richard Biener  <rguenther@suse.de>
9370         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
9371         left-over from last patch.
9373 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
9375         PR tree-optimization/86492
9376         * gimple-ssa-store-merging.c
9377         (imm_store_chain_info::coalesce_immediate_stores): Call
9378         check_no_overlap even for the merge_overlapping case.  Formatting fix.
9380 2018-07-12  Richard Biener  <rguenther@suse.de>
9382         PR middle-end/86479
9383         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
9384         move possibly trapping operations into the conditional.
9386 2018-07-12  Richard Biener  <rguenther@suse.de>
9388         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
9389         (vn_lookup_simplify_result): Remove recursion limit applied
9390         here.
9391         (vn_nary_build_or_lookup_1): Adjust.
9392         (try_to_simplify): Likewise.
9393         * gimple-match-head.c (gimple_resimplify1): Instead apply one
9394         here.
9395         (gimple_resimplify2): Likewise.
9396         (gimple_resimplify3): Likewise.
9397         (gimple_resimplify4): Likewise.
9399 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
9401         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
9402         Use __mmask64 type instead of __mmask8 for __M argument.
9403         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
9404         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
9405         __U argument.
9406         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
9407         __mmask16 for __M argument.
9408         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
9409         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
9410         to __mmask16 instead of __mmask8.
9411         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
9412         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
9413         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
9414         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
9415         instead of __mmask16 for __U argument.
9416         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
9417         __mmask16 instead of __mmask8 for __U argument.
9418         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
9419         __U argument.
9420         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
9421         __mmask16.
9422         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
9423         argument.
9424         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
9425         __U argument.
9426         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
9427         __mmask16.
9428         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
9429         of __mmask16.
9430         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
9431         __U argument.
9432         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
9433         __U argument.
9434         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
9435         __U argument.
9436         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
9437         __U argument.
9438         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
9439         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
9440         return type as well as __M argument type and all casts from __mmask8
9441         to __mmask32.
9442         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
9443         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
9444         return type as well as __M argument type and all casts from __mmask8
9445         to __mmask16.
9446         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
9447         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
9448         return type as well as __M argument type and all casts from __mmask8
9449         to __mmask32.
9450         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
9451         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
9452         return type as well as __M argument type and all casts from __mmask8
9453         to __mmask16.
9454         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
9455         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
9456         __mmask16.
9458 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
9460         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
9461         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
9462         for __U argument.
9464 2018-07-11  Paul Koning  <ni1d@arrl.net>
9466         * doc/md.texi (define_subst): Document how multiple occurrences of
9467         the same argument in the replacement pattern are handled.
9469 2018-07-11  Paul Koning  <ni1d@arrl.net>
9471         * doc/extend.texi (Common Variable Attributes): Move "mode" into
9472         alphabetical order.
9473         (Common Type Attributes): Add "mode" attribute.
9475 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
9477         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
9478         stream DECL_ORIGINAL_TYPE.
9479         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
9480         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
9481         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
9482         Do not walk original type.
9483         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
9484         external decls.
9485         (write_ts_decl_non_common_tree_pointers): Do not stream
9486         DECL_ORIGINAL_TYPE
9487         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
9488         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
9490 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9492         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
9493         thread twice from the same starting edge.
9495 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9497         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
9498         * gimple.c (gimple_call_nonnull_result_p): ...here...
9499         (gimple_call_nonnull_arg): ...and here.
9500         * gimple.h (gimple_call_nonnull_result_p): New.
9501         (gimple_call_nonnull_arg): New.
9503 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
9505         * config/arm/arm-cpus.in: Move information from fpu field of each
9506         cpu definition to the isa field.
9507         * config/arm/parsecpu.awk (fpu): Delete match rule.
9508         (gen_comm_data): Don't add bits from the CPU's FPU entry.
9510 2018-07-11  Richard Biener  <rguenther@suse.de>
9512         PR debug/86457
9513         * dwarf2out.c (init_sections_and_labels): Use
9514         output_asm_line_debug_info consistently.
9515         (dwarf2out_early_finish): Likewise.
9516         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
9517         type units.
9519 2018-07-11  Richard Biener  <rguenther@suse.de>
9521         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
9522         Rework father_bb setting in a way to avoid propagating constants
9523         multiple times on a loop body.
9525 2018-07-10  Mark Wielaard  <mark@klomp.org>
9527         PR debug/86459
9528         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
9530 2018-07-10  Richard Biener  <rguenther@suse.de>
9532         * hash-map.h (hash_map::iterator::operator*): Return
9533         references to key and value.
9535 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
9537         PR c++/86443
9538         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
9539         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
9540         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
9541         (gimplify_omp_for): For composite loops, move outer
9542         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
9543         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
9544         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
9545         TREE_LIST for both the original class iterator and the "last" helper
9546         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
9547         loop, remember has_decl_expr from outer composite loops for the
9548         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
9550 2018-07-09  Martin Sebor  <msebor@redhat.com>
9552         PR middle-end/77357
9553         PR middle-end/86428
9554         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
9555         accessing implicitly initialized array elements.
9556         * expr.c (string_constant): Handle string initializers of
9557         character arrays within aggregates.
9558         * gimple-fold.c (fold_array_ctor_reference): Add argument.
9559         Store element offset.  As a special case, handle zero size.
9560         (fold_nonarray_ctor_reference): Same.
9561         (fold_ctor_reference): Add argument.  Store subobject offset.
9562         * gimple-fold.h (fold_ctor_reference): Add argument.
9564 2018-07-09  Paul Koning  <ni1d@arrl.net>
9566         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
9567         (pdp11_insn_cost): New function.
9568         (pdp11_md_asm_adjust): New function.
9569         (TARGET_INVALID_WITHIN_DOLOOP): Define.
9570         (pdp11_rtx_costs): Update to match machine better.
9571         (output_addr_const_pdp11): Correct format mismatch warnings.
9572         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
9573         * config/pdp11/pdp11.md: General change to add base_cost and/or
9574         length attributes for use by new pdp11_insn_cost function.
9575         (MIN_BRANCH): Correct definition.
9576         (MIN_SOB): Ditto.
9577         (doloop_end): Use standard pattern name for looping pattern.
9578         (doloop_end_nocc): New.
9579         (movsf): Add another constraint alternative.
9580         (zero_extendqihi2): Add constraint alternatives for not in place
9581         extend.
9582         (zero_extendhisi2): Remove.
9583         (shift patterns): Add CC handling variants.
9584         (bswaphi2): New.
9585         (bswapsi2): New.
9586         (rothi3): New.
9587         (define_peephole2): New peephole to recognize mov that sets CC for
9588         subsequent test.
9590 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9592         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
9593         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
9594         wi::add.
9596 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
9598         PR c/86420
9599         * real.c (real_nextafter): Return true if result is denormal.
9601 2018-07-09  Martin Liska  <mliska@suse.cz>
9603         * common.opt: Add back wrongly removed attribute.
9605 2018-07-09  Richard Biener  <rguenther@suse.de>
9607         PR debug/86413
9608         * dwarf2out.c (gen_block_die): For an early generated DIE
9609         always output high/low PC attributes.
9611 2018-07-09  Tom de Vries  <tdevries@suse.de>
9613         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
9614         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
9615         onto VAR_DECL with abstract origin.
9617 2018-07-07  Jim Wilson  <jimw@sifive.com>
9619         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
9621 2018-07-07  Tom de Vries  <tdevries@suse.de>
9623         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
9625 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
9627         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
9628         overflow_type.
9629         (combine_bound): Use wide-int overflow calculation instead of
9630         rolling our own.
9631         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
9632         overflow_type.
9633         * fold-const.c (int_const_binop_2): Same.
9634         (extract_muldiv_1): Same.
9635         (fold_div_compare): Same.
9636         (fold_abs_const): Same.
9637         * match.pd: Same.
9638         * poly-int.h (add): Same.
9639         (sub): Same.
9640         (neg): Same.
9641         (mul): Same.
9642         * predict.c (predict_iv_comparison): Same.
9643         * profile-count.c (slow_safe_scale_64bit): Same.
9644         * simplify-rtx.c (simplify_const_binary_operation): Same.
9645         * tree-chrec.c (tree_fold_binomial): Same.
9646         * tree-data-ref.c (split_constant_offset_1): Same.
9647         * tree-if-conv.c (idx_within_array_bound): Same.
9648         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
9649         * tree-ssa-phiopt.c (minmax_replacement): Same.
9650         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
9651         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
9652         * vr-values.c (vr_values::adjust_range_with_scev): Same.
9653         * wide-int.cc (wi::add_large): Same.
9654         (wi::mul_internal): Same.
9655         (wi::sub_large): Same.
9656         (wi::divmod_internal): Same.
9657         * wide-int.h: Change overflow type to overflow_type for neg, add,
9658         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
9659         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
9660         mul_internal, divmod_internal.
9661         (overflow_type): New enum.
9662         (accumulate_overflow): New.
9664 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9666         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
9667         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9669 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9671         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9672         argument is checked for zero before entering loop, avoid checking again.
9674 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9676         * gimplify.h (generic_expr_could_trap_p): Set as global function.
9677         * gimplify.h (generic_expr_could_trap_p): Likwise.
9678         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9680 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
9682         PR tree-optimization/86401
9683         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9684         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9685         (fold_bit_and_mask): ... here.  New helper function for match.pd.
9686         * fold-const.h (fold_bit_and_mask): Declare.
9687         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9689 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
9691         PR target/86324
9692         * target.def (translate_mode_attribute): New hook.
9693         * targhooks.h (default_translate_mode_attribute): Declare.
9694         * targhooks.c (default_translate_mode_attribute): New function.
9695         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9696         * doc/tm.texi: Regenerate.
9697         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9698         (rs6000_translate_mode_attribute): New function.
9700 2018-07-06  Paul Koning  <ni1d@arrl.net>
9702         * doc/md.texi (define_split): Document DONE and FAIL.
9703         (define_peephole2): Ditto.
9705 2018-07-05  Jeff Law  <law@redhat.com>
9707         PR tree-optimization/86010
9708         * tree-ssa-dse.c (compute_trims): More aggressively trim at
9709         both the head and tail of mem* and str* calls.
9711 2018-07-05  Jim Wilson  <jimw@sifive.com>
9713         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9715 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
9717         * config/aarch64/aarch64-simd.md: correct flags text for
9718         MIN_EXPR replacement.
9720 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
9722         * configure: Regenerated.
9724 2018-07-05  Carl Love  <cel@us.ibm.com>
9726         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9727         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9728         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9729         VSX_BUILTIN_DOUBLEL_V4SF.
9731 2018-07-05  Martin Sebor  <msebor@redhat.com>
9733         PR c++/86400
9734         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9735         than its domain to compute its the upper bound of a char array.
9737 2018-07-05  Nathan Sidwell  <nathan@acm.org>
9739         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9740         * doc/cpp.texi: Update comment.
9741         * doc/tm.texi: Rebuilt.
9742         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9743         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9744         * doc/extend.texi (Backwards Compatibility): Clarify it is system
9745         headers affected by extern "C".
9746         * system.h: Poison NO_IMPLICIT_EXTERN_C.
9747         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9748         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9749         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9750         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9751         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9752         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9753         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9754         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9755         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9756         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9757         config/sparc/sp64-elf.h, config/spu/spu.h,
9758         config/stormy16/stormy16.h, config/v850/v850.h,
9759         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9760         define NO_IMPLICIT_EXTERN_C.
9761         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9763 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9765         PR target/84711
9766         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9767         instead of GET_MODE_SIZE when comparing Units.
9769 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9771         PR target/84711
9772         * rtlanal.c (set_noop_p): Constrain on mode change,
9773         include hard-reg-set.h
9775 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9777         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9779 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
9781         Revert
9782         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9784         PR sanitizer/84250
9785         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9786         libasan.
9787         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9789 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9791         PR sanitizer/84250
9792         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9793         libasan.
9794         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9796 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
9798         PR middle-end/86380
9799         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9801 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
9803         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9804         neg_*_op* variables.
9806 2018-07-04  Martin Liska  <mliska@suse.cz>
9808         * tree-switch-conversion.c: Define
9809         max_ratio_for_speed and max_ratio_for_size constants.
9811 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9812             Martin Liska  <mliska@suse.cz>
9814         PR middle-end/66240
9815         PR target/45996
9816         PR c/84100
9817         * common.opt: Rename align options with 'str_' prefix.
9818         * common/config/i386/i386-common.c (set_malign_value): New
9819         function.
9820         (ix86_handle_option): Use it to set -falign-* options/
9821         * config/aarch64/aarch64-protos.h (struct tune_params): Change
9822         type from int to string.
9823         * config/aarch64/aarch64.c: Update default values from int
9824         to string.
9825         * config/alpha/alpha.c (alpha_override_options_after_change):
9826         Likewise.
9827         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9828         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9829         max skip conditionally.
9830         * config/i386/freebsd.h (SUBALIGN_LOG): New.
9831         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9832         max skip conditionally.
9833         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9834         max skip conditionally.
9835         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9836         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9837         max skip conditionally.
9838         * config/i386/i386.c (struct ptt): Change type from int to
9839         string.
9840         (ix86_default_align): Set default values.
9841         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9842         max skip conditionally.
9843         * config/i386/iamcu.h (SUBALIGN_LOG): New.
9844         (ASM_OUTPUT_MAX_SKIP_ALIGN):
9845         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9846         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9847         max skip conditionally.
9848         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9849         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9850         * config/i386/x86-64.h (SUBALIGN_LOG): New.
9851         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9852         max skip conditionally.
9853         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9854         * config/ia64/ia64.c (ia64_option_override): Set default values
9855         for alignment options.
9856         * config/m68k/m68k.c: Handle new str_align_* options.
9857         * config/mips/mips.c (mips_set_compression_mode): Change
9858         type of constants.
9859         (mips_option_override): Set default values for options.
9860         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9861         Likewise.
9862         * config/rs6000/rs6000.c (rs6000_option_override_internal):
9863         Likewise.
9864         * config/rx/rx.c (rx_option_override): Likewise.
9865         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9866         (LABEL_ALIGN): Use align_labels_log.
9867         (LOOP_ALIGN): Use align_loops_align.
9868         * config/s390/s390.c (s390_asm_output_function_label): Use new
9869         macros.
9870         * config/sh/sh.c (sh_override_options_after_change):
9871         Change type of constants.
9872         * config/spu/spu.c (spu_sched_init): Likewise.
9873         * config/sparc/sparc.c (sparc_option_override): Set default
9874         values for options.
9875         * config/visium/visium.c (visium_option_override): Likewise.
9876         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9877         emit p2align format with last argument if it's not needed.
9878         * doc/invoke.texi: Document extended format of -falign-*.
9879         * final.c: Use align_labels alignment.
9880         * flags.h (struct target_flag_state): Change type to use
9881         align_flags.
9882         (struct align_flags_tuple): New.
9883         (struct align_flags): Likewise.
9884         (align_loops_log): Redefine macro to use new types.
9885         (align_loops_max_skip): Redefine macro to use new types.
9886         (align_jumps_log): Redefine macro to use new types.
9887         (align_jumps_max_skip): Redefine macro to use new types.
9888         (align_labels_log): Redefine macro to use new types.
9889         (align_labels_max_skip): Redefine macro to use new types.
9890         (align_functions_log): Redefine macro to use new types.
9891         (align_loops): Redefine macro to use new types.
9892         (align_jumps): Redefine macro to use new types.
9893         (align_labels): Redefine macro to use new types.
9894         (align_functions): Redefine macro to use new types.
9895         (align_functions_max_skip): Redefine macro to use new types.
9896         (align_loops_value): New macro.
9897         (align_jumps_value): New macro.
9898         (align_labels_value): New macro.
9899         (align_functions_value): New macro.
9900         * function.c (invoke_set_current_function_hook): Propagate
9901         alignment values from flags to global variables default in
9902         topleev.h.
9903         * ipa-icf.c (sem_function::equals_wpa): Use
9904         cl_optimization_option_eq instead of memcmp.
9905         * lto-streamer.h (cl_optimization_stream_out): Support streaming
9906         of string types.
9907         (cl_optimization_stream_in): Likewise.
9908         * optc-save-gen.awk: Support strings in cl_optimization.
9909         * opth-gen.awk: Likewise.
9910         * opts.c (finish_options): Remove error checking of invalid
9911         value ranges.
9912         (MAX_CODE_ALIGN): Remove.
9913         (MAX_CODE_ALIGN_VALUE): Likewise.
9914         (parse_and_check_align_values): New function.
9915         (check_alignment_argument): Likewise.
9916         (common_handle_option): Use check_alignment_argument.
9917         * opts.h (parse_and_check_align_values): Declare.
9918         * toplev.c (init_alignments): Remove.
9919         (read_log_maxskip): New.
9920         (parse_N_M): Likewise.
9921         (parse_alignment_opts): Likewise.
9922         (backend_init_target): Remove usage of init_alignments.
9923         * toplev.h (parse_alignment_opts): Declare.
9924         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9925         argument.
9926         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9927         * tree.c (cl_option_hasher::equal): New.
9928         * varasm.c: Use new global macros.
9930 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9932         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9933         Use a simpler align directive also if MAXSKIP = ALIGN-1.
9934         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9935         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9936         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9937         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9938         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9939         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9940         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9941         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9942         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9943         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9944         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9946 2018-07-04  Martin Liska  <mliska@suse.cz>
9947             Jonathan Wakely  <jwakely@redhat.com>
9949         * coverage.c: Use correct type.
9950         * doc/invoke.texi: Language correction.
9952 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
9954         PR target/85620
9955         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9956         ENDBRANCH for non-tail call which may return via indirect branch.
9957         * doc/extend.texi: Document indirect_return attribute.
9959 2018-07-03  Martin Sebor  <msebor@redhat.com>
9961         PR tree-optimization/86274
9962         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9963         precondition.
9964         (format_floating): Correct handling of infinities and NaNs.
9966 2018-07-03  Martin Sebor  <msebor@redhat.com>
9968         * print-tree.c (print_real_cst): New function.
9969         (print_node_brief): Call it.
9970         (print_node): Ditto.
9972 2018-07-03  Jeff Law  <law@redhat.com>
9974         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9975         into a single pattern.
9977         * config/h8300/h8300.md (ors code_iterator): New.
9978         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9979         a single pattern and single splitter.
9980         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9981         (iorqi3_1, xorqi3_1): Likewise.
9982         (iorqi3, xorqi3 expanders): Similarly.
9984         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9985         (movmd_internal) into a single pattern using the P mode iterator.
9986         (movmd splitters): Similarly.
9987         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9988         (movsd splitters): Similarly.
9990         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9991         ADDB, ADDW and ADDL into a single ADD attribute which selects the
9992         right table based on the size of the operand.
9993         * config/h8300/h8300.md (length_table): Corresponding changes. All
9994         references to "addb", "addw" and "addl" changed to "add".
9995         (btst patterns): Merge two variants into a single pattern.
9996         (tstqi, tsthi): Likewise.
9997         (addhi3_incdec, addsi3_incdec): Likewise.
9998         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9999         (mulhi3, mulsi3): Likewise.
10000         (udivhi3, udivsi3): Likewise.
10001         (divhi3, divsi3): Likewise.
10002         (andorqi3, andorhi3, andorsi3): Likewise.
10004 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
10006         PR target/85694
10007         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10008         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10010 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10012         PR tree-optimization/85694
10013         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10014         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10015         UNSPEC_URHADD.
10016         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10017         (<u>avg<mode>3_ceil): New patterns.
10019 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
10021         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10022         scan-tree-dump directive.
10023         * gcc.dg/vect/slp-perm-2.c: Likewise.
10024         * gcc.dg/vect/slp-perm-3.c: Likewise.
10025         * gcc.dg/vect/slp-perm-5.c: Likewise.
10026         * gcc.dg/vect/slp-perm-6.c: Likewise.
10027         * gcc.dg/vect/slp-perm-7.c: Likewise.
10028         * gcc.dg/vect/slp-perm-8.c: Likewise.
10030 2018-07-03  Marek Polacek  <polacek@redhat.com>
10032         PR middle-end/86202
10033         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10035 2018-07-03  Richard Biener  <rguenther@suse.de>
10037         PR ipa/86389
10038         * tree-ssa-structalias.c (find_func_clobbers): Properly
10039         handle indirect calls.
10041 2018-07-03  Jeff Law  <law@redhat.com>
10043         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10044         (shifts): New code iterator.
10045         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10046         expander.  Fix HImode handling on H8/SX.
10047         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10048         (subqi3, subhi3, subsi3 expanders): Likewise.
10049         (andqi3, andhi3, andsi3 expanders): Likewise.
10050         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10051         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10052         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10053         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10054         (zero_extendqihi2, zero_extendqisi2): Likewise.
10055         (extendqihi2, extendqisi2): Likewise.
10056         (rotlqi3, rotlhi3, rotlsi3): Likewise.
10057         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10058         (rotlqi3_1, rotlhi3_1): Likewise.
10059         (logicalhi3_sn, logicalsi3_sn): Likewise.
10060         (logicalhi3, logicalsi3): Likewise.
10062 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10064         * tree-vect-patterns.c (vect_recog_rotate_pattern)
10065         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10066         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10067         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10068         type to append_pattern_def_seq instead of creating a stmt_vec_info
10069         directly.
10070         (build_mask_conversion): Likewise.  Remove vinfo argument.
10071         (vect_add_conversion_to_patterm): Likewise, renaming to...
10072         (vect_add_conversion_to_pattern): ...this.
10073         (vect_recog_mask_conversion_pattern): Update call to
10074         build_mask_conversion.  Pass the vector type to
10075         append_pattern_def_seq here too.
10076         (vect_recog_gather_scatter_pattern): Update call to
10077         vect_add_conversion_to_pattern.
10079 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10081         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10082         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10083         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10084         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10085         STMT_VINFO_PATTERN_DEF_SEQ to null here.
10086         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10087         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10088         append_pattern_def_seq instead of new_pattern_def_seq.
10089         (vect_recog_divmod_pattern): Do both of the above.
10090         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10091         is null.
10093 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10095         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10096         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10097         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10098         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10099         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10100         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10101         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10102         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10103         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10104         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10105         parameter with a single stmt_vec_info.
10106         (vect_recog_func_ptr): Likewise.
10107         (vect_recog_gather_scatter_pattern): Likewise, folding in...
10108         (vect_try_gather_scatter_pattern): ...this.
10109         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10110         the stmt_vec_info of the statement to be matched.  Don't clear
10111         STMT_VINFO_RELATED_STMT.
10112         (vect_pattern_recog): Update call accordingly.
10114 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10116         PR tree-optimization/85694
10117         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10118         (uavgM3_ceil): Document new optabs.
10119         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10120         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10121         functions.
10122         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10123         (savg_ceil_optab): New optabs.
10124         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10125         (vect_vect_recog_func_ptrs): Add it.
10126         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10127         constant directly from the associated lhs.
10129 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10131         * tree-vect-patterns.c (vect_split_statement): New function.
10132         (vect_convert_input): Use it to try to split an existing cast.
10134 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10136         * poly-int.h (print_hex): New function.
10137         * dumpfile.h (dump_dec, dump_hex): Declare.
10138         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10139         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10140         min_input_precision, operation_precision and operation_sign.
10141         * tree-vect-patterns.c (vect_get_range_info): New function.
10142         (vect_same_loop_or_bb_p, vect_single_imm_use)
10143         (vect_operation_fits_smaller_type): Delete.
10144         (vect_look_through_possible_promotion): Add an optional
10145         single_use_p parameter.
10146         (vect_recog_over_widening_pattern): Rewrite to use new
10147         stmt_vec_info infomration.  Handle one operation at a time.
10148         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10149         (vect_truncatable_operation_p, vect_set_operation_type)
10150         (vect_set_min_input_precision): New functions.
10151         (vect_determine_min_output_precision_1): Likewise.
10152         (vect_determine_min_output_precision): Likewise.
10153         (vect_determine_precisions_from_range): Likewise.
10154         (vect_determine_precisions_from_users): Likewise.
10155         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10156         (vect_vect_recog_func_ptrs): Put over_widening first.
10157         Add cast_forwprop.
10158         (vect_pattern_recog): Call vect_determine_precisions.
10160 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10162         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10163         statements that have been replaced by further pattern statements.
10164         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10166 2018-07-03  Richard Biener  <rguenther@suse.de>
10168         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10169         always set *dt.  Dump vectype in vectype overload.
10170         * dumpfile.h (dump_gimple_expr): New function.
10171         (dump_gimple_expr_loc): Likewise.
10172         * dumpfile.c (dump_gimple_expr): New function.
10173         (dump_gimple_expr_loc): Likewise.
10175 2018-07-02  Jeff Law  <law@redhat.com>
10177         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10178         the H8/300, H8/300H and H8/S variants into a single pattern.
10179         (movhi_h8300, movqi_h8300hs): Similarly.
10180         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10181         (QHI mode iterator): New.
10183         * config/h8300/h8300.md: Remove trailing whitespace.
10185 2018-07-02  Jim Wilson  <jimw@sifive.com>
10187         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10188         instead of emit_insn for interrupt returns.
10189         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10190         (riscv_sret, riscv_uret): Likewise.
10192 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10194         * pretty-print.c (selftest::test_pp_format): Move save and restore
10195         of quotes to class auto_fix_quotes, and add an instance.
10196         * selftest.c: Include "intl.h".
10197         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10198         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10199         * selftest.h (selftest::auto_fix_quotes): New class.
10201 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
10203         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10204         (aarch64_sve_prepare_conditional_op): Remove.
10205         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10206         Allow aarch64_simd_reg_or_zero as select operand; remove
10207         the aarch64_sve_prepare_conditional_op call.
10208         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10209         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10210         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10211         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10212         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10213         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10214         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10215         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10216         and a splitters to match all of the *_any patterns.
10217         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10219         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10220         (SVE_COND_FP_BINARY_REV): Remove.
10221         (sve_int_op_rev, sve_fp_op_rev): New.
10222         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10223         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10224         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10225         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
10226         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
10227         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
10228         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
10229         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
10230         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
10232         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
10233         Remove match_dup 1 from the inner unspec.
10234         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10236         * config/aarch64/aarch64.md (movprfx): New attr.
10237         (length): Default movprfx to 8.
10238         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
10239         (*madd<SVE_I>, *msub<SVE_I): Likewise.
10240         (*<su>mul<SVE_I>3_highpart): Likewise.
10241         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
10242         (*v<ASHIFT><SVE_I>3): Likewise.
10243         (*<su><MAXMIN><SVE_I>3): Likewise.
10244         (*<su><MAXMIN><SVE_F>3): Likewise.
10245         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
10246         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
10247         (*div<SVE_F>4): Likewise.
10249 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
10251         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
10252         in dump string.
10254 2018-07-02  Richard Biener  <rguenther@suse.de>
10256         PR tree-optimization/86363
10257         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
10258         memset argument refers to a non-variable address.
10260 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10262         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
10263         {PLUS,MINUS}_EXPR code to...
10264         (adjust_symbolic_bound): ...here,
10265         (combine_bound): ...here,
10266         (set_value_range_with_overflow): ...and here.
10268 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10270         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
10271         code...
10272         (extract_range_from_abs_expr): ...here.
10274 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10276         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
10277         -fno-omit-frame-pointer when not optimizing.
10279 2018-07-02  Martin Liska  <mliska@suse.cz>
10281         PR ipa/86279
10282         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
10283         (propagate_nothrow): Likewise.
10285 2018-07-02  Martin Liska  <mliska@suse.cz>
10287         PR ipa/86323
10288         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
10290 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10292         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
10293         function in r262149, changing "loc" param from source_location to
10294         const dump_location_t &.
10295         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
10296         declaration, as above.
10298 2018-07-01  Paul Koning  <ni1d@arrl.net>
10300         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10301         -munit-asm, -mgnu-asm, -mdec-asm.
10302         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
10303         (pdp11_output_labelref): New.
10304         (pdp11_output_def): New.
10305         (pdp11_output_addr_vec_elt): New.
10306         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
10307         %# and %@ format codes.
10308         (pdp11_option_override): New.
10309         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
10310         (pdp11_output_ident): New.
10311         (pdp11_asm_named_section): New.
10312         (pdp11_asm_init_sections): New.
10313         (pdp11_file_start): New.
10314         (pdp11_file_end): New.
10315         (output_ascii): Use .ascii/.asciz for -mdec-asm.
10316         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
10317         %o, like %c but octal.
10318         (pdp11_option_override): New.
10319         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
10320         -mdec-asm.
10321         (DATA_SECTION_ASM_OP): Ditto.
10322         (READONLY_DATA_SECTION_ASM_OP): New.
10323         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
10324         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
10325         (ASM_OUTPUT_LABELREF): Ditto.
10326         (ASM_OUTPUT_DEF): Ditto.
10327         (ASM_OUTPUT_EXTERNAL): New.
10328         (ASM_OUTPUT_SOURCE_FILENAME): New.
10329         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
10330         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
10331         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
10332         %# and %@ format codes.
10333         * config/pdp11/pdp11.opt (mgnu-asm): New.
10334         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
10335         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
10336         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
10338 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
10340         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
10341         dereferencing path[] beyond its length.
10342         (debug_path): New.
10343         (debug_all_paths): New.
10344         (rewire_first_differing_edge): New.
10345         (adjust_paths_after_duplication): New.
10346         (duplicate_thread_path): Call adjust_paths_after_duplication.
10347         Add new argument.
10348         (thread_through_all_blocks): Add new argument to
10349         duplicate_thread_path.
10351 2018-06-30  Jim Wilson  <jimw@sifive.com>
10353         * config/riscv/predicates.md (p2m1_shift_operand): New.
10354         (high_mask_shift_operand): New.
10355         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
10356         pattern using p2m1_shift_operand.
10357         (lshsi3_zero_extend_3+2): New combiner pattern using
10358         high_mask_shift_operand.
10360 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10362         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
10363         split out from...
10364         (vect_recog_rotate_pattern): ...here.
10365         (vect_convert_input): Try to insert casts of invariants in the
10366         preheader.
10367         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
10368         preheader to be empty.
10370 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10372         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
10373         vector type.  If given, install it in the new statement's
10374         STMT_VINFO_VECTYPE.
10375         (vect_element_precision): New function.
10376         (vect_unpromoted_value): New struct.
10377         (vect_unpromoted_value::vect_unpromoted_value): New function.
10378         (vect_unpromoted_value::set_op): Likewise.
10379         (vect_look_through_possible_promotion): Likewise.
10380         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
10381         (vect_widened_op_tree, vect_convert_input): Likewise.
10382         (vect_convert_inputs, vect_convert_output): Likewise.
10383         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
10384         to handle the optional cast of the multiplication result and
10385         vect_widened_op_tree to detect the widened multiplication itself.
10386         Do not require the input and output of promotion casts to have
10387         the same sign, but base the signedness of the operation on the
10388         input rather than the result.  If the pattern includes two
10389         promotions, check that those promotions have the same sign.
10390         Do not restrict the MULT_EXPR handling to a double-width result;
10391         handle quadruple-width results and wider.  Use vect_convert_inputs
10392         to convert the inputs to the common type.
10393         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
10394         to handle the optional cast of the ABS result.  Also allow a sign
10395         change or a sign extension between the ABS and MINUS.
10396         Use vect_widened_op_tree to detect the widened subtraction and use
10397         vect_convert_inputs to convert the inputs to the common type.
10398         (vect_handle_widen_op_by_const): Delete.
10399         (vect_recog_widen_op_pattern): New function.
10400         (vect_recog_widen_mult_pattern): Use it.
10401         (vect_recog_widen_shift_pattern): Likewise.
10402         (vect_recog_widen_sum_pattern): Use
10403         vect_look_through_possible_promotion to handle the promoted
10404         PLUS_EXPR operand.
10406 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10408         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
10409         the containing gimple_seq *.
10410         * gimple-iterator.h (gsi_for_stmt): Declare it.
10411         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
10412         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
10413         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10414         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10415         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
10416         checks.
10417         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
10418         split out from...
10419         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
10420         statement being replaced is part of an existing pattern
10421         definition sequence, inserting the new pattern statements before
10422         the original one.
10423         (vect_pattern_recog_1): Don't return a bool.  If the statement
10424         is already part of a pattern, instead apply pattern matching
10425         to the pattern definition statements.  Don't clear the
10426         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
10427         (vect_pattern_recog): Don't break after the first match;
10428         continue processing the pattern definition statements instead.
10429         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
10431 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10433         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10434         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10435         (vect_recog_widen_sum_pattern): Use it.
10437 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10439         * tree-vect-loop.c (vectorizable_reduction): Assert that the
10440         phi is not a pattern statement and has not been replaced by
10441         a pattern statement.
10442         * tree-vect-patterns.c (type_conversion_p): Don't check
10443         STMT_VINFO_IN_PATTERN_P.
10444         (vect_recog_vector_vector_shift_pattern): Likewise.
10445         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
10446         the pattern statement rather than the original statement; check
10447         directly for a WIDEN_MULT_EXPR here.
10448         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
10449         vect_is_simple_use to return the pattern statement rather
10450         than the original statement; use is_pattern_stmt_p to check
10451         for such a pattern statement.
10452         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
10453         to return the pattern statement rather than the original statement;
10454         don't do the same transformation here.
10455         (vect_is_simple_use): If the defining statement has been replaced
10456         by a pattern statement, return the pattern statement instead.
10457         Remove the corresponding (local) transformation from the vectype
10458         overload.
10460 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10462         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
10463         end and default to null.
10464         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10465         (vectorizable_reduction): Update calls accordingly, dropping the
10466         gimple ** argument if the passed-back statement isn't needed.
10467         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
10468         (vect_recog_rotate_pattern): Likewise.
10469         (vect_recog_mask_conversion_pattern): Likewise.
10470         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10471         (vect_mask_constant_operand_p): Likewise.
10472         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
10473         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
10474         (get_group_load_store_type, get_load_store_type): Likewise.
10475         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
10476         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
10477         (vectorizable_conversion, vectorizable_assignment): Likewise.
10478         (vectorizable_shift, vectorizable_operation): Likewise.
10479         (vectorizable_store, vect_is_simple_cond): Likewise.
10480         (vectorizable_condition, vectorizable_comparison): Likewise.
10481         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
10482         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
10483         and move it to the end.  Cope with null def_stmt_outs.
10485 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10487         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
10489 2018-06-29  Jeff Law  <law@redhat.com>
10491         * config/v850/v850.c (v850_legitimate_address_p): Handle large
10492         displacements for TARGET_V850E2V3 and newer.
10493         (TARGET_LRA_P): Remove.  Defaults to LRA now.
10494         * config/v850/v850.md (sign23byte_load): Remove.
10495         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
10496         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
10498 2018-06-29  Martin Liska  <mliska@suse.cz>
10500         PR lto/85759
10501         * coverage.c (coverage_init): Mangle full path name.
10502         * doc/invoke.texi: Document the change.
10503         * gcov-io.c (mangle_path): New.
10504         * gcov-io.h (mangle_path): Likewise.
10505         * gcov.c (mangle_name): Use mangle_path for path mangling.
10507 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10509         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
10510         if starting source register is not even.
10512 2018-06-29  Martin Liska  <mliska@suse.cz>
10514         PR tree-optimization/86263
10515         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
10516         Make edge redirection.
10518 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
10520         * dumpfile.c (dump_loc): Add indentation based on scope depth.
10521         (dump_scope_depth): New variable.
10522         (get_dump_scope_depth): New function.
10523         (dump_begin_scope): New function.
10524         (dump_end_scope): New function.
10525         * dumpfile.h (get_dump_scope_depth): New declaration.
10526         (dump_begin_scope): New declaration.
10527         (dump_end_scope): New declaration.
10528         (class auto_dump_scope): New class.
10529         (AUTO_DUMP_SCOPE): New macro.
10530         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
10531         AUTO_DUMP_SCOPE.
10533 2018-06-29  Richard Biener  <rguenther@suse.de>
10535         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
10536         compute_all_dependences succeeds.
10537         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
10538         exceed --param loop-max-datarefs-for-datadeps.
10540 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
10542         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
10544 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
10546         PR target/86348
10547         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
10548         alternative 0 in preferred_for_speed attribute.
10550 2018-06-28  Paul Koning  <ni1d@arrl.net>
10552         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
10553         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
10554         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
10555         * config/pdp11/pdp11.md: Correct "length" attribute calculation
10556         for shift insn patterns.
10558 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
10560         * cgraph.c (cgraph_node::get_body): Replace assignments to
10561         "dump_file" with calls to set_dump_file.
10562         * dumpfile.c (alt_dump_file): Make static, and group with...
10563         (alt_flags): ...this definition.
10564         (dumps_are_enabled): New variable.
10565         (refresh_dumps_are_enabled): New function.
10566         (set_dump_file): New function.
10567         (set_alt_dump_file): New function.
10568         (gcc::dump_manager::dump_start): Replace assignments to
10569         "dump_file" and "alt_dump_file" with calls to set_dump_file and
10570         set_alt_dump_file.
10571         (gcc::dump_manager::dump_finish): Likewise.
10572         * dumpfile.h (alt_dump_file): Delete decl.
10573         (dumps_are_enabled): New variable decl.
10574         (set_dump_file): New function decl.
10575         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
10576         global.
10577         * tree-nested.c (lower_nested_functions): Replace assignments to
10578         "dump_file" with calls to set_dump_file.
10580 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10582         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
10583         goto_locus of each outgoing edge of each basic block.
10585 2018-06-28  Richard Biener  <rguenther@suse.de>
10587         * dwarf2out.c (decl_scope_table): Remove.
10588         (push_decl_scope): Likewise.
10589         (pop_decl_scope): Likewise.
10590         (gen_type_die_for_member): Do not call push/pop_decl_scope.
10591         (gen_struct_or_union_type_die): Likewise.
10592         (gen_tagged_type_die): Likewise.
10593         (dwarf2out_init): Do not initialize decl_scope_table.
10594         (dwarf2out_c_finalize): Do not free it.
10596 2018-06-28  Richard Biener  <rguenther@suse.de>
10598         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
10599         deciding whether to not re-use a DIE.
10601 2018-06-28  Richard Biener  <rguenther@suse.de>
10603         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
10604         DW_AT_abstract_origin attribute.
10606 2018-06-28  Martin Liska  <mliska@suse.cz>
10608         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10609         Use newly introduced constants.
10610         * tree-switch-conversion.h (struct jump_table_cluster):
10611         Define max_ratio_for_size and max_ratio_for_speed.
10613 2018-06-28  Martin Liska  <mliska@suse.cz>
10615         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10616         Add new checking assert to catch invalid state.
10617         (jump_table_cluster::can_be_handled): Handle single case
10618         clusters.
10619         (jump_table_cluster::is_beneficial): Bail out for such case.
10620         (bit_test_cluster::find_bit_tests):
10621         Add new checking assert to catch invalid state.
10622         (bit_test_cluster::can_be_handled): Handle single case
10623         clusters.
10624         (bit_test_cluster::is_beneficial): Bail out for such case.
10625         (switch_decision_tree::analyze_switch_statement):
10626         Fix comment.
10628 2018-06-28  Martin Liska  <mliska@suse.cz>
10630         * common.opt: Introduce -completion option.
10631         * gcc.c (driver_handle_option): Handle it.
10632         (driver::main): Print completions if completion
10633         is set.
10634         * opt-suggestions.c (option_proposer::get_completions):
10635         New function.
10636         (option_proposer::suggest_completion): Likewise.
10637         (option_proposer::find_param_completions): Likewise.
10638         (verify_autocompletions): Likewise.
10639         (test_completion_valid_options): Likewise.
10640         (test_completion_valid_params): Likewise.
10641         (in_completion_p): Likewise.
10642         (empty_completion_p): Likewise.
10643         (test_completion_partial_match): Likewise.
10644         (test_completion_garbage): Likewise.
10645         (opt_proposer_c_tests): Likewise.
10646         * opt-suggestions.h: Declare new functions.
10647         * opts.c (common_handle_option): Handle OPT__completion_.
10648         * selftest-run-tests.c (selftest::run_tests): Add
10649         opt_proposer_c_tests.
10650         * selftest.c (assert_str_startswith): New.
10651         * selftest.h (assert_str_startswith): Likewise.
10652         (opt_proposer_c_tests): New.
10653         (ASSERT_STR_STARTSWITH): Likewise.
10655 2018-06-28  Martin Liska  <mliska@suse.cz>
10657         * Makefile.in: Add opt-suggestions.o.
10658         * gcc-main.c: Include opt-suggestions.h.
10659         * gcc.c (driver::driver): Likewise.
10660         (driver::~driver): Remove m_option_suggestions.
10661         (driver::build_option_suggestions): Moved to option_proposer.
10662         (driver::suggest_option): Likewise.
10663         (driver::handle_unrecognized_options): Use option_proposer.
10664         * gcc.h (class driver): Add new memver m_option_proposer.
10665         * opt-suggestions.c: New file.
10666         * opt-suggestions.h: New file.
10668 2018-06-28  Martin Liska  <mliska@suse.cz>
10670         * vec.h (class auto_string_vec): New (moved from auto_argvec).
10671         (auto_string_vec::~auto_string_vec): Likewise.
10673 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10675         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10676         prevent_decl_creation_for_types fields up and add reset_location field.
10677         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10678         statement if id->reset_location is true.
10679         (copy_edges_for_bb): Do not set goto_locus on the new edges if
10680         id->reset_location is true.
10681         (copy_phis_for_bb): Force input_location on the arguments if
10682         id->reset_location is true.
10683         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10684         is set on the function to be inlined.
10686 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
10688         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10690 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
10692         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10693         registers for Pmode.
10694         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10695         hard registers for the clobbered pseudo.
10697 2018-06-27  Paul Koning  <ni1d@arrl.net>
10699         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10700         mutually exclusive options.
10701         * config/pdp11/constraints.md (h): New constraint.
10702         (O): Update definition to match shift code generation.
10703         (D): New constraint.
10704         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10705         (CCFP): Remove.
10706         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10707         function.
10708         (output_jump): Change arguments.
10709         (pdp11_fixed_cc_regs): New function.
10710         (pdp11_cc_mode): Ditto.
10711         (pdp11_expand_shift): Ditto.
10712         (pdp11_assemble_shift): Ditto.
10713         (pdp11_small_shift): Ditto.
10714         (pdp11_branch_cost): Remove.
10715         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10716         from output.
10717         (pdp11_register_move_cost): Update for CC registers.
10718         (pdp11_rtx_costs): Add case for LSHIFTRT.
10719         (pdp11_output_jump): Add CCNZ mode conditional branches.
10720         (notice_update_cc_on_set): Remove.
10721         (pdp11_cc_mode): New function.
10722         (simple_memory_operand): Correct pre/post decrement case.
10723         (no_side_effect_operand): New function.
10724         (pdp11_regno_reg_class): Add CC_REGS class.
10725         (pdp11_fixed_cc_regs): New function.
10726         (pdp11_small_shift): New function.
10727         (pdp11_expand_shift): New function to expand shift insns.
10728         (pdp11_assemble_shift): New function to output shifts.
10729         (pdp11_branch_cost): Remove.
10730         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10731         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10732         (WCHAR_TYPE): Ditto.
10733         (PTRDIFF_TYPE): Ditto.
10734         (ADJUST_INSN_LENGTH): New macro.
10735         (FIXED_REGISTERS): Add CC registers.
10736         (CALL_USED_REGISTERS): Ditto.
10737         (reg_class): Ditto.
10738         (REG_CLASS_NAMES): Ditto.
10739         (REG_CLASS_CONTENTS): Ditto.
10740         (SELECT_CC_MODE): Use new function.
10741         (TARGET_FLAGS_REGNUM): New macro.
10742         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10743         (cc0_reg_rtx): Remove.
10744         (CC_STATUS_MDEP): Remove.
10745         (CC_STATUS_MDEFP_INIT): Remove.
10746         (CC_IN_FPU): Remove.
10747         (NOTICE_UPDATE_CC): Remove.
10748         (REGISTER_NAMES): Add CC registers.
10749         (BRANCH_COST): Change to constant 1.
10750         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10751         handling.
10752         * config/pdp11/pdp11.opt (mbcopy): Remove.
10753         (mbcopy-builtin): Remove.
10754         (mbranch-cheap): Remove.
10755         (mbranch-expensive): Remove.
10756         * config/pdp11/predicates.md (expand_shift_operand): Update to
10757         match shift code generation.
10758         (ccnz_operator): New predicate.
10759         * doc/invoke.texi (PDP-11 Options): Remove deleted options
10760         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10761         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
10762         exclusive options.
10763         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
10764         description of O constraint.
10766 2018-06-27  Jeff Law  <law@redhat.com>
10767             Austin Law  <austinklaw@gmail.com>
10769         * config/v850/v850.md (addsi3_set_flags): New pattern.
10770         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10771         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10772         (zero_extendhisi2_v850_set_flags): Likewise.
10773         (zero_extendqisi2_v850_set_flags): Likewise.
10774         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10775         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10776         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10778         * config/v850/v850-protos.h (notice_update_cc): Remove.
10779         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10780         (v850_print_operand): Handle 'D' and "d".
10781         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10782         Add handling of arithmetic/logical operations compared against zero.
10783         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10784         Do not look at v850_compare_op, instead get mode from last argument.
10785         (v850_gen_compare): Remove
10786         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10787         after reload for prologue insns.
10788         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10789         patterns.
10790         (construct_save_jarl): Likewise.
10791         (TARGET_FLAGS_REGNUM): Define.
10792         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10793         (NOTICE_UPDATE_CC): Remove.
10794         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10795         than cc0.  Conditionalize on reload_completed.
10796         (cmpsi_insn, setfcc_insn): Likewise.
10797         (tst1 splitter): Turn into define_and_split which sets the flags
10798         after reload.
10799         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10800         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10801         (cstoresf4, cstoredf4): Clobber the flags.
10802         (cmpsi, cmpsf, cmpdf): Remove expanders.
10803         (setf_insn): Remove pattern.
10804         (addsi3): Turn into define_and_split which clobbers the flags after
10805         reload and a suitable pattern (addsi3_clobber_flags) for use after
10806         reload.
10807         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10808         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10809         (ashrsi3, ashrsi3_v850e2): Likewise.
10810         (bins): Clobber the flags.
10811         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10812         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10813         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10814         (call_value_internal_short, call_value_internal_long): Likewise.
10815         (callt_save_interrupt, callt_return_interrupt): Likewise.
10816         (save_interrupt, return_interrupt): Likewise.
10817         (callt_save_all_interrupt, save_all_interrupt): Likewise.
10818         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10819         (restore_all_interrupt, _restore_all_interrupt): Likewise.
10820         (All FP comparisons): Only allow after reload has completed.
10821         (trfsr): Likewise.
10822         (divh, divhu): Tweak output template.
10823         (branch_z_normal, branch_z_invert): Remove
10824         (branch_nz_normal, branch_nz_invert): Likewise.
10825         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10827         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10828         * config/v850/v850.c (notice_update_cc): Remove.
10829         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
10830         (CC_NO_CARRY): Likewise.
10831         (NOTICE_UPDATE_CC): Define to nothing.
10832         * config/v850/v850.md: Remove block comment on cc0 handling
10833         Remove "cc" attribute from all patterns.  Remove cc_status handling
10834         from all patterns.  Minor formatting fixes.
10836 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10838         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10839         (cortex-a76.cortex-a55): Likewise.
10840         * config/aarch64/aarch64-tune.md: Regenerate.
10841         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10842         cortex-a76.cortex-a55.
10844 2018-06-27  Jeff Law  <law@redhat.com>
10846         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10847         (MULTILIB_DIRNAMES): Similarly.
10849 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
10851         * gimple.h (gimple_return_retbnd): Delete.
10852         (gimple_return_set_retbnd): Likewise.
10853         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10854         gimple_return_set_retbnd.
10855         * gimple-pretty-print.c (dump_gimple_return): Remove call to
10856         gimple_return_retbnd and adjust.
10857         * tree-inline.h (struct copy_body_data): Remove retbnd field.
10858         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10859         Explicitly return NULL in a couple more cases.  Move assertion
10860         on debug statements and remove unreachable code.
10861         (reset_debug_binding): Do not test id->retbnd.
10862         (expand_call_inline): Do not set it.
10864 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10866         * configure.ac: Add --disable-gcov option.
10867         * configure: Regenerate.
10868         * Makefile.in: Honour @enable_gcov@.
10869         * doc/install.texi: Document --disable-gcov.
10871 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10873         * config/arm/arm-cpus.in (cortex-a76): New entry.
10874         (cortex-a76.cortex-a55): Likewise.
10875         * config/arm/arm-tables.opt: Regenerate.
10876         * config/arm/arm-tune.md: Likewise.
10877         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10878         * doc/invoke.texi (ARM Options): Document cortex-a76 and
10879         cortex-a76.cortex-a55.
10881 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
10883         PR target/85769
10884         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10886 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
10888         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10889         comment.
10890         (EPILOGUE_USES): Likewise.
10892 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
10894         * tree-inline.c (remap_location): New function extracted from...
10895         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
10896         (copy_phis_for_bb): ...here.  Call remap_location.
10897         (copy_cfg_body): Adjust call to copy_edges_for_bb.
10899 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
10901         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10902         unaligned vsx for 16B memset.
10904 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
10906         PR target/86285
10907         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10908         ieee128_float_type_node to long_double_type_node unless
10909         TARGET_LONG_DOUBLE_128 is set.
10911 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
10913         * cfgloop.c (get_loop_location): Convert return type from
10914         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10915         by implicit construction from rtx_insn *, and using
10916         dump_user_location_t::from_function_decl for the fallback case.
10917         * cfgloop.h (get_loop_location): Convert return type from
10918         location_t to dump_user_location_t.
10919         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10920         dump_printf_loc to pass in a dump_location_t rather than a
10921         location_t, via the gimple stmt.
10922         * coverage.c (get_coverage_counts): Update calls to
10923         dump_printf_loc to pass in dump_location_t rather than a
10924         location_t.
10925         * doc/optinfo.texi (Dump types): Convert example of
10926         dump_printf_loc from taking "locus" to taking "insn".  Update
10927         description of the "_loc" calls to cover dump_location_t.
10928         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10929         "selftest.h".
10930         (dump_user_location_t::dump_user_location_t): New constructors,
10931         from gimple *stmt and rtx_insn *.
10932         (dump_user_location_t::from_function_decl): New function.
10933         (dump_loc): Make static.
10934         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10935         const dump_location_t &.
10936         (dump_generic_expr_loc): Delete.
10937         (dump_printf_loc): Convert param "loc" from location_t to
10938         const dump_location_t &.
10939         (selftest::test_impl_location): New function.
10940         (selftest::dumpfile_c_tests): New function.
10941         * dumpfile.h: Include "profile-count.h".
10942         (class dump_user_location_t): New class.
10943         (struct dump_impl_location_t): New struct.
10944         (class dump_location_t): New class.
10945         (dump_printf_loc): Convert 2nd param from source_location to
10946         const dump_location_t &.
10947         (dump_generic_expr_loc): Delete.
10948         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10949         const dump_location_t &.
10950         * gimple-fold.c (fold_gimple_assign): Update call to
10951         dump_printf_loc to pass in a dump_location_t rather than a
10952         location_t, via the gimple stmt.
10953         (gimple_fold_call): Likewise.
10954         * gimple-loop-interchange.cc
10955         (loop_cand::analyze_iloop_reduction_var): Update for change to
10956         check_reduction_path.
10957         (tree_loop_interchange::interchange): Update for change to
10958         find_loop_location.
10959         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10960         change in return-type of find_loop_location.
10961         (graphite_regenerate_ast_isl): Likewise.
10962         * graphite-optimize-isl.c (optimize_isl): Likewise.
10963         * graphite.c (graphite_transform_loops): Likewise.
10964         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10965         pass in a dump_location_t rather than a location_t, via the
10966         gimple stmt.
10967         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10968         * ipa.c (walk_polymorphic_call_targets): Likewise.
10969         * loop-unroll.c (report_unroll): Convert "locus" param from
10970         location_t to dump_location_t.
10971         (decide_unrolling): Update for change to get_loop_location's
10972         return type.
10973         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10974         location_t to dump_user_location_t.
10975         (grid_find_single_omp_among_assignments_1): Updates calls to
10976         dump_printf_loc to pass in a dump_location_t rather than a
10977         location_t, via the gimple stmt.
10978         (grid_parallel_clauses_gridifiable): Convert "tloc" from
10979         location_t to dump_location_t.  Updates calls to dump_printf_loc
10980         to pass in a dump_location_t rather than a location_t, via the
10981         gimple stmt.
10982         (grid_inner_loop_gridifiable_p): Likewise.
10983         (grid_dist_follows_simple_pattern): Likewise.
10984         (grid_gfor_follows_tiling_pattern): Likewise.
10985         (grid_target_follows_gridifiable_pattern): Likewise.
10986         (grid_attempt_target_gridification): Convert initialization
10987         of local "grid" from memset to zero-initialization; FIXME: does
10988         this require C++11?  Update call to dump_printf_loc to pass in a
10989         optinfo_location rather than a location_t, via the gimple stmt.
10990         * profile.c (read_profile_edge_counts): Updates call to
10991         dump_printf_loc to pass in a dump_location_t rather than a
10992         location_t
10993         (compute_branch_probabilities): Likewise.
10994         * selftest-run-tests.c (selftest::run_tests): Call
10995         dumpfile_c_tests.
10996         * selftest.h (dumpfile_c_tests): New decl.
10997         * tree-loop-distribution.c (pass_loop_distribution::execute):
10998         Update for change in return type of find_loop_location.
10999         * tree-parloops.c (parallelize_loops): Likewise.
11000         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11001         "locus" from location_t to dump_user_location_t.
11002         (canonicalize_loop_induction_variables): Likewise.
11003         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11004         for change in return type of find_loop_location.
11005         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11006         to dump_printf_loc to pass in a dump_location_t rather than a
11007         location_t, via the stmt.
11008         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11009         Likewise.
11010         * tree-vect-loop-manip.c (find_loop_location): Convert return
11011         type from source_location to dump_user_location_t.
11012         (vect_do_peeling): Update for above change.
11013         (vect_loop_versioning): Update for change in type of
11014         vect_location.
11015         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11016         from location_t to dump_user_location_t.
11017         (vect_estimate_min_profitable_iters): Update for change in type
11018         of vect_location.
11019         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11020         location_t to dump_location_t.
11021         (vect_slp_bb): Update for change in type of vect_location.
11022         * tree-vectorizer.c (vect_location): Convert from source_location
11023         to dump_user_location_t.
11024         (try_vectorize_loop_1): Update for change in vect_location's type.
11025         (vectorize_loops): Likewise.
11026         (increase_alignment): Likewise.
11027         * tree-vectorizer.h (vect_location): Convert from source_location
11028         to dump_user_location_t.
11029         (find_loop_location): Convert return type from source_location to
11030         dump_user_location_t.
11031         (check_reduction_path): Convert 1st param from location_t to
11032         dump_user_location_t.
11033         * value-prof.c (check_counter): Update call to dump_printf_loc to
11034         pass in a dump_user_location_t rather than a location_t; update
11035         call to error_at for change in type of "locus".
11036         (check_ic_target): Update call to dump_printf_loc to
11037         pass in a dump_user_location_t rather than a location_t, via the
11038         call_stmt.
11040 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
11042         * config/s390/s390.h (enum processor_flags): Do not use
11043         default tune parameter when -march was specified.
11045 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
11047         PR target/86314
11048         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11049         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11050         operands.
11052 2018-06-26  Richard Biener  <rguenther@suse.de>
11054         PR tree-optimization/86287
11055         PR bootstrap/86316
11056         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11057         (vect_analyze_loop): Initialize n_stmts.
11059 2018-06-26  Richard Biener  <rguenther@suse.de>
11061         PR middle-end/86271
11062         * fold-const.c (fold_convertible_p): Pointer extension
11063         isn't valid.
11065 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
11067         PR debug/86064
11068         * dwarf2out.c (loc_list_has_views): Adjust comments.
11069         (dw_loc_list): Split single cross-partition range with
11070         nonzero locview.
11072 2018-06-25  Jeff Law  <law@redhat.com>
11074         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11075         on -mbig-switch by default.
11077         * config/v850/predicates.md (const_float_1_operand): Fix match_code
11078         test.
11079         (const_float_0_operand): Remove unused predicate.
11080         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11081         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11082         (recipsf2): New expander.  Original pattern now called
11083         (recipsf2_insn).
11084         (recipdf2, recipdf2_insn): Similarly.
11085         (rsqrtsf2, rsqrtsf2_insn): Similarly
11086         (rsqrtdf2, rsqrtdf2_insn): Similarly
11088 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
11090         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11091         Simplify logic for FreeBSD (twice).
11093 2018-06-25  Martin Sebor  <msebor@redhat.com>
11095         PR tree-optimization/86204
11096         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11097         a strnlen result if it's less than the length of the string.
11099 2018-06-25  Martin Sebor  <msebor@redhat.com>
11101         PR tree-optimization/85700
11102         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11103         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11104         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11106 2018-06-25  Martin Sebor  <msebor@redhat.com>
11108         * doc/extend.texi (Zero-length arrays): Update and clarify.
11110 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
11112         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11113         added IEEE/IBM long double multilib support on PowerPC little
11114         endian Linux systems.
11115         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11116         (MULTILIB_DEFAULTS): Likewise.
11117         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11118         Likewise.
11119         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11120         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11121         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11123 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
11125         PR middle-end/86311
11126         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11127         (REORDER_45): Likewise.
11129 2018-06-25  Jeff Law  <law@redhat.com>
11131         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11132         dividend to 32 bits.  Adjust length.
11133         (udivmodhi4): Cleanup output template.  Fix length.
11135 2018-06-25  Carl Love  <cel@us.ibm.com>
11137         * config/rs6000/vsx.md: Change word selector to prefered location.
11139 2018-06-25  Richard Biener  <rguenther@suse.de>
11141         PR tree-optimization/86304
11142         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11143         epilogue-if-converted loops as well.
11145 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
11147         * lto-section-out.c (lto_begin_section): Do not print section
11148         name for noaddr and unnumbered dumps.
11150 2018-06-25  Richard Biener  <rguenther@suse.de>
11152         * tree-vectorizer.h (struct vec_info_shared): New structure
11153         with parts split out from struct vec_info and loop_nest from
11154         struct _loop_vec_info.
11155         (struct vec_info): Adjust accordingly.
11156         (struct _loop_vec_info): Likewise.
11157         (LOOP_VINFO_LOOP_NEST): Adjust.
11158         (LOOP_VINFO_DATAREFS): Likewise.
11159         (LOOP_VINFO_DDRS): Likewise.
11160         (struct _bb_vec_info): Likewise.
11161         (BB_VINFO_DATAREFS): Likewise.
11162         (BB_VINFO_DDRS): Likewise.
11163         (struct _stmt_vec_info): Add dr_aux member.
11164         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11165         (DR_MISALIGNMENT_UNINITIALIZED): New.
11166         (set_dr_misalignment): Adjust.
11167         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11168         (vect_analyze_loop): Adjust prototype.
11169         (vect_analyze_loop_form): Likewise.
11170         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11171         Compute dependences lazily.
11172         (vect_record_base_alignments): Use shared datarefs/ddrs.
11173         (vect_verify_datarefs_alignment): Likewise.
11174         (vect_analyze_data_refs_alignment): Likewise.
11175         (vect_analyze_data_ref_accesses): Likewise.
11176         (vect_analyze_data_refs): Likewise.
11177         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11178         constructor parameter for shared part.
11179         (vect_analyze_loop_form): Pass in shared part and adjust.
11180         (vect_analyze_loop_2): Pass in storage for the number of
11181         stmts.  Move loop nest finding to the caller.  Compute
11182         datarefs lazily.
11183         (vect_analyze_loop): Pass in shared part.
11184         (vect_transform_loop): Verify shared datarefs are unchanged.
11185         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11186         constructor parameter for shared part.
11187         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11188         (vect_slp_bb): Verify shared datarefs are unchanged before
11189         transform.
11190         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11191         change.
11192         (new_stmt_vec_info): Initialize DR_AUX misalignment to
11193         DR_MISALIGNMENT_UNINITIALIZED.
11194         * tree-vectorizer.c (vec_info::vec_info): Add constructor
11195         parameter for shared part.
11196         (vec_info::~vec_info): Adjust.
11197         (vec_info_shared::vec_info_shared): New.
11198         (vec_info_shared::~vec_info_shared): Likewise.
11199         (vec_info_shared::save_datarefs): Likewise.
11200         (vec_info_shared::check_datarefs): Likewise.
11201         (try_vectorize_loop_1): Construct shared part live for analyses
11202         of a single loop for multiple vector sizes.
11203         * tree-parloops.c (gather_scalar_reductions): Adjust.
11205 2018-06-25  Richard Biener  <rguenther@suse.de>
11207         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11208         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11209         (vect_analyze_data_refs): Remove similar code from here and
11210         simplify accordingly.
11212 2018-06-25  Richard Biener  <rguenther@suse.de>
11214         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11215         for reverse storage order accesses rather than asserting
11216         they cannot happen here.
11218 2018-06-25  Tom de Vries  <tdevries@suse.de>
11220         PR debug/86257
11221         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11222         Use data16 instead of .byte for insn prefix.
11224 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
11226         PR C++/86082
11227         * parser.c (make_char_string_pack): Pass this literal chars
11228         through cpp_interpret_string.
11229         (cp_parser_userdef_numeric_literal): Check the result of
11230         make_char_string_pack.
11232 2018-06-24  Maya Rashish  <coypu@sdf.org>
11234         * ginclude/stddef.h: Simplify conditions around avoiding
11235         re-definition of __size_t.
11237 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11239         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
11240         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
11242 2018-06-22  Maya Rashish  <coypu@sdf.org>
11244         * doc/invoke.texi (mno-fancy-math-387): Update for changes
11245         made to OpenBSD and NetBSD through the years.
11247 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11249         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11250         behavior of vec_pack (vector double, vector double) to match
11251         behavior of vec_float2 (vector double, vector double).
11253 2018-06-22  Olivier Hainque  <hainque@adacore.com>
11255         * gimplify.c (gimplify_function_tree): Prevent creation
11256         of a trampoline for the address of the current function
11257         passed to entry/exit instrumentation hooks.
11259 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
11261         PR target/86222
11262         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
11263         correctly.
11265 2018-06-22  Martin Liska  <mliska@suse.cz>
11267         PR tree-optimization/86263
11268         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11269         Bail out if is_enabled is false.
11270         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
11271         New declaration.
11272         (jump_table_cluster::is_enabled): New function.
11274 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11276         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11277         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
11278         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
11279         (lto_input_ts_binfo_tree_pointers): Likewise.
11280         * tree-streamer-out.c (streamer_write_tree_bitfields,
11281         write_ts_binfo_tree_pointers): Likewise.
11282         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
11284 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11286         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
11288 2018-06-22  Martin Liska  <mliska@suse.cz>
11290         * symbol-summary.h (get): Make it pure and inline move
11291         functionality from ::get function.
11292         (get): Remove and inline into ::get and ::get_create.
11293         (get_create): Move code from ::get function.
11295 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11297         PR target/85994
11298         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
11299         -x assembler-with-cpp.
11301 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11303         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
11304         _FILE_OFFSET_BITS=64 for C++.
11306 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
11308         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
11309         conversion insn that shows up when pr85657-3.c is compiled using
11310         IEEE 128-bit long double.
11311         (neg<mode>2_internal): Use the correct mode to check whether the
11312         mode is IBM extended.
11313         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
11314         multiply and divide external functions from being created more
11315         than once.
11317 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11319         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
11320         functions.
11321         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
11322         the edge can be forwarded.
11323         (cfg_layout_merge_blocks): Likewise.
11325 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11327         * except.c (finish_eh_generation): Commit edge insertions only after
11328         the EH edges have been redirected from post-landing to landing pads.
11330 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11332         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
11333         create_tmp_var_for to create the FRAME decl.
11334         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
11336 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11338         * tree-inline.c (copy_edges_for_bb): Minor tweak.
11339         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
11340         debug statement when resetting its value.
11341         (expand_call_inline): Copy the locus of the call onto the assignment
11342         of the return value, if any.  Use local variable in more cases.
11344 2018-06-21  Martin Liska  <mliska@suse.cz>
11346         * ipa-pure-const.c (propagate_nothrow): Use
11347         funct_state_summaries->get.
11348         (dump_malloc_lattice): Likewise.
11349         (propagate_malloc): Likewise.
11351 2018-06-21  Richard Biener  <rguenther@suse.de>
11353         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
11354         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
11355         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
11356         comment.
11357         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
11358         BLOCK_ABSTRACT_ORIGIN unconditionally.
11360 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
11362         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
11363         deleting it.
11364         * ipa-reference.c (ipa_reference_c_finalize): Delete
11365         ipa_ref_opt_sum_summaries and set it to NULL.
11367 2018-06-21  Tom de Vries  <tdevries@suse.de>
11369         PR tree-optimization/85859
11370         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
11371         test with comment from bb_no_side_effects_p.
11373 2018-06-21  Richard Biener  <rguenther@suse.de>
11375         PR tree-optimization/86232
11376         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
11377         max for constant niter.
11379 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11381         * config/aarch64/aarch64-simd.md
11382         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
11384 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11386         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
11387         Make opernads of the unspec commutative.
11389 2018-06-21  Richard Biener  <rguenther@suse.de>
11391         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
11392         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
11393         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
11394         (vect_analyze_data_ref_dependence): Re-order checks to deal with
11395         NULL DR_STEP.
11396         (vect_record_base_alignments): Do not record base alignment
11397         for gathers or scatters.
11398         (vect_compute_data_ref_alignment): Drop return value that is always
11399         true.  Bail out early for gathers or scatters.
11400         (vect_enhance_data_refs_alignment): Bail out early for gathers
11401         or scatters.
11402         (vect_find_same_alignment_drs): Likewise.
11403         (vect_analyze_data_refs_alignment): Remove dead code.
11404         (vect_slp_analyze_and_verify_node_alignment): Likewise.
11405         (vect_analyze_data_refs): For possible gathers or scatters do
11406         not create an alternate DR, just check their possible validity
11407         and mark them.  Adjust DECL_NONALIASED handling to not rely
11408         on DR_BASE_ADDRESS.
11409         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
11410         update inits of gathers or scatters.
11411         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
11412         Also copy gather/scatter flag to pattern vinfo.
11414 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11416         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11417         behavior of vec_packsu (vector unsigned long long, vector unsigned
11418         long long) to match behavior of vec_packs with same signature.
11420 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
11421             Thomas Schwinge <thomas@codesourcery.com>
11422             Cesar Philippidis  <cesar@codesourcery.com>
11424         * gimplify.c (gimplify_scan_omp_clauses): Add support for
11425         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11426         (gimplify_adjust_omp_clauses): Likewise.
11427         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
11428         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
11429         (gimplify_omp_target_update): Update handling of acc update and
11430         enter/exit data.
11431         * omp-low.c (install_var_field): Remove unused parameter
11432         base_pointers_restrict.
11433         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
11434         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
11435         FINALIZE}
11436         (omp_target_base_pointers_restrict_p): Delete.
11437         (scan_omp_target): Update call to scan_sharing_clauses.
11438         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
11439         FINALIZE}.
11440         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
11441         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11442         (convert_local_omp_clauses): Likewise.
11443         * tree-pretty-print.c (dump_omp_clause): Likewise.
11444         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
11445         FINALIZE}.
11446         (omp_clause_code_name): Likewise.
11448 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
11450         PR debug/86194
11451         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
11452         be narrowed.
11454         PR tree-optimization/86231
11455         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
11456         anti-range don't overwrite *vr0min before using it to compute *vr0max.
11458 2018-06-20  Tom de Vries  <tdevries@suse.de>
11460         PR tree-optimization/86097
11461         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
11462         iv type if signedness of iv type is not the same as that of *nit.
11464 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
11466         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
11467         EDGE_EH edges, verify they are all EDGE_EH.
11469 2018-06-20  Maya Rashish  <coypu@sdf.org>
11471         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
11473 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11475         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
11476         * config/aarch64/aarch64.c (xgene1_tunings): Add
11477         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
11478         (aarch64_mode_valid_for_sched_fusion_p):
11479         Allow 16-byte modes.
11480         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
11481         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
11482         128-bit modes.
11483         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
11484         New pattern.
11485         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
11486         * config/aarch64/iterators.md (VQ2): New mode iterator.
11488 2018-06-20  Martin Liska  <mliska@suse.cz>
11490         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11491         Change default ratio from 10 to 8.
11493 2018-06-20  Martin Liska  <mliska@suse.cz>
11495         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11496         New.
11497         (bit_test_cluster::find_bit_tests): Likewise.
11498         (switch_decision_tree::analyze_switch_statement): Find clusters.
11499         * tree-switch-conversion.h (struct jump_table_cluster): Document
11500         hierarchy.
11502 2018-06-20  Martin Liska  <mliska@suse.cz>
11504         * tree-switch-conversion.c (switch_conversion::collect):
11505         Record m_uniq property.
11506         (switch_conversion::expand): Bail out for special conditions.
11507         (group_cluster::~group_cluster): New.
11508         (group_cluster::group_cluster): Likewise.
11509         (group_cluster::dump): Likewise.
11510         (jump_table_cluster::emit): New.
11511         (switch_decision_tree::fix_phi_operands_for_edges): New.
11512         (struct case_node): Remove struct.
11513         (jump_table_cluster::can_be_handled): New.
11514         (case_values_threshold): Moved to header.
11515         (reset_out_edges_aux): Likewise.
11516         (jump_table_cluster::is_beneficial): New.
11517         (bit_test_cluster::can_be_handled): Likewise.
11518         (add_case_node): Remove.
11519         (bit_test_cluster::is_beneficial): New.
11520         (case_bit_test::cmp): New.
11521         (bit_test_cluster::emit): New.
11522         (expand_switch_as_decision_tree_p): Remove.
11523         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
11524         (fix_phi_operands_for_edge): Likewise.
11525         (switch_decision_tree::analyze_switch_statement): New.
11526         (compute_cases_per_edge): Move ...
11527         (switch_decision_tree::compute_cases_per_edge): ... here.
11528         (try_switch_expansion): Likewise.
11529         (switch_decision_tree::try_switch_expansion): Likewise.
11530         (record_phi_operand_mapping): Likewise.
11531         (switch_decision_tree::record_phi_operand_mapping): Likewise.
11532         (emit_case_decision_tree): Likewise.
11533         (switch_decision_tree::emit): Likewise.
11534         (balance_case_nodes): Likewise.
11535         (switch_decision_tree::balance_case_nodes): Likewise.
11536         (dump_case_nodes): Likewise.
11537         (switch_decision_tree::dump_case_nodes): Likewise.
11538         (emit_jump): Likewise.
11539         (switch_decision_tree::emit_jump): Likewise.
11540         (emit_cmp_and_jump_insns): Likewise.
11541         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
11542         (emit_case_nodes): Likewise.
11543         (switch_decision_tree::emit_case_nodes): Likewise.
11544         (conditional_probability): Remove.
11545         * tree-switch-conversion.h (enum cluster_type): New.
11546         (PRINT_CASE): New.
11547         (struct cluster): Likewise.
11548         (cluster::cluster): Likewise.
11549         (struct simple_cluster): Likewise.
11550         (simple_cluster::simple_cluster): Likewise.
11551         (struct group_cluster): Likewise.
11552         (struct jump_table_cluster): Likewise.
11553         (struct bit_test_cluster): Likewise.
11554         (struct min_cluster_item): Likewise.
11555         (struct case_tree_node): Likewise.
11556         (case_tree_node::case_tree_node): Likewise.
11557         (jump_table_cluster::case_values_threshold): Likewise.
11558         (struct case_bit_test): Likewise.
11559         (struct switch_decision_tree): Likewise.
11560         (struct switch_conversion): Likewise.
11561         (switch_decision_tree::reset_out_edges_aux): Likewise.
11563 2018-06-20  Martin Liska  <mliska@suse.cz>
11565         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
11566         (hoist_edge_and_branch_if_true): Likewise.
11567         (expand_switch_using_bit_tests_p): Likewise.
11568         (struct case_bit_test): Likewise.
11569         (case_bit_test_cmp): Likewise.
11570         (emit_case_bit_tests): Likewise.
11571         (switch_conversion::switch_conversion): New class.
11572         (struct switch_conv_info): Remove old struct.
11573         (collect_switch_conv_info): More to ...
11574         (switch_conversion::collect): ... this.
11575         (check_range): Likewise.
11576         (switch_conversion::check_range): Likewise.
11577         (check_all_empty_except_final): Likewise.
11578         (switch_conversion::check_all_empty_except_final): Likewise.
11579         (check_final_bb): Likewise.
11580         (switch_conversion::check_final_bb): Likewise.
11581         (create_temp_arrays): Likewise.
11582         (switch_conversion::create_temp_arrays): Likewise.
11583         (free_temp_arrays): Likewise.
11584         (gather_default_values): Likewise.
11585         (switch_conversion::gather_default_values): Likewise.
11586         (build_constructors): Likewise.
11587         (switch_conversion::build_constructors): Likewise.
11588         (constructor_contains_same_values_p): Likewise.
11589         (switch_conversion::contains_same_values_p): Likewise.
11590         (array_value_type): Likewise.
11591         (switch_conversion::array_value_type): Likewise.
11592         (build_one_array): Likewise.
11593         (switch_conversion::build_one_array): Likewise.
11594         (build_arrays): Likewise.
11595         (switch_conversion::build_arrays): Likewise.
11596         (gen_def_assigns): Likewise.
11597         (switch_conversion::gen_def_assigns): Likewise.
11598         (prune_bbs): Likewise.
11599         (switch_conversion::prune_bbs): Likewise.
11600         (fix_phi_nodes): Likewise.
11601         (switch_conversion::fix_phi_nodes): Likewise.
11602         (gen_inbound_check): Likewise.
11603         (switch_conversion::gen_inbound_check): Likewise.
11604         (process_switch): Use the newly created class.
11605         (switch_conversion::expand): New.
11606         (switch_conversion::~switch_conversion): New.
11607         * tree-switch-conversion.h: New file.
11609 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11611         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
11612         tree-vect-patterns.c.
11613         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
11614         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
11615         (vect_recog_sad_pattern): Likewise.
11616         (vect_recog_widen_sum_pattern): Likewise.
11617         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
11618         (vect_recog_widen_shift_pattern): Remove the type_in argument.
11619         (vect_recog_rotate_pattern): Likewise.
11620         (vect_recog_mult_pattern): Likewise.
11621         (vect_recog_vector_vector_shift_pattern): Likewise.
11622         (vect_recog_divmod_pattern): Likewise.
11623         (vect_recog_mixed_size_cond_pattern): Likewise.
11624         (vect_recog_bool_pattern): Likewise.
11625         (vect_recog_mask_conversion_pattern): Likewise.
11626         (vect_try_gather_scatter_pattern): Likewise.
11627         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
11628         (vect_recog_over_widening_pattern): Likewise.
11629         (vect_recog_gather_scatter_pattern): Likewise.
11630         (vect_recog_func_ptr): Move from tree-vectorizer.h
11631         (vect_vect_recog_func_ptrs): Move further down the file.
11632         (vect_recog_func): Likewise.  Remove the third argument.
11633         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
11634         (vect_pattern_recog_1): Expect the pattern function to do any
11635         necessary target tests.  Also expect it to provide a vector type.
11636         Remove the type_in handling.
11638 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11640         * tree-vect-patterns.c (vect_pattern_detected): New function.
11641         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
11642         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
11643         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
11644         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
11645         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11646         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11647         (vect_recog_mask_conversion_pattern)
11648         (vect_try_gather_scatter_pattern): Likewise.
11650 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11652         * tree-vect-patterns.c (vect_get_internal_def): New function.
11653         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11654         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
11655         (search_type_for_mask_1): Use it.
11657 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11659         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11660         redundant WIDEN_SUM_EXPR handling.
11661         (vect_recog_sad_pattern): Likewise.
11663 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11665         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11666         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11667         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
11668         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11669         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11671 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11673         * tree-vect-stmts.c (vectorizable_call): Make sure that we
11674         use the stmt_vec_info of the original bb statement for the
11675         new zero assignment, even if the call is part of a pattern.
11677 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11679         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11680         that the sequence is attached to the original statement rather
11681         than the pattern statement.
11682         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11683         PATTERN_DEF_SEQ from the original statement rather than
11684         the main pattern statement.
11685         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11686         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11687         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11689 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11691         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11692         definition statements before the early exit for statements that aren't
11693         live or relevant.
11694         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11695         split out from...
11696         (vect_transform_loop): ...here.  Process pattern definition
11697         statements without first checking whether the main pattern
11698         statement is live or relevant.
11700 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11702         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11703         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11705 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
11707         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11708         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11709         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11710         (expand_block_compare): Change select_block_compare_mode call.
11711         (expand_strncmp_align_check): Use new functions, fix comment.
11712         (emit_final_str_compare_gpr): New function.
11713         (expand_strn_compare): Refactor and clean up code.
11714         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11716 2018-06-19  Tony Reix  <tony.reix@atos.com>
11717             Damien Bergamini  <damien.bergamini@atos.com>
11718             David Edelsohn  <dje.gcc@gmail.com>
11720         * collect2.c (static_obj): New variable.
11721         (static_libs): New variable.
11722         (is_in_list): Uncomment declaration.
11723         (main): Track AIX libraries linked statically.
11724         (is_in_list): Uncomment definition.
11725         (scan_prog_file): Don't add AIX shared libraries initializer
11726         to constructor list if linking statically.
11728 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
11730         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11731         constant.
11732         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11734 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
11736         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11737         blocks.
11739 2018-06-19  Martin Liska  <mliska@suse.cz>
11741         * config/i386/i386.c (ix86_can_inline_p): Do not use
11742         ipa_fn_summaries::get_create.
11743         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11744         get.
11745         (devirtualization_time_bonus): Likewise.
11746         (ipcp_propagate_stage): Likewise.
11747         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11748         (edge_set_predicate): Likewise.
11749         (evaluate_conditions_for_known_args): Likewise.
11750         (evaluate_properties_for_edge): Likewise.
11751         (ipa_call_summary::reset): Tranform to ...
11752         (ipa_call_summary::~ipa_call_summary): ... this.
11753         (ipa_fn_summary::reset): Transform to ...
11754         (ipa_fn_summary::~ipa_fn_summary): ... this.
11755         (ipa_fn_summary_t::remove): Rename to ...
11756         (ipa_fn_summary_t::remove_callees): ... this.
11757         (ipa_fn_summary_t::duplicate): Use placement new
11758         instead of memory copy.
11759         (ipa_call_summary_t::duplicate): Likewise.
11760         (ipa_call_summary_t::remove): Remove.
11761         (dump_ipa_call_summary): Change get_create to get.
11762         (ipa_dump_fn_summary): Dump only when summary exists.
11763         (analyze_function_body): Use symbol_summary::get instead
11764         of get_create.
11765         (compute_fn_summary): Likewise.
11766         (estimate_edge_devirt_benefit): Likewise.
11767         (estimate_edge_size_and_time): Likewise.
11768         (inline_update_callee_summaries): Likewise.
11769         (remap_edge_change_prob): Likewise.
11770         (remap_edge_summaries): Likewise.
11771         (ipa_merge_fn_summary_after_inlining): Likewise.
11772         (write_ipa_call_summary): Likewise.
11773         (ipa_fn_summary_write): Likewise.
11774         (ipa_free_fn_summary): Likewise.
11775         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11776         (struct ipa_call_summary): Likewise.
11777         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11778         of get_create.
11779         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11780         (estimate_size_after_inlining): Likewise.
11781         (estimate_growth): Likewise.
11782         (growth_likely_positive): Likewise.
11783         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11784         (inline_call): Likewise.
11785         * ipa-inline.c (caller_growth_limits): Likewise.
11786         (can_inline_edge_p): Likewise.
11787         (can_inline_edge_by_limits_p): Likewise.
11788         (compute_uninlined_call_time): Likewise.
11789         (compute_inlined_call_time): Likewise.
11790         (want_inline_small_function_p): Likewise.
11791         (edge_badness): Likewise.
11792         (update_caller_keys): Likewise.
11793         (update_callee_keys): Likewise.
11794         (inline_small_functions): Likewise.
11795         (inline_to_all_callers_1): Likewise.
11796         (dump_overall_stats): Likewise.
11797         (early_inline_small_functions): Likewise.
11798         (early_inliner): Likewise.
11799         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11800         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11801         * ipa-pure-const.c (malloc_candidate_p): Likewise.
11802         * ipa-split.c (execute_split_functions): Likewise.
11803         * symbol-summary.h: Likewise.
11804         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11806 2018-06-19  Richard Biener  <rguenther@suse.de>
11808         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11809         (vectorize_loops): ... here.  Fix dbgcnt handling.
11810         (try_vectorize_loop): Wrap try_vectorize_loop_1.
11812 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
11814         PR target/86197
11815         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11816         ieee128 argument takes up only one (vector) register, not two (floating
11817         point) registers.
11819 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11821         * gimplify.c (gimplify_init_constructor): Really never clear for an
11822         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11824 2018-06-19  Richard Biener  <rguenther@suse.de>
11826         PR tree-optimization/86179
11827         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11828         after failed recognition.
11830 2018-06-18  Martin Sebor  <msebor@redhat.com>
11832         PR middle-end/85602
11833         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11834         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11835         Handle integer subtraction.
11836         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11837         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11839 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11841         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11842         param from rtx to rtx_insn *.
11843         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11844         param.
11845         (frv_ifcvt_modify_insn): Likwise.
11846         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11847         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
11848         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11849         as_a <rtx_insn *> cast to local "unprotected_region" once
11850         it's been established that it's not NULL or pc_rtx.
11851         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11852         param "sethi" from rtx to rtx_insn *.
11853         (nds32_group_float_insns): Likewise for param "insn".
11854         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11855         param.
11856         (vax_output_int_subtract): Likewise.
11857         * config/vax/vax.c (vax_output_int_add): Likewise for param
11858         "insn".
11859         (vax_output_int_subtract): Likewise.
11860         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11861         (emit_pattern_after): Likewise for param "after".
11862         (emit_insn_after): Likewise.
11863         (emit_jump_insn_after): Likewise.
11864         (emit_call_insn_after): Likewise.
11865         (emit_debug_insn_after): Likewise.
11866         (emit_pattern_before): Likewise for param "before".
11867         (emit_insn_before): Likewise.
11868         (emit_jump_insn_before): Likewise.
11869         * final.c (get_insn_template): Likewise for param "insn", removing
11870         a cast.
11871         * output.h (get_insn_template): Likewise for 2nd param.
11872         * rtl.h (emit_insn_before): Likewise.
11873         (emit_jump_insn_before): Likewise.
11874         (emit_debug_insn_before_noloc): Likewise.
11875         (emit_insn_after): Likewise.
11876         (emit_jump_insn_after): Likewise.
11877         (emit_call_insn_after): Likewise.
11878         (emit_debug_insn_after): Likewise.
11879         (set_insn_deleted): Likewise for param.
11881 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
11883         PR target/85358
11884         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11885         floating point modes, so that IFmode is numerically greater than
11886         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11887         to declare the ordering.  This prevents IFmode from being
11888         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11889         machine.  Include rs6000-modes.h to share the fractional values
11890         between genmodes* and the rest of the compiler.
11891         (IFmode): Likewise.
11892         (KFmode): Likewise.
11893         (TFmode): Likewise.
11894         * config/rs6000/rs6000-modes.h: New file.
11895         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11896         meaning of rs6000_long_double_size so that 126..128 selects an
11897         appropriate 128-bit floating point type.
11898         (rs6000_option_override_internal): Likewise.
11899         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11900         (TARGET_LONG_DOUBLE_128): Change the meaning of
11901         rs6000_long_double_size so that 126..128 selects an appropriate
11902         128-bit floating point type.
11903         (LONG_DOUBLE_TYPE_SIZE): Update comment.
11904         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11905         source and destination to match the standard usage.
11906         (truncifkf2): Likewise.
11907         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11908         ISA 2.07 to use an explicit clobber, instead of passing in a
11909         temporary.
11910         (copysign<mode>3_soft): Likewise.
11912 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
11914         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11915         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11916         (vect_slp_analyze_instance_dependence): Likewise.
11917         (vect_enhance_data_refs_alignment): Likewise.
11918         (vect_analyze_data_refs_alignment): Likewise.
11919         (vect_slp_analyze_and_verify_instance_alignment
11920         (vect_analyze_data_ref_accesses): Likewise.
11921         (vect_prune_runtime_alias_test_list): Likewise.
11922         (vect_analyze_data_refs): Likewise.
11923         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11924         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11925         (vect_analyze_scalar_cycles_1): Likewise.
11926         (vect_get_loop_niters): Likewise.
11927         (vect_analyze_loop_form_1): Likewise.
11928         (vect_update_vf_for_slp): Likewise.
11929         (vect_analyze_loop_operations): Likewise.
11930         (vect_analyze_loop): Likewise.
11931         (vectorizable_induction): Likewise.
11932         (vect_transform_loop): Likewise.
11933         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11934         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11935         (vect_make_slp_decision): Likewise.
11936         (vect_detect_hybrid_slp): Likewise.
11937         (vect_slp_analyze_operations): Likewise.
11938         (vect_slp_bb): Likewise.
11939         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11940         (vectorizable_bswap): Likewise.
11941         (vectorizable_call): Likewise.
11942         (vectorizable_simd_clone_call): Likewise.
11943         (vectorizable_conversion): Likewise.
11944         (vectorizable_assignment): Likewise.
11945         (vectorizable_shift): Likewise.
11946         (vectorizable_operation): Likewise.
11947         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11949 2018-06-18  Martin Sebor  <msebor@redhat.com>
11951         PR tree-optimization/81384
11952         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11953         * builtins.c (expand_builtin_strnlen): New function.
11954         (expand_builtin): Call it.
11955         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11956         * builtins.def (BUILT_IN_STRNLEN): New.
11957         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11958         Warn for bounds in excess of maximum object size.
11959         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11960         single-value ranges.  Handle strnlen.
11961         (handle_builtin_strlen): Handle strnlen.
11962         (strlen_check_and_optimize_stmt): Same.
11963         * doc/extend.texi (Other Builtins): Document strnlen.
11965 2018-06-18  Maya Rashish  <coypu@sdf.org>
11967         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11968         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11969         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11971         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11972         here to ...
11973         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11975 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11977         * tree.c (escaped_string::escape): Replace cast to char * by
11978         const_cast<char *> (unescaped).
11980 2018-06-18  Nick Clifton  <nickc@redhat.com>
11982         PR 84195
11983         * tree.c (escaped_string): New class.  Converts an unescaped
11984         string into its escaped equivalent.
11985         (warn_deprecated_use): Use the new class to convert the
11986         deprecation message, if present.
11987         (test_escaped_strings): New self test.
11988         (test_c_tests): Add test_escaped_strings.
11989         * doc/extend.texi (deprecated): Add a note that the
11990         deprecation message is affected by the -fmessage-length
11991         option, and that control characters will be escaped.
11992         (#pragma GCC error): Document this pragma.
11993         (#pragma GCC warning): Likewise.
11994         * doc/invoke.texi (-fmessage-length): Document this option's
11995         effect on the #warning and #error preprocessor directives and
11996         the deprecated attribute.
11998 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12000         * tree.c (decl_value_expr_lookup): Revert latest change.
12001         (decl_value_expr_insert): Likewise.
12003 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
12005         * gimplify.c (nonlocal_vlas): Delete.
12006         (nonlocal_vla_vars): Likewise.
12007         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12008         referenced VLAs.
12009         (gimplify_body): Do not create and destroy nonlocal_vlas.
12010         * tree-nested.c: Include diagnostic.h.
12011         (use_pointer_in_frame): Tweak.
12012         (lookup_field_for_decl): Add assertion and declare the transformation.
12013         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12014         internal error when the reference is in a wrong context.  Do not
12015         create a debug decl by default.
12016         (note_nonlocal_block_vlas): Delete.
12017         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12018         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
12019         create a debug decl by default.
12020         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12021         call is in a wrong context.
12022         (fixup_vla_decls): New function.
12023         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
12024         debug variables were created.
12025         * tree.c (decl_value_expr_lookup): Add checking assertion.
12026         (decl_value_expr_insert): Likewise.
12028 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12030         PR middle-end/82479
12031         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12032         * tree-scalar-evolution.c (interpret_expr): Likewise.
12033         (expression_expensive_p): Likewise.
12034         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12035         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12036         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12037         (ssa_defined_by_minus_one_stmt_p): New.
12039 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12041         PR middle-end/64946
12042         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12043         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12044         * dojump.c (do_jump): Likewise.
12045         * expr.c (expand_expr_real_2): Check operand type's sign.
12046         * fold-const.c (const_unop): Handle ABSU_EXPR.
12047         (fold_abs_const): Likewise.
12048         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12049         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12050         (strip_sign_op_1): Likesise.
12051         * match.pd: Add new pattern to generate ABSU_EXPR.
12052         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12053         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12054         * tree-eh.c (operation_could_trap_helper_p): Likewise.
12055         * tree-inline.c (estimate_operator_cost): Likewise.
12056         * tree-pretty-print.c (dump_generic_node): Likewise.
12057         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12058         * tree.def (ABSU_EXPR): New.
12060 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
12062         PR middle-end/86095
12063         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12064         documented as preserved for backward compatibility only.
12065         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12067         PR rtl-optimization/86108
12068         * bb-reorder.c (create_forwarder_block): Renamed to ...
12069         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
12070         jump from new landing pad to the second part.
12071         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12072         Adjust callers.
12074 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
12076         PR middle-end/85878
12077         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12078         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12079         Only call store_expr for halves if the mode is the same.
12081         PR middle-end/86123
12082         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12083         Fix up comment formatting.
12085 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12087         * typed-splay-tree.h (typed_splay_tree::remove): New function.
12088         (typed_splay_tree::closure,
12089         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12090         (typed_splay_tree::typed_splay_tree,
12091         typed_splay_tree::operator =): Declared private.
12092         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12093         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12094         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12095         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12096         typed_splay_tree::splay_tree_splay,
12097         typed_splay_tree::splay_tree_foreach_helper,
12098         typed_splay_tree::splay_tree_insert,
12099         typed_splay_tree::splay_tree_remove,
12100         typed_splay_tree::splay_tree_lookup,
12101         typed_splay_tree::splay_tree_predecessor,
12102         typed_splay_tree::splay_tree_successor,
12103         typed_splay_tree::splay_tree_min,
12104         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12105         (typed_splay_tree::root, typed_splay_tree::comp,
12106         typed_splay_tree::delete_key,
12107         typed_splay_tree::delete_value): New data members.
12108         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12109         typed_splay_tree::remove.
12111 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
12113         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12114         -mginv and -mno-ginv to the assembler.
12115         * config/mips/mips.opt (-mcrc): New option.
12116         (-mginv): Likewise.
12117         * doc/invoke.text (-mcrc): Document.
12118         (-mginv): Likewise.
12120 2018-06-15  Nick Clifton  <nickc@redhat.com>
12122         PR 84195
12123         * tree.c (escaped_string): New class.  Converts an unescaped
12124         string into its escaped equivalent.
12125         (warn_deprecated_use): Use the new class to convert the
12126         deprecation message, if present.
12127         (test_escaped_strings): New self test.
12128         (test_c_tests): Add test_escaped_strings.
12129         * doc/extend.texi (deprecated): Add a note that the
12130         deprecation message is affected by the -fmessage-length
12131         option, and that control characters will be escaped.
12132         (#pragma GCC error): Document this pragma.
12133         (#pragma GCC warning): Likewise.
12134         * doc/invoke.texi (-fmessage-length): Document this option's
12135         effect on the #warning and #error preprocessor directives and
12136         the deprecated attribute.
12138 2018-06-15  Richard Biener  <rguenther@suse.de>
12140         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12141         here, also noting vector size used.
12142         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
12143         size used in MSG_OPTIMIZED_LOCATIONS dump.
12144         (pass_slp_vectorize::execute): Adjust.
12146 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
12148         PR target/85968
12149         * config/arc/arc.c (arc_return_address_register): Fix
12150         if-condition.
12152 2018-06-15  Richard Biener  <rguenther@suse.de>
12154         PR middle-end/86159
12155         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12156         leave useless conversion stripping to force_gimple_operand_gsi.
12157         (gimplify_build2): Likewise.
12158         (gimplify_build1): Likewise.
12160 2018-06-15  Richard Biener  <rguenther@suse.de>
12162         PR middle-end/86076
12163         * tree-cfg.c (move_stmt_op): unshare invariant addresses
12164         before adjusting their block.
12166 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12168         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12169         multilibs for *-*-rtems*.
12170         * config/riscv/t-rtems: New file.
12172 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
12174         PR middle-end/86122
12175         * match.pd ((A +- CST1) +- CST2): Punt if last resort
12176         unsigned_type_for returns NULL.
12178         PR target/85945
12179         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12180         subregs of multi-word pseudos unless the float mode has word size.
12182 2018-06-14  Richard Biener  <rguenther@suse.de>
12184         PR middle-end/86139
12185         * tree-vect-generic.c (build_word_mode_vector_type): Remove
12186         duplicate and harmful type_hash_canon.
12187         * tree.c (type_hash_canon): Assert we didn't find ourselves.
12189 2018-06-14  Richard Biener  <rguenther@suse.de>
12191         PR ipa/86124
12192         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12193         NULL cgraph_node.
12195 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12197         * config/rtems.h (STDINT_LONG32): Define.
12199 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
12200             Prachi Godbole  <prachi.godbole@imgtec.com>
12202         * config/mips/mips-cpus.def: Define P6600.
12203         * config/mips/mips-tables.opt: Regenerate.
12204         * config/mips/mips.c (mips_ucbranch_type): New enum.
12205         (mips_rtx_cost_data): Add support for P6600.
12206         (mips_issue_rate): Likewise.
12207         (mips_multipass_dfa_lookahead): Likewise.
12208         (mips_avoid_hazard): Likewise.
12209         (mips_reorg_process_insns): Likewise.
12210         (mips_classify_branch_p6600): New function.
12211         * config/mips/mips.h (TUNE_P6600): New define.
12212         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12213         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12214         * config/mips/mips.md: Include p6600.md.
12215         (processor): Add p6600.
12216         * config/mips/p6600.md: New file.
12217         * doc/invoke.texi: Add p6600 to supported architectures.
12219 2018-06-13  Martin Sebor  <msebor@redhat.com>
12221         PR tree-optimization/86114
12222         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12223         of integer types.
12224         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
12226 2018-06-13  Richard Biener  <rguenther@suse.de>
12228         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
12229         Properly set vector type of the intermediate stmt.
12230         * tree-vect-stmts.c (vectorizable_operation): The destination
12231         var always has vectype_out type.
12233 2018-06-13  Jeff Law  <law@redhat.com>
12235         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
12236         integer 0 for argument to print_rtl_with_bb.
12237         (rl78_reorg): Likewise.
12239 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
12241         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
12242         from rtx to rtx_insn *.
12243         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
12244         "label".
12245         (add_sched_insns_for_speculation): Likewise for local "target",
12246         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12247         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
12248         from rtx_insn ** to rtx_code_label **.
12249         (reorg_emit_nops): Likewise.
12250         (c6x_reorg): Likewise for local "call_labels".
12251         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
12252         rtx to rtx_insn *.
12253         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
12254         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
12255         the loops over LABEL_REFS.
12256         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
12257         braf_label.
12258         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12259         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
12260         (split_branches): Strengthen local "olabel" from rtx to
12261         rtx_insn *, adding a safe_as_a cast.
12262         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
12263         to "rtx_insn *".
12264         (add_insn_after): Likewise for first two params.
12265         (add_insn_before): Likewise.
12266         (remove_insn): Likewise for param.
12267         (emit_pattern_before_noloc): Likewise for second and third params.
12268         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
12269         (emit_call_insn_before_noloc): Likewise.
12270         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
12271         to "rtx_insn *".
12272         (emit_barrier_before): Likewise.
12273         (emit_label_before): Strengthen "label" param from "rtx" to
12274         "rtx_code_label *".  Strengthen "before" param from "rtx" to
12275         "rtx_insn *".
12276         (emit_insn_after_1): Strengthen "after" param from "rtx" to
12277         "rtx_insn *".
12278         (emit_pattern_after_noloc): Likewise.
12279         (emit_insn_after_noloc): Likewise.
12280         (emit_jump_insn_after_noloc): Likewise.
12281         (emit_call_insn_after_noloc): Likewise.
12282         (emit_debug_insn_after_noloc): Likewise.
12283         (emit_barrier_after): Likewise.
12284         (emit_label_after): Likewise for both params.
12285         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
12286         "loc" param from "int" to "location_t".
12287         (emit_insn_after_setloc): Likewise.
12288         (emit_jump_insn_after_setloc): Likewise.
12289         (emit_call_insn_after_setloc): Likewise.
12290         (emit_debug_insn_after_setloc): Likewise.
12291         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
12292         "loc" param from "int" to "location_t".
12293         (emit_pattern_before): Convert NULL_RTX to NULL.
12294         (emit_insn_before_setloc): Convert "loc" param from "int" to
12295         "location_t".
12296         (emit_jump_insn_before_setloc): Likewise.
12297         (emit_call_insn_before_setloc): Likewise.
12298         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
12299         rtx_insn *.  Convert "loc" param from "int" to "location_t".
12300         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
12301         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
12302         Convert 3rd param from "int" to "location_t".
12303         (emit_barrier_before, emit_barrier_after, next_real_insn):
12304         Strengthen param from rtx to rtx_insn *.
12305         (emit_label_before): Strengthen 1st param from "rtx" to
12306         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
12307         "rtx_insn *".
12308         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
12309         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
12310         Strengthen 2nd param from "rtx" to "rtx_insn *".
12311         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
12312         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
12313         Likewise. Convert 3rd param from "int" to "location_t".
12314         (emit_label_after): Strengthen 1st param from "rtx" to
12315         "rtx_code_label *".
12316         (next_real_insn, remove_insn): Strengthen param from "rtx" to
12317         "rtx_insn *".
12318         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
12319         from "rtx" to "rtx_insn *".
12321 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
12323         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
12324         bodies streamed in with -Q.
12325         * dumpfile.c (dump_files): Add lto-stream-out dump file.
12326         * dumpfile.h (tree_dump_index): Add lto_stream_out.
12327         * gimple-streamer-out.c: Include gimple-pretty-print.h
12328         (output_bb): Dump stmts streamed.
12329         * lto-section-out.c: Include print-tree.h
12330         (lto_begin_section): Dump sections created.
12331         (lto_output_decl_index): Dump decl encoded.
12332         * lto-streamer-out.c: Include print-tree.h
12333         (create_output_block): Dump output block created.
12334         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
12335         (output_function): Dump function output.
12336         (output_constructor): Dump constructor streamed.
12337         (write_global_stream): Output indexes encoded.
12338         (produce_asm_for_decls): Dump streams encoded.
12339         * lto-streamer.c (streamer_dump_file): New global var.
12340         * lto-streamer.h (streamer_dump_file): Declare.
12341         * passes.c (ipa_write_summaries): Initialize streamer dump.
12342         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
12343         in.
12345 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
12347         PR target/86048
12348         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
12349         offsets for register save directives.  Emit a second batch of save
12350         directives, if need be, when the function accesses prior frames.
12352 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12354         * config/arc/fpu.md (fmasf4): Force operand to register.
12355         (fnmasf4): Likewise.
12357 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12359         * config/arc/arc-protos.h (arc_pad_return): Remove.
12360         * config/arc/arc.c (machine_function): Remove force_short_suffix
12361         and size_reason.
12362         (arc_print_operand): Adjust printing of '&'.
12363         (arc_verify_short): Remove conditional printing of short suffix.
12364         (arc_final_prescan_insn): Remove reference to size_reason.
12365         (pad_return): New function.
12366         (arc_reorg): Call pad_return.
12367         (arc_pad_return): Remove.
12368         (arc_init_machine_status): Remove reference to force_short_suffix.
12369         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
12370         (attr length): When attribute iscompact is true force to 2
12371         regardless; in the case of maybe check if we want to force the
12372         instruction to have 4 bytes length.
12373         (nopv): Change it to generate 4 byte long nop as well.
12374         (blockage): New pattern.
12375         (simple_return): Remove call to arc_pad_return.
12376         (p_return_i): Likewise.
12378 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12380         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
12382 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12384         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
12385         ARC cores.
12387 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12389         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
12390         for ARC700 and ARCv2.
12392 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
12394         PR target/86076
12395         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
12396         operands[2] instead of operands[1].
12399 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
12401         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
12402         case, check whether the outer register overlaps an unallocatable
12403         register, not just whether it fits the required class.
12405 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
12407         * poly-int.h (can_div_trunc_p): Add new overload in which all values
12408         are poly_ints.
12409         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
12410         (memrefs_conflict_p): Likewise.
12411         (init_alias_analysis): Likewise.
12412         * cfgexpand.c (expand_debug_expr): Likewise.
12413         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
12414         * cse.c (fold_rtx): Likewise.
12415         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
12416         * expr.c (emit_block_move_hints): Likewise.
12417         (clear_storage_hints, push_block, emit_push_insn): Likewise.
12418         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
12419         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
12420         (emit_group_store): Likewise.
12421         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
12422         to read the PRE/POST_MODIFY increment.
12423         * calls.c (store_one_arg): Use strip_offset.
12424         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
12425         poly_int_rtx_p.
12426         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
12427         by a VEC_SELECT.
12428         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
12429         (simplify_binary_operation_1): Extend CONST_INT handling to
12430         poly_int_rtx_p.
12431         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
12432         than a HOST_WIDE_INT.
12433         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
12434         poly_int64.
12435         (adjust_mems, add_stores): Update accodingly.
12436         (vt_canonicalize_addr): Track polynomial offsets.
12437         (emit_note_insn_var_location): Likewise.
12438         (vt_add_function_parameter): Likewise.
12439         (vt_initialize): Likewise.
12441 2018-06-12  Jeff Law  <law@redhat.com>
12443         * config.gcc (alpha*-*-freebsd*): Remove.
12444         * config/alpha/freebsd.h: Remove.
12446 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
12448         PR other/69968
12449         * spellcheck-tree.c (levenshtein_distance): Rename to...
12450         (get_edit_distance): ...this, and update for underlying renaming.
12451         * spellcheck-tree.h (levenshtein_distance): Rename to...
12452         (get_edit_distance): ...this.
12453         * spellcheck.c (levenshtein_distance): Rename to...
12454         (get_edit_distance): ...this.  Convert from Levenshtein distance
12455         to Damerau-Levenshtein distance by supporting transpositions of
12456         adjacent characters.  Rename "v1" to "v_next" and "v0" to
12457         "v_one_ago".
12458         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
12459         (selftest::test_edit_distance_unit_test_oneway): ...this, and
12460         update for underlying renaming.
12461         (selftest::levenshtein_distance_unit_test): Rename to...
12462         (selftest::test_get_edit_distance_unit): ...this, and update for
12463         underlying renaming.
12464         (selftest::test_find_closest_string): Add example from PR 69968
12465         where transposition helps
12466         (selftest::test_metric_conditions): Update for renaming.
12467         (selftest::test_metric_conditions): Likewise.
12468         (selftest::spellcheck_c_tests): Likewise.
12469         * spellcheck.h (levenshtein_distance): Rename both overloads to...
12470         (get_edit_distance): ...this.
12471         (best_match::consider): Update for renaming.
12473 2018-06-12  Martin Sebor  <msebor@redhat.com>
12475         PR tree-optimization/85259
12476         * builtins.c (compute_objsize): Handle constant offsets.
12477         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
12478         true iff a warning has been issued.
12479         * gimple.h (gimple_nonartificial_location): New function.
12480         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
12481         gimple_nonartificial_location and handle -Wno-system-headers.
12482         (handle_builtin_stxncpy): Same.
12484 2018-06-12  Martin Sebor  <msebor@redhat.com>
12486         PR c/85931
12487         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
12489 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
12491         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12492         BUILTIN_VEC_XST entries for pointer to double and long long.
12494 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
12496         PR target/85990
12497         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12498         Update comments.
12499         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12500         Likewise.
12502 2018-06-12  Martin Liska  <mliska@suse.cz>
12504         * doc/options.texi: Document IntegerRange.
12506 2018-06-12  Martin Liska  <mliska@suse.cz>
12508         * config/i386/i386.opt: Make MPX-related options as Deprecated.
12509         * opt-functions.awk: Handle Deprecated flag.
12510         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
12511         and report error.
12512         (read_cmdline_option): Report warning for a deprecated option.
12513         * opts.h (struct cl_option): Add new field cl_deprecated.
12514         (CL_ERR_DEPRECATED): New.
12516 2018-06-12  Martin Liska  <mliska@suse.cz>
12518         * doc/options.texi: Document Deprecated option flag.
12520 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12522         * config/arc/arc-arch.h (arc_extras): New enum.
12523         (arc_cpu_t):Add field extra.
12524         (arc_cpu_types): Consider the extras.
12525         * config/arc/arc-cpus.def: Add extras info.
12526         * config/arc/arc-opts.h (processor_type): Consider extra field.
12527         * config/arc/arc.c (arc_override_options): Handle extra field.
12529 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12531         * config/arc/arc-arch.h: Update ARC_OPTX macro.
12532         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
12533         field.
12534         * config/arc/arc.c (arc_init): Update pic warning.
12535         (irq_range): Update irq range parsing warnings.
12536         (arc_override_options): Update various warning messages.
12537         (arc_handle_aux_attribute): Likewise.
12539 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
12541         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
12543 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12545         * doc/sourcebuild.texi: Document usage of line number 0 in verify
12546         compiler messages directives.
12548 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
12550         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
12551         * config/mips/mips-tables.opt: Regenerate.
12552         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
12553         mips64r6.
12554         * doc/invoke.texi: Document -march=i6500.
12556 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
12558         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
12559         (i6400_gpmul): Add cpu_unit.
12560         (i6400_gpdiv): Likewise.
12561         (i6400_msa_add_d): Update reservations.
12562         (i6400_msa_int_add) Likewise.
12563         (i6400_msa_short_logic3) Likewise.
12564         (i6400_msa_short_logic2) Likewise.
12565         (i6400_msa_short_logic) Likewise.
12566         (i6400_msa_move) Likewise.
12567         (i6400_msa_cmp) Likewise.
12568         (i6400_msa_short_float2) Likewise.
12569         (i6400_msa_div_d) Likewise.
12570         (i6400_msa_long_logic1) Likewise.
12571         (i6400_msa_long_logic2) Likewise.
12572         (i6400_msa_mult) Likewise.
12573         (i6400_msa_long_float2) Likewise.
12574         (i6400_msa_long_float4) Likewise.
12575         (i6400_msa_long_float5) Likewise.
12576         (i6400_msa_long_float8) Likewise.
12577         (i6400_fpu_fadd): Include frint type.
12578         (i6400_fpu_store): New define_insn_reservation.
12579         (i6400_fpu_load): Likewise.
12580         (i6400_fpu_move): Likewise.
12581         (i6400_fpu_fcmp): Likewise.
12582         (i6400_fpu_fmadd): Likewise.
12583         (i6400_int_mult): Include imul3nc type and update reservation.
12584         (i6400_int_div): Include idiv3 type and update reservation.
12585         (i6400_int_load): Update to check type not move_type.
12586         (i6400_int_store): Likewise.
12587         (i6400_int_prefetch): Set zero latency.
12589 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
12591         * gcc.c: Document new %@{...} sequence.
12592         (LINK_COMMAND_SPEC): Use it for the -L switches.
12593         (cpp_unique_options): Use it for the -I switches.
12594         (at_file_argbuf): New global variable.
12595         (in_at_file): Likewise.
12596         (alloc_args): Create at_file_argbuf.
12597         (clear_args): Truncate at_file_argbuf.
12598         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
12599         (open_at_file): New function.
12600         (close_at_file): Likewise.
12601         (create_at_file): Delete.
12602         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
12603         <'o'>: Likewise.
12604         <'@'>: New case.
12605         (validate_switches_from_spec): Deal with %@{...} sequence.
12606         (validate_switches): Likewise.
12607         (driver::finalize): Call clear_args.
12609 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
12611         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
12613 2018-06-11  Martin Sebor  <msebor@redhat.com>
12615         * doc/invoke.texi (-Wall): List -Wc++17-compat.
12616         (Wno-class-memaccess): Add @opindex.
12617         (Wno-templates, Wno-multiple-inheritance): Same.
12618         (Wno-virtual-inheritance, Wno-namespaces): Same.
12619         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
12620         (Wno-format-overflow, Wno-format-truncation): Same.
12621         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
12622         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
12623         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
12624         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
12625         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
12626         (Wno-misspelled-isr): Same.
12628 2018-06-11  Martin Sebor  <msebor@redhat.com>
12630         * PR tree-optimization/86083
12631         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
12633 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
12635         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
12637 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
12639         PR target/85755
12640         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
12641         on the correct operand.
12642         (*movdi_internal64): Ditto.
12644 2018-06-11  Martin Liska  <mliska@suse.cz>
12646         PR tree-optimization/86089
12647         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
12649 2018-06-11  Julia Koval  <julia.koval@intel.com>
12651         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
12652         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
12653         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
12655 2018-06-11  Olivier Hainque  <hainque@adacore.com>
12657         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
12658         for Ada with strict dwarf2.
12660 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
12662         PR target/85755
12663         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
12664         addresses.
12666 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
12668         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12670 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
12672         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12673         TARGET_ELF.
12675 2018-06-08  Martin Liska  <mliska@suse.cz>
12677         * tree-cfg.h (debug_function): Fix argument type to match
12678         implementation.
12680 2018-06-08  Martin Liska  <mliska@suse.cz>
12682         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12683         Remove usage of MPX-related (and removed) fields.
12684         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12686 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
12688         * cfg.c (debug): Use TDF_NONE rather than 0.
12689         * cfghooks.c (debug): Likewise.
12690         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12691         (struct dump_option_value_info): Convert to...
12692         (struct kv_pair): ...this template type.
12693         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12694         rather than 0.
12695         (optinfo_verbosity_options): Likewise.
12696         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12697         OPTGROUP_NONE.
12698         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12699         than int for "optgroup_flags" param.
12700         (dump_generic_expr_loc): Use dump_flags_t rather than int for
12701         "dump_kind" param.
12702         (dump_dec): Likewise.
12703         (dump_finish): Use TDF_NONE rather than 0.
12704         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12705         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
12706         than 0.  Update for change to option_ptr.
12707         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12708         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
12709         0.  Update for changes to optinfo_verbosity_options and
12710         optgroup_options.
12711         (opt_info_switch_p): Convert optgroup_flags from int to
12712         optgroup_flags_t.
12713         (dump_basic_block): Use dump_flags_t rather than int
12714         for "dump_kind" param.
12715         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12716         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12717         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12718         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12719         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12720         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12721         TDF_NONE): Convert from macros to...
12722         (enum dump_flag): ...this new enum.
12723         (dump_flags_t): Update to use enum.
12724         (operator|, operator&, operator~, operator|=, operator&=):
12725         Implement for dump_flags_t.
12726         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12727         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12728         Convert from macros to...
12729         (enum optgroup_flag): ...this new enum.
12730         (optgroup_flags_t): New typedef.
12731         (operator|, operator|=): Implement for optgroup_flags_t.
12732         (struct dump_file_info): Convert field "alt_flags" to
12733         dump_flags_t.  Convert field "optgroup_flags" to
12734         optgroup_flags_t.
12735         (dump_basic_block): Use dump_flags_t rather than int for param.
12736         (dump_generic_expr_loc): Likewise.
12737         (dump_dec): Likewise.
12738         (dump_register): Convert param "optgroup_flags" to
12739         optgroup_flags_t.
12740         (opt_info_enable_passes): Likewise.
12741         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12742         than 0.
12743         * gimple-pretty-print.c (debug): Likewise.
12744         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12745         (merged_store_group::apply_stores): Likewise.
12746         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12747         * gimple.c (verify_gimple_pp): Likewise.
12748         * graphite-poly.c (print_pbb_body): Likewise.
12749         * passes.c (pass_manager::register_one_dump_file): Convert
12750         local "optgroup_flags" to optgroup_flags_t.
12751         * print-tree.c (print_node): Use TDF_NONE rather than 0.
12752         (debug): Likewise.
12753         (debug_body): Likewise.
12754         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12755         to optgroup_flags_t.
12756         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12757         than 0.
12758         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12759         (convert_mult_to_fma): Likewise.
12760         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12761         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12762         * tree-vect-data-refs.c (dump_lower_bound): Convert param
12763         "dump_kind" to dump_flags_t.
12765 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12767         * config/rs6000/rs6000.c (min, max): Delete.
12769 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12771         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12772         -mabi=spe and -mabi=no-spe.
12774 2018-06-08  Martin Liska  <mliska@suse.cz>
12776         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12777         where we expect an existing summary.
12779 2018-06-08  Martin Liska  <mliska@suse.cz>
12781         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12782         * ipa-inline.h (estimate_edge_growth): Likewise.
12784 2018-06-08  Martin Liska  <mliska@suse.cz>
12786         * cgraph.c (function_version_hasher::hash): Use
12787         cgraph_node::get_uid ().
12788         (function_version_hasher::equal):
12789         * cgraph.h (cgraph_node::get_uid): New method.
12790         * ipa-inline.c (update_caller_keys): Use
12791         cgraph_node::get_uid ().
12792         (update_callee_keys): Likewise.
12793         * ipa-utils.c (searchc): Likewise.
12794         (ipa_reduced_postorder): Likewise.
12795         * lto-cgraph.c (input_node): Likewise.
12796         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12797         * symbol-summary.h (symtab_insertion): Likewise.
12798         (symtab_removal): Likewise.
12799         (symtab_duplication): Likewise.
12800         * tree-pretty-print.c (dump_function_header): Likewise.
12801         * tree-sra.c (convert_callers_for_node): Likewise.
12803 2018-06-08  Martin Liska  <mliska@suse.cz>
12805         * cgraph.c (symbol_table::create_edge): Always assign a new
12806         unique number.
12807         (symbol_table::free_edge): Do not recycle numbers.
12808         * cgraph.h (cgraph_edge::get): New method.
12809         * symbol-summary.h (symtab_removal): Use it.
12810         (symtab_duplication): Likewise.
12811         (call_summary::hashable_uid): Remove.
12813 2018-06-08  Martin Liska  <mliska@suse.cz>
12815         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12816         (initialize_growth_caches): Remove.
12817         (free_growth_caches): Likewise.
12818         (do_estimate_edge_time): Use edge_growth_cache.
12819         (do_estimate_edge_size): Likewise.
12820         (do_estimate_edge_hints): Likewise.
12821         * ipa-inline.c (reset_edge_caches): Likewise.
12822         (recursive_inlining): Likewise.
12823         (inline_small_functions): Likewise.
12824         * ipa-inline.h (initialize_growth_caches): Remove.
12825         (estimate_edge_size): Likewise.
12826         (estimate_edge_time): Likewise.
12827         (estimate_edge_hints): Likewise.
12828         (reset_edge_growth_cache): Likewise.
12829         * symbol-summary.h (call_summary::remove): New method.
12831 2018-06-08  Martin Liska  <mliska@suse.cz>
12833         * ipa-cp.c (class edge_clone_summary): New summary.
12834         (grow_edge_clone_vectors): Remove.
12835         (ipcp_edge_duplication_hook): Remove.
12836         (class edge_clone_summary_t): New call_summary class.
12837         (ipcp_edge_removal_hook): Remove.
12838         (edge_clone_summary_t::duplicate): New function.
12839         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12840         (create_specialized_node): Likewise.
12841         (ipcp_driver): Initialize edge_clone_summaries and do not
12842         register hooks.
12844 2018-06-08  Martin Liska  <mliska@suse.cz>
12846         * symbol-summary.h (get): New function.
12847         (call_summary::m_initialize_when_cloning): New class member.
12849 2018-06-08  Martin Liska  <mliska@suse.cz>
12851         * cgraph.c (cgraph_node::remove): Do not recycle uid.
12852         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12853         (symbol_table::allocate_cgraph_symbol): Do not set uid.
12854         * passes.c (uid_hash_t): Record removed_nodes by their uids.
12855         (remove_cgraph_node_from_order): Use the removed_nodes set.
12856         (do_per_function_toporder): Likwise.
12857         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12858         instead of summary_uid.
12859         (symtab_removal): Likewise.
12860         (symtab_duplication): Likewise.
12862 2018-06-08  Martin Liska  <mliska@suse.cz>
12864         * ipa-cp.c (ipcp_store_bits_results): Use
12865         ipcp_transformation_sum.
12866         (ipcp_store_vr_results): Likewise.
12867         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12868         to ...
12869         (ipcp_transformation_initialize): ... this.
12870         (ipa_set_node_agg_value_chain):
12871         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12872         (write_ipcp_transformation_info): Likewise.
12873         (read_ipcp_transformation_info): Likewise.
12874         (ipcp_update_bits): Likewise.
12875         (ipcp_update_vr): Likewise.
12876         (ipcp_transform_function): Likewise.
12877         * ipa-prop.h: Rename ipcp_transformation_summary to
12878         ipcp_transformation.
12879         (class ipcp_transformation_t): New function summary.
12880         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12881         (ipa_get_agg_replacements_for_node): Likewise.
12883 2018-06-08  Martin Liska  <mliska@suse.cz>
12885         * ipa-pure-const.c (struct funct_state_d): Do it class instead
12886         of struct.
12887         (class funct_state_summary_t): New function_summary class.
12888         (has_function_state): Remove.
12889         (get_function_state): Likewise.
12890         (set_function_state): Likewise.
12891         (add_new_function): Likewise.
12892         (funct_state_summary_t::insert): New function.
12893         (duplicate_node_data): Remove.
12894         (remove_node_data): Remove.
12895         (funct_state_summary_t::duplicate): New function.
12896         (register_hooks): Create new funct_state_summaries.
12897         (pure_const_generate_summary): Use it.
12898         (pure_const_write_summary): Likewise.
12899         (pure_const_read_summary): Likewise.
12900         (propagate_pure_const): Likewise.
12901         (propagate_nothrow): Likewise.
12902         (dump_malloc_lattice): Likewise.
12903         (propagate_malloc): Likewise.
12904         (execute): Do not register hooks, just remove summary
12905         instead.
12906         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12907         constructor.
12909 2018-06-08  Martin Liska  <mliska@suse.cz>
12911         * ipa-reference.c (remove_node_data): Remove.
12912         (duplicate_node_data): Likewise.
12913         (class ipa_ref_var_info_summary_t): New class.
12914         (class ipa_ref_opt_summary_t): Likewise.
12915         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12916         (get_reference_optimization_summary): Use
12917         ipa_ref_opt_sum_summaries.
12918         (set_reference_vars_info): Remove.
12919         (set_reference_optimization_summary): Likewise.
12920         (ipa_init): Create summaries.
12921         (init_function_info): Use function summary.
12922         (ipa_ref_opt_summary_t::duplicate): New function.
12923         (ipa_ref_opt_summary_t::remove): New function.
12924         (get_read_write_all_from_node): Fix GNU coding style.
12925         (propagate): Use function summary.
12926         (write_node_summary_p): Fix GNU coding style.
12927         (stream_out_bitmap): Likewise.
12928         (ipa_reference_read_optimization_summary): Use function summary.
12929         (ipa_reference_c_finalize): Do not release hooks.
12931 2018-06-08  Martin Liska  <mliska@suse.cz>
12933         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12934         (analyze_function_body): Extract multiple calls of get_create.
12935         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12936         * ipa-inline.c (recursive_inlining): Use ::get method.
12937         * ipa-inline.h (estimate_edge_growth): Likewise.
12939 2018-06-08  Martin Liska  <mliska@suse.cz>
12941         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12942         HSA_INVALID.
12943         (hsa_function_summary::hsa_function_summary): Use the new enum
12944         value.
12945         (hsa_gpu_implementation_p): Use hsa_summaries::get.
12946         * hsa-gen.c (hsa_get_host_function): Likewise.
12947         (get_brig_function_name): Likewise.
12948         * ipa-hsa.c (process_hsa_functions): Likewise.
12949         (ipa_hsa_write_summary): Likewise.
12950         * symbol-summary.h (symtab_duplication): Use ::get function/
12951         (get): New function.
12953 2018-06-08  Martin Liska  <mliska@suse.cz>
12955         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12956         of get.
12957         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12958         (hsa_register_kernel): Likewise.
12959         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12960         * hsa-gen.c (hsa_get_host_function): Likewise.
12961         (get_brig_function_name): Likewise.
12962         (generate_hsa): Likewise.
12963         (pass_gen_hsail::execute): Likewise.
12964         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12965         (devirtualization_time_bonus): Likewise.
12966         (ipcp_propagate_stage): Likewise.
12967         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12968         (edge_set_predicate): Likewise.
12969         (evaluate_conditions_for_known_args): Likewise.
12970         (evaluate_properties_for_edge): Likewise.
12971         (ipa_fn_summary::reset): Likewise.
12972         (ipa_fn_summary_t::duplicate): Likewise.
12973         (dump_ipa_call_summary): Likewise.
12974         (ipa_dump_fn_summary): Likewise.
12975         (analyze_function_body): Likewise.
12976         (compute_fn_summary): Likewise.
12977         (estimate_edge_devirt_benefit): Likewise.
12978         (estimate_edge_size_and_time): Likewise.
12979         (estimate_calls_size_and_time): Likewise.
12980         (estimate_node_size_and_time): Likewise.
12981         (inline_update_callee_summaries): Likewise.
12982         (remap_edge_change_prob): Likewise.
12983         (remap_edge_summaries): Likewise.
12984         (ipa_merge_fn_summary_after_inlining): Likewise.
12985         (ipa_update_overall_fn_summary): Likewise.
12986         (read_ipa_call_summary): Likewise.
12987         (inline_read_section): Likewise.
12988         (write_ipa_call_summary): Likewise.
12989         (ipa_fn_summary_write): Likewise.
12990         (ipa_free_fn_summary): Likewise.
12991         * ipa-hsa.c (process_hsa_functions): Likewise.
12992         (ipa_hsa_write_summary): Likewise.
12993         (ipa_hsa_read_section): Likewise.
12994         * ipa-icf.c (sem_function::merge): Likewise.
12995         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12996         (do_estimate_edge_time): Likewise.
12997         (estimate_size_after_inlining): Likewise.
12998         (estimate_growth): Likewise.
12999         (growth_likely_positive): Likewise.
13000         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13001         (inline_call): Likewise.
13002         * ipa-inline.c (caller_growth_limits): Likewise.
13003         (can_inline_edge_p): Likewise.
13004         (can_inline_edge_by_limits_p): Likewise.
13005         (compute_uninlined_call_time): Likewise.
13006         (compute_inlined_call_time): Likewise.
13007         (want_inline_small_function_p): Likewise.
13008         (edge_badness): Likewise.
13009         (update_caller_keys): Likewise.
13010         (update_callee_keys): Likewise.
13011         (recursive_inlining): Likewise.
13012         (inline_small_functions): Likewise.
13013         (inline_to_all_callers_1): Likewise.
13014         (dump_overall_stats): Likewise.
13015         (early_inline_small_functions): Likewise.
13016         (early_inliner): Likewise.
13017         * ipa-inline.h (estimate_edge_growth): Likewise.
13018         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13019         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13020         * ipa-prop.h (IPA_NODE_REF): Likewise.
13021         (IPA_EDGE_REF): Likewise.
13022         * ipa-pure-const.c (malloc_candidate_p): Likewise.
13023         (propagate_malloc): Likewise.
13024         * ipa-split.c (execute_split_functions): Likewise.
13025         * symbol-summary.h: Rename get to get_create.
13026         (get): Likewise.
13027         (get_create): Likewise.
13028         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13030 2018-06-08  Martin Liska  <mliska@suse.cz>
13032         * symbol-summary.h (release): Move definition out of class
13033         declaration.
13034         (symtab_removal): Likewise.
13035         (symtab_duplication): Likewise.
13037 2018-06-08  Martin Liska  <mliska@suse.cz>
13039         * symbol-summary.h (function_summary): Move constructor
13040         implementation out of class declaration.
13041         (release): Likewise.
13042         (symtab_insertion): Likewise.
13043         (symtab_removal): Likewise.
13044         (symtab_duplication): Likewise.
13045         (get): Likewise.
13047 2018-06-08  Martin Liska  <mliska@suse.cz>
13049         * Makefile.in: Remove support for MPX (macros, related functions,
13050         fields in cgraph_node, ...).
13051         * builtin-types.def (BT_BND): Likewise.
13052         (BT_FN_BND_CONST_PTR): Likewise.
13053         (BT_FN_CONST_PTR_BND): Likewise.
13054         (BT_FN_VOID_PTR_BND): Likewise.
13055         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13056         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13057         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13058         (expand_builtin_mempcpy_with_bounds): Likewise.
13059         (expand_builtin_memset_with_bounds): Likewise.
13060         (expand_builtin_memset_args): Likewise.
13061         (std_expand_builtin_va_start): Likewise.
13062         (expand_builtin): Likewise.
13063         (expand_builtin_with_bounds): Likewise.
13064         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13065         (DEF_LIB_BUILTIN_CHKP): Likewise.
13066         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13067         (DEF_CHKP_BUILTIN): Likewise.
13068         (BUILT_IN_MEMCPY): Likewise.
13069         (BUILT_IN_MEMMOVE): Likewise.
13070         (BUILT_IN_MEMPCPY): Likewise.
13071         (BUILT_IN_MEMSET): Likewise.
13072         (BUILT_IN_STPCPY): Likewise.
13073         (BUILT_IN_STRCAT): Likewise.
13074         (BUILT_IN_STRCHR): Likewise.
13075         (BUILT_IN_STRCPY): Likewise.
13076         (BUILT_IN_STRLEN): Likewise.
13077         (BUILT_IN_MEMCPY_CHK): Likewise.
13078         (BUILT_IN_MEMMOVE_CHK): Likewise.
13079         (BUILT_IN_MEMPCPY_CHK): Likewise.
13080         (BUILT_IN_MEMSET_CHK): Likewise.
13081         (BUILT_IN_STPCPY_CHK): Likewise.
13082         (BUILT_IN_STRCAT_CHK): Likewise.
13083         (BUILT_IN_STRCPY_CHK): Likewise.
13084         * calls.c (store_bounds): Likewise.
13085         (emit_call_1): Likewise.
13086         (special_function_p): Likewise.
13087         (maybe_warn_nonstring_arg): Likewise.
13088         (initialize_argument_information): Likewise.
13089         (finalize_must_preallocate): Likewise.
13090         (compute_argument_addresses): Likewise.
13091         (expand_call): Likewise.
13092         * cfgexpand.c (expand_call_stmt): Likewise.
13093         (expand_return): Likewise.
13094         (expand_gimple_stmt_1): Likewise.
13095         (pass_expand::execute): Likewise.
13096         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13097         (cgraph_node::remove): Likewise.
13098         (cgraph_node::dump): Likewise.
13099         (cgraph_node::verify_node): Likewise.
13100         * cgraph.h (chkp_function_instrumented_p): Likewise.
13101         (symtab_node::get_alias_target): Likewise.
13102         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13103         (cgraph_local_p): Likewise.
13104         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13105         (cgraph_edge::rebuild_references): Likewise.
13106         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13107         (walk_polymorphic_call_targets): Likewise.
13108         (cgraph_node::expand_thunk): Likewise.
13109         (symbol_table::output_weakrefs): Likewise.
13110         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13111         (ix86_handle_option): Likewise.
13112         * config/i386/constraints.md: Likewise.
13113         * config/i386/i386-builtin-types.def (BND): Likewise.
13114         (VOID): Likewise.
13115         (PVOID): Likewise.
13116         (ULONG): Likewise.
13117         * config/i386/i386-builtin.def (BDESC_END): Likewise.
13118         (BDESC_FIRST): Likewise.
13119         (BDESC): Likewise.
13120         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13121         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13122         * config/i386/i386.c (enum reg_class): Likewise.
13123         (ix86_target_string): Likewise.
13124         (ix86_option_override_internal): Likewise.
13125         (ix86_conditional_register_usage): Likewise.
13126         (ix86_valid_target_attribute_inner_p): Likewise.
13127         (ix86_set_indirect_branch_type): Likewise.
13128         (ix86_set_current_function): Likewise.
13129         (ix86_function_arg_regno_p): Likewise.
13130         (init_cumulative_args): Likewise.
13131         (ix86_function_arg_advance): Likewise.
13132         (ix86_function_arg): Likewise.
13133         (ix86_pass_by_reference): Likewise.
13134         (ix86_function_value_regno_p): Likewise.
13135         (ix86_function_value_1): Likewise.
13136         (ix86_function_value_bounds): Likewise.
13137         (ix86_return_in_memory): Likewise.
13138         (ix86_setup_incoming_vararg_bounds): Likewise.
13139         (ix86_va_start): Likewise.
13140         (indirect_thunk_need_prefix): Likewise.
13141         (print_reg): Likewise.
13142         (ix86_print_operand): Likewise.
13143         (ix86_expand_call): Likewise.
13144         (ix86_output_function_return): Likewise.
13145         (reg_encoded_number): Likewise.
13146         (BDESC_VERIFYS): Likewise.
13147         (ix86_init_mpx_builtins): Likewise.
13148         (ix86_init_builtins): Likewise.
13149         (ix86_emit_cmove): Likewise.
13150         (ix86_emit_move_max): Likewise.
13151         (ix86_expand_builtin): Likewise.
13152         (ix86_builtin_mpx_function): Likewise.
13153         (ix86_get_arg_address_for_bt): Likewise.
13154         (ix86_load_bounds): Likewise.
13155         (ix86_store_bounds): Likewise.
13156         (ix86_load_returned_bounds): Likewise.
13157         (ix86_store_returned_bounds): Likewise.
13158         (ix86_class_likely_spilled_p): Likewise.
13159         (ix86_hard_regno_mode_ok): Likewise.
13160         (x86_order_regs_for_local_alloc): Likewise.
13161         (ix86_mitigate_rop): Likewise.
13162         (ix86_bnd_prefixed_insn_p): Likewise.
13163         (ix86_mpx_bound_mode): Likewise.
13164         (ix86_make_bounds_constant): Likewise.
13165         (ix86_initialize_bounds): Likewise.
13166         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13167         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13168         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13169         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13170         (TARGET_CHKP_BOUND_MODE): Likewise.
13171         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13172         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13173         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13174         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13175         * config/i386/i386.h (TARGET_MPX): Likewise.
13176         (TARGET_MPX_P): Likewise.
13177         (VALID_BND_REG_MODE): Likewise.
13178         (FIRST_BND_REG): Likewise.
13179         (LAST_BND_REG): Likewise.
13180         (enum reg_class): Likewise.
13181         (BND_REG_P): Likewise.
13182         (BND_REGNO_P): Likewise.
13183         (BNDmode): Likewise.
13184         (ADJUST_INSN_LENGTH): Likewise.
13185         * config/i386/i386.md: Likewise.
13186         * config/i386/i386.opt: Likewise.
13187         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13188         (defined): Likewise.
13189         (LINK_MPX): Likewise.
13190         (MPX_SPEC): Likewise.
13191         (LIBMPX_SPEC): Likewise.
13192         (LIBMPXWRAPPERS_SPEC): Likewise.
13193         (CHKP_SPEC): Likewise.
13194         * config/i386/predicates.md: Likewise.
13195         * dbxout.c (dbxout_type): Likewise.
13196         * doc/extend.texi: Likewise.
13197         * doc/invoke.texi: Likewise.
13198         * doc/md.texi: Likewise.
13199         * doc/tm.texi: Likewise.
13200         * doc/tm.texi.in: Likewise.
13201         * dwarf2out.c (is_base_type): Likewise.
13202         (gen_formal_types_die): Likewise.
13203         (gen_subprogram_die): Likewise.
13204         (gen_type_die_with_usage): Likewise.
13205         (gen_decl_die): Likewise.
13206         (dwarf2out_late_global_decl): Likewise.
13207         * expr.c (expand_assignment): Likewise.
13208         (emit_storent_insn): Likewise.
13209         (store_expr_with_bounds): Likewise.
13210         (store_expr): Likewise.
13211         (expand_expr_real_1): Likewise.
13212         * expr.h (store_expr_with_bounds): Likewise.
13213         * function.c (use_register_for_decl): Likewise.
13214         (struct bounds_parm_data): Likewise.
13215         (assign_parms_augmented_arg_list): Likewise.
13216         (assign_parm_find_entry_rtl): Likewise.
13217         (assign_parm_is_stack_parm): Likewise.
13218         (assign_parm_load_bounds): Likewise.
13219         (assign_bounds): Likewise.
13220         (assign_parms): Likewise.
13221         (expand_function_start): Likewise.
13222         * gcc.c (CHKP_SPEC): Likewise.
13223         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13224         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13225         (wrestrict_dom_walker::check_call): Likewise.
13226         * gimple.c (gimple_build_call_from_tree): Likewise.
13227         * gimple.h (enum gf_mask): Likewise.
13228         (gimple_call_with_bounds_p): Likewise.
13229         (gimple_call_set_with_bounds): Likewise.
13230         * gimplify.c (gimplify_init_constructor): Likewise.
13231         * ipa-cp.c (initialize_node_lattices): Likewise.
13232         (propagate_constants_across_call): Likewise.
13233         (find_more_scalar_values_for_callers_subset): Likewise.
13234         * ipa-hsa.c (process_hsa_functions): Likewise.
13235         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
13236         * ipa-icf.c (sem_function::merge): Likewise.
13237         * ipa-inline.c (early_inliner): Likewise.
13238         * ipa-pure-const.c (warn_function_noreturn): Likewise.
13239         (warn_function_cold): Likewise.
13240         (propagate_pure_const): Likewise.
13241         * ipa-ref.h (enum GTY): Likewise.
13242         * ipa-split.c (find_retbnd): Likewise.
13243         (consider_split): Likewise.
13244         (split_function): Likewise.
13245         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
13246         * ipa.c (walk_polymorphic_call_targets): Likewise.
13247         (symbol_table::remove_unreachable_nodes): Likewise.
13248         (process_references): Likewise.
13249         (cgraph_build_static_cdtor_1): Likewise.
13250         * lto-cgraph.c (lto_output_node): Likewise.
13251         (output_refs): Likewise.
13252         (compute_ltrans_boundary): Likewise.
13253         (input_overwrite_node): Likewise.
13254         (input_node): Likewise.
13255         (input_cgraph_1): Likewise.
13256         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
13257         * passes.c (pass_manager::execute_early_local_passes): Likewise.
13258         (class pass_chkp_instrumentation_passes): Likewise.
13259         (make_pass_chkp_instrumentation_passes): Likewise.
13260         * passes.def: Likewise.
13261         * rtl.h (struct GTY): Likewise.
13262         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
13263         * stor-layout.c (layout_type): Likewise.
13264         * symtab.c: Likewise.
13265         * target.def: Likewise.
13266         * targhooks.c (default_chkp_bound_type): Likewise.
13267         (default_chkp_bound_mode): Likewise.
13268         (default_builtin_chkp_function): Likewise.
13269         (default_chkp_function_value_bounds): Likewise.
13270         (default_chkp_make_bounds_constant): Likewise.
13271         (default_chkp_initialize_bounds): Likewise.
13272         * targhooks.h (default_chkp_bound_type): Likewise.
13273         (default_chkp_bound_mode): Likewise.
13274         (default_builtin_chkp_function): Likewise.
13275         (default_chkp_function_value_bounds): Likewise.
13276         (default_chkp_make_bounds_constant): Likewise.
13277         (default_chkp_initialize_bounds): Likewise.
13278         * toplev.c (compile_file): Likewise.
13279         (process_options): Likewise.
13280         * tree-core.h (DEF_BUILTIN): Likewise.
13281         (DEF_BUILTIN_CHKP): Likewise.
13282         * tree-inline.c (declare_return_variable): Likewise.
13283         (remap_gimple_stmt): Likewise.
13284         (copy_bb): Likewise.
13285         (initialize_inlined_parameters): Likewise.
13286         (expand_call_inline): Likewise.
13287         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
13288         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
13289         (make_pass_ipa_chkp_produce_thunks): Likewise.
13290         (make_pass_chkp): Likewise.
13291         (make_pass_chkp_opt): Likewise.
13292         (make_pass_chkp_instrumentation_passes): Likewise.
13293         * tree-pretty-print.c (dump_generic_node): Likewise.
13294         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
13295         * tree-ssa-dce.c (propagate_necessity): Likewise.
13296         (eliminate_unnecessary_stmts): Likewise.
13297         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
13298         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
13299         * tree-ssa-sccvn.h: Likewise.
13300         * tree-ssa-strlen.c (get_string_length): Likewise.
13301         (valid_builtin_call): Likewise.
13302         (adjust_last_stmt): Likewise.
13303         (handle_builtin_strchr): Likewise.
13304         (handle_builtin_strcpy): Likewise.
13305         (handle_builtin_stxncpy): Likewise.
13306         (handle_builtin_memcpy): Likewise.
13307         (handle_builtin_strcat): Likewise.
13308         (strlen_check_and_optimize_stmt): Likewise.
13309         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
13310         * tree-streamer-in.c: Likewise.
13311         * tree-streamer.c (record_common_node): Likewise.
13312         * tree.c (tree_code_size): Likewise.
13313         (wide_int_to_tree_1): Likewise.
13314         (type_contains_placeholder_1): Likewise.
13315         (build_common_tree_nodes): Likewise.
13316         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
13317         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
13318         (POINTER_BOUNDS_P): Likewise.
13319         (BOUNDED_TYPE_P): Likewise.
13320         (BOUNDED_P): Likewise.
13321         (CALL_WITH_BOUNDS_P): Likewise.
13322         (pointer_bounds_type_node): Likewise.
13323         * value-prof.c (gimple_ic): Likewise.
13324         * var-tracking.c (vt_add_function_parameters): Likewise.
13325         * varasm.c (make_decl_rtl): Likewise.
13326         (assemble_start_function): Likewise.
13327         (output_constant): Likewise.
13328         (maybe_assemble_visibility): Likewise.
13329         * varpool.c (ctor_for_folding): Likewise.
13330         * chkp-builtins.def: Remove.
13331         * ipa-chkp.c: Remove.
13332         * ipa-chkp.h: Remove.
13333         * rtl-chkp.c: Remove.
13334         * rtl-chkp.h: Remove.
13335         * tree-chkp-opt.c: Remove.
13336         * tree-chkp.c: Remove.
13337         * tree-chkp.h: Remove.
13339 2018-06-07  Carl Love  <cel@us.ibm.com>
13341         * config/rs6000/vsx.md (vextract_fp_from_shorth,
13342         vextract_fp_from_shortl): Add BE support.
13344 2018-06-07  Paul Koning  <ni1d@arrl.net>
13346         * compare-elim.c (try_merge_compare): Don't merge compare if
13347         address contains a side effect.
13348         (try_eliminate_compare): Likewise.
13350 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
13352         * config.gcc: Support "tremont".
13353         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
13354         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13355         PROCESSOR_TREMONT.
13356         * config/i386/i386.c (m_TREMONT): Define.
13357         (processor_target_table): Add "tremont".
13358         (PTA_TREMONT): Define.
13359         (ix86_lea_outperforms): Add TARGET_TREMONT.
13360         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
13361         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
13362         and M_INTEL_GOLDMONT_PLUS.
13363         (fold_builtin_cpu): Add "tremont".
13364         (ix86_add_stmt_cost): Add TARGET_TREMONT.
13365         (ix86_option_override_internal): Add "tremont".
13366         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
13367         (processor_type): Add PROCESSOR_TREMONT.
13368         * config/i386/x86-tune.def: Add m_TREMONT.
13369         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
13371 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13373         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
13374         symbol defined for msp430i* devices to be lower case.
13376 2018-06-07  Richard Biener  <rguenther@suse.de>
13378         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
13379         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
13380         Properly wrap signed arithmetic if overflow wraps.
13382 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
13384         PR tree-optimization/69615
13385         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
13386         of a cast from a same precision integral SSA_NAME in a bb dominated
13387         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
13388         cast to utype if rhs2 has already a compatible type.
13390 2018-06-07  Richard Biener  <rguenther@suse.de>
13392         PR tree-optimization/85935
13393         * graphite-scop-detection.c (find_params_in_bb): Analyze
13394         condition operands with respect to the correct loop.  Assert
13395         the analysis doesn't fail.
13397 2018-06-04  Carl Love  <cel@us.ibm.com>
13399         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
13400         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
13401         as it is slightly cheaper.
13402         (first_match_or_eos_index_<mode>):
13403         Calculate index using natural element order.
13404         (first_match_index_<mode>):
13405         Calculate index using natural element order.
13406         (first_match_or_eos_index_<mode>):
13407         Calculate index using natural order.
13408         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
13409         for BE and LE modes.
13410         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
13411         P9V_BUILTIN_VCLZLSBB_V16QI.
13412         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
13413         specific.
13415 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13417         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
13418         indentation and line wrap for many prototypes.  Add missing
13419         @smallexample directives around block of prototypes for vec_xl and
13420         vec_xst.
13422 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
13424         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
13425         track if we pass or return IEEE 128-bit floating point.
13426         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
13427         C++ mangling that is compatible with GCC 8.1.
13428         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
13429         (init_cumulative_args): Note if we pass or return IEEE 128-bit
13430         floating point types.
13431         (rs6000_function_arg_advance_1): Likewise.
13432         (rs6000_mangle_type): Optionally generate mangled names that match
13433         what GCC 8.1 generated for IEEE 128-bit floating point types.
13434         (rs6000_globalize_decl_name): If we have an external function that
13435         passes or returns IEEE 128-bit types, generate a weak reference
13436         from the mangled name used in GCC 8.1 to the current mangled
13437         name.
13438         (rs6000_init_builtins): Make __ibm128 use the long double type if
13439         long double is IBM extended double.  Make __float128 use the long
13440         double type if long double is IEEE 128-bit.
13442         PR target/85657
13443         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
13444         macro for __ibm128 built-in functions.
13445         (PACK_IF): Add __ibm128 pack/unpack functions.
13446         (UNPACK_IF): Likewise.
13447         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
13448         enable long double built-in functions if long double is IEEE
13449         128-bit floating point.
13450         (rs6000_invalid_builtin): Update long double built-in function
13451         error message.
13452         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
13453         functions, adjust the built-in function to use the long double
13454         built-in function if __ibm128 and long double are the same type.
13455         * doc/extend.texi (PowerPC builtins): Update documention for
13456         __builtin_{,un}pack_longdouble.  Add documentation for
13457         __builtin_{,un}pack_ibm128.
13459 2018-06-06  Jim Wilson  <jimw@sifive.com>
13461         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
13462         (struct machine_function): New field interrupt_mode.
13463         (riscv_handle_type_attribute): New function.  Add forward declaration.
13464         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
13465         (riscv_expand_epilogue): Check interrupt_mode field.
13466         (riscv_set_current_function): Check interrupt attribute args and
13467         set interrupt_mode field.
13468         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
13469         (riscv_sret, riscv_uret): New.
13470         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
13471         new arguments to interrupt attribute.
13473 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
13475         PR target/63177
13476         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
13477         Don't handle -mcpu=power8 if -mpower9-vector is also used.
13479 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13481         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
13482         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
13483         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13484         several redundant entries.
13486 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
13488         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
13489         type from "rtx" to "rtx_insn *".
13490         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
13491         for local "call_insn", removing cast.
13492         (ix86_expand_call): Likewise, introducing a "call_insn" local.
13494 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13496         PR tree-optimization/86066
13497         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
13498         for BIT_INSERT_EXPR stores.
13500 2018-06-06  Richard Biener  <rguenther@suse.de>
13502         PR tree-optimization/86062
13503         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13504         component refs ontop
13505         of to be offsetted base.
13507 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13509         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
13510         to be static and remove check on interrupt attribute name.
13512 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13514         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13515         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
13517 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
13519         PR target/79924
13520         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
13521         second argument.
13522         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
13523         Remove second argument, change how error is called.
13524         (aarch64_layout_arg): Remove second argument from
13525         aarch64_err_no_fpadvsimd call.
13526         (aarch64_init_cumulative_args): Ditto.
13527         (aarch64_gimplify_va_arg_expr): Ditto.
13528         * config/aarch64/aarch64.md (mov<mode>): Ditto.
13530 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
13532         * config/i386/i386.md (simple_return_indirect_internal): New expander.
13533         (*simple_return_indirect_internal<mode>): Rename from
13534         simple_return_indirect_internal.  Use W mode iterator.
13535         (rstorssp): New expander.
13536         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
13537         (clrssbsy): New expander.
13538         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
13540 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13542         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
13543         __typeof__.
13544         (cmse_check_pointed_object): Likewise.
13546 2018-06-05  Martin Liska  <mliska@suse.cz>
13548         PR gcov-profile/47618
13549         * doc/invoke.texi: Document how -fprofile-dir format
13550         is extended.
13552 2018-06-05  Richard Biener  <rguenther@suse.de>
13554         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
13555         removal pretend DOM info isn't available so we do not update
13556         it and only remove edges, not dominated blocks.  Actually free
13557         DOM info in case we removed something.  Remove unreachable blocks.
13558         (mfb_keep_latches): Work with either DOM info or marked backedges.
13559         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
13560         first.  Mark backedges if DOM info isn't available.
13561         (Re-)compute DOM info after cleanup_control_flow_pre.
13563 2018-06-05  Richard Biener  <rguenther@suse.de>
13565         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
13566         (locus_discrim_hasher::hash): Adjust.
13567         (locus_discrim_hasher::equal): Likewise.
13568         (next_discriminator_for_locus): Work on line directly.
13569         (same_line_p): Pass in expanded locus1 as well.
13570         (assign_discriminators): Avoid redundant location expansions.
13572 2018-06-05  Richard Biener  <rguenther@suse.de>
13574         PR tree-optimization/86046
13575         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
13576         if required after clearing TREE_ADDRESSABLE.
13578 2018-06-05  Richard Biener  <rguenther@suse.de>
13580         PR tree-optimization/86047
13581         * tree-ssa-loop.c (for_each_index): Glob handling of all
13582         decls and constants and really handle all of them.
13584 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13586         PR target/81497
13587         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
13588         qualifier_void_pointer and qualifier_const_void_pointer.
13589         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
13590         (arm_init_builtins): Handle the above.
13591         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
13592         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
13593         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
13594         void intrinsics.
13596 2018-06-05  Martin Liska  <mliska@suse.cz>
13598         * auto-profile.c (read_autofdo_file): Do not use
13599         gcov_ctr_summary struct.
13600         (afdo_callsite_hot_enough_for_early_inline): Likewise.
13601         * coverage.c (struct counts_entry): Likewise.
13602         (read_counts_file): Read just single summary entry.
13603         (get_coverage_counts): Use gcov_summary struct.
13604         * coverage.h (get_coverage_counts): Likewise.
13605         * gcov-dump.c (dump_working_sets): Likewise.
13606         (tag_summary): Dump just single summary.
13607         * gcov-io.c (gcov_write_summary): Write just histogram
13608         summary.
13609         (gcov_read_summary): Read just single summary.
13610         (compute_working_sets): Use gcov_summary struct.
13611         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
13612         of GCOV_COUNTERS_SUMMABLE.
13613         (GCOV_COUNTERS_SUMMABLE): Remove.
13614         (GCOV_FIRST_VALUE_COUNTER): Replace with
13615         GCOV_COUNTER_V_INTERVAL.
13616         (struct gcov_ctr_summary): Remove.
13617         (struct gcov_summary): Directly use fields of former
13618         gcov_ctr_summary.
13619         (compute_working_sets): Use gcov_summary struct.
13620         * gcov.c (read_count_file): Do not use ctrs fields.
13621         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
13622         struct.
13623         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
13624         struct.
13625         * profile.c: Likewise.
13626         * profile.h: Likewise.
13628 2018-06-05  Martin Liska  <mliska@suse.cz>
13630         PR gcov-profile/84846
13631         * gcov.c (output_lines): Print working directory only
13632         in intermediate format.
13634 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
13636         * config/s390/s390-builtin-types.def: Add void function type.
13637         * config/s390/s390-builtins.def: Use the function type for the
13638         tbeginc builtin.
13640 2018-06-04  Jim Wilson  <jimw@sifive.com>
13642         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
13643         to int.
13644         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
13645         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
13646         handle EH_RETURN_DATA_REGNO registers properly.
13647         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
13648         (riscv_expand_epilogue): Update comment.  Change argument name and
13649         type.  Update code to use new name and type.  Pass new args to
13650         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
13651         EXCEPTION_RETURN.
13652         * config/riscv/riscv.md (NORMAL_RETURN): New.
13653         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
13654         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
13655         (eh_return): Call gen_eh_return_internal and emit barrier.
13656         (eh_return_internal): Call riscv_expand_epilogue.
13658 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
13660         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
13661         bit_insertion field and declare can_be_merged_into method.
13662         (merged_store_group::can_be_merged_into): New method.
13663         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
13664         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
13665         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
13667 2018-06-04  Richard Biener  <rguenther@suse.de>
13669         PR tree-optimization/85955
13670         * builtins.c (fold_builtin_sincos): Convert pointers to
13671         destination to appropriate type before dereferencing.
13673 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
13675         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13677 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
13679         * expr.c (expand_expr_real_1): Force the operand into memory if
13680         its TYPE_MODE is BLKmode and if there is no integer mode for
13681         the number of bits being extracted.
13683 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13685         PR target/85832
13686         PR target/86036
13687         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13688         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13690 2018-06-04  Richard Biener  <rguenther@suse.de>
13692         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13693         (cleanup_tree_cfg_noloop): ... single caller.  Do
13694         start_recording_case_labels later.
13696 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
13698         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13699         to _IMMINTRIN_H_INCLUDED.
13700         * config/i386/pconfigintrin.h: Ditto.
13701         * config/i386/waitpkgintrin.h: Ditto.
13702         * config/i386/immintrin.h: Add includes for sgxintrin.h,
13703         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13704         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13705         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13706         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13707         waitpkgintrin.h and cldemoteintrin.h.
13709 2018-06-04  Richard Biener  <rguenther@suse.de>
13711         PR tree-optimization/86038
13712         * tracer.c (find_best_successor): Check probability for
13713         being initialized, bail out if not.
13715 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
13717         PR target/86003
13718         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13719         of bits to ignore when comparing architectures.
13721 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13723         PR tree-optimization/69615
13724         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13725         maximum or minimum of the type, try to merge it also as if
13726         range1 is + [-, x - 1] or + [x + 1, -].
13728         PR c++/86025
13729         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13731 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
13733         PR tree-optimization/86034
13734         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13735         the unsigned bitfield type in a bit insertion sequence if it does not
13736         have a larger precision than the bitfield size.
13737         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13739 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
13741         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13743 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13745         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13746         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13747         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13748         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13750 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13752         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13753         Disable -fdelete-null-pointer-checks for ELF toolchain.
13755 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13756             Kito Cheng  <kito.cheng@gmail.com>
13758         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13759         (nds32le-*-*, nds32be-*-*): Integrate checking process.
13760         (nds32*-*-*): Add glibc and uclibc conditions.
13761         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13762         (TARGET_EXCEPT_UNWIND_INFO): Define.
13763         * config/nds32/elf.h: New file.
13764         * config/nds32/linux.h: New file.
13765         * config/nds32/nds32-elf.opt: New file.
13766         * config/nds32/nds32-linux.opt: New file.
13767         * config/nds32/nds32-fp-as-gp.c
13768         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13769         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13770         TARGET_LINUX_ABI.
13771         (nds32_asm_file_end): Ditto.
13772         (nds32_print_operand): Ditto.
13773         (nds32_insert_attributes): Ditto.
13774         (nds32_init_libfuncs): New function.
13775         (TARGET_HAVE_TLS): Define.
13776         (TARGET_INIT_LIBFUNCS): Define.
13777         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13778         spec content.
13779         (TARGET_ELF): Apply different mcmodel setting.
13780         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13781         been migrated into elf.h and linux.h files.
13782         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13783         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13784         (mcmodel): The content has been migrated into nds32-elf.opt and
13785         nds32-linux.opt files.
13786         * config/nds32/t-elf: New file.
13787         * config/nds32/t-linux: New file.
13789 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13790             Shiva Chen  <shiva0217@gmail.com>
13792         * config/nds32/constants.md (unspec_volatile_element): Add
13793         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13794         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13795         optimization.
13796         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13797         (make_pass_nds32_fp_as_gp): Declare.
13798         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13799         optmization pass.
13800         (nds32_asm_function_end_prologue): Remove unused asm output.
13801         (nds32_asm_function_begin_epilogue): Remove unused asm output.
13802         (nds32_asm_file_start): Output necessary fp_as_gp information.
13803         (nds32_option_override): Adjust register usage.
13804         (nds32_expand_prologue): Consider fp_as_gp situation.
13805         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13806         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13807         (epilogue): Ditto.
13808         (return): Ditto.
13809         (simple_return): Ditto.
13810         (omit_fp_begin): Output special directive for fp_as_gp.
13811         (omit_fp_end): Output special directive for fp_as_gp.
13812         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13813         mforbid-fp-as-gp): New options.
13815 2018-06-01  Mark Wielaard  <mark@klomp.org>
13817         * dwarf2out.c (dwarf2out_finish): Remove generation of
13818         DW_AT_loclists_base.
13820 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
13822         * gimple-ssa-store-merging.c: Include gimple-fold.h.
13823         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13824         (struct merged_store_group): Add bit_insertion field.
13825         (dump_char_array): Use standard hexadecimal format.
13826         (merged_store_group::merged_store_group): Set bit_insertion to false.
13827         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
13828         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
13829         also print the mask in the dump file.
13830         (pass_store_merging::gate): Minor tweak.
13831         (imm_store_chain_info::coalesce_immediate): Fix wrong association
13832         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
13833         stores with INTEGER_CST stores.
13834         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13835         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13836         and use it throughout.  Generate bit insertion sequences if need be.
13837         (pass_store_merging::process_store): Remove redundant condition.
13838         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13840 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
13842         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13843         the 128-bit floating point types.  Fix function comment.
13845 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13847         * config/aarch64/aarch64-simd.md
13848         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13849         mnemonics.
13850         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13851         mnemonics.
13853 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13855         PR tree-optimization/85989
13856         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13857         variable.
13858         (backprop::intersect_uses): Check it when deciding whether this
13859         is a backedge reference.
13860         (backprop::process_block): Add each phi to m_visited_phis
13861         after visiting it, then clear it at the end.
13863 2018-06-01  Richard Biener  <rguenther@suse.de>
13865         * tree-vectorizer.h (vect_dr_stmt): New function.
13866         (vect_get_load_cost): Adjust.
13867         (vect_get_store_cost): Likewise.
13868         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13869         Use vect_dr_stmt instead of DR_SMTT.
13870         (vect_record_base_alignments): Likewise.
13871         (vect_calculate_target_alignment): Likewise.
13872         (vect_compute_data_ref_alignment): Likewise and make static.
13873         (vect_update_misalignment_for_peel): Likewise.
13874         (vect_verify_datarefs_alignment): Likewise.
13875         (vector_alignment_reachable_p): Likewise.
13876         (vect_get_data_access_cost): Likewise.  Pass down
13877         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13878         (vect_get_peeling_costs_all_drs): Likewise.
13879         (vect_peeling_hash_get_lowest_cost): Likewise.
13880         (vect_enhance_data_refs_alignment): Likewise.
13881         (vect_find_same_alignment_drs): Likewise.
13882         (vect_analyze_data_refs_alignment): Likewise.
13883         (vect_analyze_group_access_1): Likewise.
13884         (vect_analyze_group_access): Likewise.
13885         (vect_analyze_data_ref_access): Likewise.
13886         (vect_analyze_data_ref_accesses): Likewise.
13887         (vect_vfa_segment_size): Likewise.
13888         (vect_small_gap_p): Likewise.
13889         (vectorizable_with_step_bound_p): Likewise.
13890         (vect_prune_runtime_alias_test_list): Likewise.
13891         (vect_analyze_data_refs): Likewise.
13892         (vect_supportable_dr_alignment): Likewise.
13893         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13894         (vect_gen_prolog_loop_niters): Likewise.
13895         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13896         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13897         modify DR_STMT.
13898         (vect_recog_mask_conversion_pattern): Likewise.
13899         (vect_try_gather_scatter_pattern): Likewise.
13900         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13901         to vect_get_store_cost.
13902         (vect_get_store_cost): Get stmt_info instead of DR.
13903         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13904         (vect_get_load_cost): Get stmt_info instead of DR.
13906 2018-06-01  Richard Biener  <rguenther@suse.de>
13908         PR middle-end/86017
13909         * gimple-fold.c (var_decl_component_p): Also allow offsetted
13910         vars wrapped in MEM_REFs.
13912 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
13914         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13915         Fix subreg tests so that we only return a choice between
13916         GENERAL_REGS and FP_REGS if the original classes included both.
13918 2018-06-01  Richard Biener  <rguenther@suse.de>
13920         PR ipa/85960
13921         * tree-ssa-structalias.c (get_function_part_constraint):
13922         Handle NULL fi->decl.
13923         (find_func_aliases_for_call): Properly handle indirect
13924         fi from direct call.
13925         (find_func_clobbers): Likewise.
13926         (ipa_pta_execute): Likewise.
13927         (create_variable_info_for): For functions that are ifunc_resolver
13928         resolve to a varinfo that contains the result of the resolver call.
13929         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13930         aliases.
13932 2018-05-31  Michael Collison  <michael.collison@arm.com>
13934         * config/aarch64/aarch64.md:
13935         (*fix_to_zero_extenddfdi2): New pattern.
13936         * gcc.target/aarch64/fix_extend1.c: New testcase.
13938 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
13940         PR middle-end/78809
13941         PR middle-end/83026
13942         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13943         and BUILT_IN_STRNCMP_EQ.
13944         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13945         BUILT_IN_STRNCMP_EQ.
13946         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13947         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13948         (gimple_fold_builtin): Likewise.
13949         * tree-ssa-strlen.c (compute_string_length): New function.
13950         (determine_min_obsize): New function.
13951         (handle_builtin_string_cmp): New function to handle calls to
13952         string compare functions.
13953         (strlen_optimize_stmt): Add handling to builtin string compare
13954         calls.
13955         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13956         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13957         * tree.c (build_common_builtin_nodes): Add new defines of
13958         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13960 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
13962         PR target/85984
13963         * bb-reorder.c (pass_partition_blocks::gate): Return false for
13964         functions with naked attribute.
13966 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
13968         * config/i386/sse.md (avx_vec_concat<mode>):
13969         Substitute concat_tg_mode mode attribute with xtg_mode.
13970         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13971         (concat_tg_mode): Remove mode attribute.
13973 2018-05-31  Martin Sebor  <msebor@redhat.com>
13975         PR c/82063
13976         * calls.c (alloc_max_size): Correct a logic error/typo.
13977         Treat excessive arguments as infinite.  Warn for invalid arguments.
13978         * doc/invoke.texi (-Walloc-size-larger-than): Update.
13980 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
13982         PR target/85829
13983         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13984         and movx for Haswell.
13986 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
13987             Cesar Philippidis  <cesar@codesourcery.com>
13989         PR middle-end/85879
13990         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13991         when emitting error on private/firstprivate reductions.
13992         * omp-low.c (lower_omp_target): Avoid reference-type processing
13993         on pointers for firstprivate clause.
13995 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
13997         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13998         (st1x2): Likewise.
13999         (st1x3): Likewise.
14000         * config/aarch64/aarch64-simd.md
14001         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14002         (aarch64_ld1_x3_<mode>): Likewise
14003         (aarch64_st1x2<VALLDIF:mode>): Likewise
14004         (aarch64_st1_x2_<mode>): Likewise
14005         (aarch64_st1x3<VALLDIF:mode>): Likewise
14006         (aarch64_st1_x3_<mode>): Likewise
14007         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14008         (vld1_s8_x3): Likewise.
14009         (vld1_u16_x3): Likewise.
14010         (vld1_s16_x3): Likewise.
14011         (vld1_u32_x3): Likewise.
14012         (vld1_s32_x3): Likewise.
14013         (vld1_u64_x3): Likewise.
14014         (vld1_s64_x3): Likewise.
14015         (vld1_f16_x3): Likewise.
14016         (vld1_f32_x3): Likewise.
14017         (vld1_f64_x3): Likewise.
14018         (vld1_p8_x3): Likewise.
14019         (vld1_p16_x3): Likewise.
14020         (vld1_p64_x3): Likewise.
14021         (vld1q_u8_x3): Likewise.
14022         (vld1q_s8_x3): Likewise.
14023         (vld1q_u16_x3): Likewise.
14024         (vld1q_s16_x3): Likewise.
14025         (vld1q_u32_x3): Likewise.
14026         (vld1q_s32_x3): Likewise.
14027         (vld1q_u64_x3): Likewise.
14028         (vld1q_s64_x3): Likewise.
14029         (vld1q_f16_x3): Likewise.
14030         (vld1q_f32_x3): Likewise.
14031         (vld1q_f64_x3): Likewise.
14032         (vld1q_p8_x3): Likewise.
14033         (vld1q_p16_x3): Likewise.
14034         (vld1q_p64_x3): Likewise.
14035         (vst1_s64_x2): Likewise.
14036         (vst1_u64_x2): Likewise.
14037         (vst1_f64_x2): Likewise.
14038         (vst1_s8_x2): Likewise.
14039         (vst1_p8_x2): Likewise.
14040         (vst1_s16_x2): Likewise.
14041         (vst1_p16_x2): Likewise.
14042         (vst1_s32_x2): Likewise.
14043         (vst1_u8_x2): Likewise.
14044         (vst1_u16_x2): Likewise.
14045         (vst1_u32_x2): Likewise.
14046         (vst1_f16_x2): Likewise.
14047         (vst1_f32_x2): Likewise.
14048         (vst1_p64_x2): Likewise.
14049         (vst1q_s8_x2): Likewise.
14050         (vst1q_p8_x2): Likewise.
14051         (vst1q_s16_x2): Likewise.
14052         (vst1q_p16_x2): Likewise.
14053         (vst1q_s32_x2): Likewise.
14054         (vst1q_s64_x2): Likewise.
14055         (vst1q_u8_x2): Likewise.
14056         (vst1q_u16_x2): Likewise.
14057         (vst1q_u32_x2): Likewise.
14058         (vst1q_u64_x2): Likewise.
14059         (vst1q_f16_x2): Likewise.
14060         (vst1q_f32_x2): Likewise.
14061         (vst1q_f64_x2): Likewise.
14062         (vst1q_p64_x2): Likewise.
14063         (vst1_s64_x3): Likewise.
14064         (vst1_u64_x3): Likewise.
14065         (vst1_f64_x3): Likewise.
14066         (vst1_s8_x3): Likewise.
14067         (vst1_p8_x3): Likewise.
14068         (vst1_s16_x3): Likewise.
14069         (vst1_p16_x3): Likewise.
14070         (vst1_s32_x3): Likewise.
14071         (vst1_u8_x3): Likewise.
14072         (vst1_u16_x3): Likewise.
14073         (vst1_u32_x3): Likewise.
14074         (vst1_f16_x3): Likewise.
14075         (vst1_f32_x3): Likewise.
14076         (vst1_p64_x3): Likewise.
14077         (vst1q_s8_x3): Likewise.
14078         (vst1q_p8_x3): Likewise.
14079         (vst1q_s16_x3): Likewise.
14080         (vst1q_p16_x3): Likewise.
14081         (vst1q_s32_x3): Likewise.
14082         (vst1q_s64_x3): Likewise.
14083         (vst1q_u8_x3): Likewise.
14084         (vst1q_u16_x3): Likewise.
14085         (vst1q_u32_x3): Likewise.
14086         (vst1q_u64_x3): Likewise.
14087         (vst1q_f16_x3): Likewise.
14088         (vst1q_f32_x3): Likewise.
14089         (vst1q_f64_x3): Likewise.
14090         (vst1q_p64_x3): Likewise.
14092 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14094         * config/msp430/msp430.c (msp430_output_labelref): Prepend
14095         user_label_prefix to name.
14097         * tree-core.h: Update comment about the format of NAME string
14098         passed to handler in attribute_spec.
14100         * config/msp430/msp430.md: Remove erroneous subreg expression from
14101         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14102         zero_extend{q,h}isi2.
14104 2018-05-30  Borislav Petkov  <bp@suse.de>
14106         * doc/extend.texi: Document some architecture specific
14107         constraints and sort entries.
14109 2018-05-30  Martin Sebor  <msebor@redhat.com>
14111         PR middle-end/85369
14112         * builtins.c (expand_builtin_stpcpy_1): New function.
14113         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14114         only if the former succeeds.
14116 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14118         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14119         in saphira.
14121 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14123         * doc/invoke.texi (-flinker-output): Document
14125 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14127         * passes.c (ipa_write_summaries): Only modify statements if body
14128         is in memory.
14129         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14130         incrementally linking.
14131         (ipa_passes): Likewise.
14132         * lto-cgraph.c (lto_output_node): When incrementally linking do not
14133         pass down resolution info.
14134         * common.opt (flag_incremental_link): Update info.
14135         * gcc.c (plugin specs): Turn flinker-output=* to
14136         -plugin-opt=-linker-output-known
14137         * toplev.c (compile_file): Also cut compilation when doing incremental
14138         link.
14139         * flag-types. (enum lto_partition_model): Add
14140         LTO_LINKER_OUTPUT_NOLTOREL.
14141         (invoke.texi): Add -flinker-output docs.
14142         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14143         link same way as WPA; do not stream in dead initializers.
14145         * dwarf2out.c (dwarf2out_die_ref_for_decl,
14146         darf2out_register_external_decl): Support incremental link.
14148 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14150         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14152 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14154         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14155         it down to simple_object_copy_lto_debug_sections.
14156         (run_gcc): Determine incremental LTO link time and configure
14157         lto1 into non-wpa mode, disable renaming of debug sections.
14159 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14161         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14162         descriptions of various incorrectly documented functions.
14164 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14166         Revert:
14167         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14168         address check not strict.
14170 2018-05-30  Richard Biener  <rguenther@suse.de>
14172         PR tree-optimization/85964
14173         * tracer.c (better_p): Drop initialized count check, we only
14174         call the function with initialized counts now.
14175         (find_best_successor): Do find a best edge if one
14176         has uninitialized count.
14177         (find_best_predecessor): Likewise.  Do BB frequency check only
14178         if count is initialized.
14180 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
14182         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14183         (aarch64_ldrstr_offset_compare): New.
14184         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14185         load/store orderings.
14186         (aarch64_gen_adjusted_ldpstp): Likewise.
14188 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
14190         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14191         Check for subset of GENERAL_REGS and FP_REGS.
14192         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14193         r=w alternative.
14195 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
14197         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14198         and wi::to_poly_offset.  Add the current offset and then check
14199         whether the sum fits, rather than using an unchecked addition of
14200         a checked term.  Check for a shwi rather than a uhwi.
14201         * expr.c (get_bit_range): Use tree_to_poly_uint64.
14202         (store_constructor): Use poly_int_tree_p.
14203         (expand_expr_real_1): Likewise.
14204         * function.c (assign_temp): Likewise.
14205         * fold-const.c (const_binop): Use poly_int_tree_p and
14206         wi::to_poly_offset.
14207         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
14208         division.
14209         * ipa-icf-gimple.c (func_checker::compare_operand): Use
14210         to_poly_offset for MEM offsets.
14211         * ipa-icf.c (sem_variable::equals): Likewise.
14212         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14213         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14214         wi::to_poly_offset for BIT_FIELD_REF offsets.
14215         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14216         wi::to_poly_offset.
14217         * var-tracking.c (emit_note_insn_var_location): Use
14218         tree_to_poly_uint64.
14220 2018-05-29  Jim Wilson  <jimw@sifive.com>
14222         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14224 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
14226         PR target/85950
14227         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
14228         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
14229         sequence.
14230         (sse4_1_round<mode>2): Use nonimmediate_operand
14231         for operand 1 predicate.
14233 2018-05-29  Martin Sebor  <msebor@redhat.com>
14234             Richard Biener  <rguenther@suse.de>
14236         PR testsuite/85888
14237         * calls.c (get_size_range): Call determine_value_range instead
14238         of get_value_range..
14239         * tree-vrp.h (determine_value_range): Declared new function.
14240         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
14242 2018-05-29  Richard Biener  <rguenther@suse.de>
14244         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
14245         sure to use non-pattern stmts for get_earlier_stmt arguments.
14246         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
14247         called on pattern stmts.
14248         (get_later_stmt): Likewise.
14250 2018-05-29  Martin Liska  <mliska@suse.cz>
14252         PR gcov-profile/85759
14253         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
14254         env variables.
14256 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
14258         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
14259         VEC_UNPACK_*_EXPR.
14260         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
14261         VEC_PACK_*_EXPR.
14263         PR target/85918
14264         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14265         VEC_PACK_FLOAT_EXPR): New tree codes.
14266         * tree-pretty-print.c (op_code_prio): Handle
14267         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14268         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14269         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14270         * tree-inline.c (estimate_operator_cost): Likewise.
14271         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
14272         * fold-const.c (const_binop): Likewise.
14273         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
14274         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14275         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14276         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
14277         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14278         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14279         * expr.c (expand_expr_real_2): Likewise.
14280         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
14281         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
14282         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
14283         optabs.
14284         * optabs.c (expand_widen_pattern_expr): For
14285         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
14286         sign from result type rather than operand's type.
14287         (expand_binop_directly): For vec_packu_float_optab and
14288         vec_packs_float_optab allow result type to be different from operand's
14289         type.
14290         * optabs-tree.c (optab_for_tree_code): Handle
14291         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14292         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
14293         * tree-vect-generic.c (expand_vector_operations_1):  Handle
14294         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14295         VEC_PACK_FLOAT_EXPR.
14296         * tree-vect-stmts.c (supportable_widening_operation): Handle
14297         FIX_TRUNC_EXPR.
14298         (supportable_narrowing_operation): Handle FLOAT_EXPR.
14299         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
14300         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
14301         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
14302         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
14303         mode attributes.
14304         (vec_pack<floatprefix>_float_<mode>): New expander.
14305         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
14306         attributes.
14307         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
14308         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
14309         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
14310         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
14311         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
14312         Document.
14313         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
14314         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
14315         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14316         VEC_PACK_FLOAT_EXPR): Document.
14318 2018-05-29  Richard Biener  <rguenther@suse.de>
14320         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
14321         member.
14322         (stmt_vec_info_vec): Make pointer.
14323         (init_stmt_vec_info_vec): Remove.
14324         (free_stmt_vec_info_vec): Likewise.
14325         (set_stmt_vec_info_vec): New function.
14326         (free_stmt_vec_infos): Likewise.
14327         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
14328         (set_vinfo_for_stmt): Likewise.
14329         (get_earlier_stmt): Likewise.
14330         (get_later_stmt): Likewise.
14331         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
14332         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
14333         (vec_info::~vec_info): Free stmt_vec_infos.
14334         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
14335         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
14336         (pass_slp_vectorize::execute): Likewise.
14337         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
14338         (free_stmt_vec_info_vec): Likewise.
14339         (set_stmt_vec_info_vec): New function.
14340         (free_stmt_vec_infos): Likewise.
14341         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
14342         the global stmt_vec_info_vec.
14343         * tree-parloops.c (gather_scalar_reductions): Use
14344         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
14345         vector.
14347 2018-05-29  Richard Biener  <rguenther@suse.de>
14349         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
14351 2018-05-29  Martin Liska  <mliska@suse.cz>
14352             David Malcolm  <dmalcolm@redhat.com>
14354         * vec.c (test_reverse): New.
14355         (vec_c_tests): Add new test.
14356         * vec.h (vl_ptr>::reverse): New function.
14358 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
14360         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
14362         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
14363         and later.
14365 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14367         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
14369 2018-05-28  Richard Biener  <rguenther@suse.de>
14371         PR tree-optimization/85933
14372         * tree-vect-data-refs.c (vect_record_base_alignments): Only
14373         look at stmts marked as vectorizable.
14375 2018-05-28  Richard Biener  <rguenther@suse.de>
14377         PR tree-optimization/85934
14378         * tree-vect-generic.c (expand_vector_operations_1): Hoist
14379         vector boolean check before scalar optimization.
14381 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
14383         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
14384         for armv5te.
14386 2018-05-28  Mark Wielaard  <mark@klomp.org>
14388         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
14389         if it is an expression containing a minus sign.
14391 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
14393         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
14395 2018-05-27  Paul Koning  <ni1d@arrl.net>
14397         * config/pdp11/pdp11.md (truncsihi2): Remove.
14399 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
14400             Chung-Ju Wu  <jasonwucj@gmail.com>
14402         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
14403         implementation.
14404         (unaligned_store_dw): Ditto.
14405         * config/nds32/nds32-memory-manipulation.c
14406         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
14407         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
14408         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
14409         (emit_setmem_word_loop): Rename to ...
14410         (emit_setmem_doubleword_loop): ... this.
14411         (nds32_gen_dup_4_byte_to_word_value): New function.
14412         (nds32_gen_dup_8_byte_to_double_word_value): New function.
14413         (nds32_expand_setmem_loop): Refine implementation.
14414         (nds32_expand_setmem_loop_v3m): Ditto.
14415         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
14416         pattern.
14418 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14420         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
14422 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14424         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
14425         (nds32_init_machine_status): Initialize machine->attr_naked_p and
14426         machine->attr_no_prologue_p.
14427         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
14428         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
14429         (nds32_expand_epilogue): Consider attr_naked_p.
14430         (nds32_expand_epilogue_v3pop): Likewise.
14431         (nds32_can_use_return_insn): Likewise.
14432         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
14433         attr_no_prologue_p fields.
14434         * config/nds32/nds32.opt (mret-in-naked-func): New option.
14436 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
14438         PR target/85918
14439         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
14440         attributes.
14441         * config/i386/sse.md
14442         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
14443         Rename to ...
14444         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
14445         ... this.
14446         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
14447         Rename to ...
14448         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
14449         ... this.
14450         (*<floatsuffix>floatv2div2sf2): Rename to ...
14451         (*float<floatunssuffix>v2div2sf2): ... this.
14452         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
14453         (float<floatunssuffix>v2div2sf2_mask): ... this.
14454         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
14455         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
14456         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
14457         to ...
14458         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
14459         ... this.
14460         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14461         Rename to ...
14462         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14463         ... this.
14464         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14465         Rename to ...
14466         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14467         ... this.
14468         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
14469         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
14470         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
14471         gen_ufix_truncv8dfv8si2.
14472         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
14473         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
14474         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
14475         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
14476         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
14477         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
14478         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
14479         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
14481 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14483         PR target/85900
14484         PR target/85345
14485         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
14487 2018-05-25  Jim Wilson  <jimw@sifive.com>
14489         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
14490         * config/riscv/riscv.c (struct machine_function): Add
14491         interrupt_handler_p and attribute_checked_p fields.
14492         (riscv_attribute_table): Add interrupt.
14493         (riscv_interrupt_type_p): New.
14494         (riscv_save_reg_p): Save extra regs for interrupt handler.
14495         (riscv_use_save_libcall): Return false  for interrupt handler.
14496         (riscv_first_stack_step): Add forward declaration.
14497         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
14498         for interrupt handler with large frame.  Use it for saved reg list.
14499         (riscv_expand_prologue): Move flag_stack_usage_info support to
14500         eliminate duplication.
14501         (riscv_expand_epilogue): Generate mret for interrupt handler.
14502         (riscv_epilogue_uses): New.
14503         (riscv_can_use_return_insn): Return false for interrupt handler.
14504         (riscv_function_ok_for_sibcall): Likewise.
14505         (riscv_set_current_function): Add interrupt handler support.
14506         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
14507         * config/riscv/riscv.md (UNSPECV_MRET): New.
14508         (GP_REGNUM): New.
14509         (riscv_frflags, riscv_fsflags): Use tab after opcode.
14510         (riscv_mret): New.
14511         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
14513 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
14515         PR tree-optimization/85712
14516         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
14517         this candidate has already been replaced in-situ by a copy.
14519 2018-05-25  Jason Merrill  <jason@redhat.com>
14521         PR c++/80485 - inline function non-zero address.
14522         * symtab.c (nonzero_address): Check DECL_COMDAT.
14524 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
14526         PR target/83628
14527         * config/alpha/alpha.md (ashlsi3): New insn pattern.
14528         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
14529         extension of SImode operation.  Use const123_operand predicate.
14530         (*saddsi_1): Remove.
14531         (*saddl_se_1): Ditto.
14532         (*ssubsi_1): Ditto.
14533         (*ssubl_se_1): Ditto.
14534         * config/alpha/predicates.md (const123_operand): New predicate.
14535         * config/alpha/constraints.md (P): Use IN_RANGE.
14537 2018-05-25  Richard Biener  <rguenther@suse.de>
14539         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
14540         defaulted to true.
14541         (ref_maybe_used_by_stmt_p): Likewise.
14542         (stmt_may_clobber_ref_p): Likewise.
14543         (stmt_may_clobber_ref_p_1): Likewise.
14544         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
14545         and pass it along.
14546         (ref_maybe_used_by_stmt_p): Likewise.
14547         (stmt_may_clobber_ref_p): Likewise.
14548         (stmt_may_clobber_ref_p_1): Likewise.
14549         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14550         the alias oracle to disambiguate DRs with stmts DR analysis
14551         couldn't handle.
14552         (vect_analyze_data_refs): Do not give up on not analyzable
14553         DRs for BB vectorization.  Remove code truncating the dataref
14554         vector.
14556 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
14558         PR target/85832
14559         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14560         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
14561         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
14563 2018-05-25  Richard Biener  <rguenther@suse.de>
14565         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
14566         function, combining stmt data ref gathering and fatal analysis
14567         parts.
14568         (vect_analyze_data_refs): Remove now redudnant code and simplify.
14569         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
14570         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
14571         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
14572         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
14574 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14576         PR tree-optimization/85720
14577         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
14578         SCC if all partitions are builtins.
14579         (version_loop_by_alias_check): New parameter.  Generate cancelable
14580         runtime alias check if all partitions are builtins.
14581         (distribute_loop): Update call to above function.
14583 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14585         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
14586         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
14587         (parm_default_def_partition_arg): Ditto.
14588         (set_parm_default_def_partition): Ditto.
14589         (get_parm_default_def_partitions): Ditto and make it static.
14590         (get_undefined_value_partitions): Ditto and make it static.
14591         (remove_ssa_form): Refactor call to init_var_map here.
14592         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
14593         computation for loop region.
14594         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
14595         (register_default_def): Delete.
14596         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
14597         (parm_default_def_partition_arg): Ditto.
14598         (set_parm_default_def_partition): Ditto.
14599         (get_parm_default_def_partitions): Ditto and make it static.
14600         (get_undefined_value_partitions): Ditto and make it static.
14601         (coalesce_with_default, coalesce_with_default): Update comment.
14602         (create_coalesce_list_for_region): New func factored out from
14603         create_outofssa_var_map.
14604         (populate_coalesce_list_for_outofssa): New func factored out from
14605         create_outofssa_var_map and coalesce_ssa_name.
14606         (create_outofssa_var_map): Delete.
14607         (coalesce_ssa_name): Refactor to support live range computation.
14608         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
14609         (get_parm_default_def_partitions): Delete.
14610         (get_undefined_value_partitions): Ditto.
14611         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
14612         computation for loop region.
14613         (new_tree_live_info, loe_visit_block): Ditto.
14614         (live_worklist, set_var_live_on_entry): Ditto.
14615         (calculate_live_on_exit, verify_live_on_entry): Ditto.
14616         * tree-ssa-live.h (struct _var_map): New fields.
14617         (init_var_map): Change decl.
14618         (region_contains_p): New.
14620 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14622         * tree-ssa-live.h (live_merge_and_clear): Delete.
14624 2018-05-25  Richard Biener  <rguenther@suse.de>
14626         PR c++/85912
14627         * tree-dump.c (dequeue_and_dump): Remove access to removed
14628         operand 2 of a SWITCH_EXPR.
14630 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14632         * doc/sourcebuild.texi (vect_double_cond_arith): Include
14633         multiplication and division.
14634         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
14635         (cond_udiv@var{m}, cond_umod@var{m}): Document.
14636         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
14637         (cond_udiv_optab, cond_umod_optab): New optabs.
14638         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
14639         (IFN_COND_RDIV): New internal functions.
14640         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
14641         TRUNC_MOD_EXPR and RDIV_EXPR.
14642         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14643         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
14644         New unspecs.
14645         (SVE_INT_BINARY): Include mult.
14646         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
14647         (optab, sve_int_op): Handle mult.
14648         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
14649         UNSPEC_COND_DIV.
14650         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
14651         for SVE_INT_BINARY_SD.
14653 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14655         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
14656         (optab, sve_int_op): Handle div and udiv.
14657         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
14658         for SVE_INT_BINARY_SD.
14659         (*<optab><mode>3): New insn for the same.
14661 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14663         * tree-vect-patterns.c: Include predict.h.
14664         (vect_recog_divmod_pattern): Restrict check for division support
14665         to when optimizing for size.
14667 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14669         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14670         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14671         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14672         (gimple_match_op::set_op): Likewise.
14673         (gimple_resimplify4): Declare.
14674         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14675         (expr::gen_transform): Likewise.
14676         (decision_tree::gen): Generate a simplification routine for 4 operands.
14677         * gimple-match-head.c (gimple_simplify): Add an overload for
14678         4 operands.  In the top-level function, handle up to 4 call
14679         arguments and call gimple_resimplify4.
14680         (gimple_resimplify4): New function.
14681         (build_call_internal): Pass a fourth operand.
14682         (maybe_push_to_seq): Likewise.
14683         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14684         Fold VEC_COND_EXPRs of an operation and a default value into
14685         an IFN_COND_* function if possible.
14686         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14687         New unspecs.
14688         (SVE_COND_FP_BINARY): Include them.
14689         (optab, sve_fp_op): Handle them.
14690         (SVE_INT_BINARY_REV): New code iterator.
14691         (SVE_COND_FP_BINARY_REV): New int iterator.
14692         (commutative): New int attribute.
14693         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14694         Declare.
14695         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14696         function.
14697         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14698         (*cond_<optab><mode>): New patterns for reversed operands.
14700 2018-05-25  Richard Biener  <rguenther@suse.de>
14702         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14703         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14704         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14705         (STMT_VINFO_GROUPED_ACCESS): Adjust.
14706         * tree-vect-data-refs.c (everywhere): Adjust users.
14707         * tree-vect-loop.c (everywhere): Likewise.
14708         * tree-vect-slp.c (everywhere): Likewise.
14709         * tree-vect-stmts.c (everywhere): Likewise.
14710         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14712 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14714         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14715         Rename to...
14716         (gcc_cv_as_section_exclude): ... this.
14717         Try Solaris as #exclude syntax.
14718         * configure: Regenerate.
14719         * config.in: Regenerate.
14720         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14721         SECTION_EXCLUDE.
14722         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14723         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14725         * varasm.c (default_elf_asm_named_section): Don't check if
14726         HAVE_GAS_SECTION_EXCLUDE is defined.
14728 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14730         * doc/md.texi: Update the documentation of the cond_* optabs
14731         to mention the new final operand.  Fix GET_MODE_NUNITS call.
14732         Describe the scalar case too.
14733         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14734         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14735         instead of 2.
14736         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14737         (get_conditional_internal_fn): Update comment.
14738         * tree-vect-loop.c (vectorizable_reduction): Pass the original
14739         accumulator value as a final argument to conditional functions.
14740         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14741         a define_expand and add an "else" operand.  Assert for now that
14742         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
14743         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14744         (*cond_<optab><mode>): New patterns.
14745         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14746         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14747         (UNSPEC_COND_EOR): Delete.
14748         (optab): Remove associated mappings.
14749         (SVE_INT_BINARY): New code iterator.
14750         (sve_int_op): Remove int attribute and add "minus" to the code
14751         attribute.
14752         (SVE_COND_INT_OP): Delete.
14753         (SVE_COND_FP_OP): Rename to...
14754         (SVE_COND_FP_BINARY): ...this.
14756 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14758         * optabs.c (can_reuse_operands_p): New function.
14759         (maybe_legitimize_operands): Try to reuse the results for
14760         earlier operands.
14762 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14764         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14765         Add {q} suffix to insn mnemonic.
14767 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14769         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14770         (msp430_warn_func_return): New.
14772 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
14774         * fold-const.c (tree_nonzero_bits): New function.
14775         * fold-const.h (tree_nonzero_bits): Likewise.
14776         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14777         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14779 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14781         PR target/85900
14782         PR target/85345
14783         * varasm.c (assemble_alias): Check ifunc_resolver only on
14784         FUNCTION_DECL.
14786 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14788         PR target/85903
14789         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14790         when memory input operand is handled.
14792 2018-05-24  Luis Machado  <luis.machado@linaro.org>
14794         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14795         global.
14796         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14798 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14800         * match.pd: Delay FMA folds until after vectorization.
14802 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14804         PR target/83009
14805         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14806         address check not strict.
14808 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14810         * gimple-match.h (gimple_match_op): New class.
14811         (mprts_hook): Replace parameters with a gimple_match_op *.
14812         (maybe_build_generic_op): Likewise.
14813         (gimple_simplified_result_is_gimple_val): Replace parameters with
14814         a const gimple_match_op *.
14815         (gimple_simplify): Replace code_helper * and tree * parameters with
14816         a gimple_match_op * parameter.
14817         (gimple_resimplify1): Replace code_helper *, tree and tree *
14818         parameters with a gimple_match_op * parameter.
14819         (gimple_resimplify2): Likewise.
14820         (gimple_resimplify3): Likewise.
14821         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14822         parameters with a gimple_match_op * parameter.
14823         * gimple-match-head.c (gimple_simplify): Change prototypes of
14824         auto-generated functions to take a gimple_match_op * instead of
14825         separate code_helper * and tree * parameters.  Make the same
14826         change in the top-level overload and update calls to the
14827         gimple_resimplify routines.  Update calls to the auto-generated
14828         functions and to maybe_push_res_to_seq in the publicly-facing
14829         operation-specific gimple_simplify overloads.
14830         (gimple_match_op::MAX_NUM_OPS): Define.
14831         (gimple_resimplify1): Replace rcode and ops with a single res_op
14832         parameter.  Update call to gimple_simplify.
14833         (gimple_resimplify2): Likewise.
14834         (gimple_resimplify3): Likewise.
14835         (mprts_hook): Replace parameters with a gimple_match_op *.
14836         (maybe_build_generic_op): Likewise.
14837         (build_call_internal): Replace type, nargs and ops with
14838         a gimple_match_op *.
14839         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14840         with a single gimple_match_op *.  Update calls to mprts_hook,
14841         build_call_internal and gimple_simplified_result_is_gimple_val.
14842         Factor out code that is common to the tree_code and combined_fn cases.
14843         * genmatch.c (expr::gen_transform): Replace tem_code and
14844         tem_ops with a gimple_match_op called tem_op.  Update calls
14845         to the gimple_resimplify functions and maybe_push_res_to_seq.
14846         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14847         res_ops.  Update call to the gimple_resimplify functions.
14848         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14849         (decision_tree::gen): Make the functions take a gimple_match_op *
14850         called res_op instead of separate res_code and res_ops parameters.
14851         Update call accordingly.
14852         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14853         and ops with a single res_op parameter.  Update calls to
14854         maybe_build_generic_op and maybe_push_res_to_seq.
14855         (fold_stmt_1): Update calls to gimple_simplify and
14856         replace_stmt_with_simplification.
14857         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14858         and gimple_simplified_result_is_gimple_val.
14859         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14860         gimple_simplify.
14861         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14862         with a gimple_match_op *.
14863         (vn_nary_build_or_lookup): Likewise.  Update call to
14864         vn_nary_build_or_lookup_1.
14865         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14866         gimple_match_op *.  Update calls to the gimple_resimplify routines
14867         and to gimple_simplified_result_is_gimple_val.
14868         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14869         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14870         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14871         (visit_nary_op): Likewise.
14872         (visit_reference_op_load): Likewise.
14874 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14876         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14877         modifier for printing the step amount.
14879 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
14881         PR target/78849
14882         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14883         types.
14885 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
14887         * doc/sourcebuild.texi (Endianness): New subsubsection.
14889 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14891         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14892         <prefetch_dynamic_strides>: New const bool field.
14893         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14894         prefetch_dynamic_strides.
14895         (exynosm1_prefetch_tune): Likewise.
14896         (thunderxt88_prefetch_tune): Likewise.
14897         (thunderx_prefetch_tune): Likewise.
14898         (thunderx2t99_prefetch_tune): Likewise.
14899         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14900         false.
14901         (aarch64_override_options_internal): Update to set
14902         PARAM_PREFETCH_DYNAMIC_STRIDES.
14903         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14904         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14905         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14906         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14907         prefetch-dynamic-strides setting.
14909 2018-05-23  Luis Machado  <luis.machado@linaro.org>
14911         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14912         <minimum_stride>: New const int field.
14913         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14914         minimum_stride field defaulting to -1.
14915         (exynosm1_prefetch_tune): Likewise.
14916         (thunderxt88_prefetch_tune): Likewise.
14917         (thunderx_prefetch_tune): Likewise.
14918         (thunderx2t99_prefetch_tune): Likewise.
14919         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14920         <default_opt_level>: Set to 3.
14921         (aarch64_override_options_internal): Update to set
14922         PARAM_PREFETCH_MINIMUM_STRIDE.
14923         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14924         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14925         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14926         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14927         stride is constant and is below the minimum stride threshold.
14929 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14931         * config/arm/arm-cpus.in (mode26): Delete.
14932         (armv4): Delete mode26 reference.
14933         * config/arm/arm.c (arm_configure_build_target): Delete use of
14934         isa_bit_mode26.
14936 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14938         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14939         New insn pattern.
14940         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14941         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
14942         for non-SSE modes.
14943         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
14944         (floatunsdidf2): Ditto.
14946 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
14948         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14949         (fixuns_trunc<mode>si2_avx512f): Ditto.
14950         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14951         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14952         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14954 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14956         PR rtl-optimization/79985
14957         * df-scan.c (df_insn_refs_collect): Remove special case for
14958         global registers and asm statements.
14960 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
14962         * extend.texi (Global Register Variables): Rewrite the bullet list.
14963         Note that the register is available for allocation. Note that access
14964         via inline asm must use constraints. Add note about async-signal
14965         handlers. Remove paragraph about automagic register selection.
14967 2018-05-23  Richard Biener  <rguenther@suse.de>
14969         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14970         of fixed offset from memset VN.
14972 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
14974         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14975         first_interp field.
14976         (alloc_cand_and_find_basis): Initialize first_interp field.
14977         (slsr_process_mul): Modify first_interp field.
14978         (slsr_process_add): Likewise.
14979         (slsr_process_cast): Modify first_interp field for each new
14980         interpretation.
14981         (slsr_process_copy): Likewise.
14982         (dump_candidate): Dump first_interp field.
14983         (replace_mult_candidate): Process all interpretations, not just
14984         subsequent ones.
14985         (replace_rhs_if_not_dup): Likewise.
14986         (replace_one_candidate): Likewise.
14988 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
14990         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14991         Add new boolean.
14992         (aarch64_needs_frame_chain): New function.
14993         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14995 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
14997         PR target/84882
14998         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14999         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15000         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15001         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15002         as true for strict-align.
15003         (aarch64_can_inline_p): Perform checks even when callee has no
15004         attributes to check for strict alignment.
15005         * doc/extend.texi (AArch64 Function Attributes): Document
15006         no-strict-align.
15007         * doc/invoke.texi: (AArch64 Options): Likewise.
15009 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
15011         PR tree-optimization/85853
15012         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15013         the handling of the root of the node to...
15014         (vect_slp_analyze_node_operations_1): ...this new function,
15015         and run the whole thing with the child nodes' def types
15016         set according to their SLP node's def type.
15018 2018-05-23  Richard Biener  <rguenther@suse.de>
15020         PR middle-end/85874
15021         * tree-data-ref.c (create_runtime_alias_checks): Defer
15022         and ignore overflow warnings.
15024 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
15026         PR tree-optimization/85822
15027         * tree-vrp.c (is_masked_range_test): Fix handling of negative
15028         constants.
15030 2018-05-23  Richard Biener  <rguenther@suse.de>
15032         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15033         memset constants via native_interpret_expr.
15035 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
15037         PR target/85345
15038         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15039         attribute.
15040         (cgraph_node::create_alias): Likewise.
15041         (cgraph_node::get_availability): Check ifunc_resolver instead
15042         of looking up ifunc attribute.
15043         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15044         * varasm.c (do_assemble_alias): Likewise.
15045         (assemble_alias): Likewise.
15046         (default_binds_local_p_3): Likewise.
15047         * cgraph.h (cgraph_node): Add ifunc_resolver.
15048         (cgraph_node::only_called_directly_or_aliased_p): Return false
15049         for IFUNC resolver.
15050         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15051         attribute.
15052         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15053         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15054         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15055         instead of looking up ifunc attribute.
15057 2018-05-22  Luis Machado  <luis.machado@linaro.org>
15059         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15061 2018-05-22  Martin Sebor  <msebor@redhat.com>
15063         PR middle-end/85359
15064         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15065         only when expasion succeeds.
15066         (expand_builtin_strcmp): Same.
15067         (expand_builtin_strncmp): Same.
15069 2018-05-22  Martin Sebor  <msebor@redhat.com>
15071         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15073 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15074             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15076         * config/aarch64/aarch64-ldpstp.md: Replace uses of
15077         aarch64_mem_pair_operand with memory_operand and delete operand swapping
15078         code.
15079         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15080         Add check for legitimate_address.
15081         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15082         (aarch64_swap_ldrstr_operands): New.
15083         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15084         Define prototype.
15086 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15087             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15089         * config/aarch64/aarch64.md: New patterns to generate stp
15090         and ldp.
15091         (store_pair_sw, store_pair_dw): New patterns to generate stp for
15092         single words and double words.
15093         (load_pair_sw, load_pair_dw): Likewise.
15094         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15095         Delete.
15096         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15097         Delete.
15098         * config/aarch64/aarch64-ldpstp.md: Modify peephole
15099         for different mode ldpstp and add peephole for merged zero stores.
15100         Likewise for loads.
15101         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15102         Add size check.
15103         (aarch64_gen_store_pair): Rename calls to match new patterns.
15104         (aarch64_gen_load_pair): Rename calls to match new patterns.
15105         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15106         (load_pair<DREG:mode><DREG2:mode>): ... This.
15107         (store_pair<mode>): Rename to...
15108         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15109         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15110         New mode iterators.
15111         (V_INT_EQUIV): Handle SImode.
15112         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15113         New predicate.
15115 2018-05-22  Martin Sebor  <msebor@redhat.com>
15117         PR c/85623
15118         * calls.c (maybe_warn_nonstring_arg): Use string length to set
15119         or ajust the presumed bound on an operation to avoid unnecessary
15120         warnings.
15122 2018-05-22  Martin Sebor  <msebor@redhat.com>
15124         PR tree-optimization/85826
15125         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15126         assuming that a DECL necesarily has a constant size.
15128 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
15130         PR middle-end/85862
15131         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15133 2018-05-22  Richard Biener  <rguenther@suse.de>
15135         PR tree-optimization/85834
15136         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15137         non-constant and non-zero memset arguments.
15139 2018-05-22  Martin Liska  <mliska@suse.cz>
15141         PR ipa/85607
15142         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15144 2018-05-22  Richard Biener  <rguenther@suse.de>
15146         PR tree-optimization/85863
15147         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15148         comparisons when vectype is specified.
15149         (vectorizable_condition): Do not specify vectype for
15150         vect_is_simple_cond when SLP vectorizing.
15152 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
15154         PR target/85657
15155         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15156         define __ibm128 as long double.
15157         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15158         as a distinct type when IEEE 128-bit support is enabled.
15159         (init_float128_ieee): Fix up conversions between IFmode and IEEE
15160         128-bit types to use the correct functions.
15161         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15162         convert between 128-bit floating point types that have different
15163         modes but the same representation, instead of using gen_lowpart to
15164         makean alias.
15165         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15166         KFmode.
15167         (IFKF_reg): New attributes to give the register constraints for
15168         IFmode and KFmode.
15169         (extend<mode>tf2_internal): New insns to mark an explicit
15170         conversion between 128-bit floating point types that have a
15171         different mode but share the same representation.
15173 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
15175         PR tree-optimization/85814
15176         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15177         a null return from get_strinfo when unsharing the next
15178         strinfo in the chain.
15180 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
15182         PR gcc/84923
15183         * varasm.c (weak_finish): Clean up weak_decls.
15185 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15187         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15188         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15189         UNSPEC_UADALP values.
15190         * config/aarch64/iterators.md (ABAL): New int iterator.
15191         (ABDL2): Likewise.
15192         (ADALP): Likewise.
15193         (sur): Add mappings for the above.
15194         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15195         New define_insn.
15196         (aarch64_<sur>abal<mode>_4): Likewise.
15197         (aarch64_<sur>adalp<mode>_3): Likewise.
15198         (<sur>sadv16qi): New define_expand.
15200 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
15202         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15203         (*movdf_internal): Ditto.
15204         (*rcpsf2_sse): Ditto.
15205         (*rsqrtsf2_sse): Ditto.
15206         (*sqrt<mode>2_sse): Ditto.
15208 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
15210         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15211         eor3q<mode>4.
15212         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15213         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15214         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15215         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15216         vbcaxq_s64): New.
15217         * config/aarch64/arm_neon.h: Likewise.
15218         * config/aarch64/iterators.md (VQ_I): New.
15220 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
15222         * config.gcc: Add arc/t-multilib-linux to tmake_file for
15223         arc*-*-linux*.
15224         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
15225         MULTILIB_DIRNAMES
15227 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15229         * config/nds32/constraints.md (S): New constraint.
15230         * config/nds32/nds32.md (call_internal): Use constraint S.
15231         (call_value_internal): Likewise.
15232         (sibcall_internal): Likewise.
15233         (sibcall_value_internal): Likewise.
15235 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15236             Chung-Ju Wu  <jasonwucj@gmail.com>
15238         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
15239         into consideration.
15241 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15242             Chung-Ju Wu  <jasonwucj@gmail.com>
15244         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
15245         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
15246         (nds32_rtx_costs_impl): Simplify.
15247         (nds32_address_cost_impl): Simplify.
15248         (nds32_init_rtx_costs): New function.
15249         (nds32_rtx_costs_speed_prefer): Likewise.
15250         (nds32_rtx_costs_size_prefer): Likewise.
15251         (nds32_address_cost_speed_prefer): Likewise.
15252         (nds32_address_cost_speed_fwprop): Likewise.
15253         (nds32_address_cost_size_prefer): Likewise.
15254         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
15255         * config/nds32/nds32.c (nds32_option_override): Use
15256         nds32_init_rtx_costs function.
15258 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15260         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
15261         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
15262         (TARGET_PIPELINE_N8): Likewise.
15263         (TARGET_PIPELINE_N10): Likewise.
15264         (TARGET_PIPELINE_N13): Likewise.
15265         (TARGET_PIPELINE_GRAYWOLF): Likewise.
15267 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
15269         * config/nds32/nds32-fpu.md: Update copyright year.
15271 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15273         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
15275 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15277         * config/nds32/nds32.c
15278         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
15279         * config/nds32/nds32.opt (minline-asm-r15): New option.
15281 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15283         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
15284         MASK_HW_ABS.
15285         * config/nds32/nds32.md (abssi2): New pattern.
15287 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
15289         * config/i386/i386.md (rex64namesuffix): New mode attribute.
15290         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
15291         Merge insn pattern from sse_cvtsi2ss<round_name> and
15292         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
15293         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
15294         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
15295         using SWI48 mode iterator.
15296         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
15297         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
15298         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
15299         pattern from sse_cvttss2si<round_saeonly_name>
15300         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
15301         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
15302         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
15303         using SWI48 mode iterator.
15304         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
15305         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
15306         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
15307         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
15308         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
15309         using SWI48 mode iterator.
15310         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
15311         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
15312         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
15313         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
15314         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
15315         SWI48 mode iterator.
15316         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
15317         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
15318         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
15319         pattern from sse_cvttsd2si<round_saeonly_name>
15320         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
15322 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15324         * config/nds32/nds32-md-auxiliary.c
15325         (nds32_valid_smw_lwm_base_p): Refine.
15326         (nds32_output_smw_single_word): Refine.
15327         (nds32_output_smw_double_word): New.
15328         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
15330 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15332         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
15333         (nds32_output_stack_pop): Refine.
15334         (nds32_expand_unaligned_load): Refine.
15335         (nds32_expand_unaligned_store): Refine.
15337 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
15338             Chung-Ju Wu  <jasonwucj@gmail.com>
15340         * config/nds32/constants.md: Add TP_REGNUM constant.
15341         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
15342         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
15343         UNSPEC_ADD32.
15344         * config/nds32/nds32-doubleword.md: Consider flag_pic.
15345         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
15346         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
15347         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
15348         and PIC code generation.
15349         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
15350         code generation.
15351         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
15352         optimization.
15353         * config/nds32/nds32.md: Support TLS and PIC.
15354         * config/nds32/nds32.c: Support TLS and PIC.
15355         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
15356         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
15357         predicate.
15359 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15361         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
15362         mode with E_ prefix.
15364 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
15365             Chung-Ju Wu  <jasonwucj@gmail.com>
15367         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
15368         * config/nds32/nds32-md-auxiliary.c
15369         (symbolic_reference_mentioned_p): New.
15370         (nds32_legitimize_ict_address): New.
15371         (nds32_expand_ict_move): New.
15372         (nds32_indirect_call_referenced_p): New.
15373         (nds32_symbol_binds_local_p): Delete.
15374         (nds32_long_call_p): Modify.
15375         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
15376         * config/nds32/nds32-protos.h
15377         (symbolic_reference_mentioned_p): Declare.
15378         (nds32_legitimize_ict_address): Declare.
15379         (nds32_expand_ict_move): Declare.
15380         (nds32_indirect_call_referenced_p): Declare.
15381         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
15382         (nds32_relax_group): Use nds32_ict_const_p as condition.
15383         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
15384         (nds32_asm_file_start): Output ict_model directive in asm code.
15385         (nds32_legitimate_address_p): Consider indirect call.
15386         (nds32_print_operand): Consider indirect call.
15387         (nds32_print_operand_address): Consider indirect call.
15388         (nds32_insert_attributes): Handle "indirect_call" attribute.
15389         (TARGET_LEGITIMATE_ADDRESS_P): Define.
15390         (TARGET_LEGITIMATE_CONSTANT_P): Define.
15391         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
15392         (TARGET_DELEGITIMIZE_ADDRESS): Define.
15393         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
15394         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
15395         (TARGET_ICT_MODEL_SMALL): Define.
15396         (TARGET_ICT_MODEL_LARGE): Define.
15397         * config/nds32/nds32.md (movsi): Consider ict model.
15398         (call, call_value): Consider ict model.
15399         (sibcall, sibcall_value): Consider ict model.
15400         * config/nds32/nds32.opt (mict-model): New option.
15401         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
15402         model.
15404 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
15405             Monk Chiang  <sh.chiang04@gmail.com>
15406             Jim Wilson <jimw@sifive.com>
15408         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
15409         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
15410         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
15411         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
15412         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
15413         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
15414         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
15415         compute save_libcall_adjustment properly.
15416         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
15417         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
15418         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
15419         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
15420         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
15421         (ABI_SPEC): Handle mabi=ilp32e.
15422         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
15423         (RVE): Add RVE mask.
15424         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
15425         <-march>: Add rv32e as an example.
15427 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
15429         PR c++/82899
15430         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
15431         (intra_create_variable_infos): Handle C++ constructors.
15433 2018-05-18  Martin Liska  <mliska@suse.cz>
15435         * passes.def: Remove a redundant pass.
15437 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
15439         PR bootstrap/85838
15440         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
15442 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15444         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
15445         (ARMv4): Update.
15446         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
15447         (ARMv6m): Update.
15448         (armv2, armv2a, armv3, armv3m): Delete architectures.
15449         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
15450         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
15451         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
15452         Delete cpus.
15453         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
15454         (*mulsidi3adddi): Likewise.
15455         (mulsidi3): Likewise.
15456         (*mulsidi3_nov6): Likewise.
15457         (umulsidi3): Likewise.
15458         (umulsidi3_nov6): Likewise.
15459         (umaddsidi4): Likewise.
15460         (*umulsidi3adddi): Likewise.
15461         (smulsi3_highpart): Likewise.
15462         (*smulsi3_highpart_nov6): Likewise.
15463         (umulsi3_highpart): Likewise.
15464         (*umulsi3_highpart_nov6): Likewise.
15465         * config/arm/arm.h (arm_arch3m): Delete.
15466         * config/arm/arm.c (arm_arch3m): Delete.
15467         (arm_option_override_internal): Update armv3-related comment.
15468         (arm_configure_build_target): Delete use of isa_bit_mode32.
15469         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
15470         (arm_rtx_costs_internal): Delete check of arm_arch3m.
15471         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
15472         (mulsa3): Likewise.
15473         (mulusa3): Likewise.
15474         * config/arm/arm-protos.h (arm_arch3m): Delete.
15475         * config/arm/arm-tables.opt: Regenerate.
15476         * config/arm/arm-tune.md: Likewise.
15477         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
15478         deleted architectures.
15480 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15482         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
15483         (armv5t, armv5te): New features.
15484         (ARMv5, ARMv5e): Delete fgroups.
15485         (ARMv5t, ARMv5te): Adjust for above changes.
15486         (ARMv6m): Likewise.
15487         (armv5, armv5e): Delete arches.
15488         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
15489         arm_arch5.
15490         (*call_reg_arm): Likewise.
15491         (*call_value_reg_armv5): Likewise.
15492         (*call_value_reg_arm): Likewise.
15493         (*call_symbol): Likewise.
15494         (*call_value_symbol): Likewise.
15495         (*sibcall_insn): Likewise.
15496         (*sibcall_value_insn): Likewise.
15497         (clzsi2): Likewise.
15498         (prefetch): Likewise.
15499         (define_split and define_peephole2 dependent on arm_arch5):
15500         Likewise.
15501         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
15502         arm_arch5e.
15503         (TARGET_ARM_QBIT): Likewise.
15504         (TARGET_DSP_MULTIPLY): Likewise.
15505         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
15506         (arm_arch5, arm_arch5e): Delete.
15507         (arm_arch5t, arm_arch5te): Declare.
15508         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
15509         (arm_arch5t): Declare.
15510         (arm_option_reconfigure_globals): Update for the above.
15511         (arm_options_perform_arch_sanity_checks): Update comment, replace
15512         use of arm_arch5 with arm_arch5t.
15513         (use_return_insn): Likewise.
15514         (arm_emit_call_insn): Likewise.
15515         (output_return_instruction): Likewise.
15516         (arm_final_prescan_insn): Likewise.
15517         (arm_coproc_builtin_available): Likewise.
15518         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
15519         arm_arch5e with arm_arch5t and arm_arch5te.
15520         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
15521         (arm_arch5t, arm_arch5te): Declare.
15522         * config/arm/arm-tables.opt: Regenerate.
15523         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
15524         * config/arm/t-multilib: Likewise.
15525         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
15526         instead of arm_arch5.
15527         (*call_reg_thumb1): Likewise.
15528         (*call_value_reg_thumb1_v5): Likewise.
15529         (*call_value_reg_thumb1): Likewise.
15530         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
15531         unreachable path.
15532         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
15534 2018-05-18  Martin Liska  <mliska@suse.cz>
15536         PR gcov-profile/84846
15537         * doc/gcov.texi: Document -t option of gcov tool.
15539 2018-05-18  Martin Liska  <mliska@suse.cz>
15541         PR gcov-profile/84846
15542         * gcov.c (print_usage): Add new -t option.
15543         (process_args): Handle the option.
15544         (generate_results): Use stdout as output when requested by
15545         the option.
15547 2018-05-18  Martin Liska  <mliska@suse.cz>
15549         PR gcov-profile/84846
15550         * coverage.c (coverage_init): Write PWD to .gcno file.
15551         * doc/gcov.texi: Document how working directory is printed.
15552         * gcov-dump.c (dump_gcov_file): Print PWD.
15553         * gcov.c (output_intermediate_file): Likewise.
15554         (read_graph_file): Read PWD string.
15555         (output_lines): Print PWD.
15557 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15559         PR middle-end/85817
15560         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
15561         for retval and return false if all args to phi are zero.
15563 2018-05-18  Richard Biener  <rguenther@suse.de>
15565         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
15566         method.
15567         (evrp_dom_walker::before_dom_children): Call it.
15569 2018-05-18  Richard Biener  <rguenther@suse.de>
15571         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
15572         results when processing array refs with variable index.
15574 2018-05-18  Toon Moene  <toon@moene.org>
15576         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
15577         directly after that of -floop-interchange. Indicate that both
15578         options are enabled by default when specifying -O3.
15580 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15582         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
15583         iterator.  Delete separate integer-mode vec_set<mode> expander.
15584         (aarch64_simd_vec_setv2di): Delete.
15585         (vec_setv2di): Delete.
15586         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
15587         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
15588         the "w, r" alternative.
15590 2018-05-18  Martin Liska  <mliska@suse.cz>
15592         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
15593         * tree-pass.h (make_pass_lower_switch_O0): New function.
15594         * tree-switch-conversion.c (node_has_low_bound): Remove.
15595         (node_has_high_bound): Likewise.
15596         (node_is_bounded): Likewise.
15597         (class pass_lower_switch): Make it a template type and create
15598         two instances.
15599         (pass_lower_switch::execute): Add template argument.
15600         (make_pass_lower_switch): New function.
15601         (make_pass_lower_switch_O0): New function.
15602         (do_jump_if_equal): Remove.
15603         (emit_case_nodes): Simplify to just handle all 3 cases and leave
15604         all the hard work to tree optimization passes.
15606 2018-05-18  Martin Liska  <mliska@suse.cz>
15608         * dbgcnt.c (limit_low): Renamed from limit.
15609         (limit_high): New variable.
15610         (dbg_cnt_is_enabled): Check for upper limit.
15611         (dbg_cnt): Adjust dumping.
15612         (dbg_cnt_set_limit_by_index): Add new argument for high
15613         value.
15614         (dbg_cnt_set_limit_by_name): Likewise.
15615         (dbg_cnt_process_single_pair): Parse new format.
15616         (dbg_cnt_process_opt): Use strtok.
15617         (dbg_cnt_list_all_counters): Remove 'value' and add
15618         'limit_high'.
15619         * doc/invoke.texi: Document changes.
15621 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
15623         * doc/sourcebuild.texi (scalar_all_fma): Document.
15624         * tree.def (FMA_EXPR): Delete.
15625         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
15626         * internal-fn.c (ternary_direct): New macro.
15627         (expand_ternary_optab_fn): Likewise.
15628         (direct_ternary_optab_supported_p): Likewise.
15629         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
15630         * builtins.c (fold_builtin_fma): Delete.
15631         (fold_builtin_3): Don't call it.
15632         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
15633         * expr.c (expand_expr_real_2): Likewise.
15634         * fold-const.c (operand_equal_p): Likewise.
15635         (fold_ternary_loc): Likewise.
15636         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
15637         * gimple.c (DEFTREECODE): Likewise.
15638         * gimplify.c (gimplify_expr): Likewise.
15639         * optabs-tree.c (optab_for_tree_code): Likewise.
15640         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15641         * tree-eh.c (operation_could_trap_p): Likewise.
15642         (stmt_could_throw_1_p): Likewise.
15643         * tree-inline.c (estimate_operator_cost): Likewise.
15644         * tree-pretty-print.c (dump_generic_node): Likewise.
15645         (op_code_prio): Likewise.
15646         * tree-ssa-loop-im.c (stmt_cost): Likewise.
15647         * tree-ssa-operands.c (get_expr_operands): Likewise.
15648         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
15649         * fold-const-call.h (fold_fma): Delete.
15650         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
15651         CFN_FNMA and CFN_FNMS.
15652         (fold_fma): Delete.
15653         * genmatch.c (combined_fn): New enum.
15654         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
15655         (commutative_op): New function.
15656         (commutate): Use it.  Handle more than 2 operands.
15657         (dt_operand::gen_gimple_expr): Use commutative_op.
15658         (parser::parse_expr): Allow :c to be used with non-binary
15659         operators if the commutative operand is known.
15660         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
15661         CFN_FMS, CFN_FNMA and CFN_FNMS.
15662         (backprop::process_assign_use): Remove FMA_EXPR handling.
15663         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
15664         (gen_hsa_fma): New function.
15665         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
15666         IFN_FNMA and IFN_FNMS.
15667         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
15668         * gimple-fold.h (follow_all_ssa_edges): Declare.
15669         * gimple-fold.c (follow_all_ssa_edges): New function.
15670         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15671         gimple_build interface and use follow_all_ssa_edges to fold the result.
15672         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15673         instead of checking for optabs directly.
15674         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15675         rather than FMA_EXPRs.
15676         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15677         call to IFN_FMA instead of an FMA_EXPR.
15679 2018-05-17  Jim Wilson  <jimw@sifive.com>
15681         * expr.c (do_tablejump): When converting index to Pmode, if we have a
15682         sign extended promoted subreg, and the range does not have the sign bit
15683         set, then do a sign extend.
15685         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15686         test, check for sign extended subreg and/or constant operands, and
15687         do a sign extend in that case.
15689 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
15691         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15692         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15693         Add untyped.
15694         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15695         Change logics_shift_reg to logics_shift_imm.
15696         (thunderx2t99_fp_loadpair_basic): Delete.
15697         (thunderx2t99_fp_storepair_basic): Delete.
15698         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15699         (thunderx2t99_asimd_polynomial): Delete.
15700         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15701         and neon_fp_mul_d_scalar_q.
15702         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15703         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15704         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15705         (thunderx2t99_asimd_lut): Add missing tbl types.
15706         (thunderx2t99_asimd_ext): Delete.
15707         (thunderx2t99_asimd_load1_1_mult): Delete.
15708         (thunderx2t99_asimd_load1_2_mult): Delete.
15709         (thunderx2t99_asimd_load1_ldp): New.
15710         (thunderx2t99_asimd_load1): New.
15711         (thunderx2t99_asimd_load2): Add missing *load2* types.
15712         (thunderx2t99_asimd_load3): New.
15713         (thunderx2t99_asimd_load4): New.
15714         (thunderx2t99_asimd_store1_1_mult): Delete.
15715         (thunderx2t99_asimd_store1_2_mult): Delete.
15716         (thunderx2t99_asimd_store2_mult): Delete.
15717         (thunderx2t99_asimd_store2_onelane): Delete.
15718         (thunderx2t99_asimd_store_stp): New.
15719         (thunderx2t99_asimd_store1): New.
15720         (thunderx2t99_asimd_store2): New.
15721         (thunderx2t99_asimd_store3): New.
15722         (thunderx2t99_asimd_store4): New.
15724 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
15726         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15727         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
15729 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
15730             Segher Boessenkool  <segher@kernel.crashing.org>
15732         PR target/85698
15733         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15734         operand.
15736 2018-05-17  Richard Biener  <rguenther@suse.de>
15738         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15739         for pruning loop and prune defs feeding only already visited PHIs.
15741 2018-05-17  Richard Biener  <rguenther@suse.de>
15743         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15745 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
15746             Richard Biener  <rguenther@suse.de>
15748         PR tree-optimization/85793
15749         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15750         for VMAT_ELEMENTWISE.
15752 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15754         * internal-fn.h (lookup_internal_fn): Declare
15755         * internal-fn.c (lookup_internal_fn): New function.
15756         * gimple.c (gimple_build_call_from_tree): Handle calls to
15757         internal functions.
15758         * gimple-pretty-print.c (dump_gimple_call): Print "." before
15759         internal function names.
15760         * tree-pretty-print.c (dump_generic_node): Likewise.
15761         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15763 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15765         * gimple-fold.h (gimple_build): Make the function forms take
15766         combined_fn rather than built_in_function.
15767         (gimple_simplify): Likewise.
15768         * gimple-match-head.c (gimple_simplify): Likewise.
15769         * gimple-fold.c (gimple_build): Likewise.
15770         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15771         rather than gimple_build_call_internal.
15772         (get_initial_defs_for_reduction): Likewise.
15773         (vect_create_epilog_for_reduction): Likewise.
15774         (vectorizable_live_operation): Likewise.
15776 2018-05-17  Martin Liska  <mliska@suse.cz>
15778         * gimple-ssa-sprintf.c (format_directive): Do not use
15779         space in between 'G_' and '('.
15781 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
15783         PR target/85323
15784         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15785         even if the mask is not all ones.
15787         PR target/85323
15788         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15789         vector.
15790         (ix86_gimple_fold_builtin): Likewise.
15792         PR target/85323
15793         * config/i386/i386.c: Include tree-vector-builder.h.
15794         (ix86_vector_shift_count): New function.
15795         (ix86_fold_builtin): Fold shift builtins by scalar count.
15796         (ix86_gimple_fold_builtin): Likewise.
15798         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15799         _mm512_setzero): New intrinsics.
15801 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
15802             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15804         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15805         code generation for cases where splatting a value is not useful.
15806         * simplify-rtx.c (simplify_ternary_operation): Simplify
15807         vec_merge across a vec_duplicate and a paradoxical subreg forming
15808         a vector mode to a vec_concat.
15810 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
15812         * config.gcc: Support "goldmont-plus".
15813         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15814         "goldmont-plus".
15815         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15816         PROCESSOR_GOLDMONT_PLUS.
15817         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15818         (processor_target_table): Add "goldmont-plus".
15819         (PTA_GOLDMONT_PLUS): Define.
15820         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15821         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15822         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15823         (fold_builtin_cpu): Add "goldmont-plus".
15824         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15825         (ix86_option_override_internal): Add "goldmont-plus".
15826         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15827         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15828         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15829         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15831 2018-05-17  Richard Biener  <rguenther@suse.de>
15833         PR tree-optimization/85757
15834         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15835         remove defs that only feed that PHI from further processing.
15837 2018-05-16  Jim Wilson  <jimw@sifive.com>
15839         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15840         asterisk to name.
15841         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15843 2018-05-16  Mark Wielaard  <mark@klomp.org>
15845         * dwarf2out.c (count_index_strings): New function.
15846         (output_indirect_strings): Call count_index_strings and generate
15847         header for dwarf_version >= 5.
15849 2018-05-16  Mark Wielaard  <mark@klomp.org>
15851         * dwarf2out.c (dwarf_FORM): New function.
15852         (set_indirect_string): Use dwarf_FORM.
15853         (reset_indirect_string): Likewise.
15854         (size_of_die): Likewise.
15855         (value_format): Likewise.
15856         (output_die): Likewise.
15857         (add_skeleton_AT_string): Likewise.
15858         (output_macinfo_op): Likewise.
15859         (index_string): Likewise.
15860         (output_index_string_offset): Likewise.
15861         (output_index_string): Likewise.
15862         (count_index_strings): Likewise.
15864 2018-05-16  Carl Love  <cel@us.ibm.com>
15866         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15867         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15869 2018-05-16  Martin Jambor  <mjambor@suse.cz>
15871         * ipa-prop.c (ipa_free_all_edge_args): Remove.
15872         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15874 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
15876         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15877         (fnma<mode>4): Likewise.
15878         (fms<mode>4): Likewise.
15879         (fnms<mode>4): Likewise.
15880         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15881         (aarch64_fnma<mode>4): Likewise.
15882         (aarch64_fms<mode>4): Likewise.
15883         (aarch64_fnms<mode>4): Likewise.
15884         (aarch64_fnmadd<mode>4): Likewise.
15886 2018-05-16  Jason Merrill  <jason@redhat.com>
15888         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
15890 2018-05-16  Richard Biener  <rguenther@suse.de>
15892         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15893         (dump_stmt_cost): Declare.
15894         (add_stmt_cost): Dump cost we add.
15895         (add_stmt_costs): New function.
15896         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15897         No longer exported.
15898         (vect_analyze_stmt): Adjust prototype.
15899         (vectorizable_condition): Likewise.
15900         (vectorizable_live_operation): Likewise.
15901         (vectorizable_reduction): Likewise.
15902         (vectorizable_induction): Likewise.
15903         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15904         cost vector to pass to vectorizable_ and record afterwards.
15905         (vect_model_reduction_cost): Take cost vector argument and adjust.
15906         (vect_model_induction_cost): Likewise.
15907         (vectorizable_reduction): Likewise.
15908         (vectorizable_induction): Likewise.
15909         (vectorizable_live_operation): Likewise.
15910         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15911         SLP_TREE_NUMBER_OF_VEC_STMTS.
15912         (vect_analyze_slp_cost_1): Remove.
15913         (vect_analyze_slp_cost): Likewise.
15914         (vect_slp_analyze_node_operations): Take visited args and
15915         a target cost vector.  Avoid processing already visited stmt sets.
15916         (vect_slp_analyze_operations): Use a local cost vector to gather
15917         costs and register those of non-discarded instances.
15918         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15919         (vect_schedule_slp_instance): Remove copying of
15920         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
15921         zero.
15922         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15923         adding cost.  Record cost entry location.
15924         (vect_prologue_cost_for_slp_op): Function to compute cost of
15925         a constant or invariant generated for SLP vect in the prologue,
15926         split out from vect_analyze_slp_cost_1.
15927         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
15928         (vect_model_promotion_demotion_cost): Likewise.
15929         (vect_model_store_cost): Likewise, make static.
15930         (vect_model_load_cost): Likewise.
15931         (vectorizable_bswap): Add cost vector arg and adjust.
15932         (vectorizable_call): Likewise.
15933         (vectorizable_simd_clone_call): Likewise.
15934         (vectorizable_conversion): Likewise.
15935         (vectorizable_assignment): Likewise.
15936         (vectorizable_shift): Likewise.
15937         (vectorizable_operation): Likewise.
15938         (vectorizable_store): Likewise.
15939         (vectorizable_load): Likewise.
15940         (vectorizable_condition): Likewise.
15941         (vectorizable_comparison): Likewise.
15942         (can_vectorize_live_stmts): Likewise.
15943         (vect_analyze_stmt): Likewise.
15944         (vect_transform_stmt): Adjust calls to vectorizable_*.
15945         * tree-vectorizer.c: Include gimple-pretty-print.h.
15946         (dump_stmt_cost): New function.
15948 2018-05-16  Richard Biener  <rguenther@suse.de>
15950         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15951         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15952         * tree-ssa-dse.c: Include tree-ssa-loop.h.
15953         (check_name): New callback.
15954         (dse_classify_store): Track cycles via a visited bitmap of PHI
15955         defs and simplify handling of in-loop and across loop dead stores
15956         and properly fail for loop-variant refs.  Handle byte-tracking with
15957         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15958         limiting the walk.
15960 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
15962         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15963         (vect_get_mask_type_for_stmt): Likewise.
15964         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15965         split out from...
15966         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
15967         to determine the statement's vector type and the vector type that
15968         should be used for calculating nunits.  Deal with cases in which
15969         the type has to be deferred.
15970         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15971         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15972         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15973         (vect_determine_vf_for_stmt): New functions, split out from...
15974         (vect_determine_vectorization_factor): ...here.
15975         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15976         (vect_get_mask_type_for_stmt): New functions, split out from
15977         vect_determine_vectorization_factor.
15979 2018-05-16  Richard Biener  <rguenther@suse.de>
15981         * tree-cfg.c (verify_gimple_assign_ternary): Properly
15982         verify the [VEC_]COND_EXPR embedded comparison.
15984 2018-05-15  Martin Sebor  <msebor@redhat.com>
15986         PR tree-optimization/85753
15987         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15988         RECORD_TYPE in addition to ARRAY_TYPE.
15990 2018-05-15  Martin Sebor  <msebor@redhat.com>
15992         PR middle-end/85643
15993         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15995 2018-05-15  Richard Biener  <rguenther@suse.de>
15997         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15998         add by_clobber_p one.  Change algorithm to collect all defs
15999         representing uses we need to walk and try reducing them to
16000         a single one before failing.
16001         (dse_dom_walker::dse_optimize_stmt): Adjust.
16003 2018-05-13  Mark Wielaard  <mark@klomp.org>
16005         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16006         (size_of_loc_descr): Likewise.
16007         (output_loc_operands): Likewise.
16008         (output_loc_operands_raw): Likewise.
16009         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16010         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16011         (hash_loc_operands): Likewise.
16012         (compare_loc_operands): Likewise.
16014 2018-05-14  Mark Wielaard  <mark@klomp.org>
16016         * dwarf2out.c (count_index_addrs): New function.
16017         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16019 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16021         PR tree-optimization/83648
16022         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16023         return value as malloc candidate.
16025 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16027         PR ipa/85734
16028         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16029         param as true in call to suggest_attribute.
16031 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
16033         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16034         -mreadonly-in-sdata.
16036 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16038         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16039         New pattern.
16040         (aarch64_crypto_aesd_fused): Likewise.
16042 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
16044         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16045         (movsi_aarch64): Likewise.
16046         (load_pairsi): Likewise.
16047         (load_pairdi): Likewise.
16048         (store_pairsi): Likewise.
16049         (store_pairdi): Likewise.
16050         (load_pairsf): Likewise.
16051         (load_pairdf): Likewise.
16052         (store_pairsf): Likewise.
16053         (store_pairdf): Likewise.
16054         (zero_extend): Likewise.
16055         (trunc): Swap alternatives.
16056         (fcvt_target): Add '?' to prefer w over r.
16058 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
16060         PR target/85756
16061         * config/i386/i386.md: Disallow non-commutative arithmetics in
16062         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16063         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
16064         in the peephole2 before it.
16066 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
16068         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16069         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16070         (ix86_handle_option): Handle -mcldemote.
16071         * config.gcc: New header.
16072         * config/i386/cldemoteintrin.h: New file.
16073         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16074         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16075         -mcldemote.
16076         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16077         OPTION_MASK_ISA_CLDEMOTE.
16078         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16079         (ix86_valid_target_attribute_inner_p): Ditto.
16080         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16081         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16082         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16083         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16084         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16085         (cldemote): New.
16086         * config/i386/i386.opt: Add -mcldemote.
16087         * config/i386/x86intrin.h: New header.
16088         * doc/invoke.texi: Add -mcldemote.
16090 2018-05-14  Richard Biener  <rguenther@suse.de>
16092         * doc/match-and-simplify.texi: Adjust :s documentation.
16094 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
16096         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16097         intended memcpy size.
16098         (REORDER_45): Likewise.
16100 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
16102         * sort.cc: New file.
16103         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16104         * vec.c (qsort_chk): Use gcc_qsort.
16105         * Makefile.in (OBJS-libcommon): Add sort.o.
16106         (build/sort.o): New target.  Use it...
16107         (BUILD_RTL): ... here, and...
16108         (build/gencfn-macros): ... here, and...
16109         (build/genmatch): ... here.
16111 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16112             Chung-Ju Wu  <jasonwucj@gmail.com>
16114         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16115         * config/nds32/nds32-graywolf.md: New file.
16116         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16117         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16118         pipeline.
16119         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16120         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16121         * config/nds32/nds32.md (pipeline_model): Add graywolf.
16122         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16123         * config/nds32/pipelines.md: Include n15 settings.
16125 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16126             Chung-Ju Wu  <jasonwucj@gmail.com>
16128         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16129         * config/nds32/nds32-n13.md: New file.
16130         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16131         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16132         pipeline.
16133         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16134         * config/nds32/nds32.md (pipeline_model): Add n13.
16135         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16136         * config/nds32/pipelines.md: Include n13 settings.
16138 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16139             Chung-Ju Wu  <jasonwucj@gmail.com>
16141         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16142         * config/nds32/nds32-n10.md: New file.
16143         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16144         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16145         pipeline.
16146         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16147         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16148         * config/nds32/nds32.md (pipeline_model): Add n10.
16149         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16150         * config/nds32/pipelines.md: Include n10 settings.
16152 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
16153             Kito Cheng  <kito.cheng@gmail.com>
16154             Chung-Ju Wu  <jasonwucj@gmail.com>
16156         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16157         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16158         Add enum values for DSP extension instructions.
16159         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16160         New constraints.
16161         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16162         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16163         New code iterators.
16164         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16165         * config/nds32/nds32-dspext.md: New file for DSP implementation.
16166         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16167         * config/nds32/nds32-intrinsic.md: Likewise.
16168         * config/nds32/nds32_intrinsic.h: Likewise.
16169         * config/nds32/nds32-md-auxiliary.c: Likewise.
16170         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16171         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16172         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16173         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16174         * config/nds32/nds32-protos.h: New declarations for DSP extension.
16175         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16176         TYPE_DMAC in switch statement.
16177         * config/nds32/nds32.c: New checking and implementation for DSP
16178         extension instructions.
16179         * config/nds32/nds32.h: Likewise.
16180         * config/nds32/nds32.md: Likewise.
16181         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16182         * config/nds32/predicates.md: Implement new predicates for DSP
16183         extension.
16185 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16187         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16188         Reformat alternatives and attributes so it is easier to identify
16189         which constraints/attributes go with which instruction.
16190         (mov<mode>_hardfloat32, FMOVE64): Likewise.
16191         (mov<mode>_softfloat32, FMOVE64): Likewise.
16192         (mov<mode>_hardfloat64, FMOVE64): Likewise.
16193         (mov<mode>_softfloat64, FMOVE64): Likewise.
16195 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16197         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16198         subsection.
16199         (Basic PowerPC Built-in Functions): The new name of the
16200         subsection previously known as "PowerPC Built-in Functions".
16201         (Basic PowerPC Built-in Functions Available on all Configurations):
16202         New subsubsection.
16203         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16204         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16205         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16206         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16208 2018-05-11  Martin Jambor  <mjambor@suse.cz>
16210         PR ipa/85655
16211         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16212         single const.
16214 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16216         PR target/85733
16217         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16219 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
16221         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16222         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16223         (ix86_handle_option): Handle -mwaitpkg.
16224         * config.gcc: New header.
16225         * config/i386/cpuid.h (bit_WAITPKG): New bit.
16226         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
16227         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
16228         function type.
16229         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16230         OPTION_MASK_ISA_WAITPKG.
16231         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
16232         (ix86_option_override_internal): Add PTA_WAITPKG.
16233         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
16234         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
16235         IX86_BUILTIN_TPAUSE.
16236         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
16237         __builtin_ia32_umwait and __builtin_ia32_tpause.
16238         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
16239         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
16240         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
16241         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
16242         UNSPECV_TPAUSE): New.
16243         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
16244         * config/i386/i386.opt: Add -mwaitpkg.
16245         * config/i386/waitpkgintrin.h: New file.
16246         * config/i386/x86intrin.h: New header.
16247         * doc/invoke.texi: Add -mwaitpkg.
16249 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16251         PR target/85606
16252         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
16253         equivalent.
16254         (cortex-m0): Use armv6s-m isa.
16255         (cortex-m0plus): Likewise.
16256         (cortex-m1): Likewise.
16257         (cortex-m0.small-multiply): Likewise.
16258         (cortex-m0plus.small-multiply): Likewise.
16259         (cortex-m1.small-multiply): Likewise.
16261 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
16262             Jakub Jelinek  <jakub@redhat.com>
16264         PR tree-optimization/85692
16265         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
16266         source permute as well.
16268 2018-05-11  Martin Liska  <mliska@suse.cz>
16270         PR sanitizer/85556
16271         * doc/extend.texi: Document LLVM style format for no_sanitize
16272         attribute.
16274 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
16276         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
16277         mode_supports_vsx_dform_quad to mode_supports_dq_form.
16278         (mode_supports_vsx_dform_quad): Likewise.
16279         (mode_supports_vmx_dform): Move these functions to be next to the
16280         other mode_supports functions.
16281         (mode_supports_dq_form): Likewise.
16282         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
16283         mode_supports_dq_form.
16284         (reg_offset_addressing_ok_p): Likewise.
16285         (offsettable_ok_by_alignment): Likewise.
16286         (rs6000_legitimate_offset_address_p): Likewise.
16287         (legitimate_lo_sum_address_p): Likewise.
16288         (rs6000_legitimize_address): Likewise.
16289         (rs6000_legitimize_reload_address): Likewise.
16290         (rs6000_secondary_reload_inner): Likewise.
16291         (rs6000_preferred_reload_class): Likewise.
16292         (rs6000_output_move_128bit): Likewise.
16294 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16296         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
16297         Generate SImode target register for null target.
16298         <case IX86_BUILTIN_XGETBV>: Ditto.
16299         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
16300         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
16302 2018-05-10  Carl Love  <cel@us.ibm.com>
16304         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16305         dcbtt and dcbtstt if operands[2] is 0.
16307 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16309         PR target/85693
16310         * config/i386/sse.md (usadv64qi): New expander.
16312 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
16314         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
16315         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
16316         -maltivec=be support.
16317         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
16318         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
16319         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
16320         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
16321         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
16322         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
16323         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
16324         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
16325         altivec_vsumsws): Adjust.
16326         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
16327         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
16328         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
16329         support.
16330         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
16331         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
16332         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
16333         (altivec_lve<VI_char>x): Delete expand.
16334         (*altivec_lve<VI_char>x_internal): Rename to...
16335         (altivec_lve<VI_char>x): ... this.
16336         (altivec_lvxl_<mode>): Delete expand.
16337         (*altivec_lvxl_<mode>_internal): Rename to ...
16338         (altivec_lvxl_<mode>): ... this.
16339         (altivec_stvxl_<mode>): Delete expand.
16340         (*altivec_stvxl_<mode>_internal): Rename to ...
16341         (altivec_stvxl_<mode>): ... this.
16342         (altivec_stve<VI_char>x): Delete expand.
16343         (*altivec_stve<VI_char>x_internal): Rename to ...
16344         (altivec_stve<VI_char>x): ... this.
16345         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
16346         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
16347         reduc_plus_scal_<mode>): Adjust.
16348         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
16349         comment.
16350         (rs6000_cpu_cpp_builtins): Adjust.
16351         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
16352         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
16353         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
16354         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
16355         -maltivec=be support.
16356         (rs6000_split_vec_extract_var): Adjust.
16357         (rs6000_split_v4si_init): Adjust.
16358         (swap_selector_for_mode): Delete.
16359         (altivec_expand_lvx_be, altivec_expand_stvx_be,
16360         altivec_expand_stvex_be): Delete.
16361         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
16362         -maltivec=be support.
16363         (rs6000_gimple_fold_builtin): Ditto.
16364         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
16365         Adjust.
16366         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
16367         (TARGET_DIRECT_MOVE_64BIT): Adjust.
16368         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
16369         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
16370         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
16371         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
16372         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
16373         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
16374         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
16375         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
16376         anonymous split): Adjust.
16377         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
16378         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
16380 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
16382         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
16383         when --with-gxx-include-dir is also specified.
16384         * configure: Regenerate.
16386 2018-05-09  Jim Wilson  <jimw@sifive.com>
16388         PR target/84797
16389         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
16390         * config/riscv/t-withmultilib: New.
16391         * config/riscv/withmultilib.h: New.
16392         * doc/install.texi: Document RISC-V --with-multilib-list support.
16394 2018-05-09  Richard Biener  <rguenther@suse.de>
16396         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
16397         vector.
16398         (vect_bb_vectorization_profitable_p): Adjust.  Compute
16399         actual scalar cost using the cost vector and the add_stmt_cost
16400         machinery.
16402 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16404         PR rtl-optimization/85645
16405         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
16406         in the REG_CFA_REGISTER note for LR, don't leave it empty.
16408 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16410         PR rtl-optimization/85645
16411         * shrink-wrap.c (spread_components): Return a boolean saying if
16412         anything was changed.
16413         (try_shrink_wrapping_separate): Iterate spread_components until
16414         nothing changes anymore.
16416 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16418         PR rtl-optimization/85645
16419         * regrename.c (build_def_use): Also kill the chains that include the
16420         destination of a REG_CFA_REGISTER note.
16422 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16424         PR rtl-optimization/85645
16425         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
16426         insn that has a REG_CFA_REGISTER note.
16428 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
16430         * cfgexpand.c (expand_clobber): New function.
16431         (expand_gimple_stmt_1): Use it.
16432         * tree-vect-stmts.c (vect_clobber_variable): New function,
16433         split out from...
16434         (vectorizable_simd_clone_call): ...here.
16435         (vectorizable_store): Emit a clobber either side of an
16436         IFN_STORE_LANES sequence.
16437         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
16439 2018-05-09  Tom de Vries  <tom@codesourcery.com>
16441         PR target/85626
16442         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
16443         (define_insn "trap_if_false"): Add exit after trap.
16445 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
16447         PR rtl-optimization/85638
16448         * bb-reorder.c: Include common/common-target.h.
16449         (create_forwarder_block): New function extracted from...
16450         (fix_up_crossing_landing_pad): ...here.  Rename into...
16451         (dw2_fix_up_crossing_landing_pad): ...this.
16452         (sjlj_fix_up_crossing_landing_pad): New function.
16453         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
16454         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
16455         from both partitions and exit the loop after one iteration.
16457 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16459         Revert:
16460         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16461         subsection.
16462         (Basic PowerPC Built-in Functions): The new name of the
16463         subsection previously known as "PowerPC Built-in Functions".
16464         (Basic PowerPC Built-in Functions Available on all Configurations):
16465         New subsubsection.
16466         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16467         subsubsection.
16468         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16469         subsubsection.
16470         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16471         subsubsection.
16472         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16473         subsubsection.
16475 2018-05-08  Jim Wilson  <jimw@sifive.com>
16477         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
16478         (LD_EMUL_SUFFIX): New.
16479         (LINK_SPEC): Use it.
16481 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16483         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16484         subsection.
16485         (Basic PowerPC Built-in Functions): The new name of the
16486         subsection previously known as "PowerPC Built-in Functions".
16487         (Basic PowerPC Built-in Functions Available on all Configurations):
16488         New subsubsection.
16489         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16490         subsubsection.
16491         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16492         subsubsection.
16493         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16494         subsubsection.
16495         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16496         subsubsection.
16498 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16500         PR target/85683
16501         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
16502         after cmpelim optimization.
16504 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
16506         * config.gcc: Support "goldmont".
16507         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
16508         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16509         PROCESSOR_GOLDMONT.
16510         * config/i386/i386.c (m_GOLDMONT): Define.
16511         (processor_target_table): Add "goldmont".
16512         (PTA_GOLDMONT): Define.
16513         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
16514         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
16515         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
16516         (fold_builtin_cpu): Add "goldmont".
16517         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
16518         (ix86_option_override_internal): Add "goldmont".
16519         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
16520         (processor_type): Add PROCESSOR_GOLDMONT.
16521         * config/i386/i386.md: Add CPU "glm".
16522         * config/i386/glm.md: New file.
16523         * config/i386/x86-tune.def: Add m_GOLDMONT.
16524         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
16526 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16528         PR target/85572
16529         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
16530         E_V4DImode.
16531         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
16532         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
16533         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
16535         PR target/85317
16536         * config/i386/i386.c (ix86_fold_builtin): Handle
16537         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
16539         PR target/85480
16540         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
16541         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
16543 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
16545         PR target/85658
16546         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
16547         (check_arch): Likewise.
16548         (check_fpu): Return the result rather than printing it.
16549         (end arch): Fix operator precedence.
16550         (end cpu): Likewise.
16551         (END): Print the result from check_fpu.
16553 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16554             Alan Hayward  <alan.hayward@arm.com>
16555             David Sherwood  <david.sherwood@arm.com>
16557         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
16558         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
16559         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
16560         (*fcmuo<mode>_and): New patterns.
16562 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16564         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
16565         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
16566         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
16567         (cmp_op, sve_imm_con): New code attributes.
16568         (SVE_COND_INT_CMP, imm_con): Delete.
16569         (cmp_op): Remove above unspecs from int attribute.
16570         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
16571         to...
16572         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
16573         comparison-specific unspecs.
16574         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
16575         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
16576         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
16577         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
16578         (*vec_fcm<cmp_op><mode>): Rename to...
16579         (*fcm<cmp_op><mode>): ...this and adjust likewise.
16580         (*vec_fcmuo<mode>): Rename to...
16581         (*fcmuo<mode>): ...this and adjust likewise.
16582         (*pred_fcm<cmp_op><mode>): New pattern.
16583         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
16584         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
16585         functions.
16586         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
16587         and UNORDERED.
16588         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
16589         (aarch64_emit_sve_predicated_cond): New function.
16590         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
16591         (aarch64_emit_unspec_cond_or): Replace with...
16592         (aarch64_emit_sve_or_conds): ...this new function.  Use
16593         aarch64_emit_sve_ptrue_op for the individual comparisons and
16594         aarch64_emit_binop to OR them together.
16595         (aarch64_emit_inverted_unspec_cond): Replace with...
16596         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
16597         aarch64_emit_sve_ptrue_op for the comparison and
16598         aarch64_emit_unop to invert the result.
16599         (aarch64_expand_sve_vec_cmp_float): Update after the above
16600         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
16602 2018-05-07  Nathan Sidwell  <nathan@acm.org>
16604         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
16605         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
16606         (Backwards Compatibility): Likewise.
16608 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16610         PR bootstrap/85681
16611         Revert:
16612         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16614         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16615         <prefetch_dynamic_strides>: New const bool field.
16616         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16617         prefetch_dynamic_strides.
16618         (exynosm1_prefetch_tune): Likewise.
16619         (thunderxt88_prefetch_tune): Likewise.
16620         (thunderx_prefetch_tune): Likewise.
16621         (thunderx2t99_prefetch_tune): Likewise.
16622         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16623         to false.
16624         (aarch64_override_options_internal): Update to set
16625         PARAM_PREFETCH_DYNAMIC_STRIDES.
16626         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16627         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16628         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16629         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16630         prefetch-dynamic-strides setting.
16632         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16634         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16635         <minimum_stride>: New const int field.
16636         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16637         minimum_stride field.
16638         (exynosm1_prefetch_tune): Likewise.
16639         (thunderxt88_prefetch_tune): Likewise.
16640         (thunderx_prefetch_tune): Likewise.
16641         (thunderx2t99_prefetch_tune): Likewise.
16642         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16643         (aarch64_override_options_internal): Update to set
16644         PARAM_PREFETCH_MINIMUM_STRIDE.
16645         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16646         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16647         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16648         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16649         stride is constant and is below the minimum stride threshold.
16651 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16653         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
16654         to 512.
16656 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16658         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16659         <prefetch_dynamic_strides>: New const bool field.
16660         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16661         prefetch_dynamic_strides.
16662         (exynosm1_prefetch_tune): Likewise.
16663         (thunderxt88_prefetch_tune): Likewise.
16664         (thunderx_prefetch_tune): Likewise.
16665         (thunderx2t99_prefetch_tune): Likewise.
16666         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16667         to false.
16668         (aarch64_override_options_internal): Update to set
16669         PARAM_PREFETCH_DYNAMIC_STRIDES.
16670         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16671         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16672         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16673         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16674         prefetch-dynamic-strides setting.
16676 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16678         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16679         <minimum_stride>: New const int field.
16680         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16681         minimum_stride field.
16682         (exynosm1_prefetch_tune): Likewise.
16683         (thunderxt88_prefetch_tune): Likewise.
16684         (thunderx_prefetch_tune): Likewise.
16685         (thunderx2t99_prefetch_tune): Likewise.
16686         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16687         (aarch64_override_options_internal): Update to set
16688         PARAM_PREFETCH_MINIMUM_STRIDE.
16689         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16690         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16691         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16692         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16693         stride is constant and is below the minimum stride threshold.
16695 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
16697         PR c++/85659
16698         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16699         the type is addressable.  Don't force op into register if it has
16700         BLKmode.
16702 2018-05-05  Roland McGrath  <mcgrathr@google.com>
16704         PR other/77609
16705         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16706         any section for which we don't know a specific type it should have,
16707         regardless of name.  Previously this was done only for the exact
16708         names ".init_array", ".fini_array", and ".preinit_array".
16709         (default_elf_asm_named_section): Add comment about
16710         relationship with default_section_type_flags and SECTION_NOTYPE.
16711         (get_section): Don't consider it a type conflict if one side has
16712         SECTION_NOTYPE and the other doesn't, as long as neither has the
16713         SECTION_BSS et al used in the default_section_type_flags logic.
16715 2018-05-05  Tom de Vries  <tom@codesourcery.com>
16717         PR target/85653
16718         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16719         (workaround_barsyncs): New function.
16720         (nvptx_reorg): Use workaround_barsyncs.
16721         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16722         (define_expand "nvptx_membar_cta"): New define_expand.
16723         (define_insn "*nvptx_membar_cta"): New insn.
16725 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
16727         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16728         To improve optimization opportunities.
16729         * builtin-types.def: The new needed builtin types for the above.
16731 2018-05-04  Richard Biener  <rguenther@suse.de>
16733         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16734         * gimple-ssa-store-merging.c
16735         (imm_store_chain_info::output_merged_store): Remove redundant create,
16736         release split_store vector contents on failure.
16737         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16738         scalar stmt vector on cache hit.
16740 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
16742         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16743         Xilinx FP support.
16744         * config.gcc (powerpc-xilinx-eabi*): Remove.
16745         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16746         support.
16747         (fusion_addis_mem_combo_load): Ditto.
16748         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16749         FP support.
16750         (rs6000_cpu_cpp_builtins): Ditto.
16751         * config/rs6000/rs6000-linux.c
16752         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16753         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16754         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16755         support.
16756         (rs6000_setup_reg_addr_masks): Ditto.
16757         (rs6000_init_hard_regno_mode_ok): Ditto.
16758         (rs6000_option_override_internal): Ditto.
16759         (legitimate_lo_sum_address_p): Ditto.
16760         (rs6000_legitimize_address): Ditto.
16761         (rs6000_legitimize_reload_address): Ditto.
16762         (rs6000_legitimate_address_p): Ditto.
16763         (abi_v4_pass_in_fpr): Ditto.
16764         (setup_incoming_varargs): Ditto.
16765         (rs6000_gimplify_va_arg): Ditto.
16766         (rs6000_split_multireg_move): Ditto.
16767         (rs6000_savres_strategy): Ditto.
16768         (rs6000_emit_prologue_components): Ditto.
16769         (rs6000_emit_epilogue_components): Ditto.
16770         (rs6000_emit_prologue): Ditto.
16771         (rs6000_emit_epilogue): Ditto.
16772         (rs6000_elf_file_end): Ditto.
16773         (rs6000_function_value): Ditto.
16774         (rs6000_libcall_value): Ditto.
16775         * config/rs6000/rs6000.h: Ditto.
16776         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16777         (TARGET_MINMAX): ... this.  New.
16778         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16779         * config/rs6000/rs6000.md: Remove Xilinx FP support.
16780         (*movsi_internal1_single): Delete.
16781         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16782         mfpu=, mxilinx-fpu): Delete.
16783         * config/rs6000/singlefp.h: Delete.
16784         * config/rs6000/sysv4.h: Remove Xilinx FP support.
16785         * config/rs6000/t-rs6000: Ditto.
16786         * config/rs6000/t-xilinx: Delete.
16787         * config/rs6000/titan.md: Adjust for fp_type removal.
16788         * config/rs6000/vsx.md: Remove Xilinx FP support.
16789         (VStype_simple): Delete.
16790         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16791         * config/rs6000/xfpu.h: Delete.
16792         * config/rs6000/xfpu.md: Delete.
16793         * config/rs6000/xilinx.h: Delete.
16794         * config/rs6000/xilinx.opt: Delete.
16795         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16796         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16798 2018-05-04  Tom de Vries  <tom@codesourcery.com>
16800         PR libgomp/85639
16801         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16802         if ignore == 0.
16804 2018-05-04  Richard Biener  <rguenther@suse.de>
16806         PR middle-end/85627
16807         * tree-complex.c (update_complex_assignment): We are always in SSA form.
16808         (expand_complex_div_wide): Likewise.
16809         (expand_complex_operations_1): Likewise.
16810         (expand_complex_libcall): Preserve EH info of the original stmt.
16811         (tree_lower_complex): Handle removed blocks.
16812         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16813         on complex multiplication and division libcall builtins.
16815 2018-05-04  Richard Biener  <rguenther@suse.de>
16817         PR middle-end/85574
16818         * fold-const.c (negate_expr_p): Restrict negation of operand
16819         zero of a division to when we know that can happen without
16820         overflow.
16821         (fold_negate_expr_1): Likewise.
16823 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
16825         PR libstdc++/85466
16826         * real.h (real_nextafter): Declare.
16827         * real.c (real_nextafter): New function.
16828         * fold-const-call.c (fold_const_nextafter): New function.
16829         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16830         CASE_CFN_NEXTTOWARD.
16831         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16832         even when arg1_mode is different from arg0_mode.
16834 2018-05-03  Nathan Sidwell  <nathan@acm.org>
16836         * doc/extend.texi (Deprecated Features): Remove
16837         -ffriend-injection.
16838         (Backwards Compatibility): Likewise.
16839         * doc/invoke.texi (C++ Language Options): Likewise.
16840         (C++ Dialect Options): Likewise.
16842 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
16844         PR target/85530
16845         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16846         _mm512_mask_mullox_epi64): New intrinsics.
16848 2018-05-03  Tom de Vries  <tom@codesourcery.com>
16850         PR testsuite/85106
16851         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16852         dump files): Add offload-tree.
16854 2018-05-03  Richard Biener  <rguenther@suse.de>
16856         PR tree-optimization/85615
16857         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16858         to loops not nested in BBs loop father to avoid creating multi-entry
16859         loops.
16861 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16863         PR tree-optimization/70291
16864         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16865         arguments.  Change return type to tree.  Emit libcall as a new
16866         statement rather than replacing existing one when inplace_p is true.
16867         (expand_complex_multiplication_components): New function.
16868         (expand_complex_multiplication): Expand floating-point complex
16869         multiplication using the above.
16870         (expand_complex_division): Rename inner_type parameter to type.
16871         Update expand_complex_libcall call-site.
16872         (expand_complex_operations_1): Update expand_complex_multiplication
16873         and expand_complex_division call-sites.
16875 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16877         PR target/85582
16878         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16879         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16880         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16881         the highest significant bit of the shift count mask is clear.  In
16882         check whether and[sq]i3 is needed verify that all significant bits
16883         of the shift count other than the highest are set.
16885 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16887         PR libgomp/82428
16888         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16889         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16890         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16891         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16892         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16893         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16894         __builtin_goacc_parlevel_size.
16896 2018-05-02  Richard Biener  <rguenther@suse.de>
16898         PR tree-optimization/85597
16899         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16900         do not use split vect_get_vec_defs call but call vect_get_slp_defs
16901         directly.
16903 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16905         PR testsuite/85106
16906         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16907         dump files): Add ltrans-tree.
16909 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16911         PR testsuite/85106
16912         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16913         dump files): Add wpa-ipa.
16915 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
16917         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
16918         powerpc*-*-linux*paired* target.
16919         * config/rs6000/750cl.h: Delete.
16920         * config/rs6000/paired.h: Delete.
16921         * config/rs6000/paired.md: Delete.
16922         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16923         float support.
16924         * config/rs6000/rs6000-builtin.def: Remove paired float support.
16925         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16926         comment.  Remove paired float support.
16927         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16928         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16929         VECTOR_PAIRED.
16930         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16931         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16932         declarations.
16933         * config/rs6000/rs6000.c: Remove paired float support.
16934         (paired_expand_vector_init, paired_expand_vector_move,
16935         paired_emit_vector_compare, paired_emit_vector_cond_expr,
16936         (paired_expand_lv_builtin, paired_expand_stv_builtin,
16937         paired_expand_builtin, paired_expand_predicate_builtin,
16938         paired_init_builtins): Delete.
16939         * config/rs6000/rs6000.h: Remove paired float support.
16940         * config/rs6000/rs6000.md: Remove paired float support.
16941         (move_from_CR_ov_bit): Delete.
16942         * config/rs6000/rs6000.opt (mpaired): Delete.
16943         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16944         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16946 2018-05-02  Richard Biener  <rguenther@suse.de>
16948         PR middle-end/85567
16949         * gimplify.c (gimplify_save_expr): When in SSA form allow
16950         SAVE_EXPRs to compute to SSA vars.
16952 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
16954         PR target/85582
16955         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16956         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16957         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16958         clobber operands[2], instead use a new pseudo.  Formatting fixes.
16960 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
16962         PR tree-optimization/85586
16963         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16964         exit early for statements in the same group if the accesses are
16965         not strided.
16967 2018-05-02  Tom de Vries  <tom@codesourcery.com>
16969         PR lto/85451
16970         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16971         error message.
16973 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
16975         PR tree-optimization/85143
16976         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16978 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16980         PR lto/85451
16981         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16982         not found" error message.
16984 2018-05-01  Tom de Vries  <tom@codesourcery.com>
16986         PR other/83786
16987         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16988         * vec.c (test_ordered_remove_if): New function.
16989         (vec_c_tests): Call test_ordered_remove_if.
16990         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16991         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16992         * tree-vect-patterns.c (vect_pattern_recog_1): Use
16993         VEC_ORDERED_REMOVE_IF.
16995 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16997         PR tree-optimization/82665
16998         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16999         pointer subtraction where arguments come from a memchr call.
17001 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
17003         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17004         --push-state --as-needed and --pop-state instead of --as-needed and
17005         --no-as-needed if ld supports it.
17006         * configure: Regenerated.
17008         PR web/85578
17009         * doc/install.texi2html: Replace _002d with - and _002a with * in
17010         generated html files using sed.
17012 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17014         PR c++/85523
17015         * gcc-rich-location.c (blank_line_before_p): New function.
17016         (use_new_line): New function.
17017         (gcc_rich_location::add_fixit_insert_formatted): New function.
17018         * gcc-rich-location.h
17019         (gcc_rich_location::add_fixit_insert_formatted): New function.
17021 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17023         * selftest.c (assert_streq): Rename "expected" and "actual" to
17024         "val1" and "val2".  Extend NULL-handling to cover both inputs
17025         symmetrically, while still requiring both to be non-NULL for a pass.
17026         * selftest.h (assert_streq): Rename "expected" and "actual" to
17027         "val1" and "val2".
17028         (ASSERT_EQ): Likewise.
17029         (ASSERT_EQ_AT): Likewise.
17030         (ASSERT_KNOWN_EQ): Likewise.
17031         (ASSERT_KNOWN_EQ_AT): Likewise.
17032         (ASSERT_NE): Likewise.
17033         (ASSERT_MAYBE_NE): Likewise.
17034         (ASSERT_MAYBE_NE_AT): Likewise.
17035         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
17036         the assertion to pass.
17037         (ASSERT_STREQ_AT): Likewise.
17039 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17041         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17042         interaction with -pie.
17044 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17046         * selftest.h: Fix alphabetization of per-source-file selftest
17047         declarations.
17049 2018-04-30  Jason Merrill  <jason@redhat.com>
17051         PR c++/61982 - dead stores to destroyed objects.
17052         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17053         of clobber.
17055 2018-04-30  Jason Merrill  <jason@redhat.com>
17057         * tree.c (build_clobber): New.
17058         * tree.h: Declare it.
17059         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17061 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17063         * diagnostic-show-locus.c (layout::layout): Update for
17064         location_get_source_line returning a char_span.
17065         (struct char_span): Move to input.h.
17066         (struct correction): Update for fields in char_span becoming
17067         private.
17068         (struct source_line): Update for location_get_source_line
17069         returning a char_span.
17070         (layout::print_line): Likewise.
17071         * edit-context.c (edited_file::print_content): Likewise.
17072         (edited_file::print_diff_hunk): Likewise.
17073         (edited_file::print_run_of_changed_lines): Likewise.
17074         (edited_file::get_num_lines): Likewise.
17075         (edited_line::edited_line): Likewise.
17076         * final.c (asm_show_source): Likewise.
17077         * input.c (location_get_source_line): Convert return type
17078         from const char * to char_span, losing the final "line_len"
17079         param.
17080         (dump_location_info): Update for the above.
17081         (get_substring_ranges_for_loc): Likewise.  Use a char_span
17082         when handling the literal within the line.
17083         (test_reading_source_line): Update for location_get_source_line
17084         returning a char_span.
17085         * input.h (class char_span): Move here from
17086         diagnostic-show-locus.c, converting from a struct to a class.
17087         Make data members private.
17088         (char_span::operator bool): New.
17089         (char_span::length): New.
17090         (char_span::get_buffer): New.
17091         (char_span::operator[]): New.
17092         (char_span::subspan): Make const.
17093         (char_span::xstrdup): New.
17094         (location_get_source_line): Convert return type from const char *
17095         to char_span, losing the final "line_size" param.
17097 2018-04-30  Jan Hubicka  <jh@suse.cz>
17099         * lto-wrapper.c (ltrans_priorities): New static var.
17100         (cmp_priority): New.
17101         (run_gcc): Read priorities and if doing parallel build order
17102         the Makefile by them.
17104 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17106         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17108 2018-04-30  Richard Biener  <rguenther@suse.de>
17110         * tree-cfg.c (verify_address): Remove base argument, add
17111         flag whether to check TREE_ADDRESSABLE and do that.
17112         (verify_expr): Remove.
17113         (verify_types_in_gimple_reference): Add pieces from verify_expr.
17114         (verify_gimple_assign_single): Likewise.
17115         (verify_gimple_switch): Likewise.
17116         (verify_expr_location_1): Dereference tp once.  Add (disabled)
17117         piece from verify_expr.
17118         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17120 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17122         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17124 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17126         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17127         (small_data_pattern): Likewise.
17128         (arc_rewrite_small_data): Likewise.
17129         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17130         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17131         (get_symbol_alignment): New function.
17132         (legitimate_small_data_address_p): Likewise.
17133         (legitimate_scaled_address): Update, call
17134         legitimate_small_data_address_p.
17135         (output_sdata): New static variable.
17136         (arc_print_operand): Update how we handle small data operands.
17137         (arc_print_operand_address): Likewise.
17138         (arc_legitimate_address_p): Update, use
17139         legitimate_small_data_address_p.
17140         (arc_rewrite_small_data_p): Remove.
17141         (arc_rewrite_small_data_1): Likewise.
17142         (arc_rewrite_small_data): Likewise.
17143         (small_data_pattern): Likewise.
17144         (compact_sda_memory_operand): Update to use
17145         legitimate_small_data_address_p and get_symbol_alignment.
17146         (prepare_move_operands): Don't rewite sdata pattern.
17147         (prepare_extend_operands): Remove.
17148         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17149         pattern.
17150         (zero_extendqisi2): Likewise.
17151         (zero_extendhisi2): Likewise.
17152         (extendqihi2): Likewise.
17153         (extendqisi2): Likewise.
17154         (extendhisi2): Likewise.
17155         (addsi3): Likewise.
17156         (subsi3): Likewise.
17157         (andsi3): Likewise.
17158         * config/arc/constraints.md (Usd): Change it to memory constraint.
17160 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17162         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17163         as source of std instructions.
17164         * config/arc/arc.md (movsi_insn): Update pattern predicate to
17165         allow 6-bit constants as source for store instructions.
17166         (movdi_insn): Update instruction pattern to allow 6-bit constants
17167         as source for store instructions.
17169 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17171         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17173 2018-04-30  Nathan Sidwell  <nathan@acm.org>
17174             Sandra Loosemore <sandra@codesourcery.com>
17176         * dumpfile.c (dump_open): Allow '-' for stdout.
17177         * doc/invoke.texi (Developer Options): Document dump filename
17178         determination early.  Document stdin/stdout selection.
17180 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
17182         Microblaze Target: PIC data text relative
17184         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17185         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17186         Add declaration.
17187         * config/microblaze/microblaze.h (microblaze_constant_address_p):
17188         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17189         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17190         New addressing mode for data-text relative position indepenedent code.
17191         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17192         'ADDRESS_SYMBOLIC_TXT_REL'.
17193         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17194         (microblaze_legitimate_pic_operand): Exclude function calls from
17195         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17196         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17197         addresses cases.
17198         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17199         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17200         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17201         for 'address + offset'.
17202         (microblaze_expand_prologue): Add new function prologue call for
17203         'r20' assignation.
17204         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17205         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17206         table in case of TARGET_PIC_DATA_TEXT_REL.
17207         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17208         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17209         Add new macros 'UNSPEC_TEXT',
17210         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17211         + exclude function calls from 'UNSPEC_PLT' in case of data text
17212         relative mode.
17213         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17214         new target hook for generating address diff vector tables in case of
17215         flag_pic.
17216         * doc/tm.texi : Regenerate.
17217         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17218         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17219         of addr diff vector generation.
17220         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17221         target hook definition.
17222         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17223         Add default function for generate_pic_addr_diff_vec -> flag_pic.
17224         * doc/invoke.texi (Add new pic option): Add new microblaze pic
17225         option for data text relative.
17227 2018-04-30  Richard Biener  <rguenther@suse.de>
17229         * tree-chrec.h (evolution_function_is_constant_p): Remove
17230         redundant check.
17231         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
17233 2018-04-30  Richard Biener  <rguenther@suse.de>
17235         PR bootstrap/85571
17236         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
17238 2018-04-30  Richard Biener  <rguenther@suse.de>
17240         PR tree-optimization/28364
17241         PR tree-optimization/85275
17242         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
17243         copying first exit test.
17245 2018-04-28  Mark Wielaard  <mark@klomp.org>
17247         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
17248         dwarf_version >= 5.
17249         (dwarf_AT): Handle DW_AT_addr_base.
17250         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
17252 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
17254         PR target/84431
17255         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
17256         (*ashl<dwi>3_doubleword_mask_1): Ditto.
17257         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
17258         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
17260 2018-04-28  Richard Biener  <rguenther@suse.de>
17262         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
17263         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
17264         to reflect use.  Only add interesting stmts.
17266 2018-04-27  Martin Jambor  <mjambor@suse.cz>
17268         PR ipa/85549
17269         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
17270         the jump function allows for passing through aggregate values.
17272 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
17274         * input.h (in_system_header_at): Convert from macro to inline
17275         function.
17276         (from_macro_expansion_at): Likewise.
17277         (from_macro_definition_at): Likewise.
17279 2018-04-27  Jeff Law  <law@redhat.com>
17281         * config.gcc: Mark tile* targets as deprecated/obsolete.
17283 2018-04-27  Richard Biener  <rguenther@suse.de>
17285         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
17286         fix for ILP32.
17288 2018-04-27  Richard Biener  <rguenther@suse.de>
17290         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
17292 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
17294         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
17295         with Yd constraint. Set "preferred_for_speed" attribute from
17296         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
17297         with Yd constraint.
17298         (*movdi_internal): Ditto.
17299         (movti_interunit splitters): Remove
17300         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
17301         (movdi_interunit splitters): Ditto.
17302         * config/i386/constraints.md (Ye): Remove.
17303         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
17305 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17307         PR target/85512
17308         * config/aarch64/constraints.md (Usg): Limit to 31.
17309         (Usj): Limit to 63.
17311 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
17313         PR tree-optimization/85529
17314         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
17315         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
17316         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
17317         zero extension or masking of the MSB bit.
17318         (optimize_range_tests): Add FIRST_BB argument, pass it through
17319         to optimize_range_tests_var_bound.
17320         (maybe_optimize_range_tests, reassociate_bb): Adjust
17321         optimize_range_tests callers.
17323 2018-04-26  Richard Biener  <rguenther@suse.de>
17324             Jakub Jelinek  <jakub@redhat.com>
17326         * cgraph.h (symbol_table): Just declare debug method here.
17327         * symtab.c (symbol_table::debug): Define.
17329 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
17331         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
17333 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
17335         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
17336         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
17337         (*movdi_internal): Substitute Yi and Yj constraint with x
17338         and Ym and Yn constraint with y constraint.  Update "isa"
17339         attribute and set "preferred_for_speed" attribute from
17340         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
17341         (*movsi_internal): Ditto.
17342         (*movdf_internal): Ditto.
17343         (*movsf_internal): Ditto.
17344         (*zero_extendsidi2): Ditto.
17345         * config/i386/sse.md (vec_set<mode>_0): Ditto.
17346         (sse2_loadld): Ditto.
17347         (*vec_extract<ssevecmodelower>_0): Ditto.
17348         (*vec_extractv4si_0_zext_sse4): Ditto.
17349         (vec_concatv2di): Ditto.
17350         (*vec_dup<mode>): Ditto.
17351         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
17352         * config/i386/constraints.md (Yi): Remove.
17353         (Yj): Remove.
17354         (Ym): Remove.
17355         (Yn): Remove.
17357 2018-04-26  Nathan Sidwell  <nathan@acm.org>
17359         * dumpfile.c (dump_open): New.
17360         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
17361         (dump_finish): Detect stdio/stderr by value not name.
17363 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
17365         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
17367 2018-04-26  Tom de Vries  <tom@codesourcery.com>
17369         PR target/84952
17370         * config/nvptx/nvptx.c (verify_neutering_jumps)
17371         (verify_neutering_labels): New function
17372         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
17374 2018-04-26  Tom de Vries  <tom@codesourcery.com>
17376         PR target/84025
17377         * config/nvptx/nvptx.c (needs_neutering_p): New function.
17378         (nvptx_single): Use needs_neutering_p to skip over insns that do not
17379         need neutering.
17381 2018-04-26  Richard Biener <rguenther@suse.de>
17382             Tom de Vries  <tom@codesourcery.com>
17384         PR lto/85422
17385         * lto-streamer-out.c (output_function): Fixup loops if required to match
17386         discovery done in the reader.
17388 2018-04-26  Richard Biener  <rguenther@suse.de>
17390         PR tree-optimization/85116
17391         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
17392         have a loop exit from the single latch predecessor.  Remove
17393         case of header with just condition.
17394         (ch_base::copy_headers): Exclude infinite loops from any
17395         processing.
17396         (pass_ch::execute): Record exits.
17398 2018-04-26  Richard Biener  <rguenther@suse.de>
17400         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
17401         prologue cost vector and pass it to vect_get_load_cost.
17402         (vect_get_peeling_costs_all_drs): Likewise.
17403         (vect_peeling_hash_get_lowest_cost): Likewise.
17404         (vect_enhance_data_refs_alignment): Likewise.
17406 2018-04-26  Richard Biener  <rguenther@suse.de>
17408         PR middle-end/85450
17409         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
17410         checking of integer<->pointer conversions.
17411         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
17412         sign-/zero-extending pointer types.
17413         (expand_omp_for_static_chunk): Likewise.
17415 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
17416             Jean Lee  <xiaoyur347@gmail.com>
17418         * config/mips/mips.c (mips_asan_shadow_offset): New function.
17419         (TARGET_ASAN_SHADOW_OFFSET): Define.
17420         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
17421         true for -fsanitize=address.
17423 2018-04-25  Mark Wielaard  <mark@klomp.org>
17425         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
17426         shorter ones.
17428 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
17430         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
17431         than "alu", remove explicit "memory" and "imm_disp" attributes.
17432         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
17434         PR middle-end/85414
17435         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
17436         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
17437         gen_lowpart_no_emit.
17439 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
17441         PR target/85473
17442         * config/i386/i386.c (ix86_expand_builtin): Change memory
17443         operand to XI, extend p0 to Pmode.
17444         * config/i386/i386.md: Change unspec volatile and operand
17445         1 mode to XI, change operand 0 mode to P.
17447 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17449         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
17450         GET_MODE_MASK before any checking.
17451         (nds32_can_use_bset_p): Likewise.
17452         (nds32_can_use_btgl_p): Likewise.
17454 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17456         * config/nds32/nds32-doubleword.md: New define_split pattern for
17457         illegal register number.
17459 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17461         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
17463 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17465         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
17467 2018-04-25  Richard Biener  <rguenther@suse.de>
17469         * lto-streamer.h (LTO_major_version): Bump to 8.
17471 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
17473         * BASE-VER: Set to 9.0.0.
17475 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
17477         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
17478         in __abskf2 and __powikf2.
17480 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17482         PR target/85512
17483         * config/aarch64/constraints.md (Usg, Usj): New constraints.
17484         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
17485         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
17486         Use the above on operand 2.  Reindent.
17487         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
17489 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17491         PR target/85485
17492         * common/config/i386/i386-common.c (ix86_handle_option): Don't
17493         handle OPT_mcet.
17494         * config/i386/i386.opt (mcet): Removed.
17495         * doc/install.texi: Remove -mcet documentation.
17496         * doc/invoke.texi: Likewise.
17498 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17500         PR target/85485
17501         * doc/install.texi: Remove -mcet from bootstrap-cet.
17503 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17505         PR target/85511
17506         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
17507         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
17508         if TARGET_64BIT.
17510         PR target/85503
17511         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
17512         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
17513         containing a CONST_VECTOR.
17515 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
17517         * doc/install.texi: Update newlib dependency for nvptx.
17519 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17521         PR target/85508
17522         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
17523         instead of INTVAL when shifting x left.
17525 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
17527         PR tree-optimization/85478
17528         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
17529         vect_grouped_store_supported for single element vectors.
17531 2018-04-24  Richard Biener  <rguenther@suse.de>
17533         PR target/85491
17534         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
17535         load cost increase to the case of non-constant step.
17537 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17539         PR target/84828
17540         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
17541         destination if any_malformed_asm.
17543 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
17545         PR middle-end/85496
17546         * expr.c (store_field): In the bitfield case, if the value comes from
17547         a function call and is returned in registers by means of a PARALLEL,
17548         do not change the mode of the temporary unless BLKmode and VOIDmode.
17550 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
17552         PR rtl-optimization/85423
17553         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
17554         dependencies to debug insns when the previous insn is non-debug.
17556 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17558         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
17559         enums into a single definition.
17560         (fls): Fix predicates and printing.
17561         (seti): Likewise.
17563 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17565         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
17566         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
17567         and short u6 immediate.
17568         (check_if_valid_sleep_operand): Remove.
17569         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
17571 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17573         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
17574         flag_always_save_lp condition.
17575         * config/nds32/nds32.opt (malways-save-lp): New option.
17577 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17579         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
17580         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
17581         * config/nds32/nds32.h
17582         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
17583         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
17585 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17587         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
17588         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
17590 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17591             Chung-Ju Wu  <jasonwucj@gmail.com>
17593         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
17594         Declare.
17595         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
17596         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
17598 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17600         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
17602 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17604         * config/nds32/nds32-protos.h (nds32_data_alignment,
17605         nds32_local_alignment): Declare.
17606         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
17607         nds32_local_alignment): New functions.
17608         (TARGET_CONSTANT_ALIGNMENT): Define.
17609         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
17611 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17613         * config/nds32/nds32.c
17614         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
17615         (TARGET_MODES_TIEABLE_P): Likewise.
17617 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17619         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
17620         level Ofast and Og.
17622 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
17623             Chung-Ju Wu  <jasonwucj@gmail.com>
17625         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17626         for unaligned access.
17627         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17628         unaligned access.
17629         * config/nds32/nds32-intrinsic.md: Likewise.
17630         * config/nds32/nds32_intrinsic.h: Likewise.
17631         * config/nds32/nds32.h (nds32_builtins): Likewise.
17632         * config/nds32/nds32.opt (munaligned-access): New option.
17633         * config/nds32/nds32.c (nds32_asm_file_start): Display
17634         flag_unaligned_access status.
17636 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17638         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
17639         -mno-relax is present.
17640         * config/riscv/linux.h (LINK_SPEC): Ditto.
17642 2018-04-20  Martin Sebor  <msebor@redhat.com>
17644         PR c/85365
17645         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
17646         for null pointers.
17647         (gimple_fold_builtin_stxcpy_chk): Same.
17648         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
17650 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
17652         PR target/85456
17653         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
17654         __powikf2 when long double is IEEE 128-bit.
17656 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17658         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
17659         step to make sure stack always aligned.
17661 2018-04-20  Carl Love  <cel@us.ibm.com>
17663         PR target/83402
17664         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
17665         size check for arg0.
17667 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
17668             Tom de Vries  <tom@codesourcery.com>
17670         PR target/85445
17671         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17672         Emit insns for calls too.
17673         (nvptx_find_par): Always look for worker-level predecessor insn.
17674         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
17675         calls.
17676         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17677         (nvptx_process_pars): Propagate frames for calls.
17679 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
17681         PR target/85469
17682         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17683         Removed.
17684         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17685         (ix86_handle_option): Don't handle OPT_mibt.
17686         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17687         __SHSTK__.
17688         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17689         has_ibt and ibt.
17690         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17691         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17692         (ix86_target_macros): Define __CET__ with flag_cf_protection
17693         for -fcf-protection.
17694         * config/i386/i386.c (isa2_opts): Remove -mibt.
17695         * config/i386/i386.h (TARGET_IBT): Removed.
17696         (TARGET_IBT_P): Likewise.
17697         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17698         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17699         * config/i386/i386.opt (mcet): Update help message.
17700         (mshstk): Likewise.
17701         (mibt): Removed.
17702         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
17703         -mcet as an alias for -mshstk.
17705 2018-04-20  Richard Biener <rguenther@suse.de>
17707         PR middle-end/85475
17708         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17709         complexity by forcing a single use of the multiply operand.
17711 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17713         ipa/85449
17714         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17715         recursion dependency to only apply to non-clones.
17717 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17719         ipa/85447
17720         * ipa-cp.c (create_specialized_node): Check that clones of
17721         self-recursive edges exist during IPA-CP.
17723 2018-04-19  Toon Moene  <toon@moene.org>
17725         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17726         by -O3.
17728 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17730         PR tree-optimization/85467
17731         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17732         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
17733         VECTOR_CST element to type.
17735 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17737         PR target/85397
17738         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17739         * config/i386/i386.md (builtin_setjmp_setup): Removed.
17740         (builtin_longjmp): Likewise.
17741         (save_stack_nonlocal): New pattern.
17742         (restore_stack_nonlocal): Likewise.
17744 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17746         PR target/85404
17747         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17748         Replace ASM_OUTPUT_LABEL with fprintf.
17750 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17752         PR target/85417
17753         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17754         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17755         * config/i386/i386-c.c (ix86_target_macros_internal): Also
17756         define __IBT__ and __SHSTK__ for -fcf-protection.
17757         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17758         TARGET_IBT.
17759         (ix86_trampoline_init): Likewise.
17760         (x86_output_mi_thunk): Likewise.
17761         (ix86_notrack_prefixed_insn_p): Likewise.
17762         (ix86_option_override_internal): Don't disallow -fcf-protection.
17763         * config/i386/i386.md (rdssp<mode>): Also enable for
17764         -fcf-protection.
17765         (incssp<mode>): Likewise.
17766         (nop_endbr): Likewise.
17767         * config/i386/i386.opt (mcet): Change help message to built-in
17768         functions only.
17769         (mibt): Likewise.
17770         (mshstk): Likewise.
17771         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17772         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
17773         enable CET built-in functions.
17775 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
17777         * common/config/i386/i386-common.c
17778         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17779         OPTION_MASK_ISA_MOVDIRI_UNSET,
17780         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17781         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17782         * config.gcc (movdirintrin.h): New header.
17783         * config/i386/cpuid.h (bit_MOVDIRI,
17784         bit_MOVDIR64B): New bits.
17785         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17786         and -mmvodir64b.
17787         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17788         (VOID, PVOID, PCVOID)): New function types.
17789         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17790         __builtin_ia32_directstoreu_u64,
17791         __builtin_ia32_movdir64b): New builtins.
17792         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17793         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17794         and -mmovdiri.
17795         (ix86_valid_target_attribute_inner_p): Ditto.
17796         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17797         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17798         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17799         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17800         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17801         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17802         (movdiri<mode>, movdir64b_<mode>): New.
17803         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17804         * config/i386/immintrin.h: Include movdirintrin.h.
17805         * config/i386/movdirintrin.h: New file.
17806         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17808 2018-04-19  Richard Biener  <rguenther@suse.de>
17810         PR middle-end/85455
17811         * cfg.c (clear_bb_flags): When loop state says we have
17812         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17814 2018-04-19  Richard Biener  <rguenther@suse.de>
17816         PR tree-optimization/84737
17817         * tree-vect-data-refs.c (vect_copy_ref_info): New function
17818         copying restrict info.
17819         (vect_setup_realignment): Use it.
17820         * tree-vectorizer.h (vect_copy_ref_info): Declare.
17821         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17822         the first DR to all generated stores.
17823         (vectorizable_load): Likewise for loads.
17825 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17827         PR tree-optimization/85446
17828         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17829         the integral and pointer types to have the same precision.
17831         * doc/install.texi: Document --disable-cet being the default and
17832         --enable-cet=auto.
17834 2018-04-18  Martin Liska  <mliska@suse.cz>
17836         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17837         style.
17839 2018-04-18  Martin Liska  <mliska@suse.cz>
17841         Revert
17842         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17844         PR ipa/83983
17845         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17846         arguments if they are comparable.
17848 2018-04-18  Martin Liska  <mliska@suse.cz>
17850         Revert
17851         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
17853         PR lto/84805
17854         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17855         incomplete types.
17857 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
17859         PR target/85388
17860         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17861         ENDBR after calling __morestack.
17863 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
17865         PR jit/85384
17866         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17867         by using gcc_base_ver to generate a gcc_driver_version, and use
17868         it when generating GCC_DRIVER_NAME.
17869         * configure: Regenerate.
17871 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
17873         PR target/81084
17874         * config.gcc: Obsolete powerpc*-*-*spe*.
17876 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17878         PR debug/84637
17879         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17880         (stabstr_D): Change type of unum from unsigned int to
17881         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
17882         type.
17884 2018-04-17  Jim Wilson  <jimw@sifive.com>
17886         PR 84856
17887         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17888         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17889         Set arg_pointer_offset after using pretend_args_size.
17891 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17893         PR rtl-optimization/85431
17894         * dse.c (record_store): Ignore zero width stores.
17896         PR sanitizer/85230
17897         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
17898         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17899         __builtin_stack_restore rather than after it.
17900         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17901         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17902         argument instead of virtual_dynamic_stack_rtx.
17904 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17906         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17907         New prototype.
17908         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17909         Add note to error message to explain internal mapping of overloaded
17910         built-in function name to non-overloaded built-in function name.
17911         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17912         function.
17914 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17916         PR target/85424
17917         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17918         where the inputs overlap with the output.
17920 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17922         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17923         (=v, v) alternative and explicit "memory" attribute.
17924         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
17925         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17926         attributes.
17927         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17928         "sselog1" type instead of "sselog".
17929         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17930         "sselog".  Remove explicit "memory" attribute.
17931         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17932         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17933         attributes.
17934         (vec_extract_hi_v32hi): Merge all alternatives into one, use
17935         "sselog1" type instead of "sselog".  Remove explicit "memory"
17936         attribute.
17937         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17938         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17939         attribute.
17940         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17941         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17942         attributes.
17943         (vec_extract_hi_v64qi): Merge all alternatives into one, use
17944         "sselog1" type instead of "sselog".  Remove explicit "memory"
17945         attribute.
17946         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17947         use "sselog1" type instead of "sselog".  Remove explicit "memory"
17948         attribute.
17950         PR target/85430
17951         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17953         PR middle-end/85414
17954         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17955         on a SUBREG.
17957 2018-04-17  Martin Jambor  <mjambor@suse.cz>
17959         PR ipa/85421
17960         * ipa-cp.c (create_specialized_node): Call
17961         expand_all_artificial_thunks if necessary.
17963 2018-04-17  Martin Liska  <mliska@suse.cz>
17965         PR lto/85405
17966         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17967         in message, remote space in between '_G' and '('.
17969 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
17971         PR target/85281
17972         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17973         avx512f_vmcmp<mode>3<round_saeonly_name>,
17974         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17975         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17976         avx512f_rndscale<mode><round_saeonly_name>,
17977         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17978         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17979         Use %<iptr>2 instead of %2 for -masm=intel.
17980         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17981         avx512f_vcvttss2usi<round_saeonly_name>,
17982         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17983         -masm=intel.
17984         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17985         avx512f_vcvttsd2usi<round_saeonly_name>,
17986         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17987         Use %q1 instead of %1 for -masm=intel.
17988         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17989         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17990         of %3 for -masm=intel.
17991         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17992         -masm=intel.
17993         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17994         -masm=intel.
17995         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17996         -masm=intel.
17997         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17998         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17999         %g1.
18000         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18001         -masm=intel.
18002         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18003         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18004         %g1 and one with %0 and %1.
18005         (avx512er_vmrcp28<mode><round_saeonly_name>,
18006         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18007         %1 for -masm=intel.
18008         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18009         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18010         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18011         of %0 and %{%4%} for -masm=intel.
18012         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18013         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18014         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18015         order of %0 and %{%5%}%{z%} for -masm=intel.
18017 2018-04-17  Jan Hubicka  <jh@suse.cz>
18019         PR lto/85405
18020         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18022 2018-04-17  Martin Liska  <mliska@suse.cz>
18024         PR ipa/85329
18025         * multiple_target.c (create_dispatcher_calls): Set apostrophes
18026         for target_clone error message.  Make default implementation
18027         clone to be a local declaration.
18028         (separate_attrs): Add new argument and check for an empty
18029         string.
18030         (expand_target_clones): Handle it.
18031         (ipa_target_clone): Make redirection just for target_clones
18032         functions.
18034 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
18035             Tom de Vries  <tom@codesourcery.com>
18037         PR middle-end/84955
18038         * omp-expand.c (expand_oacc_for): Add dummy false branch for
18039         tiled basic blocks without omp continue statements.
18041 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
18043         PR target/83660
18044         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18045         vec_extract expression as having side effects to make sure it gets
18046         a cleanup point.
18048 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
18050         PR target/85403
18051         * config/i386/i386.c (get_builtin_code_for_version): Check
18052         error_mark_node.
18054 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
18056         PR target/84331
18057         * config.gcc: Support "skylake".
18058         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18059         PROCESSOR_SKYLAKE.
18060         * config/i386/i386.c (m_SKYLAKE): Define.
18061         (processor_target_table): Add "skylake".
18062         (ix86_option_override_internal): Add "skylake".
18063         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18064         PROCESSOR_CANNONLAKE.
18065         (get_builtin_code_for_version): Fix priority for
18066         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18067         PROCESSOR_SKYLAKE-AVX512.
18068         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18069         (processor_type): Add PROCESSOR_SKYLAKE.
18071 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
18072             Jason Merrill  <jason@redhat.com>
18074         PR c++/85112
18075         * convert.c (convert_to_integer_1): Use direct recursion for
18076         enumeral types and types with a precision less than the number
18077         of bits in their mode.
18079 2018-04-16  Julia Koval  <julia.koval@intel.com>
18081         PR target/84413
18082         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18083         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18085 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
18087         PR target/85293
18088         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18089         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18090         and -mno-direct-move.
18092 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
18094         PR target/83402
18095         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18096         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18097         Ensure negative shifts result in {0}.
18099 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
18101         PR rtl-optimization/79916
18102         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18103         regs (if any) to define how to gnerate SD moves when LRA is in
18104         progress.
18106 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
18108         PR rtl-optimization/85393
18109         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18110         * except.c (expand_dw2_landing_pad_for_region): Make static.
18111         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18112         a label and unconditional jump to old_bb, rather than
18113         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18114         basic block.
18116         PR rtl-optimization/85376
18117         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18118         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18119         instead of a specific value.
18121 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18122             Bin Cheng  <bin.cheng@arm.com>
18124         PR tree-optimization/82965
18125         PR tree-optimization/83991
18126         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18127         by_profile_only parameter.
18128         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18129         information if the loop was predicted to iterate too many times.
18130         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18132 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18134         PR lto/71991
18135         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18136         always inline.
18138 2018-04-13  Martin Liska  <mliska@suse.cz>
18139             Jakub Jelinek  <jakub@redhat.com>
18141         PR middle-end/81657
18142         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18143         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18144         * builtins.c (expand_builtin_memory_copy_args): Use
18145         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18146         handle dest_addr == pc_rtx.
18148 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
18150         PR target/85291
18151         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18152         asked to not generate direct moves.
18153         (fix_trunc<mode>si2_stfiwx): Similar.
18154         (fix_trunc<mode>si2_internal): Similar.
18156 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18158         PR debug/83157
18159         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18160         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18161         lookup if dest in some wider mode is known to be const0_rtx and
18162         if so, record permanent equivalence for it to be ZERO_EXTEND of
18163         the narrower mode destination.
18165 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18167         * lto-streamer-out.c (output_function): Revert 259346.
18168         * omp-expand.c (expand_oacc_for): Likewise.
18170 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
18172         PR rtl-optimization/85354
18173         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18174         * sel-sched.c (sel_global_init): ... here.
18176 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
18178         PR target/85238
18179         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18180         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18181         mode for PE-COFF targets.
18182         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18183         (i386_pe_asm_lto_end): Likewise.
18184         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18185         (TARGET_ASM_LTO_END): Likewise.
18186         * config/i386/winnt.c (saved_debug_info_level): New static variable.
18187         (i386_pe_asm_lto_start): New function.
18188         (i386_pe_asm_lto_end): Likewise.
18190 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18191             Richard Biener  <rguenther@suse.de>
18193         PR middle-end/84955
18194         * lto-streamer-out.c (output_function): Fix CFG loop state before
18195         streaming out.
18196         * omp-expand.c (expand_oacc_for): Handle calls to internal
18197         functions like regular functions.
18199 2018-04-12  Richard Biener  <rguenther@suse.de>
18201         PR lto/85371
18202         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18203         for the early LTO debug to properly generate references to it
18204         during DIE emission.  Do not re-use that for the skeleton for
18205         split-dwarf.
18206         (dwarf2out_early_finish): Likewise.
18208 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18210         PR target/85328
18211         * config/i386/sse.md
18212         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18213         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18214         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18215         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18216         and output is a reg, avoid creating invalid lowpart subreg, but
18217         instead split into a 512-bit move.  Don't split if not AVX512VL,
18218         input is xmm16+ reg and output is a mem.
18219         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18220         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18221         xmm16+ reg and output is a mem.
18223 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18225         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
18226         also for flag_dwarf2_cfi_asm.
18228 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18230         PR rtl-optimization/85342
18231         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
18232         a bool scalar var inside of the loop instead.  Don't try to update
18233         recog_data.operand after failed apply_change_group.
18235 2018-04-12  Tom de Vries  <tom@codesourcery.com>
18237         PR target/85296
18238         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
18239         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
18240         array with flexible array member as array without given dimension.
18241         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
18242         argument for undefined param to true.
18244 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
18246         PR target/85321
18247         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18248         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
18249         from PowerPC section.
18250         * config/rs6000/sysv4.opt (mcall-): Improve help text.
18251         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
18252         help text that is too long.
18253         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
18254         help text that is too long.
18255         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
18256         help text that is too long.
18258 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
18260         * config/alpha/alpha.md (stack_probe_internal): Rename
18261         from "probe_stack".  Update all callers.
18263 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18265         PR rtl-optimization/84566
18266         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
18267         sched_macro_fuse_insns.
18269 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18271         PR target/84301
18272         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
18273         (compute_block_dependences): ... from here.
18275 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18277         PR tree-optimization/85331
18278         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
18279         from int to HOST_WIDE_INT.
18281 2018-04-11  Martin Jambor  <mjambor@suse.cz>
18283         PR ipa/84149
18284         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
18285         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
18286         not the same as the source val.
18287         (cgraph_edge_brings_value_p): New parameter.
18288         (gather_edges_for_value): Pass destination value to
18289         cgraph_edge_brings_value_p.
18290         (perhaps_add_new_callers): Likewise.
18291         (get_info_about_necessary_edges): Likewise and exclude values brought
18292         only by self-recursive edges.
18293         (create_specialized_node): Redirect only clones of self-calling edges.
18294         (+self_recursive_pass_through_p): New function.
18295         (find_more_scalar_values_for_callers_subset): Use it.
18296         (find_aggregate_values_for_callers_subset): Likewise.
18297         (known_aggs_to_agg_replacement_list): Removed.
18298         (decide_whether_version_node): Re-calculate known constants for all
18299         remaining context clones.
18301 2018-04-11  Richard Biener  <rguenther@suse.de>
18303         PR lto/85339
18304         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
18305         from early DWARF output.
18306         (dwarf2out_early_finish): Output line info unconditionally into
18307         early DWARF and add reference to it.
18309 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18311         PR target/85281
18312         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
18313         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
18314         other than V2DFmode using iptr mode attribute.
18315         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
18317 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18319         PR rtl-optimization/84659
18320         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
18322 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18324         PR debug/85302
18325         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
18326         SIZEP is NULL.
18327         (output_loc_list): Pass address of a dummy size variable even in the
18328         locview handling loop.
18329         (index_location_lists): Add comment on why skip_loc_list_entry can't
18330         call size_of_locs.
18332 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18334         PR target/85261
18335         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
18336         into register.
18338 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
18340         PR target/85321
18341         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18342         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
18343         and -mstring-compare-inline-limit.
18345 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18347         PR target/85287
18348         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
18349         for stack clash protection in a register whenever we need it to be in
18350         a register.
18352 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18354         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
18355         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
18357 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18359         PR target/85321
18360         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
18361         the help text.
18362         (mlong-double-): Ditto.
18363         * config/rs6000/sysv4.opt (msdata=): Ditto.
18364         (mtls-size=): Ditto.
18366 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18368         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18369         erroneous entries for
18370         "vector int vec_ldl (int, long int *)", and
18371         "vector unsigned int vec_ldl (int, unsigned long int *)".
18372         Add comments and entries for
18373         "vector bool char vec_ldl (int, bool char *)",
18374         "vector bool short vec_ldl (int, bool short *)",
18375         "vector bool int vec_ldl (int, bool int *)",
18376         "vector bool long long vec_ldl (int, bool long long *)",
18377         "vector pixel vec_ldl (int, pixel *)",
18378         "vector long long vec_ldl (int, long long *)",
18379         "vector unsigned long long vec_ldl (int, unsigned long long *)".
18380         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
18381         type tree bool_long_long_type_node and correct definition of
18382         bool_V2DI_type_node to make reference to this new type tree.
18383         (rs6000_mangle_type): Replace erroneous reference to
18384         bool_long_type_node with bool_long_long_type_node.
18385         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
18386         comments to emphasize sign distinctions for char and int types and
18387         replace RS6000_BTI_bool_long constant with
18388         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
18389         use of RS6000_BTI_pixel.
18390         (bool_long_type_node): Remove this macro definition.
18391         (bool_long_long_type_node): New macro definition
18393 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
18395         PR rtl-optimization/85300
18396         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
18397         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
18398         simplify_unary_operation fails.
18400 2018-04-10  Martin Liska  <mliska@suse.cz>
18402         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
18403         cgraph_edge and ipa_ref.
18405 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
18407         PR target/85177
18408         PR target/85255
18409         * config/i386/sse.md
18410         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
18411         computation of the VEC_MERGE selector from mask.
18412         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
18413         Fix decoding of the VEC_MERGE selector into mask.
18415 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
18417         PR tree-optimization/85286
18418         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
18420 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
18422         * final.c (final_1): Set insn_last_address as well as
18423         insn_current_address.
18425 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18427         PR target/85173
18428         * explow.c (emit_stack_probe): Call validize_mem on memory location
18429         before passing it to gen_probe_stack.  Create address operand and
18430         legitimize it for the probe_stack_address case.
18432 2018-04-09  Jan Hubicka  <jh@suse.cz>
18434         PR lto/85078
18435         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
18436         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
18437         * tree.c (free_lang_data_in_type): Fix handling of binfos;
18438         walk basetypes.
18439         (free_lang_data): Rebuild type inheritance graph.
18441 2018-04-09  Martin Sebor  <msebor@redhat.com>
18443         * invoke.texi (-finline-small-functions): Mention other optimization
18444         options.
18445         (-findirect-inlining, -fpartial-inlining): Same.
18446         (-finline-functions-called-once): Same.
18447         (-freorder-blocks-and-partition): Same.
18449 2018-04-09  Jan Hubicka  <jh@suse.cz>
18451         PR rtl/84058
18452         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
18453         jumps; choose last target that matches the criteria (i.e.
18454         no partition changes for non-crossing jumps).
18455         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
18456         support for redirecting crossing jumps to non-crossing.
18458 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
18460         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
18461         also for naked functions.
18463 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
18465         * config/arc/arc.md (add_shift): New pattern.
18466         (add_shift2): Likewise.
18467         (sub_shift): Likewise.
18468         (sub_shift_cmp0_noout): Likewise.
18469         (compare_si_ashiftsi): Likewise.
18470         (xbfu_cmp0_noout): New combine pattern.
18471         (xbfu_cmp0"): Likewise.
18472         (movsi_set_cc_insn): Place the predicable variant first.
18473         (commutative_binary_cmp0_noout): Remove clobber.
18474         (commutative_binary_cmp0): New pattern.
18475         (noncommutative_binary_cmp0): Likewise.
18476         (noncommutative_binary_cmp0_noout): Likewise.
18477         (noncommutative_binary_comparison_result_used): Removed.
18478         (rsub_cmp0): New pattern.
18479         (rsub_cmp0_noout): Likewise.
18480         (extzvsi): Changed, keep only meaningful variants.
18481         (SQH, SEZ): New iterators.
18482         (SQH_postfix): New mode attribute.
18483         (SEZ_prefix): New code attribute.
18484         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
18485         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
18486         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
18487         of numerical value.
18488         (noncommutative_operator): Check the availability of barrel
18489         shifter option.
18491 2018-04-09  Richard Biener  <rguenther@suse.de>
18493         PR tree-optimization/85284
18494         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
18495         Only use the niter constraining form of simple_iv when the exit
18496         is always executed.
18498 2018-04-09  Tom de Vries  <tom@codesourcery.com>
18500         PR target/84041
18501         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18502         (define_expand "*memory_barrier"): New define_expand.
18503         (define_insn "memory_barrier"): New insn.
18505 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18507         PR rtl-optimization/80463
18508         PR rtl-optimization/83972
18509         PR rtl-optimization/83480
18511         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
18512         correct producer for the insn.
18513         (tidy_control_flow): Fixup seqnos in case of debug insns.
18515 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18517         PR rtl-optimization/83913
18519         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
18520         different sched-times when merging exprs.
18522 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18524         PR rtl-optimization/83962
18526         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
18527         tidy_fallthru_edge and tidy_control_flow.
18529 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18531         PR rtl-optimization/83530
18533         * sel-sched.c (force_next_insn): New global variable.
18534         (remove_insn_for_debug): When force_next_insn is true, also leave only
18535         next insn in the ready list.
18536         (sel_sched_region): When the region wasn't scheduled, make another pass
18537         over it with force_next_insn set to 1.
18539 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18541         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
18542         into tm_file.
18543         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18544         for interrupt control.
18545         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18546         functions for interrupt control.
18547         * config/nds32/nds32-intrinsic.md: Likewise.
18548         * config/nds32/nds32_intrinsic.h: Likewise.
18549         * config/nds32/nds32.h (nds32_builtins): Likewise.
18551 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18553         * config/nds32/nds32.c (nds32_init_machine_status,
18554         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
18555         strict_aligned_p field.
18556         (nds32_expand_to_rtl_hook): New function.
18557         (TARGET_EXPAND_TO_RTL_HOOK): Define.
18558         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
18560 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18561             Chung-Ju Wu  <jasonwucj@gmail.com>
18563         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
18564         * config/nds32/nds32-n7.md: New file.
18565         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
18566         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
18567         pipeline.
18568         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
18569         * config/nds32/nds32.md (pipeline_model): Add n7.
18570         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
18571         * config/nds32/pipelines.md: Include n7 settings.
18573 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18574             Chung-Ju Wu  <jasonwucj@gmail.com>
18576         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
18577         * config/nds32/nds32-e8.md: New file.
18578         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
18579         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
18580         pipeline.
18581         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
18582         * config/nds32/nds32.md (pipeline_model): Add e8.
18583         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
18584         * config/nds32/pipelines.md: Include e8 settings.
18586 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18587             Chung-Ju Wu  <jasonwucj@gmail.com>
18589         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
18590         * config/nds32/nds32-n8.md: New file.
18591         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
18592         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
18593         pipeline.
18594         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
18595         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
18596         * config/nds32/nds32.md (pipeline_model): Add n8.
18597         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
18598         * config/nds32/pipelines.md: Include n8 settings.
18600 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18601             Chung-Ju Wu  <jasonwucj@gmail.com>
18603         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
18604         * config/nds32/nds32-n9-2r1w.md: New file.
18605         * config/nds32/nds32-n9-3r2w.md: New file.
18606         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
18607         nds32_register_ports): New or modify for cpu n9.
18608         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
18609         pipeline.
18610         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
18611         * config/nds32/nds32-utils.c: New file.
18612         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
18613         TARGET_MUL_SLOW): Define.
18614         * config/nds32/nds32.md (pipeline_model): New attribute.
18615         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
18616         New options that support cpu n9.
18617         * config/nds32/pipelines.md: Include n9 settings.
18618         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
18620 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18622         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
18623         information if necessary.
18624         (output_cond_branch_compare_zero): Likewise.
18625         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
18626         (nds32_target_alignment): Refine for alignment.
18627         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
18628         (FUNCTION_BOUNDARY): Modify.
18629         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
18630         align case.
18631         * config/nds32/nds32.opt (malways-align, malign-functions): New.
18633 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18635         * config/nds32/constants.md (unspec_volatile_element): Add values for
18636         TLB operation and data prefetch.
18637         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18638         functions for TLB operation and data prefetch.
18639         * config/nds32/nds32-intrinsic.md: Likewise.
18640         * config/nds32/nds32_intrinsic.h: Likewise.
18641         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
18642         (nds32_print_operand): Likewise.
18643         * config/nds32/nds32.h (nds32_builtins): Likewise.
18645 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
18646         Andrew Pinski <pinsika@gcc.gnu.org>
18648         PR middle-end/82976
18649         * match.pd: Use constant_boolean_node of correct type instead of
18650         boolean_true_node or boolean_false_node for simplifying
18651         pointer comparisons to zero.
18653 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18655         PR tree-optimization/80021
18656         * tree.c (verify_type_variant): Make error call in verify_variant_match
18657         translatable and remove final full stop.
18659 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18661         * config/nds32/constants.md (unspec_volatile_element): Add
18662         UNSPEC_VOLATILE_EH_RETURN.
18663         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
18664         nds32_output_stack_pop): Support dwarf exception handling process.
18665         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
18666         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
18667         exception handling process.
18668         (nds32_compute_stack_frame): Likewise.
18669         (nds32_return_addr_rtx): Likewise.
18670         (nds32_initial_elimination_offset): Likewise.
18671         (nds32_expand_prologue): Likewise.
18672         (nds32_expand_epilogue): Likewise.
18673         (nds32_dynamic_chain_address): New function.
18674         * config/nds32/nds32.h (machine_function): Add fields for dwarf
18675         exception handling.
18676         (DYNAMIC_CHAIN_ADDRESS): Define.
18677         (EH_RETURN_DATA_REGNO): Define.
18678         (EH_RETURN_STACKADJ_RTX): Define.
18679         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18680         patterns for dwarf exception handling.
18682 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18684         * config/nds32/nds32.h: Clean up obsolete macros.
18686 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18688         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18689         Add enum values for particular instructions.
18690         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18691         particular intrinsic functions.
18692         * config/nds32/nds32-intrinsic.md: Likewise.
18693         * config/nds32/nds32_intrinsic.h: Likewise.
18694         * config/nds32/nds32.h (nds32_builtins): Likewise.
18695         * config/nds32/nds32.md (type): Add pbsad and pbsada.
18696         (btst, ave): New patterns for particular instructions.
18698 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18700         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18701         Add enum values for atomic load/store and memory sync.
18702         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18703         and memory sync.
18704         * config/nds32/nds32-intrinsic.md: Likewise.
18705         * config/nds32/nds32_intrinsic.h: Likewise.
18706         * config/nds32/nds32.h (nds32_builtins): Likewise.
18708 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18710         PR tree-optimization/85257
18711         * fold-const.c (native_encode_vector): If not all elts could fit
18712         and off is -1, return 0 rather than offset.
18713         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18714         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18715         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
18716         adjust buffer in native_interpret_expr call.
18718 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18720         * config/nds32/constants.md (unspec_volatile_element): Add cache
18721         control enum values.
18722         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18723         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18724         * config/nds32/nds32.c (nds32_cctl_names): New.
18725         (nds32_print_operand): Handle cache control register names.
18726         * config/nds32/nds32.h (nds32_builtins): New enum values.
18727         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18728         macros.
18729         * config/nds32/nds32.md (type): Add mmu.
18730         * config/nds32/pipelines.md (simple_insn): Add mmu.
18732 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18734         * config/nds32/nds32.md (type): Remove call.
18735         * config/nds32/pipelines.md (simple_insn): Likewise.
18737 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18739         * config/nds32/constants.md (unspec_volatile_element): Add
18740         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18741         UNSPEC_VOLATILE_FMFCFG.
18742         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18743         description for fmfcfg and fmfcsr.
18744         (bdesc_1arg): Add fmtcsr.
18745         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18746         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18747         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18748         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18749         unspec_fmfcfg): New patterns.
18750         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18751         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18752         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18753         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18754         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18755         __nds32__fmfcfg): Define.
18757 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18759         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18760         intrinsic register names.
18761         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18762         intrinsic register enum values and macros.
18764 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18766         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18767         for load/store addressing form.
18768         (nds32_print_operand_address): Likewise.
18770 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
18772         PR target/85196
18773         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18774         based on LABEL_REF.  Remove useless assertion.
18775         (pic_address_needs_scratch): Fix formatting.
18776         (sparc_legitimize_pic_address): Minor tweaks.
18777         (sparc_delegitimize_address): Adjust assertion accordingly.
18778         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18779         into symbolic_operand.
18780         (movsi_high_pic_label_ref): Likewise.
18781         (movsi_lo_sum_pic_label_ref): Likewise.
18782         (movdi_pic_label_ref): Likewise.
18783         (movdi_high_pic_label_ref): Likewise.
18784         (movdi_lo_sum_pic_label_ref): Likewise.
18786 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
18788         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18789         custom LIB_SPEC setup.
18791 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
18792             Kito Cheng  <kito.cheng@gmail.com>
18794         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18795         * config/riscv/freebsd.h: New.
18797 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18799         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18800         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18801         file.
18803 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18804             Kito Cheng  <kito.cheng@gmail.com>
18806         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18807         nds32_output_call, nds32_symbol_binds_local_p): New functions.
18808         * config/nds32/nds32-protos.h (nds32_output_call,
18809         nds32_output_return): Declare.
18810         * config/nds32/nds32.md: Refine all the call and return patterns.
18812 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18814         PR debug/85252
18815         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18816         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18818         PR rtl-optimization/84872
18819         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18820         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18821         EDGE_CROSSING edge.
18823 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
18825         * expr.c (copy_blkmode_to_reg): Revert 254862.
18826         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18828 2018-04-06  Richard Biener  <rguenther@suse.de>
18830         PR middle-end/85244
18831         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18832         after seeing a component reference with an adjacent field.  Treat
18833         refs to arrays at struct end of external decls similar to
18834         refs to unconstrained commons.
18836 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18838         PR sanitizer/85213
18839         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18840         look through SAVE_EXPRs with non-side-effects argument.  Adjust
18841         recursive calls.
18842         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18843         save_p here.
18845 2018-04-06  Richard Biener  <rguenther@suse.de>
18847         PR middle-end/85180
18848         * alias.c (find_base_term): New wrapper around find_base_term
18849         unwinding CSELIB_VAL_PTR changes.
18850         (find_base_term): Do not restore CSELIB_VAL_PTR during the
18851         recursion.
18853 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18855         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18856         instructions.
18857         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18858         constant definitions.
18859         ("nop"): lr 0,0 -> nopr r0
18860         ("nop_lr0", "nop_lr1"): New insn definitions.
18862 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18864         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18865         NDS32_V3PUSH_AVAILABLE_P macro.
18867 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
18868             Chung-Ju Wu  <jasonwucj@gmail.com>
18870         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18871         (nds32*-*-*): Add float and fpu_config into supported_defaults.
18872         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18873         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18874         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18875         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18876         * config/nds32/constraints.md: New constraints and checking for hard
18877         float configuration.
18878         * config/nds32/iterators.md: New mode iterator and attribute for hard
18879         float configuration.
18880         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18881         patterns.
18882         * config/nds32/nds32-fpu.md: New file.
18883         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18884         deal with hard float code generation.
18885         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18886         ARCH_V3S.
18887         (abi_type, float_reg_number): New enum type.
18888         * config/nds32/nds32-predicates.c: New predicates for hard float.
18889         * config/nds32/nds32-protos.h: Declare functions for hard float.
18890         * config/nds32/nds32.c: Implementation for hard float configuration.
18891         * config/nds32/nds32.h: Definitions for hard float configuration.
18892         * config/nds32/nds32.md: Include hard float machine description and
18893         modify patterns for hard float configuration.
18894         * config/nds32/nds32.opt: New options for hard float configuration.
18895         * config/nds32/predicates.md: New predicates for hard float
18896         configuration.
18898 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
18900         * common/config/nds32/nds32-common.c
18901         (nds32_option_optimization_table): Enable -mreleax-hint by default.
18903 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
18905         PR middle-end/85195
18906         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18907         CONSTRUCTOR_ELT (ctor, ...)->value.
18909 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
18911         PR target/85193
18912         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18914 2018-04-05  Tom de Vries  <tom@codesourcery.com>
18916         PR target/85204
18917         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18918         cond jump.
18920 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18921             Kito Cheng  <kito.cheng@gmail.com>
18923         * config/nds32/constraints.md (U33): Fine-tune checking condition.
18924         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18925         * config/nds32/nds32.h (nds32_16bit_address_type): Add
18926         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18928 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
18929             Kito Cheng  <kito.cheng@gmail.com>
18931         * config/nds32/constraints.md (Ufe): New memory constraint.
18932         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18933         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18934         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18935         operands.
18936         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18937         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18939 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18941         * config/nds32/nds32.md: Use optimize_size in the condition for
18942         alu-shift instructions.
18944 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18946         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18948 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18950         * config/nds32/nds32.md (negsi2): Refine pattern.
18952 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18953             Chung-Ju Wu  <jasonwucj@gmail.com>
18955         * config/nds32/iterators.md (shift_rotate): New code iterator.
18956         (shift): New code attribute.
18957         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18958         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18959         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18960         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18961         bit-wise operations.
18962         (andsi3, *andsi3): Ditto.
18963         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18964         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18965         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18966         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18967         nds32_ior_operand, nds32_xor_operand): New predicates.
18969 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18971         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18972         (addsi3, subsi3): ... this.
18974 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18976         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18978 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18980         * config/nds32/nds32.md: Adjust indention.
18982 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
18984         * config/nds32/nds32.md (feature): New attribute.
18986 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
18988         * config/nds32/nds32.md (subtype): New attribute.
18990 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18992         PR target/85203
18993         * config/arm/arm-builtins.c (arm_expand_builtin): Change
18994         expansion to perform a bitwise AND of the argument followed by a
18995         boolean negation of the result.
18997 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
18999         PR rtl-optimization/84878
19000         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19001         the basic block.  Assert the use reference is not artificial and that
19002         it has an associated insn.
19004 2018-04-04  Michael Matz  <matz@suse.de>
19006         * builtins.c (compute_objsize): Pass correct operand
19007         to array_at_struct_end_p.
19009 2018-04-04  Richard Biener  <rguenther@suse.de>
19011         PR lto/85176
19012         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19013         from contexts for DINFO_LEVEL_TERSE and below.
19015 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19017         * config/nds32/nds32-doubleword.md (move_<mode>): Require
19018         resiter_operand condition.
19019         * config/nds32/nds32.md (*move<mode>): Ditto.
19021 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19022             Monk Chiang  <sh.chiang04@gmail.com>
19024         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19026 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19028         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19030 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19031             Kito Cheng  <kito.cheng@gmail.com>
19033         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19034         nds32_cond_code_str, output_cond_branch,
19035         output_cond_branch_compare_zero, nds32_expand_cbranch,
19036         nds32_expand_cstore, nds32_expand_movcc,
19037         nds32_output_cbranchsi4_equality_zero,
19038         nds32_output_cbranchsi4_equality_reg,
19039         nds32_output_cbranchsi4_equality_reg_or_const_int,
19040         nds32_output_cbranchsi4_greater_less_zero: New functions.
19041         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19042         nds32_expand_cstore, nds32_expand_movcc,
19043         nds32_output_cbranchsi4_equality_zero,
19044         nds32_output_cbranchsi4_equality_reg,
19045         nds32_output_cbranchsi4_equality_reg_or_const_int,
19046         nds32_output_cbranchsi4_greater_less_zero): Declare.
19047         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19048         nds32_rimm11s_operand): New predicates.
19049         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19050         * config/nds32/nds32.md: Rewrite all the branch and conditional move
19051         patterns.
19053 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19055         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19056         * config/nds32/nds32.md: Ditto.
19057         * config/nds32/pipelines.md: Ditto.
19059 2018-04-04  Richard Biener  <rguenther@suse.de>
19061         PR tree-optimization/85168
19062         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19063         propagating abnormals.
19065 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19067         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19069 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19070             Kito Cheng  <kito.cheng@gmail.com>
19072         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19073         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19074         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19075         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19076         * config/nds32/nds32.md (sibcall_internal): New.
19077         (sibcall_register): Remove.
19078         (sibcall_immediate): Remove.
19079         (sibcall_value_internal): New.
19080         (sibcall_value_register): Remove.
19081         (sibcall_value_immediate): Remove.
19082         * config/nds32/predicates.md (nds32_general_register_operand): New.
19083         (nds32_call_address_operand): New.
19085 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19087         PR rtl-optimization/85167
19088         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19089         bb_defs if *split_p, instead preinitialize it to NULL.
19091         PR tree-optimization/85156
19092         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19093         evaluating the argument multiple times.
19095 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
19097         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19098         than vector.
19099         (_mm_cvtpd_ps): Likewise.
19100         (_mm_cvttpd_epi32): Likewise.
19101         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19102         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19103         vector, pixel, and bool following altivec.h include.
19105 2018-04-03  Martin Sebor  <msebor@redhat.com>
19107         * doc/extend.texi (Common Function Attributes): Clarify.
19108         (const attribute): Likewise.
19109         (pure attribute): Likewise.
19111 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19113         PR target/85169
19114         * config/i386/i386.c (ix86_expand_vector_set): Use
19115         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
19117 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
19119         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19120         instructions when changing rounding bits to preserve precision bits
19121         in the x87 control word.
19123 2018-04-03  Martin Liska  <mliska@suse.cz>
19125         PR tree-optimization/82491
19126         * rtl.h (strip_offset_and_add): Replace += suboffset with
19127         poly_uint64 () + suboffset.
19129 2018-03-29  Martin Liska  <mliska@suse.cz>
19130             Martin Jambor  <mjambor@suse.cz>
19132         PR ipa/84947
19133         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19134         param_type is not an integral or pointer type.
19136 2018-04-03  Richard Biener  <rguenther@suse.de>
19138         * sese.h (recompute_all_dominators): Remove.
19140 2018-04-02  Martin Sebor  <msebor@redhat.com>
19142         * doc/invoke.texi (-Wrestrict): Fix typos.
19144 2018-04-02  Jim Wilson  <jimw@sifive.com>
19146         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19147         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19148         (<optab>di3, <optab>si3_extend): Likewise.
19149         (<optab>si3_mask, <optab>si3_mask_1): New.
19150         (<optab>di3_mask, <optab>di3_mask_1): New.
19151         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19152         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19153         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19155 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
19157         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19158         example.
19160 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19162         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19163         (nds32_canonicalize_comparison): New function.
19165 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19166             Kito Cheng  <kito.cheng@gmail.com>
19167             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19169         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19170         * config/nds32/constants.md (unspec_volatile_element): Add
19171         UNSPEC_VOLATILE_RELAX_GROUP.
19172         * config/nds32/nds32-relax-opt.c: New file.
19173         * config/nds32/nds32-predicates.c
19174         (nds32_symbol_load_store_p): New function.
19175         * config/nds32/nds32-protos.h
19176         (nds32_symbol_load_store_p): Declare function.
19177         (make_pass_nds32_relax_opt): Declare new rtl pass function.
19178         * config/nds32/nds32.c
19179         (nds32_register_pass): New function to register pass.
19180         (nds32_register_passes): New function to register passes.
19181         * config/nds32/nds32.md (relax_group): New pattern.
19182         * config/nds32/nds32.opt (mrelax-hint): New option.
19183         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19185 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
19187         * config/nds32/t-nds32: Modify files dependency.
19189 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19191         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19192         (PROFILE_HOOK): Define its implementation.
19194 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19196         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19197         type and 32-bit size.
19199 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
19201         PR middle-end/85090
19202         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19203         (V_128_256): New mode iterator.
19204         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19205         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19206         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19207         of V.
19208         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19209         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19211 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
19213         PR target/83315
19214         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19215         NaN inputs correctly.
19217 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
19219         PR target/80546
19220         * config/rs6000/vsx.md (??r): New mode attribute.
19221         (*vsx_mov<mode>_64bit): Use it.
19222         (*vsx_mov<mode>_32bit): Likewise.
19224 2018-03-30  Martin Sebor  <msebor@redhat.com>
19226         PR tree-optimization/84818
19227         * builtins.c (check_access): Use warning_n.
19229 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19231         PR target/83822
19232         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
19233         condition.
19234         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
19235         condition.
19237 2018-03-30  Julia Koval  <julia.koval@intel.com>
19239         PR target/84413
19240         * x86-tune.def (movx, partial_reg_dependency): Enable for
19241         m_SKYLAKE_AVX512.
19243 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
19245         PR inline-asm/84985
19246         * lra-constraints.c (process_alt_operands): Move setting
19247         this_alternative_matches below.
19249 2018-03-29  Martin Liska  <mliska@suse.cz>
19251         PR lto/84995.
19252         * doc/invoke.texi: Document how LTO works with debug info.
19253         Describe auto-load support of binutils.  Mention 'x86-64'
19254         as valid option value of -march option.
19256 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
19258         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
19260         PR c/85094
19261         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
19262         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
19263         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
19264         checking.
19266 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19268         PR target/84912
19269         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
19270         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
19271         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
19272         for RS6000_BTM_POWERPC64.
19273         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
19274         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
19275         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
19276         definition.
19277         (DIVDE): Use it.
19278         (DIVDEU): Likewise.
19280 2018-03-28  Carl Love  <cel@us.ibm.com>
19282         Revert
19283         2017-09-27  Carl Love  <cel@us.ibm.com>
19285         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
19286         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
19287         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
19288         fctiw instruction.
19290 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19292         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
19293         instead of __vector bool.
19294         (_mm_max_pu8): Likewise.
19295         (_mm_min_pi16): Likewise.
19297 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19299         PR target/84912
19300         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
19301         (DIVWEUO): Likewise.
19302         (DIVDEO): Likewise.
19303         (DIVDEUO): Likewise.
19304         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
19305         DIVWEUO and DIVDEUO.
19306         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
19307         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
19308         (div_extend): Likewise.
19309         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
19310         builtin function.
19311         (__builtin_divweuo): Likewise.
19312         (__builtin_divdeo): Likewise.
19313         (__builtin_divdeuo): Likewise.
19315 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
19317         PR target/85095
19318         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
19319         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
19321         PR tree-optimization/82004
19322         * gimple-match-head.c (optimize_pow_to_exp): New function.
19323         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
19324         Don't fold to exp if optimize_pow_to_exp is false.
19326 2018-03-28  Martin Liska  <mliska@suse.cz>
19328         PR other/84819
19329         * calls.c (initialize_argument_information): Fix trailing space.
19330         * common.opt: Fix typo and provide better explanation for
19331         -fsanitize-coverage option.
19332         * config/i386/i386.opt: Fix typo.
19334 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
19335             Martin Liska  <mliska@suse.cz>
19337         PR sanitizer/85081
19338         * gimplify.c (asan_poison_variable): Don't do the check for
19339         gimplify_omp_ctxp here.
19340         (gimplify_decl_expr): Do it here.
19341         (gimplify_target_expr): Likewise.
19343 2018-03-28  Martin Liska  <mliska@suse.cz>
19345         PR target/84988
19346         * config/i386/i386.c (ix86_function_arg_advance): Do not call
19347         chkp_type_bounds_count if MPX is not enabled.
19349 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19351         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
19353 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
19355         PR target/84914
19356         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
19357         function to create the function decl for complex long double
19358         multiply and divide for -mabi=ieeelongdouble.
19359         (init_float128_ieee): Call it.
19361 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
19363         PR target/85044
19364         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
19365         -fcf-protection=branch -mibt.
19366         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
19368 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19370         PR target/81863
19371         * config/arm/arm.c (arm_valid_symbolic_address): Handle
19372         arm_word_relocations.
19374 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
19376         PR target/85056
19377         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
19378         extern array declarations.
19380 2018-03-27  Richard Biener  <rguenther@suse.de>
19382         PR middle-end/84067
19383         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
19384         explicit single_use checks.
19386 2018-03-27  Richard Biener  <rguenther@suse.de>
19388         PR tree-optimization/85082
19389         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
19390         Valueize the VUSE.
19392 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19394         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
19395         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
19396         Turn on fasynchronous-unwind-tables and funwind-tables.
19398 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
19400         PR target/85073
19401         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
19402         (*bmi_blsr_<mode>_ccz): Ditto.
19404 2018-03-26  Tom de Vries  <tom@codesourcery.com>
19406         PR tree-optimization/85063
19407         * omp-general.c (offloading_function_p): New function.  Factor out
19408         of ...
19409         * omp-offload.c (pass_omp_target_link::gate): ... here.
19410         * omp-general.h (offloading_function_p): Declare.
19411         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
19412         with attribute omp declare target for offloading functions.
19414 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
19416         PR tree-optimization/84005
19417         * tree-data-ref.h (get_base_for_alignment): Declare.
19418         * tree-data-ref.c (get_base_for_alignment_1): New function.
19419         (get_base_for_alignment): Likewise.
19420         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
19421         get_base_for_alignment to find a suitable base object, instead
19422         of always using drb->base_address.
19424 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
19426         PR inline-asm/85022
19427         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
19428         known size by default.
19430 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
19432         PR inline-asm/85030
19433         * lra-constraints.c (process_alt_operands): Don't match BLKmode
19434         and non BLKmode operands.
19436 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19438         PR target/85026
19439         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
19440         Clean up attributes.
19442 2018-03-23  Richard Biener  <rguenther@suse.de>
19444         PR debug/85020
19445         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
19446         we are going to emit early debug for LTO.
19448 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
19450         PR inline-asm/85034
19451         * function.c (match_asm_constraints_1): Don't optimize if input
19452         doesn't satisfy general_operand predicate for output's mode.
19454         PR inline-asm/85022
19455         * alias.c (write_dependence_p): Don't require for x_canonicalized
19456         non-VOIDmode if x has VOIDmode.
19458         PR sanitizer/85029
19459         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
19460         just don't try to optimize it rather than assert it never happens.
19462 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19464         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
19465         macro expansions for definition of ST_INTERNAL_<mode> and
19466         LD_INTERNAL_<mode> builtins.
19467         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
19468         Remove prototype.
19469         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
19470         function.
19471         (altivec_expand_st_builtin): Likewise.
19472         (altivec_expand_builtin): Remove calls to deleted functions.
19473         (rs6000_address_for_altivec): Delete this function.
19474         * config/rs6000/vector.md: Remove expands for
19475         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
19477 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
19479         PR target/84826
19480         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
19481         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
19482         re-computing once computed.
19483         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
19484         (arm_init_machine_status): Initialize
19485         machine->static_chain_stack_bytes.
19487 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19489         PR target/84760
19490         * doc/extend.texi: Add four new prototypes for vec_ld.
19491         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
19492         definitions for more logical presentation.
19493         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
19494         entries for V1TI variants of __builtin_altivec_ld builtin.
19495         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
19496         handling of V1TI variant of LVX icode pattern.
19497         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
19498         (rs6000_gimple_fold_builtin): Likewise.
19499         (altivec_init_builtins): Add code to define
19500         __builtin_altivec_lvx_v1ti function.
19502 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19504         PR inline-asm/84941
19505         * function.c (match_asm_constraints_1): Don't do the optimization
19506         if input isn't a REG, SUBREG, MEM or constant.
19508 2018-03-22  Tom de Vries  <tom@codesourcery.com>
19510         PR tree-optimization/84956
19511         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
19512         bb_has_abnormal_pred.
19514 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19516         PR sanitizer/85018
19517         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
19518         DECL_INITIAL (decl) to decl at the end.
19519         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
19520         adjust the comment.
19522 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
19524         * doc/extend.texi (__builtin_tgmath): Document when complex
19525         integer types are treated as _Complex _Float64.
19527 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19529         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
19531 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19533         PR tree-optimization/84960
19534         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
19535         if it is ENTRY block, move them into single succ of ENTRY in that case.
19537 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
19539         PR tree-optimization/84811
19540         * poly-int.h (poly_span_traits): Remove the T3 parameter and
19541         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
19542         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
19543         (known_subrange_p): Update accordingly.  Cast each value involved
19544         in the size comparison, rather than casting the result of the
19545         subtraction.
19547 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19549         PR tree-optimization/84982
19550         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
19551         by flipping the least significant bit rather than all bits from
19552         bitpos to bitpos + bitsize - 1.
19554 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19556         * doc/extend.texi (Deprecated Features): Remove mention of
19557         long-deleted deprecations.
19559 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19561         PR jit/84288
19562         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
19563         * configure: Regenerate.
19565 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19567         PR tree-optimization/83126
19568         * tree-parloops.c (num_phis): New function.
19569         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
19571 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19573         * doc/extend.texi (Deprecated Features): Update deprecated flags,
19574         mention anon-struct/union members and trailing attributes.
19576 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
19578         PR tree-optimization/84969
19579         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
19580         builtin memset partitions if they set different rhs values.
19582 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19584         PR rtl-optimization/84989
19585         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
19586         VEC_DUPLICATE with scalar result mode.
19588 2018-03-21  Martin Liska  <mliska@suse.cz>
19590         PR ipa/84963
19591         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
19592         not intended return statement.
19594 2018-03-21  Martin Liska  <mliska@suse.cz>
19596         PR target/84988
19597         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
19598         (chkp_find_bound_slots_1): Limit number of iterations.
19600 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
19602         PR target/84838
19603         * Minor grammar fixes for x86 options.
19605 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19607         PR debug/84875
19608         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
19609         holding REG_CFA_RESTORE notes, instead turn them into a USE.
19611 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
19613         PR target/83789
19614         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
19615         (altivec_lvx_<mode>_1op): Likewise.
19616         (altivec_stvx_<mode>_2op): Likewise.
19617         (altivec_stvx_<mode>_1op): Likewise.
19618         (altivec_lvx_<VM2:mode>): New define_expand.
19619         (altivec_stvx_<VM2:mode>): Likewise.
19620         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
19621         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19622         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
19623         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19624         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
19625         (rs6000_gen_lvx): Likewise.
19626         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
19627         (altivec_expand_stv_builtin): Likewise.
19628         (altivec_expand_builtin): Likewise.
19629         * config/rs6000/vector.md: Likewise.
19631 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19633         PR target/82518
19634         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
19635         BYTES_BIG_ENDIAN.
19637 2018-03-20  Richard Biener  <rguenther@suse.de>
19639         PR target/84986
19640         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
19641         sign-conversions as zero, fall back to standard scalar_stmt
19642         cost for the rest.
19644 2018-03-20  Martin Liska  <mliska@suse.cz>
19646         PR ipa/84825
19647         * predict.c (rebuild_frequencies): Handle case when we have
19648         PROFILE_ABSENT, but flag_guess_branch_prob is false.
19650 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19652         PR target/84990
19653         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
19654         flag_section_anchors.
19655         * varasm.c (use_blocks_for_decl_p): Remove hack for
19656         dw2_force_const_mem.
19658         PR target/84845
19659         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
19660         to ...
19661         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
19662         be created, use lowpart_subreg of operands[0] rather than operands[0]
19663         itself.
19664         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
19665         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
19666         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
19667         and n constraint instead of aarch64_shift_imm_di and Usd.
19668         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19669         (*aarch64_<optab>_reg_minus<mode>3): ... this.
19671 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
19673         PR target/82989
19674         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19675         to favor GPR over NEON registers.
19676         (<shift>di3_neon): Likewise.
19678 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19680         PR target/84952
19681         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19682         (nvptx_process_pars): Emit bar.sync asap and alap.
19684 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19686         PR target/84954
19687         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19688         seen_label if seen_label is already set.
19690 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19692         PR target/84945
19693         * config/i386/i386.c (fold_builtin_cpu): For features above 31
19694         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19695         Use 1U instead of 1.  Formatting fixes.
19697         PR c/84953
19698         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19699         instead of TREE_TYPE (s1) for the return value.
19701 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
19703         PR tree-optimization/84946
19704         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19705         bitsize + bitsize in poly_uint64 rather than poly_int64.
19707         PR sanitizer/78651
19708         * dwarf2asm.c: Include fold-const.c.
19709         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19710         of decl rather than decl itself.
19712         PR rtl-optimization/84643
19713         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19715 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
19717         PR sanitizer/78651
19718         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19719         calling assemble_variable.
19721 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
19723         PR target/81647
19724         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19725         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19727 2018-03-19  Jim Wilson  <jimw@sifive.com>
19729         PR bootstrap/84856
19730         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19731         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19732         (riscv_first_stack_step): Likewise.
19733         (riscv_option_override): Use STACK_BOUNDARY instead of
19734         MIN_STACK_BOUNDARY.
19735         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19736         MIN_STACK_BOUNDARY.
19737         (BIGGEST_ALIGNMENT): Set to 128.
19738         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19739         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19740         STACK_BOUNDARY.
19742 2018-03-19  Richard Biener  <rguenther@suse.de>
19744         PR tree-optimization/84933
19745         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19746         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19748 2018-03-19  Richard Biener  <rguenther@suse.de>
19750         PR tree-optimization/84859
19751         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19752         (cond_if_else_store_replacement): Perform sinking operation on
19753         single-store BBs regardless of MAX_STORES_TO_SINK setting.
19754         Generalize what a BB with a single eligible store is.
19756 2018-03-19  Richard Biener  <rguenther@suse.de>
19758         PR tree-optimization/84929
19759         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19760         chrec_is_positive against non-chrec arg.
19762 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
19764         PR target/84711
19765         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19767 2018-03-18  Martin Liska  <mliska@suse.cz>
19769         PR rtl-optimization/84635
19770         * regrename.c (build_def_use): Use matches_mode only when
19771         matches >= 0.
19773 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
19775         PR tree-optimization/84913
19776         * tree-vect-loop.c (vectorizable_reduction): Don't try to
19777         vectorize chains of COND_EXPRs.
19779 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19781         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19783 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19785         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19787 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19789         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19791 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19792             Kito Cheng  <kito.cheng@gmail.com>
19794         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19795         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19796         (nds32_adjust_reg_alloc_order): New function.
19797         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19799 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
19801         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19802         nds32_print_operand, nds32_print_operand_address): Use
19803         HOST_WIDE_INT_PRINT_DEC instead.
19805 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19807         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19809 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
19811         PR target/84902
19812         * config/i386/i386.c (initial_ix86_tune_features,
19813         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19814         unsigned long long.
19815         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19816         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19817         rather than 1u << ix86_tune.  Formatting fix.
19818         (ix86_option_override_internal): Change ix86_arch_mask from
19819         unsigned int to unsigned HOST_WIDE_INT, initialize to
19820         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19821         (ix86_function_specific_restore): Likewise.
19823 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19825         PR target/84899
19826         * postreload.c (reload_combine_recognize_pattern): Perform
19827         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19828         truncate_int_for_mode the result for the destination's mode.
19830         PR c/84909
19831         * hsa-gen.c (mem_type_for_type): Fix comment typo.
19832         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19833         Likewise.
19834         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19835         Likewise.
19837 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
19839         PR target/84876
19840         * lra-assigns.c (lra_split_hard_reg_for): Don't use
19841         regno_allocno_class_array and sorted_pseudos.
19842         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19843         insns where regno is used.
19845 2018-03-16  Martin Liska  <mliska@suse.cz>
19847         PR ipa/84833
19848         * multiple_target.c (create_dispatcher_calls): Redirect
19849         reference in the symbol table.
19851 2018-03-16  Martin Liska  <mliska@suse.cz>
19853         PR ipa/84722
19854         * multiple_target.c (create_dispatcher_calls): Redirect also
19855         an alias.
19857 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19859         PR c++/79937
19860         PR c++/82410
19861         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19862         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19863         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19865 2018-03-16  Julia Koval  <julia.koval@intel.com>
19867         * doc/invoke.texi (Skylake Server): Add CLWB.
19868         Cannonlake): Remove CLWB.
19870 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19872         PR tree-optimization/84841
19873         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19874         1 << 3.
19875         (FLOAT_ONE_CONST_TYPE): Define.
19876         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19877         (sort_by_operand_rank): Put entries with higher constant_type last
19878         rather than first to match comments.
19880 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
19882         * config/nios2/nios2.md (movsi_internal): Fix thinko in
19883         split predicate.
19885 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19887         PR c++/79085
19888         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19889         check and use address of target always.
19891 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
19893         PR target/84574
19894         * config/i386/i386.c (indirect_thunk_needed): Update comments.
19895         (indirect_thunk_bnd_needed): Likewise.
19896         (indirect_thunks_used): Likewise.
19897         (indirect_thunks_bnd_used): Likewise.
19898         (indirect_return_needed): New.
19899         (indirect_return_bnd_needed): Likewise.
19900         (output_indirect_thunk_function): Add a bool argument for
19901         function return.
19902         (output_indirect_thunk_function): Don't generate alias for
19903         function return thunk.
19904         (ix86_code_end): Call output_indirect_thunk_function to generate
19905         function return thunks.
19906         (ix86_output_function_return): Set indirect_return_bnd_needed
19907         and indirect_return_needed instead of indirect_thunk_bnd_needed
19908         and indirect_thunk_needed.
19910 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
19912         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19913         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19914         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19916 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
19917             Paul Hua <paul.hua.gm@gmail.com>
19919         PR c/84852
19920         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19922 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
19924         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19925         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19926         resp. SFmode cases.
19928 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
19930         PR target/84711
19931         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19932         instead of GET_MODE_SIZE when comparing Units.
19934 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
19936         PR target/68256
19937         * varasm.c (hash_section): Return an unchangeble hash value
19938         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19939         Return !aarch64_can_use_per_function_literal_pools_p ().
19941 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
19943         PR target/84860
19944         * optabs.c (emit_conditional_move): Pass address of cmode's copy
19945         rather than address of cmode as last argument to prepare_cmp_insn.
19947 2018-03-15  Julia Koval  <julia.koval@intel.com>
19949         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19950         F_AVX512VNNI, F_AVX512BITALG): New.
19952 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
19954         PR target/83451
19955         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
19956         insn for floating-point loads and stores.
19958 2018-03-14  Carl Love  <cel@us.ibm.com>
19960         * config/rs6000/rs6000-c.c: Add macro definitions for
19961         ALTIVEC_BUILTIN_VEC_PERMXOR.
19962         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19963         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19964         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19965         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19966         UNSPEC_VPERMXOR.
19967         * config/doc/extend.texi: Add prototypes for vec_permxor.
19969 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
19971         PR c/84852
19972         * diagnostic-show-locus.c (class layout_point): Convert m_line
19973         from int to linenum_type.
19974         (line_span::comparator): Use linenum "compare" function when
19975         comparing line numbers.
19976         (test_line_span): New function.
19977         (layout_range::contains_point): Convert param "row" from int to
19978         linenum_type.
19979         (layout_range::intersects_line_p): Likewise.
19980         (layout::will_show_line_p): Likewise.
19981         (layout::print_source_line): Likewise.
19982         (layout::should_print_annotation_line_p): Likewise.
19983         (layout::print_annotation_line): Likewise.
19984         (layout::print_leading_fixits): Likewise.
19985         (layout::annotation_line_showed_range_p): Likewise.
19986         (struct line_corrections): Likewise for field m_row.
19987         (line_corrections::line_corrections): Likewise for param "row".
19988         (layout::print_trailing_fixits): Likewise.
19989         (layout::get_state_at_point): Likewise.
19990         (layout::get_x_bound_for_row): Likewise.
19991         (layout::print_line): Likewise.
19992         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19993         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19994         * input.c (selftest::test_linenum_comparisons): New function.
19995         (selftest::input_c_tests): Call it.
19996         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19997         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19998         * selftest.h (ASSERT_GT): New macro.
19999         (ASSERT_GT_AT): New macro.
20000         (ASSERT_LT): New macro.
20001         (ASSERT_LT_AT): New macro.
20003 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
20005         PR rtl-optimization/84780
20006         * combine.c (distribute_links): Don't make a link based on pc_rtx.
20008 2018-03-14  Martin Liska  <mliska@suse.cz>
20010         * tree.c (record_node_allocation_statistics): Use
20011         get_stats_node_kind.
20012         (get_stats_node_kind): New function extracted from
20013         record_node_allocation_statistics.
20014         (free_node): Use get_stats_node_kind.
20016 2018-03-14  Richard Biener  <rguenther@suse.de>
20018         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20019         that the value-set of ANTIC_IN doesn't grow.
20021         Revert
20022         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20023         member.
20024         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20025         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20027 2018-03-14  Julia Koval  <julia.koval@intel.com>
20029         * config.gcc (icelake-client, icelake-server): New.
20030         (icelake): Remove.
20031         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20032         (initial_ix86_arch_features): Ditto.
20033         (PTA_SKYLAKE): Add SGX.
20034         (PTA_ICELAKE): Remove.
20035         (PTA_ICELAKE_CLIENT): New.
20036         (PTA_ICELAKE_SERVER): New.
20037         (ix86_option_override_internal): Split up icelake on icelake client and
20038         icelake server.
20039         (get_builtin_code_for_version): Ditto.
20040         (fold_builtin_cpu): Ditto.
20041         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20042         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20043         * config/i386/i386.h (processor_type): Ditto.
20044         * doc/invoke.texi: Ditto.
20046 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
20048         PR sanitizer/83392
20049         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20050         INTEGER_CST offset, add it together with bitpos / 8 and
20051         sign extend based on POINTER_SIZE.
20053         PR target/84844
20054         Revert
20055         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
20057         PR target/78090
20058         * config/i386/constraints.md (Yc): New register constraint.
20059         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20060         Use Yc constraint for alternative 2 of operand 0.  Remove
20061         preferred_for_speed attribute.
20063 2018-03-14  Richard Biener  <rguenther@suse.de>
20065         PR tree-optimization/84830
20066         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20067         with the old one to avoid oscillations.
20069 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
20071         PR target/83712
20072         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20073         pseudos.
20074         (assign_by_spills): Return a flag of reload assignment failure.
20075         Do not process the reload assignment failures.  Do not spill other
20076         reload pseudos if they has the same reg class.  Update n if
20077         necessary.
20078         (lra_assign): Add a return arg.  Set up from the result of
20079         assign_by_spills call.
20080         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20081         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20082         usage_insns if it is not NULL.
20083         (spill_hard_reg_in_range): New function.
20084         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20085         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20086         function prototypes.
20087         (lra_assign): Change prototype.
20088         * lra.c (lra): Add code to deal with fails by splitting hard reg
20089         live ranges.
20091 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
20093         * config/riscv/riscv.opt (mrelax): New option.
20094         * config/riscv/riscv.c (riscv_file_start): Emit ".option
20095         "norelax" when riscv_mrelax is disabled.
20096         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20098 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20100         PR target/84743
20101         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20102         reassociation for int modes.
20104 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20106         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20107         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20108         for big-endian.
20109         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20110         * config/aarch64/aarch64-sve.md
20111         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20112         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20113         (*extend<mode><Vwide>2): Rename to...
20114         (aarch64_sve_extend<mode><Vwide>2): ...this.
20115         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20116         renaming the old pattern to...
20117         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
20118         unsigned packs.
20119         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20120         define_expand, renaming the old pattern to...
20121         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20122         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20123         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20124         account when deciding which SVE instruction the optab should use.
20125         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20127 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20129         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20130         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20131         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20132         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20133         (tlsdesc_small_<mode>): Turn a define_expand and use
20134         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
20135         (tlsdesc_small_advsimd_<mode>): ...this.
20136         (tlsdesc_small_sve_<mode>): New pattern.
20138 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20140         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20141         (UNSPEC_UMUL_HIGHPART): New constants.
20142         (MUL_HIGHPART): New int iteraor.
20143         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20144         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20145         define_expand.
20146         (*<su>mul<mode>3_highpart): New define_insn.
20148 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
20150         PR lto/84805
20151         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20152         incomplete types.
20154 2018-03-13  Martin Liska  <mliska@suse.cz>
20156         PR ipa/84658.
20157         * (sem_item_optimizer::sem_item_optimizer): Initialize new
20158         vector.
20159         (sem_item_optimizer::~sem_item_optimizer): Release it.
20160         (sem_item_optimizer::merge_classes): Register variable aliases.
20161         (sem_item_optimizer::fixup_pt_set): New function.
20162         (sem_item_optimizer::fixup_points_to_sets): Likewise.
20163         * ipa-icf.h: Declare new variables and functions.
20165 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
20167         PR middle-end/84834
20168         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20169         integer_pow2p@2 and test integer_pow2p in condition.
20170         (A < 0 ? C : 0): Similarly for @1.
20172         PR middle-end/84831
20173         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20174         characters starting at p contain '\0' character, don't look beyond
20175         that.
20177         PR target/84827
20178         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20179         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20181         PR target/84828
20182         * reg-stack.c (change_stack): Change update_end var from int to
20183         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20184         also call set_block_for_insn on the newly added insns and rescan.
20186         PR target/84786
20187         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20188         on the last operand.
20190         PR c++/84704
20191         * tree.c (stabilize_reference_1): Return save_expr (e) for
20192         STATEMENT_LIST even if it doesn't have side-effects.
20194 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
20196         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20198 2018-03-12  Renlin Li  <renlin.li@arm.com>
20200         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20201         aarch64_output_scalar_simd_mov_immediate.
20203 2018-03-12  Martin Sebor  <msebor@redhat.com>
20205         PR tree-optimization/83456
20206         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20207         for perfectly overlapping calls to memcpy.
20208         (gimple_fold_builtin_memory_chk): Same.
20209         (gimple_fold_builtin_strcpy): Handle no-warning.
20210         (gimple_fold_builtin_stxcpy_chk): Same.
20211         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20213 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20215         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20216         parameter.  Use it for SFmode.
20217         (rs6000_function_arg_advance_1): Adjust.
20218         (rs6000_function_arg): Adjust.
20219         (rs6000_gimplify_va_arg): Pass false for that new parameter.
20221 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20223         PR rtl-optimization/84169
20224         PR rtl-optimization/84780
20225         * combine.c (can_combine_p): Check for a 2-insn combination whether
20226         the destination register is used between the two insns, too.
20228 2018-03-12  Richard Biener  <rguenther@suse.de>
20230         PR tree-optimization/84803
20231         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
20232         for refs DR analysis didn't process.
20234 2018-03-12  Richard Biener  <rguenther@suse.de>
20236         PR tree-optimization/84777
20237         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
20238         force-vectorize loops ignore whether we are optimizing for size.
20240 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20242         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
20243         (TARGET_MD_ASM_ADJUST): Define.
20245 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
20246             Kito Cheng  <kito.cheng@gmail.com>
20247             Chung-Ju Wu  <jasonwucj@gmail.com>
20249         * config/nds32/nds32.c (nds32_compute_stack_frame,
20250         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
20251         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
20252         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
20253         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
20254         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
20255         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
20256         * config/nds32/nds32.md (prologue, epilogue): Use macro
20257         NDS32_V3PUSH_AVAILABLE_P to do checking.
20259 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
20261         PR debug/58150
20262         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
20263         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
20264         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
20265         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
20266         addition of most attributes on !orig_type_die or the attribute not
20267         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
20269 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20270             Chung-Ju Wu  <jasonwucj@gmail.com>
20272         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
20273         __NDS32_VH__ macro.
20274         * config/nds32/nds32.opt (mvh): New option.
20276 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20277             Chung-Ju Wu  <jasonwucj@gmail.com>
20279         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
20280         function.
20281         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
20282         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
20283         definition.
20285 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20286             Chung-Ju Wu  <jasonwucj@gmail.com>
20288         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
20289         function.
20290         * config/nds32/nds32-multiple.md (strlensi): New pattern.
20291         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
20293 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
20294             Kito Cheng  <kito.cheng@gmail.com>
20295             Chung-Ju Wu  <jasonwucj@gmail.com>
20297         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
20298         UNSPEC_FFMISM and UNSPEC_FLMISM.
20299         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
20300         for ffb, ffmism and flmism.
20301         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
20302         (unspec_ffmism): Ditto.
20303         (unspec_flmism): Ditto.
20304         (nds32_expand_builtin_impl): Check if string extension is available.
20305         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
20306         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
20308 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
20310         Reverting patch:
20311         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
20313         PR target/83712
20314         * lra-assigns.c (assign_by_spills): Return a flag of reload
20315         assignment failure.  Do not process the reload assignment
20316         failures.  Do not spill other reload pseudos if they has the same
20317         reg class.
20318         (lra_assign): Add a return arg.  Set up from the result of
20319         assign_by_spills call.
20320         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20321         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20322         usage_insns if it is not NULL.
20323         (spill_hard_reg_in_range): New function.
20324         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20325         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20326         function prototypes.
20327         (lra_assign): Change prototype.
20328         * lra.c (lra): Add code to deal with fails by splitting hard reg
20329         live ranges.
20331 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
20333         PR target/84807
20334         * config/i386/i386.opt: Replace Enforcment with Enforcement.
20336 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
20338         PR debug/84620
20339         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
20340         (dw_val_node): Add val_symbolic_view.
20341         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
20342         (symview_upper_bound): New.
20343         (new_line_info_table): Initialize symviews_since_reset.
20344         (dwarf2out_source_line): Count symviews_since_reset and set
20345         symview_upper_bound.
20346         (dw_val_equal_p): Handle symview.
20347         (add_AT_symview): New.
20348         (print_dw_val): Handle symview.
20349         (attr_checksum, attr_checksum_ordered): Likewise.
20350         (same_dw_val_p, size_of_die): Likewise.
20351         (value_format, output_die): Likewise.
20352         (add_high_low_attributes): Use add_AT_symview for entry_view.
20353         (dwarf2out_finish): Reset symview_upper_bound, clear
20354         zero_view_p.
20356 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
20358         PR target/83969
20359         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
20360         Add strict argument and use it.
20361         (rs6000_split_multireg_move): Update for new strict argument.
20362         (mem_operand_gpr): Disallow all non-offsettable addresses.
20363         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
20365 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
20367         PR target/84772
20368         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
20369         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
20370         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
20372         PR c++/84767
20373         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
20374         decl, use remap_type if we want to use the type.
20376 2018-03-09  Martin Sebor  <msebor@redhat.com>
20378         PR tree-optimization/84526
20379         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20380         Remove dead code.
20381         (builtin_access::generic_overlap): Be prepared to handle non-array
20382         base objects.
20384 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
20386         PR rtl-optimization/84682
20387         * lra-constraints.c (process_address_1): Check is_address flag
20388         for address constraints.
20389         (process_alt_operands): Likewise.
20390         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
20391         preprocess_constraints.
20392         * recog.h (preprocess_constraints): Add oploc parameter.
20393         Adjust callers.
20394         * recog.c (preprocess_constraints): Test address_operand for
20395         CT_ADDRESS constraints.
20397 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
20399         PR target/83712
20400         * lra-assigns.c (assign_by_spills): Return a flag of reload
20401         assignment failure.  Do not process the reload assignment
20402         failures.  Do not spill other reload pseudos if they has the same
20403         reg class.
20404         (lra_assign): Add a return arg.  Set up from the result of
20405         assign_by_spills call.
20406         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20407         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20408         usage_insns if it is not NULL.
20409         (spill_hard_reg_in_range): New function.
20410         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20411         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20412         function prototypes.
20413         (lra_assign): Change prototype.
20414         * lra.c (lra): Add code to deal with fails by splitting hard reg
20415         live ranges.
20417 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20419         PR target/83193
20420         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
20421         Accept complain bool parameter.  Only emit errors if it is true.
20422         (arm_parse_cpu_option_name): Likewise.
20423         (arm_target_thumb_only): Adjust callers of the above.
20424         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
20425         prototype to take a default true bool parameter.
20426         (arm_parse_arch_option_name): Likewise.
20428 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
20429             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
20431         PR jit/64089
20432         PR jit/84288
20433         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
20434         * configure: Regenerate.
20435         * configure.ac ("linker --version-script option"): New.
20436         ("linker soname option"): New.
20438 2018-03-09  Richard Biener  <rguenther@suse.de>
20440         PR tree-optimization/84775
20441         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
20442         immediate uses of predicate stmts and mark them modified.
20444         Revert
20445         PR tree-optimization/84178
20446         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20447         to caller.
20448         (version_loop_for_if_conversion): Delay update_ssa call.
20449         (tree_if_conversion): Delay update_ssa until after predicate
20450         insertion.
20452 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
20454         PR target/84763
20455         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
20456         when the function accesses prior frames.
20458 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20460         PR debug/84456
20461         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
20462         gen_llsym, otherwise call maybe_gen_llsym.
20464         PR inline-asm/84742
20465         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
20466         has ',' character inside of it.
20468 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20470         PR target/84748
20471         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
20472         as clobbering CC_REGNUM.
20474 2018-03-08  Richard Biener  <rguenther@suse.de>
20476         PR middle-end/84552
20477         * tree-scalar-evolution.c: Include tree-into-ssa.h.
20478         (follow_copies_to_constant): Do not follow SSA names registered
20479         for update.
20481 2018-03-08  Richard Biener  <rguenther@suse.de>
20483         PR tree-optimization/84178
20484         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20485         to caller.
20486         (version_loop_for_if_conversion): Delay update_ssa call.
20487         (tree_if_conversion): Delay update_ssa until after predicate
20488         insertion.
20490 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
20492         PR tree-optimization/84178
20493         * tree-if-conv.c (release_bb_predicate): Remove the
20494         the assertion that the stmts have NULL use_ops.
20495         Discard the statements, asserting that they haven't
20496         yet been added to a BB.
20498 2018-03-08  Richard Biener  <rguenther@suse.de>
20500         PR tree-optimization/84746
20501         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
20502         (phi_translate): Pass in destination ANTIC_OUT set.
20503         (phi_translate_1): Likewise.  For a simplified result lookup
20504         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
20505         (phi_translate_set): Adjust.
20506         (do_pre_regular_insertion): Likewise.
20507         (do_pre_partial_partial_insertion): Likewise.
20509 2018-03-08  Martin Liska  <mliska@suse.cz>
20511         PR gcov-profile/84735
20512         * doc/gcov.texi: Document usage of profile files.
20513         * gcov-io.h: Document changes in the format.
20515 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
20517         PR debug/84404
20518         PR debug/84408
20519         * dwarf2out.c (struct dw_line_info_table): Update comments for
20520         view == -1.
20521         (FORCE_RESET_NEXT_VIEW): New.
20522         (FORCE_RESETTING_VIEW_P): New.
20523         (RESETTING_VIEW_P): Check for -1 too.
20524         (ZERO_VIEW_P): Likewise.
20525         (new_line_info_table): Force-reset next view.
20526         (dwarf2out_begin_function): Likewise.
20527         (dwarf2out_source_line): Simplify zero_view_p initialization.
20528         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
20529         view directly.  Omit view when omitting .loc at line 0.
20531 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20533         PR tree-optimization/84740
20534         * tree-switch-conversion.c (process_switch): Call build_constructors
20535         only if info.phi_count is non-zero.
20537         PR tree-optimization/84739
20538         * tree-tailcall.c (find_tail_calls): Check call arguments against
20539         DECL_ARGUMENTS (current_function_decl) rather than
20540         DECL_ARGUMENTS (func) when checking for tail recursion.
20542 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20544         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
20545         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
20546         Volker Reichelt's entry and add entries for people that perform
20547         GCC fuzzy testing and report numerous bugs.
20549 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
20551         PR target/82411
20552         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
20553         readonly data in sdata, if that is disabled.
20554         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
20555         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
20556         -mreadonly-in-sdata option.
20558 2018-03-07  Martin Sebor  <msebor@redhat.com>
20560         PR tree-optimization/84468
20561         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
20562         basic block when looking for nul assignment.
20564 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
20566         PR target/84277
20567         * except.h (output_function_exception_table): Adjust prototype.
20568         * except.c (output_function_exception_table): Remove FNNAME parameter
20569         and add SECTION parameter.  Ouput one part of the table at a time.
20570         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
20571         the first part of the exception table and emit unwind directives.
20572         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
20573         (i386_pe_seh_cold_init): Likewise.
20574         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
20575         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
20576         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
20577         (ix86_output_call_insn): Emit a nop in one more case for SEH.
20578         * config/i386/winnt.c: Include except.h.
20579         (struct seh_frame_state): Add reg_offset, after_prologue and
20580         in_cold_section fields.
20581         (i386_pe_seh_end_prologue): Set seh->after_prologue.
20582         (i386_pe_seh_cold_init): New function.
20583         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
20584         to seh->in_cold_section.
20585         (seh_emit_push): Record the offset of the push.
20586         (seh_emit_save): Record the offet of the save.
20587         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
20588         Test seh->after_prologue to disregard the epilogue.
20589         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
20590         (i386_pe_end_cold_function): New function.
20592 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20594         PR fortran/84565
20595         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
20596         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
20598         PR c++/84704
20599         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
20600         on tmp_var.
20601         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
20602         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
20604         PR middle-end/84723
20605         * multiple_target.c: Include tree-inline.h and intl.h.
20606         (expand_target_clones): Diagnose and fail if node->definition and
20607         !tree_versionable_function_p (node->decl).
20609 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
20611         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
20612         sprint_ul.
20613         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
20614         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
20615         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
20617 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20619         PR target/84710
20620         * combine.c (try_combine): Use reg_or_subregno instead of handling
20621         just paradoxical SUBREGs and REGs.
20623 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
20625         * config/arc/arc.c (arc_finalize_pic): Remove function.
20626         (arc_must_save_register): We use single base PIC register, remove
20627         checks to save/restore the PIC register.
20628         (arc_expand_prologue): Likewise.
20629         * config/arc/arc-protos.h (arc_set_default_type_attributes):
20630         Remove.
20631         (arc_verify_short): Likewise.
20632         (arc_attr_type): Likewise.
20633         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
20634         (walk_stores): Likewise.
20635         (arc_address_cost): Make it static.
20636         (arc_verify_short): Likewise.
20637         (branch_dest): Likewise.
20638         (arc_attr_type): Likewise.
20639         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
20640         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
20641         (arc_final_prescan_insn): Remove inserting the nops due to
20642         hardware hazards.  It is done in reorg step.
20643         (insn_length_variant_t): Remove.
20644         (insn_length_parameters_t): Likewise.
20645         (arc_insn_length_parameters): Likewise.
20646         (arc_get_insn_variants): Likewise.
20647         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
20649 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20651         PR inline-asm/84683
20652         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
20653         assertion failure.
20655         PR tree-optimization/84687
20656         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
20657         on new_node->decl.
20658         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
20660 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20662         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
20663         Rename to ppc_speculation_barrier.
20664         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
20665         __builtin_ppc_speculation_barrier.
20667 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20669         PR target/84700
20670         * combine.c (combine_simplify_rtx): Don't try to simplify if
20671         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20672         are equal to x.
20674 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
20676         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20677         to 32 bytes when compiling for POWER9.
20679 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20681         PR target/84564
20682         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20683         regparm >= 3 with no arg reg available also for calls with
20684         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
20686         PR target/84524
20687         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20688         orig,vex.
20689         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
20691 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
20693         PR target/84264
20694         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20696 2018-03-05  Richard Biener  <rguenther@suse.de>
20698         PR tree-optimization/84486
20699         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20700         When inserting a __builtin_assume_aligned call set the LHS
20701         SSA name alignment info accordingly.
20703 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
20705         PR tree-optimization/84114
20706         * config/aarch64/aarch64.c (aarch64_reassociation_width)
20707         Avoid reassociation of FLOAT_MODE addition.
20709 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
20711         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20712         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20713         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20714         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20715         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20716         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20717         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20718         and -mwbnoinvd.
20719         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20720         __builtin_ia32_wbinvd): New builtins.
20721         (SPECIAL_ARGS2): New.
20722         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20723         (SPECIAL_ARGS2): New.
20724         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20725         (ix86_valid_target_attribute_inner_p): Ditto.
20726         (ix86_init_mmx_sse_builtins): Add special_args2.
20727         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20728         TARGET_WBNOINVD_P): New.
20729         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20730         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20731         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20732         * config/i386/immintrin.h (_wbinvd): New intrinsic.
20733         * config/i386/pconfigintrin.h: New file.
20734         * config/i386/wbnoinvdintrin.h: Ditto.
20735         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20736         wbnoinvdintrin.h.
20737         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20739 2018-03-05  Richard Biener  <rguenther@suse.de>
20741         PR tree-optimization/84670
20742         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20743         member.
20744         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20745         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20746         (compute_antic_aux): Only assert the number of values in ANTIC_IN
20747         doesn't grow if all successors (recursively) were visited at least
20748         once.
20750 2018-03-05  Richard Biener  <rguenther@suse.de>
20752         PR tree-optimization/84650
20753         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20754         if executed in the loop pipeline.
20756 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
20758         * doc/configfiles.texi (Configuration Files): Move info about
20759         conditionalizing $target-protos.h to...
20760         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
20761         differs from $target-protos.h.
20763 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
20764             Chung-Ju Wu  <jasonwucj@gmail.com>
20766         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20767         * config/nds32/nds32-multiple.md (setmemsi): Define.
20768         * config/nds32/nds32-memory-manipulation.c
20769         (nds32_gen_dup_4_byte_to_word_value): New.
20770         (emit_setmem_word_loop): New.
20771         (emit_setmem_byte_loop): New.
20772         (nds32_expand_setmem_loop): New.
20773         (nds32_expand_setmem_loop_v3m): New.
20774         (nds32_expand_setmem_unroll): New.
20775         (nds32_expand_setmem): New.
20777 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20778             Chung-Ju Wu  <jasonwucj@gmail.com>
20780         * config/nds32/nds32-memory-manipulation.c
20781         (nds32_emit_load_store): New.
20782         (nds32_emit_post_inc_load_store): New.
20783         (nds32_emit_mem_move): New.
20784         (nds32_emit_mem_move_block): New.
20785         (nds32_expand_movmemsi_loop_unknown_size): New.
20786         (nds32_expand_movmemsi_loop_known_size): New.
20787         (nds32_expand_movmemsi_loop): New.
20788         (nds32_expand_movmemsi_unroll): New.
20789         (nds32_expand_movmemqi): Rename ...
20790         (nds32_expand_movmemsi): ... to this.
20791         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20792         (movmemsi): ... to this.
20793         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20794         (nds32_expand_movmemsi): ... to this.
20796 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20797             Monk Chiang  <sh.chiang04@gmail.com>
20798             Chung-Ju Wu  <jasonwucj@gmail.com>
20800         * config/nds32/nds32-protos.h
20801         (nds32_expand_load_multiple): New arguments.
20802         (nds32_expand_store_multiple): Ditto.
20803         (nds32_valid_multiple_load_store): Rename ...
20804         (nds32_valid_multiple_load_store_p): ... to this.
20805         * config/nds32/nds32-memory-manipulation.c
20806         (nds32_expand_load_multiple): Refine implementation.
20807         (nds32_expand_store_multiple): Ditto.
20808         * config/nds32/nds32-multiple.md
20809         (load_multiple): Update nds32_expand_load_multiple interface.
20810         (store_multiple): Update nds32_expand_store_multiple interface.
20811         * config/nds32/nds32-predicates.c
20812         (nds32_valid_multiple_load_store): Rename ...
20813         (nds32_valid_multiple_load_store_p): ... to this and refine
20814         implementation.
20815         * config/nds32/predicates.md
20816         (nds32_load_multiple_and_update_address_operation): New predicate.
20817         (nds32_store_multiple_and_update_address_operation): New predicate.
20819 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20820             Chung-Ju Wu  <jasonwucj@gmail.com>
20822         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20823         (combo): New attribute.
20824         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20826 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20828         * config/nds32/nds32.opt: Change -mcmodel= default value.
20830 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
20831             Monk Chiang  <sh.chiang04@gmail.com>
20832             Chung-Ju Wu  <jasonwucj@gmail.com>
20834         * config/nds32/constants.md (unspec_element): New enum.
20835         * config/nds32/constraints.md (Umw): New constraint.
20836         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20837         * config/nds32/nds32-intrinsic.md: Likewise.
20838         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20839         (nds32_valid_smw_lwm_base_p): New.
20840         (nds32_output_smw_single_word): New.
20841         (nds32_output_lmw_single_word): New.
20842         (nds32_expand_unaligned_load): New.
20843         (nds32_expand_unaligned_store): New.
20844         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20845         (nds32_output_smw_single_word): Declare.
20846         (nds32_output_lmw_single_word): Declare.
20847         (nds32_expand_unaligned_load): Declare.
20848         (nds32_expand_unaligned_store): Declare.
20849         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20850         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20851         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20852         NDS32_BUILTIN_UASTORE_DW.
20853         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20854         predicate.
20856 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
20857             Kito Cheng  <kito.cheng@gmail.com>
20858             Chung-Ju Wu  <jasonwucj@gmail.com>
20860         * config/nds32/nds32-intrinsic.c
20861         (nds32_expand_builtin_null_ftype_reg): Delete.
20862         (nds32_expand_builtin_reg_ftype_imm): Ditto.
20863         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20864         (nds32_read_argument): New.
20865         (nds32_legitimize_target): Ditto.
20866         (nds32_legitimize_argument): Ditto.
20867         (nds32_check_constant_argument): Ditto.
20868         (nds32_expand_unop_builtin): Ditto.
20869         (nds32_expand_unopimm_builtin): Ditto.
20870         (nds32_expand_binop_builtin): Ditto.
20871         (nds32_builtin_decl_impl): Ditto.
20872         (builtin_description): Ditto.
20873         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20874         (nds32_init_builtins_impl): Ditto.
20875         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20876         (nds32_builtin_decl): New.
20877         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20878         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20880 2018-03-02  Jeff Law  <law@redhat.com>
20882         * reorg.c (stop_search_p): Handle DEBUG_INSN.
20883         (redundant_insn, fill_simple_delay_slots): Likewise.
20884         (fill_slots_from_thread): Likewise.
20885         * resource.c (mark_referenced_resources): Likewise.
20886         (mark_set_resources, find_dead_or_set_registers): Likewise.
20888 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20890         * substring-locations.h (format_warning_va): Formatting fix for
20891         ATTRIBUTE_GCC_DIAG.
20892         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20893         argument.
20894         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20895         * substring-locations.c: Include intl.h.
20896         (format_warning_va): Turned into small wrapper around
20897         format_warning_n_va, renamed to ...
20898         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20899         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20900         use ngettext.
20901         (format_warning_at_substring_n): New function.
20902         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20903         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
20904         format_warning_at_substring with just a shorter name instead of
20905         const function pointer.
20906         (fmtwarn_n): New function.
20907         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20908         appropriate, get rid of all the fmtstr temporaries, move conditionals
20909         with G_() wrapped string literals directly into fmtwarn arguments,
20910         cast dir.len to (int), formatting fixes.
20912 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
20914         * doc/invoke.texi: Remove "Cilk Plus" references.
20916 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20917             Richard Biener  <rguenther@suse.de>
20919         PR ipa/84628
20920         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20921         for error or warning attributes if CALL_FROM_THUNK_P is set.
20922         Formatting fixes.
20924 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20926         PR target/56540
20927         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20928         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20930         PR target/56540
20931         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20932         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20934         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20935         instead of -1U in last predictors element's probability member.
20937 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20939         PR ipa/83983
20940         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20941         arguments if they are comparable.
20943 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20945         PR tree-optimization/84634
20946         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20947         masks and masked_loop_p with a single loop_masks, making sure it's
20948         null for bb vectorization.
20950 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
20952         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20953         (vect_analyze_data_ref_access): Use loop->safe_len rather than
20954         loop->force_vectorize to check whether there is no alias.
20956 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
20958         PR target/84614
20959         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20960         prototypes.
20961         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20962         comments.
20963         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20964         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20965         instead of a loop around prev_real_insn.
20966         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20967         prev_real_insn.
20969         PR inline-asm/84625
20970         * config/i386/i386.c (ix86_print_operand): Use conditional
20971         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20972         zero vector.
20974 2018-03-02  Richard Biener  <rguenther@suse.de>
20976         PR tree-optimization/84427
20977         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20978         (bitmap_set_subtract_values): Rewrite to handle multiple
20979         exprs per value.
20980         (clean): Likewise.
20981         (prune_clobbered_mems): Likewise.
20982         (phi_translate): Take edge instead of pred/phiblock.
20983         (phi_translate_1): Likewise.
20984         (phi_translate_set): Likewise.  Insert all translated
20985         exprs for a value into the set, keeping possibly multiple
20986         expressions per value.
20987         (compute_antic_aux): Adjust for phi_translate changes.
20988         When intersecting union the expressions and prune those
20989         not in the final value set, keeping possibly multiple
20990         expressions per value.  Do not use value-insertion
20991         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20992         all expressions.  Add verification that the value-sets
20993         only shrink during iteration.
20994         (compute_partial_antic_aux): Adjust for the phi_translate changes.
20995         (do_pre_regular_insertion): Likewise.
20996         (do_pre_partial_partial_insertion): Likewise.
20998 2018-03-02  Richard Biener  <rguenther@suse.de>
21000         PR target/82005
21001         * config/darwin.c (saved_debug_info_level): New static global.
21002         (darwin_asm_lto_start): Disable debug info generation for LTO out.
21003         (darwin_asm_lto_end): Restore debug info generation settings.
21005 2018-03-01  Martin Liska  <mliska@suse.cz>
21007         PR sanitizer/82484
21008         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21009         volatile arguments.
21011 2018-03-01  Richard Biener  <rguenther@suse.de>
21013         PR debug/84645
21014         * dwarf2out.c (gen_variable_die): Properly handle late VLA
21015         type annotation with LTO when debug was disabled at compile-time.
21017 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
21019         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21020         XINT with INTVAL.
21021         (mips_final_postscan_insn): Likewise.
21023 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
21025         PR rtl-optimization/84528
21026         * alias.c (init_alias_target): Add commentary.
21027         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21028         a unique base value if the frame pointer is not eliminated
21029         to the stack pointer.
21031 2018-03-01  Tom de Vries  <tom@codesourcery.com>
21033         PR rtl-optimization/83327
21034         * lra-int.h (hard_regs_spilled_into): Declare.
21035         * lra.c (hard_regs_spilled_into): Define.
21036         (init_reg_info): Init hard_regs_spilled_into.
21037         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21038         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21039         (process_bb_lives): Handle hard_regs_spilled_into.
21040         (lra_create_live_ranges_1): Before doing liveness propagation, clear
21041         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21043 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
21045         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21046         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21047         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21048         * config/rs6000/aix72.h: New file.
21050 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
21052         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21053         instead of warning_at with conditional singular and plural messages
21054         where possible.
21056         PR target/52991
21057         * stor-layout.c (update_alignment_for_field): For
21058         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21059         && !DECL_PACKED (field), do the alignment update, just use
21060         only desired_align instead of MAX (type_align, desired_align)
21061         as the alignment.
21062         (place_field): Don't do known_align < desired_align handling
21063         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21064         is non-NULL, instead do it after rli->prev_field handling and
21065         only if not within a bitfield word.  For DECL_PACKED (field)
21066         use type_align of BITS_PER_UNIT.
21068 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
21070         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21071         superfluous parentheses and trailing spaces.
21073 2018-02-28  Richard Biener  <rguenther@suse.de>
21075         PR tree-optimization/84584
21076         * graphite-scop-detection.c (scop_detection::add_scop): Discard
21077         SCoPs with fake exit edge.
21079 2018-02-28  Martin Liska  <mliska@suse.cz>
21081         PR testsuite/84597
21082         * timevar.c (timer::print): Fix format to properly print 100%
21083         values.
21085 2018-02-28  Richard Biener  <rguenther@suse.de>
21087         PR middle-end/84607
21088         * genmatch.c (capture_info::walk_match): Do not mark
21089         captured expressions without operands as expr_p given
21090         they act more like predicates and should be subject to
21091         "lost tail" side-effect preserving.
21093 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
21095         PR rtl-optimization/81611
21096         * auto-inc-dec.c (attempt_change): Move dead note from
21097         mem_insn if it's the next use of regno
21098         (find_address): Take address use of reg holding
21099         non-incremented value.  Add parm to limit search to the named
21100         reg only.
21101         (merge_in_block): Attempt to use a mem insn that is the next
21102         use of the original regno.
21104 2018-02-27  Martin Sebor  <msebor@redhat.com>
21106         PR c++/83871
21107         * doc/invoke.texi (-Wmissing-attributes): New option.
21108         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21110 2018-02-27  Martin Sebor  <msebor@redhat.com>
21112         PR translation/84207
21113         * diagnostic-core.h (warning_n, error_n, inform_n): Change
21114         n argument to unsigned HOST_WIDE_INT.
21115         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21116         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
21117         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21118         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21120 2018-02-27  Richard Biener  <rguenther@suse.de>
21122         PR tree-optimization/84512
21123         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21124         Do not use the estimate returned from record_stmt_cost for
21125         the scalar iteration cost but sum properly using add_stmt_cost.
21127 2018-02-27  Richard Biener  <rguenther@suse.de>
21129         PR tree-optimization/84466
21130         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21131         Adjust last change to less strictly validate use operands.
21133 2018-02-27  Martin Liska  <mliska@suse.cz>
21135         PR gcov-profile/84548
21136         * gcov.c (process_file): Allow partial overlap and consider it
21137         also as group functions.
21138         (output_lines): Properly calculate range of lines for a group.
21140 2018-02-27  Martin Liska  <mliska@suse.cz>
21142         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21143         'ggc' suffixes.  Change first column width.
21144         (timer::print): Fix formatting of the column.
21146 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
21148         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21149         preserve inline entry blocks for the sake of debug inline
21150         entry point markers alone.
21151         (remove_unused_locals): Suggest in comments a better place to
21152         force the preservation of inline entry blocks that are
21153         otherwise unused, but do not preserve them.
21155 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21157         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21159 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21161         PR target/84039
21162         * config/i386/constraints.md (Bs): Replace
21163         ix86_indirect_branch_register with
21164         TARGET_INDIRECT_BRANCH_REGISTER.
21165         (Bw): Likewise.
21166         * config/i386/i386.md (indirect_jump): Likewise.
21167         (tablejump): Likewise.
21168         (*sibcall_memory): Likewise.
21169         (*sibcall_value_memory): Likewise.
21170         Peepholes of indirect call and jump via memory: Likewise.
21171         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21172         (*sibcall_value_GOT_32): Likewise.
21173         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21174         (GOT_memory_operand): Likewise.
21175         (call_insn_operand): Likewise.
21176         (sibcall_insn_operand): Likewise.
21177         (GOT32_symbol_operand): Likewise.
21178         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21180 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21182         PR rtl-optimization/83496
21183         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21184         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
21185         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21186         redundant insn, if any.
21187         (relax_delay_slots): Likewise.
21188         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21190 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
21192         PR tree-optimization/83965
21193         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21194         that grouped statements are part of a reduction chain.  Return
21195         true if the statement is not marked as a reduction itself but
21196         is part of a group.
21197         (vect_recog_dot_prod_pattern): Don't check whether the statement
21198         is part of a group here.
21199         (vect_recog_sad_pattern): Likewise.
21200         (vect_recog_widen_sum_pattern): Likewise.
21202 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21204         PR debug/84545
21205         * final.c (rest_of_clean_state): Also look for calls inside sequences.
21207 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21209         PR target/84530
21210         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21211         the bool argument.
21212         (ix86_output_indirect_function_return): New prototype.
21213         (ix86_split_simple_return_pop_internal): Likewise.
21214         * config/i386/i386.c (indirect_return_via_cx): New.
21215         (indirect_return_via_cx_bnd): Likewise.
21216         (indirect_thunk_name): Handle return va CX_REG.
21217         (output_indirect_thunk_function): Create alias for
21218         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21219         (ix86_output_indirect_jmp): Remove the bool argument.
21220         (ix86_output_indirect_function_return): New function.
21221         (ix86_split_simple_return_pop_internal): Likewise.
21222         * config/i386/i386.md (*indirect_jump): Don't pass false
21223         to ix86_output_indirect_jmp.
21224         (*tablejump_1): Likewise.
21225         (simple_return_pop_internal): Change it to define_insn_and_split.
21226         Call ix86_split_simple_return_pop_internal to split it for
21227         -mfunction-return=.
21228         (simple_return_indirect_internal): Call
21229         ix86_output_indirect_function_return instead of
21230         ix86_output_indirect_jmp.
21232 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
21234         PR bootstrap/84405
21235         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
21236         memset and value initialization afterwards.
21238 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
21240         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
21242 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21244         PR target/84521
21245         * common/config/aarch64/aarch64-common.c
21246         (aarch_option_optimization_table[]): Switch
21247         off fomit-frame-pointer
21249 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21250             Chung-Ju Wu  <jasonwucj@gmail.com>
21252         * config/nds32/nds32-multiple.md (load_multiple): Disallow
21253         volatile memory.
21254         (store_multiple): Ditto.
21256 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21258         * config.gcc: Add --with-cpu support for nds32 target.
21259         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
21260         * config/nds32/nds32.opt: Add -mcpu= option.
21262 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
21264         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
21265         isel=yes): Warn for these deprecated options.
21267 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
21269         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
21270         ISA_2_5_MASKS_EMBEDDED.
21272 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
21274         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
21275         p->max as pointers rather than using iterative_hash_expr.
21277 2018-02-23  Carl Love  <cel@us.ibm.com>
21279         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
21280         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
21281         BU_P8V_OVERLOAD_2.
21282         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
21283         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
21284         P8V_BUILTIN_VEC_VUNSIGNED2.
21286 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
21288         PR target/81572
21289         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
21290         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
21291         LRA_UNKNOWN_ALT.
21292         * lra-constraints.c (curr_insn_transform): Set up
21293         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
21294         LRA_UNKNOWN_ALT.
21295         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
21296         * lra-eliminations.c (spill_pseudos): Ditto.
21297         (process_insn_for_elimination): Ditto.
21298         * lra-lives.c (reg_early_clobber_p): Use the new macros.
21299         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
21300         LRA_NON_CLOBBERED_ALT.
21302 2018-02-22  Martin Sebor  <msebor@redhat.com>
21304         PR tree-optimization/84480
21305         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
21306         to maybe_diag_stxncpy_trunc.  Call it.
21307         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
21308         from gimple_fold_builtin_strcpy.  Print inlining stack.
21309         (handle_builtin_stxncpy): Print inlining stack.
21310         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
21312 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
21314         PR target/84176
21315         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
21316         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
21317         and -fcheck-pointer-bounds are used together.
21318         (indirect_thunk_prefix): New enum.
21319         (indirect_thunk_need_prefix): New function.
21320         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
21321         "_nt" instead of "_bnd" for NOTRACK prefix.
21322         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
21323         (output_indirect_thunk_function): Likewise.
21324         (): Likewise.
21325         (ix86_code_end): Update output_indirect_thunk_function calls.
21326         (ix86_output_indirect_branch_via_reg): Replace
21327         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
21328         (ix86_output_indirect_branch_via_push): Likewise.
21329         (ix86_output_function_return): Likewise.
21330         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
21331         incompatible with -fcf-protection=branch and
21332         -fcheck-pointer-bounds.
21334 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
21336         PR target/83335
21337         * config/aarch64/aarch64.c (aarch64_print_address_internal):
21338         Change gcc_assert call to output_operand_lossage.
21340 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
21342         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
21344 2018-02-22  DJ Delorie  <dj@redhat.com>
21345             Sebastian Perta  <sebastian.perta@renesas.com>
21346             Oleg Endo  <olegendo@gcc.gnu.org>
21348         * config/rx/rx.c (rx_rtx_costs): New function.
21349         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
21351 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21353         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
21355 2018-02-22  Martin Liska  <mliska@suse.cz>
21357         PR driver/83193
21358         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
21359         Add "native" as a possible value.
21361 2018-02-22  Martin Liska  <mliska@suse.cz>
21363         PR driver/83193
21364         * config/i386/i386.c (ix86_option_override_internal):
21365         Add "native" as a possible value for -march and -mtune.
21367 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
21369         PR target/84502
21370         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
21371         to all type variants.
21373         PR tree-optimization/84503
21374         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
21375         width as info->bitpos + info->bitsize - start.
21376         (merged_store_group::merge_overlapping): Simplify width computation.
21377         (check_no_overlap): New function.
21378         (imm_store_chain_info::try_coalesce_bswap): Compute expected
21379         start + width and last_order of the group, fail if check_no_overlap
21380         fails.
21381         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
21382         to group if check_no_overlap fails.
21384 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
21386         * config/rs6000/altivec.md: Delete contraint arguments to
21387         define_expand, define_split, and define_peephole2, and in
21388         define_insn_and_split if always unused.
21389         * config/rs6000/darwin.md: Ditto.
21390         * config/rs6000/dfp.md: Ditto.
21391         * config/rs6000/rs6000.md: Ditto.
21392         * config/rs6000/sync.md: Ditto.
21393         * config/rs6000/vector.md: Ditto.
21394         * config/rs6000/vsx.md: Ditto.
21396 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
21398         * config/rs6000/altivec.md: Write output control strings as braced
21399         blocks instead of double-quoted strings.
21400         * config/rs6000/darwin.md: Ditto.
21401         * config/rs6000/rs6000.md: Ditto.
21402         * config/rs6000/vector.md: Ditto.
21403         * config/rs6000/vsx.md: Ditto.
21405 2018-02-21  Jason Merrill  <jason@redhat.com>
21407         PR c++/84314 - ICE with templates and fastcall attribute.
21408         * attribs.c (build_type_attribute_qual_variant): Remove assert.
21410 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
21412         * ipa-cp.c (determine_versionability): Fix comment typos.
21414 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
21416         PR c/84229
21417         * ipa-cp.c (determine_versionability): Do not version functions caling
21418         va_arg_pack.
21420 2018-02-21  Martin Liska  <mliska@suse.cz>
21422         PR driver/83193
21423         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
21424         Add "native" as a possible value.
21425         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
21426         the macro when native cpu detection is available.
21428 2018-02-21  Martin Liska  <mliska@suse.cz>
21430         PR driver/83193
21431         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
21432         Add "native" as a possible value.
21433         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
21434         when native cpu detection is available.
21436 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
21437             Martin Sebor  <msebor@redhat.com>
21439         PR tree-optimization/84478
21440         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
21441         false.
21442         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
21443         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
21444         support which is conservatively correct, for 2 only stay conservative
21445         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
21446         argument to the 2 argument get_range_strlen, adjust 6 arg
21447         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
21448         false.
21449         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
21450         (gimple_fold_builtin_strlen): Pass true as last argument to
21451         get_range_strlen.
21453 2018-02-20  Martin Sebor  <msebor@redhat.com>
21455         PR middle-end/84095
21456         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
21457         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
21458         (builtin_memref::builtin_memref): Factor out parts into
21459         set_base_and_offset and call it.
21461 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21463         PR middle-end/84406
21464         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
21465         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
21466         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
21467         search at the associated MODE_INT.
21469 2018-02-20  Jeff Law  <law@redhat.com>
21471         PR middle-end/82123
21472         PR tree-optimization/81592
21473         PR middle-end/79257
21474         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
21475         for range data rather than using global data.
21476         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
21477         range data rather than using global data.
21478         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
21479         pass it to children as needed.
21480         (struct directive::fmtresult): Similarly.
21481         (struct directive::set_width): Similarly.
21482         (struct directive::set_precision): Similarly.
21483         (format_integer, format_directive, parse_directive): Similarly.
21484         (format_none): Accept unnamed vr_values parameter.
21485         (format_percent, format_floating, format_character): Similarly.
21486         (format_string, format_plain): Similarly.
21487         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
21488         the EVRP range analyzer for range data rather than using global data.
21489         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
21490         gimple-ssa-evrp-analyze.h
21491         (class sprintf_dom_walker): Add after_dom_children member function.
21492         Add evrp_range_analyzer member.
21493         (sprintf_dom_walker::before_dom_children): Call into the EVRP
21494         range analyzer as needed.
21495         (sprintf_dom_walker::after_dom_children): New member function.
21496         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
21497         if not optimizing.
21498         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
21499         (evrp_range_analyzer::pop_to_marker): Likewise.
21501 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21503         PR tree-optimization/84419
21504         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
21505         with the required type if its current type is compatible but
21506         different.
21508 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
21510         PR middle-end/82004
21511         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
21512         after vectorization.
21514 2018-02-20  Martin Liska  <mliska@suse.cz>
21516         PR driver/83193
21517         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
21518         possible values if we don't have a hint.
21520 2018-02-20  Martin Liska  <mliska@suse.cz>
21522         PR c/84310
21523         PR target/79747
21524         * final.c (shorten_branches): Build align_tab array with one
21525         more element.
21526         * opts.c (finish_options): Add alignment option limit check.
21527         (MAX_CODE_ALIGN): Likewise.
21528         (MAX_CODE_ALIGN_VALUE): Likewise.
21529         * doc/invoke.texi: Document maximum allowed option value for
21530         all -falign-* options.
21532 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
21534         PR target/84146
21535         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
21536         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
21537         * var-tracking.c (emit_note_insn_var_location): Remove all references
21538         to NOTE_INSN_CALL_ARG_LOCATION.
21539         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
21540         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
21541         Use copy_rtx_if_shared.
21542         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
21543         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
21544         (dwarf2out_var_location): Remove handling of
21545         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
21546         on call_insn.
21547         * final.c (final_scan_insn): Remove all references to
21548         NOTE_INSN_CALL_ARG_LOCATION.
21549         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
21550         before dumping final insns.
21551         * except.c (emit_note_eh_region_end): Remove all references to
21552         NOTE_INSN_CALL_ARG_LOCATION.
21553         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
21554         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
21555         * config/arc/arc.c (hwloop_optimize): Likewise.
21556         * config/arm/arm.c (create_fix_barrier): Likewise.
21557         * config/s390/s390.c (s390_chunkify_start): Likewise.
21558         * config/sh/sh.c (find_barrier): Likewise.
21559         * config/i386/i386.c (rest_of_insert_endbranch,
21560         ix86_seh_fixup_eh_fallthru): Likewise.
21561         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
21562         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
21563         * config/frv/frv.c (frv_function_prologue): Likewise.
21564         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
21565         reg note.
21566         (note_outside_basic_block_p): Remove all references to
21567         NOTE_INSN_CALL_ARG_LOCATION.
21568         * gengtype.c (adjust_field_rtx_def): Likewise.
21569         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
21570         Likewise.
21571         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
21572         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
21574         PR c++/84444
21575         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
21576         is ADDR_EXPR.
21578         PR tree-optimization/84452
21579         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
21580         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
21581         is NULL.
21583 2018-02-19  Martin Liska  <mliska@suse.cz>
21585         PR sanitizer/82183
21586         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
21588 2018-02-19  Martin Liska  <mliska@suse.cz>
21589             Richard Sandiford  <richard.sandiford@linaro.org>
21591         PR tree-optimization/82491
21592         * gimple-fold.c (get_base_constructor): Make earlier bail out
21593         to prevent ubsan.
21595 2018-02-19  Carl Love  <cel@us.ibm.com>
21597         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
21598         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
21599         BU_P8V_OVERLOAD_1.
21600         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
21601         P8V_BUILTIN_VEC_NEG.
21603 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
21605         * config/rl78/rl78.md (movdf): New define expand.
21607 2018-02-19  Martin Liska  <mliska@suse.cz>
21609         PR other/80589
21610         * doc/invoke.texi: Fix typo.
21611         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
21613 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
21615         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
21616         handle rs6000_single_float and rs6000_double_float specially for
21617         e500 family CPUs.
21619 2018-02-16  Jeff Law  <law@redhat.com>
21621         * config/rx/rx.c (add_pop_cfi_notes): New function.;
21622         (pop_regs): Use it.
21624 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21626         PR ipa/84425
21627         * ipa-inline.c (inline_small_functions): Fix a typo.
21629 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21631         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
21633 2018-02-16  Carl Love  <cel@us.ibm.com>
21635         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
21636         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
21637         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
21638         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
21639         expansion to P8V_BUILTIN_VEC_FLOAT2.
21641 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
21643         PR rtl-optimization/70023
21644         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
21645         src_regno into account.
21647 2018-02-16  Carl Love  <cel@us.ibm.com>
21649         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
21650         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
21651         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
21652         * config/rs6000/rs6000.c: Remove case statements for
21653         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
21654         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
21655         and P9V_BUILTIN_VEC_VINSERT4B.
21656         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
21657         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
21658         * config/rs6000/vsx.md:
21659         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
21660         vec_insert4b.
21662 2018-02-16  Carl Love  <cel@us.ibm.com>
21664         * config/rs6000/altivec.h: Add builtin names vec_extract4b
21665         vec_insert4b.
21666         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
21667         definitions.
21668         * config/rs6000/rs6000-c.c: Add the definitions for
21669         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21670         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21671         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21672         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
21673         definition for insert4b and define insn *insert3b_internal.
21674         * doc/extend.texi: Add documentation for vec_extract4b.
21676 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21678         * doc/extend.texi (Backwards Compatibility): Mention friend
21679         injection.  Note for-scope is deprecated.
21680         * doc/invoke.texi (-ffriend-injection): Deprecate.
21682 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
21684         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21685         that moved to I2, also allow destinations that are a paradoxical
21686         subreg (instead of a normal reg).
21688 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
21690         PR target/83831
21691         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21692         to QImode.
21694 2018-02-16  Richard Biener  <rguenther@suse.de>
21696         PR tree-optimization/84037
21697         PR tree-optimization/84016
21698         PR target/82862
21699         * config/i386/i386.c (ix86_builtin_vectorization_cost):
21700         Adjust vec_construct for the fact we need additional higher latency
21701         128bit inserts for AVX256 and AVX512 vector builds.
21702         (ix86_add_stmt_cost): Scale vector construction cost for
21703         elementwise loads.
21705 2018-02-16  Richard Biener  <rguenther@suse.de>
21707         PR tree-optimization/84417
21708         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21709         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21710         (non_rewritable_lvalue_p): Likewise, use poly-ints.
21712 2018-02-16  Martin Liska  <mliska@suse.cz>
21714         PR sanitizer/84307
21715         * internal-fn.def (ASAN_CHECK): Set proper flags.
21716         (ASAN_MARK): Likewise.
21718 2018-02-16  Julia Koval  <julia.koval@intel.com>
21720         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21721         from PTA_CANNONLAKE.
21723 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21725         PR target/84272
21726         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21727         Use ++iter rather than iter++ for std::list iterators.
21728         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
21729         defer deleting them until all nodes in the forest are processed.  Do
21730         free even leaf nodes.  Change to_process into auto_vec.
21732         PR bootstrap/84405
21733         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21734         * vec.h (vec_default_construct): Use memset instead of placement new
21735         if BROKEN_VALUE_INITIALIZATION is defined.
21736         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21737         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21738         is defined.
21740         PR rtl-optimization/83723
21741         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21742         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
21743         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
21744         recursive calls.
21745         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21746         callers.
21747         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21749 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
21751         PR rtl-optimization/81443
21752         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21753         from inner REGs to paradoxical SUBREGs.
21755 2018-02-16  Richard Biener  <rguenther@suse.de>
21757         PR tree-optimization/84399
21758         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21759         For operands we can analyze at their definition make sure we can
21760         analyze them at each use as well.
21762 2018-02-16  Richard Biener  <rguenther@suse.de>
21764         PR tree-optimization/84190
21765         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21766         volatile accesses if the decl isn't volatile.
21768 2018-02-15  Jason Merrill  <jason@redhat.com>
21770         PR c++/84314 - ICE with templates and fastcall attribute.
21771         * attribs.c (build_type_attribute_qual_variant): Don't clobber
21772         TYPE_CANONICAL on an existing type.
21774 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
21776         PR tree-optimization/84383
21777         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21778         dstoff nor call operand_equal_p if dstbase is NULL.
21780         PR tree-optimization/84334
21781         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21782         also a CONSTANT_CLASS_P, punt.
21784 2018-02-14  Jim Wilson  <jimw@sifive.com>
21786         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21787         first SMALL_OPERAND check.  New local min_second_step.  Move assert
21788         to where locals are set.  Add TARGET_RVC support.
21789         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21791 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
21793         * doc/invoke.texi: Correct -Wformat-overflow code sample.
21795 2018-02-14  Martin Sebor  <msebor@redhat.com>
21797         PR tree-optimization/83698
21798         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21799         arrays constrain the offset range to their bounds.
21800         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21801         (builtin_access::overlap): Avoid setting the size of overlap if it's
21802         already been set.
21803         (maybe_diag_overlap): Also consider arrays when deciding what values
21804         of offsets to include in diagnostics.
21806 2018-02-14  Martin Sebor  <msebor@redhat.com>
21808         PR c/84108
21809         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21810         that correspond to the kind of a declaration.
21812 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
21814         PR target/83984
21815         * config/pa/pa.md: Load address of PIC label using the linkage table
21816         if the label is nonlocal.
21818 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21820         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21821         warning message if user requests -maltivec=be.
21822         * doc/invoke.texi: Document deprecation of -maltivec=be.
21824 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
21826         PR target/84220
21827         * config/rs6000/rs6000-c.c: Update definitions for
21828         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21829         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21831 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21833         PR target/84239
21834         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21835         add _get_ssp intrinsics. Remove argument from
21836         __builtin_ia32_rdssp[d|q].
21837         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21838         * config/i386/i386-builtin.def: Remove argument from
21839         __builtin_ia32_rdssp[d|q].
21840         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21841         ix86_expand_special_args_builtin for _rdssp[d|q].
21842         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21843         Clear register before usage.
21844         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21845         Add documentation for new _get_ssp and _inc_ssp intrinsics.
21847 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
21849         PR tree-optimization/84357
21850         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21851         operand 1 of an ARRAY_REF too.
21853 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
21855         PR target/83831
21856         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21857         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21858         declarations.
21859         (set_of_reg): New struct.
21860         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21861         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21862         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21863         functions.
21864         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21865         Split into bitclr, bitset, bitinvert patterns if appropriate.
21866         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21867         use rx_fuse_in_memory_bitop.
21868         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21869         to named insn, correct maximum insn length.
21871 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
21873         PR target/79242
21874         * machmode.def: Define a complex mode for PARTIAL_INT.
21875         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21876         MODE_PARTIAL_INT.
21877         * doc/rtl.texi: Document CSPImode.
21878         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21879         handling.
21880         (msp430_hard_regno_nregs_with_padding): Likewise.
21882 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
21884         PR target/84279
21885         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21887 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
21889         PR rtl-optimization/84169
21890         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
21891         we generated a parallel as new i3 and we split that to new i2 and i3
21892         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
21893         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
21894         those to i2, not i1.  Partially rewrite this scan code.
21896 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21898         PR c/82210
21899         * stor-layout.c (place_field): For variable length fields, adjust
21900         offset_align afterwards not just based on the field's alignment,
21901         but also on the size.
21903         PR middle-end/84309
21904         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21905         of exps and logs in the use_exp2 case.
21907 2018-02-13  Jeff Law  <law@redhat.com>
21909         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21910         entry for "vector".
21912         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21913         ARGS as unused.
21915 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
21917         PR debug/84342
21918         PR debug/84319
21919         * common.opt (gas-loc-support, gas-locview-support): New.
21920         (ginline-points, ginternal-reset-location-views): New.
21921         * doc/invoke.texi: Document them.  Use @itemx where intended.
21922         (gvariable-location-views): Adjust.
21923         * target.def (reset_location_view): New.
21924         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21925         (TARGET_RESET_LOCATION_VIEW): New.
21926         * doc/tm.texi: Rebuilt.
21927         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21928         (dwarf2out_default_as_locview_support): New.
21929         (output_asm_line_debug_info): Use option variables.
21930         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21931         (output_loc_list): Likewise.
21932         (add_high_low_attributes): Check option variables.
21933         Don't output entry view attribute in strict mode.
21934         (gen_inlined_subroutine_die): Check option variables.
21935         (dwarf2out_inline_entry): Likewise.
21936         (init_sections_and_labels): Likewise.
21937         (dwarf2out_early_finish): Likewise.
21938         (maybe_reset_location_view): New, from...
21939         (dwarf2out_var_location): ... here.  Call it.
21940         * debug.h (dwarf2out_default_as_loc_support): Declare.
21941         (dwarf2out_default_as_locview_support): Declare.
21942         * hooks.c (hook_int_rtx_insn_0): New.
21943         * hooks.h (hook_int_rtx_insn_0): Declare.
21944         * toplev.c (process_options): Take -gas-loc-support and
21945         -gas-locview-support from dwarf2out.  Enable
21946         -gvariable-location-views by default only with locview
21947         assembler support.  Enable -ginternal-reset-location-views by
21948         default only if the target defines the corresponding hook.
21949         Enable -ginline-points by default if location views are
21950         enabled; force it disabled if statement frontiers are
21951         disabled.
21952         * tree-inline.c (expand_call_inline): Check option variables.
21953         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21955 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
21957         PR tree-optimization/84321
21958         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21959         handling.  Also check whether the anti-range contains any values
21960         that satisfy the mask; switch to a VR_RANGE if not.
21962 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
21964         PR sanitizer/84340
21965         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21967 2018-02-13  Martin Jambor  <mjambor@suse.cz>
21969         PR c++/83990
21970         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21971         of call statements, also set location of a load to a temporary.
21973 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
21975         * config/rl78/rl78.c (add_vector_labels): New function.
21976         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21977         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21978         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21979         which checks that no arguments are passed.
21980         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21981         * doc/extend.texi: Documentation for the new attribute.
21983 2018-02-13  Andreas Schwab  <schwab@suse.de>
21985         * config/riscv/linux.h (CPP_SPEC): Define.
21987 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
21989         PR target/84335
21990         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21991         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21992         OPTION_MASK_ISA_AES as first argument to def_builtin_const
21993         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21994         instead of OPTION_MASK_ISA_PCLMUL as first argument to
21995         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21996         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21997         temporarily for AES and PCLMUL builtins.
21999         PR tree-optimization/84339
22000         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22001         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22002         Formatting fixes.
22004         PR middle-end/84309
22005         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22006         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22007         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22008         inline function.
22009         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22010         inline function.
22011         * omp-simd-clone.h: New file.
22012         * omp-simd-clone.c: Include omp-simd-clone.h.
22013         (expand_simd_clones): No longer static.
22014         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22015         cgraph.h and omp-simd-clone.h.
22016         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22017         (vect_recog_widen_shift_pattern): Formatting fix.
22018         (vect_pattern_recog_1): Don't check optab for calls.
22020         PR target/84336
22021         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22022         operands[2] into a REG before using gen_lowpart on it.
22024 2018-02-12  Jeff Law  <law@redhat.com>
22026         PR target/83760
22027         * config/sh/sh.c (find_barrier): Consider a sibling call
22028         a barrier as well.
22030         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22031         successfully back substituting a reg.
22033 2018-02-12  Richard Biener  <rguenther@suse.de>
22035         PR tree-optimization/84037
22036         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22037         parameter, move visited init to caller.
22038         (vect_slp_analyze_operations): Separate cost from validity
22039         check, initialize visited once for all instances.
22040         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22041         for all instances.
22042         * tree-vect-stmts.c (vect_model_simple_cost): Make early
22043         out an assert.
22044         (vect_model_promotion_demotion_cost): Likewise.
22045         (vectorizable_bswap): Guard cost modeling with !slp_node
22046         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22047         SLP stmts.
22048         (vectorizable_call): Likewise.
22049         (vectorizable_conversion): Likewise.
22050         (vectorizable_assignment): Likewise.
22051         (vectorizable_shift): Likewise.
22052         (vectorizable_operation): Likewise.
22053         (vectorizable_store): Likewise.
22054         (vectorizable_load): Likewise.
22055         (vectorizable_condition): Likewise.
22056         (vectorizable_comparison): Likewise.
22058 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
22060         PR sanitizer/84307
22061         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22062         (ASAN_MARK): Fix fnspec to account for return value, change pointer
22063         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22065 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22067         PR middle-end/83665
22068         * params.def (inline-min-speedup): Increase from 8 to 15.
22069         (max-inline-insns-auto): Decrease from 40 to 30.
22070         * ipa-split.c (consider_split): Add some buffer for function to
22071         be considered inlining candidate.
22072         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22073         default values.
22075 2018-02-12  Richard Biener  <rguenther@suse.de>
22077         PR tree-optimization/84037
22078         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22079         matched stmts if we cannot swap the non-matched ones.
22081 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22083         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22084         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22085         _mm_maskz_scalef_round_ss): New intrinsics.
22086         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22087         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22088         __builtin_ia32_scalefss_round): Remove.
22089         (__builtin_ia32_scalefsd_mask_round,
22090         __builtin_ia32_scalefss_mask_round): New intrinsics.
22091         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22092         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22093         ((match_operand:VF_128 2 "<round_nimm_predicate>"
22094         "<round_constraint>")): Changed to ...
22095         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22096         "<round_scalar_constraint>")): ... this.
22097         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22098         %0, %1, %2<round_op3>}"): Changed to ...
22099         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22100         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22101         %2<round_scalar_mask_op3>}"): ... this.
22102         * config/i386/subst.md (round_scalar_nimm_predicate): New.
22104 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22106         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22107         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22108         (_mm_maskz_sqrt_round_ss): New intrinsics.
22109         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22110         (__builtin_ia32_sqrtsd_mask_round)
22111         (__builtin_ia32_sqrtss_mask_round): New builtins.
22112         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22113         (__builtin_ia32_sqrtss_round): Remove.
22114         (__builtin_ia32_sqrtsd_mask_round)
22115         (__builtin_ia32_sqrtss_mask_round): New builtins.
22116         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22117         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22118         ((match_operand:VF_128 1 "vector_operand"
22119         "xBm,<round_constraint>")): Changed to ...
22120         ((match_operand:VF_128 1 "vector_operand"
22121         "xBm,<round_scalar_constraint>")): ... this.
22122         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22123         %0, %2, %<iptr>1<round_op3>}): Changed to ...
22124         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22125         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22126         %<iptr>1<round_scalar_mask_op3>}): ... this.
22127         ((set_attr "prefix" "<round_prefix>")): Changed to ...
22128         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22130 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
22132         PR target/84266
22133         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22134         Cast vec_cmpeq result to correct type.
22135         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22136         Cast vec_cmpgt result to correct type.
22138 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
22140         * final.c (final_scan_insn_1): Renamed from...
22141         (final_scan_insn): ... this.  New wrapper, to recover
22142         seen from the outermost call in recursive ones.
22143         * config/sparc/sparc.c (output_return): Drop seen from call.
22144         (output_sibcall): Likewise.
22145         * config/visium/visium.c (output_branch): Likewise.
22147 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
22149         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22150         function label.
22152 2018-02-10  Alan Modra  <amodra@gmail.com>
22154         PR target/84300
22155         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22156         Specify LR as an input.
22158 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
22160         PR sanitizer/83987
22161         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22162         remove_member_access_dummy_vars): New functions.
22163         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22164         lower_omp_1, execute_lower_omp): Use them.
22166         PR rtl-optimization/84308
22167         * shrink-wrap.c (spread_components): Release todo vector.
22169 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
22171         PR rtl-optimization/57193
22172         * ira-color.c (struct allocno_color_data): Add member
22173         conflict_allocno_hard_prefs.
22174         (update_conflict_allocno_hard_prefs): New.
22175         (bucket_allocno_compare_func): Add a preference based on
22176         conflict_allocno_hard_prefs.
22177         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22178         (color_allocnos): Remove a dead code.  Initiate
22179         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
22181 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22183         PR target/84226
22184         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22185         constraint from =wa to wa.  Avoid a subreg on the output operand,
22186         instead use a pseudo and subreg it in a move.
22187         (p9_xxbrd_<mode>): Changed to ...
22188         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22189         (p9_xxbrd_v2df): New expander.
22190         (p9_xxbrw_<mode>): Changed to ...
22191         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22192         (p9_xxbrw_v4sf): New expander.
22194 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22196         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22198 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
22200         PR target/83926
22201         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22202         multiply in 32-bit mode.
22203         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22204         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22205         mode.
22207 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22209         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22210         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22211         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22212         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22214 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
22216         PR lto/84213
22217         * dwarf2out.c (is_trivial_indirect_ref): New function.
22218         (dwarf2out_late_global_decl): Do not generate a location
22219         attribute for variables that have a non-trivial DECL_VALUE_EXPR
22220         and that are not defined in the current unit.
22222 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22224         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22225         instead of a libcall for UNORDERED.
22227 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
22229         PR target/82641
22230         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
22231         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
22233 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22235         PR target/PR84295
22236         * config/s390/s390.c (s390_set_current_function): Invoke
22237         s390_indirect_branch_settings also if fndecl didn't change.
22239 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22241         * config/rs6000/rs6000.md (blockage): Set length to zero.
22243 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22245         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
22247 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22249         PR sanitizer/84285
22250         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
22251         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
22252         -static-lib*san.
22254         PR debug/84252
22255         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
22256         PARALLEL incoming that failed vt_get_decl_and_offset check.
22258         PR middle-end/84237
22259         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
22260         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
22261         TREE_READONLY bit.
22262         (get_variable_section): For decls in named .bss* sections pass true as
22263         second argument to bss_initializer_p.
22265 2018-02-09  Marek Polacek  <polacek@redhat.com>
22266             Jakub Jelinek  <jakub@redhat.com>
22268         PR c++/83659
22269         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
22270         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
22271         Sync some changes from cxx_fold_indirect_ref.
22273 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22275         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
22276         markers.
22277         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
22278         (BLOCK_INLINE_ENTRY_LABEL): New.
22279         (dwarf2out_var_location): Disregard inline entry markers.
22280         (inline_entry_data): New struct.
22281         (inline_entry_data_hasher): New hashtable type.
22282         (inline_entry_data_hasher::hash): New.
22283         (inline_entry_data_hasher::equal): New.
22284         (inline_entry_data_table): New variable.
22285         (add_high_low_attributes): Add DW_AT_entry_pc and
22286         DW_AT_GNU_entry_view attributes if a pending entry is found
22287         in inline_entry_data_table.  Add old entry_pc attribute only
22288         if debug nonbinding markers are disabled.
22289         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
22290         markers are enabled.
22291         (block_within_block_p, dwarf2out_inline_entry): New.
22292         (dwarf2out_finish): Check that no entries remained in
22293         inline_entry_data_table.
22294         * final.c (reemit_insn_block_notes): Handle inline entry notes.
22295         (final_scan_insn, notice_source_line): Likewise.
22296         (rest_of_clean_state): Skip inline entry markers.
22297         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
22298         markers.
22299         * gimple.c (gimple_build_debug_inline_entry): New.
22300         * gimple.h (enum gimple_debug_subcode): Add
22301         GIMPLE_DEBUG_INLINE_ENTRY.
22302         (gimple_build_debug_inline_entry): Declare.
22303         (gimple_debug_inline_entry_p): New.
22304         (gimple_debug_nonbind_marker_p): Adjust.
22305         * insn-notes.def (INLINE_ENTRY): New.
22306         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
22307         inline entry marker notes.
22308         (print_insn): Likewise.
22309         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
22310         (INSN_DEBUG_MARKER_KIND): Likewise.
22311         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
22312         * tree-inline.c (expand_call_inline): Build and insert
22313         debug_inline_entry stmt.
22314         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
22315         inline entry blocks early, if nonbind markers are enabled.
22316         (dump_scope_block): Dump fragment info.
22317         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
22318         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
22319         (gimple_build_debug_inline_entry): New.
22320         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
22321         Enable/disable inline entry points too.
22322         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
22323         (DEBUG_INSN): Describe inline entry markers.
22325         * common.opt (gvariable-location-views): New.
22326         (gvariable-location-views=incompat5): New.
22327         * config.in: Rebuilt.
22328         * configure: Rebuilt.
22329         * configure.ac: Test assembler for view support.
22330         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
22331         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
22332         * dwarf2out.c (var_loc_view): New typedef.
22333         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
22334         (dwarf2out_locviews_in_attribute): New.
22335         (dwarf2out_locviews_in_loclist): New.
22336         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
22337         (enum dw_line_info_opcode): Add LI_adv_address.
22338         (struct dw_line_info_table): Add view.
22339         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
22340         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
22341         (zero_view_p): New variable.
22342         (ZERO_VIEW_P): New macro.
22343         (output_asm_line_debug_info): New.
22344         (struct var_loc_node): Add view.
22345         (add_AT_view_list, AT_loc_list): New.
22346         (add_var_loc_to_decl): Add view param.  Test it against last.
22347         (new_loc_list): Add view params.  Record them.
22348         (AT_loc_list_ptr): Handle loc and view lists.
22349         (view_list_to_loc_list_val_node): New.
22350         (print_dw_val): Handle dw_val_class_view_list.
22351         (size_of_die): Likewise.
22352         (value_format): Likewise.
22353         (loc_list_has_views): New.
22354         (gen_llsym): Set vl_symbol too.
22355         (maybe_gen_llsym, skip_loc_list_entry): New.
22356         (dwarf2out_maybe_output_loclist_view_pair): New.
22357         (output_loc_list): Output view list or entries too.
22358         (output_view_list_offset): New.
22359         (output_die): Handle dw_val_class_view_list.
22360         (output_dwarf_version): New.
22361         (output_compilation_unit_header): Use it.
22362         (output_skeleton_debug_sections): Likewise.
22363         (output_rnglists, output_line_info): Likewise.
22364         (output_pubnames, output_aranges): Update version comments.
22365         (output_one_line_info_table): Output view numbers in asm comments.
22366         (dw_loc_list): Determine current endview, pass it to new_loc_list.
22367         Call maybe_gen_llsym.
22368         (loc_list_from_tree_1): Adjust.
22369         (add_AT_location_description): Create view list attribute if
22370         needed, check it's absent otherwise.
22371         (convert_cfa_to_fb_loc_list): Adjust.
22372         (maybe_emit_file): Call output_asm_line_debug_info for test.
22373         (dwarf2out_var_location): Reset views as needed.  Precompute
22374         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
22375         attribute.  Set view.
22376         (new_line_info_table): Reset next view.
22377         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
22378         (dwarf2out_source_line): Likewise.  Output view resets and labels to
22379         the assembler, or select appropriate line info opcodes.
22380         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
22381         (optimize_string_length): Catch it.  Adjust.
22382         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
22383         dw_val_class_view_list, and remove it if no longer needed.
22384         (hash_loc_list): Hash view numbers.
22385         (loc_list_hasher::equal): Compare them.
22386         (optimize_location_lists): Check whether a view list symbol is
22387         needed, and whether the locview attribute is present, and
22388         whether they match.  Remove the locview attribute if no longer
22389         needed.
22390         (index_location_lists): Call skip_loc_list_entry for test.
22391         (dwarf2out_finish): Call output_asm_line_debug_info for test.
22392         Use output_dwarf_version.
22393         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
22394         (struct dw_val_node): Add val_view_list.
22395         * final.c (SEEN_NEXT_VIEW): New.
22396         (set_next_view_needed): New.
22397         (clear_next_view_needed): New.
22398         (maybe_output_next_view): New.
22399         (final_start_function): Rename to...
22400         (final_start_function_1): ... this.  Take pointer to FIRST,
22401         add SEEN parameter.  Emit param bindings in the initial view.
22402         (final_start_function): Reintroduce SEEN-less interface.
22403         (final): Rename to...
22404         (final_1): ... this.  Take SEEN parameter.  Output final pending
22405         next view at the end.
22406         (final): Reintroduce seen-less interface.
22407         (final_scan_insn): Output pending next view before switching
22408         sections or ending a block.  Mark the next view as needed when
22409         outputting variable locations.  Notify debug backend of section
22410         changes, and of location view changes.
22411         (rest_of_handle_final): Adjust.
22412         * toplev.c (process_options): Autodetect value for debug variable
22413         location views option.  Warn on incompat5 without -gdwarf-5.
22414         * doc/invoke.texi (gvariable-location-views): New.
22415         (gvariable-location-views=incompat5): New.
22416         (gno-variable-location-views): New.
22418 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
22420         PR tree-optimization/84136
22421         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
22422         that the result of find_edge is non-NULL.
22424 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
22426         PR target/83008
22427         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
22428         storing integer register in SImode.  Fix cost of 256 and 512
22429         byte aligned SSE register store.
22431 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
22433         * config/i386/i386.c (ix86_multiplication_cost): Fix
22434         multiplication cost for TARGET_AVX512DQ.
22436 2018-02-08  Marek Polacek  <polacek@redhat.com>
22438         PR tree-optimization/84238
22439         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
22440         get_range_strlen.
22442 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22444         PR tree-optimization/84265
22445         * tree-vect-stmts.c (vectorizable_store): Don't treat
22446         VMAT_CONTIGUOUS accesses as grouped.
22447         (vectorizable_load): Likewise.
22449 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22451         PR tree-optimization/81635
22452         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
22453         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
22454         (test_round_for_mask): New functions.
22455         (wide_int_cc_tests): Call test_round_for_mask.
22456         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
22457         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
22458         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
22459         range returned by get_range_info.
22461 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22463         PR ipa/81360
22464         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
22465         * symtab.c: Include builtins.h
22466         (symtab_node::output_to_lto_symbol_table_p): Move here
22467         from lto-streamer-out.c:output_symbol_p.
22468         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
22469         (output_symbol_p): Move all logic to symtab.c
22470         (produce_symtab): Update.
22472 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22474         * config/s390/s390-opts.h (enum indirect_branch): Define.
22475         * config/s390/s390-protos.h (s390_return_addr_from_memory)
22476         (s390_indirect_branch_via_thunk)
22477         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
22478         (enum s390_indirect_branch_type): Define.
22479         * config/s390/s390.c (struct s390_frame_layout, struct
22480         machine_function): Remove.
22481         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
22482         (indirect_branch_table_label_no, indirect_branch_table_name):
22483         Define variables.
22484         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
22485         (enum s390_indirect_branch_option): Define.
22486         (s390_return_addr_from_memory): New function.
22487         (s390_handle_string_attribute): New function.
22488         (s390_attribute_table): Add new attribute handler.
22489         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
22490         (s390_indirect_branch_via_thunk): New function.
22491         (s390_indirect_branch_via_inline_thunk): New function.
22492         (s390_function_ok_for_sibcall): When jumping via thunk disallow
22493         sibling call optimization for non z10 compiles.
22494         (s390_emit_call): Force indirect branch target to be a single
22495         register.  Add r1 clobber for non-z10 compiles.
22496         (s390_emit_epilogue): Emit return jump via return_use expander.
22497         (s390_reorg): Handle JUMP_INSNs as execute targets.
22498         (s390_option_override_internal): Perform validity checks for the
22499         new command line options.
22500         (s390_indirect_branch_attrvalue): New function.
22501         (s390_indirect_branch_settings): New function.
22502         (s390_set_current_function): Invoke s390_indirect_branch_settings.
22503         (s390_output_indirect_thunk_function):  New function.
22504         (s390_code_end): Implement target hook.
22505         (s390_case_values_threshold): Implement target hook.
22506         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
22507         macros.
22508         * config/s390/s390.h (struct s390_frame_layout)
22509         (struct machine_function): Move here from s390.c.
22510         (TARGET_INDIRECT_BRANCH_NOBP_RET)
22511         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
22512         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
22513         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
22514         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
22515         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
22516         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
22517         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
22518         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
22519         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
22520         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
22521         (mnemonic attribute): Add values which aren't recognized
22522         automatically.
22523         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
22524         pattern for branch conversion.  Fix mnemonic attribute.
22525         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
22526         indirect branch via thunk if requested.
22527         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
22528         ("*indirect_jump"): Disable for branch conversion using out of
22529         line thunks.
22530         ("indirect_jump_via_thunk<mode>_z10")
22531         ("indirect_jump_via_thunk<mode>")
22532         ("indirect_jump_via_inlinethunk<mode>_z10")
22533         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
22534         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
22535         ("casesi_jump_via_inlinethunk<mode>_z10")
22536         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
22537         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
22538         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
22539         ("*indirect2_jump"): Disable for branch conversion.
22540         ("casesi_jump"): Turn into expander and expand patterns for branch
22541         conversion.
22542         ("return_use"): New expander.
22543         ("*return"): Emit return via thunk and rename it to ...
22544         ("*return<mode>"): ... this one.
22545         * config/s390/s390.opt: Add new options and and enum for the
22546         option values.
22548 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22550         * lra-constraints.c (match_reload): Unconditionally use
22551         gen_lowpart_SUBREG, rather than selecting between that
22552         and equivalent gen_rtx_SUBREG code.
22554 2018-02-08  Richard Biener  <rguenther@suse.de>
22556         PR tree-optimization/84233
22557         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
22558         changed flag instead of boguously re-using phi_inserted.
22560 2018-02-08  Martin Jambor  <mjambor@suse.cz>
22562         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
22563         static local variables.
22565 2018-02-08  Richard Biener  <rguenther@suse.de>
22567         PR tree-optimization/84278
22568         * tree-vect-stmts.c (vectorizable_store): When looking for
22569         smaller vector types to perform grouped strided loads/stores
22570         make sure the mode is supported by the target.
22571         (vectorizable_load): Likewise.
22573 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22575         * config/aarch64/aarch64.c (aarch64_components_for_bb):
22576         Increase LDP/STP opportunities by adding adjacent callee-saves.
22578 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22580         PR rtl-optimization/84068
22581         PR rtl-optimization/83459
22582         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
22584 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
22586         PR tree-optimization/84224
22587         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
22588         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
22589         non-zero arguments.
22591 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
22593         PR target/84113
22594         * config/rs6000/altivec.md (*restore_world): Remove LR use.
22595         * config/rs6000/predicates.md (restore_world_operation): Adjust op
22596         count, remove one USE.
22598 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
22600         * doc/install.texi (Configuration): Document the
22601         --with-long-double-format={ibm,ieee} PowerPC configuration
22602         options.
22604         PR target/84154
22605         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
22606         Convert from define_expand to be define_insn_and_split.  Rework
22607         float/double/_Float128 conversions to QI/HI/SImode to work with
22608         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
22609         conversions to QI/HImode types did a store and then a load to
22610         truncate the value.  For conversions to VSX registers, don't split
22611         the insn, instead emit the code directly.  Use the code iterator
22612         any_fix to combine signed and unsigned conversions.
22613         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
22614         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
22615         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22616         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
22617         (fix_<mode>di2_hw): Likewise.
22618         (fixuns_<mode>di2_hw): Likewise.
22619         (fix_<mode>si2_hw): Likewise.
22620         (fixuns_<mode>si2_hw): Likewise.
22621         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
22622         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22623         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
22624         fix<uns>_trunc<SFDF:mode>si2_p8.
22625         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
22626         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22627         (fix<uns>_<mode>_mem): Likewise.
22628         (fctiw<u>z_<mode>_mem): Likewise.
22629         (fix<uns>_<mode>_mem): Likewise.
22630         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
22631         the register allocator from doing a direct move to the GPRs to do
22632         a store, and instead use the ISA 3.0 store byte/half-word from
22633         vector register instruction.  For IEEE 128-bit floating point,
22634         also optimize stores of 32-bit ints.
22635         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
22637 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
22639         * genextract.c (push_pathstr_operand): New function to support
22640         [a-zA-Z].
22641         (walk_rtx): Call push_pathstr_operand.
22642         (print_path): Support [a-zA-Z].
22644 2018-02-07  Richard Biener  <rguenther@suse.de>
22646         PR tree-optimization/84037
22647         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
22648         (cse_and_gimplify_to_preheader): Declare.
22649         (vect_get_place_in_interleaving_chain): Likewise.
22650         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22651         ivexpr_map.
22652         (_loop_vec_info::~_loop_vec_info): Delete it.
22653         (cse_and_gimplify_to_preheader): New function.
22654         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
22655         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
22656         (vectorizable_load): Likewise.  For grouped stores always base
22657         the IV on the first element.
22658         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
22659         condition before gimplifying.
22661 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22663         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
22664         *DIV_EXPR and *MOD_EXPR.
22666 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
22668         PR target/84248
22669         * config/i386/i386.c (ix86_option_override_internal): Mask out
22670         the CF_SET bit when checking -fcf-protection.
22672 2018-02-07  Tom de Vries  <tom@codesourcery.com>
22674         PR libgomp/84217
22675         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22676         enough.
22678 2018-02-07  Richard Biener  <rguenther@suse.de>
22680         PR tree-optimization/84204
22681         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22682         this place.
22684         PR tree-optimization/84205
22685         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22686         special-case isl_ast_op_zdiv_r.
22688         PR tree-optimization/84223
22689         * graphite-scop-detection.c (gather_bbs::before_dom_children):
22690         Only add conditions from within the region.
22691         (gather_bbs::after_dom_children): Adjust.
22693 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
22695         PR target/84209
22696         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22697         * config/avr/avr.md: Only post-reload split REG-REG moves if
22698         either register is GENERAL_REG_P.
22700 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22702         PR tree-optimization/84235
22703         * tree-ssa-scopedtables.c
22704         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22705         if the subtraction is performed in floating point type where NaNs are
22706         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22707         build 1.  Formatting fix.
22709 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
22711         PR target/84146
22712         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22713         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22714         and skip it regardless of bb boundaries.  Use CALL_P macro,
22715         don't test INSN_P (insn) together with CALL_P or JUMP_P check
22716         unnecessarily, formatting fix.
22718 2018-02-06  Michael Collison  <michael.collison@arm.com>
22720         * config/arm/thumb2.md:
22721         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22722         (*thumb_mov_notscc): Ditto.
22724 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
22726         PR target/84154
22727         * config/rs6000/rs6000.md (su code attribute): Use "u" for
22728         unsigned_fix, not "s".
22730 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22732         * configure.ac (gcc_fn_eh_frame_ro): New function.
22733         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22734         correct .eh_frame permissions.
22735         * configure: Regenerate.
22737 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
22739         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22740         irrelevant options.
22742 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22744         * config/rs6000/rs6000.c (rs6000_option_override_internal):
22745         Display warning message for -mno-speculate-indirect-jumps.
22747 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
22749         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22750         Undocumented.
22751         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22753 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
22755         PR tree-optimization/84225
22756         * tree-eh.c (find_trapping_overflow): Only call
22757         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22759 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22761         PR target/84145
22762         * config/i386/i386.c: Reimplement the check of possible options
22763         -mibt/-mshstk conbination. Change error messages.
22764         * doc/invoke.texi: Fix a typo: remove extra '='.
22766 2018-02-06  Marek Polacek  <polacek@redhat.com>
22768         PR tree-optimization/84228
22769         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22771 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
22773         PR target/82641
22774         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22775         emitted arch directives.
22776         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22777         __ARM_FEATURE_COPROC before changing architectures.
22779 2018-02-06  Richard Biener  <rguenther@suse.de>
22781         * config/i386/i386.c (print_reg): Fix typo.
22782         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22784 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
22786         * configure: Regenerate.
22788 2018-02-05  Martin Sebor  <msebor@redhat.com>
22790         PR tree-optimization/83369
22791         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22792         inlining context.
22794 2018-02-05  Martin Liska  <mliska@suse.cz>
22796         * doc/invoke.texi: Cherry-pick upstream r323995.
22798 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
22800         * ira.c (ira_init_register_move_cost): Adjust comment.
22802 2018-02-05  Martin Liska  <mliska@suse.cz>
22804         PR gcov-profile/84137
22805         * doc/gcov.texi: Fix typo in documentation.
22807 2018-02-05  Martin Liska  <mliska@suse.cz>
22809         PR gcov-profile/83879
22810         * doc/gcov.texi: Document necessity of --dynamic-list-data when
22811         using dlopen functionality.
22813 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
22815         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22816         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22817         _mm_maskz_range_ss, _mm_mask_range_round_ss,
22818         _mm_maskz_range_round_ss): New intrinsics.
22819         (__builtin_ia32_rangesd128_round)
22820         (__builtin_ia32_rangess128_round): Remove.
22821         (__builtin_ia32_rangesd128_mask_round,
22822         __builtin_ia32_rangess128_mask_round): New builtins.
22823         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22824         __builtin_ia32_rangess128_round): Remove.
22825         (__builtin_ia32_rangesd128_mask_round,
22826         __builtin_ia32_rangess128_mask_round): New builtins.
22827         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22828         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22829         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22830         "<round_saeonly_constraint>")): Changed to ...
22831         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22832         "<round_saeonly_scalar_constraint>")): ... this.
22833         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22834         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22835         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22836         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22837         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22839 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
22841         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22842         options.
22843         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22844         Remove all values except native, 8540 and 8548.
22846 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
22848         * config/i386/i386.c (ix86_output_function_return): Pass
22849         INVALID_REGNUM, instead of -1, as invalid register number to
22850         indirect_thunk_name and output_indirect_thunk.
22852 2018-02-02  Julia Koval  <julia.koval@intel.com>
22854         * config.gcc: Add -march=icelake.
22855         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22856         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22857         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22858         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22859         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22860         (processor_target_table): Add icelake.
22861         (ix86_option_override_internal): Handle new PTAs.
22862         (get_builtin_code_for_version): Handle icelake.
22863         (M_INTEL_COREI7_ICELAKE): New.
22864         (fold_builtin_cpu): Handle icelake.
22865         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22866         * doc/invoke.texi: Add -march=icelake.
22868 2018-02-02  Julia Koval  <julia.koval@intel.com>
22870         * config/i386/i386.c (ix86_option_override_internal): Change flags type
22871         to wide_int_bitmask.
22872         * wide-int-bitmask.h: New.
22874 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22876         PR target/84066
22877         * config/i386/i386.md: Replace Pmode with word_mode in
22878         builtin_setjmp_setup and builtin_longjmp to support x32.
22880 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
22882         PR target/56010
22883         PR target/83743
22884         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22885         #include "opts.h".
22886         (rs6000_supported_cpu_names): New static variable.
22887         (linux_cpu_translation_table): Likewise.
22888         (elf_platform) <cpu>: Define new static variable and use it.
22889         Translate kernel AT_PLATFORM name to canonical name if needed.
22890         Error if platform name is unknown.
22892 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
22894         PR target/84089
22895         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22897 2018-02-01  Jeff Law  <law@redhat.com>
22899         PR target/84128
22900         * config/i386/i386.c (release_scratch_register_on_entry): Add new
22901         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
22902         the scratch if RELEASE_VIA_POP is false.
22903         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22904         If we have to save a temporary register, decrement SIZE appropriately.
22905         Pass new arguments to release_scratch_register_on_entry.
22906         (ix86_adjust_stack_and_probe): Likewise.
22907         (ix86_emit_probe_stack_range): Pass new arguments to
22908         release_scratch_register_on_entry.
22910 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
22912         PR rtl-optimization/84157
22913         * combine.c (change_zero_ext): Use REG_P predicate in
22914         front of HARD_REGISTER_P predicate.
22916 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
22918         * config/avr/avr.c (avr_option_override): Move disabling of
22919         -fdelete-null-pointer-checks to...
22920         * common/config/avr/avr-common.c (avr_option_optimization_table):
22921         ...here.
22923 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22925         PR tree-optimization/81635
22926         * tree-data-ref.c (split_constant_offset_1): For types that
22927         wrap on overflow, try to use range info to prove that wrapping
22928         cannot occur.
22930 2018-02-01  Renlin Li  <renlin.li@arm.com>
22932         PR target/83370
22933         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22934         TAILCALL_ADDR_REGS.
22935         (aarch64_register_move_cost): Likewise.
22936         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22937         TAILCALL_ADDR_REGS.
22938         (REG_CLASS_NAMES): Likewise.
22939         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22940         TAILCALL_ADDR_REGS. Remove IP registers.
22941         * config/aarch64/aarch64.md (Ucs): Update register constraint.
22943 2018-02-01  Richard Biener  <rguenther@suse.de>
22945         * domwalk.h (dom_walker::dom_walker): Add additional constructor
22946         for specifying RPO order and allow NULL for that.
22947         * domwalk.c (dom_walker::dom_walker): Likewise.
22948         (dom_walker::walk): Handle NULL RPO order.
22949         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22950         in RPO order.
22951         (rewrite_update_dom_walker): Likewise.
22952         (mark_def_dom_walker): Likewise.
22954 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22956         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22957         (aarch64_maybe_expand_sve_subreg_move): Declare.
22958         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22959         * config/aarch64/predicates.md (aarch64_any_register_operand): New
22960         predicate.
22961         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22962         that are semantically a reverse operation.
22963         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22964         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22965         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22966         functions.
22967         (aarch64_can_change_mode_class): For big-endian, forbid changes
22968         between two SVE modes if they have different element sizes.
22970 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22972         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22973         the TImode handling for big-endian targets.
22975 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22977         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22978         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
22979         not just bytes.
22980         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22981         Remove BSWAP handing for big-endian targets and use the form of
22982         LD1RQ appropariate for the mode.
22984 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22986         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22987         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22988         duplicated element.
22990 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
22992         PR tearget/83845
22993         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22994         check for operands that need to go through aarch64_sve_reload_be.
22996 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
22998         PR tree-optimization/81661
22999         PR tree-optimization/84117
23000         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23001         * tree-eh.c: Include gimplify.h.
23002         (find_trapping_overflow, replace_trapping_overflow,
23003         rewrite_to_non_trapping_overflow): New functions.
23004         * tree-vect-loop.c: Include tree-eh.h.
23005         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23006         * tree-data-ref.c: Include tree-eh.h.
23007         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23009 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
23011         PR rtl-optimization/84123
23012         * combine.c (change_zero_ext): Check if hard register satisfies
23013         can_change_dest_mode before calling gen_lowpart_SUBREG.
23015 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
23017         PR target/82444
23018         * ira.c (ira_init_register_move_cost): Remove assert.
23020 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23022         PR rtl-optimization/84071
23023         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23024         * doc/tm.texi: Regenerate.
23026 2018-01-31  Richard Biener  <rguenther@suse.de>
23028         PR tree-optimization/84132
23029         * tree-data-ref.c (analyze_miv_subscript): Properly
23030         check whether evolution_function_is_affine_multivariate_p
23031         before calling gcd_of_steps_may_divide_p.
23033 2018-01-31  Julia Koval  <julia.koval@intel.com>
23035         PR target/83618
23036         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23037         * config/i386/i386.md (rdpid_rex64) New.
23038         (rdpid): Make 32bit only.
23040 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
23042         PR lto/84105
23043         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23044         an IDENTIFIER_NODE for FUNCTION_TYPE's.
23046 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23048         Revert
23049         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23051         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23053 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23055         PR rtl-optimization/84071
23056         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23057         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23059 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23061         * config/arc/arc.c (arc_handle_aux_attribute): New function.
23062         (arc_attribute_table): Add 'aux' attribute.
23063         (arc_in_small_data_p): Consider aux like variables.
23064         (arc_is_aux_reg_p): New function.
23065         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23066         (arc_get_aux_arg): New function.
23067         (prepare_move_operands): Handle aux-register access.
23068         (arc_handle_aux_attribute): New function.
23069         * doc/extend.texi (ARC Variable attributes): Add subsection.
23071 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23073         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23074         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23075         (arc_attribute_table): Add 'uncached' attribute.
23076         (arc_print_operand): Print '.di' flag for uncached memory
23077         accesses.
23078         (arc_in_small_data_p): Do not consider for small data the uncached
23079         types.
23080         (arc_is_uncached_mem_p): New function.
23081         * config/arc/predicates.md (compact_store_memory_operand): Check
23082         for uncached memory accesses.
23083         (nonvol_nonimm_operand): Likewise.
23084         * doc/extend.texi (ARC Type Attribute): New subsection.
23086 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
23088         PR c/84100
23089         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23090         falign-loops=): Add Optimization flag.
23092 2018-01-30  Jeff Law  <law@redhat.com>
23094         PR target/84064
23095         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23096         INT_REGISTERS_SAVED.  Check it prior to calling
23097         get_scratch_register_on_entry.
23098         (ix86_adjust_stack_and_probe): Similarly.
23099         (ix86_emit_probe_stack_range): Similarly.
23100         (ix86_expand_prologue): Corresponding changes.
23102 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23104         PR target/40411
23105         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23106         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23108 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
23110         PR target/84112
23111         * lra-constraints.c (curr_insn_transform): Process AND in the
23112         address.
23114 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
23116         PR rtl-optimization/83986
23117         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23118         dependence against last_pending_memory_flush in addition to
23119         pending_jump_insns.
23121 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
23123         PR tree-optimization/81611
23124         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23125         copies.
23127 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23129         PR target/83758
23130         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23131         a reg rtx.
23133 2018-01-30  Richard Biener  <rguenther@suse.de>
23134             Jakub Jelinek  <jakub@redhat.com>
23136         PR tree-optimization/84111
23137         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23138         inner loops added during recursion, as they don't have up-to-date
23139         SSA form.
23141 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23143         PR ipa/81360
23144         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23145         (can_inline_edge_by_limits_p): ... here.
23146         (can_early_inline_edge_p, check_callers,
23147         update_caller_keys, update_callee_keys, recursive_inlining,
23148         add_new_edges_to_heap, speculation_useful_p,
23149         inline_small_functions,
23150         inline_small_functions, flatten_function,
23151         inline_to_all_callers_1): Update.
23153 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23155         * profile-count.c (profile_count::combine_with_ipa_count): Handle
23156         zeros correctly.
23158 2018-01-30  Richard Biener  <rguenther@suse.de>
23160         PR tree-optimization/83008
23161         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23162         invariant and constant vector uses in stmts when they need
23163         more than one stmt.
23165 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23167         PR bootstrap/84017
23168         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23169         * configure: Regenerate.
23171 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23173         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23174         pattern.
23175         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23176         Use gen_rtx_REG rather than gen_lowpart.
23178 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23180         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23181         rather than 0 when creating partial subregs.
23183 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23185         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23186         of usage.
23188 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
23190         PR target/81550
23191         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23192         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23193         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23194         flags.  This restores the settings used before the 2017-07-24.
23195         Turning off pre increment/decrement/modify allows IVOPTS to
23196         optimize DF/SF loops where the index is an int.
23198 2018-01-29  Richard Biener  <rguenther@suse.de>
23199             Kelvin Nilsen  <kelvin@gcc.gnu.org>
23201         PR bootstrap/80867
23202         * tree-vect-stmts.c (vectorizable_call): Don't call
23203         targetm.vectorize_builtin_md_vectorized_function if callee is
23204         NULL.
23206 2018-01-22  Carl Love  <cel@us.ibm.com>
23208         * doc/extend.tex: Fix typo in second arg in
23209         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23211 2018-01-29  Richard Biener  <rguenther@suse.de>
23213         PR tree-optimization/84086
23214         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23215         (flush_ssaname_freelist): When SSA names were released reset
23216         the SCEV hash table.
23218 2018-01-29  Richard Biener  <rguenther@suse.de>
23220         PR tree-optimization/84057
23221         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23222         removed paths when removing edges.
23224 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
23226         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
23227         -mfunction-return=@var{choice}.
23229 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23231         PR diagnostic/84034
23232         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
23233         Handle CR like TAB.
23234         (layout::print_source_line): Likewise.
23235         (test_get_line_width_without_trailing_whitespace): Add test cases.
23237 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
23239         PR middle-end/84040
23240         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
23241         debug insns.
23243 2018-01-26  Jim Wilson  <jimw@sifive.com>
23245         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
23247         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
23248         specified.
23250 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23252         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
23253         and CMP + SUB-immediate -> SUBS.
23255 2018-01-26  Martin Sebor  <msebor@redhat.com>
23257         PR tree-optimization/83896
23258         * tree-ssa-strlen.c (get_string_len): Rename...
23259         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
23260         Avoid assuming length is constant.
23261         (handle_char_store): Use HOST_WIDE_INT for string length.
23263 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
23265         PR target/81763
23266         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
23267         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
23269 2018-01-26  Richard Biener  <rguenther@suse.de>
23271         PR rtl-optimization/84003
23272         * dse.c (record_store): Only record redundant stores when
23273         the earlier store aliases at least all accesses the later one does.
23275 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
23277         PR rtl-optimization/83985
23278         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
23279         REG_CFA_RESTORE insns.
23280         (delete_unmarked_insns): Don't ignore separate shrink wrapping
23281         REG_CFA_RESTORE insns here.
23283         PR c/83989
23284         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
23285         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
23287 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23289         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
23290         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
23291         (arc_init): Likewise.
23292         (arc_override_options): Likewise.
23293         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
23294         value.
23295         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
23296         support.
23297         * config/arc/arc.h (TARGET_DBNZ): Define.
23298         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
23299         properly set the tune attribute.
23300         (dbnz): Use TARGET_DBNZ guard.
23301         * config/arc/arc.opt (mtune): Add core3 option.
23303 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23305         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
23306         recognize new pic like addresses.
23307         (arc_delegitimize_address): Clean up.
23309 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23311         * config/arc/arc-arches.def: Option mrf16 valid for all
23312         architectures.
23313         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
23314         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
23315         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
23316         * config/arc/arc-tables.opt: Regenerate.
23317         * config/arc/arc.c (arc_conditional_register_usage): Handle
23318         reduced register file case.
23319         (arc_file_start): Set must have build attributes.
23320         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
23321         mrf16 option value.
23322         * config/arc/arc.opt (mrf16): Add new option.
23323         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
23324         * config/arc/genmultilib.awk: Handle new mrf16 option.
23325         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
23326         * config/arc/t-multilib: Regenerate.
23327         * doc/invoke.texi (ARC Options): Document mrf16 option.
23329 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23331         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
23332         * config/arc/arc.c (arc_handle_secure_attribute): New function.
23333         (arc_attribute_table): Add 'secure_call' attribute.
23334         (arc_print_operand): Print secure call operand.
23335         (arc_function_ok_for_sibcall): Don't optimize tail calls when
23336         secure.
23337         (arc_is_secure_call_p): New function.  * config/arc/arc.md
23338         (call_i): Add support for sjli instruction.
23339         (call_value_i): Likewise.
23340         * config/arc/constraints.md (Csc): New constraint.
23342 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23343             John Eric Martin  <John.Martin@emmicro-us.com>
23345         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
23346         * config/arc/arc.c (_arc_jli_section): New struct.
23347         (arc_jli_section): New type.
23348         (rc_jli_sections): New static variable.
23349         (arc_handle_jli_attribute): New function.
23350         (arc_attribute_table): Add jli_always and jli_fixed attribute.
23351         (arc_file_end): New function.
23352         (TARGET_ASM_FILE_END): Define.
23353         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
23354         (arc_add_jli_section): New function.
23355         (jli_call_scan): Likewise.
23356         (arc_reorg): Call jli_call_scan.
23357         (arc_output_addsi): Remove 'S' from printing asm operand.
23358         (arc_is_jli_call_p): New function.
23359         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
23360         operand.
23361         (movhi_insn): Likewise.
23362         (movsi_insn): Likewise.
23363         (movsi_set_cc_insn): Likewise.
23364         (loadqi_update): Likewise.
23365         (load_zeroextendqisi_update): Likewise.
23366         (load_signextendqisi_update): Likewise.
23367         (loadhi_update): Likewise.
23368         (load_zeroextendhisi_update): Likewise.
23369         (load_signextendhisi_update): Likewise.
23370         (loadsi_update): Likewise.
23371         (loadsf_update): Likewise.
23372         (movsicc_insn): Likewise.
23373         (bset_insn): Likewise.
23374         (bxor_insn): Likewise.
23375         (bclr_insn): Likewise.
23376         (bmsk_insn): Likewise.
23377         (bicsi3_insn): Likewise.
23378         (cmpsi_cc_c_insn): Likewise.
23379         (movsi_ne): Likewise.
23380         (movsi_cond_exec): Likewise.
23381         (clrsbsi2): Likewise.
23382         (norm_f): Likewise.
23383         (normw): Likewise.
23384         (swap): Likewise.
23385         (divaw): Likewise.
23386         (flag): Likewise.
23387         (sr): Likewise.
23388         (kflag): Likewise.
23389         (ffs): Likewise.
23390         (ffs_f): Likewise.
23391         (fls): Likewise.
23392         (call_i): Remove 'S' asm letter, add jli instruction.
23393         (call_value_i): Likewise.
23394         * config/arc/arc.op (mjli-always): New option.
23395         * config/arc/constraints.md (Cji): New constraint.
23396         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
23397         operand.
23398         (subsf3_fpx): Likewise.
23399         (mulsf3_fpx): Likewise.
23400         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
23401         asm operand.
23402         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
23403         function attrbutes.
23404         * doc/invoke.texi (ARC): Document mjli-always option.
23406 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
23408         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
23409         avoid addition with 0 and use incw and decw where possible.
23411 2018-01-26  Richard Biener  <rguenther@suse.de>
23413         PR tree-optimization/81082
23414         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
23415         association if it requires casting to unsigned.
23416         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
23417         from fold_plusminus_mult_expr to catch important cases late when
23418         range info is available.
23420 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23422         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
23423         * configure.ac (hidden_linkonce): New test.
23424         * configure: Regenerate.
23425         * config.in: Regenerate.
23427 2018-01-26  Julia Koval  <julia.koval@intel.com>
23429         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
23430         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
23431         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
23432         _mm_mask_bitshuffle_epi64_mask): Fix type.
23433         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
23434         USI_FTYPE_V4DI_V4DI_USI): Remove.
23435         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
23436         __builtin_ia32_vpshufbitqmb256_mask,
23437         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
23438         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
23439         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
23441 2018-01-26  Alan Modra  <amodra@gmail.com>
23443         PR target/84033
23444         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
23445         UNSPEC_VBPERMQ.  Sort other unspecs.
23447 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
23449         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
23451 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
23453         PR middle-end/83055
23454         * predict.c (drop_profile): Do not push/pop cfun; update also
23455         node->count.
23456         (handle_missing_profiles): Fix logic looking for zero profiles.
23458 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
23460         PR middle-end/83977
23461         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
23462         on functions with #pragma omp declare simd or functions with simd
23463         attribute.
23464         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
23465         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
23466         Remove trailing \n from warning_at calls.
23468 2018-01-25  Tom de Vries  <tom@codesourcery.com>
23470         PR target/84028
23471         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23472         for neutered workers.
23474 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
23476         PR target/68467
23477         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
23478         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
23480 2018-01-24  Jeff Law  <law@redhat.com>
23482         PR target/83994
23483         * i386.c (get_probe_interval): Move to earlier point.
23484         (ix86_compute_frame_layout): If -fstack-clash-protection and
23485         the frame is larger than the probe interval, then use pushes
23486         to save registers rather than reg->mem moves.
23487         (ix86_expand_prologue): Remove conditional for int_registers_saved
23488         assertion.
23490 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
23492         PR target/84014
23493         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
23494         min/max for never referenced object.
23496 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
23498         PR middle-end/83977
23499         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
23500         here.
23501         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
23502         attributes from DECL_ATTRIBUTES (decl) without affecting
23503         DECL_ATTRIBUTES (current_function_decl).
23504         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
23505         functions with non-NULL DECL_ABSTRACT_ORIGIN.
23507 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
23509         PR tree-optimization/83979
23510         * fold-const.c (fold_comparison): Use constant_boolean_node
23511         instead of boolean_{true,false}_node.
23513 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
23515         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
23516         with zero counts.
23518 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23520         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23521         Simplify the clause that sets the length attribute.
23522         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23523         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
23524         clause that sets the length attribute.
23525         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23527 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23529         PR target/83589
23530         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
23531         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
23532         Add strict parameter.
23533         (prevent_branch_around_nothing): Insert dummy insn between branch to
23534         label and label with no ptx insn inbetween.
23535         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
23537 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23539         PR target/81352
23540         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23541         for neutered threads in warp.
23542         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
23544 2018-01-24  Richard Biener  <rguenther@suse.de>
23546         PR tree-optimization/83176
23547         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
23548         operands.
23550 2018-01-24  Richard Biener  <rguenther@suse.de>
23552         PR tree-optimization/82819
23553         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
23554         code generating pluses that are no-ops in the target precision.
23556 2018-01-24  Richard Biener  <rguenther@suse.de>
23558         PR middle-end/84000
23559         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
23561 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23563         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
23564         to merge probabilities.
23565         * predict.c (probably_never_executed): Also mark as cold functions
23566         with global 0 profile and guessed local profile.
23567         * profile-count.c (profile_probability::combine_with_count): New
23568         member function.
23569         * profile-count.h (profile_probability::operator*,
23570         profile_probability::operator*=, profile_probability::operator/,
23571         profile_probability::operator/=): Reduce precision to adjusted
23572         and set value to guessed on contradictory divisions.
23573         (profile_probability::combine_with_freq): Remove.
23574         (profile_probability::combine_wiht_count): Declare.
23575         (profile_count::force_nonzero):: Set to adjusted.
23576         (profile_count::probability_in):: Set quality to adjusted.
23577         * tree-ssa-tail-merge.c (replace_block_by): Use
23578         combine_with_count.
23580 2018-01-23  Andrew Waterman  <andrew@sifive.com>
23581             Jim Wilson  <jimw@sifive.com>
23583         * config/riscv/riscv.c (riscv_stack_boundary): New.
23584         (riscv_option_override): Set riscv_stack_boundary.  Handle
23585         riscv_preferred_stack_boundary_arg.
23586         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
23587         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
23588         (STACK_BOUNDARY): Set to riscv_stack_boundary.
23589         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
23590         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
23591         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
23593 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
23595         PR target/83905
23596         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
23597         of struct ix86_frame.
23598         (ix86_expand_epilogue): Likewise.  Add a local variable for
23599         the reg_save_offset field in struct ix86_frame.
23601 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
23603         PR tree-optimization/82604
23604         * tree-loop-distribution.c (enum partition_kind): New enum item
23605         PKIND_PARTIAL_MEMSET.
23606         (partition_builtin_p): Support above new enum item.
23607         (generate_code_for_partition): Ditto.
23608         (compute_access_range): Differentiate cases that equality can be
23609         proven at all loops, the innermost loops or no loops.
23610         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
23611         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
23612         (finalize_partitions, distribute_loop): Don't fuse partition of
23613         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
23614         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
23615         parloop is enabled.
23617 2018-01-23  Martin Liska  <mliska@suse.cz>
23619         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
23620         order to ignore the predictor.
23621         (PRED_POLYMORPHIC_CALL): Likewise.
23622         (PRED_RECURSIVE_CALL): Likewise.
23624 2018-01-23  Martin Liska  <mliska@suse.cz>
23626         * tree-profile.c (tree_profiling): Print function header to
23627         aware reader which function we are working on.
23628         * value-prof.c (gimple_find_values_to_profile): Do not print
23629         not interesting value histograms.
23631 2018-01-23  Martin Liska  <mliska@suse.cz>
23633         * profile-count.h (enum profile_quality): Add
23634         profile_uninitialized as the first value. Do not number values
23635         as they are zero based.
23636         (profile_count::verify): Update sanity check.
23637         (profile_probability::verify): Likewise.
23639 2018-01-23  Nathan Sidwell  <nathan@acm.org>
23641         * doc/invoke.texi (ffor-scope): Deprecate.
23643 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23645         PR tree-optimization/83510
23646         * domwalk.c (set_all_edges_as_executable): New function.
23647         (dom_walker::dom_walker): Convert bool param
23648         "skip_unreachable_blocks" to enum reachability.  Move setup of
23649         edge flags to set_all_edges_as_executable and only do it when
23650         reachability is REACHABLE_BLOCKS.
23651         * domwalk.h (enum dom_walker::reachability): New enum.
23652         (dom_walker::dom_walker): Convert bool param
23653         "skip_unreachable_blocks" to enum reachability.
23654         (set_all_edges_as_executable): New decl.
23655         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
23656         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
23657         "reachability".
23658         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
23659         but converting true to REACHABLE_BLOCKS.
23660         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
23661         * tree-vrp.c
23662         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
23663         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
23664         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
23665         REACHABLE_BLOCKS.
23666         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
23667         if check_all_array_refs will be called.
23669 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23671         * tree.c (selftest::test_location_wrappers): Add more test
23672         coverage.
23674 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23676         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23677         (selftest::test_bit_in_range): Likewise.
23679 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23681         PR testsuite/83888
23682         * doc/sourcebuild.texi (vect_float): Say that the selector
23683         only describes the situation when -funsafe-math-optimizations is on.
23684         (vect_float_strict): Document.
23686 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23688         PR tree-optimization/83965
23689         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23690         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23691         instead of checking only for a reduction.
23692         (vect_recog_widen_sum_pattern): Likewise.
23694 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23696         * predict.c (probably_never_executed): Only use precise profile info.
23697         (compute_function_frequency): Skip after inlining hack since we now
23698         have quality checking.
23700 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23702         * profile-count.h (profile_probability::very_unlikely,
23703         profile_probability::unlikely, profile_probability::even): Set
23704         precision to guessed.
23706 2018-01-23  Richard Biener  <rguenther@suse.de>
23708         PR tree-optimization/83963
23709         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23710         Properly terminate dominator walk when crossing the exit edge not
23711         when visiting its source block.
23713 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
23715         PR c++/83918
23716         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23717         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23719 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
23721         PR tree-optimization/83957
23722         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
23723         semicolon after for body surrounded by braces.
23725         PR tree-optimization/83081
23726         * profile-count.h (profile_probability::split): New method.
23727         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23728         Use profile_probability::split.
23729         (do_compare_rtx_and_jump): Fix adjustment of probabilities
23730         when splitting a single conditional jump into 2.
23732 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
23734         PR tree-optimization/69452
23735         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23736         decl.
23738 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23740         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23741         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23742         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23744 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23746         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23747         declaration.
23748         * config/rl78/rl78.md (movdi): New define_expand.
23749         * config/rl78/rl78.c (rl78_split_movdi): New function.
23751 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
23753         PR target/83862
23754         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23755         no longer used.
23756         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23757         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23758         128-bit to produce an UNSPEC move to get the double word with the
23759         signbit and then a shift directly to do signbit.
23760         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23761         implementation with a new version that just does either a direct
23762         move or a regular move.  Move memory interface to separate insns.
23763         Move insns so they are next to the expander.
23764         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23765         with signbit move.  Split big and little endian case.
23766         (signbit<mode>2_dm_mem_le): Likewise.
23767         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23768         (signbit<mode>2_dm2): Likewise.
23770 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23772         * config/rl78/rl78.md (anddi3): New define_expand.
23774 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23776         * config/rl78/rl78.md (umindi3): New define_expand.
23778 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23780         * config/rl78/rl78.md (smindi3): New define_expand.
23782 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23784         * config/rl78/rl78.md (smaxdi3): New define_expand.
23786 2018-01-22  Carl Love  <cel@us.ibm.com>
23788         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23789         LVX_V1TI): Add macro expansion.
23790         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23791         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23792         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23793         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23794         Change check to determine if the instruction is a byte reversing
23795         entry.  Fix typo in comment.
23796         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23797         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23798         Add def_builtin calls for new builtins.
23799         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23800         Add define_insn expansion.
23802 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23804         * config/rl78/rl78.md (umaxdi3): New define_expand.
23806 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23808         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23809         for non-QImode registers.
23811 2018-01-22  Richard Biener  <rguenther@suse.de>
23813         PR tree-optimization/83963
23814         * graphite-scop-detection.c (scop_detection::get_sese): Delay
23815         including the loop exit block.
23816         (scop_detection::merge_sese): Likewise.
23817         (scop_detection::add_scop): Do it here instead.
23819 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23821         * doc/sourcebuild.texi (arm_softfloat): Document.
23823 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
23825         PR gcc/77734
23826         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23827         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23828         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23830 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23831             David Edelsohn  <dje.gcc@gmail.com>
23833         PR target/83946
23834         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23835         Change "crset eq" to "crset 2".
23836         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23837         (*call_indirect_aix<mode>_nospec): Likewise.
23838         (*call_value_indirect_aix<mode>_nospec): Likewise.
23839         (*call_indirect_elfv2<mode>_nospec): Likewise.
23840         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23841         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23842         change assembly output from . to $.
23843         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23844         (indirect_jump<mode>_nospec): Change assembly output from . to $.
23845         (*tablejump<mode>_internal1_nospec): Likewise.
23847 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
23849         PR target/80870
23850         * config/sh/sh_optimize_sett_clrt.cc:
23851         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23853 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
23855         PR tree-optimization/83940
23856         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23857         offset_dt to vect_constant_def rather than vect_unknown_def_type.
23858         (vect_check_load_store_mask): Add a mask_dt_out parameter and
23859         use it to pass back the definition type.
23860         (vect_check_store_rhs): Likewise rhs_dt_out.
23861         (vect_build_gather_load_calls): Add a mask_dt argument and use
23862         it instead of a call to vect_is_simple_use.
23863         (vectorizable_store): Update calls to vect_check_load_store_mask
23864         and vect_check_store_rhs.  Use the dt returned by the latter instead
23865         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
23866         instead of calls to vect_is_simple_use.  Pass the scalar rather
23867         than the vector operand to vect_is_simple_use when handling
23868         second and subsequent copies of an rhs value.
23869         (vectorizable_load): Update calls to vect_check_load_store_mask
23870         and vect_build_gather_load_calls.  Use the cached mask_dt and
23871         gs_info.offset_dt instead of calls to vect_is_simple_use.
23873 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
23875         PR middle-end/83945
23876         * tree-emutls.c: Include gimplify.h.
23877         (lower_emutls_2): New function.
23878         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23879         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23880         it before further processing.
23882         PR target/83930
23883         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23884         UINTVAL (trueop1) instead of INTVAL (op1).
23886 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
23888         PR debug/81570
23889         PR debug/83728
23890         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23891         INCOMING_FRAME_SP_OFFSET if not defined.
23892         (scan_trace): Add ENTRY argument.  If true and
23893         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23894         emit a note to adjust the CFA offset.
23895         (create_cfi_notes): Adjust scan_trace callers.
23896         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23897         INCOMING_FRAME_SP_OFFSET in the CIE.
23898         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23899         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23900         Likewise.
23901         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23902         * doc/tm.texi: Regenerated.
23904 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23906         PR rtl-optimization/83147
23907         * lra-constraints.c (remove_inheritance_pseudos): Use
23908         lra_substitute_pseudo_within_insn.
23910 2018-01-19  Tom de Vries  <tom@codesourcery.com>
23911             Cesar Philippidis  <cesar@codesourcery.com>
23913         PR target/83920
23914         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23916 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
23918         PR target/83790
23919         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23920         spaces for function labels.
23922 2018-01-19  Martin Liska  <mliska@suse.cz>
23924         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23925         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23926         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23927         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23928         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23929         (PRED_CONST_RETURN): Change from 69 to 65.
23930         (PRED_NULL_RETURN): Change from 91 to 71.
23931         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23932         (PRED_LOOP_GUARD): Change from 66 to 73.
23934 2018-01-19  Martin Liska  <mliska@suse.cz>
23936         * predict.c (predict_insn_def): Add new assert.
23937         (struct branch_predictor): Change type to signed integer.
23938         (test_prediction_value_range): Amend test to cover
23939         PROB_UNINITIALIZED.
23940         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23941         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23942         (PRED_LOOP_ITERATIONS_MAX): Likewise.
23943         (PRED_LOOP_IV_COMPARE): Likewise.
23944         * predict.h (PROB_UNINITIALIZED): Define new constant.
23946 2018-01-19  Martin Liska  <mliska@suse.cz>
23948         * predict.c (dump_prediction): Add new format for
23949         analyze_brprob.py script which is enabled with -details
23950         suboption.
23951         * profile-count.h (precise_p): New function.
23953 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23955         PR tree-optimization/83922
23956         * tree-vect-loop.c (vect_verify_full_masking): Return false if
23957         there are no statements that need masking.
23958         (vect_active_double_reduction_p): New function.
23959         (vect_analyze_loop_operations): Use it when handling phis that
23960         are not in the loop header.
23962 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
23964         PR tree-optimization/83914
23965         * tree-vect-loop.c (vectorizable_induction): Don't convert
23966         init_expr or apply the peeling adjustment for inductions
23967         that are nested within the vectorized loop.
23969 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23971         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23972         instead of NEG.
23974 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
23976         PR sanitizer/81715
23977         PR testsuite/83882
23978         * function.h (gimplify_parameters): Add gimple_seq * argument.
23979         * function.c: Include gimple.h and options.h.
23980         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23981         for the added local temporaries if needed.
23982         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23983         if there are any parameter cleanups, wrap whole body into a
23984         try/finally with the cleanups.
23986 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
23988         PR target/82964
23989         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23990         Use GET_MODE_CLASS for scalar floating point.
23992 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
23994         PR ipa/82256
23995         patch by PaX Team
23996         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23997         Fix call of call_cgraph_insertion_hooks.
23999 2018-01-18  Martin Sebor  <msebor@redhat.com>
24001         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24003 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24005         PR ipa/83619
24006         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24007         frequencies.
24009 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
24011         PR other/70268
24012         * common.opt: (-ffile-prefix-map): New option.
24013         * opts.c (common_handle_option): Defer it.
24014         * opts-global.c (handle_common_deferred_options): Handle it.
24015         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24016         * file-prefix-map.h: New file.
24017         (remap_debug_filename, add_debug_prefix_map): ...here.
24018         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24019         * final.c (debug_prefix_map, add_debug_prefix_map
24020         remap_debug_filename): Move to...
24021         * file-prefix-map.c: New file.
24022         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24023         generalize, get rid of alloca(), use strrchr() instead of strchr().
24024         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24025         Implement in terms of add_prefix_map().
24026         (remap_macro_filename, remap_debug_filename): Implement in term of
24027         remap_filename().
24028         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24029         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24030         * dbxout.c: Include file-prefix-map.h.
24031         * varasm.c: Likewise.
24032         * vmsdbgout.c: Likewise.
24033         * xcoffout.c: Likewise.
24034         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24035         * doc/cppopts.texi (-fmacro-prefix-map): Document.
24036         * doc/invoke.texi (-ffile-prefix-map): Document.
24037         (-fdebug-prefix-map): Update description.
24039 2018-01-18  Martin Liska  <mliska@suse.cz>
24041         * config/i386/i386.c (indirect_thunk_name): Document that also
24042         lfence is emitted.
24043         (output_indirect_thunk): Document why both instructions
24044         (pause and lfence) are generated.
24046 2018-01-18  Richard Biener  <rguenther@suse.de>
24048         PR tree-optimization/83887
24049         * graphite-scop-detection.c
24050         (scop_detection::get_nearest_dom_with_single_entry): Remove.
24051         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24052         (scop_detection::merge_sese): Re-implement with a flood-fill
24053         algorithm that properly finds a SESE region if it exists.
24055 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24057         PR c/61240
24058         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24059         pointer_diff optimizations use view_convert instead of convert.
24061 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24063         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24064         Generate different code for -mno-speculate-indirect-jumps.
24065         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24066         (*call_indirect_aix<mode>): Disable for
24067         -mno-speculate-indirect-jumps.
24068         (*call_indirect_aix<mode>_nospec): New define_insn.
24069         (*call_value_indirect_aix<mode>): Disable for
24070         -mno-speculate-indirect-jumps.
24071         (*call_value_indirect_aix<mode>_nospec): New define_insn.
24072         (*sibcall_nonlocal_sysv<mode>): Generate different code for
24073         -mno-speculate-indirect-jumps.
24074         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24076 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
24078         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24079         long double type, set the flags for noting the default long double
24080         type, even if we don't pass or return a long double type.
24082 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
24084         PR ipa/83051
24085         * ipa-inline.c (flatten_function): Do not overwrite final inlining
24086         failure.
24088 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
24090         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24091         support for merge[hl].
24092         (fold_mergehl_helper): New helper function.
24093         (tree-vector-builder.h): New #include for tree_vector_builder usage.
24094         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24095         (altivec_vmrglw_direct): Add xxmrglw insn.
24097 2018-01-17  Andrew Waterman  <andrew@sifive.com>
24099         * config/riscv/riscv.c (riscv_conditional_register_usage): If
24100         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24102 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
24104         PR lto/83121
24105         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24106         call the lto_location_cache before reading the
24107         DECL_SOURCE_LOCATION of the types.
24109 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
24110             Richard Sandiford  <richard.sandiford@linaro.org>
24112         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24113         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24114         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24115         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24116         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24117         Add declaration.
24118         * config/aarch64/constraints.md (aarch64_movti_operand):
24119         Limit immediates.
24120         * config/aarch64/predicates.md (Uti): Add new constraint.
24122 2018-01-17  Carl Love  <cel@us.ibm.com>
24124         * config/rs6000/vsx.md (define_expand xl_len_r,
24125         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24126         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24127         lxvll.
24128         (define_expand, define_insn): Move the shift left from  the
24129         define_insn to the define_expand for lxvl and stxvl instructions.
24130         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24131         and XL_LEN_R definitions to PURE.
24133 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
24135         * config/i386/i386.c (indirect_thunk_name): Declare regno
24136         as unsigned int.  Compare regno with INVALID_REGNUM.
24137         (output_indirect_thunk): Ditto.
24138         (output_indirect_thunk_function): Ditto.
24139         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
24140         in the call to output_indirect_thunk_function.
24142 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
24144         PR middle-end/83884
24145         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24146         rather than the size of inner_type to determine the stack slot size
24147         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24149 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
24151         PR target/83546
24152         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24153         to PTA_SILVERMONT.
24155 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24157         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24158         endian Linux systems to optionally enable multilibs for selecting
24159         the long double type if the user configured an explicit type.
24160         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24161         have no long double multilibs if not defined.
24162         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24163         warn if the user used -mabi={ieee,ibm}longdouble and we built
24164         multilibs for long double.
24165         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24166         appropriate multilib option.
24167         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24168         multilib options.
24169         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24170         for building long double multilibs.
24171         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24173 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
24175         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24176         copies.
24178         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24179         64 bits.
24180         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24181         128 bits.
24183         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24184         variables.
24186         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24187         return value.
24189 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24191         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24192         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24194 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24196         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24197         different rtl trees depending on TARGET_64BIT.
24198         (rs6000_gen_lvx): Likewise.
24200 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24202         * config/visium/visium.md (nop): Tweak comment.
24203         (hazard_nop): Likewise.
24205 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24207         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24208         -mspeculate-indirect-jumps.
24209         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24210         for -mno-speculate-indirect-jumps.
24211         (*call_indirect_elfv2<mode>_nospec): New define_insn.
24212         (*call_value_indirect_elfv2<mode>): Disable for
24213         -mno-speculate-indirect-jumps.
24214         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24215         (indirect_jump): Emit different RTL for
24216         -mno-speculate-indirect-jumps.
24217         (*indirect_jump<mode>): Disable for
24218         -mno-speculate-indirect-jumps.
24219         (*indirect_jump<mode>_nospec): New define_insn.
24220         (tablejump): Emit different RTL for
24221         -mno-speculate-indirect-jumps.
24222         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24223         (tablejumpsi_nospec): New define_expand.
24224         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24225         (tablejumpdi_nospec): New define_expand.
24226         (*tablejump<mode>_internal1): Disable for
24227         -mno-speculate-indirect-jumps.
24228         (*tablejump<mode>_internal1_nospec): New define_insn.
24229         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
24230         option.
24232 2018-01-16  Artyom Skrobov tyomitch@gmail.com
24234         * caller-save.c (insert_save): Drop unnecessary parameter.  All
24235         callers updated.
24237 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24238             Richard Biener  <rguenth@suse.de>
24240         PR libgomp/83590
24241         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
24242         return early, inline manually is_gimple_sizepos.  Make sure if we
24243         call gimplify_expr we don't end up with a gimple constant.
24244         * tree.c (variably_modified_type_p): Don't return true for
24245         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
24246         * gimplify.h (is_gimple_sizepos): Remove.
24248 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24250         PR tree-optimization/83857
24251         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
24252         vectorizable_live_operation for pure SLP statements.
24253         (vectorizable_live_operation): Handle PHIs.
24255 2018-01-16  Richard Biener  <rguenther@suse.de>
24257         PR tree-optimization/83867
24258         * tree-vect-stmts.c (vect_transform_stmt): Precompute
24259         nested_in_vect_loop_p since the scalar stmt may get invalidated.
24261 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24263         PR c/83844
24264         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
24265         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
24266         If off is not INTEGER_CST, issue a may not be aligned warning
24267         rather than isn't aligned.  Use isn%'t rather than isn't.
24268         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
24269         into MULT_EXPR.
24270         <case MULT_EXPR>: Improve the case when bottom and one of the
24271         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
24272         operand, in that case check if the other operand is multiple of
24273         bottom divided by the INTEGER_CST operand.
24275 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24277         PR target/83858
24278         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
24279         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
24280         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
24281         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
24282         * config/pa/pa.c (pa_function_arg_advance): Likewise.
24283         (pa_function_arg, pa_arg_partial_bytes): Likewise.
24284         (pa_function_arg_size): New function.
24286 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24288         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
24289         in a separate statement.
24291 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24293         PR tree-optimization/83847
24294         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
24295         group gathers and scatters.
24297 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24299         PR rtl-optimization/86620
24300         * params.def (max-sched-ready-insns): Bump minimum value to 1.
24302         PR rtl-optimization/83213
24303         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
24304         to last if both are JUMP_INSNs.
24306         PR tree-optimization/83843
24307         * gimple-ssa-store-merging.c
24308         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
24309         store_immediate_info for bswap/nop orig_stores.
24311 2018-01-15  Andrew Waterman  <andrew@sifive.com>
24313         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
24314         !TARGET_MUL.
24315         <UDIV>: Increase cost if !TARGET_DIV.
24317 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
24319         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
24320         (define_attr "cr_logical_3op"): New.
24321         (cceq_ior_compare): Adjust.
24322         (cceq_ior_compare_complement): Adjust.
24323         (*cceq_rev_compare): Adjust.
24324         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
24325         (is_cracked_insn): Adjust.
24326         (insn_must_be_first_in_group): Adjust.
24327         * config/rs6000/40x.md: Adjust.
24328         * config/rs6000/440.md: Adjust.
24329         * config/rs6000/476.md: Adjust.
24330         * config/rs6000/601.md: Adjust.
24331         * config/rs6000/603.md: Adjust.
24332         * config/rs6000/6xx.md: Adjust.
24333         * config/rs6000/7450.md: Adjust.
24334         * config/rs6000/7xx.md: Adjust.
24335         * config/rs6000/8540.md: Adjust.
24336         * config/rs6000/cell.md: Adjust.
24337         * config/rs6000/e300c2c3.md: Adjust.
24338         * config/rs6000/e500mc.md: Adjust.
24339         * config/rs6000/e500mc64.md: Adjust.
24340         * config/rs6000/e5500.md: Adjust.
24341         * config/rs6000/e6500.md: Adjust.
24342         * config/rs6000/mpc.md: Adjust.
24343         * config/rs6000/power4.md: Adjust.
24344         * config/rs6000/power5.md: Adjust.
24345         * config/rs6000/power6.md: Adjust.
24346         * config/rs6000/power7.md: Adjust.
24347         * config/rs6000/power8.md: Adjust.
24348         * config/rs6000/power9.md: Adjust.
24349         * config/rs6000/rs64.md: Adjust.
24350         * config/rs6000/titan.md: Adjust.
24352 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24354         * config/i386/predicates.md (indirect_branch_operand): Rewrite
24355         ix86_indirect_branch_register logic.
24357 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24359         * config/i386/constraints.md (Bs): Update
24360         ix86_indirect_branch_register check.  Don't check
24361         ix86_indirect_branch_register with GOT_memory_operand.
24362         (Bw): Likewise.
24363         * config/i386/predicates.md (GOT_memory_operand): Don't check
24364         ix86_indirect_branch_register here.
24365         (GOT32_symbol_operand): Likewise.
24367 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24369         * config/i386/predicates.md (constant_call_address_operand):
24370         Rewrite ix86_indirect_branch_register logic.
24371         (sibcall_insn_operand): Likewise.
24373 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24375         * config/i386/constraints.md (Bs): Replace
24376         ix86_indirect_branch_thunk_register with
24377         ix86_indirect_branch_register.
24378         (Bw): Likewise.
24379         * config/i386/i386.md (indirect_jump): Likewise.
24380         (tablejump): Likewise.
24381         (*sibcall_memory): Likewise.
24382         (*sibcall_value_memory): Likewise.
24383         Peepholes of indirect call and jump via memory: Likewise.
24384         * config/i386/i386.opt: Likewise.
24385         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24386         (GOT_memory_operand): Likewise.
24387         (call_insn_operand): Likewise.
24388         (sibcall_insn_operand): Likewise.
24389         (GOT32_symbol_operand): Likewise.
24391 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
24393         PR middle-end/83837
24394         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
24395         type rather than type addr's type points to.
24396         (expand_omp_atomic_mutex): Likewise.
24397         (expand_omp_atomic): Likewise.
24399 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24401         PR target/83839
24402         * config/i386/i386.c (output_indirect_thunk_function): Use
24403         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
24404         for  __x86_return_thunk.
24406 2018-01-15  Richard Biener  <rguenther@suse.de>
24408         PR middle-end/83850
24409         * expmed.c (extract_bit_field_1): Fix typo.
24411 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24413         PR target/83687
24414         * config/arm/iterators.md (VF): New mode iterator.
24415         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
24416         Remove integer-related logic from pattern.
24417         (neon_vabd<mode>_3): Likewise.
24419 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
24421         PR middle-end/82694
24422         * common.opt (fstrict-overflow): No longer an alias.
24423         (fwrapv-pointer): New option.
24424         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
24425         also for pointer types based on flag_wrapv_pointer.
24426         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
24427         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
24428         opts->x_flag_wrapv got set.
24429         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
24430         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
24431         POINTER_TYPE_OVERFLOW_UNDEFINED.
24432         * match.pd: Likewise in address comparison pattern.
24433         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
24435 2018-01-15  Richard Biener  <rguenther@suse.de>
24437         PR lto/83804
24438         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
24439         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
24440         Reset type names to their identifier if their TYPE_DECL doesn't
24441         have linkage (and thus is used for ODR and devirt).
24442         (save_debug_info_for_decl): Remove.
24443         (save_debug_info_for_type): Likewise.
24444         (add_tree_to_fld_list): Adjust.
24445         * tree-pretty-print.c (dump_generic_node): Make dumping of
24446         type names more robust.
24448 2018-01-15  Richard Biener  <rguenther@suse.de>
24450         * BASE-VER: Bump to 8.0.1.
24452 2018-01-14  Martin Sebor  <msebor@redhat.com>
24454         PR other/83508
24455         * builtins.c (check_access): Avoid warning when the no-warning bit
24456         is set.
24458 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
24460         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
24461         * ira-color (allocno_hard_regs_compare): Likewise.
24463 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
24465         PR target/83013
24466         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
24467         Use .pushsection/.popsection.
24469 2018-01-14  Martin Sebor  <msebor@redhat.com>
24471         PR c++/81327
24472         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
24474 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
24476         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
24477         entry from extra_headers.
24478         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
24479         extra_headers, make the list bitwise identical to the i?86-*-* one.
24481 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24483         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
24484         -mcmodel=large with -mindirect-branch=thunk,
24485         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
24486         -mfunction-return=thunk-extern.
24487         * doc/invoke.texi: Document -mcmodel=large is incompatible with
24488         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
24489         -mfunction-return=thunk and -mfunction-return=thunk-extern.
24491 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24493         * config/i386/i386.c (print_reg): Print the name of the full
24494         integer register without '%'.
24495         (ix86_print_operand): Handle 'V'.
24496         * doc/extend.texi: Document 'V' modifier.
24498 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24500         * config/i386/constraints.md (Bs): Disallow memory operand for
24501         -mindirect-branch-register.
24502         (Bw): Likewise.
24503         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24504         (GOT_memory_operand): Likewise.
24505         (call_insn_operand): Likewise.
24506         (sibcall_insn_operand): Likewise.
24507         (GOT32_symbol_operand): Likewise.
24508         * config/i386/i386.md (indirect_jump): Call convert_memory_address
24509         for -mindirect-branch-register.
24510         (tablejump): Likewise.
24511         (*sibcall_memory): Likewise.
24512         (*sibcall_value_memory): Likewise.
24513         Disallow peepholes of indirect call and jump via memory for
24514         -mindirect-branch-register.
24515         (*call_pop): Replace m with Bw.
24516         (*call_value_pop): Likewise.
24517         (*sibcall_pop_memory): Replace m with Bs.
24518         * config/i386/i386.opt (mindirect-branch-register): New option.
24519         * doc/invoke.texi: Document -mindirect-branch-register option.
24521 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24523         * config/i386/i386-protos.h (ix86_output_function_return): New.
24524         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
24525         set function_return_type.
24526         (indirect_thunk_name): Add ret_p to indicate thunk for function
24527         return.
24528         (output_indirect_thunk_function): Pass false to
24529         indirect_thunk_name.
24530         (ix86_output_indirect_branch_via_reg): Likewise.
24531         (ix86_output_indirect_branch_via_push): Likewise.
24532         (output_indirect_thunk_function): Create alias for function
24533         return thunk if regno < 0.
24534         (ix86_output_function_return): New function.
24535         (ix86_handle_fndecl_attribute): Handle function_return.
24536         (ix86_attribute_table): Add function_return.
24537         * config/i386/i386.h (machine_function): Add
24538         function_return_type.
24539         * config/i386/i386.md (simple_return_internal): Use
24540         ix86_output_function_return.
24541         (simple_return_internal_long): Likewise.
24542         * config/i386/i386.opt (mfunction-return=): New option.
24543         (indirect_branch): Mention -mfunction-return=.
24544         * doc/extend.texi: Document function_return function attribute.
24545         * doc/invoke.texi: Document -mfunction-return= option.
24547 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24549         * config/i386/i386-opts.h (indirect_branch): New.
24550         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
24551         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
24552         with local indirect jump when converting indirect call and jump.
24553         (ix86_set_indirect_branch_type): New.
24554         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
24555         (indirectlabelno): New.
24556         (indirect_thunk_needed): Likewise.
24557         (indirect_thunk_bnd_needed): Likewise.
24558         (indirect_thunks_used): Likewise.
24559         (indirect_thunks_bnd_used): Likewise.
24560         (INDIRECT_LABEL): Likewise.
24561         (indirect_thunk_name): Likewise.
24562         (output_indirect_thunk): Likewise.
24563         (output_indirect_thunk_function): Likewise.
24564         (ix86_output_indirect_branch_via_reg): Likewise.
24565         (ix86_output_indirect_branch_via_push): Likewise.
24566         (ix86_output_indirect_branch): Likewise.
24567         (ix86_output_indirect_jmp): Likewise.
24568         (ix86_code_end): Call output_indirect_thunk_function if needed.
24569         (ix86_output_call_insn): Call ix86_output_indirect_branch if
24570         needed.
24571         (ix86_handle_fndecl_attribute): Handle indirect_branch.
24572         (ix86_attribute_table): Add indirect_branch.
24573         * config/i386/i386.h (machine_function): Add indirect_branch_type
24574         and has_local_indirect_jump.
24575         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
24576         to true.
24577         (tablejump): Likewise.
24578         (*indirect_jump): Use ix86_output_indirect_jmp.
24579         (*tablejump_1): Likewise.
24580         (simple_return_indirect_internal): Likewise.
24581         * config/i386/i386.opt (mindirect-branch=): New option.
24582         (indirect_branch): New.
24583         (keep): Likewise.
24584         (thunk): Likewise.
24585         (thunk-inline): Likewise.
24586         (thunk-extern): Likewise.
24587         * doc/extend.texi: Document indirect_branch function attribute.
24588         * doc/invoke.texi: Document -mindirect-branch= option.
24590 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
24592         PR ipa/83051
24593         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
24595 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
24597         * ipa-inline.c (want_inline_small_function_p): Return false if
24598         inlining has already failed with CIF_FINAL_ERROR.
24599         (update_caller_keys): Call want_inline_small_function_p before
24600         can_inline_edge_p.
24601         (update_callee_keys): Likewise.
24603 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24605         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
24606         New function.
24607         (rs6000_quadword_masked_address_p): Likewise.
24608         (quad_aligned_load_p): Likewise.
24609         (quad_aligned_store_p): Likewise.
24610         (const_load_sequence_p): Add comment to describe the outer-most loop.
24611         (mimic_memory_attributes_and_flags): New function.
24612         (rs6000_gen_stvx): Likewise.
24613         (replace_swapped_aligned_store): Likewise.
24614         (rs6000_gen_lvx): Likewise.
24615         (replace_swapped_aligned_load): Likewise.
24616         (replace_swapped_load_constant): Capitalize argument name in
24617         comment describing this function.
24618         (rs6000_analyze_swaps): Add a third pass to search for vector loads
24619         and stores that access quad-word aligned addresses and replace
24620         with stvx or lvx instructions when appropriate.
24621         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
24622         New function prototype.
24623         (rs6000_quadword_masked_address_p): Likewise.
24624         (rs6000_gen_lvx): Likewise.
24625         (rs6000_gen_stvx): Likewise.
24626         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
24627         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
24628         when memory address is aligned.
24629         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
24630         this split to select lvx instruction when memory address is aligned.
24631         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
24632         instruction when memory address is aligned.
24633         (*vsx_le_perm_load_v16qi): Likewise.
24634         (four unnamed splitters): Modify to select the stvx instruction
24635         when memory is aligned.
24637 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
24639         * predict.c (determine_unlikely_bbs): Handle correctly BBs
24640         which appears in the queue multiple times.
24642 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24643             Alan Hayward  <alan.hayward@arm.com>
24644             David Sherwood  <david.sherwood@arm.com>
24646         * tree-vectorizer.h (vec_lower_bound): New structure.
24647         (_loop_vec_info): Add check_nonzero and lower_bounds.
24648         (LOOP_VINFO_CHECK_NONZERO): New macro.
24649         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
24650         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
24651         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
24652         fields.  Make seg_len the distance travelled, not including the
24653         access size.
24654         (dr_direction_indicator): Declare.
24655         (dr_zero_step_indicator): Likewise.
24656         (dr_known_forward_stride_p): Likewise.
24657         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
24658         tree-ssanames.h.
24659         (runtime_alias_check_p): Allow runtime alias checks with
24660         variable strides.
24661         (operator ==): Compare access_size and align.
24662         (prune_runtime_alias_test_list): Rework for new distinction between
24663         the access_size and seg_len.
24664         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
24665         segment lengths.
24666         (get_segment_min_max): New function.
24667         (create_intersect_range_checks): Use it.
24668         (dr_step_indicator): New function.
24669         (dr_direction_indicator): Likewise.
24670         (dr_zero_step_indicator): Likewise.
24671         (dr_known_forward_stride_p): Likewise.
24672         * tree-loop-distribution.c (data_ref_segment_size): Return
24673         DR_STEP * (niters - 1).
24674         (compute_alias_check_pairs): Update call to the dr_with_seg_len
24675         constructor.
24676         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24677         (vect_preserves_scalar_order_p): New function, split out from...
24678         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
24679         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24680         (vect_vfa_access_size): New function.
24681         (vect_vfa_align): Likewise.
24682         (vect_compile_time_alias): Take access_size_a and access_b arguments.
24683         (dump_lower_bound): New function.
24684         (vect_check_lower_bound): Likewise.
24685         (vect_small_gap_p): Likewise.
24686         (vectorizable_with_step_bound_p): Likewise.
24687         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24688         depencies if the vectorization factor is 1.  Convert the checks
24689         for nonzero steps into checks on the bounds of DR_STEP.  Try using
24690         a bunds check for variable steps if the minimum required step is
24691         relatively small. Update calls to the dr_with_seg_len
24692         constructor and to vect_compile_time_alias.
24693         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24694         function.
24695         (vect_loop_versioning): Call it.
24696         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24697         when retrying.
24698         (vect_estimate_min_profitable_iters): Account for any bounds checks.
24700 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24701             Alan Hayward  <alan.hayward@arm.com>
24702             David Sherwood  <david.sherwood@arm.com>
24704         * doc/sourcebuild.texi (vect_scatter_store): Document.
24705         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24706         optabs.
24707         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24708         Document.
24709         * genopinit.c (main): Add supports_vec_scatter_store and
24710         supports_vec_scatter_store_cached to target_optabs.
24711         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24712         IFN_MASK_SCATTER_STORE.
24713         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24714         functions.
24715         * internal-fn.h (internal_store_fn_p): Declare.
24716         (internal_fn_stored_value_index): Likewise.
24717         * internal-fn.c (scatter_store_direct): New macro.
24718         (expand_scatter_store_optab_fn): New function.
24719         (direct_scatter_store_optab_supported_p): New macro.
24720         (internal_store_fn_p): New function.
24721         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24722         IFN_MASK_SCATTER_STORE.
24723         (internal_fn_mask_index): Likewise.
24724         (internal_fn_stored_value_index): New function.
24725         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24726         for scatter stores.
24727         * optabs-query.h (supports_vec_scatter_store_p): Declare.
24728         * optabs-query.c (supports_vec_scatter_store_p): New function.
24729         * tree-vectorizer.h (vect_get_store_rhs): Declare.
24730         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24731         true for scatter stores.
24732         (vect_gather_scatter_fn_p): Handle scatter stores too.
24733         (vect_check_gather_scatter): Consider using scatter stores if
24734         supports_vec_scatter_store_p.
24735         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24736         scatter stores too.
24737         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24738         internal_fn_stored_value_index.
24739         (check_load_store_masking): Handle scatter stores too.
24740         (vect_get_store_rhs): Make public.
24741         (vectorizable_call): Use internal_store_fn_p.
24742         (vectorizable_store): Handle scatter store internal functions.
24743         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24744         when deciding whether the end of the group has been reached.
24745         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24746         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24747         (mask_scatter_store<mode>): New insns.
24749 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24750             Alan Hayward  <alan.hayward@arm.com>
24751             David Sherwood  <david.sherwood@arm.com>
24753         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24754         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24755         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24756         function.
24757         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24758         Use vect_truncate_gather_scatter_offset if we can't treat the
24759         operation as a normal gather load or scatter store.
24760         (get_group_load_store_type): Take the gather_scatter_info
24761         as argument.  Try using a gather load or scatter store for
24762         single-element groups.
24763         (get_load_store_type): Update calls to get_group_load_store_type
24764         and vect_use_strided_gather_scatters_p.
24766 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24767             Alan Hayward  <alan.hayward@arm.com>
24768             David Sherwood  <david.sherwood@arm.com>
24770         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24771         optional tree argument.
24772         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24773         null target hooks.
24774         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24775         but continue to use the current value as a fallback.
24776         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24777         to compare the updates.
24778         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24779         (get_load_store_type): Use it when handling a strided access.
24780         (vect_get_strided_load_store_ops): New function.
24781         (vect_get_data_ptr_increment): Likewise.
24782         (vectorizable_load): Handle strided gather loads.  Always pass
24783         a step to vect_create_data_ref_ptr and bump_vector_ptr.
24785 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24786             Alan Hayward  <alan.hayward@arm.com>
24787             David Sherwood  <david.sherwood@arm.com>
24789         * doc/md.texi (gather_load@var{m}): Document.
24790         (mask_gather_load@var{m}): Likewise.
24791         * genopinit.c (main): Add supports_vec_gather_load and
24792         supports_vec_gather_load_cached to target_optabs.
24793         * optabs-tree.c (init_tree_optimization_optabs): Use
24794         ggc_cleared_alloc to allocate target_optabs.
24795         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24796         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24797         functions.
24798         * internal-fn.h (internal_load_fn_p): Declare.
24799         (internal_gather_scatter_fn_p): Likewise.
24800         (internal_fn_mask_index): Likewise.
24801         (internal_gather_scatter_fn_supported_p): Likewise.
24802         * internal-fn.c (gather_load_direct): New macro.
24803         (expand_gather_load_optab_fn): New function.
24804         (direct_gather_load_optab_supported_p): New macro.
24805         (direct_internal_fn_optab): New function.
24806         (internal_load_fn_p): Likewise.
24807         (internal_gather_scatter_fn_p): Likewise.
24808         (internal_fn_mask_index): Likewise.
24809         (internal_gather_scatter_fn_supported_p): Likewise.
24810         * optabs-query.c (supports_at_least_one_mode_p): New function.
24811         (supports_vec_gather_load_p): Likewise.
24812         * optabs-query.h (supports_vec_gather_load_p): Declare.
24813         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24814         and memory_type field.
24815         (NUM_PATTERNS): Bump to 15.
24816         * tree-vect-data-refs.c: Include internal-fn.h.
24817         (vect_gather_scatter_fn_p): New function.
24818         (vect_describe_gather_scatter_call): Likewise.
24819         (vect_check_gather_scatter): Try using internal functions for
24820         gather loads.  Recognize existing calls to a gather load function.
24821         (vect_analyze_data_refs): Consider using gather loads if
24822         supports_vec_gather_load_p.
24823         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24824         (vect_get_gather_scatter_offset_type): Likewise.
24825         (vect_convert_mask_for_vectype): Likewise.
24826         (vect_add_conversion_to_patterm): Likewise.
24827         (vect_try_gather_scatter_pattern): Likewise.
24828         (vect_recog_gather_scatter_pattern): New pattern recognizer.
24829         (vect_vect_recog_func_ptrs): Add it.
24830         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24831         internal_fn_mask_index and internal_gather_scatter_fn_p.
24832         (check_load_store_masking): Take the gather_scatter_info as an
24833         argument and handle gather loads.
24834         (vect_get_gather_scatter_ops): New function.
24835         (vectorizable_call): Check internal_load_fn_p.
24836         (vectorizable_load): Likewise.  Handle gather load internal
24837         functions.
24838         (vectorizable_store): Update call to check_load_store_masking.
24839         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24840         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24841         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24842         (aarch64_gather_scale_operand_d): New predicates.
24843         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24844         (mask_gather_load<mode>): New insns.
24846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24847             Alan Hayward  <alan.hayward@arm.com>
24848             David Sherwood  <david.sherwood@arm.com>
24850         * optabs.def (fold_left_plus_optab): New optab.
24851         * doc/md.texi (fold_left_plus_@var{m}): Document.
24852         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24853         * internal-fn.c (fold_left_direct): Define.
24854         (expand_fold_left_optab_fn): Likewise.
24855         (direct_fold_left_optab_supported_p): Likewise.
24856         * fold-const-call.c (fold_const_fold_left): New function.
24857         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24858         * tree-parloops.c (valid_reduction_p): New function.
24859         (gather_scalar_reductions): Use it.
24860         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24861         (vect_finish_replace_stmt): Declare.
24862         * tree-vect-loop.c (fold_left_reduction_fn): New function.
24863         (needs_fold_left_reduction_p): New function, split out from...
24864         (vect_is_simple_reduction): ...here.  Accept reductions that
24865         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24866         (vect_force_simple_reduction): Also store the reduction type in
24867         the assignment's STMT_VINFO_REDUC_TYPE.
24868         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24869         (merge_with_identity): New function.
24870         (vect_expand_fold_left): Likewise.
24871         (vectorize_fold_left_reduction): Likewise.
24872         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
24873         scalar phi in place for it.  Check for target support and reject
24874         cases that would reassociate the operation.  Defer the transform
24875         phase to vectorize_fold_left_reduction.
24876         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24877         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24878         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24880 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24882         * tree-if-conv.c (predicate_mem_writes): Remove redundant
24883         call to ifc_temp_var.
24885 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24886             Alan Hayward  <alan.hayward@arm.com>
24887             David Sherwood  <david.sherwood@arm.com>
24889         * target.def (legitimize_address_displacement): Take the original
24890         offset as a poly_int.
24891         * targhooks.h (default_legitimize_address_displacement): Update
24892         accordingly.
24893         * targhooks.c (default_legitimize_address_displacement): Likewise.
24894         * doc/tm.texi: Regenerate.
24895         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24896         as an argument, moving assert of ad->disp == ad->disp_term to...
24897         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
24898         Try calling targetm.legitimize_address_displacement before expanding
24899         the address rather than afterwards, and adjust for the new interface.
24900         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24901         Match the new hook interface.  Handle SVE addresses.
24902         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24903         new hook interface.
24905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24907         * Makefile.in (OBJS): Add early-remat.o.
24908         * target.def (select_early_remat_modes): New hook.
24909         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24910         * doc/tm.texi: Regenerate.
24911         * targhooks.h (default_select_early_remat_modes): Declare.
24912         * targhooks.c (default_select_early_remat_modes): New function.
24913         * timevar.def (TV_EARLY_REMAT): New timevar.
24914         * passes.def (pass_early_remat): New pass.
24915         * tree-pass.h (make_pass_early_remat): Declare.
24916         * early-remat.c: New file.
24917         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24918         function.
24919         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24921 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24922             Alan Hayward  <alan.hayward@arm.com>
24923             David Sherwood  <david.sherwood@arm.com>
24925         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24926         vfm1 with a bound_epilog parameter.
24927         (vect_do_peeling): Update calls accordingly, and move the prologue
24928         call earlier in the function.  Treat the base bound_epilog as 0 for
24929         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
24930         this base when peeling for gaps.
24931         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24932         with fully-masked loops.
24933         (vect_estimate_min_profitable_iters): Handle the single peeled
24934         iteration in that case.
24936 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24937             Alan Hayward  <alan.hayward@arm.com>
24938             David Sherwood  <david.sherwood@arm.com>
24940         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24941         single-element interleaving even if the size is not a power of 2.
24942         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24943         accesses for single-element interleaving if the group size is
24944         not a power of 2.
24946 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24947             Alan Hayward  <alan.hayward@arm.com>
24948             David Sherwood  <david.sherwood@arm.com>
24950         * doc/md.texi (fold_extract_last_@var{m}): Document.
24951         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24952         * optabs.def (fold_extract_last_optab): New optab.
24953         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24954         * internal-fn.c (fold_extract_direct): New macro.
24955         (expand_fold_extract_optab_fn): Likewise.
24956         (direct_fold_extract_optab_supported_p): Likewise.
24957         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24958         * tree-vect-loop.c (vect_model_reduction_cost): Handle
24959         EXTRACT_LAST_REDUCTION.
24960         (get_initial_def_for_reduction): Do not create an initial vector
24961         for EXTRACT_LAST_REDUCTION reductions.
24962         (vectorizable_reduction): Leave the scalar phi in place for
24963         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
24964         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
24965         epilogue code for EXTRACT_LAST_REDUCTION and defer the
24966         transform phase to vectorizable_condition.
24967         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24968         split out from...
24969         (vect_finish_stmt_generation): ...here.
24970         (vect_finish_replace_stmt): New function.
24971         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24972         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24973         pattern.
24974         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24976 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24977             Alan Hayward  <alan.hayward@arm.com>
24978             David Sherwood  <david.sherwood@arm.com>
24980         * doc/md.texi (extract_last_@var{m}): Document.
24981         * optabs.def (extract_last_optab): New optab.
24982         * internal-fn.def (EXTRACT_LAST): New internal function.
24983         * internal-fn.c (cond_unary_direct): New macro.
24984         (expand_cond_unary_optab_fn): Likewise.
24985         (direct_cond_unary_optab_supported_p): Likewise.
24986         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24987         loops using EXTRACT_LAST.
24988         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24989         (extract_last_<mode>): ...this optab.
24990         (vec_extract<mode><Vel>): Update accordingly.
24992 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24993             Alan Hayward  <alan.hayward@arm.com>
24994             David Sherwood  <david.sherwood@arm.com>
24996         * target.def (empty_mask_is_expensive): New hook.
24997         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24998         * doc/tm.texi: Regenerate.
24999         * targhooks.h (default_empty_mask_is_expensive): Declare.
25000         * targhooks.c (default_empty_mask_is_expensive): New function.
25001         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25002         if the target says that empty masks are expensive.
25003         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25004         New function.
25005         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25007 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25008             Alan Hayward  <alan.hayward@arm.com>
25009             David Sherwood  <david.sherwood@arm.com>
25011         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25012         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25013         (vect_use_loop_mask_for_alignment_p): New function.
25014         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25015         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25016         niters_skip argument.  Make sure that the first niters_skip elements
25017         of the first iteration are inactive.
25018         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25019         Update call to vect_set_loop_masks_directly.
25020         (get_misalign_in_elems): New function, split out from...
25021         (vect_gen_prolog_loop_niters): ...here.
25022         (vect_update_init_of_dr): Take a code argument that specifies whether
25023         the adjustment should be added or subtracted.
25024         (vect_update_init_of_drs): Likewise.
25025         (vect_prepare_for_masked_peels): New function.
25026         (vect_do_peeling): Skip prologue peeling if we're using a mask
25027         instead.  Update call to vect_update_inits_of_drs.
25028         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25029         mask_skip_niters.
25030         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25031         alignment.  Do not include the number of peeled iterations in
25032         the minimum threshold in that case.
25033         (vectorizable_induction): Adjust the start value down by
25034         LOOP_VINFO_MASK_SKIP_NITERS iterations.
25035         (vect_transform_loop): Call vect_prepare_for_masked_peels.
25036         Take the number of skipped iterations into account when calculating
25037         the loop bounds.
25038         * tree-vect-stmts.c (vect_gen_while_not): New function.
25040 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25041             Alan Hayward  <alan.hayward@arm.com>
25042             David Sherwood  <david.sherwood@arm.com>
25044         * doc/sourcebuild.texi (vect_fully_masked): Document.
25045         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25046         default value to 0.
25047         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25048         split out from...
25049         (vect_analyze_loop_2): ...here. Don't check the vectorization
25050         factor against the number of loop iterations if the loop is
25051         fully-masked.
25053 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25054             Alan Hayward  <alan.hayward@arm.com>
25055             David Sherwood  <david.sherwood@arm.com>
25057         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25058         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25059         (dump_groups): Update accordingly.
25060         (iv_use::mem_type): New member variable.
25061         (address_p): New function.
25062         (record_use): Add a mem_type argument and initialize the new
25063         mem_type field.
25064         (record_group_use): Add a mem_type argument.  Use address_p.
25065         Remove obsolete null checks of base_object.  Update call to record_use.
25066         (find_interesting_uses_op): Update call to record_group_use.
25067         (find_interesting_uses_cond): Likewise.
25068         (find_interesting_uses_address): Likewise.
25069         (get_mem_type_for_internal_fn): New function.
25070         (find_address_like_use): Likewise.
25071         (find_interesting_uses_stmt): Try find_address_like_use before
25072         calling find_interesting_uses_op.
25073         (addr_offset_valid_p): Use the iv mem_type field as the type
25074         of the addressed memory.
25075         (add_autoinc_candidates): Likewise.
25076         (get_address_cost): Likewise.
25077         (split_small_address_groups_p): Use address_p.
25078         (split_address_groups): Likewise.
25079         (add_iv_candidate_for_use): Likewise.
25080         (autoinc_possible_for_pair): Likewise.
25081         (rewrite_groups): Likewise.
25082         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25083         (determine_group_iv_cost): Update after split of USE_ADDRESS.
25084         (get_alias_ptr_type_for_ptr_address): New function.
25085         (rewrite_use_address): Rewrite address uses in calls that were
25086         identified by find_address_like_use.
25088 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25089             Alan Hayward  <alan.hayward@arm.com>
25090             David Sherwood  <david.sherwood@arm.com>
25092         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25093         TARGET_MEM_REFs.
25094         * gimple-expr.h (is_gimple_addressable: Likewise.
25095         * gimple-expr.c (is_gimple_address): Likewise.
25096         * internal-fn.c (expand_call_mem_ref): New function.
25097         (expand_mask_load_optab_fn): Use it.
25098         (expand_mask_store_optab_fn): Likewise.
25100 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25101             Alan Hayward  <alan.hayward@arm.com>
25102             David Sherwood  <david.sherwood@arm.com>
25104         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25105         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25106         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25107         (cond_umax@var{mode}): Document.
25108         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25109         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25110         (cond_umin_optab, cond_umax_optab): New optabs.
25111         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25112         (COND_IOR, COND_XOR): New internal functions.
25113         * internal-fn.h (get_conditional_internal_fn): Declare.
25114         * internal-fn.c (cond_binary_direct): New macro.
25115         (expand_cond_binary_optab_fn): Likewise.
25116         (direct_cond_binary_optab_supported_p): Likewise.
25117         (get_conditional_internal_fn): New function.
25118         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25119         Cope with reduction statements that are vectorized as calls rather
25120         than assignments.
25121         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25122         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25123         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25124         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25125         (UNSPEC_COND_EOR): New unspecs.
25126         (optab): Add mappings for them.
25127         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25128         (sve_int_op, sve_fp_op): New int attributes.
25130 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25131             Alan Hayward  <alan.hayward@arm.com>
25132             David Sherwood  <david.sherwood@arm.com>
25134         * optabs.def (while_ult_optab): New optab.
25135         * doc/md.texi (while_ult@var{m}@var{n}): Document.
25136         * internal-fn.def (WHILE_ULT): New internal function.
25137         * internal-fn.h (direct_internal_fn_supported_p): New override
25138         that takes two types as argument.
25139         * internal-fn.c (while_direct): New macro.
25140         (expand_while_optab_fn): New function.
25141         (convert_optab_supported_p): Likewise.
25142         (direct_while_optab_supported_p): New macro.
25143         * wide-int.h (wi::udiv_ceil): New function.
25144         * tree-vectorizer.h (rgroup_masks): New structure.
25145         (vec_loop_masks): New typedef.
25146         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25147         and fully_masked_p.
25148         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25149         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25150         (vect_max_vf): New function.
25151         (slpeel_make_loop_iterate_ntimes): Delete.
25152         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25153         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25154         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25155         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25156         internal-fn.h, stor-layout.h and optabs-query.h.
25157         (vect_set_loop_mask): New function.
25158         (add_preheader_seq): Likewise.
25159         (add_header_seq): Likewise.
25160         (interleave_supported_p): Likewise.
25161         (vect_maybe_permute_loop_masks): Likewise.
25162         (vect_set_loop_masks_directly): Likewise.
25163         (vect_set_loop_condition_masked): Likewise.
25164         (vect_set_loop_condition_unmasked): New function, split out from
25165         slpeel_make_loop_iterate_ntimes.
25166         (slpeel_make_loop_iterate_ntimes): Rename to..
25167         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
25168         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25169         (vect_do_peeling): Update call accordingly.
25170         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25171         loops.
25172         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25173         mask_compare_type, can_fully_mask_p and fully_masked_p.
25174         (release_vec_loop_masks): New function.
25175         (_loop_vec_info): Use it to free the loop masks.
25176         (can_produce_all_loop_masks_p): New function.
25177         (vect_get_max_nscalars_per_iter): Likewise.
25178         (vect_verify_full_masking): Likewise.
25179         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25180         retries, and free the mask rgroups before retrying.  Check loop-wide
25181         reasons for disallowing fully-masked loops.  Make the final decision
25182         about whether use a fully-masked loop or not.
25183         (vect_estimate_min_profitable_iters): Do not assume that peeling
25184         for the number of iterations will be needed for fully-masked loops.
25185         (vectorizable_reduction): Disable fully-masked loops.
25186         (vectorizable_live_operation): Likewise.
25187         (vect_halve_mask_nunits): New function.
25188         (vect_double_mask_nunits): Likewise.
25189         (vect_record_loop_mask): Likewise.
25190         (vect_get_loop_mask): Likewise.
25191         (vect_transform_loop): Handle the case in which the final loop
25192         iteration might handle a partial vector.  Call vect_set_loop_condition
25193         instead of slpeel_make_loop_iterate_ntimes.
25194         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25195         (check_load_store_masking): New function.
25196         (prepare_load_store_mask): Likewise.
25197         (vectorizable_store): Handle fully-masked loops.
25198         (vectorizable_load): Likewise.
25199         (supportable_widening_operation): Use vect_halve_mask_nunits for
25200         booleans.
25201         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25202         (vect_gen_while): New function.
25203         * config/aarch64/aarch64.md (umax<mode>3): New expander.
25204         (aarch64_uqdec<mode>): New insn.
25206 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25207             Alan Hayward  <alan.hayward@arm.com>
25208             David Sherwood  <david.sherwood@arm.com>
25210         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25211         (reduc_xor_scal_optab): New optabs.
25212         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25213         (reduc_xor_scal_@var{m}): Document.
25214         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25215         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25216         internal functions.
25217         * fold-const-call.c (fold_const_call): Handle them.
25218         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25219         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25220         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25221         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25222         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25223         (UNSPEC_XORV): New unspecs.
25224         (optab): Add entries for them.
25225         (BITWISEV): New int iterator.
25226         (bit_reduc_op): New int attributes.
25228 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25229             Alan Hayward  <alan.hayward@arm.com>
25230             David Sherwood  <david.sherwood@arm.com>
25232         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
25233         * internal-fn.def (VEC_SHL_INSERT): New internal function.
25234         * optabs.def (vec_shl_insert_optab): New optab.
25235         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
25236         (duplicate_and_interleave): Likewise.
25237         * tree-vect-loop.c: Include internal-fn.h.
25238         (neutral_op_for_slp_reduction): New function, split out from
25239         get_initial_defs_for_reduction.
25240         (get_initial_def_for_reduction): Handle option 2 for variable-length
25241         vectors by loading the neutral value into a vector and then shifting
25242         the initial value into element 0.
25243         (get_initial_defs_for_reduction): Replace the code argument with
25244         the neutral value calculated by neutral_op_for_slp_reduction.
25245         Use gimple_build_vector for constant-length vectors.
25246         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
25247         but the first group_size elements have a neutral value.
25248         Use duplicate_and_interleave otherwise.
25249         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
25250         Update call to get_initial_defs_for_reduction.  Handle SLP
25251         reductions for variable-length vectors by creating one vector
25252         result for each scalar result, with the elements associated
25253         with other scalar results stubbed out with the neutral value.
25254         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
25255         Require IFN_VEC_SHL_INSERT for double reductions on
25256         variable-length vectors, or SLP reductions that have
25257         a neutral value.  Require can_duplicate_and_interleave_p
25258         support for variable-length unchained SLP reductions if there
25259         is no neutral value, such as for MIN/MAX reductions.  Also require
25260         the number of vector elements to be a multiple of the number of
25261         SLP statements when doing variable-length unchained SLP reductions.
25262         Update call to vect_create_epilog_for_reduction.
25263         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
25264         and remove initial values.
25265         (duplicate_and_interleave): Make public.
25266         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
25267         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
25269 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25270             Alan Hayward  <alan.hayward@arm.com>
25271             David Sherwood  <david.sherwood@arm.com>
25273         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
25274         (can_duplicate_and_interleave_p): New function.
25275         (vect_get_and_check_slp_defs): Take the vector of statements
25276         rather than just the current one.  Remove excess parentheses.
25277         Restriction rejectinon of vect_constant_def and vect_external_def
25278         for variable-length vectors to boolean types, or types for which
25279         can_duplicate_and_interleave_p is false.
25280         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
25281         (duplicate_and_interleave): New function.
25282         (vect_get_constant_vectors): Use gimple_build_vector for
25283         constant-length vectors and suitable variable-length constant
25284         vectors.  Use duplicate_and_interleave for other variable-length
25285         vectors.  Don't defer the update when inserting new statements.
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         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
25292         min_profitable_iters doesn't go negative.
25294 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25295             Alan Hayward  <alan.hayward@arm.com>
25296             David Sherwood  <david.sherwood@arm.com>
25298         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
25299         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
25300         * optabs.def (vec_mask_load_lanes_optab): New optab.
25301         (vec_mask_store_lanes_optab): Likewise.
25302         * internal-fn.def (MASK_LOAD_LANES): New internal function.
25303         (MASK_STORE_LANES): Likewise.
25304         * internal-fn.c (mask_load_lanes_direct): New macro.
25305         (mask_store_lanes_direct): Likewise.
25306         (expand_mask_load_optab_fn): Handle masked operations.
25307         (expand_mask_load_lanes_optab_fn): New macro.
25308         (expand_mask_store_optab_fn): Handle masked operations.
25309         (expand_mask_store_lanes_optab_fn): New macro.
25310         (direct_mask_load_lanes_optab_supported_p): Likewise.
25311         (direct_mask_store_lanes_optab_supported_p): Likewise.
25312         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
25313         parameter.
25314         (vect_load_lanes_supported): Likewise.
25315         * tree-vect-data-refs.c (strip_conversion): New function.
25316         (can_group_stmts_p): Likewise.
25317         (vect_analyze_data_ref_accesses): Use it instead of checking
25318         for a pair of assignments.
25319         (vect_store_lanes_supported): Take a masked_p parameter.
25320         (vect_load_lanes_supported): Likewise.
25321         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
25322         vect_store_lanes_supported and vect_load_lanes_supported.
25323         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
25324         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
25325         parameter.  Don't allow gaps for masked accesses.
25326         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
25327         and vect_load_lanes_supported.
25328         (get_load_store_type): Take a masked_p parameter and update
25329         call to get_group_load_store_type.
25330         (vectorizable_store): Update call to get_load_store_type.
25331         Handle IFN_MASK_STORE_LANES.
25332         (vectorizable_load): Update call to get_load_store_type.
25333         Handle IFN_MASK_LOAD_LANES.
25335 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25336             Alan Hayward  <alan.hayward@arm.com>
25337             David Sherwood  <david.sherwood@arm.com>
25339         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
25340         modes for SVE.
25341         * config/aarch64/aarch64-protos.h
25342         (aarch64_sve_struct_memory_operand_p): Declare.
25343         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
25344         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
25345         (VPRED, vpred): Handle SVE structure modes.
25346         * config/aarch64/constraints.md (Utx): New constraint.
25347         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
25348         (aarch64_sve_struct_nonimmediate_operand): New predicates.
25349         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
25350         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
25351         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
25352         structure modes.  Split into pieces after RA.
25353         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
25354         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
25355         New patterns.
25356         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
25357         SVE structure modes.
25358         (aarch64_classify_address): Likewise.
25359         (sizetochar): Move earlier in file.
25360         (aarch64_print_operand): Handle SVE register lists.
25361         (aarch64_array_mode): New function.
25362         (aarch64_sve_struct_memory_operand_p): Likewise.
25363         (TARGET_ARRAY_MODE): Redefine.
25365 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25366             Alan Hayward  <alan.hayward@arm.com>
25367             David Sherwood  <david.sherwood@arm.com>
25369         * target.def (array_mode): New target hook.
25370         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
25371         * doc/tm.texi: Regenerate.
25372         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
25373         * hooks.c (hook_optmode_mode_uhwi_none): New function.
25374         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
25375         targetm.array_mode.
25376         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
25377         type sizes.
25379 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25380             Alan Hayward  <alan.hayward@arm.com>
25381             David Sherwood  <david.sherwood@arm.com>
25383         * fold-const.c (fold_binary_loc): Check the argument types
25384         rather than the result type when testing for a vector operation.
25386 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25388         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
25389         * doc/tm.texi: Regenerate.
25391 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25392             Alan Hayward  <alan.hayward@arm.com>
25393             David Sherwood  <david.sherwood@arm.com>
25395         * doc/invoke.texi (-msve-vector-bits=): Document new option.
25396         (sve): Document new AArch64 extension.
25397         * doc/md.texi (w): Extend the description of the AArch64
25398         constraint to include SVE vectors.
25399         (Upl, Upa): Document new AArch64 predicate constraints.
25400         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
25401         enum.
25402         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
25403         (msve-vector-bits=): New option.
25404         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
25405         SVE when these are disabled.
25406         (sve): New extension.
25407         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
25408         modes.  Adjust their number of units based on aarch64_sve_vg.
25409         (MAX_BITSIZE_MODE_ANY_MODE): Define.
25410         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
25411         aarch64_addr_query_type.
25412         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
25413         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
25414         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
25415         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
25416         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
25417         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
25418         (aarch64_simd_imm_zero_p): Delete.
25419         (aarch64_check_zero_based_sve_index_immediate): Declare.
25420         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25421         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25422         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25423         (aarch64_sve_float_mul_immediate_p): Likewise.
25424         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25425         rather than an rtx.
25426         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
25427         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
25428         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
25429         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
25430         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
25431         (aarch64_regmode_natural_size): Likewise.
25432         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
25433         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
25434         left one place.
25435         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
25436         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
25437         for VG and the SVE predicate registers.
25438         (V_ALIASES): Add a "z"-prefixed alias.
25439         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
25440         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
25441         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
25442         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
25443         (REG_CLASS_NAMES): Add entries for them.
25444         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
25445         and the predicate registers.
25446         (aarch64_sve_vg): Declare.
25447         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
25448         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
25449         (REGMODE_NATURAL_SIZE): Define.
25450         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
25451         SVE macros.
25452         * config/aarch64/aarch64.c: Include cfgrtl.h.
25453         (simd_immediate_info): Add a constructor for series vectors,
25454         and an associated step field.
25455         (aarch64_sve_vg): New variable.
25456         (aarch64_dbx_register_number): Handle VG and the predicate registers.
25457         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
25458         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
25459         (VEC_ANY_DATA, VEC_STRUCT): New constants.
25460         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
25461         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
25462         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
25463         (aarch64_get_mask_mode): New functions.
25464         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
25465         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
25466         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
25467         predicate modes and predicate registers.  Explicitly restrict
25468         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
25469         to store a vector mode if it is recognized by
25470         aarch64_classify_vector_mode.
25471         (aarch64_regmode_natural_size): New function.
25472         (aarch64_hard_regno_caller_save_mode): Return the original mode
25473         for predicates.
25474         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
25475         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
25476         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
25477         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
25478         functions.
25479         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
25480         does not overlap dest if the function is frame-related.  Handle
25481         SVE constants.
25482         (aarch64_split_add_offset): New function.
25483         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
25484         them aarch64_add_offset.
25485         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
25486         and update call to aarch64_sub_sp.
25487         (aarch64_add_cfa_expression): New function.
25488         (aarch64_expand_prologue): Pass extra temporary registers to the
25489         functions above.  Handle the case in which we need to emit new
25490         DW_CFA_expressions for registers that were originally saved
25491         relative to the stack pointer, but now have to be expressed
25492         relative to the frame pointer.
25493         (aarch64_output_mi_thunk): Pass extra temporary registers to the
25494         functions above.
25495         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
25496         IP0 and IP1 values for SVE frames.
25497         (aarch64_expand_vec_series): New function.
25498         (aarch64_expand_sve_widened_duplicate): Likewise.
25499         (aarch64_expand_sve_const_vector): Likewise.
25500         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
25501         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
25502         into the register, rather than emitting a SET directly.
25503         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
25504         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
25505         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
25506         (offset_9bit_signed_scaled_p): New functions.
25507         (aarch64_replicate_bitmask_imm): New function.
25508         (aarch64_bitmask_imm): Use it.
25509         (aarch64_cannot_force_const_mem): Reject expressions involving
25510         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
25511         (aarch64_classify_index): Handle SVE indices, by requiring
25512         a plain register index with a scale that matches the element size.
25513         (aarch64_classify_address): Handle SVE addresses.  Assert that
25514         the mode of the address is VOIDmode or an integer mode.
25515         Update call to aarch64_classify_symbol.
25516         (aarch64_classify_symbolic_expression): Update call to
25517         aarch64_classify_symbol.
25518         (aarch64_const_vec_all_in_range_p): New function.
25519         (aarch64_print_vector_float_operand): Likewise.
25520         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
25521         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
25522         and the FP immediates 1.0 and 0.5.
25523         (aarch64_print_address_internal): Handle SVE addresses.
25524         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
25525         (aarch64_regno_regclass): Handle predicate registers.
25526         (aarch64_secondary_reload): Handle big-endian reloads of SVE
25527         data modes.
25528         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
25529         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
25530         (aarch64_convert_sve_vector_bits): New function.
25531         (aarch64_override_options): Use it to handle -msve-vector-bits=.
25532         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25533         rather than an rtx.
25534         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
25535         Handle SVE vector and predicate modes.  Accept VL-based constants
25536         that need only one temporary register, and VL offsets that require
25537         no temporary registers.
25538         (aarch64_conditional_register_usage): Mark the predicate registers
25539         as fixed if SVE isn't available.
25540         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
25541         Return true for SVE vector and predicate modes.
25542         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
25543         rather than an unsigned int.  Handle SVE modes.
25544         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
25545         SVE modes.
25546         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
25547         if SVE is enabled.
25548         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25549         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25550         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25551         (aarch64_sve_float_mul_immediate_p): New functions.
25552         (aarch64_sve_valid_immediate): New function.
25553         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
25554         Explicitly reject structure modes.  Check for INDEX constants.
25555         Handle PTRUE and PFALSE constants.
25556         (aarch64_check_zero_based_sve_index_immediate): New function.
25557         (aarch64_simd_imm_zero_p): Delete.
25558         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
25559         vector modes.  Accept constants in the range of CNT[BHWD].
25560         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
25561         ask for an Advanced SIMD mode.
25562         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
25563         (aarch64_simd_vector_alignment): Handle SVE predicates.
25564         (aarch64_vectorize_preferred_vector_alignment): New function.
25565         (aarch64_simd_vector_alignment_reachable): Use it instead of
25566         the vector size.
25567         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
25568         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
25569         functions.
25570         (MAX_VECT_LEN): Delete.
25571         (expand_vec_perm_d): Add a vec_flags field.
25572         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
25573         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
25574         (aarch64_evpc_ext): Don't apply a big-endian lane correction
25575         for SVE modes.
25576         (aarch64_evpc_rev): Rename to...
25577         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
25578         (aarch64_evpc_rev_global): New function.
25579         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
25580         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
25581         MAX_VECT_LEN.
25582         (aarch64_evpc_sve_tbl): New function.
25583         (aarch64_expand_vec_perm_const_1): Update after rename of
25584         aarch64_evpc_rev.  Handle SVE permutes too, trying
25585         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
25586         than aarch64_evpc_tbl.
25587         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
25588         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
25589         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
25590         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
25591         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
25592         (aarch64_expand_sve_vcond): New functions.
25593         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
25594         of aarch64_vector_mode_p.
25595         (aarch64_dwarf_poly_indeterminate_value): New function.
25596         (aarch64_compute_pressure_classes): Likewise.
25597         (aarch64_can_change_mode_class): Likewise.
25598         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
25599         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
25600         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
25601         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
25602         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
25603         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
25604         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
25605         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
25606         constraints.
25607         (Dn, Dl, Dr): Accept const as well as const_vector.
25608         (Dz): Likewise.  Compare against CONST0_RTX.
25609         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
25610         of "vector" where appropriate.
25611         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
25612         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
25613         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
25614         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
25615         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
25616         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
25617         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
25618         (v_int_equiv): Extend to SVE modes.
25619         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
25620         mode attributes.
25621         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
25622         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
25623         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
25624         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
25625         (SVE_COND_FP_CMP): New int iterators.
25626         (perm_hilo): Handle the new unpack unspecs.
25627         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
25628         attributes.
25629         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
25630         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
25631         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
25632         (aarch64_equality_operator, aarch64_constant_vector_operand)
25633         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
25634         (aarch64_sve_nonimmediate_operand): Likewise.
25635         (aarch64_sve_general_operand): Likewise.
25636         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
25637         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
25638         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
25639         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
25640         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
25641         (aarch64_sve_float_arith_immediate): Likewise.
25642         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
25643         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
25644         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
25645         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
25646         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
25647         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
25648         (aarch64_sve_float_arith_operand): Likewise.
25649         (aarch64_sve_float_arith_with_sub_operand): Likewise.
25650         (aarch64_sve_float_mul_operand): Likewise.
25651         (aarch64_sve_vec_perm_operand): Likewise.
25652         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
25653         (aarch64_mov_operand): Accept const_poly_int and const_vector.
25654         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
25655         as well as const_vector.
25656         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
25657         in file.  Use CONST0_RTX and CONSTM1_RTX.
25658         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
25659         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
25660         Use aarch64_simd_imm_zero.
25661         * config/aarch64/aarch64-sve.md: New file.
25662         * config/aarch64/aarch64.md: Include it.
25663         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
25664         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
25665         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
25666         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
25667         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
25668         (sve): New attribute.
25669         (enabled): Disable instructions with the sve attribute unless
25670         TARGET_SVE.
25671         (movqi, movhi): Pass CONST_POLY_INT operaneds through
25672         aarch64_expand_mov_immediate.
25673         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25674         CNT[BHSD] immediates.
25675         (movti): Split CONST_POLY_INT moves into two halves.
25676         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25677         Split additions that need a temporary here if the destination
25678         is the stack pointer.
25679         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25680         (*add<mode>3_poly_1): New instruction.
25681         (set_clobber_cc): New expander.
25683 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25685         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25686         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
25687         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25688         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25689         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
25690         Change innermode from fixed_mode_size to machine_mode.
25691         (simplify_subreg): Update call accordingly.  Handle a constant-sized
25692         subreg of a variable-length CONST_VECTOR.
25694 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25695             Alan Hayward  <alan.hayward@arm.com>
25696             David Sherwood  <david.sherwood@arm.com>
25698         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25699         (add_offset_to_base): New function, split out from...
25700         (create_mem_ref): ...here.  When handling a scale other than 1,
25701         check first whether the address is valid without the offset.
25702         Add it into the base if so, leaving the index and scale as-is.
25704 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25706         PR c++/83778
25707         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25708         fold_for_warn before checking if arg2 is INTEGER_CST.
25710 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
25712         * config/rs6000/predicates.md (load_multiple_operation): Delete.
25713         (store_multiple_operation): Delete.
25714         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25715         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25716         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25717         guarded by TARGET_STRING.
25718         (rs6000_output_load_multiple): Delete.
25719         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25720         OPTION_MASK_STRING / TARGET_STRING handling.
25721         (print_operand) <'N', 'O'>: Add comment that these are unused now.
25722         (const rs6000_opt_masks) <"string">: Change mask to 0.
25723         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25724         (MASK_STRING): Delete.
25725         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25726         parts.  Simplify.
25727         (load_multiple): Delete.
25728         (*ldmsi8): Delete.
25729         (*ldmsi7): Delete.
25730         (*ldmsi6): Delete.
25731         (*ldmsi5): Delete.
25732         (*ldmsi4): Delete.
25733         (*ldmsi3): Delete.
25734         (store_multiple): Delete.
25735         (*stmsi8): Delete.
25736         (*stmsi7): Delete.
25737         (*stmsi6): Delete.
25738         (*stmsi5): Delete.
25739         (*stmsi4): Delete.
25740         (*stmsi3): Delete.
25741         (movmemsi_8reg): Delete.
25742         (corresponding unnamed define_insn): Delete.
25743         (movmemsi_6reg): Delete.
25744         (corresponding unnamed define_insn): Delete.
25745         (movmemsi_4reg): Delete.
25746         (corresponding unnamed define_insn): Delete.
25747         (movmemsi_2reg): Delete.
25748         (corresponding unnamed define_insn): Delete.
25749         (movmemsi_1reg): Delete.
25750         (corresponding unnamed define_insn): Delete.
25751         * config/rs6000/rs6000.opt (mno-string): New.
25752         (mstring): Replace by deprecation warning stub.
25753         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25755 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25757         * regrename.c (regrename_do_replace): If replacing the same
25758         reg multiple times, try to reuse last created gen_raw_REG.
25760         PR debug/81155
25761         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25762         main to workaround a bug in GDB.
25764 2018-01-12  Tom de Vries  <tom@codesourcery.com>
25766         PR target/83737
25767         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25769 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
25771         PR rtl-optimization/80481
25772         * ira-color.c (get_cap_member): New function.
25773         (allocnos_conflict_by_live_ranges_p): Use it.
25774         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25775         (setup_slot_coalesced_allocno_live_ranges): Ditto.
25777 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
25779         PR target/83628
25780         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25781         (*saddl_se_1): Ditto.
25782         (*ssubsi_1): Ditto.
25783         (*ssubl_se_1): Ditto.
25785 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25787         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25788         rather than wi::to_widest for DR_INITs.
25789         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25790         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25791         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25792         INTEGER_CSTs.
25793         (vect_analyze_group_access_1): Note that here.
25795 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25797         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25798         polynomial type sizes.
25800 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25802         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25803         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25804         (gimple_add_tmp_var): Likewise.
25806 2018-01-12  Martin Liska  <mliska@suse.cz>
25808         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25809         (gimple_alloc_sizes): Likewise.
25810         (dump_gimple_statistics): Use PRIu64 in printf format.
25811         * gimple.h: Change uint64_t to int.
25813 2018-01-12  Martin Liska  <mliska@suse.cz>
25815         * tree-core.h: Use uint64_t instead of int.
25816         * tree.c (tree_node_counts): Likewise.
25817         (tree_node_sizes): Likewise.
25818         (dump_tree_statistics): Use PRIu64 in printf format.
25820 2018-01-12  Martin Liska  <mliska@suse.cz>
25822         * Makefile.in: As qsort_chk is implemented in vec.c, add
25823         vec.o to linkage of gencfn-macros.
25824         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25825         passing the info to record_node_allocation_statistics.
25826         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25827         and pass the info.
25828         * ggc-common.c (struct ggc_usage): Add operator== and use
25829         it in operator< and compare function.
25830         * mem-stats.h (struct mem_usage): Likewise.
25831         * vec.c (struct vec_usage): Remove operator< and compare
25832         function. Can be simply inherited.
25834 2018-01-12  Martin Jambor  <mjambor@suse.cz>
25836         PR target/81616
25837         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25838         * tree-ssa-math-opts.c: Include domwalk.h.
25839         (convert_mult_to_fma_1): New function.
25840         (fma_transformation_info): New type.
25841         (fma_deferring_state): Likewise.
25842         (cancel_fma_deferring): New function.
25843         (result_of_phi): Likewise.
25844         (last_fma_candidate_feeds_initial_phi): Likewise.
25845         (convert_mult_to_fma): Added deferring logic, split actual
25846         transformation to convert_mult_to_fma_1.
25847         (math_opts_dom_walker): New type.
25848         (math_opts_dom_walker::after_dom_children): New method, body moved
25849         here from pass_optimize_widening_mul::execute, added deferring logic
25850         bits.
25851         (pass_optimize_widening_mul::execute): Moved most of code to
25852         math_opts_dom_walker::after_dom_children.
25853         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25854         * config/i386/i386.c (ix86_option_override_internal): Added
25855         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25857 2018-01-12  Richard Biener  <rguenther@suse.de>
25859         PR debug/83157
25860         * dwarf2out.c (gen_variable_die): Do not reset old_die for
25861         inline instance vars.
25863 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
25865         PR target/81819
25866         * config/rx/rx.c (rx_is_restricted_memory_address):
25867         Handle SUBREG case.
25869 2018-01-12  Richard Biener  <rguenther@suse.de>
25871         PR tree-optimization/80846
25872         * target.def (split_reduction): New target hook.
25873         * targhooks.c (default_split_reduction): New function.
25874         * targhooks.h (default_split_reduction): Declare.
25875         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25876         target requests first reduce vectors by combining low and high
25877         parts.
25878         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25879         (get_vectype_for_scalar_type_and_size): Export.
25880         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25881         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25882         * doc/tm.texi: Regenerate.
25883         * config/i386/i386.c (ix86_split_reduction): Implement
25884         TARGET_VECTORIZE_SPLIT_REDUCTION.
25886 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25888         PR target/83368
25889         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25890         in PIC mode except for TARGET_VXWORKS_RTP.
25891         * config/sparc/sparc.c: Include cfgrtl.h.
25892         (TARGET_INIT_PIC_REG): Define.
25893         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25894         (sparc_pic_register_p): New predicate.
25895         (sparc_legitimate_address_p): Use it.
25896         (sparc_legitimize_pic_address): Likewise.
25897         (sparc_delegitimize_address): Likewise.
25898         (sparc_mode_dependent_address_p): Likewise.
25899         (gen_load_pcrel_sym): Remove 4th parameter.
25900         (load_got_register): Adjust call to above.  Remove obsolete stuff.
25901         (sparc_expand_prologue): Do not call load_got_register here.
25902         (sparc_flat_expand_prologue): Likewise.
25903         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25904         (sparc_use_pseudo_pic_reg): New function.
25905         (sparc_init_pic_reg): Likewise.
25906         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25907         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25909 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
25911         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25912         Add item for branch_cost.
25914 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25916         PR rtl-optimization/83565
25917         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25918         not extend the result to a larger mode for rotate operations.
25919         (num_sign_bit_copies1): Likewise.
25921 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25923         PR target/40411
25924         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25925         -symbolic.
25926         Use values-Xc.o for -pedantic.
25927         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25929 2018-01-12  Martin Liska  <mliska@suse.cz>
25931         PR ipa/83054
25932         * ipa-devirt.c (final_warning_record::grow_type_warnings):
25933         New function.
25934         (possible_polymorphic_call_targets): Use it.
25935         (ipa_devirt): Likewise.
25937 2018-01-12  Martin Liska  <mliska@suse.cz>
25939         * profile-count.h (enum profile_quality): Use 0 as invalid
25940         enum value of profile_quality.
25942 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25944         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25945         -mext-string options.
25947 2018-01-12  Richard Biener  <rguenther@suse.de>
25949         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25950         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25951         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25952         Likewise.
25953         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25955 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
25957         * configure.ac (--with-long-double-format): Add support for the
25958         configuration option to change the default long double format on
25959         PowerPC systems.
25960         * config.gcc (powerpc*-linux*-*): Likewise.
25961         * configure: Regenerate.
25962         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25963         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25964         used without modification.
25966 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25968         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25969         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25970         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25971         MISC_BUILTIN_SPEC_BARRIER.
25972         (rs6000_init_builtins): Likewise.
25973         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25974         enum value.
25975         (speculation_barrier): New define_insn.
25976         * doc/extend.texi: Document __builtin_speculation_barrier.
25978 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
25980         PR target/83203
25981         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25982         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25983         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25984         iterators.
25985         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
25986         integral modes instead of "ss" and "sd".
25987         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25988         vectors with 32-bit and 64-bit elements.
25989         (vecdupssescalarmodesuffix): New mode attribute.
25990         (vec_dup<mode>): Use it.
25992 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
25994         PR target/83330
25995         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25996         frame if argument is passed on stack.
25998 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26000         PR target/82682
26001         * ree.c (combine_reaching_defs): Optimize also
26002         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26003         reg2=any_extend(exp); reg1=reg2;, formatting fix.
26005 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26007         PR middle-end/83189
26008         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26010 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26012         PR middle-end/83718
26013         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26014         after they are computed.
26016 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
26018         PR tree-optimization/83695
26019         * gimple-loop-linterchange.cc
26020         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26021         reset cached scev information after interchange.
26022         (pass_linterchange::execute): Remove call to scev_reset_htab.
26024 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26026         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26027         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26028         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26029         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26030         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26031         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26032         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26033         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26034         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26035         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26036         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26037         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26038         (V_lane_reg): Likewise.
26039         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26040         New define_expand.
26041         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26042         (vfmal_lane_low<mode>_intrinsic,
26043         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26044         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26045         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26046         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26047         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26048         vfmsl_lane_high<mode>_intrinsic): New define_insns.
26050 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26052         * config/arm/arm-cpus.in (fp16fml): New feature.
26053         (ALL_SIMD): Add fp16fml.
26054         (armv8.2-a): Add fp16fml as an option.
26055         (armv8.3-a): Likewise.
26056         (armv8.4-a): Add fp16fml as part of fp16.
26057         * config/arm/arm.h (TARGET_FP16FML): Define.
26058         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26059         when appropriate.
26060         * config/arm/arm-modes.def (V2HF): Define.
26061         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26062         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26063         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26064         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26065         vfmsl_low, vfmsl_high): New set of builtins.
26066         * config/arm/iterators.md (PLUSMINUS): New code iterator.
26067         (vfml_op): New code attribute.
26068         (VFMLHALVES): New int iterator.
26069         (VFML, VFMLSEL): New mode attributes.
26070         (V_reg): Define mapping for V2HF.
26071         (V_hi, V_lo): New mode attributes.
26072         (VF_constraint): Likewise.
26073         (vfml_half, vfml_half_selector): New int attributes.
26074         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26075         define_expand.
26076         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26077         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26078         New define_insn.
26079         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26080         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26081         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26082         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
26083         documentation.
26084         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26085         Document new effective target and option set.
26087 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26089         * config/arm/arm-cpus.in (armv8_4): New feature.
26090         (ARMv8_4a): New fgroup.
26091         (armv8.4-a): New arch.
26092         * config/arm/arm-tables.opt: Regenerate.
26093         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26094         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26095         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26096         Add matching rules for -march=armv8.4-a and extensions.
26097         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26099 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
26101         PR target/81821
26102         * config/rx/rx.md (BW): New mode attribute.
26103         (sync_lock_test_and_setsi): Add mode suffix to insn output.
26105 2018-01-11  Richard Biener  <rguenther@suse.de>
26107         PR tree-optimization/83435
26108         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26109         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26110         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26112 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26113             Alan Hayward  <alan.hayward@arm.com>
26114             David Sherwood  <david.sherwood@arm.com>
26116         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26117         field.
26118         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
26119         (aarch64_print_address_internal): Use it to check for a zero offset.
26121 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26122             Alan Hayward  <alan.hayward@arm.com>
26123             David Sherwood  <david.sherwood@arm.com>
26125         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26126         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26127         Return a poly_int64 rather than a HOST_WIDE_INT.
26128         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26129         rather than a HOST_WIDE_INT.
26130         * config/aarch64/aarch64.h (aarch64_frame): Protect with
26131         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
26132         hard_fp_offset, frame_size, initial_adjust, callee_offset and
26133         final_offset from HOST_WIDE_INT to poly_int64.
26134         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26135         to_constant when getting the number of units in an Advanced SIMD
26136         mode.
26137         (aarch64_builtin_vectorized_function): Check for a constant number
26138         of units.
26139         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26140         GET_MODE_SIZE.
26141         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26142         attribute instead of GET_MODE_NUNITS.
26143         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26144         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26145         GET_MODE_SIZE for fixed-size registers.
26146         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26147         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26148         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26149         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26150         (aarch64_print_operand, aarch64_print_address_internal)
26151         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26152         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26153         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26154         Handle polynomial GET_MODE_SIZE.
26155         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
26156         wider than SImode without modification.
26157         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26158         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26159         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26160         passing and returning SVE modes.
26161         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26162         rather than GEN_INT.
26163         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26164         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26165         (aarch64_allocate_and_probe_stack_space): Likewise.
26166         (aarch64_layout_frame): Cope with polynomial offsets.
26167         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26168         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
26169         polynomial offsets.
26170         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26171         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26172         poly_int64 rather than a HOST_WIDE_INT.
26173         (aarch64_get_separate_components, aarch64_process_components)
26174         (aarch64_expand_prologue, aarch64_expand_epilogue)
26175         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26176         (aarch64_anchor_offset): New function, split out from...
26177         (aarch64_legitimize_address): ...here.
26178         (aarch64_builtin_vectorization_cost): Handle polynomial
26179         TYPE_VECTOR_SUBPARTS.
26180         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26181         GET_MODE_NUNITS.
26182         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26183         number of elements from the PARALLEL rather than the mode.
26184         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26185         rather than GET_MODE_BITSIZE.
26186         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26187         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26188         (aarch64_expand_vec_perm_const_1): Handle polynomial
26189         d->perm.length () and d->perm elements.
26190         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
26191         Apply to_constant to d->perm elements.
26192         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26193         polynomial CONST_VECTOR_NUNITS.
26194         (aarch64_move_pointer): Take amount as a poly_int64 rather
26195         than an int.
26196         (aarch64_progress_pointer): Avoid temporary variable.
26197         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26198         the mode attribute instead of GET_MODE.
26200 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26201             Alan Hayward  <alan.hayward@arm.com>
26202             David Sherwood  <david.sherwood@arm.com>
26204         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26205         x exists before using it.
26206         (aarch64_add_constant_internal): Rename to...
26207         (aarch64_add_offset_1): ...this.  Replace regnum with separate
26208         src and dest rtxes.  Handle the case in which they're different,
26209         including when the offset is zero.  Replace scratchreg with an rtx.
26210         Use 2 additions if there is no spare register into which we can
26211         move a 16-bit constant.
26212         (aarch64_add_constant): Delete.
26213         (aarch64_add_offset): Replace reg with separate src and dest
26214         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
26215         Use aarch64_add_offset_1.
26216         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26217         an rtx rather than an int.  Take the delta as a poly_int64
26218         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
26219         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26220         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26221         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26222         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26223         and aarch64_add_sp.
26224         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26225         aarch64_add_constant.
26227 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26229         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
26230         Use scalar_float_mode.
26232 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26234         * config/aarch64/aarch64-simd.md
26235         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
26236         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
26237         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
26238         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
26239         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
26240         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
26241         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
26242         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
26243         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
26244         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
26246 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26248         PR target/83514
26249         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
26250         targ_options->x_arm_arch_string is non NULL.
26252 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
26254         * config/aarch64/aarch64.h
26255         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
26257 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
26259         PR target/82096
26260         * expmed.c (emit_store_flag_force): Swap if const op0
26261         and change VOIDmode to mode of op0.
26263 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26265         PR rtl-optimization/83761
26266         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
26267         than bytes to mode_for_size.
26269 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26271         PR middle-end/83189
26272         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
26273         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
26274         profile.
26276 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26278         PR middle-end/83575
26279         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
26280         when in layout mode.
26281         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
26282         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
26283         partition fixup.
26285 2018-01-10  Michael Collison  <michael.collison@arm.com>
26287         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
26288         * config/aarch64/aarch64-option-extension.def: Add
26289         AARCH64_OPT_EXTENSION of 'fp16fml'.
26290         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26291         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
26292         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
26293         * config/aarch64/constraints.md (Ui7): New constraint.
26294         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
26295         (VFMLA_SEL_W): Ditto.
26296         (f16quad): Ditto.
26297         (f16mac1): Ditto.
26298         (VFMLA16_LOW): New int iterator.
26299         (VFMLA16_HIGH): Ditto.
26300         (UNSPEC_FMLAL): New unspec.
26301         (UNSPEC_FMLSL): Ditto.
26302         (UNSPEC_FMLAL2): Ditto.
26303         (UNSPEC_FMLSL2): Ditto.
26304         (f16mac): New code attribute.
26305         * config/aarch64/aarch64-simd-builtins.def
26306         (aarch64_fmlal_lowv2sf): Ditto.
26307         (aarch64_fmlsl_lowv2sf): Ditto.
26308         (aarch64_fmlalq_lowv4sf): Ditto.
26309         (aarch64_fmlslq_lowv4sf): Ditto.
26310         (aarch64_fmlal_highv2sf): Ditto.
26311         (aarch64_fmlsl_highv2sf): Ditto.
26312         (aarch64_fmlalq_highv4sf): Ditto.
26313         (aarch64_fmlslq_highv4sf): Ditto.
26314         (aarch64_fmlal_lane_lowv2sf): Ditto.
26315         (aarch64_fmlsl_lane_lowv2sf): Ditto.
26316         (aarch64_fmlal_laneq_lowv2sf): Ditto.
26317         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
26318         (aarch64_fmlalq_lane_lowv4sf): Ditto.
26319         (aarch64_fmlsl_lane_lowv4sf): Ditto.
26320         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
26321         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
26322         (aarch64_fmlal_lane_highv2sf): Ditto.
26323         (aarch64_fmlsl_lane_highv2sf): Ditto.
26324         (aarch64_fmlal_laneq_highv2sf): Ditto.
26325         (aarch64_fmlsl_laneq_highv2sf): Ditto.
26326         (aarch64_fmlalq_lane_highv4sf): Ditto.
26327         (aarch64_fmlsl_lane_highv4sf): Ditto.
26328         (aarch64_fmlalq_laneq_highv4sf): Ditto.
26329         (aarch64_fmlsl_laneq_highv4sf): Ditto.
26330         * config/aarch64/aarch64-simd.md:
26331         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
26332         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26333         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
26334         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26335         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
26336         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
26337         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
26338         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
26339         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
26340         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
26341         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
26342         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
26343         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
26344         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
26345         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
26346         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
26347         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
26348         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
26349         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
26350         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
26351         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
26352         (vfmlsl_low_u32): Ditto.
26353         (vfmlalq_low_u32): Ditto.
26354         (vfmlslq_low_u32): Ditto.
26355         (vfmlal_high_u32): Ditto.
26356         (vfmlsl_high_u32): Ditto.
26357         (vfmlalq_high_u32): Ditto.
26358         (vfmlslq_high_u32): Ditto.
26359         (vfmlal_lane_low_u32): Ditto.
26360         (vfmlsl_lane_low_u32): Ditto.
26361         (vfmlal_laneq_low_u32): Ditto.
26362         (vfmlsl_laneq_low_u32): Ditto.
26363         (vfmlalq_lane_low_u32): Ditto.
26364         (vfmlslq_lane_low_u32): Ditto.
26365         (vfmlalq_laneq_low_u32): Ditto.
26366         (vfmlslq_laneq_low_u32): Ditto.
26367         (vfmlal_lane_high_u32): Ditto.
26368         (vfmlsl_lane_high_u32): Ditto.
26369         (vfmlal_laneq_high_u32): Ditto.
26370         (vfmlsl_laneq_high_u32): Ditto.
26371         (vfmlalq_lane_high_u32): Ditto.
26372         (vfmlslq_lane_high_u32): Ditto.
26373         (vfmlalq_laneq_high_u32): Ditto.
26374         (vfmlslq_laneq_high_u32): Ditto.
26375         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
26376         (AARCH64_FL_FOR_ARCH8_4): New.
26377         (AARCH64_ISA_F16FML): New ISA flag.
26378         (TARGET_F16FML): New feature flag for fp16fml.
26379         (doc/invoke.texi): Document new fp16fml option.
26381 2018-01-10  Michael Collison  <michael.collison@arm.com>
26383         * config/aarch64/aarch64-builtins.c:
26384         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
26385         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26386         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
26387         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
26388         (AARCH64_ISA_SHA3): New ISA flag.
26389         (TARGET_SHA3): New feature flag for sha3.
26390         * config/aarch64/iterators.md (sha512_op): New int attribute.
26391         (CRYPTO_SHA512): New int iterator.
26392         (UNSPEC_SHA512H): New unspec.
26393         (UNSPEC_SHA512H2): Ditto.
26394         (UNSPEC_SHA512SU0): Ditto.
26395         (UNSPEC_SHA512SU1): Ditto.
26396         * config/aarch64/aarch64-simd-builtins.def
26397         (aarch64_crypto_sha512hqv2di): New builtin.
26398         (aarch64_crypto_sha512h2qv2di): Ditto.
26399         (aarch64_crypto_sha512su0qv2di): Ditto.
26400         (aarch64_crypto_sha512su1qv2di): Ditto.
26401         (aarch64_eor3qv8hi): Ditto.
26402         (aarch64_rax1qv2di): Ditto.
26403         (aarch64_xarqv2di): Ditto.
26404         (aarch64_bcaxqv8hi): Ditto.
26405         * config/aarch64/aarch64-simd.md:
26406         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
26407         (aarch64_crypto_sha512su0qv2di): Ditto.
26408         (aarch64_crypto_sha512su1qv2di): Ditto.
26409         (aarch64_eor3qv8hi): Ditto.
26410         (aarch64_rax1qv2di): Ditto.
26411         (aarch64_xarqv2di): Ditto.
26412         (aarch64_bcaxqv8hi): Ditto.
26413         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
26414         (vsha512h2q_u64): Ditto.
26415         (vsha512su0q_u64): Ditto.
26416         (vsha512su1q_u64): Ditto.
26417         (veor3q_u16): Ditto.
26418         (vrax1q_u64): Ditto.
26419         (vxarq_u64): Ditto.
26420         (vbcaxq_u16): Ditto.
26421         * config/arm/types.md (crypto_sha512): New type attribute.
26422         (crypto_sha3): Ditto.
26423         (doc/invoke.texi): Document new sha3 option.
26425 2018-01-10  Michael Collison  <michael.collison@arm.com>
26427         * config/aarch64/aarch64-builtins.c:
26428         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
26429         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26430         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
26431         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
26432         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
26433         (AARCH64_ISA_SM4): New ISA flag.
26434         (TARGET_SM4): New feature flag for sm4.
26435         * config/aarch64/aarch64-simd-builtins.def
26436         (aarch64_sm3ss1qv4si): Ditto.
26437         (aarch64_sm3tt1aq4si): Ditto.
26438         (aarch64_sm3tt1bq4si): Ditto.
26439         (aarch64_sm3tt2aq4si): Ditto.
26440         (aarch64_sm3tt2bq4si): Ditto.
26441         (aarch64_sm3partw1qv4si): Ditto.
26442         (aarch64_sm3partw2qv4si): Ditto.
26443         (aarch64_sm4eqv4si): Ditto.
26444         (aarch64_sm4ekeyqv4si): Ditto.
26445         * config/aarch64/aarch64-simd.md:
26446         (aarch64_sm3ss1qv4si): Ditto.
26447         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
26448         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
26449         (aarch64_sm4eqv4si): Ditto.
26450         (aarch64_sm4ekeyqv4si): Ditto.
26451         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
26452         (sm3part_op): Ditto.
26453         (CRYPTO_SM3TT): Ditto.
26454         (CRYPTO_SM3PART): Ditto.
26455         (UNSPEC_SM3SS1): New unspec.
26456         (UNSPEC_SM3TT1A): Ditto.
26457         (UNSPEC_SM3TT1B): Ditto.
26458         (UNSPEC_SM3TT2A): Ditto.
26459         (UNSPEC_SM3TT2B): Ditto.
26460         (UNSPEC_SM3PARTW1): Ditto.
26461         (UNSPEC_SM3PARTW2): Ditto.
26462         (UNSPEC_SM4E): Ditto.
26463         (UNSPEC_SM4EKEY): Ditto.
26464         * config/aarch64/constraints.md (Ui2): New constraint.
26465         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
26466         * config/arm/types.md (crypto_sm3): New type attribute.
26467         (crypto_sm4): Ditto.
26468         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
26469         (vsm3tt1aq_u32): Ditto.
26470         (vsm3tt1bq_u32): Ditto.
26471         (vsm3tt2aq_u32): Ditto.
26472         (vsm3tt2bq_u32): Ditto.
26473         (vsm3partw1q_u32): Ditto.
26474         (vsm3partw2q_u32): Ditto.
26475         (vsm4eq_u32): Ditto.
26476         (vsm4ekeyq_u32): Ditto.
26477         (doc/invoke.texi): Document new sm4 option.
26479 2018-01-10  Michael Collison  <michael.collison@arm.com>
26481         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
26482         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
26483         (AARCH64_FL_FOR_ARCH8_4): New.
26484         (AARCH64_FL_V8_4): New flag.
26485         (doc/invoke.texi): Document new armv8.4-a option.
26487 2018-01-10  Michael Collison  <michael.collison@arm.com>
26489         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26490         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
26491         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
26492         * config/aarch64/aarch64-option-extension.def: Add
26493         AARCH64_OPT_EXTENSION of 'sha2'.
26494         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
26495         (crypto): Disable sha2 and aes if crypto disabled.
26496         (crypto): Enable aes and sha2 if enabled.
26497         (simd): Disable sha2 and aes if simd disabled.
26498         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
26499         New flags.
26500         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
26501         (TARGET_SHA2): New feature flag for sha2.
26502         (TARGET_AES): New feature flag for aes.
26503         * config/aarch64/aarch64-simd.md:
26504         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
26505         conditional on TARGET_AES.
26506         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
26507         (aarch64_crypto_sha1hsi): Make pattern conditional
26508         on TARGET_SHA2.
26509         (aarch64_crypto_sha1hv4si): Ditto.
26510         (aarch64_be_crypto_sha1hv4si): Ditto.
26511         (aarch64_crypto_sha1su1v4si): Ditto.
26512         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
26513         (aarch64_crypto_sha1su0v4si): Ditto.
26514         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
26515         (aarch64_crypto_sha256su0v4si): Ditto.
26516         (aarch64_crypto_sha256su1v4si): Ditto.
26517         (doc/invoke.texi): Document new aes and sha2 options.
26519 2018-01-10  Martin Sebor  <msebor@redhat.com>
26521         PR tree-optimization/83781
26522         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
26523         as string arrays.
26525 2018-01-11  Martin Sebor  <msebor@gmail.com>
26526             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26528         PR tree-optimization/83501
26529         PR tree-optimization/81703
26531         * tree-ssa-strlen.c (get_string_cst): Rename...
26532         (get_string_len): ...to this.  Handle global constants.
26533         (handle_char_store): Adjust.
26535 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
26536             Jim Wilson  <jimw@sifive.com>
26538         * config/riscv/riscv-protos.h (riscv_output_return): New.
26539         * config/riscv/riscv.c (struct machine_function): New naked_p field.
26540         (riscv_attribute_table, riscv_output_return),
26541         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
26542         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
26543         (riscv_compute_frame_info): Only compute frame->mask if not a naked
26544         function.
26545         (riscv_expand_prologue): Add early return for naked function.
26546         (riscv_expand_epilogue): Likewise.
26547         (riscv_function_ok_for_sibcall): Return false for naked function.
26548         (riscv_set_current_function): New.
26549         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
26550         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
26551         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
26552         * doc/extend.texi (RISC-V Function Attributes): New.
26554 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
26556         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
26557         check for 128-bit long double before checking TCmode.
26558         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
26559         128-bit long doubles before checking TFmode or TCmode.
26560         (FLOAT128_IBM_P): Likewise.
26562 2018-01-10  Martin Sebor  <msebor@redhat.com>
26564         PR tree-optimization/83671
26565         * builtins.c (c_strlen): Unconditionally return zero for the empty
26566         string.
26567         Use -Warray-bounds for warnings.
26568         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
26569         for non-constant array indices with COMPONENT_REF, arrays of
26570         arrays, and pointers to arrays.
26571         (gimple_fold_builtin_strlen): Determine and set length range for
26572         non-constant character arrays.
26574 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
26576         PR middle-end/81897
26577         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
26578         empty blocks.
26580 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
26582         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
26584 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26586         PR target/83399
26587         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
26588         VECTOR_MEM_ALTIVEC_OR_VSX_P.
26589         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
26590         indexed_or_indirect_operand predicate.
26591         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
26592         (*vsx_le_perm_load_v8hi): Likewise.
26593         (*vsx_le_perm_load_v16qi): Likewise.
26594         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
26595         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
26596         (*vsx_le_perm_store_v8hi): Likewise.
26597         (*vsx_le_perm_store_v16qi): Likewise.
26598         (eight unnamed splitters): Likewise.
26600 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26602         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
26603         * config/rs6000/emmintrin.h: Likewise.
26604         * config/rs6000/mmintrin.h: Likewise.
26605         * config/rs6000/xmmintrin.h: Likewise.
26607 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
26609         PR c++/43486
26610         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
26611         "public_flag".
26612         * tree.c (tree_nop_conversion): Return true for location wrapper
26613         nodes.
26614         (maybe_wrap_with_location): New function.
26615         (selftest::check_strip_nops): New function.
26616         (selftest::test_location_wrappers): New function.
26617         (selftest::tree_c_tests): Call it.
26618         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
26619         (maybe_wrap_with_location): New decl.
26620         (EXPR_LOCATION_WRAPPER_P): New macro.
26621         (location_wrapper_p): New inline function.
26622         (tree_strip_any_location_wrapper): New inline function.
26624 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
26626         PR target/83735
26627         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
26628         stack_realign_offset for the largest alignment of stack slot
26629         actually used.
26630         (ix86_find_max_used_stack_alignment): New function.
26631         (ix86_finalize_stack_frame_flags): Use it.  Set
26632         max_used_stack_alignment if we don't realign stack.
26633         * config/i386/i386.h (machine_function): Add
26634         max_used_stack_alignment.
26636 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
26638         * config/arm/arm.opt (-mbranch-cost): New option.
26639         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
26640         account.
26642 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
26644         PR target/83629
26645         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
26646         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
26648 2018-01-10  Richard Biener  <rguenther@suse.de>
26650         PR debug/83765
26651         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
26652         early out so it also covers the case where we have a non-NULL
26653         origin.
26655 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26657         PR tree-optimization/83753
26658         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
26659         for non-strided grouped accesses if the number of elements is 1.
26661 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26663         PR target/81616
26664         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
26665         * i386.h (TARGET_USE_GATHER): Define.
26666         * x86-tune.def (X86_TUNE_USE_GATHER): New.
26668 2018-01-10  Martin Liska  <mliska@suse.cz>
26670         PR bootstrap/82831
26671         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26672         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26673         partitioning.
26674         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26675         CLEANUP_NO_PARTITIONING is not set.
26677 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26679         * doc/rtl.texi: Remove documentation of (const ...) wrappers
26680         for vectors, as a partial revert of r254296.
26681         * rtl.h (const_vec_p): Delete.
26682         (const_vec_duplicate_p): Don't test for vector CONSTs.
26683         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26684         * expmed.c (make_tree): Likewise.
26686         Revert:
26687         * common.md (E, F): Use CONSTANT_P instead of checking for
26688         CONST_VECTOR.
26689         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26690         checking for CONST_VECTOR.
26692 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26694         PR middle-end/83575
26695         * predict.c (force_edge_cold): Handle in more sane way edges
26696         with no prediction.
26698 2018-01-09  Carl Love  <cel@us.ibm.com>
26700         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26701         V4SI, V4SF types.
26702         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26703         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26704         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26705         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
26706         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26707         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
26708         * config/rs6000/rs6000-protos.h: Add extern defition for
26709         rs6000_generate_float2_double_code.
26710         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26711         function.
26712         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26713         (float2_v2df): Add define_expand.
26715 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
26717         PR target/83628
26718         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26719         op_mode in the force_to_mode call.
26721 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26723         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26724         instead of checking each element individually.
26725         (aarch64_evpc_uzp): Likewise.
26726         (aarch64_evpc_zip): Likewise.
26727         (aarch64_evpc_ext): Likewise.
26728         (aarch64_evpc_rev): Likewise.
26729         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26730         instead of checking each element individually.  Return true without
26731         generating rtl if
26732         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26733         whether all selected elements come from the same input, instead of
26734         checking each element individually.  Remove calls to gen_rtx_REG,
26735         start_sequence and end_sequence and instead assert that no rtl is
26736         generated.
26738 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26740         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26741         order of HIGH and CONST checks.
26743 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26745         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26746         if the destination isn't an SSA_NAME.
26748 2018-01-09  Richard Biener  <rguenther@suse.de>
26750         PR tree-optimization/83668
26751         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26752         move prologue...
26753         (canonicalize_loop_form): ... here, renamed from ...
26754         (canonicalize_loop_closed_ssa_form): ... this and amended to
26755         swap successor edges for loop exit blocks to make us use
26756         the RPO order we need for initial schedule generation.
26758 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
26760         PR tree-optimization/64811
26761         * match.pd: When optimizing comparisons with Inf, avoid
26762         introducing or losing exceptions from comparisons with NaN.
26764 2018-01-09  Martin Liska  <mliska@suse.cz>
26766         PR sanitizer/82517
26767         * asan.c (shadow_mem_size): Add gcc_assert.
26769 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
26771         Don't save registers in main().
26773         PR target/83738
26774         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26775         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26776         * config/avr/avr.c (avr_set_current_function): Don't error if
26777         naked, OS_task or OS_main are specified at the same time.
26778         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26779         OS_main.
26780         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26781         attribute.
26782         * common/config/avr/avr-common.c (avr_option_optimization_table):
26783         Switch on -mmain-is-OS_task for optimizing compilations.
26785 2018-01-09  Richard Biener  <rguenther@suse.de>
26787         PR tree-optimization/83572
26788         * graphite.c: Include cfganal.h.
26789         (graphite_transform_loops): Connect infinite loops to exit
26790         and remove fake edges at the end.
26792 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26794         * ipa-inline.c (edge_badness): Revert accidental checkin.
26796 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26798         PR ipa/80763
26799         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26800         symbols; not inline clones.
26802 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
26804         PR target/83507
26805         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26806         hard registers.  Formatting fixes.
26808         PR preprocessor/83722
26809         * gcc.c (try_generate_repro): Pass
26810         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26811         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26812         do_report_bug.
26814 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
26815             Kito Cheng  <kito.cheng@gmail.com>
26817         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26818         (riscv_leaf_function_p): Delete.
26819         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26821 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26823         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26824         function.
26825         (do_ifelse): New function.
26826         (do_isel): New function.
26827         (do_sub3): New function.
26828         (do_add3): New function.
26829         (do_load_mask_compare): New function.
26830         (do_overlap_load_compare): New function.
26831         (expand_compare_loop): New function.
26832         (expand_block_compare): Call expand_compare_loop() when appropriate.
26833         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26834         option description.
26835         (-mblock-compare-inline-loop-limit): New option.
26837 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26839         PR target/83677
26840         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26841         Reverse order of second and third operands in first alternative.
26842         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26843         of first and second elements in UNSPEC_VPERMR vector.
26844         (altivec_expand_vec_perm_le): Likewise.
26846 2018-01-08  Jeff Law  <law@redhat.com>
26848         PR rtl-optimizatin/81308
26849         * tree-switch-conversion.c (cfg_altered): New file scoped static.
26850         (process_switch): If group_case_labels makes a change, then set
26851         cfg_altered.
26852         (pass_convert_switch::execute): If a switch is converted, then
26853         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
26855         PR rtl-optimization/81308
26856         * recog.c (split_all_insns): Conditionally cleanup the CFG after
26857         splitting insns.
26859 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
26861         PR target/83663 - Revert r255946
26862         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26863         generation for cases where splatting a value is not useful.
26864         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26865         across a vec_duplicate and a paradoxical subreg forming a vector
26866         mode to a vec_concat.
26868 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26870         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26871         -march=armv8.3-a variants.
26872         * config/arm/t-multilib: Likewise.
26873         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
26875 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26877         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26878         to generate rtl.
26879         (cceq_ior_compare_complement): Give it a name so I can use it, and
26880         change boolean_or_operator predicate to boolean_operator so it can
26881         be used to generate a crand.
26882         (eqne): New code iterator.
26883         (bd/bd_neg): New code_attrs.
26884         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26885         a single define_insn.
26886         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26887         decrement (bdnzt/bdnzf/bdzt/bdzf).
26888         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26889         with the new names of the branch decrement patterns, and added the
26890         names of the branch decrement conditional patterns.
26892 2018-01-08  Richard Biener  <rguenther@suse.de>
26894         PR tree-optimization/83563
26895         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26896         cache.
26898 2018-01-08  Richard Biener  <rguenther@suse.de>
26900         PR middle-end/83713
26901         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26903 2018-01-08  Richard Biener  <rguenther@suse.de>
26905         PR tree-optimization/83685
26906         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26907         references to abnormals.
26909 2018-01-08  Richard Biener  <rguenther@suse.de>
26911         PR lto/83719
26912         * dwarf2out.c (output_indirect_strings): Handle empty
26913         skeleton_debug_str_hash.
26914         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26916 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26918         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26919         (emit_store_direct): Likewise.
26920         (arc_trampoline_adjust_address): Likewise.
26921         (arc_asm_trampoline_template): New function.
26922         (arc_initialize_trampoline): Use asm_trampoline_template.
26923         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26924         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26925         * config/arc/arc.md (flush_icache): Delete pattern.
26927 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
26929         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26930         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26931         munaligned-access.
26933 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26935         PR target/83681
26936         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26937         by not USED_FOR_TARGET.
26938         (make_pass_resolve_sw_modes): Likewise.
26940 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
26942         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26943         USED_FOR_TARGET.
26945 2018-01-08  Richard Biener  <rguenther@suse.de>
26947         PR middle-end/83580
26948         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26950 2018-01-08  Richard Biener  <rguenther@suse.de>
26952         PR middle-end/83517
26953         * match.pd ((t * 2) / 2) -> t): Add missing :c.
26955 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
26957         PR middle-end/81897
26958         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26959         basic blocks with a small number of successors.
26960         (convert_control_dep_chain_into_preds): Improve handling of
26961         forwarder blocks.
26962         (dump_predicates): Split apart into...
26963         (dump_pred_chain): ...here...
26964         (dump_pred_info): ...and here.
26965         (can_one_predicate_be_invalidated_p): Add debugging printfs.
26966         (can_chain_union_be_invalidated_p): Improve check for invalidation
26967         of paths.
26968         (uninit_uses_cannot_happen): Avoid unnecessary if
26969         convert_control_dep_chain_into_preds yielded nothing.
26971 2018-01-06  Martin Sebor  <msebor@redhat.com>
26973         PR tree-optimization/83640
26974         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26975         subtracting negative offset from size.
26976         (builtin_access::overlap): Adjust offset bounds of the access to fall
26977         within the size of the object if possible.
26979 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
26981         PR rtl-optimization/83699
26982         * expmed.c (extract_bit_field_1): Restrict the vector usage of
26983         extract_bit_field_as_subreg to cases in which the extracted
26984         value is also a vector.
26986         * lra-constraints.c (process_alt_operands): Test for the equivalence
26987         substitutions when detecting a possible reload cycle.
26989 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
26991         PR debug/83480
26992         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26993         by default if flag_selective_schedling{,2}.  Formatting fixes.
26995         PR rtl-optimization/83682
26996         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26997         if it has non-VECTOR_MODE element mode.
26998         (vec_duplicate_p): Likewise.
27000         PR middle-end/83694
27001         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27002         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27004 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27006         PR target/83604
27007         * config/i386/i386-builtin.def
27008         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27009         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27010         Require also OPTION_MASK_ISA_AVX512F in addition to
27011         OPTION_MASK_ISA_GFNI.
27012         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27013         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27014         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27015         to OPTION_MASK_ISA_GFNI.
27016         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27017         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27018         OPTION_MASK_ISA_AVX512BW.
27019         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27020         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27021         addition to OPTION_MASK_ISA_GFNI.
27022         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27023         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27024         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27025         to OPTION_MASK_ISA_GFNI.
27026         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27027         a requirement for all ISAs rather than any of them with a few
27028         exceptions.
27029         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27030         processing.
27031         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27032         bitmasks to be enabled with 3 exceptions, instead of requiring any
27033         enabled ISA with lots of exceptions.
27034         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27035         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27036         Change avx512bw in isa attribute to avx512f.
27037         * config/i386/sgxintrin.h: Add license boilerplate.
27038         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
27039         to __AVX512F__ and __AVX512VL to __AVX512VL__.
27040         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27041         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27042         defined.
27043         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27044         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27045         temporarily sse2 rather than sse if not enabled already.
27047         PR target/83604
27048         * config/i386/sse.md (VI248_VLBW): Rename to ...
27049         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
27050         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27051         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27052         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27053         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27054         mode iterator instead of VI248_VLBW.
27056 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
27058         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27059         (record_modified): Skip clobbers; add debug output.
27060         (param_change_prob): Use sreal frequencies.
27062 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27064         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27065         punt for user-aligned variables.
27067 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27069         * tree-chrec.c (chrec_contains_symbols): Return true for
27070         POLY_INT_CST.
27072 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
27074         PR target/82439
27075         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27076         of (x|y) == x for BICS pattern.
27078 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27080         PR tree-optimization/83605
27081         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27082         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27083         can throw.
27085 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27087         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27088         * config/epiphany/rtems.h: New file.
27090 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27091             Uros Bizjak  <ubizjak@gmail.com>
27093         PR target/83554
27094         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27095         QIreg_operand instead of register_operand predicate.
27096         * config/i386/i386.c (ix86_rop_should_change_byte_p,
27097         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27098         comments instead of -fmitigate[-_]rop.
27100 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27102         PR bootstrap/81926
27103         * cgraphunit.c (symbol_table::compile): Switch to text_section
27104         before calling assembly_start debug hook.
27105         * run-rtl-passes.c (run_rtl_passes): Likewise.
27106         Include output.h.
27108 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27110         * tree-vrp.c (extract_range_from_binary_expr_1): Check
27111         range_int_cst_p rather than !symbolic_range_p before calling
27112         extract_range_from_multiplicative_op_1.
27114 2018-01-04  Jeff Law  <law@redhat.com>
27116         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27117         redundant test in assertion.
27119 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27121         * doc/rtl.texi: Document machine_mode wrapper classes.
27123 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27125         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27126         using tree_to_uhwi.
27128 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27130         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27131         the VEC_PERM_EXPR fold to fail.
27133 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27135         PR debug/83585
27136         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27137         to switched_sections.
27139 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27141         PR target/83680
27142         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27143         test for d.testing.
27145 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
27147         PR target/83387
27148         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27149         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27151 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27153         PR debug/83666
27154         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27155         is BLKmode and bitpos not zero or mode change is needed.
27157 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27159         PR target/83675
27160         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27161         TARGET_VIS2.
27163 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
27165         PR target/83628
27166         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27167         instead of MULT rtx.  Update all corresponding splitters.
27168         (*saddl_se): Ditto.
27169         (*ssub<modesuffix>): Ditto.
27170         (*ssubl_se): Ditto.
27171         (*cmp_sadd_di): Update split patterns.
27172         (*cmp_sadd_si): Ditto.
27173         (*cmp_sadd_sidi): Ditto.
27174         (*cmp_ssub_di): Ditto.
27175         (*cmp_ssub_si): Ditto.
27176         (*cmp_ssub_sidi): Ditto.
27177         * config/alpha/predicates.md (const23_operand): New predicate.
27178         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27179         Look for ASHIFT, not MULT inner operand.
27180         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27182 2018-01-04  Martin Liska  <mliska@suse.cz>
27184         PR gcov-profile/83669
27185         * gcov.c (output_intermediate_file): Add version to intermediate
27186         gcov file.
27187         * doc/gcov.texi: Document new field 'version' in intermediate
27188         file format. Fix location of '-k' option of gcov command.
27190 2018-01-04  Martin Liska  <mliska@suse.cz>
27192         PR ipa/82352
27193         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27195 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27197         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27199 2018-01-03  Martin Sebor  <msebor@redhat.com>
27201         PR tree-optimization/83655
27202         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27203         checking calls with invalid arguments.
27205 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27207         * tree-vect-stmts.c (vect_get_store_rhs): New function.
27208         (vectorizable_mask_load_store): Delete.
27209         (vectorizable_call): Return false for masked loads and stores.
27210         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
27211         instead of gimple_assign_rhs1.
27212         (vectorizable_load): Handle IFN_MASK_LOAD.
27213         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27215 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27217         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27218         split out from..,
27219         (vectorizable_mask_load_store): ...here.
27220         (vectorizable_load): ...and here.
27222 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27224         * tree-vect-stmts.c (vect_build_all_ones_mask)
27225         (vect_build_zero_merge_argument): New functions, split out from...
27226         (vectorizable_load): ...here.
27228 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27230         * tree-vect-stmts.c (vect_check_store_rhs): New function,
27231         split out from...
27232         (vectorizable_mask_load_store): ...here.
27233         (vectorizable_store): ...and here.
27235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27237         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
27238         split out from...
27239         (vectorizable_mask_load_store): ...here.
27241 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27243         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
27244         (vect_model_store_cost): Take a vec_load_store_type instead of a
27245         vect_def_type.
27246         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
27247         (vect_model_store_cost): Take a vec_load_store_type instead of a
27248         vect_def_type.
27249         (vectorizable_mask_load_store): Update accordingly.
27250         (vectorizable_store): Likewise.
27251         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
27253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27255         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
27256         IFN_MASK_LOAD calls here rather than...
27257         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
27259 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27260             Alan Hayward  <alan.hayward@arm.com>
27261             David Sherwood  <david.sherwood@arm.com>
27263         * expmed.c (extract_bit_field_1): For vector extracts,
27264         fall back to extract_bit_field_as_subreg if vec_extract
27265         isn't available.
27267 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27268             Alan Hayward  <alan.hayward@arm.com>
27269             David Sherwood  <david.sherwood@arm.com>
27271         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
27272         they are variable or constant sized.
27273         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
27274         slots for constant-sized data.
27276 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27277             Alan Hayward  <alan.hayward@arm.com>
27278             David Sherwood  <david.sherwood@arm.com>
27280         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
27281         handling COND_EXPRs with boolean comparisons, try to find a better
27282         basis for the mask type than the boolean itself.
27284 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27286         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
27287         is calculated and how it can be overridden.
27288         * genmodes.c (max_bitsize_mode_any_mode): New variable.
27289         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
27290         if defined.
27291         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
27292         if nonzero.
27294 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27295             Alan Hayward  <alan.hayward@arm.com>
27296             David Sherwood  <david.sherwood@arm.com>
27298         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
27299         Remove the mode argument.
27300         (aarch64_simd_valid_immediate): Remove the mode and inverse
27301         arguments.
27302         * config/aarch64/iterators.md (bitsize): New iterator.
27303         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
27304         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
27305         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
27306         aarch64_simd_valid_immediate.
27307         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
27308         (aarch64_reg_or_bic_imm): Likewise.
27309         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
27310         with an insn_type enum and msl with a modifier_type enum.
27311         Replace element_width with a scalar_mode.  Change the shift
27312         to unsigned int.  Add constructors for scalar_float_mode and
27313         scalar_int_mode elements.
27314         (aarch64_vect_float_const_representable_p): Delete.
27315         (aarch64_can_const_movi_rtx_p)
27316         (aarch64_simd_scalar_immediate_valid_for_move)
27317         (aarch64_simd_make_constant): Update call to
27318         aarch64_simd_valid_immediate.
27319         (aarch64_advsimd_valid_immediate_hs): New function.
27320         (aarch64_advsimd_valid_immediate): Likewise.
27321         (aarch64_simd_valid_immediate): Remove mode and inverse
27322         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
27323         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
27324         and aarch64_float_const_representable_p on the result.
27325         (aarch64_output_simd_mov_immediate): Remove mode argument.
27326         Update call to aarch64_simd_valid_immediate and use of
27327         simd_immediate_info.
27328         (aarch64_output_scalar_simd_mov_immediate): Update call
27329         accordingly.
27331 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27332             Alan Hayward  <alan.hayward@arm.com>
27333             David Sherwood  <david.sherwood@arm.com>
27335         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
27336         (mode_nunits): Likewise CONST_MODE_NUNITS.
27337         * machmode.def (ADJUST_NUNITS): Document.
27338         * genmodes.c (mode_data::need_nunits_adj): New field.
27339         (blank_mode): Update accordingly.
27340         (adj_nunits): New variable.
27341         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
27342         parameter.
27343         (emit_mode_size_inline): Set need_bytesize_adj for all modes
27344         listed in adj_nunits.
27345         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
27346         listed in adj_nunits.  Don't emit case statements for such modes.
27347         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
27348         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
27349         nothing if adj_nunits is nonnull.
27350         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
27351         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
27352         (emit_mode_fbit): Update use of print_maybe_const_decl.
27353         (emit_move_size): Likewise.  Treat the array as non-const
27354         if adj_nunits.
27355         (emit_mode_adjustments): Handle adj_nunits.
27357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27359         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
27360         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
27361         (VECTOR_MODES): Use it.
27362         (make_vector_modes): Take the prefix as an argument.
27364 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27365             Alan Hayward  <alan.hayward@arm.com>
27366             David Sherwood  <david.sherwood@arm.com>
27368         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
27369         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
27370         for MODE_VECTOR_BOOL.
27371         * machmode.def (VECTOR_BOOL_MODE): Document.
27372         * genmodes.c (VECTOR_BOOL_MODE): New macro.
27373         (make_vector_bool_mode): New function.
27374         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
27375         MODE_VECTOR_BOOL.
27376         * lto-streamer-in.c (lto_input_mode_table): Likewise.
27377         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
27378         Likewise.
27379         * stor-layout.c (int_mode_for_mode): Likewise.
27380         * tree.c (build_vector_type_for_mode): Likewise.
27381         * varasm.c (output_constant_pool_2): Likewise.
27382         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
27383         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
27384         for MODE_VECTOR_BOOL.
27385         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
27386         of mode class checks.
27387         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
27388         instead of a list of mode class checks.
27389         (expand_vector_scalar_condition): Likewise.
27390         (type_for_widest_vector_mode): Handle BImode as an inner mode.
27392 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27393             Alan Hayward  <alan.hayward@arm.com>
27394             David Sherwood  <david.sherwood@arm.com>
27396         * machmode.h (mode_size): Change from unsigned short to
27397         poly_uint16_pod.
27398         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
27399         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27400         or if measurement_type is not polynomial.
27401         (fixed_size_mode::includes_p): Check for constant-sized modes.
27402         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
27403         return a poly_uint16 rather than an unsigned short.
27404         (emit_mode_size): Change the type of mode_size from unsigned short
27405         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
27406         (emit_mode_adjustments): Cope with polynomial vector sizes.
27407         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27408         for GET_MODE_SIZE.
27409         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27410         for GET_MODE_SIZE.
27411         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
27412         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
27413         * caller-save.c (setup_save_areas): Likewise.
27414         (replace_reg_with_saved_mem): Likewise.
27415         * calls.c (emit_library_call_value_1): Likewise.
27416         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
27417         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
27418         (gen_lowpart_for_combine): Likewise.
27419         * convert.c (convert_to_integer_1): Likewise.
27420         * cse.c (equiv_constant, cse_insn): Likewise.
27421         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
27422         (cselib_subst_to_values): Likewise.
27423         * dce.c (word_dce_process_block): Likewise.
27424         * df-problems.c (df_word_lr_mark_ref): Likewise.
27425         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
27426         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
27427         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
27428         (rtl_for_decl_location): Likewise.
27429         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
27430         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
27431         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
27432         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
27433         (expand_expr_real_1): Likewise.
27434         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
27435         (pad_below): Likewise.
27436         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27437         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
27438         * ira.c (get_subreg_tracking_sizes): Likewise.
27439         * ira-build.c (ira_create_allocno_objects): Likewise.
27440         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
27441         (ira_sort_regnos_for_alter_reg): Likewise.
27442         * ira-costs.c (record_operand_costs): Likewise.
27443         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
27444         (resolve_simple_move): Likewise.
27445         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
27446         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
27447         (lra_constraints): Likewise.
27448         (CONST_POOL_OK_P): Reject variable-sized modes.
27449         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
27450         (add_pseudo_to_slot, lra_spill): Likewise.
27451         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27452         * optabs-query.c (get_best_extraction_insn): Likewise.
27453         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27454         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
27455         (expand_mult_highpart, valid_multiword_target_p): Likewise.
27456         * recog.c (offsettable_address_addr_space_p): Likewise.
27457         * regcprop.c (maybe_mode_change): Likewise.
27458         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
27459         * regrename.c (build_def_use): Likewise.
27460         * regstat.c (dump_reg_info): Likewise.
27461         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
27462         (find_reloads, find_reloads_subreg_address): Likewise.
27463         * reload1.c (eliminate_regs_1): Likewise.
27464         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
27465         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
27466         (simplify_binary_operation_1, simplify_subreg): Likewise.
27467         * targhooks.c (default_function_arg_padding): Likewise.
27468         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
27469         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
27470         (verify_gimple_assign_ternary): Likewise.
27471         * tree-inline.c (estimate_move_cost): Likewise.
27472         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27473         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
27474         (get_address_cost_ainc): Likewise.
27475         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
27476         (vect_supportable_dr_alignment): Likewise.
27477         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27478         (vectorizable_reduction): Likewise.
27479         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
27480         (vectorizable_operation, vectorizable_load): Likewise.
27481         * tree.c (build_same_sized_truth_vector_type): Likewise.
27482         * valtrack.c (cleanup_auto_inc_dec): Likewise.
27483         * var-tracking.c (emit_note_insn_var_location): Likewise.
27484         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
27485         (ADDR_VEC_ALIGN): Likewise.
27487 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27488             Alan Hayward  <alan.hayward@arm.com>
27489             David Sherwood  <david.sherwood@arm.com>
27491         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
27492         unsigned short.
27493         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27494         or if measurement_type is polynomial.
27495         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
27496         * combine.c (make_extraction): Likewise.
27497         * dse.c (find_shift_sequence): Likewise.
27498         * dwarf2out.c (mem_loc_descriptor): Likewise.
27499         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
27500         (extract_bit_field, extract_low_bits): Likewise.
27501         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
27502         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
27503         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
27504         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
27505         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27506         * reload.c (find_reloads): Likewise.
27507         * reload1.c (alter_reg): Likewise.
27508         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
27509         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
27510         * tree-if-conv.c (predicate_mem_writes): Likewise.
27511         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
27512         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
27513         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
27514         * valtrack.c (dead_debug_insert_temp): Likewise.
27515         * varasm.c (mergeable_constant_section): Likewise.
27516         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
27518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27519             Alan Hayward  <alan.hayward@arm.com>
27520             David Sherwood  <david.sherwood@arm.com>
27522         * expr.c (expand_assignment): Cope with polynomial mode sizes
27523         when assigning to a CONCAT.
27525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27526             Alan Hayward  <alan.hayward@arm.com>
27527             David Sherwood  <david.sherwood@arm.com>
27529         * machmode.h (mode_precision): Change from unsigned short to
27530         poly_uint16_pod.
27531         (mode_to_precision): Return a poly_uint16 rather than an unsigned
27532         short.
27533         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
27534         or if measurement_type is not polynomial.
27535         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
27536         in which the mode is already known to be a scalar_int_mode.
27537         * genmodes.c (emit_mode_precision): Change the type of mode_precision
27538         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
27539         initializer.
27540         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27541         for GET_MODE_PRECISION.
27542         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27543         for GET_MODE_PRECISION.
27544         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
27545         as polynomial.
27546         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
27547         (expand_field_assignment, make_extraction): Likewise.
27548         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
27549         (get_last_value): Likewise.
27550         * convert.c (convert_to_integer_1): Likewise.
27551         * cse.c (cse_insn): Likewise.
27552         * expr.c (expand_expr_real_1): Likewise.
27553         * lra-constraints.c (simplify_operand_subreg): Likewise.
27554         * optabs-query.c (can_atomic_load_p): Likewise.
27555         * optabs.c (expand_atomic_load): Likewise.
27556         (expand_atomic_store): Likewise.
27557         * ree.c (combine_reaching_defs): Likewise.
27558         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
27559         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
27560         * tree.h (type_has_mode_precision_p): Likewise.
27561         * ubsan.c (instrument_si_overflow): Likewise.
27563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27564             Alan Hayward  <alan.hayward@arm.com>
27565             David Sherwood  <david.sherwood@arm.com>
27567         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
27568         polynomial numbers of units.
27569         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
27570         (valid_vector_subparts_p): New function.
27571         (build_vector_type): Remove temporary shim and take the number
27572         of units as a poly_uint64 rather than an int.
27573         (build_opaque_vector_type): Take the number of units as a
27574         poly_uint64 rather than an int.
27575         * tree.c (build_vector_from_ctor): Handle polynomial
27576         TYPE_VECTOR_SUBPARTS.
27577         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
27578         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
27579         (build_vector_from_val): If the number of units is variable,
27580         use build_vec_duplicate_cst for constant operands and
27581         VEC_DUPLICATE_EXPR otherwise.
27582         (make_vector_type): Remove temporary is_constant ().
27583         (build_vector_type, build_opaque_vector_type): Take the number of
27584         units as a poly_uint64 rather than an int.
27585         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
27586         VECTOR_CST_NELTS.
27587         * cfgexpand.c (expand_debug_expr): Likewise.
27588         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
27589         (store_constructor, expand_expr_real_1): Likewise.
27590         (const_scalar_mask_from_tree): Likewise.
27591         * fold-const-call.c (fold_const_reduction): Likewise.
27592         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
27593         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
27594         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
27595         (fold_relational_const): Likewise.
27596         (native_interpret_vector): Likewise.  Change the size from an
27597         int to an unsigned int.
27598         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
27599         TYPE_VECTOR_SUBPARTS.
27600         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
27601         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
27602         duplicating a non-constant operand into a variable-length vector.
27603         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
27604         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
27605         * ipa-icf.c (sem_variable::equals): Likewise.
27606         * match.pd: Likewise.
27607         * omp-simd-clone.c (simd_clone_subparts): Likewise.
27608         * print-tree.c (print_node): Likewise.
27609         * stor-layout.c (layout_type): Likewise.
27610         * targhooks.c (default_builtin_vectorization_cost): Likewise.
27611         * tree-cfg.c (verify_gimple_comparison): Likewise.
27612         (verify_gimple_assign_binary): Likewise.
27613         (verify_gimple_assign_ternary): Likewise.
27614         (verify_gimple_assign_single): Likewise.
27615         * tree-pretty-print.c (dump_generic_node): Likewise.
27616         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27617         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
27618         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
27619         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
27620         (vect_shift_permute_load_chain): Likewise.
27621         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
27622         (expand_vector_condition, optimize_vector_constructor): Likewise.
27623         (lower_vec_perm, get_compute_type): Likewise.
27624         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27625         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
27626         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
27627         (vect_recog_mask_conversion_pattern): Likewise.
27628         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
27629         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
27630         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27631         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
27632         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
27633         (vectorizable_shift, vectorizable_operation, vectorizable_store)
27634         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
27635         (supportable_widening_operation): Likewise.
27636         (supportable_narrowing_operation): Likewise.
27637         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
27638         Likewise.
27639         * varasm.c (output_constant): Likewise.
27641 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27642             Alan Hayward  <alan.hayward@arm.com>
27643             David Sherwood  <david.sherwood@arm.com>
27645         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
27646         so that both the length == 3 and length != 3 cases set up their
27647         own permute vectors.  Add comments explaining why we know the
27648         number of elements is constant.
27649         (vect_permute_load_chain): Likewise.
27651 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27652             Alan Hayward  <alan.hayward@arm.com>
27653             David Sherwood  <david.sherwood@arm.com>
27655         * machmode.h (mode_nunits): Change from unsigned char to
27656         poly_uint16_pod.
27657         (ONLY_FIXED_SIZE_MODES): New macro.
27658         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
27659         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
27660         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
27661         New typedefs.
27662         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
27663         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
27664         or if measurement_type is not polynomial.
27665         * genmodes.c (ZERO_COEFFS): New macro.
27666         (emit_mode_nunits_inline): Make mode_nunits_inline return a
27667         poly_uint16.
27668         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27669         Use ZERO_COEFFS when emitting initializers.
27670         * data-streamer.h (bp_pack_poly_value): New function.
27671         (bp_unpack_poly_value): Likewise.
27672         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27673         for GET_MODE_NUNITS.
27674         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27675         for GET_MODE_NUNITS.
27676         * tree.c (make_vector_type): Remove temporary shim and make
27677         the real function take the number of units as a poly_uint64
27678         rather than an int.
27679         (build_vector_type_for_mode): Handle polynomial nunits.
27680         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27681         * emit-rtl.c (const_vec_series_p_1): Likewise.
27682         (gen_rtx_CONST_VECTOR): Likewise.
27683         * fold-const.c (test_vec_duplicate_folding): Likewise.
27684         * genrecog.c (validate_pattern): Likewise.
27685         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27686         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27687         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27688         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27689         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27690         * rtlanal.c (subreg_get_info): Likewise.
27691         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27692         (vect_grouped_load_supported): Likewise.
27693         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27694         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27695         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27696         (simplify_const_unary_operation, simplify_binary_operation_1)
27697         (simplify_const_binary_operation, simplify_ternary_operation)
27698         (test_vector_ops_duplicate, test_vector_ops): Likewise.
27699         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27700         instead of CONST_VECTOR_NUNITS.
27701         * varasm.c (output_constant_pool_2): Likewise.
27702         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27703         explicit-encoded elements in the XVEC for variable-length vectors.
27705 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27707         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27709 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27710             Alan Hayward  <alan.hayward@arm.com>
27711             David Sherwood  <david.sherwood@arm.com>
27713         * coretypes.h (fixed_size_mode): Declare.
27714         (fixed_size_mode_pod): New typedef.
27715         * builtins.h (target_builtins::x_apply_args_mode)
27716         (target_builtins::x_apply_result_mode): Change type to
27717         fixed_size_mode_pod.
27718         * builtins.c (apply_args_size, apply_result_size, result_vector)
27719         (expand_builtin_apply_args_1, expand_builtin_apply)
27720         (expand_builtin_return): Update accordingly.
27722 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27724         * cse.c (hash_rtx_cb): Hash only the encoded elements.
27725         * cselib.c (cselib_hash_rtx): Likewise.
27726         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27727         CONST_VECTOR encoding.
27729 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27730             Jeff Law  <law@redhat.com>
27732         PR target/83641
27733         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27734         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27735         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27736         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27738         PR target/83641
27739         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27740         explicitly probe *sp in a noreturn function if there were any callee
27741         register saves or frame pointer is needed.
27743 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27745         PR debug/83621
27746         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27747         BLKmode for ternary, binary or unary expressions.
27749         PR debug/83645
27750         * var-tracking.c (delete_vta_debug_insn): New inline function.
27751         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27752         insns from get_insns () to NULL instead of each bb separately.
27753         Use delete_vta_debug_insn.  No longer static.
27754         (vt_debug_insns_local, variable_tracking_main_1): Adjust
27755         delete_vta_debug_insns callers.
27756         * rtl.h (delete_vta_debug_insns): Declare.
27757         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27758         instead of variable_tracking_main.
27760 2018-01-03  Martin Sebor  <msebor@redhat.com>
27762         PR tree-optimization/83603
27763         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27764         arguments past the endof the argument list in functions declared
27765         without a prototype.
27766         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27767         Avoid checking when arguments are null.
27769 2018-01-03  Martin Sebor  <msebor@redhat.com>
27771         PR c/83559
27772         * doc/extend.texi (attribute const): Fix a typo.
27773         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27774         issuing -Wsuggest-attribute for void functions.
27776 2018-01-03  Martin Sebor  <msebor@redhat.com>
27778         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27779         offset_int::from instead of wide_int::to_shwi.
27780         (maybe_diag_overlap): Remove assertion.
27781         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27782         * gimple-ssa-sprintf.c (format_directive): Same.
27783         (parse_directive): Same.
27784         (sprintf_dom_walker::compute_format_length): Same.
27785         (try_substitute_return_value): Same.
27787 2018-01-03  Jeff Law  <law@redhat.com>
27789         PR middle-end/83654
27790         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27791         non-constant residual for zero at runtime and avoid probing in
27792         that case.  Reorganize code for trailing problem to mirror handling
27793         of the residual.
27795 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27797         PR tree-optimization/83501
27798         * tree-ssa-strlen.c (get_string_cst): New.
27799         (handle_char_store): Call get_string_cst.
27801 2018-01-03  Martin Liska  <mliska@suse.cz>
27803         PR tree-optimization/83593
27804         * tree-ssa-strlen.c: Include tree-cfg.h.
27805         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27806         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27807         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27808         to false.
27809         (strlen_dom_walker::before_dom_children): Call
27810         gimple_purge_dead_eh_edges. Dump tranformation with details
27811         dump flags.
27812         (strlen_dom_walker::before_dom_children): Update call by adding
27813         new argument cleanup_eh.
27814         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27816 2018-01-03  Martin Liska  <mliska@suse.cz>
27818         PR ipa/83549
27819         * cif-code.def (VARIADIC_THUNK): New enum value.
27820         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27821         thunks.
27823 2018-01-03  Jan Beulich  <jbeulich@suse.com>
27825         * sse.md (mov<mode>_internal): Tighten condition for when to use
27826         vmovdqu<ssescalarsize> for TI and OI modes.
27828 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27830         Update copyright years.
27832 2018-01-03  Martin Liska  <mliska@suse.cz>
27834         PR ipa/83594
27835         * ipa-visibility.c (function_and_variable_visibility): Skip
27836         functions with noipa attribure.
27838 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27840         * gcc.c (process_command): Update copyright notice dates.
27841         * gcov-dump.c (print_version): Ditto.
27842         * gcov.c (print_version): Ditto.
27843         * gcov-tool.c (print_version): Ditto.
27844         * gengtype.c (create_file): Ditto.
27845         * doc/cpp.texi: Bump @copying's copyright year.
27846         * doc/cppinternals.texi: Ditto.
27847         * doc/gcc.texi: Ditto.
27848         * doc/gccint.texi: Ditto.
27849         * doc/gcov.texi: Ditto.
27850         * doc/install.texi: Ditto.
27851         * doc/invoke.texi: Ditto.
27853 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27855         * vector-builder.h (vector_builder::m_full_nelts): Change from
27856         unsigned int to poly_uint64.
27857         (vector_builder::full_nelts): Update prototype accordingly.
27858         (vector_builder::new_vector): Likewise.
27859         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27860         (vector_builder::operator ==): Likewise.
27861         (vector_builder::finalize): Likewise.
27862         * int-vector-builder.h (int_vector_builder::int_vector_builder):
27863         Take the number of elements as a poly_uint64 rather than an
27864         unsigned int.
27865         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27866         from unsigned int to poly_uint64.
27867         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27868         (vec_perm_indices::new_vector): Likewise.
27869         (vec_perm_indices::length): Likewise.
27870         (vec_perm_indices::nelts_per_input): Likewise.
27871         (vec_perm_indices::input_nelts): Likewise.
27872         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27873         number of elements per input as a poly_uint64 rather than an
27874         unsigned int.  Use the original encoding for variable-length
27875         vectors, rather than clamping each individual element.
27876         For the second and subsequent elements in each pattern,
27877         clamp the step and base before clamping their sum.
27878         (vec_perm_indices::series_p): Handle polynomial element counts.
27879         (vec_perm_indices::all_in_range_p): Likewise.
27880         (vec_perm_indices_to_tree): Likewise.
27881         (vec_perm_indices_to_rtx): Likewise.
27882         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27883         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27884         (tree_vector_builder::new_binary_operation): Handle polynomial
27885         element counts.  Return false if we need to know the number
27886         of elements at compile time.
27887         * fold-const.c (fold_vec_perm): Punt if the number of elements
27888         isn't known at compile time.
27890 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27892         * vec-perm-indices.h (vec_perm_builder): Change element type
27893         from HOST_WIDE_INT to poly_int64.
27894         (vec_perm_indices::element_type): Update accordingly.
27895         (vec_perm_indices::clamp): Handle polynomial element_types.
27896         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27897         (vec_perm_indices::all_in_range_p): Likewise.
27898         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27899         than shwi trees.
27900         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27901         polynomial vec_perm_indices element types.
27902         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27903         * fold-const.c (fold_vec_perm): Likewise.
27904         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27905         * tree-vect-generic.c (lower_vec_perm): Likewise.
27906         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27907         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27908         element type to HOST_WIDE_INT.
27910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27911             Alan Hayward  <alan.hayward@arm.com>
27912             David Sherwood  <david.sherwood@arm.com>
27914         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27915         rather than an int.  Use plus_constant.
27916         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27917         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27919 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27920             Alan Hayward  <alan.hayward@arm.com>
27921             David Sherwood  <david.sherwood@arm.com>
27923         * calls.c (emit_call_1, expand_call): Change struct_value_size from
27924         a HOST_WIDE_INT to a poly_int64.
27926 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27927             Alan Hayward  <alan.hayward@arm.com>
27928             David Sherwood  <david.sherwood@arm.com>
27930         * calls.c (load_register_parameters): Cope with polynomial
27931         mode sizes.  Require a constant size for BLKmode parameters
27932         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
27933         forces a parameter to be padded at the lsb end in order to
27934         fill a complete number of words, require the parameter size
27935         to be ordered wrt UNITS_PER_WORD.
27937 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27938             Alan Hayward  <alan.hayward@arm.com>
27939             David Sherwood  <david.sherwood@arm.com>
27941         * reload1.c (spill_stack_slot_width): Change element type
27942         from unsigned int to poly_uint64_pod.
27943         (alter_reg): Treat mode sizes as polynomial.
27945 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27946             Alan Hayward  <alan.hayward@arm.com>
27947             David Sherwood  <david.sherwood@arm.com>
27949         * reload.c (complex_word_subreg_p): New function.
27950         (reload_inner_reg_of_subreg, push_reload): Use it.
27952 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27953             Alan Hayward  <alan.hayward@arm.com>
27954             David Sherwood  <david.sherwood@arm.com>
27956         * lra-constraints.c (process_alt_operands): Reject matched
27957         operands whose sizes aren't ordered.
27958         (match_reload): Refer to this check here.
27960 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27961             Alan Hayward  <alan.hayward@arm.com>
27962             David Sherwood  <david.sherwood@arm.com>
27964         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27965         that the mode size is in the set {1, 2, 4, 8, 16}.
27967 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27968             Alan Hayward  <alan.hayward@arm.com>
27969             David Sherwood  <david.sherwood@arm.com>
27971         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27972         Use plus_constant instead of gen_rtx_PLUS.
27974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27975             Alan Hayward  <alan.hayward@arm.com>
27976             David Sherwood  <david.sherwood@arm.com>
27978         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27979         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27980         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27981         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27982         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27983         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27984         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27985         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27986         * config/i386/i386.c (ix86_push_rounding): ...this new function.
27987         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27988         a poly_int64.
27989         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27990         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27991         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27992         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27993         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27994         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27995         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27996         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27997         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27998         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27999         function.
28000         * expr.c (emit_move_resolve_push): Treat the input and result
28001         of PUSH_ROUNDING as a poly_int64.
28002         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28003         (emit_push_insn): Likewise.
28004         * lra-eliminations.c (mark_not_eliminable): Likewise.
28005         * recog.c (push_operand): Likewise.
28006         * reload1.c (elimination_effects): Likewise.
28007         * rtlanal.c (nonzero_bits1): Likewise.
28008         * calls.c (store_one_arg): Likewise.  Require the padding to be
28009         known at compile time.
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         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28016         Use plus_constant instead of gen_rtx_PLUS.
28018 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28019             Alan Hayward  <alan.hayward@arm.com>
28020             David Sherwood  <david.sherwood@arm.com>
28022         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28023         rather than an int.
28025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28026             Alan Hayward  <alan.hayward@arm.com>
28027             David Sherwood  <david.sherwood@arm.com>
28029         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28030         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28031         via stack temporaries.  Treat the mode size as polynomial too.
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         * expr.c (expand_expr_real_2): When handling conversions involving
28038         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28039         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
28040         as a poly_uint64 too.
28042 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28043             Alan Hayward  <alan.hayward@arm.com>
28044             David Sherwood  <david.sherwood@arm.com>
28046         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28048 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28049             Alan Hayward  <alan.hayward@arm.com>
28050             David Sherwood  <david.sherwood@arm.com>
28052         * combine.c (can_change_dest_mode): Handle polynomial
28053         REGMODE_NATURAL_SIZE.
28054         * expmed.c (store_bit_field_1): Likewise.
28055         * expr.c (store_constructor): Likewise.
28056         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28057         and polynomial REGMODE_NATURAL_SIZE.
28058         (gen_lowpart_common): Likewise.
28059         * reginfo.c (record_subregs_of_mode): Likewise.
28060         * rtlanal.c (read_modify_subreg_p): Likewise.
28062 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28063             Alan Hayward  <alan.hayward@arm.com>
28064             David Sherwood  <david.sherwood@arm.com>
28066         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28067         numbers of elements.
28069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28070             Alan Hayward  <alan.hayward@arm.com>
28071             David Sherwood  <david.sherwood@arm.com>
28073         * match.pd: Cope with polynomial numbers of vector elements.
28075 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28076             Alan Hayward  <alan.hayward@arm.com>
28077             David Sherwood  <david.sherwood@arm.com>
28079         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28080         in a POINTER_PLUS_EXPR.
28082 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28083             Alan Hayward  <alan.hayward@arm.com>
28084             David Sherwood  <david.sherwood@arm.com>
28086         * omp-simd-clone.c (simd_clone_subparts): New function.
28087         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28088         (ipa_simd_modify_function_body): Likewise.
28090 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28091             Alan Hayward  <alan.hayward@arm.com>
28092             David Sherwood  <david.sherwood@arm.com>
28094         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28095         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28096         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28097         (expand_vector_condition, vector_element): Likewise.
28098         (subparts_gt): New function.
28099         (get_compute_type): Use subparts_gt.
28100         (count_type_subparts): Delete.
28101         (expand_vector_operations_1): Use subparts_gt instead of
28102         count_type_subparts.
28104 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28105             Alan Hayward  <alan.hayward@arm.com>
28106             David Sherwood  <david.sherwood@arm.com>
28108         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28109         (vect_compile_time_alias): ...this new function.  Do the calculation
28110         on poly_ints rather than trees.
28111         (vect_prune_runtime_alias_test_list): Update call accordingly.
28113 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28114             Alan Hayward  <alan.hayward@arm.com>
28115             David Sherwood  <david.sherwood@arm.com>
28117         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28118         numbers of units.
28119         (vect_schedule_slp_instance): 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         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28126         constant and extern definitions for variable-length vectors.
28127         (vect_get_constant_vectors): Note that the number of units
28128         is known to be constant.
28130 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28131             Alan Hayward  <alan.hayward@arm.com>
28132             David Sherwood  <david.sherwood@arm.com>
28134         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28135         of units as polynomial.  Choose between WIDE and NARROW based
28136         on multiple_p.
28138 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28139             Alan Hayward  <alan.hayward@arm.com>
28140             David Sherwood  <david.sherwood@arm.com>
28142         * tree-vect-stmts.c (simd_clone_subparts): New function.
28143         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28145 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28146             Alan Hayward  <alan.hayward@arm.com>
28147             David Sherwood  <david.sherwood@arm.com>
28149         * tree-vect-stmts.c (vectorizable_call): Treat the number of
28150         vectors as polynomial.  Use build_index_vector for
28151         IFN_GOMP_SIMD_LANE.
28153 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28154             Alan Hayward  <alan.hayward@arm.com>
28155             David Sherwood  <david.sherwood@arm.com>
28157         * tree-vect-stmts.c (get_load_store_type): Treat the number of
28158         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28159         for variable-length vectors.
28160         (vectorizable_mask_load_store): Treat the number of units as
28161         polynomial, asserting that it is constant if the condition has
28162         already been enforced.
28163         (vectorizable_store, vectorizable_load): Likewise.
28165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28166             Alan Hayward  <alan.hayward@arm.com>
28167             David Sherwood  <david.sherwood@arm.com>
28169         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28170         of units as polynomial.  Punt if we can't tell at compile time
28171         which vector contains the final result.
28173 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28174             Alan Hayward  <alan.hayward@arm.com>
28175             David Sherwood  <david.sherwood@arm.com>
28177         * tree-vect-loop.c (vectorizable_induction): Treat the number
28178         of units as polynomial.  Punt on SLP inductions.  Use an integer
28179         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
28180         cast of such a series for variable-length floating-point
28181         reductions.
28183 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28184             Alan Hayward  <alan.hayward@arm.com>
28185             David Sherwood  <david.sherwood@arm.com>
28187         * tree.h (build_index_vector): Declare.
28188         * tree.c (build_index_vector): New function.
28189         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28190         of units as polynomial, forcibly converting it to a constant if
28191         vectorizable_reduction has already enforced the condition.
28192         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
28193         to create a {1,2,3,...} vector.
28194         (vectorizable_reduction): Treat the number of units as polynomial.
28195         Choose vectype_in based on the largest scalar element size rather
28196         than the smallest number of units.  Enforce the restrictions
28197         relied on above.
28199 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28200             Alan Hayward  <alan.hayward@arm.com>
28201             David Sherwood  <david.sherwood@arm.com>
28203         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28204         number of units as polynomial.
28206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28207             Alan Hayward  <alan.hayward@arm.com>
28208             David Sherwood  <david.sherwood@arm.com>
28210         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28211         * target.def (autovectorize_vector_sizes): Return the vector sizes
28212         by pointer, using vector_sizes rather than a bitmask.
28213         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28214         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28215         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28216         Likewise.
28217         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28218         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28219         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28220         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28221         * omp-general.c (omp_max_vf): Likewise.
28222         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28223         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28224         * tree-vect-loop.c (vect_analyze_loop): Likewise.
28225         * tree-vect-slp.c (vect_slp_bb): Likewise.
28226         * doc/tm.texi: Regenerate.
28227         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
28228         to a poly_uint64.
28229         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
28230         the vector size as a poly_uint64 rather than an unsigned int.
28231         (current_vector_size): Change from an unsigned int to a poly_uint64.
28232         (get_vectype_for_scalar_type): Update accordingly.
28233         * tree.h (build_truth_vector_type): Take the size and number of
28234         units as a poly_uint64 rather than an unsigned int.
28235         (build_vector_type): Add a temporary overload that takes
28236         the number of units as a poly_uint64 rather than an unsigned int.
28237         * tree.c (make_vector_type): Likewise.
28238         (build_truth_vector_type): Take the number of units as a poly_uint64
28239         rather than an unsigned int.
28241 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28242             Alan Hayward  <alan.hayward@arm.com>
28243             David Sherwood  <david.sherwood@arm.com>
28245         * target.def (get_mask_mode): Take the number of units and length
28246         as poly_uint64s rather than unsigned ints.
28247         * targhooks.h (default_get_mask_mode): Update accordingly.
28248         * targhooks.c (default_get_mask_mode): Likewise.
28249         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
28250         * doc/tm.texi: Regenerate.
28252 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28253             Alan Hayward  <alan.hayward@arm.com>
28254             David Sherwood  <david.sherwood@arm.com>
28256         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
28257         * omp-general.c (omp_max_vf): Likewise.
28258         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
28259         (expand_omp_simd): Handle polynomial safelen.
28260         * omp-low.c (omplow_simd_context): Add a default constructor.
28261         (omplow_simd_context::max_vf): Change from int to poly_uint64.
28262         (lower_rec_simd_input_clauses): Update accordingly.
28263         (lower_rec_input_clauses): Likewise.
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         * tree-vectorizer.h (vect_nunits_for_cost): New function.
28270         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
28271         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
28272         (vect_analyze_slp_cost): Likewise.
28273         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
28274         (vect_model_load_cost): Likewise.
28276 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28277             Alan Hayward  <alan.hayward@arm.com>
28278             David Sherwood  <david.sherwood@arm.com>
28280         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
28281         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
28282         from an unsigned int * to a poly_uint64_pod *.
28283         (calculate_unrolling_factor): New function.
28284         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
28286 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28287             Alan Hayward  <alan.hayward@arm.com>
28288             David Sherwood  <david.sherwood@arm.com>
28290         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
28291         from an unsigned int to a poly_uint64.
28292         (_loop_vec_info::slp_unrolling_factor): Likewise.
28293         (_loop_vec_info::vectorization_factor): Change from an int
28294         to a poly_uint64.
28295         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
28296         (vect_get_num_vectors): New function.
28297         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
28298         (vect_get_num_copies): Use vect_get_num_vectors.
28299         (vect_analyze_data_ref_dependences): Change max_vf from an int *
28300         to an unsigned int *.
28301         (vect_analyze_data_refs): Change min_vf from an int * to a
28302         poly_uint64 *.
28303         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28304         than an unsigned HOST_WIDE_INT.
28305         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
28306         (vect_analyze_data_ref_dependence): Change max_vf from an int *
28307         to an unsigned int *.
28308         (vect_analyze_data_ref_dependences): Likewise.
28309         (vect_compute_data_ref_alignment): Handle polynomial vf.
28310         (vect_enhance_data_refs_alignment): Likewise.
28311         (vect_prune_runtime_alias_test_list): Likewise.
28312         (vect_shift_permute_load_chain): Likewise.
28313         (vect_supportable_dr_alignment): Likewise.
28314         (dependence_distance_ge_vf): Take the vectorization factor as a
28315         poly_uint64 rather than an unsigned HOST_WIDE_INT.
28316         (vect_analyze_data_refs): Change min_vf from an int * to a
28317         poly_uint64 *.
28318         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
28319         vfm1 as a poly_uint64 rather than an int.  Make the same change
28320         for the returned bound_scalar.
28321         (vect_gen_vector_loop_niters): Handle polynomial vf.
28322         (vect_do_peeling): Likewise.  Update call to
28323         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
28324         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
28325         be constant.
28326         * tree-vect-loop.c (vect_determine_vectorization_factor)
28327         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
28328         (vect_get_known_peeling_cost): Likewise.
28329         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
28330         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
28331         (vect_transform_loop): Likewise.  Use the lowest possible VF when
28332         updating the upper bounds of the loop.
28333         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
28334         rather than an int.
28335         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
28336         polynomial unroll factors.
28337         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
28338         (vect_make_slp_decision): Likewise.
28339         (vect_supported_load_permutation_p): Likewise, and polynomial
28340         vf too.
28341         (vect_analyze_slp_cost): Handle polynomial vf.
28342         (vect_slp_analyze_node_operations): Likewise.
28343         (vect_slp_analyze_bb_1): Likewise.
28344         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28345         than an unsigned HOST_WIDE_INT.
28346         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
28347         (vectorizable_load): Handle polynomial vf.
28348         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
28349         a poly_uint64.
28350         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
28352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28353             Alan Hayward  <alan.hayward@arm.com>
28354             David Sherwood  <david.sherwood@arm.com>
28356         * match.pd: Handle bit operations involving three constants
28357         and try to fold one pair.
28359 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28361         * tree-vect-loop-manip.c: Include gimple-fold.h.
28362         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
28363         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
28364         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
28365         Add a path that uses a step of VF instead of 1, but disable it
28366         for now.
28367         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
28368         and niters_no_overflow parameters.  Update calls to
28369         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
28370         Create a new SSA name if the latter choses to use a ste other
28371         than zero, and return it via niters_vector_mult_vf_var.
28372         * tree-vect-loop.c (vect_transform_loop): Update calls to
28373         vect_do_peeling, vect_gen_vector_loop_niters and
28374         slpeel_make_loop_iterate_ntimes.
28375         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
28376         (vect_gen_vector_loop_niters): Update declarations after above changes.
28378 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
28380         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
28381         128-bit round to integer instructions.
28382         (ceil<mode>2): Likewise.
28383         (btrunc<mode>2): Likewise.
28384         (round<mode>2): Likewise.
28386 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28388         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
28389         unaligned VSX load/store on P8/P9.
28390         (expand_block_clear): Allow the use of unaligned VSX
28391         load/store on P8/P9.
28393 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28395         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
28396         New function.
28397         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
28398         swap associated with both a load and a store.
28400 2018-01-02  Andrew Waterman  <andrew@sifive.com>
28402         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
28403         * config/riscv/riscv.md (clear_cache): Use it.
28405 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
28407         * web.c: Remove out-of-date comment.
28409 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28411         * expr.c (fixup_args_size_notes): Check that any existing
28412         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
28413         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
28414         (emit_single_push_insn): ...here.
28416 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28418         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
28419         (const_vector_encoded_nelts): New function.
28420         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
28421         (const_vector_int_elt, const_vector_elt): Declare.
28422         * emit-rtl.c (const_vector_int_elt_1): New function.
28423         (const_vector_elt): Likewise.
28424         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
28425         of CONST_VECTOR_ELT.
28427 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28429         * expr.c: Include rtx-vector-builder.h.
28430         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
28431         directly on the tree encoding.
28432         (const_vector_from_tree): Likewise.
28433         * optabs.c: Include rtx-vector-builder.h.
28434         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
28435         sequence of "u" values.
28436         * vec-perm-indices.c: Include rtx-vector-builder.h.
28437         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
28438         directly on the vec_perm_indices encoding.
28440 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28442         * doc/rtl.texi (const_vector): Describe new encoding scheme.
28443         * Makefile.in (OBJS): Add rtx-vector-builder.o.
28444         * rtx-vector-builder.h: New file.
28445         * rtx-vector-builder.c: Likewise.
28446         * rtl.h (rtx_def::u2): Add a const_vector field.
28447         (CONST_VECTOR_NPATTERNS): New macro.
28448         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
28449         (CONST_VECTOR_DUPLICATE_P): Likewise.
28450         (CONST_VECTOR_STEPPED_P): Likewise.
28451         (CONST_VECTOR_ENCODED_ELT): Likewise.
28452         (const_vec_duplicate_p): Check for a duplicated vector encoding.
28453         (unwrap_const_vec_duplicate): Likewise.
28454         (const_vec_series_p): Check for a non-duplicated vector encoding.
28455         Say that the function only returns true for integer vectors.
28456         * emit-rtl.c: Include rtx-vector-builder.h.
28457         (gen_const_vec_duplicate_1): Delete.
28458         (gen_const_vector): Call gen_const_vec_duplicate instead of
28459         gen_const_vec_duplicate_1.
28460         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
28461         (gen_const_vec_duplicate): Use rtx_vector_builder.
28462         (gen_const_vec_series): Likewise.
28463         (gen_rtx_CONST_VECTOR): Likewise.
28464         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
28465         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28466         Build a new vector rather than modifying a CONST_VECTOR in-place.
28467         (handle_special_swappables): Update call accordingly.
28468         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
28469         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28470         Build a new vector rather than modifying a CONST_VECTOR in-place.
28471         (handle_special_swappables): Update call accordingly.
28473 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28475         * simplify-rtx.c (simplify_const_binary_operation): Use
28476         CONST_VECTOR_ELT instead of XVECEXP.
28478 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28480         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
28481         the selector elements to be different from the data elements
28482         if the selector is a VECTOR_CST.
28483         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
28484         ssizetype for the selector.
28486 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28488         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
28489         before testing each element individually.
28490         * tree-vect-generic.c (lower_vec_perm): Likewise.
28492 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28494         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
28495         * selftest-run-tests.c (selftest::run_tests): Call it.
28496         * vector-builder.h (vector_builder::operator ==): New function.
28497         (vector_builder::operator !=): Likewise.
28498         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
28499         (vec_perm_indices::all_from_input_p): New function.
28500         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28501         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
28502         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
28503         instead of reading the VECTOR_CST directly.  Detect whether both
28504         vector inputs are the same before constructing the vec_perm_indices,
28505         and update the number of inputs argument accordingly.  Use the
28506         utility functions added above.  Only construct sel2 if we need to.
28508 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28510         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
28511         the broadcast of the low byte.
28512         (expand_mult_highpart): Use an explicit encoding for the permutes.
28513         * optabs-query.c (can_mult_highpart_p): Likewise.
28514         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
28515         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28516         (vectorizable_bswap): Likewise.
28517         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
28518         explicit encoding for the power-of-2 permutes.
28519         (vect_permute_store_chain): Likewise.
28520         (vect_grouped_load_supported): Likewise.
28521         (vect_permute_load_chain): Likewise.
28523 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28525         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
28526         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
28527         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
28528         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28529         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
28530         (vect_gen_perm_mask_any): Likewise.
28532 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28534         * int-vector-builder.h: New file.
28535         * vec-perm-indices.h: Include int-vector-builder.h.
28536         (vec_perm_indices): Redefine as an int_vector_builder.
28537         (auto_vec_perm_indices): Delete.
28538         (vec_perm_builder): Redefine as a stand-alone class.
28539         (vec_perm_indices::vec_perm_indices): New function.
28540         (vec_perm_indices::clamp): Likewise.
28541         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
28542         (vec_perm_indices::new_vector): New function.
28543         (vec_perm_indices::new_expanded_vector): Update for new
28544         vec_perm_indices class.
28545         (vec_perm_indices::rotate_inputs): New function.
28546         (vec_perm_indices::all_in_range_p): Operate directly on the
28547         encoded form, without computing elided elements.
28548         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
28549         encoding.  Update for new vec_perm_indices class.
28550         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
28551         the given vec_perm_builder.
28552         (expand_vec_perm_var): Update vec_perm_builder constructor.
28553         (expand_mult_highpart): Use vec_perm_builder instead of
28554         auto_vec_perm_indices.
28555         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
28556         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
28557         or double series encoding as appropriate.
28558         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
28559         vec_perm_indices instead of auto_vec_perm_indices.
28560         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28561         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28562         (vect_permute_store_chain): Likewise.
28563         (vect_grouped_load_supported): Likewise.
28564         (vect_permute_load_chain): Likewise.
28565         (vect_shift_permute_load_chain): Likewise.
28566         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28567         (vect_transform_slp_perm_load): Likewise.
28568         (vect_schedule_slp_instance): Likewise.
28569         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28570         (vectorizable_mask_load_store): Likewise.
28571         (vectorizable_bswap): Likewise.
28572         (vectorizable_store): Likewise.
28573         (vectorizable_load): Likewise.
28574         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
28575         vec_perm_indices instead of auto_vec_perm_indices.  Use
28576         tree_to_vec_perm_builder to read the vector from a tree.
28577         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
28578         vec_perm_builder instead of a vec_perm_indices.
28579         (have_whole_vector_shift): Use vec_perm_builder and
28580         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
28581         truncation to calc_vec_perm_mask_for_shift.
28582         (vect_create_epilog_for_reduction): Likewise.
28583         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
28584         from auto_vec_perm_indices to vec_perm_indices.
28585         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28586         instead of changing individual elements.
28587         (aarch64_vectorize_vec_perm_const): Use new_vector to install
28588         the vector in d.perm.
28589         * config/arm/arm.c (expand_vec_perm_d::perm): Change
28590         from auto_vec_perm_indices to vec_perm_indices.
28591         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28592         instead of changing individual elements.
28593         (arm_vectorize_vec_perm_const): Use new_vector to install
28594         the vector in d.perm.
28595         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
28596         Update vec_perm_builder constructor.
28597         (rs6000_expand_interleave): Likewise.
28598         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
28599         (rs6000_expand_interleave): Likewise.
28601 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28603         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
28604         to qimode could truncate the indices.
28605         * optabs.c (expand_vec_perm_var): Likewise.
28607 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28609         * Makefile.in (OBJS): Add vec-perm-indices.o.
28610         * vec-perm-indices.h: New file.
28611         * vec-perm-indices.c: Likewise.
28612         * target.h (vec_perm_indices): Replace with a forward class
28613         declaration.
28614         (auto_vec_perm_indices): Move to vec-perm-indices.h.
28615         * optabs.h: Include vec-perm-indices.h.
28616         (expand_vec_perm): Delete.
28617         (selector_fits_mode_p, expand_vec_perm_var): Declare.
28618         (expand_vec_perm_const): Declare.
28619         * target.def (vec_perm_const_ok): Replace with...
28620         (vec_perm_const): ...this new hook.
28621         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
28622         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
28623         * doc/tm.texi: Regenerate.
28624         * optabs.def (vec_perm_const): Delete.
28625         * doc/md.texi (vec_perm_const): Likewise.
28626         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
28627         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
28628         expand_vec_perm for constant permutation vectors.  Assert that
28629         the mode of variable permutation vectors is the integer equivalent
28630         of the mode that is being permuted.
28631         * optabs-query.h (selector_fits_mode_p): Declare.
28632         * optabs-query.c: Include vec-perm-indices.h.
28633         (selector_fits_mode_p): New function.
28634         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
28635         is defined, instead of checking whether the vec_perm_const_optab
28636         exists.  Use targetm.vectorize.vec_perm_const instead of
28637         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
28638         fit in the vector mode before using a variable permute.
28639         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
28640         vec_perm_indices instead of an rtx.
28641         (expand_vec_perm): Replace with...
28642         (expand_vec_perm_const): ...this new function.  Take the selector
28643         as a vec_perm_indices rather than an rtx.  Also take the mode of
28644         the selector.  Update call to shift_amt_for_vec_perm_mask.
28645         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
28646         Use vec_perm_indices::new_expanded_vector to expand the original
28647         selector into bytes.  Check whether the indices fit in the vector
28648         mode before using a variable permute.
28649         (expand_vec_perm_var): Make global.
28650         (expand_mult_highpart): Use expand_vec_perm_const.
28651         * fold-const.c: Includes vec-perm-indices.h.
28652         * tree-ssa-forwprop.c: Likewise.
28653         * tree-vect-data-refs.c: Likewise.
28654         * tree-vect-generic.c: Likewise.
28655         * tree-vect-loop.c: Likewise.
28656         * tree-vect-slp.c: Likewise.
28657         * tree-vect-stmts.c: Likewise.
28658         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
28659         Delete.
28660         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
28661         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
28662         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
28663         (aarch64_vectorize_vec_perm_const): ...this new function.
28664         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28665         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28666         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
28667         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
28668         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28669         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28670         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28671         into...
28672         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
28673         check for NEON modes.
28674         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28675         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28676         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28677         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28678         into...
28679         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
28680         the old VEC_PERM_CONST conditions.
28681         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28682         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28683         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28684         (ia64_vectorize_vec_perm_const_ok): Merge into...
28685         (ia64_vectorize_vec_perm_const): ...this new function.
28686         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28687         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28688         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28689         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28690         * config/mips/mips.c (mips_expand_vec_perm_const)
28691         (mips_vectorize_vec_perm_const_ok): Merge into...
28692         (mips_vectorize_vec_perm_const): ...this new function.
28693         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28694         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28695         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28696         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28697         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28698         (rs6000_expand_vec_perm_const): Delete.
28699         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28700         Delete.
28701         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28702         (altivec_expand_vec_perm_const_le): Take each operand individually.
28703         Operate on constant selectors rather than rtxes.
28704         (altivec_expand_vec_perm_const): Likewise.  Update call to
28705         altivec_expand_vec_perm_const_le.
28706         (rs6000_expand_vec_perm_const): Delete.
28707         (rs6000_vectorize_vec_perm_const_ok): Delete.
28708         (rs6000_vectorize_vec_perm_const): New function.
28709         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28710         an element count and rtx array.
28711         (rs6000_expand_extract_even): Update call accordingly.
28712         (rs6000_expand_interleave): Likewise.
28713         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28714         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28715         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28716         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28717         (rs6000_expand_vec_perm_const): Delete.
28718         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28719         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28720         (altivec_expand_vec_perm_const_le): Take each operand individually.
28721         Operate on constant selectors rather than rtxes.
28722         (altivec_expand_vec_perm_const): Likewise.  Update call to
28723         altivec_expand_vec_perm_const_le.
28724         (rs6000_expand_vec_perm_const): Delete.
28725         (rs6000_vectorize_vec_perm_const_ok): Delete.
28726         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
28727         reference to the SPE evmerge intructions.
28728         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28729         an element count and rtx array.
28730         (rs6000_expand_extract_even): Update call accordingly.
28731         (rs6000_expand_interleave): Likewise.
28732         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28733         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28734         new function.
28735         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28737 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28739         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28740         vector mode and that that mode matches the mode of the data
28741         being permuted.
28742         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28743         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
28744         directly using expand_vec_perm_1 when forcing selectors into
28745         registers.
28746         (expand_vec_perm_var): New function, split out from expand_vec_perm.
28748 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28750         * optabs-query.h (can_vec_perm_p): Delete.
28751         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28752         * optabs-query.c (can_vec_perm_p): Split into...
28753         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28754         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28755         particular selector is valid.
28756         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28757         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28758         (vect_grouped_load_supported): Likewise.
28759         (vect_shift_permute_load_chain): Likewise.
28760         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28761         (vect_transform_slp_perm_load): Likewise.
28762         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28763         (vectorizable_bswap): Likewise.
28764         (vect_gen_perm_mask_checked): Likewise.
28765         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
28766         implementations of variable permutation vectors into account
28767         when deciding which selector to use.
28768         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28769         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28770         with a false third argument.
28771         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28772         to test whether the constant selector is valid and can_vec_perm_var_p
28773         to test whether a variable selector is valid.
28775 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28777         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28778         * optabs-query.c (can_vec_perm_p): Likewise.
28779         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28780         instead of vec_perm_indices.
28781         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28782         (vect_gen_perm_mask_checked): Likewise,
28783         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28784         (vect_gen_perm_mask_checked): Likewise,
28786 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28788         * optabs-query.h (qimode_for_vec_perm): Declare.
28789         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28790         (qimode_for_vec_perm): ...this new function.
28791         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28793 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28795         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28796         does not have a conditional at the top.
28798 2018-01-02  Richard Biener  <rguenther@suse.de>
28800         * ipa-inline.c (big_speedup_p): Fix expression.
28802 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28804         PR target/81616
28805         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28806         for generic 4->6.
28808 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28810         PR target/81616
28811         Generic tuning.
28812         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28813         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28814         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28815         cond_taken_branch_cost 3->4.
28817 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
28819         PR tree-optimization/83581
28820         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28821         TODO_cleanup_cfg if any changes have been made.
28823         PR middle-end/83608
28824         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28825         convert_modes if target mode has the right side, but different mode
28826         class.
28828         PR middle-end/83609
28829         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28830         last argument when extracting from CONCAT.  If either from_real or
28831         from_imag is NULL, use expansion through memory.  If result is not
28832         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28833         the parts directly to inner mode, if even that fails, use expansion
28834         through memory.
28836         PR middle-end/83623
28837         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28838         check for bswap in mode rather than HImode and use that in expand_unop
28839         too.
28841 Copyright (C) 2018 Free Software Foundation, Inc.
28843 Copying and distribution of this file, with or without modification,
28844 are permitted in any medium without royalty provided the copyright
28845 notice and this notice are preserved.