Daily bump.
[platform/upstream/gcc.git] / gcc / ChangeLog
1 2021-09-12  Roger Sayle  <roger@nextmovesoftware.com>
2
3         * expr.c (convert_move): Preserve SUBREG_PROMOTED_VAR_P when
4         creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P
5         subreg.
6
7 2021-09-11  Aldy Hernandez  <aldyh@redhat.com>
8
9         * tree-ssa-threadbackward.c (class back_threader_registry): Use
10         back_jt_path_registry.
11         * tree-ssa-threadedge.c (jump_threader::jump_threader): Use
12         fwd_jt_path_registry.
13         * tree-ssa-threadedge.h (class jump_threader): Same..
14         * tree-ssa-threadupdate.c
15         (jump_thread_path_registry::jump_thread_path_registry): Rename...
16         (jt_path_registry::jt_path_registry): ...to this.
17         (jump_thread_path_registry::~jump_thread_path_registry): Rename...
18         (jt_path_registry::~jt_path_registry): ...this.
19         (fwd_jt_path_registry::fwd_jt_path_registry): New.
20         (fwd_jt_path_registry::~fwd_jt_path_registry): New.
21         (jump_thread_path_registry::allocate_thread_edge): Rename...
22         (jt_path_registry::allocate_thread_edge): ...to this.
23         (jump_thread_path_registry::allocate_thread_path): Rename...
24         (jt_path_registry::allocate_thread_path): ...to this.
25         (jump_thread_path_registry::lookup_redirection_data): Rename...
26         (fwd_jt_path_registry::lookup_redirection_data): ...to this.
27         (jump_thread_path_registry::thread_block_1): Rename...
28         (fwd_jt_path_registry::thread_block_1): ...to this.
29         (jump_thread_path_registry::thread_block): Rename...
30         (fwd_jt_path_registry::thread_block): ...to this.
31         (jt_path_registry::thread_through_loop_header): Rename...
32         (fwd_jt_path_registry::thread_through_loop_header): ...to this.
33         (jump_thread_path_registry::mark_threaded_blocks): Rename...
34         (fwd_jt_path_registry::mark_threaded_blocks): ...to this.
35         (jump_thread_path_registry::debug_path): Rename...
36         (jt_path_registry::debug_path): ...to this.
37         (jump_thread_path_registry::dump): Rename...
38         (jt_path_registry::debug): ...to this.
39         (jump_thread_path_registry::rewire_first_differing_edge): Rename...
40         (back_jt_path_registry::rewire_first_differing_edge): ...to this.
41         (jump_thread_path_registry::adjust_paths_after_duplication): Rename...
42         (back_jt_path_registry::adjust_paths_after_duplication): ...to this.
43         (jump_thread_path_registry::duplicate_thread_path): Rename...
44         (back_jt_path_registry::duplicate_thread_path): ...to this.  Also,
45         drop ill-formed candidates.
46         (jump_thread_path_registry::remove_jump_threads_including): Rename...
47         (fwd_jt_path_registry::remove_jump_threads_including): ...to this.
48         (jt_path_registry::thread_through_all_blocks): New.
49         (back_jt_path_registry::update_cfg): New.
50         (fwd_jt_path_registry::update_cfg): New.
51         (jump_thread_path_registry::register_jump_thread): Rename...
52         (jt_path_registry::register_jump_thread): ...to this.
53         * tree-ssa-threadupdate.h (class jump_thread_path_registry):
54         Abstract to...
55         (class jt_path_registry): ...here.
56         (class fwd_jt_path_registry): New.
57         (class back_jt_path_registry): New.
58
59 2021-09-10  liuhongt  <hongtao.liu@intel.com>
60
61         Revert:
62         2021-09-01  liuhongt  <hongtao.liu@intel.com>
63
64         * emit-rtl.c (validate_subreg): Get rid of all float-int
65         special cases.
66
67 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
68
69         * tree-core.h (enum omp_memory_order): Add OMP_MEMORY_ORDER_MASK,
70         OMP_FAIL_MEMORY_ORDER_UNSPECIFIED, OMP_FAIL_MEMORY_ORDER_RELAXED,
71         OMP_FAIL_MEMORY_ORDER_ACQUIRE, OMP_FAIL_MEMORY_ORDER_RELEASE,
72         OMP_FAIL_MEMORY_ORDER_ACQ_REL, OMP_FAIL_MEMORY_ORDER_SEQ_CST and
73         OMP_FAIL_MEMORY_ORDER_MASK enumerators.
74         (OMP_FAIL_MEMORY_ORDER_SHIFT): Define.
75         * gimple-pretty-print.c (dump_gimple_omp_atomic_load,
76         dump_gimple_omp_atomic_store): Print [weak] for weak atomic
77         load/store.
78         * gimple.h (enum gf_mask): Change GF_OMP_ATOMIC_MEMORY_ORDER
79         to 6-bit mask, adjust GF_OMP_ATOMIC_NEED_VALUE value and add
80         GF_OMP_ATOMIC_WEAK.
81         (gimple_omp_atomic_weak_p, gimple_omp_atomic_set_weak): New inline
82         functions.
83         * tree.h (OMP_ATOMIC_WEAK): Define.
84         * tree-pretty-print.c (dump_omp_atomic_memory_order): Adjust for
85         fail memory order being encoded in the same enum and also print
86         fail clause if present.
87         (dump_generic_node): Print weak clause if OMP_ATOMIC_WEAK.
88         * gimplify.c (goa_stabilize_expr): Add target_expr and rhs arguments,
89         handle pre_p == NULL case as a test mode that only returns value
90         but doesn't change gimplify nor change anything otherwise, adjust
91         recursive calls, add MODIFY_EXPR, ADDR_EXPR, COND_EXPR, TARGET_EXPR
92         and CALL_EXPR handling, adjust COMPOUND_EXPR handling for
93         __builtin_clear_padding calls, for !rhs gimplify as lvalue rather
94         than rvalue.
95         (gimplify_omp_atomic): Adjust goa_stabilize_expr caller.  Handle
96         COND_EXPR rhs.  Set weak flag on gimple load/store for
97         OMP_ATOMIC_WEAK.
98         * omp-expand.c (omp_memory_order_to_fail_memmodel): New function.
99         (omp_memory_order_to_memmodel): Adjust for fail clause encoded
100         in the same enum.
101         (expand_omp_atomic_cas): New function.
102         (expand_omp_atomic_pipeline): Use omp_memory_order_to_fail_memmodel
103         function.
104         (expand_omp_atomic): Attempt to optimize atomic compare and exchange
105         using expand_omp_atomic_cas.
106
107 2021-09-10  Aldy Hernandez  <aldyh@redhat.com>
108             Michael Matz  <matz@suse.de>
109
110         * tree-pass.h (PROP_loop_opts_done): New.
111         * gimple-range-path.cc (path_range_query::internal_range_of_expr):
112         Intersect with global range.
113         * tree-ssa-loop.c (tree_ssa_loop_done): Set PROP_loop_opts_done.
114         * tree-ssa-threadbackward.c
115         (back_threader_profitability::profitable_path_p): Disable
116         threading through latches until after loop optimizations have run.
117
118 2021-09-10  David Faust  <david.faust@oracle.com>
119
120         * doc/invoke.texi: Document BPF -mcpu, -mjmpext, -mjmp32 and -malu32
121         options.
122
123 2021-09-10  David Faust  <david.faust@oracle.com>
124
125         * config/bpf/bpf-opts.h (bpf_isa_version): New enum.
126         * config/bpf/bpf-protos.h (bpf_expand_cbranch): New.
127         * config/bpf/bpf.c (bpf_option_override): Handle -mcpu option.
128         (bpf_expand_cbranch): New function.
129         * config/bpf/bpf.md (AM mode iterator): Conditionalize support for SI
130         mode.
131         (zero_extendsidi2): Only use mov32 instruction if it is available.
132         (SIM mode iterator): Conditionalize support for SI mode.
133         (JM mode iterator): New.
134         (cbranchdi4): Update name, use new JM iterator. Use bpf_expand_cbranch.
135         (*branch_on_di): Update name, use new JM iterator.
136         * config/bpf/bpf.opt: (mjmpext): New option.
137         (malu32): Likewise.
138         (mjmp32): Likewise.
139         (mcpu): Likewise.
140         (bpf_isa): New enum.
141
142 2021-09-10  David Faust  <david.faust@oracle.com>
143
144         * config/bpf/bpf.md (zero_extendhidi2): Add new output template
145         for register-to-register extensions.
146         (zero_extendqidi2): Likewise.
147
148 2021-09-10  Richard Biener  <rguenther@suse.de>
149
150         PR middle-end/102273
151         * internal-fn.c (expand_DEFERRED_INIT): Always expand non-SSA vars.
152
153 2021-09-10  Richard Biener  <rguenther@suse.de>
154
155         PR middle-end/102269
156         * gimplify.c (is_var_need_auto_init): Empty types do not need
157         initialization.
158
159 2021-09-10  Richard Biener  <rguenther@suse.de>
160
161         * configure.ac (--with-stabs): Remove.
162         * configure: Regenerate.
163         * doc/install.texi: Remove --with-stabs documentation.
164
165 2021-09-10  liuhongt  <hongtao.liu@intel.com>
166
167         * config/i386/avx512fp16intrin.h: (_mm512_cmp_ph_mask):
168         New intrinsic.
169         (_mm512_mask_cmp_ph_mask): Likewise.
170         (_mm512_cmp_round_ph_mask): Likewise.
171         (_mm512_mask_cmp_round_ph_mask): Likewise.
172         (_mm_cmp_sh_mask): Likewise.
173         (_mm_mask_cmp_sh_mask): Likewise.
174         (_mm_cmp_round_sh_mask): Likewise.
175         (_mm_mask_cmp_round_sh_mask): Likewise.
176         (_mm_comieq_sh): Likewise.
177         (_mm_comilt_sh): Likewise.
178         (_mm_comile_sh): Likewise.
179         (_mm_comigt_sh): Likewise.
180         (_mm_comige_sh): Likewise.
181         (_mm_comineq_sh): Likewise.
182         (_mm_ucomieq_sh): Likewise.
183         (_mm_ucomilt_sh): Likewise.
184         (_mm_ucomile_sh): Likewise.
185         (_mm_ucomigt_sh): Likewise.
186         (_mm_ucomige_sh): Likewise.
187         (_mm_ucomineq_sh): Likewise.
188         (_mm_comi_round_sh): Likewise.
189         (_mm_comi_sh): Likewise.
190         * config/i386/avx512fp16vlintrin.h (_mm_cmp_ph_mask): New intrinsic.
191         (_mm_mask_cmp_ph_mask): Likewise.
192         (_mm256_cmp_ph_mask): Likewise.
193         (_mm256_mask_cmp_ph_mask): Likewise.
194         * config/i386/i386-builtin-types.def: Add corresponding builtin types.
195         * config/i386/i386-builtin.def: Add corresponding new builtins.
196         * config/i386/i386-expand.c
197         (ix86_expand_args_builtin): Handle new builtin types.
198         (ix86_expand_round_builtin): Ditto.
199         * config/i386/i386.md (ssevecmode): Add HF mode.
200         (MODEFH): New mode iterator.
201         * config/i386/sse.md
202         (V48H_AVX512VL): New mode iterator to support HF vector modes.
203         Ajdust corresponding description.
204         (ssecmpintprefix): New.
205         (VI12_AVX512VL): Adjust to support HF vector modes.
206         (cmp_imm_predicate): Likewise.
207         (<avx512>_cmp<mode>3<mask_scalar_merge_name><round_saeonly_name>):
208         Likewise.
209         (avx512f_vmcmp<mode>3<round_saeonly_name>): Likewise.
210         (avx512f_vmcmp<mode>3_mask<round_saeonly_name>): Likewise.
211         (<sse>_<unord>comi<round_saeonly_name>): Likewise.
212
213 2021-09-10  liuhongt  <hongtao.liu@intel.com>
214
215         * config/i386/avx512fp16intrin.h: (_mm512_max_ph): New intrinsic.
216         (_mm512_mask_max_ph): Likewise.
217         (_mm512_maskz_max_ph): Likewise.
218         (_mm512_min_ph): Likewise.
219         (_mm512_mask_min_ph): Likewise.
220         (_mm512_maskz_min_ph): Likewise.
221         (_mm512_max_round_ph): Likewise.
222         (_mm512_mask_max_round_ph): Likewise.
223         (_mm512_maskz_max_round_ph): Likewise.
224         (_mm512_min_round_ph): Likewise.
225         (_mm512_mask_min_round_ph): Likewise.
226         (_mm512_maskz_min_round_ph): Likewise.
227         (_mm_max_sh): Likewise.
228         (_mm_mask_max_sh): Likewise.
229         (_mm_maskz_max_sh): Likewise.
230         (_mm_min_sh): Likewise.
231         (_mm_mask_min_sh): Likewise.
232         (_mm_maskz_min_sh): Likewise.
233         (_mm_max_round_sh): Likewise.
234         (_mm_mask_max_round_sh): Likewise.
235         (_mm_maskz_max_round_sh): Likewise.
236         (_mm_min_round_sh): Likewise.
237         (_mm_mask_min_round_sh): Likewise.
238         (_mm_maskz_min_round_sh): Likewise.
239         * config/i386/avx512fp16vlintrin.h (_mm_max_ph): New intrinsic.
240         (_mm256_max_ph): Likewise.
241         (_mm_mask_max_ph): Likewise.
242         (_mm256_mask_max_ph): Likewise.
243         (_mm_maskz_max_ph): Likewise.
244         (_mm256_maskz_max_ph): Likewise.
245         (_mm_min_ph): Likewise.
246         (_mm256_min_ph): Likewise.
247         (_mm_mask_min_ph): Likewise.
248         (_mm256_mask_min_ph): Likewise.
249         (_mm_maskz_min_ph): Likewise.
250         (_mm256_maskz_min_ph): Likewise.
251         * config/i386/i386-builtin-types.def: Add corresponding builtin types.
252         * config/i386/i386-builtin.def: Add corresponding new builtins.
253         * config/i386/i386-expand.c
254         (ix86_expand_args_builtin): Handle new builtin types.
255         * config/i386/sse.md
256         (<code><mode>3<mask_name><round_saeonly_name>): Adjust to
257         support HF vector modes.
258         (*<code><mode>3<mask_name><round_saeonly_name>): Likewise.
259         (ieee_<ieee_maxmin><mode>3<mask_name><round_saeonly_name>):
260         Likewise.
261         (<sse>_vm<code><mode>3<mask_scalar_name><round_saeonly_scalar_name>):
262         Likewise.
263         * config/i386/subst.md (round_saeonly_mode512bit_condition):
264         Adjust for HF vector modes.
265
266 2021-09-10  Liu, Hongtao  <hongtao.liu@intel.com>
267
268         * config/i386/avx512fp16intrin.h (_mm_add_sh): New intrinsic.
269         (_mm_mask_add_sh): Likewise.
270         (_mm_maskz_add_sh): Likewise.
271         (_mm_sub_sh): Likewise.
272         (_mm_mask_sub_sh): Likewise.
273         (_mm_maskz_sub_sh): Likewise.
274         (_mm_mul_sh): Likewise.
275         (_mm_mask_mul_sh): Likewise.
276         (_mm_maskz_mul_sh): Likewise.
277         (_mm_div_sh): Likewise.
278         (_mm_mask_div_sh): Likewise.
279         (_mm_maskz_div_sh): Likewise.
280         (_mm_add_round_sh): Likewise.
281         (_mm_mask_add_round_sh): Likewise.
282         (_mm_maskz_add_round_sh): Likewise.
283         (_mm_sub_round_sh): Likewise.
284         (_mm_mask_sub_round_sh): Likewise.
285         (_mm_maskz_sub_round_sh): Likewise.
286         (_mm_mul_round_sh): Likewise.
287         (_mm_mask_mul_round_sh): Likewise.
288         (_mm_maskz_mul_round_sh): Likewise.
289         (_mm_div_round_sh): Likewise.
290         (_mm_mask_div_round_sh): Likewise.
291         (_mm_maskz_div_round_sh): Likewise.
292         * config/i386/i386-builtin-types.def: Add corresponding builtin types.
293         * config/i386/i386-builtin.def: Add corresponding new builtins.
294         * config/i386/i386-expand.c
295         (ix86_expand_round_builtin): Handle new builtins.
296         * config/i386/sse.md (VF_128): Change description.
297         (<sse>_vm<plusminus_insn><mode>3<mask_scalar_name><round_scalar_name>):
298         Adjust to support HF vector modes.
299         (<sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name><round_scalar_name>):
300         Likewise.
301
302 2021-09-10  H.J. Lu  <hjl.tools@gmail.com>
303
304         * config/i386/i386-expand.c
305         (ix86_avx256_split_vector_move_misalign): Handle V16HF mode.
306         * config/i386/i386.c
307         (ix86_preferred_simd_mode): Handle HF mode.
308         * config/i386/sse.md (V_256H): New mode iterator.
309         (avx_vextractf128<mode>): Use it.
310         (VEC_INIT_MODE): Align vector HFmode condition to vector
311         HImodes since there're no real HF instruction used.
312         (VEC_INIT_HALF_MODE): Ditto.
313         (VIHF): Ditto.
314         (VIHF_AVX512BW): Ditto.
315         (*vec_extracthf): Ditto.
316         (VEC_EXTRACT_MODE): Ditto.
317
318 2021-09-10  Richard Biener  <rguenther@suse.de>
319
320         PR target/102255
321         * config/dbx.h: Remove.
322         * config/dbxcoff.h: Do not define PREFERRED_DEBUGGING_TYPE.
323         * config/lynx.h: Likewise.
324
325 2021-09-10  liuhongt  <hongtao.liu@intel.com>
326
327         * config/i386/i386-expand.c (ix86_expand_copysign): Expand
328         right into ANDNOT + AND + IOR, using paradoxical subregs.
329         (ix86_split_copysign_const): Remove.
330         (ix86_split_copysign_var): Ditto.
331         * config/i386/i386-protos.h (ix86_split_copysign_const): Dotto.
332         (ix86_split_copysign_var): Ditto.
333         * config/i386/i386.md (@copysign<mode>3_const): Ditto.
334         (@copysign<mode>3_var): Ditto.
335
336 2021-09-09  qing zhao  <qing.zhao@oracle.com>
337
338         * builtins.c (expand_builtin_memset): Make external visible.
339         * builtins.h (expand_builtin_memset): Declare extern.
340         * common.opt (ftrivial-auto-var-init=): New option.
341         * doc/extend.texi: Document the uninitialized attribute.
342         * doc/invoke.texi: Document -ftrivial-auto-var-init.
343         * flag-types.h (enum auto_init_type): New enumerated type
344         auto_init_type.
345         * gimple-fold.c (clear_padding_type): Add one new parameter.
346         (clear_padding_union): Likewise.
347         (clear_padding_emit_loop): Likewise.
348         (clear_type_padding_in_mask): Likewise.
349         (gimple_fold_builtin_clear_padding): Handle this new parameter.
350         * gimplify.c (gimple_add_init_for_auto_var): New function.
351         (gimple_add_padding_init_for_auto_var): New function.
352         (is_var_need_auto_init): New function.
353         (gimplify_decl_expr): Add initialization to automatic variables per
354         users' requests.
355         (gimplify_call_expr): Add one new parameter for call to
356         __builtin_clear_padding.
357         (gimplify_init_constructor): Add padding initialization in the end.
358         * internal-fn.c (INIT_PATTERN_VALUE): New macro.
359         (expand_DEFERRED_INIT): New function.
360         * internal-fn.def (DEFERRED_INIT): New internal function.
361         * tree-cfg.c (verify_gimple_call): Verify calls to .DEFERRED_INIT.
362         * tree-sra.c (generate_subtree_deferred_init): New function.
363         (scan_function): Avoid setting cannot_scalarize_away_bitmap for
364         calls to .DEFERRED_INIT.
365         (sra_modify_deferred_init): New function.
366         (sra_modify_function_body): Handle calls to DEFERRED_INIT specially.
367         * tree-ssa-structalias.c (find_func_aliases_for_call): Likewise.
368         * tree-ssa-uninit.c (warn_uninit): Handle calls to DEFERRED_INIT
369         specially.
370         (check_defs): Likewise.
371         (warn_uninitialized_vars): Likewise.
372         * tree-ssa.c (ssa_undefined_value_p): Likewise.
373         * tree.c (build_common_builtin_nodes): Build tree node for
374         BUILT_IN_CLEAR_PADDING when needed.
375
376 2021-09-09  Richard Biener  <rguenther@suse.de>
377
378         * tree-ssa-loop-im.c (fill_always_executed_in_1): Walk
379         into all subloops.
380
381 2021-09-09  Richard Biener  <rguenther@suse.de>
382
383         * tree-ssa-loop-im.c (fill_always_executed_in_1): Integrate
384         DOM walk from get_loop_body_in_dom_order using a worklist
385         approach.
386
387 2021-09-09  liuhongt  <hongtao.liu@intel.com>
388
389         * config.gcc: Add avx512fp16vlintrin.h.
390         * config/i386/avx512fp16intrin.h: (_mm512_add_ph): New intrinsic.
391         (_mm512_mask_add_ph): Likewise.
392         (_mm512_maskz_add_ph): Likewise.
393         (_mm512_sub_ph): Likewise.
394         (_mm512_mask_sub_ph): Likewise.
395         (_mm512_maskz_sub_ph): Likewise.
396         (_mm512_mul_ph): Likewise.
397         (_mm512_mask_mul_ph): Likewise.
398         (_mm512_maskz_mul_ph): Likewise.
399         (_mm512_div_ph): Likewise.
400         (_mm512_mask_div_ph): Likewise.
401         (_mm512_maskz_div_ph): Likewise.
402         (_mm512_add_round_ph): Likewise.
403         (_mm512_mask_add_round_ph): Likewise.
404         (_mm512_maskz_add_round_ph): Likewise.
405         (_mm512_sub_round_ph): Likewise.
406         (_mm512_mask_sub_round_ph): Likewise.
407         (_mm512_maskz_sub_round_ph): Likewise.
408         (_mm512_mul_round_ph): Likewise.
409         (_mm512_mask_mul_round_ph): Likewise.
410         (_mm512_maskz_mul_round_ph): Likewise.
411         (_mm512_div_round_ph): Likewise.
412         (_mm512_mask_div_round_ph): Likewise.
413         (_mm512_maskz_div_round_ph): Likewise.
414         * config/i386/avx512fp16vlintrin.h: New header.
415         * config/i386/i386-builtin-types.def (V16HF, V8HF, V32HF):
416         Add new builtin types.
417         * config/i386/i386-builtin.def: Add corresponding builtins.
418         * config/i386/i386-expand.c
419         (ix86_expand_args_builtin): Handle new builtin types.
420         (ix86_expand_round_builtin): Likewise.
421         * config/i386/immintrin.h: Include avx512fp16vlintrin.h
422         * config/i386/sse.md (VFH): New mode_iterator.
423         (VF2H): Likewise.
424         (avx512fmaskmode): Add HF vector modes.
425         (avx512fmaskhalfmode): Likewise.
426         (<plusminus_insn><mode>3<mask_name><round_name>): Adjust to for
427         HF vector modes.
428         (*<plusminus_insn><mode>3<mask_name><round_name>): Likewise.
429         (mul<mode>3<mask_name><round_name>): Likewise.
430         (*mul<mode>3<mask_name><round_name>): Likewise.
431         (div<mode>3): Likewise.
432         (<sse>_div<mode>3<mask_name><round_name>): Likewise.
433         * config/i386/subst.md (SUBST_V): Add HF vector modes.
434         (SUBST_A): Likewise.
435         (round_mode512bit_condition): Adjust for V32HFmode.
436
437 2021-09-09  liuhongt  <hongtao.liu@intel.com>
438
439         PR target/101059
440         * config/i386/sse.md (reduc_plus_scal_<mode>): Split to ..
441         (reduc_plus_scal_v4sf): .. this, New define_expand.
442         (reduc_plus_scal_v2df): .. and this, New define_expand.
443
444 2021-09-09  liuhongt  <hongtao.liu@intel.com>
445
446         PR target/91103
447         * config/i386/sse.md (*vec_extract<mode><ssescalarmodelower>_valign):
448         New define_insn.
449
450 2021-09-08  Jonathan Wakely  <jwakely@redhat.com>
451
452         PR c++/60318
453         * doc/trouble.texi (Copy Assignment): Fix description of
454         behaviour and fix code in example.
455
456 2021-09-08  Segher Boessenkool  <segher@kernel.crashing.org>
457
458         PR target/102107
459         * config/rs6000/rs6000-logue.c (rs6000_emit_epilogue): For ELFv2 use
460         r11 instead of r12 for restoring CR.
461
462 2021-09-08  Jakub Jelinek  <jakub@redhat.com>
463             liuhongt  <hongtao.liu@intel.com>
464
465         PR target/89984
466         * config/i386/i386.md (@xorsign<mode>3_1): Remove.
467         * config/i386/i386-expand.c (ix86_expand_xorsign): Expand right away
468         into AND with mask and XOR, using paradoxical subregs.
469         (ix86_split_xorsign): Remove.
470         * config/i386/i386-protos.h (ix86_split_xorsign): Remove.
471
472 2021-09-08  Di Zhao  <dizhao@os.amperecomputing.com>
473
474         * tree-ssa-sccvn.c (vn_nary_op_insert_into): fix result compare
475
476 2021-09-08  Jakub Jelinek  <jakub@redhat.com>
477
478         PR target/102224
479         * config/i386/i386.md (xorsign<mode>3): If operands[1] is equal to
480         operands[2], emit abs<mode>2 instead.
481         (@xorsign<mode>3_1): Add early-clobbers for output operand, enable
482         first alternative even for avx, add another alternative with
483         =&Yv <- 0, Yv, Yvm constraints.
484         * config/i386/i386-expand.c (ix86_split_xorsign): If op0 is equal
485         to op1, emit vpandn instead.
486
487 2021-09-08  liuhongt  <hongtao.liu@intel.com>
488
489         * config/i386/avx512fp16intrin.h (_mm_set_ph): New intrinsic.
490         (_mm256_set_ph): Likewise.
491         (_mm512_set_ph): Likewise.
492         (_mm_setr_ph): Likewise.
493         (_mm256_setr_ph): Likewise.
494         (_mm512_setr_ph): Likewise.
495         (_mm_set1_ph): Likewise.
496         (_mm256_set1_ph): Likewise.
497         (_mm512_set1_ph): Likewise.
498         (_mm_setzero_ph): Likewise.
499         (_mm256_setzero_ph): Likewise.
500         (_mm512_setzero_ph): Likewise.
501         (_mm_set_sh): Likewise.
502         (_mm_load_sh): Likewise.
503         (_mm_store_sh): Likewise.
504         * config/i386/i386-builtin-types.def (V8HF): New type.
505         (DEF_FUNCTION_TYPE (V8HF, V8HI)): New builtin function type
506         * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate):
507         Support vector HFmodes.
508         (ix86_expand_vector_init_one_nonzero): Likewise.
509         (ix86_expand_vector_init_one_var): Likewise.
510         (ix86_expand_vector_init_interleave): Likewise.
511         (ix86_expand_vector_init_general): Likewise.
512         (ix86_expand_vector_set): Likewise.
513         (ix86_expand_vector_extract): Likewise.
514         (ix86_expand_vector_init_concat): Likewise.
515         (ix86_expand_sse_movcc): Handle vector HFmodes.
516         (ix86_expand_vector_set_var): Ditto.
517         * config/i386/i386-modes.def: Add HF vector modes in comment.
518         * config/i386/i386.c (classify_argument): Add HF vector modes.
519         (ix86_hard_regno_mode_ok): Allow HF vector modes for AVX512FP16.
520         (ix86_vector_mode_supported_p): Likewise.
521         (ix86_set_reg_reg_cost): Handle vector HFmode.
522         (ix86_get_ssemov): Handle vector HFmode.
523         (function_arg_advance_64): Pass unamed V16HFmode and V32HFmode
524         by stack.
525         (function_arg_advance_32): Pass V8HF/V16HF/V32HF by sse reg for 32bit
526         mode.
527         (function_arg_advance_32): Ditto.
528         * config/i386/i386.h (VALID_AVX512FP16_REG_MODE): New.
529         (VALID_AVX256_REG_OR_OI_MODE): Rename to ..
530         (VALID_AVX256_REG_OR_OI_VHF_MODE): .. this, and add V16HF.
531         (VALID_SSE2_REG_VHF_MODE): New.
532         (VALID_AVX512VL_128_REG_MODE): Add V8HF and TImode.
533         (SSE_REG_MODE_P): Add vector HFmode.
534         * config/i386/i386.md (mode): Add HF vector modes.
535         (MODE_SIZE): Likewise.
536         (ssemodesuffix): Add ph suffix for HF vector modes.
537         * config/i386/sse.md (VFH_128): New mode iterator.
538         (VMOVE): Adjust for HF vector modes.
539         (V): Likewise.
540         (V_256_512): Likewise.
541         (avx512): Likewise.
542         (avx512fmaskmode): Likewise.
543         (shuffletype): Likewise.
544         (sseinsnmode): Likewise.
545         (ssedoublevecmode): Likewise.
546         (ssehalfvecmode): Likewise.
547         (ssehalfvecmodelower): Likewise.
548         (ssePScmode): Likewise.
549         (ssescalarmode): Likewise.
550         (ssescalarmodelower): Likewise.
551         (sseintprefix): Likewise.
552         (i128): Likewise.
553         (bcstscalarsuff): Likewise.
554         (xtg_mode): Likewise.
555         (VI12HF_AVX512VL): New mode_iterator.
556         (VF_AVX512FP16): Likewise.
557         (VIHF): Likewise.
558         (VIHF_256): Likewise.
559         (VIHF_AVX512BW): Likewise.
560         (V16_256): Likewise.
561         (V32_512): Likewise.
562         (sseintmodesuffix): New mode_attr.
563         (sse): Add scalar and vector HFmodes.
564         (ssescalarmode): Add vector HFmode mapping.
565         (ssescalarmodesuffix): Add sh suffix for HFmode.
566         (*<sse>_vm<insn><mode>3): Use VFH_128.
567         (*<sse>_vm<multdiv_mnemonic><mode>3): Likewise.
568         (*ieee_<ieee_maxmin><mode>3): Likewise.
569         (<avx512>_blendm<mode>): New define_insn.
570         (vec_setv8hf): New define_expand.
571         (vec_set<mode>_0): New define_insn for HF vector set.
572         (*avx512fp16_movsh): Likewise.
573         (avx512fp16_movsh): Likewise.
574         (vec_extract_lo_v32hi): Rename to ...
575         (vec_extract_lo_<mode>): ... this, and adjust to allow HF
576         vector modes.
577         (vec_extract_hi_v32hi): Likewise.
578         (vec_extract_hi_<mode>): Likewise.
579         (vec_extract_lo_v16hi): Likewise.
580         (vec_extract_lo_<mode>): Likewise.
581         (vec_extract_hi_v16hi): Likewise.
582         (vec_extract_hi_<mode>): Likewise.
583         (vec_set_hi_v16hi): Likewise.
584         (vec_set_hi_<mode>): Likewise.
585         (vec_set_lo_v16hi): Likewise.
586         (vec_set_lo_<mode>): Likewise.
587         (*vec_extract<mode>_0): New define_insn_and_split for HF
588         vector extract.
589         (*vec_extracthf): New define_insn.
590         (VEC_EXTRACT_MODE): Add HF vector modes.
591         (PINSR_MODE): Add V8HF.
592         (sse2p4_1): Likewise.
593         (pinsr_evex_isa): Likewise.
594         (<sse2p4_1>_pinsr<ssemodesuffix>): Adjust to support
595         insert for V8HFmode.
596         (pbroadcast_evex_isa): Add HF vector modes.
597         (AVX2_VEC_DUP_MODE): Likewise.
598         (VEC_INIT_MODE): Likewise.
599         (VEC_INIT_HALF_MODE): Likewise.
600         (avx2_pbroadcast<mode>): Adjust to support HF vector mode
601         broadcast.
602         (avx2_pbroadcast<mode>_1): Likewise.
603         (<avx512>_vec_dup<mode>_1): Likewise.
604         (<avx512>_vec_dup<mode><mask_name>): Likewise.
605         (<mask_codefor><avx512>_vec_dup_gpr<mode><mask_name>):
606         Likewise.
607
608 2021-09-08  Guo, Xuepeng  <xuepeng.guo@intel.com>
609             H.J. Lu  <hongjiu.lu@intel.com>
610             Liu Hongtao  <hongtao.liu@intel.com>
611             Wang Hongyu  <hongyu.wang@intel.com>
612             Xu Dianhong  <dianhong.xu@intel.com>
613
614         * common/config/i386/cpuinfo.h (get_available_features):
615         Detect FEATURE_AVX512FP16.
616         * common/config/i386/i386-common.c
617         (OPTION_MASK_ISA_AVX512FP16_SET,
618         OPTION_MASK_ISA_AVX512FP16_UNSET,
619         OPTION_MASK_ISA2_AVX512FP16_SET,
620         OPTION_MASK_ISA2_AVX512FP16_UNSET): New.
621         (OPTION_MASK_ISA2_AVX512BW_UNSET,
622         OPTION_MASK_ISA2_AVX512BF16_UNSET): Add AVX512FP16.
623         (ix86_handle_option): Handle -mavx512fp16.
624         * common/config/i386/i386-cpuinfo.h (enum processor_features):
625         Add FEATURE_AVX512FP16.
626         * common/config/i386/i386-isas.h: Add entry for AVX512FP16.
627         * config.gcc: Add avx512fp16intrin.h.
628         * config/i386/avx512fp16intrin.h: New intrinsic header.
629         * config/i386/cpuid.h: Add bit_AVX512FP16.
630         * config/i386/i386-builtin-types.def: (FLOAT16): New primitive type.
631         * config/i386/i386-builtins.c: Support _Float16 type for i386
632         backend.
633         (ix86_register_float16_builtin_type): New function.
634         (ix86_float16_type_node): New.
635         * config/i386/i386-c.c (ix86_target_macros_internal): Define
636         __AVX512FP16__.
637         * config/i386/i386-expand.c (ix86_expand_branch): Support
638         HFmode.
639         (ix86_prepare_fp_compare_args): Adjust TARGET_SSE_MATH &&
640         SSE_FLOAT_MODE_P to SSE_FLOAT_MODE_SSEMATH_OR_HF_P.
641         (ix86_expand_fp_movcc): Ditto.
642         * config/i386/i386-isa.def: Add PTA define for AVX512FP16.
643         * config/i386/i386-options.c (isa2_opts): Add -mavx512fp16.
644         (ix86_valid_target_attribute_inner_p): Add avx512fp16 attribute.
645         * config/i386/i386.c (ix86_get_ssemov): Use
646         vmovdqu16/vmovw/vmovsh for HFmode/HImode scalar or vector.
647         (ix86_get_excess_precision): Use
648         FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when TARGET_AVX512FP16
649         existed.
650         (sse_store_index): Use SFmode cost for HFmode cost.
651         (inline_memory_move_cost): Add HFmode, and perfer SSE cost over
652         GPR cost for HFmode.
653         (ix86_hard_regno_mode_ok): Allow HImode in sse register.
654         (ix86_mangle_type): Add manlging for _Float16 type.
655         (inline_secondary_memory_needed): No memory is needed for
656         16bit movement between gpr and sse reg under
657         TARGET_AVX512FP16.
658         (ix86_multiplication_cost): Adjust TARGET_SSE_MATH &&
659         SSE_FLOAT_MODE_P to SSE_FLOAT_MODE_SSEMATH_OR_HF_P.
660         (ix86_division_cost): Ditto.
661         (ix86_rtx_costs): Ditto.
662         (ix86_add_stmt_cost): Ditto.
663         (ix86_optab_supported_p): Ditto.
664         * config/i386/i386.h (VALID_AVX512F_SCALAR_MODE): Add HFmode.
665         (SSE_FLOAT_MODE_SSEMATH_OR_HF_P): Add HFmode.
666         (PTA_SAPPHIRERAPIDS): Add PTA_AVX512FP16.
667         * config/i386/i386.md (mode): Add HFmode.
668         (MODE_SIZE): Add HFmode.
669         (isa): Add avx512fp16.
670         (enabled): Handle avx512fp16.
671         (ssemodesuffix): Add sh suffix for HFmode.
672         (comm): Add mult, div.
673         (plusminusmultdiv): New code iterator.
674         (insn): Add mult, div.
675         (*movhf_internal): Adjust for avx512fp16 instruction.
676         (*movhi_internal): Ditto.
677         (*cmpi<unord>hf): New define_insn for HFmode.
678         (*ieee_s<ieee_maxmin>hf3): Likewise.
679         (extendhf<mode>2): Likewise.
680         (trunc<mode>hf2): Likewise.
681         (float<floatunssuffix><mode>hf2): Likewise.
682         (*<insn>hf): Likewise.
683         (cbranchhf4): New expander.
684         (movhfcc): Likewise.
685         (<insn>hf3): Likewise.
686         (mulhf3): Likewise.
687         (divhf3): Likewise.
688         * config/i386/i386.opt: Add mavx512fp16.
689         * config/i386/immintrin.h: Include avx512fp16intrin.h.
690         * doc/invoke.texi: Add mavx512fp16.
691         * doc/extend.texi: Add avx512fp16 Usage Notes.
692
693 2021-09-08  liuhongt  <hongtao.liu@intel.com>
694
695         * common.opt: Support -fexcess-precision=16.
696         * config/aarch64/aarch64.c (aarch64_excess_precision): Return
697         FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when
698         EXCESS_PRECISION_TYPE_FLOAT16.
699         * config/arm/arm.c (arm_excess_precision): Ditto.
700         * config/i386/i386.c (ix86_get_excess_precision): Ditto.
701         * config/m68k/m68k.c (m68k_excess_precision): Issue an error
702         when EXCESS_PRECISION_TYPE_FLOAT16.
703         * config/s390/s390.c (s390_excess_precision): Ditto.
704         * coretypes.h (enum excess_precision_type): Add
705         EXCESS_PRECISION_TYPE_FLOAT16.
706         * doc/tm.texi (TARGET_C_EXCESS_PRECISION): Update documents.
707         * doc/tm.texi.in (TARGET_C_EXCESS_PRECISION): Ditto.
708         * doc/extend.texi (Half-Precision): Document
709         -fexcess-precision=16.
710         * flag-types.h (enum excess_precision): Add
711         EXCESS_PRECISION_FLOAT16.
712         * target.def (excess_precision): Update document.
713         * tree.c (excess_precision_type): Set excess_precision_type to
714         EXCESS_PRECISION_FLOAT16 when -fexcess-precision=16.
715
716 2021-09-08  liuhongt  <hongtao.liu@intel.com>
717
718         * doc/extend.texi: (@node Floating Types): Adjust the wording.
719         (@node Half-Precision): Ditto.
720
721 2021-09-07  Takayuki 'January June' Suwa  <jjsuwa_sys3175@yahoo.co.jp>
722
723         PR target/102115
724         * config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add
725         'CONST_INT_P (src)' to the condition of the block that tries to
726         eliminate literal when loading integer contant.
727
728 2021-09-07  David Faust  <david.faust@oracle.com>
729
730         * doc/extend.texi (BPF Type Attributes) New node.
731         Document new preserve_access_index attribute.
732         Document new preserve_access_index builtin.
733         * doc/invoke.texi: Document -mco-re and -mno-co-re options.
734
735 2021-09-07  David Faust  <david.faust@oracle.com>
736
737         * config/bpf/bpf.c: Adjust includes.
738         (bpf_handle_preserve_access_index_attribute): New function.
739         (bpf_attribute_table): Use it here.
740         (bpf_builtins): Add BPF_BUILTIN_PRESERVE_ACCESS_INDEX.
741         (bpf_option_override): Handle "-mco-re" option.
742         (bpf_asm_init_sections): New.
743         (TARGET_ASM_INIT_SECTIONS): Redefine.
744         (bpf_file_end): New.
745         (TARGET_ASM_FILE_END): Redefine.
746         (bpf_init_builtins): Add "__builtin_preserve_access_index".
747         (bpf_core_compute, bpf_core_get_index): New.
748         (is_attr_preserve_access): New.
749         (bpf_expand_builtin): Handle new builtins.
750         (bpf_core_newdecl, bpf_core_is_maybe_aggregate_access): New.
751         (bpf_core_walk): New.
752         (bpf_resolve_overloaded_builtin): New.
753         (TARGET_RESOLVE_OVERLOADED_BUILTIN): Redefine.
754         (handle_attr): New.
755         (pass_bpf_core_attr): New RTL pass.
756         * config/bpf/bpf-passes.def: New file.
757         * config/bpf/bpf-protos.h (make_pass_bpf_core_attr): New.
758         * config/bpf/coreout.c: New file.
759         * config/bpf/coreout.h: Likewise.
760         * config/bpf/t-bpf (TM_H): Add $(srcdir)/config/bpf/coreout.h.
761         (coreout.o): New rule.
762         (PASSES_EXTRA): Add $(srcdir)/config/bpf/bpf-passes.def.
763         * config.gcc (bpf): Add coreout.h to extra_headers.
764         Add coreout.o to extra_objs.
765         Add $(srcdir)/config/bpf/coreout.c to target_gtfiles.
766
767 2021-09-07  David Faust  <david.faust@oracle.com>
768
769         * btfout.c (get_btf_id): Function is no longer static.
770         * ctfc.h: Expose it here.
771
772 2021-09-07  David Faust  <david.faust@oracle.com>
773
774         * ctfc.c (ctf_lookup_tree_type): New function.
775         * ctfc.h: Likewise.
776
777 2021-09-07  David Faust  <david.faust@oracle.com>
778
779         * ctfc.c (ctf_dtd_lookup): Function is no longer static.
780         * ctfc.h: Analogous change.
781
782 2021-09-07  David Faust  <david.faust@oracle.com>
783
784         * dwarf2out.c (lookup_type_die): Function is no longer static.
785         * dwarf2out.h: Expose it here.
786
787 2021-09-07  Indu Bhagat  <indu.bhagat@oracle.com>
788
789         * dwarf2ctf.c (ctf_debug_finalize): Make it static.
790         (ctf_debug_early_finish): New definition.
791         (ctf_debug_finish): Likewise.
792         * dwarf2ctf.h (ctf_debug_finalize): Remove declaration.
793         (ctf_debug_early_finish): New declaration.
794         (ctf_debug_finish): Likewise.
795         * dwarf2out.c (dwarf2out_finish): Invoke ctf_debug_finish.
796         (dwarf2out_early_finish): Invoke ctf_debug_early_finish.
797
798 2021-09-07  Indu Bhagat  <indu.bhagat@oracle.com>
799
800         * config/bpf/bpf.c (bpf_option_override): For BPF backend, disable LTO
801         support when compiling for CO-RE.
802         * config/bpf/bpf.opt: Add new command line option -mco-re.
803
804 2021-09-07  Indu Bhagat  <indu.bhagat@oracle.com>
805
806         * flag-types.h (enum debug_info_type): Add new enum
807         DINFO_TYPE_BTF_WITH_CORE.
808         (BTF_WITH_CORE_DEBUG): New bitmask.
809         * flags.h (btf_with_core_debuginfo_p): New declaration.
810         * opts.c (btf_with_core_debuginfo_p): New definition.
811
812 2021-09-07  Jason Merrill  <jason@redhat.com>
813
814         * tree.h (error_operand_p): Change to inline function.
815
816 2021-09-07  Aldy Hernandez  <aldyh@redhat.com>
817
818         * tree-ssa-threadedge.c (forwarder_block_p): Rename to...
819         (empty_block_with_phis_p): ...this.
820         (potentially_threadable_block): Same.
821         (jump_threader::thread_through_normal_block): Same.
822
823 2021-09-07  Eric Botcazou  <ebotcazou@adacore.com>
824
825         PR debug/101947
826         * dwarf2out.c (mark_base_types): New overloaded function.
827         (dwarf2out_early_finish): Invoke it on the COMDAT type list as well
828         as the compilation unit, and call move_marked_base_types afterward.
829
830 2021-09-07  H.J. Lu  <hjl.tools@gmail.com>
831
832         PR target/85819
833         * config/i386/i386-expand.c (ix86_expand_convert_uns_sisf_sse):
834         Enable FMA.
835         (ix86_expand_vector_convert_uns_vsivsf): Likewise.
836
837 2021-09-07  Richard Biener  <rguenther@suse.de>
838
839         PR tree-optimization/102226
840         * tree-vect-loop.c (vect_transform_cycle_phi): Record
841         the converted value for the epilogue PHI use.
842
843 2021-09-07  Martin Liska  <mliska@suse.cz>
844
845         PR gcov-profile/80223
846         * ipa-inline.c (can_inline_edge_p): Similarly to sanitizer
847         options, do not inline when no_profile_instrument_function
848         attributes are different in early inliner. It's fine to inline
849         it after PGO instrumentation.
850
851 2021-09-07  Richard Biener  <rguenther@suse.de>
852
853         PR tree-optimization/101555
854         * tree-ssa-pre.c (translate_vuse_through_block): Do not
855         perform an alias walk to determine the validity of the
856         mem at the start of the block which is already guaranteed
857         by means of prune_clobbered_mems.
858         (phi_translate_1): Pass edge to translate_vuse_through_block.
859
860 2021-09-07  Xionghu Luo  <luoxhu@linux.ibm.com>
861
862         PR target/97142
863         * config/rs6000/rs6000.md (fmod<mode>3): New define_expand.
864         (remainder<mode>3): Likewise.
865
866 2021-09-07  YunQiang Su  <yunqiang.su@cipunited.com>
867
868         * config/mips/mips.c (mips_file_start): add .module for
869           arch and ase.
870
871 2021-09-06  Roger Sayle  <roger@nextmovesoftware.com>
872
873         * wide-int.cc (wi::clz): Reorder tests to ensure the result
874         is zero for all negative values.
875
876 2021-09-06  Tobias Burnus  <tobias@codesourcery.com>
877
878         * doc/invoke.texi (-foffload-options): Fix @opindex.
879
880 2021-09-06  H.J. Lu  <hjl.tools@gmail.com>
881
882         PR target/89984
883         * config/i386/i386-expand.c (ix86_split_xorsign): Use operands[2].
884         * config/i386/i386.md (@xorsign<mode>3_1): Add non-destructive
885         source alternative for AVX.
886
887 2021-09-06  liuhongt  <hongtao.liu@intel.com>
888
889         PR middle-end/102182
890         * optabs.c (expand_fix): Add from1 to avoid from being
891         overwritten.
892
893 2021-09-06  Eric Botcazou  <ebotcazou@adacore.com>
894
895         * dwarf2out.c (modified_type_die): Deal with all array types earlier
896         and use local variable consistently throughout the function.
897
898 2021-09-06  Jakub Jelinek  <jakub@redhat.com>
899
900         PR tree-optimization/102207
901         * match.pd: Don't demote operands of IFN_{ADD,SUB,MUL}_OVERFLOW if they
902         were promoted from signed to wider unsigned type.
903
904 2021-09-06  Andrew Pinski  <apinski@marvell.com>
905
906         PR tree-optimization/63184
907         * match.pd: Add simplification of pointer_diff of two pointer_plus
908         with addr_expr in the first operand of each pointer_plus.
909         Add simplificatoin of ne/eq of two pointer_plus with addr_expr
910         in the first operand of each pointer_plus.
911
912 2021-09-06  Richard Biener  <rguenther@suse.de>
913
914         PR tree-optimization/102176
915         * tree-vect-slp.c (vect_slp_gather_vectorized_scalar_stmts):
916         New function.
917         (vect_bb_slp_scalar_cost): Use the computed set of
918         vectorized scalar stmts instead of relying on the out-of-date
919         and not accurate PURE_SLP_STMT.
920         (vect_bb_vectorization_profitable_p): Compute the set
921         of vectorized scalar stmts.
922
923 2021-09-05  Aldy Hernandez  <aldyh@redhat.com>
924
925         * gimple-range-path.cc (path_range_query::range_of_stmt): Remove
926         GIMPLE_COND special casing.
927         (path_range_query::range_defined_in_block): Use range_of_stmt
928         instead of calling fold_range directly.
929
930 2021-09-05  Aldy Hernandez  <aldyh@redhat.com>
931
932         * gimple-range-path.cc (path_range_query::range_of_expr): Set
933         m_undefined_path when appropriate.
934         (path_range_query::internal_range_of_expr): Copy from range_of_expr.
935         (path_range_query::unreachable_path_p): New.
936         (path_range_query::precompute_ranges): Set m_undefined_path.
937         * gimple-range-path.h (path_range_query::unreachable_path_p): New.
938         (path_range_query::internal_range_of_expr): New.
939         * tree-ssa-threadbackward.c (back_threader::find_taken_edge_cond):
940         Use unreachable_path_p.
941
942 2021-09-05  Aldy Hernandez  <aldyh@redhat.com>
943
944         * tree-ssa-threadbackward.c (back_threader::maybe_register_path):
945         Remove argument and call find_taken_edge.
946         (back_threader::resolve_phi): Do not calculate taken edge before
947         calling maybe_register_path.
948         (back_threader::find_paths_to_names): Same.
949
950 2021-09-05  Jeff Law  <jlaw@localhost.localdomain>
951
952         * config/h8300/h8300.md (QHSI2 mode iterator): New mode iterator.
953         * config/h8300/testcompare.md (store_c): Update name, use new
954         QHSI2 iterator.
955         (store_neg_c, store_shifted_c): New patterns.
956
957 2021-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
958
959         PR target/102107
960         * config/rs6000/rs6000-logue.c (rs6000_emit_prologue): On ELFv2 use r11
961         instead of r12 for CR save, in all cases.
962
963 2021-09-03  Andrew Pinski  <apinski@marvell.com>
964
965         * config/aarch64/aarch64-sve-builtins.cc (register_vector_type):
966         Handle error_mark_node as the type of the type_decl.
967
968 2021-09-03  Andrew Pinski  <apinski@marvell.com>
969
970         * config/aarch64/aarch64-builtins.c (struct aarch64_simd_type_info):
971         Mark with GTY.
972         (aarch64_simd_types): Likewise.
973         (aarch64_simd_intOI_type_node): Likewise.
974         (aarch64_simd_intCI_type_node): Likewise.
975         (aarch64_simd_intXI_type_node): Likewise.
976         * config/aarch64/aarch64.h (aarch64_fp16_type_node): Likewise.
977         (aarch64_fp16_ptr_type_node): Likewise.
978         (aarch64_bf16_type_node): Likewise.
979         (aarch64_bf16_ptr_type_node): Likewise.
980
981 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
982
983         * range-op.cc (operator_minus::op1_op2_relation_effect): Abstract
984         out to...
985         (minus_op1_op2_relation_effect): ...here.
986         (class operator_pointer_diff): New.
987         (operator_pointer_diff::op1_op2_relation_effect): Call
988         minus_op1_op2_relation_effect.
989         (integral_table::integral_table): Add entry for POINTER_DIFF_EXPR.
990
991 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
992
993         * tree-ssa-threadbackward.c (back_threader::thread_through_all_blocks):
994         Add may_peel_loop_headers.
995         (back_threader_registry::thread_through_all_blocks): Same.
996         (try_thread_blocks): Pass may_peel_loop_headers argument.
997         (pass_early_thread_jumps::execute): Same.
998
999 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1000
1001         * tree-ssa-threadedge.c (has_phis_p): New.
1002         (forwarder_block_p): New.
1003         (potentially_threadable_block): Call forwarder_block_p.
1004         (jump_threader::thread_around_empty_blocks): Call has_phis_p.
1005         (jump_threader::thread_through_normal_block): Call
1006         forwarder_block_p.
1007
1008 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1009
1010         * tree-ssa-threadbackward.c (back_threader::dump): New.
1011         (back_threader::debug): New.
1012         (back_threader_profitability::profitable_path_p): Dump blocks
1013         even if we are bailing early.
1014
1015 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1016
1017         * tree-ssa-threadupdate.c (cancel_thread): New.
1018         (jump_thread_path_registry::thread_block_1): Use cancel_thread.
1019         (jump_thread_path_registry::mark_threaded_blocks): Same.
1020         (jump_thread_path_registry::register_jump_thread): Same.
1021
1022 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1023
1024         * tree-ssa-threadedge.c (jt_state::push): Only call methods for
1025         which objects are available.
1026         (jt_state::pop): Same.
1027         (jt_state::register_equiv): Same.
1028         (jt_state::register_equivs_on_edge): Same.
1029
1030 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1031
1032         * tree-ssa-threadedge.c (jump_threader::thread_across_edge):
1033         Move pop until after a thread is registered.
1034
1035 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1036
1037         * tree-ssa-threadupdate.c (debug): New.
1038
1039 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1040
1041         * gimple-range-trace.cc (push_dump_file::push_dump_file): New.
1042         (push_dump_file::~push_dump_file): New.
1043         (dump_ranger): Change dump_file temporarily while dumping
1044         ranger.
1045         * gimple-range-trace.h (class push_dump_file): New.
1046
1047 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1048
1049         * gimple-range-trace.cc (debug_seed_ranger): Remove static.
1050         (dump_ranger): Dump function name.
1051
1052 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1053
1054         * gimple-range-path.cc (path_range_query::range_defined_in_block):
1055         Adjust for non-null.
1056         (path_range_query::adjust_for_non_null_uses): New.
1057         (path_range_query::precompute_ranges): Call
1058         adjust_for_non_null_uses.
1059         * gimple-range-path.h: Add m_non_null and
1060         adjust_for_non_null_uses.
1061
1062 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1063
1064         * gimple-range-path.cc (path_range_query::dump): Dump path
1065         length.
1066         (path_range_query::precompute_ranges): Dump entire path.
1067
1068 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1069
1070         * value-relation.cc (relation_oracle::debug): New.
1071         * value-relation.h (relation_oracle::debug): New.
1072
1073 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1074
1075         * tree-ssa-loop-ch.c: Remove unnecessary include file.
1076
1077 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1078
1079         * gimple-range-fold.cc (fold_using_range::postfold_gcond_edges):
1080         Skip statements with no defining BB.
1081         * gimple-range-path.cc (path_range_query::range_defined_in_block):
1082         Do not get confused by statements with no defining BB.
1083
1084 2021-09-03  Aldy Hernandez  <aldyh@redhat.com>
1085
1086         * gimple-range-fold.cc (adjust_imagpart_expr): Move from
1087         gimple_range_adjustment.  Add support for constants.
1088         (adjust_realpart_expr): New.
1089         (gimple_range_adjustment): Move IMAGPART_EXPR code to
1090         adjust_imagpart_expr.
1091         * range-op.cc (integral_table::integral_table): Add entry for
1092         REALPART_CST.
1093
1094 2021-09-03  Jakub Jelinek  <jakub@redhat.com>
1095
1096         * omp-expand.c (expand_omp_atomic_pipeline): Use
1097         IFN_ATOMIC_COMPARE_EXCHANGE instead of
1098         BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_? so that memory order
1099         can be provided.
1100
1101 2021-09-03  Jakub Jelinek  <jakub@redhat.com>
1102
1103         PR target/102024
1104         * tree.h (DECL_FIELD_ABI_IGNORED): Changed into rvalue only macro
1105         that is false if DECL_BIT_FIELD.
1106         (SET_DECL_FIELD_ABI_IGNORED, DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD,
1107         SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD): Define.
1108         * tree-streamer-out.c (pack_ts_decl_common_value_fields): For
1109         DECL_BIT_FIELD stream DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD instead
1110         of DECL_FIELD_ABI_IGNORED.
1111         * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
1112         SET_DECL_FIELD_ABI_IGNORED instead of writing to
1113         DECL_FIELD_ABI_IGNORED and for DECL_BIT_FIELD use
1114         SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD instead.
1115         * lto-streamer-out.c (hash_tree): For DECL_BIT_FIELD hash
1116         DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD instead of DECL_FIELD_ABI_IGNORED.
1117
1118 2021-09-03  liuhongt  <hongtao.liu@intel.com>
1119
1120         PR target/102166
1121         * config/i386/amxbf16intrin.h : Remove macro check for __AMX_BF16__.
1122         * config/i386/amxint8intrin.h : Remove macro check for __AMX_INT8__.
1123         * config/i386/amxtileintrin.h : Remove macro check for __AMX_TILE__.
1124
1125 2021-09-02  Martin Sebor  <msebor@redhat.com>
1126
1127         PR tree-optimization/17506
1128         PR testsuite/37182
1129         * tree-ssa-uninit.c (warn_uninit): Remove conditional guarding note.
1130
1131 2021-09-02  Richard Biener  <rguenther@suse.de>
1132
1133         * tree-ssa-loop-im.c (fill_always_executed_in_1): Refine
1134         fix for PR78185 and continue processing when leaving
1135         finite inner loops.
1136
1137 2021-09-02  Jakub Jelinek  <jakub@redhat.com>
1138
1139         PR tree-optimization/99591
1140         * match.pd: Demote operands of IFN_{ADD,SUB,MUL}_OVERFLOW if they
1141         were promoted.
1142
1143 2021-09-02  Richard Biener  <rguenther@suse.de>
1144
1145         Revert:
1146         2021-09-02  Richard Biener  <rguenther@suse.de>
1147
1148         PR tree-optimization/102155
1149         * tree-ssa-loop-im.c (fill_always_executed_in_1): Iterate
1150         over a part of the RPO array and do not recurse here.
1151         Dump blocks marked as always executed.
1152         (fill_always_executed_in): Walk over the RPO array and
1153         process loops whose header we run into.
1154         (loop_invariant_motion_in_fun): Compute the first RPO
1155         using rev_post_order_and_mark_dfs_back_seme in iteration
1156         order and pass that to fill_always_executed_in.
1157
1158 2021-09-02  liuhongt  <hongtao.liu@intel.com>
1159
1160         * config/i386/i386-modes.def (FLOAT_MODE): Define ieee HFmode.
1161         * config/i386/i386.c (enum x86_64_reg_class): Add
1162         X86_64_SSEHF_CLASS.
1163         (merge_classes): Handle X86_64_SSEHF_CLASS.
1164         (examine_argument): Ditto.
1165         (construct_container): Ditto.
1166         (classify_argument): Ditto, and set HFmode/HCmode to
1167         X86_64_SSEHF_CLASS.
1168         (function_value_32): Return _FLoat16/Complex Float16 by
1169         %xmm0.
1170         (function_value_64): Return _Float16/Complex Float16 by SSE
1171         register.
1172         (ix86_print_operand): Handle CONST_DOUBLE HFmode.
1173         (ix86_secondary_reload): Require gpr as intermediate register
1174         to store _Float16 from sse register when sse4 is not
1175         available.
1176         (ix86_libgcc_floating_mode_supported_p): Enable _FLoat16 under
1177         sse2.
1178         (ix86_scalar_mode_supported_p): Ditto.
1179         (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Defined.
1180         * config/i386/i386.h (VALID_SSE2_REG_MODE): Add HFmode.
1181         (VALID_INT_MODE_P): Add HFmode and HCmode.
1182         * config/i386/i386.md (*pushhf_rex64): New define_insn.
1183         (*pushhf): Ditto.
1184         (*movhf_internal): Ditto.
1185         * doc/extend.texi (Half-Precision Floating Point): Documemt
1186         _Float16 for x86.
1187
1188 2021-09-02  Richard Biener  <rguenther@suse.de>
1189
1190         PR tree-optimization/102155
1191         * tree-ssa-loop-im.c (fill_always_executed_in_1): Iterate
1192         over a part of the RPO array and do not recurse here.
1193         Dump blocks marked as always executed.
1194         (fill_always_executed_in): Walk over the RPO array and
1195         process loops whose header we run into.
1196         (loop_invariant_motion_in_fun): Compute the first RPO
1197         using rev_post_order_and_mark_dfs_back_seme in iteration
1198         order and pass that to fill_always_executed_in.
1199
1200 2021-09-02  YunQiang Su  <syq@debian.org>
1201
1202         Revert:
1203         2021-08-31  YunQiang Su  <yunqiang.su@cipunited.com>
1204
1205         * config/mips/mips.c (mips_module_isa_name): New.
1206           mips_file_start: add .module mipsREV to all asm output
1207
1208 2021-09-01  Jeff Law  <jlaw@localhost.localdomain>
1209
1210         PR tree-optimization/102152
1211         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Reduce a vector
1212         comparison to a scalar comparison before calling
1213         update_stmt_if_modified.
1214
1215 2021-09-01  Andrew Pinski  <apinski@marvell.com>
1216
1217         PR target/101934
1218         * config/aarch64/aarch64.c (aarch64_expand_setmem):
1219         Check STRICT_ALIGNMENT before creating an overlapping
1220         store.
1221
1222 2021-09-01  Martin Sebor  <msebor@redhat.com>
1223
1224         * gimple-ssa-warn-access.cc (get_size_range): Add argument.
1225         (check_access): Pass additional argument.
1226         (check_memop_access): Remove template and make a member function.
1227         (maybe_check_dealloc_call): Make a pass_waccess member function.
1228         (class pass_waccess): Add, rename, and remove members.
1229         (pass_waccess::pass_waccess): Adjust to name change.
1230         (pass_waccess::~pass_waccess): Same.
1231         (check_alloca): Make a member function.
1232         (check_alloc_size_call): Same.
1233         (check_strcat): Same.
1234         (check_strncat): Same.
1235         (check_stxcpy): Same.
1236         (check_stxncpy): Same.
1237         (check_strncmp): Same.
1238         (maybe_warn_rdwr_sizes): Rename...
1239         (pass_waccess::maybe_check_access_sizes): ...to this.
1240         (pass_waccess::check_call): Adjust to name changes.
1241         (pass_waccess::maybe_check_dealloc_call): Make a pass_waccess member
1242         function.
1243         (pass_waccess::execute): Adjust to name changes.
1244         * gimple-ssa-warn-access.h (check_memop_access): Remove.
1245         * pointer-query.cc (access_ref::phi): Handle null pointer.
1246         (access_ref::inform_access): Same.
1247         (pointer_query::put_ref): Modify a cached value, not a copy of it.
1248         (pointer_query::dump): New function.
1249         (compute_objsize_r): Avoid overwriting access_ref::bndrng.  Cache
1250         more results.
1251         * pointer-query.h (pointer_query::dump): Declare.
1252         * tree-ssa-strlen.c (get_range): Simplify.  Use function query.
1253         (dump_strlen_info): Use function query.
1254         (printf_strlen_execute): Factor code out into pointer_query::put_ref.
1255
1256 2021-09-01  Thomas Schwinge  <thomas@codesourcery.com>
1257
1258         * tree.c (walk_tree_1) <OMP_CLAUSE>: Simplify.
1259
1260 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
1261
1262         * doc/extend.texi: Document unavailable attribute.
1263         * print-tree.c (print_node): Handle unavailable attribute.
1264         * tree-core.h (struct tree_base): Add a bit to carry unavailability.
1265         * tree.c (error_unavailable_use): New.
1266         * tree.h (TREE_UNAVAILABLE): New.
1267         (error_unavailable_use): New.
1268
1269 2021-09-01  Jakub Jelinek  <jakub@redhat.com>
1270
1271         PR tree-optimization/102124
1272         * tree-vect-patterns.c (vect_recog_widen_op_pattern): For ORIG_CODE
1273         MINUS_EXPR, if itype is unsigned with smaller precision than type,
1274         add an extra cast to signed variant of itype to ensure sign-extension.
1275
1276 2021-09-01  Martin Liska  <mliska@suse.cz>
1277
1278         * graph.c (draw_cfg_node_succ_edges): Do not color fallthru
1279           edges and rather use colors for TRUE and FALSE edges.
1280
1281 2021-09-01  Richard Biener  <rguenther@suse.de>
1282
1283         PR tree-optimization/93491
1284         * tree-ssa-pre.c (compute_avail): Set BB_MAY_NOTRETURN
1285         after processing the stmt itself.  Do not consider
1286         pure functions possibly not returning.  Properly avoid
1287         adding possibly trapping calls to EXP_GEN when there's
1288         a preceeding possibly not returning call.
1289         * tree-ssa-sccvn.c (vn_reference_may_trap): Conservatively
1290         not handle calls.
1291
1292 2021-09-01  Richard Biener  <rguenther@suse.de>
1293
1294         PR tree-optimization/102139
1295         * tree-vectorizer.h (vec_base_alignments): Adjust hash-map
1296         type to record a std::pair of the stmt-info and the innermost
1297         loop behavior.
1298         (dr_vec_info::group): New member.
1299         * tree-vect-data-refs.c (vect_record_base_alignment): Adjust.
1300         (vect_compute_data_ref_alignment): Verify the recorded
1301         base alignment can be used.
1302         (data_ref_pair): Remove.
1303         (dr_group_sort_cmp): Adjust.
1304         (vect_analyze_data_ref_accesses): Store the group-ID in the
1305         dr_vec_info and operate on a vector of dr_vec_infos.
1306
1307 2021-09-01  YunQiang Su  <yunqiang.su@cipunited.com>
1308
1309         * read-md.c (md_reader::handle_enum): support value assignation.
1310         * doc/md.texi: record define_c_enum value assignation support.
1311
1312 2021-09-01  Jakub Jelinek  <jakub@redhat.com>
1313
1314         PR tree-optimization/102141
1315         * gimple-ssa-store-merging.c (bswap_view_convert): Add BEFORE
1316         argument.  If false, emit stmts after gsi instead of before, and
1317         with GSI_NEW_STMT.
1318         (bswap_replace): Adjust callers.  When converting output of bswap,
1319         emit VIEW_CONVERT prepratation stmts after a copy of gsi instead
1320         of before it.
1321
1322 2021-09-01  liuhongt  <hongtao.liu@intel.com>
1323
1324         * emit-rtl.c (validate_subreg): Get rid of all float-int
1325         special cases.
1326
1327 2021-09-01  liuhongt  <hongtao.liu@intel.com>
1328
1329         Revert:
1330         2021-08-30  liuhongt  <hongtao.liu@intel.com>
1331
1332         * expmed.c (extract_bit_field_1): Make sure we're playing with
1333         integral modes before call extract_integral_bit_field.
1334         (extract_integral_bit_field): Add a parameter of type
1335         scalar_int_mode which corresponds to of tmode.
1336         And call extract_and_convert_fixed_bit_field instead of
1337         extract_fixed_bit_field and convert_extracted_bit_field.
1338         (extract_and_convert_fixed_bit_field): New function, it's a
1339         combination of extract_fixed_bit_field and
1340         convert_extracted_bit_field.
1341
1342 2021-08-31  Thomas Schwinge  <thomas@codesourcery.com>
1343
1344         * tree.c (walk_tree_1) <OMP_CLAUSE_TILE>: Handle three operands.
1345
1346 2021-08-31  Thomas Schwinge  <thomas@codesourcery.com>
1347
1348         * omp-general.h (omp_is_reference): Rename to...
1349         (omp_privatize_by_reference): ... this.  Adjust all users...
1350         * omp-general.c: ... here, ...
1351         * gimplify.c: ... here, ...
1352         * omp-expand.c: ... here, ...
1353         * omp-low.c: ... here.
1354
1355 2021-08-31  Martin Sebor  <msebor@redhat.com>
1356
1357         * gimple-ssa-warn-access.cc (maybe_warn_alloc_args_overflow): Test
1358         pointer element for equality to zero, not that of the cotaining
1359         array.
1360
1361 2021-08-31  Martin Sebor  <msebor@redhat.com>
1362
1363         * gcc-rich-location.h (gcc_rich_location): Make ctor explicit.
1364
1365 2021-08-31  Martin Sebor  <msebor@redhat.com>
1366
1367         * function.h (function): Add comments.
1368         (get_range_query): Same.  Add attribute returns nonnull.
1369
1370 2021-08-31  Roger Sayle  <roger@nextmovesoftware.com>
1371
1372         * expr.c (convert_modes): Don't use subreg_promoted_mode on a
1373         SUBREG if it can't be guaranteed to a SUBREG_PROMOTED_VAR_P set.
1374         Instead use the standard (safer) is_a <scalar_int_mode> idiom.
1375
1376 2021-08-31  Jeff Law  <jlaw@localhost.localdomain>
1377
1378         * config.gcc (cris-*-elf, cris-*-none): Remove dbxelf.h from
1379         tm_file.
1380         (m32r-*-elf, m32rle-*-elf, m32r-*-linux): Likewise.
1381         (mn10300-*-*, am33_2.0-*-linux*): Likewise.
1382         (xtensa*-*-elf, xtensa*-*-linux, xtensa*-*-uclinux): Likewise.
1383         (m32c-*-elf*, m32c-*-rtems*): Likewise.
1384         * config/cris/cris.h (DBX_NO_XREFS): Remove.
1385         (DBX_CONTIN_LENGTH, DBX_CONTIN_CHAR): Likewise.
1386         * config/m32r/m32r.h (DBXOUT_SOURCE_LINE): Likewise.
1387         (DBX_DEBUGGING_INFO, DBX_CONTIN_LENGTH): Likewise.
1388         * config/mn10300/mn10300.h (DEFAULT_GDB_EXTENSIONS): Likewise.
1389         * config/mn10300/linux.h (DBX_REGISTER_NAMES): Likewise.
1390
1391 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
1392
1393         * gimplify.c (gimplify_scan_omp_clauses): Error handling. 'ancestor' only
1394         allowed on target constructs and only with particular other clauses.
1395         * omp-expand.c (expand_omp_target): Output of 'sorry, not supported' if
1396         'ancestor' is used.
1397         * omp-low.c (check_omp_nesting_restrictions): Error handling. No nested OpenMP
1398         structs when 'ancestor' is used.
1399         (scan_omp_1_stmt): No usage of OpenMP runtime routines in a target region when
1400         'ancestor' is used.
1401         * tree-pretty-print.c (dump_omp_clause): Append 'ancestor'.
1402         * tree.h (OMP_CLAUSE_DEVICE_ANCESTOR): Define macro.
1403
1404 2021-08-31  Roger Sayle  <roger@nextmovesoftware.com>
1405
1406         * expr.c (convert_modes): Preserve SUBREG_PROMOTED_VAR_P when
1407         creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P
1408         subreg.
1409         * simplify-rtx.c (simplify_unary_operation_1) [SIGN_EXTEND]:
1410         Likewise, preserve SUBREG_PROMOTED_VAR_P when creating a (wider)
1411         partial subreg from a SUBREG_PROMOTED_VAR_P subreg.  Generate
1412         SIGN_EXTEND of the SUBREG_REG when a subreg would be paradoxical.
1413         [ZERO_EXTEND]: Likewise, preserve SUBREG_PROMOTED_VAR_P when
1414         creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P
1415         subreg.  Generate ZERO_EXTEND of the SUBREG_REG when a subreg
1416         would be paradoxical.
1417
1418 2021-08-31  Roger Sayle  <roger@nextmovesoftware.com>
1419
1420         * combine.c (combine_simplify_rtx): Avoid converting an explicit
1421         TRUNCATE into a lowpart SUBREG on !TRULY_NOOP_TRUNCATION targets.
1422         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
1423
1424 2021-08-31  Richard Biener  <rguenther@suse.de>
1425
1426         PR tree-optimization/102142
1427         * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Fix
1428         condition under which to unset the visited flag.
1429
1430 2021-08-31  Richard Biener  <rguenther@suse.de>
1431
1432         PR middle-end/102129
1433         * tree-ssa-ter.c (find_replaceable_in_bb): Do not move
1434         possibly trapping expressions across calls.
1435
1436 2021-08-31  Jakub Jelinek  <jakub@redhat.com>
1437
1438         PR tree-optimization/102134
1439         * tree-ssa-ccp.c (bit_value_binop) <case RSHIFT_EXPR>: If sgn is
1440         UNSIGNED and r1val | r1mask has MSB set, ensure lzcount doesn't
1441         become negative.
1442
1443 2021-08-31  Andrew Pinski  <apinski@marvell.com>
1444
1445         PR driver/79181
1446         * collect-utils.c (setup_signals): New declaration.
1447         * collect-utils.h (setup_signals): New function.
1448         * collect2.c (handler): Delete.
1449         (main): Instead of manually setting up the signals,
1450         just call setup_signals.
1451         * lto-wrapper.c (main): Likewise.
1452
1453 2021-08-31  Andrew Pinski  <apinski@marvell.com>
1454
1455         PR target/56337
1456         * config/i386/i386-protos.h (x86_output_aligned_bss):
1457         Change align argument to unsigned type.
1458         (x86_elf_aligned_decl_common): Likewise.
1459         * config/i386/i386.c (x86_elf_aligned_decl_common): Likewise.
1460         (x86_output_aligned_bss): Likewise.
1461
1462 2021-08-31  YunQiang Su  <yunqiang.su@cipunited.com>
1463
1464         * config/mips/mips.c (mips_module_isa_name): New.
1465           mips_file_start: add .module mipsREV to all asm output
1466
1467 2021-08-31  YunQiang Su  <yunqiang.su@cipunited.com>
1468
1469         * config/mips/mips.h (struct mips_cpu_info): define enum mips_isa;
1470           use enum instead of int for 'isa' member.
1471         * config.gcc, config/mips/mips.c, config/mips/mips-cpus.def,
1472           config/mips/netbsd.h: replace hardcoded numbers with enum.
1473
1474 2021-08-31  liuhongt  <hongtao.liu@intel.com>
1475
1476         * config/i386/sse.md (*<avx512>_ucmp<mode>3_1): Change from
1477         define_split to define_insn_and_split.
1478         (*avx2_eq<mode>3): Removed.
1479         (<avx512>_eq<mode>3<mask_scalar_merge_name>): Adjust pattern
1480         (<avx512>_eq<mode>3<mask_scalar_merge_name>_1): Rename to ..
1481         (*<avx512>_eq<mode>3<mask_scalar_merge_name>_1): .. this, and
1482         adjust pattern.
1483         (*avx2_gt<mode>3): Removed.
1484         (<avx512>_gt<mode>3<mask_scalar_merge_name>): Change from
1485         define_insn to define_expand, and adjust pattern.
1486         (UNSPEC_MASKED_EQ, UNSPEC_MASKED_GT): Removed.
1487
1488 2021-08-30  David Malcolm  <dmalcolm@redhat.com>
1489
1490         PR analyzer/99260
1491         * Makefile.in (ANALYZER_OBJS): Add analyzer/call-info.o.
1492
1493 2021-08-30  Jason Merrill  <jason@redhat.com>
1494
1495         * doc/invoke.texi: Document -Wmissing-requires.
1496
1497 2021-08-30  Bill Schmidt  <wschmidt@linux.ibm.com>
1498
1499         * config/rs6000/rs6000-call.c (rs6000_init_builtins): Remove
1500         TARGET_EXTRA_BUILTINS guard.
1501
1502 2021-08-30  Bill Schmidt  <wschmidt@linux.ibm.com>
1503
1504         * config/rs6000/rs6000-call.c (rs6000_init_builtins): Change
1505         initialization of V2DI_type_node and unsigned_V2DI_type_node.
1506
1507 2021-08-30  Bill Schmidt  <wschmidt@linux.ibm.com>
1508
1509         * config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS): Use the new
1510         decl when new_builtins_are_live.
1511         * config/rs6000/rs6000-builtin-new.def (__builtin_cfstring): New
1512         built-in.
1513
1514 2021-08-30  Pat Haugen  <pthaugen@linux.ibm.com>
1515
1516         * config/rs6000/rs6000-cpus.def (ISA_3_1_MASKS_SERVER): Add
1517         OPTION_MASK_P10_FUSION_2STORE.
1518         (POWERPC_MASKS): Likewise.
1519         * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable
1520         store fusion for Power10.
1521         (is_fusable_store): New.
1522         (power10_sched_reorder): Likewise.
1523         (rs6000_sched_reorder): Do Power10 specific reordering.
1524         (rs6000_sched_reorder2): Likewise.
1525         * config/rs6000/rs6000.opt: Add new option.
1526
1527 2021-08-30  Richard Biener  <rguenther@suse.de>
1528
1529         PR tree-optimization/102128
1530         * tree-vect-slp.c (vect_bb_vectorization_profitable_p):
1531         Move scanning for if-converted scalar code to the caller
1532         and instead delay clearing the visited flag for profitable
1533         subgraphs.
1534         (vect_slp_region): Cost all subgraphs before scheduling.
1535         For if-converted BB vectorization scan for scalar COND_EXPRs
1536         and do not vectorize if any found and the cost model is
1537         very-cheap.
1538
1539 2021-08-30  Richard Biener  <rguenther@suse.de>
1540
1541         * common.opt (fexceptions): Mark
1542         EnabledBy(fnon-call-exceptions).
1543         * doc/invoke.texi (fnon-call-exceptions): Document this
1544         enables -fexceptions.
1545
1546 2021-08-30  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1547
1548         * tsystem.h (abort): Define abort() if inhibit_libc is defined and it
1549         is not already defined.
1550
1551 2021-08-30  liuhongt  <hongtao.liu@intel.com>
1552
1553         * expmed.c (extract_bit_field_1): Make sure we're playing with
1554         integral modes before call extract_integral_bit_field.
1555         (extract_integral_bit_field): Add a parameter of type
1556         scalar_int_mode which corresponds to of tmode.
1557         And call extract_and_convert_fixed_bit_field instead of
1558         extract_fixed_bit_field and convert_extracted_bit_field.
1559         (extract_and_convert_fixed_bit_field): New function, it's a
1560         combination of extract_fixed_bit_field and
1561         convert_extracted_bit_field.
1562
1563 2021-08-29  Iain Sandoe  <iain@sandoe.co.uk>
1564
1565         * config/darwin.c (darwin_libc_has_function): Do not run
1566         the checks for x86 or modern Darwin.  Make sure that there
1567         is a value set for darwin_macosx_version_min before testing.
1568
1569 2021-08-29  Iain Sandoe  <iain@sandoe.co.uk>
1570
1571         * config/i386/darwin.h (CLEAR_INSN_CACHE): New.
1572
1573 2021-08-28  Jan Hubicka  <hubicka@ucw.cz>
1574
1575         * ipa-modref-tree.h (modref_access_node::merge): Break out
1576         logic combining offsets and logic merging ranges to ...
1577         (modref_access_node::combined_offsets): ... here
1578         (modref_access_node::update2): ... here
1579         (modref_access_node::closer_pair_p): New member function.
1580         (modref_access_node::forced_merge): New member function.
1581         (modre_ref_node::insert): Do merging when table is full.
1582
1583 2021-08-28  YunQiang Su  <yunqiang.su@cipunited.com>
1584
1585         PR target/102089
1586         * config.gcc: MIPS: use N64 ABI by default if the triple end
1587           with -gnuabi64, which is used by Debian since 2013.
1588
1589 2021-08-28  Alexandre Oliva  <oliva@adacore.com>
1590
1591         * ipa-modref.c (analyze_function): Skip debug stmts.
1592         * tree-inline.c (estimate_num_insn): Consider builtins even
1593         without a cgraph_node.
1594
1595 2021-08-27  Jeff Law  <jlaw@localhost.localdomain>
1596
1597         * config/h8300/bitfield.md (cstore<mode>4): Remove expander.
1598         * config/h8300/h8300.c (h8300_expand_branch): Remove function.
1599         * config/h8300/h8300-protos.h (h8300_expadn_branch): Remove prototype.
1600         * config/h8300/h8300.md (eqne): New code iterator.
1601         (geultu, geultu_to_c): Similarly.
1602         * config/h8300/testcompare.md (cstore<mode>4): Dummy expander.
1603         (store_c_<mode>, store_c_i_<mode>): New define_insn_and_splits
1604         (cmp<mode>_c): New pattern
1605
1606 2021-08-27  Jeff Law  <jlaw@localhost.localdomain>
1607
1608         * tree-ssa-dom.c (reduce_vector_comparison_to_scalar_comparison): New
1609         function.
1610         (dom_opt_dom_walker::optimize_stmt): Use it.
1611
1612 2021-08-27  Iain Sandoe  <iain@sandoe.co.uk>
1613
1614         * config/darwin.c (finalize_ctors): Add a section-start linker-
1615         visible symbol.
1616         (finalize_dtors): Likewise.
1617         * config/darwin.h (MIN_LD64_INIT_TERM_START_LABELS): New.
1618
1619 2021-08-27  Bill Schmidt  <wschmidt@linux.ibm.com>
1620
1621         * config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include.
1622         (rs6000_init_builtins): Call rs6000_init_generated_builtins.  Skip the
1623         old initialization logic when new builtins are enabled.
1624         * config/rs6000/rs6000-gen-builtins.c (write_decls): Rename
1625         rs6000_autoinit_builtins to rs6000_init_generated_builtins.
1626         (write_init_file): Likewise.
1627
1628 2021-08-27  Iain Sandoe  <iain@sandoe.co.uk>
1629
1630         * configure.ac (darwin2[[0-9]]* | darwin19*): Alter use of
1631         gcc_GAS_CHECK_FEATURE to remove an extraneous parameter.
1632         (amdgcn-* | gcn-*) Likewise.
1633
1634 2021-08-27  Anthony Sharp  <anthonysharp15@gmail.com>
1635
1636         * symbol-summary.h: Added missing template keyword.
1637
1638 2021-08-27  Richard Biener  <rguenther@suse.de>
1639
1640         PR tree-optimization/45178
1641         * tree-ssa-dce.c (find_obviously_necessary_stmts): For
1642         infinite loops without exit do not mark control dependent
1643         edges of the latch necessary.
1644
1645 2021-08-27  konglin1  <lingling.kong@intel.com>
1646
1647         PR target/101472
1648         * config/i386/sse.md: (<avx512>scattersi<mode>): Add mask operand to
1649         UNSPEC_VSIBADDR.
1650         (<avx512>scattersi<mode>): Likewise.
1651         (*avx512f_scattersi<VI48F:mode>): Merge mask operand to set_dest.
1652         (*avx512f_scatterdi<VI48F:mode>): Likewise
1653
1654 2021-08-27  Kewen Lin  <linkw@linux.ibm.com>
1655
1656         * config/rs6000/rs6000.c (rs6000_builtin_md_vectorized_function): Add
1657         support for built-in functions MISC_BUILTIN_DIVWE, MISC_BUILTIN_DIVWEU,
1658         MISC_BUILTIN_DIVDE, MISC_BUILTIN_DIVDEU, P10_BUILTIN_CFUGED,
1659         P10_BUILTIN_CNTLZDM, P10_BUILTIN_CNTTZDM, P10_BUILTIN_PDEPD and
1660         P10_BUILTIN_PEXTD on Power10.
1661
1662 2021-08-27  Kewen Lin  <linkw@linux.ibm.com>
1663
1664         * config/rs6000/rs6000-call.c (builtin_function_type): Add unsigned
1665         signedness for some Power10 bifs.
1666
1667 2021-08-27  David Edelsohn  <dje.gcc@gmail.com>
1668
1669         PR target/102068
1670         * config/rs6000/rs6000.c (rs6000_adjust_field_align): Use
1671         computed alignment if the entire struct has attribute packed.
1672
1673 2021-08-27  liuhongt  <hongtao.liu@intel.com>
1674
1675         PR target/98167
1676         PR target/43147
1677         * config/i386/i386.c (ix86_gimple_fold_builtin): Fold
1678         IX86_BUILTIN_SHUFPD512, IX86_BUILTIN_SHUFPS512,
1679         IX86_BUILTIN_SHUFPD256, IX86_BUILTIN_SHUFPS,
1680         IX86_BUILTIN_SHUFPS256.
1681         (ix86_masked_all_ones): New function.
1682
1683 2021-08-26  Uroš Bizjak  <ubizjak@gmail.com>
1684
1685         * config/i386/i386.md (*btr<mode>_1): Call force_reg unconditionally.
1686         (conditional moves with memory inputs splitters): Ditto.
1687         * config/i386/sse.md (one_cmpl<mode>2): Simplify.
1688
1689 2021-08-26  Jan Hubicka  <hubicka@ucw.cz>
1690
1691         * ipa-modref-tree.h (modref_access_node::try_merge_with): Restart
1692         search after merging.
1693
1694 2021-08-26  Bill Schmidt  <wschmidt@linux.ibm.com>
1695
1696         * config/rs6000/rs6000-overload.def: Add remaining overloads.
1697
1698 2021-08-26  Bill Schmidt  <wschmidt@linux.ibm.com>
1699
1700         * config/rs6000/rs6000-builtin-new.def: Add cell stanza.
1701
1702 2021-08-26  Bill Schmidt  <wschmidt@linux.ibm.com>
1703
1704         * config/rs6000/rs6000-builtin-new.def: Add ieee128-hw, dfp,
1705         crypto, and htm stanzas.
1706
1707 2021-08-26  Bill Schmidt  <wschmidt@linux.ibm.com>
1708
1709         * config/rs6000/rs6000-builtin-new.def: Add mma stanza.
1710
1711 2021-08-26  Martin Sebor  <msebor@redhat.com>
1712
1713         * tree-ssa-uninit.c (warn_uninit): Refactor and simplify.
1714         (warn_uninit_phi_uses): Remove argument from calls to warn_uninit.
1715         (warn_uninitialized_vars): Same.  Reduce visibility of locals.
1716         (warn_uninitialized_phi): Same.
1717
1718 2021-08-26  Roger Sayle  <roger@nextmovesoftware.com>
1719
1720         * tree-ssa-ccp.c (get_individual_bits): Helper function to
1721         extract the individual bits from a widest_int constant (mask).
1722         (gray_code_bit_flips): New read-only table for effiently
1723         enumerating permutations/combinations of bits.
1724         (bit_value_binop) [LROTATE_EXPR, RROTATE_EXPR]: Handle rotates
1725         by unknown counts that are guaranteed less than the target
1726         precision and four or fewer unknown bits by enumeration.
1727         [LSHIFT_EXPR, RSHIFT_EXPR]: Likewise, also handle shifts by
1728         enumeration under the same conditions.  Handle remaining
1729         shifts as a mask based upon the minimum possible shift value.
1730
1731 2021-08-26  Roger Sayle  <roger@nextmovesoftware.com>
1732             Richard Biener  <rguenther@suse.de>
1733
1734         * match.pd (shift transformations): Remove a redundant
1735         !POINTER_TYPE_P check.
1736
1737 2021-08-26  Uroš Bizjak  <ubizjak@gmail.com>
1738
1739         PR target/102057
1740         * config/i386/i386.md (cmove reg-reg move elimination peephole2s):
1741         Set all_regs to true in the call to replace_rtx.
1742
1743 2021-08-26  Jan Hubicka  <hubicka@ucw.cz>
1744
1745         * ipa-modref-tree.c (test_insert_search_collapse): Update test.
1746         * ipa-modref-tree.h (modref_base_node::insert): Be smarter when
1747         hiting --param modref-max-refs limit.
1748         (modref_tree:insert_base): Be smarter when hitting
1749         --param modref-max-bases limit. Add new parameter REF.
1750         (modref_tree:insert): Update.
1751         (modref_tree:merge): Update.
1752         * ipa-modref.c (read_modref_records): Update.
1753
1754 2021-08-26  Jan Hubicka  <hubicka@ucw.cz>
1755
1756         * params.opt: (modref-max-adjustments): Add full stop.
1757
1758 2021-08-26  Jan Hubicka  <hubicka@ucw.cz>
1759
1760         * ipa-modref-tree.h (modref_ref_node::verify): New member
1761         functoin.
1762         (modref_ref_node::insert): Use it.
1763         (modref_ref_node::try_mere_with): Fix off by one error.
1764
1765 2021-08-26  Martin Liska  <mliska@suse.cz>
1766             Stefan Kneifel  <stefan.kneifel@bluewin.ch>
1767
1768         * cgraph.h (create_version_clone_with_body): Add new parameter.
1769         * cgraphclones.c: Likewise.
1770         * multiple_target.c (create_dispatcher_calls): Do not use
1771         numbered suffixes.
1772         (create_target_clone): Likewise here.
1773
1774 2021-08-26  Jonathan Yong  <10walls@gmail.com>
1775
1776         * doc/extend.texi: Add note about reserved priorities
1777         to the constructor attribute.
1778
1779 2021-08-25  Martin Sebor  <msebor@redhat.com>
1780
1781         * gimple-range-cache.cc (ssa_global_cache::dump): Avoid printing
1782         range table header alone.
1783         * gimple-range.cc (gimple_ranger::export_global_ranges): Same.
1784
1785 2021-08-25  Jan Hubicka  <hubicka@ucw.cz>
1786
1787         * doc/invoke.texi: Document --param modref-max-adjustments.
1788         * ipa-modref-tree.c (test_insert_search_collapse): Update.
1789         (test_merge): Update.
1790         * ipa-modref-tree.h (struct modref_access_node): Add adjustments;
1791         (modref_access_node::operator==): Fix handling of access ranges.
1792         (modref_access_node::contains): Constify parameter; handle also
1793         mismatched parm offsets.
1794         (modref_access_node::update): New function.
1795         (modref_access_node::merge): New function.
1796         (unspecified_modref_access_node): Update constructor.
1797         (modref_ref_node::insert_access): Add record_adjustments parameter;
1798         handle merging.
1799         (modref_ref_node::try_merge_with): New private function.
1800         (modref_tree::insert): New record_adjustments parameter.
1801         (modref_tree::merge): New record_adjustments parameter.
1802         (modref_tree::copy_from): Update.
1803         * ipa-modref.c (dump_access): Dump adjustments field.
1804         (get_access): Update constructor.
1805         (record_access): Update call of insert.
1806         (record_access_lto): Update call of insert.
1807         (merge_call_side_effects): Add record_adjustments parameter.
1808         (get_access_for_fnspec): Update.
1809         (process_fnspec): Update.
1810         (analyze_call): Update.
1811         (analyze_function): Update.
1812         (read_modref_records): Update.
1813         (ipa_merge_modref_summary_after_inlining): Update.
1814         (propagate_unknown_call): Update.
1815         (modref_propagate_in_scc): Update.
1816         * params.opt (param-max-modref-adjustments=): New.
1817
1818 2021-08-25  Michael Meissner  <meissner@linux.ibm.com>
1819
1820         * config/rs6000/vsx.md (UNSPEC_XXSPLTIDP): Rename from
1821         UNSPEC_XXSPLTID.
1822         (xxspltiw_v4si): Use vecperm type attribute.
1823         (xxspltiw_v4si_inst): Use vecperm type attribute.
1824         (xxspltiw_v4sf_inst): Likewise.
1825         (xxspltidp_v2df): Use vecperm type attribute.  Use
1826         UNSPEC_XXSPLTIDP instead of UNSPEC_XXSPLTID.
1827         (xxspltidp_v2df_inst): Likewise.
1828         (xxsplti32dx_v4si): Use vecperm type attribute.
1829         (xxsplti32dx_v4si_inst): Likewise.
1830         (xxsplti32dx_v4sf_inst): Likewise.
1831         (xxblend_<mode>): Likewise.
1832         (xxpermx): Likewise.
1833         (xxpermx_inst): Likewise.
1834         (xxeval): Likewise.
1835
1836 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
1837
1838         PR other/93067
1839         * coretypes.h (typedef diagnostic_input_charset_callback): Declare.
1840         * diagnostic.c (diagnostic_initialize_input_context): New function.
1841         * diagnostic.h (diagnostic_initialize_input_context): Declare.
1842         * input.c (default_charset_callback): New function.
1843         (file_cache::initialize_input_context): New function.
1844         (file_cache_slot::create): Added ability to convert the input
1845         according to the input context.
1846         (file_cache::file_cache): Initialize the new input context.
1847         (class file_cache_slot): Added new m_alloc_offset member.
1848         (file_cache_slot::file_cache_slot): Initialize the new member.
1849         (file_cache_slot::~file_cache_slot): Handle potentially offset buffer.
1850         (file_cache_slot::maybe_grow): Likewise.
1851         (file_cache_slot::needs_read_p): Handle NULL fp, which is now possible.
1852         (file_cache_slot::get_next_line): Likewise.
1853         * input.h (class file_cache): Added input context member.
1854
1855 2021-08-25  Richard Biener  <rguenther@suse.de>
1856
1857         PR tree-optimization/102046
1858         * tree-vect-slp.c (vect_build_slp_tree_2): Conservatively
1859         update ->any_pattern when swapping operands.
1860
1861 2021-08-25  Hongyu Wang  <hongyu.wang@intel.com>
1862
1863         PR target/101716
1864         * config/i386/i386.c (ix86_live_on_entry): Adjust comment.
1865         (ix86_decompose_address): Remove retval check for ASHIFT,
1866         allow non-canonical zero extend if AND mask covers ASHIFT
1867         count.
1868         (ix86_legitimate_address_p): Adjust condition for decompose.
1869         (ix86_rtx_costs): Adjust cost for lea with non-canonical
1870         zero-extend.
1871         Co-Authored by: Uros Bizjak <ubizjak@gmail.com>
1872
1873 2021-08-25  Jiufu Guo  <guojiufu@linux.ibm.com>
1874
1875         PR tree-optimization/101145
1876         * tree-ssa-loop-niter.c (number_of_iterations_until_wrap):
1877         New function.
1878         (number_of_iterations_lt): Invoke above function.
1879         (adjust_cond_for_loop_until_wrap):
1880         Merge to number_of_iterations_until_wrap.
1881         (number_of_iterations_cond): Update invokes for
1882         adjust_cond_for_loop_until_wrap and number_of_iterations_lt.
1883
1884 2021-08-25  konglin1  <lingling.kong@intel.com>
1885
1886         PR target/101471
1887         * config/i386/avx512dqintrin.h (_mm512_fpclass_ps_mask): Fix
1888         macro define in O0.
1889         (_mm512_mask_fpclass_ps_mask): Ditto.
1890
1891 2021-08-25  Kewen Lin  <linkw@linux.ibm.com>
1892
1893         * config/rs6000/altivec.md (vec_unpacku_hi_v16qi): Remove.
1894         (vec_unpacku_hi_v8hi): Likewise.
1895         (vec_unpacku_lo_v16qi): Likewise.
1896         (vec_unpacku_lo_v8hi): Likewise.
1897         (vec_unpacku_hi_<VP_small_lc>): New define_expand.
1898         (vec_unpacku_lo_<VP_small_lc>): Likewise.
1899
1900 2021-08-24  David Edelsohn  <dje.gcc@gmail.com>
1901
1902         * config/rs6000/aix.h (SYSTEM_IMPLICIT_EXTERN_C): Delete.
1903         * config/rs6000/aix71.h (SYSTEM_IMPLICIT_EXTERN_C): Define.
1904         * config/rs6000/aix72.h (SYSTEM_IMPLICIT_EXTERN_C): Define.
1905         * config/rs6000/aix73.h (TARGET_AIX_VERSION): Increase to 73.
1906
1907 2021-08-24  Roger Sayle  <roger@nextmovesoftware.com>
1908
1909         PR middle-end/102031
1910         * simplify-rtx.c (simplify_truncation): When comparing precisions
1911         use "subreg_prec" variable, not "subreg_mode".
1912
1913 2021-08-24  Bill Schmidt  <wschmidt@linux.ibm.com>
1914
1915         * config/rs6000/rs6000-builtin-new.def: Add power10 and power10-64
1916         stanzas.
1917
1918 2021-08-24  Bill Schmidt  <wschmidt@linux.ibm.com>
1919
1920         * config/rs6000/rs6000-call.c (rs6000_init_builtins): Initialize
1921         various pointer type nodes.
1922         * config/rs6000/rs6000.h (rs6000_builtin_type_index): Add enum
1923         values for various pointer types.
1924         (ptr_V16QI_type_node): New macro.
1925         (ptr_V1TI_type_node): New macro.
1926         (ptr_V2DI_type_node): New macro.
1927         (ptr_V2DF_type_node): New macro.
1928         (ptr_V4SI_type_node): New macro.
1929         (ptr_V4SF_type_node): New macro.
1930         (ptr_V8HI_type_node): New macro.
1931         (ptr_unsigned_V16QI_type_node): New macro.
1932         (ptr_unsigned_V1TI_type_node): New macro.
1933         (ptr_unsigned_V8HI_type_node): New macro.
1934         (ptr_unsigned_V4SI_type_node): New macro.
1935         (ptr_unsigned_V2DI_type_node): New macro.
1936         (ptr_bool_V16QI_type_node): New macro.
1937         (ptr_bool_V8HI_type_node): New macro.
1938         (ptr_bool_V4SI_type_node): New macro.
1939         (ptr_bool_V2DI_type_node): New macro.
1940         (ptr_bool_V1TI_type_node): New macro.
1941         (ptr_pixel_type_node): New macro.
1942         (ptr_intQI_type_node): New macro.
1943         (ptr_uintQI_type_node): New macro.
1944         (ptr_intHI_type_node): New macro.
1945         (ptr_uintHI_type_node): New macro.
1946         (ptr_intSI_type_node): New macro.
1947         (ptr_uintSI_type_node): New macro.
1948         (ptr_intDI_type_node): New macro.
1949         (ptr_uintDI_type_node): New macro.
1950         (ptr_intTI_type_node): New macro.
1951         (ptr_uintTI_type_node): New macro.
1952         (ptr_long_integer_type_node): New macro.
1953         (ptr_long_unsigned_type_node): New macro.
1954         (ptr_float_type_node): New macro.
1955         (ptr_double_type_node): New macro.
1956         (ptr_long_double_type_node): New macro.
1957         (ptr_dfloat64_type_node): New macro.
1958         (ptr_dfloat128_type_node): New macro.
1959         (ptr_ieee128_type_node): New macro.
1960         (ptr_ibm128_type_node): New macro.
1961         (ptr_vector_pair_type_node): New macro.
1962         (ptr_vector_quad_type_node): New macro.
1963         (ptr_long_long_integer_type_node): New macro.
1964         (ptr_long_long_unsigned_type_node): New macro.
1965
1966 2021-08-24  Bill Schmidt  <wschmidt@linux.ibm.com>
1967
1968         * config/rs6000/rs6000-builtin-new.def: Add power9-vector, power9,
1969         and power9-64 stanzas.
1970
1971 2021-08-24  Roger Sayle  <roger@nextmovesoftware.com>
1972             Tom de Vries  <tdevries@suse.de>
1973
1974         * config.gcc (nvptx-*-*): Define {c,c++}_target_objs.
1975         * config/nvptx/nvptx-protos.h (nvptx_cpu_cpp_builtins): Prototype.
1976         * config/nvptx/nvptx.h (TARGET_CPU_CPP_BUILTINS): Implement with
1977         a call to the new nvptx_cpu_cpp_builtins function in nvptx-c.c.
1978         * config/nvptx/t-nvptx (nvptx-c.o): New rule.
1979         * config/nvptx/nvptx-c.c: New source file.
1980         (nvptx_cpu_cpp_builtins): Move implementation here.
1981
1982 2021-08-24  Martin Sebor  <msebor@redhat.com>
1983
1984         PR middle-end/101600
1985         PR middle-end/101977
1986         * gimple-ssa-warn-access.cc (maybe_warn_for_bound): Tighten up
1987         the phrasing of a warning.
1988         (check_access): Use the remaining size after subtracting any offset
1989         rather than the whole object size.
1990         * pointer-query.cc (access_ref::get_ref): Clear BASE0 flag if it's
1991         clear for any nonnull PHI argument.
1992         (compute_objsize): Clear argument.
1993
1994 2021-08-24  Bill Schmidt  <wschmidt@linux.ibm.com>
1995
1996         * config/rs6000/rs6000-builtin-new.def: Add power8-vector stanza.
1997
1998 2021-08-24  Bill Schmidt  <wschmidt@linux.ibm.com>
1999
2000         * config/rs6000/rs6000-builtin-new.def: Add power7 and power7-64
2001         stanzas.
2002
2003 2021-08-24  Andrew MacLeod  <amacleod@redhat.com>
2004
2005         * value-relation.cc (rr_transitive_table): New.
2006         (relation_transitive): New.
2007         (value_relation::swap): Remove.
2008         (value_relation::apply_transitive): New.
2009         (relation_oracle::relation_oracle): Allocate a new tmp bitmap.
2010         (relation_oracle::register_relation): Call register_transitives.
2011         (relation_oracle::register_transitives): New.
2012         * value-relation.h (relation_oracle): Add new temporary bitmap and
2013         methods.
2014
2015 2021-08-24  H.J. Lu  <hjl.tools@gmail.com>
2016
2017         PR target/102021
2018         * config/i386/i386-expand.c (ix86_expand_vector_move): Broadcast
2019         from integer to a pseudo vector register.
2020
2021 2021-08-24  Richard Biener  <rguenther@suse.de>
2022
2023         PR tree-optimization/100089
2024         * tree-vectorizer.h (vect_slp_bb): Rename to ...
2025         (vect_slp_if_converted_bb): ... this and get the original
2026         loop as new argument.
2027         * tree-vectorizer.c (try_vectorize_loop_1): Revert previous fix,
2028         pass original loop to vect_slp_if_converted_bb.
2029         * tree-vect-slp.c (vect_bb_vectorization_profitable_p):
2030         If orig_loop was passed scan the not vectorized stmts
2031         for COND_EXPRs and force not profitable if found.
2032         (vect_slp_region): Pass down all SLP instances to costing
2033         if orig_loop was specified.
2034         (vect_slp_bbs): Pass through orig_loop.
2035         (vect_slp_bb): Rename to ...
2036         (vect_slp_if_converted_bb): ... this and get the original
2037         loop as new argument.
2038         (vect_slp_function): Adjust.
2039
2040 2021-08-24  Richard Earnshaw  <rearnsha@arm.com>
2041
2042         PR target/102035
2043         * config/arm/arm.md (attribute arch): Add fix_vlldm.
2044         (arch_enabled): Use it.
2045         * config/arm/vfp.md (lazy_store_multiple_insn): Add alternative to
2046         use when erratum mitigation is needed.
2047
2048 2021-08-24  Richard Earnshaw  <rearnsha@arm.com>
2049
2050         PR target/102035
2051         * config/arm/arm.opt (mfix-cmse-cve-2021-35465): New option.
2052         * doc/invoke.texi (Arm Options): Document it.
2053         * config/arm/arm-cpus.in (quirk_vlldm): New feature bit.
2054         (ALL_QUIRKS): Add quirk_vlldm.
2055         (cortex-m33): Add quirk_vlldm.
2056         (cortex-m35p, cortex-m55): Likewise.
2057         * config/arm/arm.c (arm_option_override): Enable fix_vlldm if
2058         targetting an affected CPU and not explicitly controlled on
2059         the command line.
2060
2061 2021-08-24  Richard Earnshaw  <rearnsha@arm.com>
2062
2063         * config/arm/vfp.md (lazy_store_multiple_insn): Rewrite as valid RTL.
2064         (lazy_load_multiple_insn): Likewise.
2065
2066 2021-08-24  liuhongt  <hongtao.liu@intel.com>
2067
2068         PR target/101989
2069         * config/i386/sse.md (<avx512>_vternlog<mode><sd_maskz_name>):
2070         Enable avx512 embedded broadcast.
2071         (*<avx512>_vternlog<mode>_all): Ditto.
2072         (<avx512>_vternlog<mode>_mask): Ditto.
2073
2074 2021-08-24  liuhongt  <hongtao.liu@intel.com>
2075
2076         PR target/101989
2077         * config/i386/i386.c (ix86_rtx_costs): Define cost for
2078         UNSPEC_VTERNLOG.
2079         * config/i386/i386.h (STRIP_UNARY): New macro.
2080         * config/i386/predicates.md (reg_or_notreg_operand): New
2081         predicate.
2082         * config/i386/sse.md (*<avx512>_vternlog<mode>_all): New define_insn.
2083         (*<avx512>_vternlog<mode>_1): New pre_reload
2084         define_insn_and_split.
2085         (*<avx512>_vternlog<mode>_2): Ditto.
2086         (*<avx512>_vternlog<mode>_3): Ditto.
2087         (any_logic1,any_logic2): New code iterator.
2088         (logic_op): New code attribute.
2089         (ternlogsuffix): Extend to VNxDF and VNxSF.
2090
2091 2021-08-24  Richard Biener  <rguenther@suse.de>
2092
2093         * doc/invoke.texi (vect-inner-loop-cost-factor): Adjust.
2094         * params.opt (--param vect-inner-loop-cost-factor): Adjust
2095         maximum value.
2096         * tree-vect-loop.c (vect_analyze_loop_form): Initialize
2097         inner_loop_cost_factor to the minimum of the estimated number
2098         of iterations of the inner loop and vect-inner-loop-cost-factor.
2099
2100 2021-08-24  Roger Sayle  <roger@nextmovesoftware.com>
2101             Richard Biener  <rguenther@suse.de>
2102
2103         * config/i386/i386-features.c (compute_convert_gain): Provide
2104         more accurate values for CONST_INT, when optimizing for size.
2105         * config/i386/i386.c (COSTS_N_BYTES): Move definition from here...
2106         * config/i386/i386.h (COSTS_N_BYTES): to here.
2107
2108 2021-08-24  Roger Sayle  <roger@nextmovesoftware.com>
2109             Jakub Jelinek  <jakub@redhat.com>
2110
2111         PR middle-end/102029
2112         * match.pd (shift transformations): Add an additional check for
2113         !POINTER_TYPE_P in the recently added left shift transformation.
2114
2115 2021-08-24  liuhongt  <hongtao.liu@intel.com>
2116
2117         PR tree-optimization/100089
2118         * tree-vectorizer.c (try_vectorize_loop_1): Disable slp in
2119         loop vectorizer when cost model is very-cheap.
2120
2121 2021-08-23  Bill Schmidt  <wschmidt@linux.ibm.com>
2122
2123         * config/rs6000/rs6000-gen-builtins.c (parse_bif_entry): Don't call
2124         asprintf, which is not available on AIX.
2125
2126 2021-08-23  Bill Schmidt  <wschmidt@linux.ibm.com>
2127
2128         * config.gcc (target_gtfiles): Add ./rs6000-builtins.h.
2129         * config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Set.
2130
2131 2021-08-23  Bill Schmidt  <wschmidt@linux.ibm.com>
2132
2133         * config.gcc (powerpc*-*-*): Add rs6000-builtins.o to extra_objs.
2134         * config/rs6000/rs6000-gen-builtins.c (main): Close init_file
2135         last.
2136         * config/rs6000/t-rs6000 (rs6000-gen-builtins.o): New target.
2137         (rbtree.o): Likewise.
2138         (rs6000-gen-builtins): Likewise.
2139         (rs6000-builtins.c): Likewise.
2140         (rs6000-builtins.h): Likewise.
2141         (rs6000.o): Add dependency.
2142         (EXTRA_HEADERS): Add rs6000-vecdefines.h.
2143         (rs6000-vecdefines.h): New target.
2144         (rs6000-builtins.o): Likewise.
2145         (rs6000-call.o): Add rs6000-builtins.h as a dependency.
2146         (rs6000-c.o): Likewise.
2147
2148 2021-08-23  Bill Schmidt  <wschmidt@linux.ibm.com>
2149
2150         PR target/101830
2151         * config/rs6000/rs6000-gen-builtins.c (consume_whitespace):
2152         Diagnose buffer overrun.
2153         (safe_inc_pos): Fix overrun detection.
2154         (match_identifier): Diagnose buffer overrun.
2155         (match_integer): Likewise.
2156         (match_to_right_bracket): Likewise.
2157
2158 2021-08-23  Jan Hubicka  <hubicka@ucw.cz>
2159
2160         * ipa-modref-tree.h (modref_access_node::range_info_useful_p):
2161         Improve range compare.
2162         (modref_access_node::contains): New member function.
2163         (modref_access_node::search): Remove.
2164         (modref_access_node::insert): Be smarter about subaccesses.
2165
2166 2021-08-23  Thomas Schwinge  <thomas@codesourcery.com>
2167
2168         * config/i386/i386-options.c (ix86_omp_device_kind_arch_isa)
2169         <omp_device_arch> [ACCEL_COMPILER]: Match "intel_mic".
2170         * config/i386/t-omp-device (omp-device-properties-i386) <arch>:
2171         Add "intel_mic".
2172
2173 2021-08-23  Jeff Law  <jlaw@localhost.localdomain>
2174
2175         * config/h8300/h8300-protos.h (h8300_expand_epilogue): Add new
2176         argument.
2177         * config/h8300/jumpcall.md (call, call_value): Restrict to
2178         !SIBLING_CALL_P cases.
2179         (subcall, sibcall_value): New patterns & expanders.
2180         * config/h8300/proepi.md (epilogue): Pass new argument to
2181         h8300_expand_epilogue.
2182         (sibcall_epilogue): New expander.
2183         * config/h8300/h8300.c (h8300_expand_epilogue): Handle sibcall
2184         epilogues too.
2185         (h8300_ok_for_sibcall_p): New function.
2186         (TARGET_FUNCTION_OK_FOR_SIBCALL): define.
2187
2188 2021-08-23  Roger Sayle  <roger@nextmovesoftware.com>
2189
2190         * simplify-rtx.c (simplify_unary_operation_1): [TRUNCATE]:
2191         Handle case where the operand is already the desired mode.
2192
2193 2021-08-23  Richard Biener  <rguenther@suse.de>
2194
2195         PR ipa/97565
2196         * tree-ssa-structalias.c (ipa_pta_execute): Check in_other_partition
2197         in addition to has_gimple_body.
2198
2199 2021-08-23  Jan Hubicka  <hubicka@ucw.cz>
2200
2201         PR middle-end/101949
2202         * ipa-modref.c (analyze_ssa_name_flags): Fix merging of
2203         EAF_NOCLOBBER
2204
2205 2021-08-23  Martin Liska  <mliska@suse.cz>
2206
2207         * doc/invoke.texi: Put the option out of -mxl-mode-app-model
2208         table.
2209
2210 2021-08-23  Richard Biener  <rguenther@suse.de>
2211
2212         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2213         Properly scale the inner loop cost only once.
2214
2215 2021-08-23  Roger Sayle  <roger@nextmovesoftware.com>
2216
2217         * tree-ssa-ccp.c (bit_value_binop) [TRUNC_MOD_EXPR, TRUNC_DIV_EXPR]:
2218         Provide bounds for unsigned (and signed with non-negative operands)
2219         division and modulus.
2220
2221 2021-08-23  Roger Sayle  <roger@nextmovesoftware.com>
2222
2223         * simplify-rtx.c (simplify_truncation): Generalize simplification
2224         of (truncate:A (subreg:B X)).
2225         (simplify_unary_operation_1) [FLOAT_TRUNCATE, FLOAT_EXTEND,
2226         SIGN_EXTEND, ZERO_EXTEND]: Handle cases where the operand
2227         already has the desired machine mode.
2228         (test_scalar_int_ops): Add tests that useless extensions and
2229         truncations are optimized away.
2230         (test_scalar_int_ext_ops): New self-test function to confirm
2231         that truncations of extensions are correctly simplified.
2232         (test_scalar_int_ext_ops2): New self-test function to check
2233         truncations of truncations, extensions of extensions, and
2234         truncations of extensions.
2235         (test_scalar_ops): Call the above two functions with a
2236         representative sampling of integer machine modes.
2237
2238 2021-08-23  Roger Sayle  <roger@nextmovesoftware.com>
2239
2240         * match.pd (shift transformations): Change the sign of an
2241         LSHIFT_EXPR if it reduces the number of explicit conversions.
2242
2243 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
2244
2245         PR tree-optimization/86723
2246         * gimple-ssa-store-merging.c (find_bswap_or_nop_finalize): Add
2247         cast64_to_32 argument, set *cast64_to_32 to false, unless n is
2248         non-memory permutation of 64-bit src which only has bytes of
2249         0 or [5..8] and n->range is 4.
2250         (find_bswap_or_nop): Add cast64_to_32 and mask arguments, adjust
2251         find_bswap_or_nop_finalize caller, support bswap with some bytes
2252         zeroed, as long as at least two bytes are not zeroed.
2253         (bswap_replace): Add mask argument and handle masking of bswap
2254         result.
2255         (maybe_optimize_vector_constructor): Adjust find_bswap_or_nop
2256         caller, punt if cast64_to_32 or mask is not all ones.
2257         (pass_optimize_bswap::execute): Adjust find_bswap_or_nop_finalize
2258         caller, for now punt if cast64_to_32.
2259
2260 2021-08-23  Richard Biener  <rguenther@suse.de>
2261
2262         PR tree-optimization/79334
2263         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record
2264         a type also for COMPONENT_REFs.
2265         (vn_reference_may_trap): Check ARRAY_REF with constant index
2266         against the array domain.
2267
2268 2021-08-23  liuhongt  <hongtao.liu@intel.com>
2269
2270         PR target/102016
2271         * config/i386/sse.md (*avx512f_pshufb_truncv8hiv8qi_1): Add
2272         TARGET_AVX512BW to condition.
2273
2274 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
2275
2276         PR debug/101905
2277         * dwarf2out.c (gen_variable_die): Add DW_AT_location for global
2278         register variables already during early_dwarf if possible.
2279
2280 2021-08-23  Christophe Lyon  <christophe.lyon@foss.st.com>
2281
2282         * config/arm/arm_mve.h: Fix __arm_vctp16q return type.
2283
2284 2021-08-23  Christophe Lyon  <christophe.lyon@foss.st.com>
2285
2286         PR target/100856
2287         * config/arm/arm.opt: Fix typo.
2288         * config/arm/t-rmprofile: Fix typo.
2289
2290 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
2291
2292         * tree.h (OMP_CLAUSE_GRAINSIZE_STRICT): Define.
2293         (OMP_CLAUSE_NUM_TASKS_STRICT): Define.
2294         * tree-pretty-print.c (dump_omp_clause) <case OMP_CLAUSE_GRAINSIZE,
2295         case OMP_CLAUSE_NUM_TASKS>: Print strict: modifier.
2296         * omp-expand.c (expand_task_call): Use GOMP_TASK_FLAG_STRICT in iflags
2297         if either grainsize or num_tasks clause has the strict modifier.
2298
2299 2021-08-23  Martin Liska  <mliska@suse.cz>
2300
2301         * dbgcnt.def (DEBUG_COUNTER): New counter.
2302         * gimple.c (gimple_call_arg_flags): Use it in IPA PTA.
2303
2304 2021-08-23  Jan Hubicka  <hubicka@ucw.cz>
2305
2306         * ipa-modref.c (analyze_ssa_name_flags): Improve handling of return slot.
2307
2308 2021-08-23  Xi Ruoyao  <xry111@mengyan1223.wang>
2309
2310         PR target/101922
2311         * config/mips/mips-protos.h (mips_msa_output_shift_immediate):
2312           Declare.
2313         * config/mips/mips.c (mips_msa_output_shift_immediate): New
2314           function.
2315         * config/mips/mips-msa.md (vashl<mode>3, vashr<mode>3,
2316           vlshr<mode>3): Call it.
2317
2318 2021-08-22  Jan Hubicka  <hubicka@ucw.cz>
2319             Martin Liska  <mliska@suse.cz>
2320
2321         PR middle-end/101949
2322         * ipa-modref.c (analyze_ssa_name_flags): Indirect call implies
2323         ~EAF_NOCLOBBER.
2324
2325 2021-08-21  Dragan Mladjenovic  <OT_Dragan.Mladjenovic@mediatek.com>
2326
2327         * config/mips/mips.c (mips_function_rodata_section,
2328         TARGET_ASM_FUNCTION_RODATA_SECTION): Removed.
2329
2330 2021-08-21  John David Anglin  <danglin@gcc.gnu.org>
2331
2332         * config/pa/pa.c (pa_asm_output_aligned_common): Remove warning.
2333
2334 2021-08-20  Serge Belyshev  <belyshev@depni.sinp.msu.ru>
2335
2336         * configure.ac (thread-local storage support): Remove tls_first_major
2337         and tls_first_minor.  Use "$conftest_s" to check support.
2338         * configure: Regenerate.
2339
2340 2021-08-20  Serge Belyshev  <belyshev@depni.sinp.msu.ru>
2341
2342         * configure.ac: Fixup formatting.
2343
2344 2021-08-20  Serge Belyshev  <belyshev@depni.sinp.msu.ru>
2345
2346         * acinclude.m4 (gcc_GAS_CHECK_FEATURE): Remove third argument and ...
2347         * configure.ac: ... update all callers.
2348
2349 2021-08-20  Serge Belyshev  <belyshev@depni.sinp.msu.ru>
2350
2351         PR target/91602
2352         * acinclude.m4 (_gcc_COMPUTE_GAS_VERSION, _gcc_GAS_VERSION_GTE_IFELSE)
2353         (gcc_GAS_VERSION_GTE_IFELSE): Remove.
2354         (gcc_GAS_CHECK_FEATURE): Do not handle in-tree case specially.
2355         * configure.ac: Remove gcc_cv_gas_major_version, gcc_cv_gas_minor_version.
2356         Remove remaining checks for in-tree assembler.
2357         * configure: Regenerate.
2358
2359 2021-08-20  Jeff Law  <jlaw@localhost.localdomain>
2360
2361         * config/h8300/h8300.c (shift_alg_hi): Improve arithmetic shift right
2362         by 15 bits for H8/300H and H8/S.  Improve logical shifts by 12
2363         bits for H8/S.
2364         (shift_alg_si): Improve arithmetic right shift by 28-30 bits for
2365         H8/300H.  Improve arithmetic shift right by 15 bits for H8/S.
2366         Improve logical shifts by 27 bits for H8/S.
2367         (get_shift_alg): Corresponding changes.
2368         (h8300_option_override): Revert to loops for -Os when profitable.
2369
2370 2021-08-20  Richard Biener  <rguenther@suse.de>
2371
2372         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not compare
2373         BBs.
2374         (vect_analyze_data_ref_accesses): Likewise.  Assign the BB
2375         index as group_id when dataref_groups were not computed.
2376         * tree-vect-slp.c (vect_slp_bbs): Bump current_group when
2377         we advace to the next BB.
2378
2379 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
2380
2381         * omp-builtins.def (BUILT_IN_GOMP_WARNING, BUILT_IN_GOMP_ERROR): New
2382         builtins.
2383
2384 2021-08-20  Martin Liska  <mliska@suse.cz>
2385
2386         PR gcov-profile/89961
2387         * gcov.c (make_gcov_file_name): Rewrite using std::string.
2388         (mangle_name): Simplify, do not used the second argument.
2389         (strip_extention): New function.
2390         (get_md5sum): Likewise.
2391         (get_gcov_intermediate_filename): Handle properly -p and -x
2392         options.
2393         (output_gcov_file): Use string type.
2394         (generate_results): Likewise.
2395         (md5sum_to_hex): Remove.
2396
2397 2021-08-20  Michael Meissner  <meissner@linux.ibm.com>
2398
2399         * config/rs6000/altivec.md (UNSPEC_XXEVAL): Move to vsx.md.
2400         (UNSPEC_XXSPLTIW): Move to vsx.md.
2401         (UNSPEC_XXSPLTID): Move to vsx.md.
2402         (UNSPEC_XXSPLTI32DX): Move to vsx.md.
2403         (UNSPEC_XXBLEND): Move to vsx.md.
2404         (UNSPEC_XXPERMX): Move to vsx.md.
2405         (VM3): Move to vsx.md.
2406         (VM3_char): Move to vsx.md.
2407         (xxspltiw_v4si): Move to vsx.md.
2408         (xxspltiw_v4sf): Move to vsx.md.
2409         (xxspltiw_v4sf_inst): Move to vsx.md.
2410         (xxspltidp_v2df): Move to vsx.md.
2411         (xxspltidp_v2df_inst): Move to vsx.md.
2412         (xxsplti32dx_v4si_inst): Move to vsx.md.
2413         (xxsplti32dx_v4sf): Move to vsx.md.
2414         (xxsplti32dx_v4sf_inst): Move to vsx.md.
2415         (xxblend_<mode>): Move to vsx.md.
2416         (xxpermx): Move to vsx.md.
2417         (xxpermx_inst): Move to vsx.md.
2418         * config/rs6000/vsx.md (UNSPEC_XXEVAL): Move from altivec.md.
2419         (UNSPEC_XXSPLTIW): Move from altivec.md.
2420         (UNSPEC_XXSPLTID): Move from altivec.md.
2421         (UNSPEC_XXSPLTI32DX): Move from altivec.md.
2422         (UNSPEC_XXBLEND): Move from altivec.md.
2423         (UNSPEC_XXPERMX): Move from altivec.md.
2424         (VM3): Move from altivec.md.
2425         (VM3_char): Move from altivec.md.
2426         (xxspltiw_v4si): Move from altivec.md.
2427         (xxspltiw_v4sf): Move from altivec.md.
2428         (xxspltiw_v4sf_inst): Move from altivec.md.
2429         (xxspltidp_v2df): Move from altivec.md.
2430         (xxspltidp_v2df_inst): Move from altivec.md.
2431         (xxsplti32dx_v4si_inst): Move from altivec.md.
2432         (xxsplti32dx_v4sf): Move from altivec.md.
2433         (xxsplti32dx_v4sf_inst): Move from altivec.md.
2434         (xxblend_<mode>): Move from altivec.md.
2435         (xxpermx): Move from altivec.md.
2436         (xxpermx_inst): Move from altivec.md.
2437
2438 2021-08-19  Roger Sayle  <roger@nextmovesoftware.com>
2439
2440         * tree-vect-generic.c (expand_vector_operations_1): Use either
2441         gimplify_build1 or gimplify_build2 instead of gimple_build_assign
2442         when constructing scalar splat expressions.
2443
2444 2021-08-19  Peter Bergner  <bergner@linux.ibm.com>
2445
2446         PR target/101849
2447         * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Cast
2448         pointer to __vector_pair *.
2449
2450 2021-08-19  Martin Sebor  <msebor@redhat.com>
2451
2452         * gimple-range.cc: Add comments.
2453         * gimple-range.h: Same.
2454
2455 2021-08-19  Martin Sebor  <msebor@redhat.com>
2456
2457         PR middle-end/101984
2458         * gimple-ssa-warn-access.cc (pass_waccess::execute): Also call
2459         disable_ranger.
2460
2461 2021-08-19  Jeff Law  <jlaw@localhost.localdomain>
2462
2463         * config.gcc (h8300-*-elf*): Do not include dbxelf.h.
2464         (h8300-*-linux*, v850-*-rtems*, v850*-elf*): Likewise.
2465         * config/v850/v850.h (DEFAULT_GDB_EXTENSIONS): Remove.
2466
2467 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
2468
2469         PR middle-end/101950
2470         * optabs.c (expand_clrsb_using_clz): New function.
2471         (expand_unop): Use it as another clrsb expansion fallback.
2472
2473 2021-08-19  liuhongt  <hongtao.liu@intel.com>
2474
2475         Revert:
2476         2021-07-28  liuhongt  <hongtao.liu@intel.com>
2477
2478         PR target/99881
2479         * config/i386/i386.h (processor_costs): Add new member
2480         integer_to_sse.
2481         * config/i386/x86-tune-costs.h (ix86_size_cost, i386_cost,
2482         i486_cost, pentium_cost, lakemont_cost, pentiumpro_cost,
2483         geode_cost, k6_cost, athlon_cost, k8_cost, amdfam10_cost,
2484         bdver_cost, znver1_cost, znver2_cost, znver3_cost,
2485         btver1_cost, btver2_cost, btver3_cost, pentium4_cost,
2486         nocona_cost, atom_cost, atom_cost, slm_cost, intel_cost,
2487         generic_cost, core_cost): Initialize integer_to_sse same value
2488         as sse_op.
2489         (skylake_cost): Initialize integer_to_sse twice as much as sse_op.
2490         * config/i386/i386.c (ix86_builtin_vectorization_cost):
2491         Use integer_to_sse instead of sse_op to calculate the cost of
2492         vec_construct.
2493
2494 2021-08-18  Iain Sandoe  <iain@sandoe.co.uk>
2495
2496         * config.gcc: Include rpath.opt for Darwin.
2497         * config/darwin.h (DRIVER_SELF_SPECS): Handle -rpath.
2498
2499 2021-08-18  Thomas Schwinge  <thomas@codesourcery.com>
2500
2501         PR bootstrap/101959
2502         * hash-map-tests.c (test_map_of_type_with_ctor_and_dtor_expand):
2503         Use an 'int_hash'.
2504
2505 2021-08-18  Jonathan Wright  <jonathan.wright@arm.com>
2506
2507         * config/aarch64/arm_neon.h (vld3_lane_f64): Use float RTL
2508         pattern and type cast.
2509         (vld4_lane_f32): Use float RTL pattern.
2510         (vld4q_lane_f64): Use float type cast.
2511
2512 2021-08-18  Jan Hubicka  <hubicka@ucw.cz>
2513
2514         * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Check also
2515         EAF_NOREAD.
2516
2517 2021-08-18  Thomas Schwinge  <thomas@codesourcery.com>
2518
2519         * hash-map-tests.c (test_map_of_type_with_ctor_and_dtor): Extend.
2520         (test_map_of_type_with_ctor_and_dtor_expand): Add function.
2521         (hash_map_tests_c_tests): Call it.
2522
2523 2021-08-18  Thomas Schwinge  <thomas@codesourcery.com>
2524
2525         * ggc.h (enum ggc_collect): New.
2526         (ggc_collect): Use it.
2527         * ggc-page.c: Adjust.
2528         * ggc-common.c: Likewise.
2529         * ggc-tests.c: Likewise.
2530         * read-rtl-function.c: Likewise.
2531         * selftest-run-tests.c: Likewise.
2532         * doc/gty.texi (Invoking the garbage collector): Likewise.
2533
2534 2021-08-18  liuhongt  <hongtao.liu@intel.com>
2535
2536         PR target/97147
2537         * config/i386/i386.h (TARGET_V2DF_REDUCTION_PREFER_HADDPD):
2538         New macro.
2539         * config/i386/sse.md (*sse3_haddv2df3_low): Add
2540         TARGET_V2DF_REDUCTION_PREFER_HADDPD.
2541         (*sse3_hsubv2df3_low): Ditto.
2542         * config/i386/x86-tune.def
2543         (X86_TUNE_V2DF_REDUCTION_PREFER_HADDPD): New tune.
2544
2545 2021-08-17  Andrew MacLeod  <amacleod@redhat.com>
2546
2547         * gimple-range-gori.cc (gori_compute::gori_compute): Enable tracing.
2548         (gori_compute::compute_operand_range): Add tracing.
2549         (gori_compute::logical_combine): Ditto.
2550         (gori_compute::compute_logical_operands): Ditto.
2551         (gori_compute::compute_operand1_range): Ditto.
2552         (gori_compute::compute_operand2_range): Ditto.
2553         (gori_compute::outgoing_edge_range_p): Ditto.
2554         * gimple-range-gori.h (class gori_compute): Add range_tracer.
2555
2556 2021-08-17  Andrew MacLeod  <amacleod@redhat.com>
2557
2558         * flag-types.h (enum evrp_mode): Adjust evrp-mode values.
2559         * gimple-range-cache.cc (DEBUG_RANGE_CACHE): Relocate from.
2560         * gimple-range-trace.h (DEBUG_RANGE_CACHE): Here.
2561         * params.opt (--param=evrp-mode): Adjust options.
2562
2563 2021-08-17  Andrew MacLeod  <amacleod@redhat.com>
2564
2565         * Makefile.in (OBJS): Add gimple-range-trace.o.
2566         * gimple-range-cache.h (enable_new_values): Remove unused prototype.
2567         * gimple-range-fold.cc: Adjust headers.
2568         * gimple-range-trace.cc: New.
2569         * gimple-range-trace.h: New.
2570         * gimple-range.cc (gimple_ranger::gimple_ranger): Enable tracer.
2571         (gimple_ranger::range_of_expr): Add tracing.
2572         (gimple_ranger::range_on_entry): Ditto.
2573         (gimple_ranger::range_on_exit): Ditto.
2574         (gimple_ranger::range_on_edge): Ditto.
2575         (gimple_ranger::fold_range_internal): Ditto.
2576         (gimple_ranger::dump_bb): Do not calculate edge range twice.
2577         (trace_ranger::*): Remove.
2578         (enable_ranger): Never create a trace_ranger.
2579         (debug_seed_ranger): Move to gimple-range-trace.cc.
2580         (dump_ranger): Ditto.
2581         (debug_ranger): Ditto.
2582         * gimple-range.h: Include gimple-range-trace.h.
2583         (range_on_entry, range_on_exit): No longer virtual.
2584         (class trace_ranger): Remove.
2585         (DEBUG_RANGE_CACHE): Move to gimple-range-trace.h.
2586
2587 2021-08-17  Martin Sebor  <msebor@redhat.com>
2588
2589         PR middle-end/101854
2590         * builtins.c (expand_builtin_alloca): Move warning code to check_alloca
2591         in gimple-ssa-warn-access.cc.
2592         * calls.c (alloc_max_size): Move code to check_alloca.
2593         (get_size_range): Move to pointer-query.cc.
2594         (maybe_warn_alloc_args_overflow): Move to gimple-ssa-warn-access.cc.
2595         (get_attr_nonstring_decl): Move to tree.c.
2596         (fntype_argno_type): Move to gimple-ssa-warn-access.cc.
2597         (append_attrname): Same.
2598         (maybe_warn_rdwr_sizes): Same.
2599         (initialize_argument_information): Move code to
2600         gimple-ssa-warn-access.cc.
2601         * calls.h (maybe_warn_alloc_args_overflow): Move to
2602         gimple-ssa-warn-access.h.
2603         (get_attr_nonstring_decl): Move to tree.h.
2604         (maybe_warn_nonstring_arg):  Move to gimple-ssa-warn-access.h.
2605         (enum size_range_flags): Move to pointer-query.h.
2606         (get_size_range): Same.
2607         * gimple-ssa-warn-access.cc (has_location): Remove unused overload
2608         to avoid Clang -Wunused-function.
2609         (get_size_range): Declare static.
2610         (maybe_emit_free_warning): Rename...
2611         (maybe_check_dealloc_call): ...to this for consistency.
2612         (class pass_waccess): Add members.
2613         (pass_waccess::~pass_waccess): Defined.
2614         (alloc_max_size): Move here from calls.c.
2615         (maybe_warn_alloc_args_overflow): Same.
2616         (check_alloca): New function.
2617         (check_alloc_size_call): New function.
2618         (check_strncat): Handle another warning flag.
2619         (pass_waccess::check_builtin): Handle alloca.
2620         (fntype_argno_type): Move here from calls.c.
2621         (append_attrname): Same.
2622         (maybe_warn_rdwr_sizes): Same.
2623         (pass_waccess::check_call): Define.
2624         (check_nonstring_args): New function.
2625         (pass_waccess::check): Call new member functions.
2626         (pass_waccess::execute): Enable ranger.
2627         * gimple-ssa-warn-access.h (get_size_range): Move here from calls.h.
2628         (maybe_warn_nonstring_arg): Same.
2629         * gimple-ssa-warn-restrict.c: Remove #include.
2630         * pointer-query.cc (get_size_range): Move here from calls.c.
2631         * pointer-query.h (enum size_range_flags): Same.
2632         (get_size_range): Same.
2633         * tree.c (get_attr_nonstring_decl): Move here from calls.c.
2634         * tree.h (get_attr_nonstring_decl): Move here from calls.h.
2635
2636 2021-08-17  Thomas Schwinge  <thomas@codesourcery.com>
2637
2638         * ggc.h (ggc_collect): Add 'force_collect' parameter.
2639         * ggc-page.c (ggc_collect): Use that one instead of global
2640         'ggc_force_collect'.  Adjust all users.
2641         * doc/gty.texi (Invoking the garbage collector): Update.
2642         * ggc-internal.h (ggc_force_collect): Remove.
2643         * ggc-common.c (ggc_force_collect): Likewise.
2644         * selftest.h (forcibly_ggc_collect): Remove.
2645         * ggc-tests.c (selftest::forcibly_ggc_collect): Likewise.
2646         * read-rtl-function.c (test_loading_labels): Adjust.
2647         * selftest-run-tests.c (run_tests): Likewise.
2648
2649 2021-08-17  Iain Sandoe  <iain@sandoe.co.uk>
2650
2651         * config/darwin.c (darwin_file_end): Reset and reclaim the
2652         section names table at the end of compile.
2653
2654 2021-08-17  Iain Sandoe  <iain@sandoe.co.uk>
2655
2656         PR target/100340
2657         * config.in: Regenerate.
2658         * config/i386/darwin.h (EXTRA_ASM_OPTS): New
2659         (ASM_SPEC): Pass options to disable branch shortening where
2660         needed.
2661         * configure: Regenerate.
2662         * configure.ac: Detect versions of 'as' that support the
2663         optimisation which has the bug.
2664
2665 2021-08-17  Richard Biener  <rguenther@suse.de>
2666
2667         * optabs-query.c (supports_vec_gather_load_p): Also check
2668         for masked optabs.
2669         (supports_vec_scatter_store_p): Likewise.
2670         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Fall
2671         back to masked variants if non-masked are not supported.
2672         * tree-vect-patterns.c (vect_recog_gather_scatter_pattern):
2673         When we need to use masked gather/scatter but do not have
2674         a mask set up a constant true one.
2675         * tree-vect-stmts.c (vect_check_scalar_mask): Also allow
2676         non-SSA_NAME masks.
2677
2678 2021-08-17  Roger Sayle  <roger@nextmovesoftware.com>
2679
2680         * tree-ssa-ccp.c (bit_value_binop) [MINUS_EXPR]: Use same
2681         algorithm as PLUS_EXPR to improve subtraction bit bounds.
2682         [POINTER_DIFF_EXPR]: Treat as synonymous with MINUS_EXPR.
2683
2684 2021-08-17  Roger Sayle  <roger@nextmovesoftware.com>
2685
2686         * tree-ssa-ccp.c (bit_value_mult_const): New helper function to
2687         calculate the mask-value pair result of a multiplication by an
2688         unsigned constant.
2689         (bit_value_binop) [MULT_EXPR]:  Call it from here for
2690         multiplications by (sparse) non-negative constants.
2691
2692 2021-08-17  Christophe Lyon  <christophe.lyon@foss.st.com>
2693
2694         PR target/100896
2695         * config.gcc (gcc_cv_initfini_array): Leave undefined for
2696         uclinuxfdpiceabi targets.
2697
2698 2021-08-17  Alexandre Oliva  <oliva@adacore.com>
2699
2700         * tree-inline.c (maybe_move_debug_stmts_to_successors): Don't
2701         reverse debug stmts.
2702
2703 2021-08-17  Alexandre Oliva  <oliva@adacore.com>
2704
2705         * tree-cfg.c (dump_function_to_file): Use fun, not cfun.
2706
2707 2021-08-17  Jonathan Wright  <jonathan.wright@arm.com>
2708
2709         * config/aarch64/arm_neon.h (__LD4_LANE_FUNC): Delete.
2710         (__LD4Q_LANE_FUNC): Likewise.
2711         (vld4_lane_u8): Define without macro.
2712         (vld4_lane_u16): Likewise.
2713         (vld4_lane_u32): Likewise.
2714         (vld4_lane_u64): Likewise.
2715         (vld4_lane_s8): Likewise.
2716         (vld4_lane_s16): Likewise.
2717         (vld4_lane_s32): Likewise.
2718         (vld4_lane_s64): Likewise.
2719         (vld4_lane_f16): Likewise.
2720         (vld4_lane_f32): Likewise.
2721         (vld4_lane_f64): Likewise.
2722         (vld4_lane_p8): Likewise.
2723         (vld4_lane_p16): Likewise.
2724         (vld4_lane_p64): Likewise.
2725         (vld4q_lane_u8): Likewise.
2726         (vld4q_lane_u16): Likewise.
2727         (vld4q_lane_u32): Likewise.
2728         (vld4q_lane_u64): Likewise.
2729         (vld4q_lane_s8): Likewise.
2730         (vld4q_lane_s16): Likewise.
2731         (vld4q_lane_s32): Likewise.
2732         (vld4q_lane_s64): Likewise.
2733         (vld4q_lane_f16): Likewise.
2734         (vld4q_lane_f32): Likewise.
2735         (vld4q_lane_f64): Likewise.
2736         (vld4q_lane_p8): Likewise.
2737         (vld4q_lane_p16): Likewise.
2738         (vld4q_lane_p64): Likewise.
2739         (vld4_lane_bf16): Likewise.
2740         (vld4q_lane_bf16): Likewise.
2741
2742 2021-08-17  Jonathan Wright  <jonathan.wright@arm.com>
2743
2744         * config/aarch64/arm_neon.h (__LD3_LANE_FUNC): Delete.
2745         (__LD3Q_LANE_FUNC): Delete.
2746         (vld3_lane_u8): Define without macro.
2747         (vld3_lane_u16): Likewise.
2748         (vld3_lane_u32): Likewise.
2749         (vld3_lane_u64): Likewise.
2750         (vld3_lane_s8): Likewise.
2751         (vld3_lane_s16): Likewise.
2752         (vld3_lane_s32): Likewise.
2753         (vld3_lane_s64): Likewise.
2754         (vld3_lane_f16): Likewise.
2755         (vld3_lane_f32): Likewise.
2756         (vld3_lane_f64): Likewise.
2757         (vld3_lane_p8): Likewise.
2758         (vld3_lane_p16): Likewise.
2759         (vld3_lane_p64): Likewise.
2760         (vld3q_lane_u8): Likewise.
2761         (vld3q_lane_u16): Likewise.
2762         (vld3q_lane_u32): Likewise.
2763         (vld3q_lane_u64): Likewise.
2764         (vld3q_lane_s8): Likewise.
2765         (vld3q_lane_s16): Likewise.
2766         (vld3q_lane_s32): Likewise.
2767         (vld3q_lane_s64): Likewise.
2768         (vld3q_lane_f16): Likewise.
2769         (vld3q_lane_f32): Likewise.
2770         (vld3q_lane_f64): Likewise.
2771         (vld3q_lane_p8): Likewise.
2772         (vld3q_lane_p16): Likewise.
2773         (vld3q_lane_p64): Likewise.
2774         (vld3_lane_bf16): Likewise.
2775         (vld3q_lane_bf16): Likewise.
2776
2777 2021-08-17  Jonathan Wright  <jonathan.wright@arm.com>
2778
2779         * config/aarch64/arm_neon.h (__LD2_LANE_FUNC): Delete.
2780         (__LD2Q_LANE_FUNC): Likewise.
2781         (vld2_lane_u8): Define without macro.
2782         (vld2_lane_u16): Likewise.
2783         (vld2_lane_u32): Likewise.
2784         (vld2_lane_u64): Likewise.
2785         (vld2_lane_s8): Likewise.
2786         (vld2_lane_s16): Likewise.
2787         (vld2_lane_s32): Likewise.
2788         (vld2_lane_s64): Likewise.
2789         (vld2_lane_f16): Likewise.
2790         (vld2_lane_f32): Likewise.
2791         (vld2_lane_f64): Likewise.
2792         (vld2_lane_p8): Likewise.
2793         (vld2_lane_p16): Likewise.
2794         (vld2_lane_p64): Likewise.
2795         (vld2q_lane_u8): Likewise.
2796         (vld2q_lane_u16): Likewise.
2797         (vld2q_lane_u32): Likewise.
2798         (vld2q_lane_u64): Likewise.
2799         (vld2q_lane_s8): Likewise.
2800         (vld2q_lane_s16): Likewise.
2801         (vld2q_lane_s32): Likewise.
2802         (vld2q_lane_s64): Likewise.
2803         (vld2q_lane_f16): Likewise.
2804         (vld2q_lane_f32): Likewise.
2805         (vld2q_lane_f64): Likewise.
2806         (vld2q_lane_p8): Likewise.
2807         (vld2q_lane_p16): Likewise.
2808         (vld2q_lane_p64): Likewise.
2809         (vld2_lane_bf16): Likewise.
2810         (vld2q_lane_bf16): Likewise.
2811
2812 2021-08-17  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
2813
2814         * haifa-sched.c (advance_one_cycle): Output more context-synchronization
2815         lines for diff.
2816
2817 2021-08-17  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
2818
2819         * haifa-sched.c (enum rfs_decision, rfs_str): Add RFS_AUTOPREF.
2820         (rank_for_schedule): Use it.
2821
2822 2021-08-17  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
2823
2824         PR rtl-optimization/91598
2825         * haifa-sched.c (autopref_rank_for_schedule): Prioritize "irrelevant"
2826         insns after memory reads and before memory writes.
2827
2828 2021-08-17  Alistair_Lee  <alistair.lee@arm.com>
2829
2830         * rtl.h (CONST_VECTOR_P): New macro.
2831         * config/aarch64/aarch64.c (aarch64_get_sve_pred_bits): Use RTL
2832         code testing macros.
2833         (aarch64_ptrue_all_mode): Likewise.
2834         (aarch64_expand_mov_immediate): Likewise.
2835         (aarch64_const_vec_all_in_range_p): Likewise.
2836         (aarch64_rtx_costs): Likewise.
2837         (aarch64_legitimate_constant_p): Likewise.
2838         (aarch64_simd_valid_immediate): Likewise.
2839         (aarch64_simd_make_constant): Likewise.
2840         (aarch64_convert_mult_to_shift): Likewise.
2841         (aarch64_expand_sve_vec_perm): Likewise.
2842         (aarch64_vec_fpconst_pow_of_2): Likewise.
2843
2844 2021-08-17  Andrew MacLeod  <amacleod@redhat.com>
2845
2846         PR tree-optimization/101938
2847         * range-op.cc (operator_abs::op1_range): Special case
2848         -TYPE_MIN_VALUE for flag_wrapv.
2849
2850 2021-08-17  Kewen Lin  <linkw@linux.ibm.com>
2851
2852         * tree-vect-slp.c (vectorizable_bb_reduc_epilogue): Add the cost for
2853         value extraction.
2854
2855 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
2856
2857         * tree.def (OMP_SCOPE): New tree code.
2858         * tree.h (OMP_SCOPE_BODY, OMP_SCOPE_CLAUSES): Define.
2859         * tree-nested.c (convert_nonlocal_reference_stmt,
2860         convert_local_reference_stmt, convert_gimple_call): Handle
2861         GIMPLE_OMP_SCOPE.
2862         * tree-pretty-print.c (dump_generic_node): Handle OMP_SCOPE.
2863         * gimple.def (GIMPLE_OMP_SCOPE): New gimple code.
2864         * gimple.c (gimple_build_omp_scope): New function.
2865         (gimple_copy): Handle GIMPLE_OMP_SCOPE.
2866         * gimple.h (gimple_build_omp_scope): Declare.
2867         (gimple_has_substatements): Handle GIMPLE_OMP_SCOPE.
2868         (gimple_omp_scope_clauses, gimple_omp_scope_clauses_ptr,
2869         gimple_omp_scope_set_clauses): New inline functions.
2870         (CASE_GIMPLE_OMP): Add GIMPLE_OMP_SCOPE.
2871         * gimple-pretty-print.c (dump_gimple_omp_scope): New function.
2872         (pp_gimple_stmt_1): Handle GIMPLE_OMP_SCOPE.
2873         * gimple-walk.c (walk_gimple_stmt): Likewise.
2874         * gimple-low.c (lower_stmt): Likewise.
2875         * gimplify.c (is_gimple_stmt): Handle OMP_MASTER.
2876         (gimplify_scan_omp_clauses): For task reductions, handle OMP_SCOPE
2877         like ORT_WORKSHARE constructs.  Adjust diagnostics for %<scope%>
2878         allowing task reductions.  Reject inscan reductions on scope.
2879         (omp_find_stores_stmt): Handle GIMPLE_OMP_SCOPE.
2880         (gimplify_omp_workshare, gimplify_expr): Handle OMP_SCOPE.
2881         * tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_SCOPE.
2882         (estimate_num_insns): Likewise.
2883         * omp-low.c (build_outer_var_ref): Look through GIMPLE_OMP_SCOPE
2884         contexts if var isn't privatized there.
2885         (check_omp_nesting_restrictions): Handle GIMPLE_OMP_SCOPE.
2886         (scan_omp_1_stmt): Likewise.
2887         (maybe_add_implicit_barrier_cancel): Look through outer
2888         scope constructs.
2889         (lower_omp_scope): New function.
2890         (lower_omp_task_reductions): Handle OMP_SCOPE.
2891         (lower_omp_1): Handle GIMPLE_OMP_SCOPE.
2892         (diagnose_sb_1, diagnose_sb_2): Likewise.
2893         * omp-expand.c (expand_omp_single): Support also GIMPLE_OMP_SCOPE.
2894         (expand_omp): Handle GIMPLE_OMP_SCOPE.
2895         (omp_make_gimple_edges): Likewise.
2896         * omp-builtins.def (BUILT_IN_GOMP_SCOPE_START): New built-in.
2897
2898 2021-08-17  Richard Biener  <rguenther@suse.de>
2899
2900         PR tree-optimization/101925
2901         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Set
2902         reverse on COMPONENT_REF and ARRAY_REF according to
2903         what reverse_storage_order_for_component_p does.
2904         (vn_reference_eq): Compare reversed on reference ops.
2905         (reverse_storage_order_for_component_p): New overload.
2906         (vn_reference_lookup_3): Check reverse_storage_order_for_component_p
2907         on the reference looked up.
2908
2909 2021-08-17  Jeff Law  <jlaw@localhost.localdomain>
2910
2911         * config/h8300/h8300.c (shift_alg_si): Avoid loops for most SImode
2912         shifts on the H8/S.
2913         (h8300_option_override): Use loops on H8/S more often when optimizing
2914         for size.
2915         (get_shift_alg): Handle new "special" cases on H8/S.  Simplify
2916         accordingly.  Handle various arithmetic right shifts with special
2917         sequences that we couldn't handle before.
2918
2919 2021-08-16  Jeff Law  <jlaw@localhost.localdomain>
2920
2921         * config.gcc (rl78-*-elf*): Do not include dbxelf.h.
2922
2923 2021-08-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2924
2925         * config/sparc/rtemself.h (SPARC_GCOV_TYPE_SIZE): Define.
2926         * config/sparc/sparc.c (sparc_gcov_type_size): New.
2927         (TARGET_GCOV_TYPE_SIZE): Redefine if SPARC_GCOV_TYPE_SIZE is defined.
2928         * coverage.c (get_gcov_type): Use targetm.gcov_type_size().
2929         * doc/tm.texi (TARGET_GCOV_TYPE_SIZE): Add hook under "Misc".
2930         * doc/tm.texi.in: Regenerate.
2931         * target.def (gcov_type_size): New target hook.
2932         * targhooks.c (default_gcov_type_size): New.
2933         * targhooks.h (default_gcov_type_size): Declare.
2934         * tree-profile.c (gimple_gen_edge_profiler): Use precision of
2935         gcov_type_node.
2936         (gimple_gen_time_profiler): Likewise.
2937
2938 2021-08-16  Eric Botcazou  <ebotcazou@gcc.gnu.org>
2939
2940         * dwarf2out.c (add_scalar_info): Deal with DW_AT_data_bit_offset.
2941
2942 2021-08-16  Tobias Burnus  <tobias@codesourcery.com>
2943
2944         PR middle-end/101931
2945         * omp-low.c (omp_runtime_api_call): Update for routines
2946         added in the meanwhile.
2947
2948 2021-08-16  Martin Liska  <mliska@suse.cz>
2949
2950         PR tree-optimization/100393
2951         * tree-switch-conversion.c (group_cluster::dump): Use
2952           get_comparison_count.
2953         (jump_table_cluster::find_jump_tables): Pre-compute number of
2954         comparisons and then decrement it. Cache also max_ratio.
2955         (jump_table_cluster::can_be_handled): Change signature.
2956         * tree-switch-conversion.h (get_comparison_count): New.
2957
2958 2021-08-16  Eric Botcazou  <ebotcazou@gcc.gnu.org>
2959
2960         * dwarf2out.c (add_data_member_location_attribute): Use GNAT
2961         encodings only when -fgnat-encodings=all is specified.
2962         (add_bound_info): Likewise.
2963         (add_byte_size_attribute): Likewise.
2964         (gen_member_die): Likewise.
2965
2966 2021-08-16  Thomas Schwinge  <thomas@codesourcery.com>
2967
2968         * omp-oacc-neuter-broadcast.cc
2969         (execute_omp_oacc_neuter_broadcast): Plug 'par' memory leak.
2970
2971 2021-08-16  Thomas Schwinge  <thomas@codesourcery.com>
2972
2973         * omp-oacc-neuter-broadcast.cc
2974         (execute_omp_oacc_neuter_broadcast): Clarify memory management for
2975         'prop_set'.
2976
2977 2021-08-16  Thomas Schwinge  <thomas@codesourcery.com>
2978
2979         * omp-oacc-neuter-broadcast.cc (field_map): Move variable into...
2980         (execute_omp_oacc_neuter_broadcast): ... here.
2981         (install_var_field, build_receiver_ref, build_sender_ref): Take
2982         'field_map_t *' parameter.  Adjust all users.
2983         (worker_single_copy, neuter_worker_single): Take a
2984         'record_field_map_t *' parameter.  Adjust all users.
2985
2986 2021-08-16  liuhongt  <hongtao.liu@intel.com>
2987
2988         PR target/101930
2989         * config/i386/i386.md (ldexp<mode>3): Force operands[1] to
2990         reg.
2991
2992 2021-08-16  Martin Liska  <mliska@suse.cz>
2993
2994         PR ipa/101726
2995         * multiple_target.c (create_dispatcher_calls): Make default
2996           function local only if it is a definition.
2997
2998 2021-08-16  Martin Liska  <mliska@suse.cz>
2999
3000         PR ipa/100600
3001         * ipa-icf-gimple.c (func_checker::compare_ssa_name): Do not
3002           consider equal SSA_NAMEs when one is a param.
3003
3004 2021-08-16  liuhongt  <hongtao.liu@intel.com>
3005
3006         PR target/101846
3007         * config/i386/i386-expand.c (ix86_expand_vec_perm_vpermt2):
3008         Support vpermi2b for V32QI/V16QImode.
3009         (ix86_extract_perm_from_pool_constant): New function.
3010         (ix86_expand_vec_one_operand_perm_avx512): Support
3011         vpermw/vpermb under TARGET_AVX512BW/TARGET_AVX512VBMI.
3012         (expand_vec_perm_1): Adjust comments for upper.
3013         * config/i386/i386-protos.h (ix86_extract_perm_from_pool_constant):
3014         New declare.
3015         * config/i386/predicates.md (permvar_truncate_operand): New predicate.
3016         (pshufb_truncv4siv4hi_operand): Ditto.
3017         (pshufb_truncv8hiv8qi_operand): Ditto.
3018         * config/i386/sse.md (*avx512bw_permvar_truncv16siv16hi_1):
3019         New pre_reload define_insn_and_split.
3020         (*avx512f_permvar_truncv8siv8hi_1): Ditto.
3021         (*avx512f_vpermvar_truncv8div8si_1): Ditto.
3022         (*avx512f_permvar_truncv32hiv32qi_1): Ditto.
3023         (*avx512f_permvar_truncv16hiv16qi_1): Ditto.
3024         (*avx512f_permvar_truncv4div4si_1): Ditto.
3025         (*avx512f_pshufb_truncv8hiv8qi_1): Ditto.
3026         (*avx512f_pshufb_truncv4siv4hi_1): Ditto.
3027         (*avx512f_pshufd_truncv2div2si_1): Ditto.
3028
3029 2021-08-16  Kito Cheng  <kito.cheng@sifive.com>
3030
3031         * config/riscv/multilib-generator: Support code model option for
3032         multi-lib.
3033         * doc/install.texi: Add document of new option for
3034         --with-multilib-generator.
3035
3036 2021-08-15  Clément Chigot  <clement.chigot@atos.net>
3037
3038         * config/rs6000/rs6000.c (xcoff_tls_exec_model_detected): New.
3039         (rs6000_legitimize_tls_address_aix): Use it.
3040         (rs6000_xcoff_file_end): Add ".ref __tls_get_addr" when
3041         xcoff_tls_exec_model_detected is true.
3042
3043 2021-08-15  Jeff Law  <jlaw@localhost.localdomain>
3044
3045         * config/h8300/h8300.c (shift_alg_si): Retune H8/300H shifts
3046         to allow a bit more code growth, saving many dozens of cycles.
3047         (h8300_option_override): Adjus shift_alg_si if optimizing for
3048         code size.
3049         (get_shift_alg): Use special + inline shifts for residuals
3050         in more cases.
3051
3052 2021-08-14  Stafford Horne  <shorne@gmail.com>
3053
3054         PR target/99783
3055         * config/or1k/or1k-opts.h: New file.
3056         * config/or1k/or1k.c (or1k_legitimize_address_1, print_reloc):
3057         Support generating gotha relocations if -mcmodel=large is
3058         specified.
3059         * config/or1k/or1k.h (TARGET_CMODEL_SMALL, TARGET_CMODEL_LARGE):
3060         New macros.
3061         * config/or1k/or1k.opt (mcmodel=): New option.
3062         * doc/invoke.texi (OpenRISC Options): Document mcmodel.
3063
3064 2021-08-14  Martin Sebor  <msebor@redhat.com>
3065
3066         PR middle-end/101791
3067         * gimple-ssa-warn-access.cc (new_delete_mismatch_p): Use new argument
3068         to valid_new_delete_pair_p.
3069         * tree.c (valid_new_delete_pair_p): Add argument.
3070         * tree.h (valid_new_delete_pair_p): Same.
3071
3072 2021-08-14  Jakub Jelinek  <jakub@redhat.com>
3073
3074         PR target/101896
3075         * config/i386/i386-expand.c (expand_vec_perm_broadcast_1)
3076         <case E_V64QImode>: For this mode assert
3077         !TARGET_AVX512BW || d->perm[0] rather than !TARGET_AVX2 || d->perm[0].
3078
3079 2021-08-13  Michael Meissner  <meissner@linux.ibm.com>
3080
3081         PR target/99921
3082         * config/rs6000/altivec.md (xxeval): Use register_predicate
3083         instead of altivec_register_predicate.
3084
3085 2021-08-13  Martin Sebor  <msebor@redhat.com>
3086
3087         PR middle-end/101734
3088         * tree-ssa-uninit.c (maybe_warn_read_write_only): New function.
3089         (maybe_warn_operand): Call it.
3090
3091 2021-08-13  Martin Liska  <mliska@suse.cz>
3092
3093         PR ipa/101354
3094         * attribs.c (decl_attributes): Make naked functions "noipa"
3095           functions.
3096
3097 2021-08-13  Martin Liska  <mliska@suse.cz>
3098
3099         PR ipa/101261
3100         * symtab.c (symtab_node::noninterposable_alias): Do not create
3101           local aliases for target_clone functions as the clonning pass
3102           rejects aliases.
3103
3104 2021-08-13  Martin Liska  <mliska@suse.cz>
3105
3106         * opts.c (LIVE_PATCHING_OPTION): Define.
3107         (control_options_for_live_patching): Use it in error messages.
3108
3109 2021-08-13  Jan Hubicka  <hubicka@ucw.cz>
3110
3111         * ipa-modref.c (dump_eaf_flags): Dump EAF_NOREAD.
3112         (implicit_const_eaf_flags, implicit_pure_eaf_flags,
3113          ignore_stores_eaf_flags): New constants.
3114         (remove_useless_eaf_flags): New function.
3115         (eaf_flags_useful_p): Use it.
3116         (deref_flags): Add EAF_NOT_RETURNED if flag is unused;
3117         handle EAF_NOREAD.
3118         (modref_lattice::init): Add EAF_NOREAD.
3119         (modref_lattice::add_escape_point): Do not reacord escape point if
3120         result is unused.
3121         (modref_lattice::merge): EAF_NOESCAPE implies EAF_NODIRECTESCAPE;
3122         use remove_useless_eaf_flags.
3123         (modref_lattice::merge_deref): Use ignore_stores_eaf_flags.
3124         (modref_lattice::merge_direct_load): Add EAF_NOREAD
3125         (analyze_ssa_name_flags): Fix handling EAF_NOT_RETURNED
3126         (analyze_parms): Use remove_useless_eaf_flags.
3127         (ipa_merge_modref_summary_after_inlining): Use ignore_stores_eaf_flags.
3128         (modref_merge_call_site_flags): Add caller and ecf_flags parameter;
3129         use remove_useless_eaf_flags.
3130         (modref_propagate_flags_in_scc): Update.
3131         * ipa-modref.h: Turn eaf_flags_t back to char.
3132         * tree-core.h (EAF_NOT_RETURNED): Fix.
3133         (EAF_NOREAD): New constant
3134         * tree-ssa-alias.c: (ref_maybe_used_by_call_p_1): Check for
3135         EAF_NOREAD.
3136         * tree-ssa-structalias.c (handle_rhs_call): Handle new flags.
3137         (handle_pure_call): Likewise.
3138
3139 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
3140
3141         * tree.def (OMP_MASKED): New tree code.
3142         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_FILTER.
3143         * tree.h (OMP_MASKED_BODY, OMP_MASKED_CLAUSES, OMP_MASKED_COMBINED,
3144         OMP_CLAUSE_FILTER_EXPR): Define.
3145         * tree.c (omp_clause_num_ops): Add OMP_CLAUSE_FILTER entry.
3146         (omp_clause_code_name): Likewise.
3147         (walk_tree_1): Handle OMP_CLAUSE_FILTER.
3148         * tree-nested.c (convert_nonlocal_omp_clauses,
3149         convert_local_omp_clauses): Handle OMP_CLAUSE_FILTER.
3150         (convert_nonlocal_reference_stmt, convert_local_reference_stmt,
3151         convert_gimple_call): Handle GIMPLE_OMP_MASTER.
3152         * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_FILTER.
3153         (dump_generic_node): Handle OMP_MASTER.
3154         * gimple.def (GIMPLE_OMP_MASKED): New gimple code.
3155         * gimple.c (gimple_build_omp_masked): New function.
3156         (gimple_copy): Handle GIMPLE_OMP_MASKED.
3157         * gimple.h (gimple_build_omp_masked): Declare.
3158         (gimple_has_substatements): Handle GIMPLE_OMP_MASKED.
3159         (gimple_omp_masked_clauses, gimple_omp_masked_clauses_ptr,
3160         gimple_omp_masked_set_clauses): New inline functions.
3161         (CASE_GIMPLE_OMP): Add GIMPLE_OMP_MASKED.
3162         * gimple-pretty-print.c (dump_gimple_omp_masked): New function.
3163         (pp_gimple_stmt_1): Handle GIMPLE_OMP_MASKED.
3164         * gimple-walk.c (walk_gimple_stmt): Likewise.
3165         * gimple-low.c (lower_stmt): Likewise.
3166         * gimplify.c (is_gimple_stmt): Handle OMP_MASTER.
3167         (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_FILTER.  For clauses
3168         that take one expression rather than decl or constant, force
3169         gimplification of that into a SSA_NAME or temporary unless min
3170         invariant.
3171         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_FILTER.
3172         (gimplify_expr): Handle OMP_MASKED.
3173         * tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_MASKED.
3174         (estimate_num_insns): Likewise.
3175         * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_FILTER.
3176         (check_omp_nesting_restrictions): Handle GIMPLE_OMP_MASKED.  Adjust
3177         diagnostics for existence of masked construct.
3178         (scan_omp_1_stmt, lower_omp_master, lower_omp_1, diagnose_sb_1,
3179         diagnose_sb_2): Handle GIMPLE_OMP_MASKED.
3180         * omp-expand.c (expand_omp_synch, expand_omp, omp_make_gimple_edges):
3181         Likewise.
3182
3183 2021-08-12  Uroš Bizjak  <ubizjak@gmail.com>
3184
3185         PR target/98309
3186         * config/i386/i386.md (avx512f_scalef<mode>2): New insn pattern.
3187         (ldexp<mode>3): Use avx512f_scalef<mode>2.
3188         (UNSPEC_SCALEF): Move from ...
3189         * config/i386/sse.md (UNSPEC_SCALEF): ... here.
3190
3191 2021-08-12  Jan Hubicka  <hubicka@ucw.cz>
3192
3193         * ipa-split.c (consider_split): Fix condition testing void functions.
3194
3195 2021-08-12  Aldy Hernandez  <aldyh@redhat.com>
3196
3197         * doc/invoke.texi: Remove docs for threader-mode param.
3198         * flag-types.h (enum threader_mode): Remove.
3199         * params.opt: Remove threader-mode param.
3200         * tree-ssa-threadbackward.c (class back_threader): Remove
3201         path_is_unreachable_p.
3202         Make find_paths private.
3203         Add maybe_thread and thread_through_all_blocks.
3204         Remove reference marker for m_registry.
3205         Remove reference marker for m_profit.
3206         (back_threader::back_threader): Adjust for registry and profit not
3207         being references.
3208         (dump_path): Move down.
3209         (debug): Move down.
3210         (class thread_jumps): Remove.
3211         (class back_threader_registry): Remove m_all_paths.
3212         Remove destructor.
3213         (thread_jumps::thread_through_all_blocks): Move to back_threader
3214         class.
3215         (fsm_find_thread_path): Remove
3216         (back_threader::maybe_thread): New.
3217         (back_threader::thread_through_all_blocks): Move from
3218         thread_jumps.
3219         (back_threader_registry::back_threader_registry): Remove
3220         m_all_paths.
3221         (back_threader_registry::~back_threader_registry): Remove.
3222         (thread_jumps::find_taken_edge): Remove.
3223         (thread_jumps::check_subpath_and_update_thread_path): Remove.
3224         (thread_jumps::maybe_register_path): Remove.
3225         (thread_jumps::handle_phi): Remove.
3226         (handle_assignment_p): Remove.
3227         (thread_jumps::handle_assignment): Remove.
3228         (thread_jumps::fsm_find_control_statement_thread_paths): Remove.
3229         (thread_jumps::find_jump_threads_backwards): Remove.
3230         (thread_jumps::find_jump_threads_backwards_with_ranger): Remove.
3231         (try_thread_blocks): Rename find_jump_threads_backwards to
3232         maybe_thread.
3233         (pass_early_thread_jumps::execute): Same.
3234
3235 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
3236
3237         * tree-core.h (omp_clause_proc_bind_kind): Add
3238         OMP_CLAUSE_PROC_BIND_PRIMARY.
3239         * tree-pretty-print.c (dump_omp_clause): Add TODO comment to
3240         change 'master' to 'primary' in proc_bind for OpenMP 5.1.
3241
3242 2021-08-12  Claudiu Zissulescu  <claziss@synopsys.com>
3243
3244         * common/config/arc/arc-common.c (arc_option_init_struct): Remove
3245         fno-common reference.
3246         * config/arc/arc.c (arc_override_options): Remove overriding of
3247         flag_no_common.
3248
3249 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
3250
3251         PR target/101860
3252         * config/i386/i386-expand.c (ix86_expand_vec_one_operand_perm_avx512):
3253         If d->testing_p, return true after performing checks instead of
3254         actually expanding the insn.
3255         (expand_vec_perm_broadcast_1): Handle V32HImode - assert
3256         !TARGET_AVX512BW and return false.
3257
3258 2021-08-12  Eric Botcazou  <ebotcazou@gcc.gnu.org>
3259
3260         * configure.ac (PE linker --disable-dynamicbase support): New check.
3261         * configure: Regenerate.
3262         * config.in: Likewise.
3263         * config/i386/mingw32.h (LINK_SPEC_DISABLE_DYNAMICBASE): New define.
3264         (LINK_SPEC): Use it.
3265         * config/i386/mingw-w64.h (LINK_SPEC_DISABLE_DYNAMICBASE): Likewise.
3266         (LINK_SPEC): Likewise.
3267
3268 2021-08-12  liuhongt  <hongtao.liu@intel.com>
3269
3270         PR target/101846
3271         * config/i386/sse.md (*avx2_zero_extendv16qiv16hi2_2): New
3272         post_reload define_insn_and_split.
3273         (*avx512bw_zero_extendv32qiv32hi2_2): Ditto.
3274         (*sse4_1_zero_extendv8qiv8hi2_4): Ditto.
3275         (*avx512f_zero_extendv16hiv16si2_2): Ditto.
3276         (*avx2_zero_extendv8hiv8si2_2): Ditto.
3277         (*sse4_1_zero_extendv4hiv4si2_4): Ditto.
3278         (*avx512f_zero_extendv8siv8di2_2): Ditto.
3279         (*avx2_zero_extendv4siv4di2_2): Ditto.
3280         (*sse4_1_zero_extendv2siv2di2_4): Ditto.
3281         (VI248_256, VI248_512, VI148_512, VI148_256, VI148_128): New
3282         mode iterator.
3283
3284 2021-08-11  Bill Schmidt  <wschmidt@linux.ibm.com>
3285
3286         * config/rs6000/rs6000-builtin-new.def: Add always, power5, and
3287         power6 stanzas.
3288
3289 2021-08-11  Bill Schmidt  <wschmidt@linux.ibm.com>
3290
3291         * config/rs6000/rs6000-builtin-new.def: Add vsx stanza.
3292
3293 2021-08-11  Bill Schmidt  <wschmidt@linux.ibm.com>
3294
3295         * config/rs6000/rs6000-builtin-new.def: Finish altivec stanza.
3296         * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move
3297         initialization of pcvoid_type_node here...
3298         (altivec_init_builtins): ...from here.
3299         * config/rs6000/rs6000.h (rs6000_builtin_type_index): Add
3300         RS6000_BTI_const_ptr_void.
3301         (pcvoid_type_node): New macro.
3302
3303 2021-08-11  Richard Biener  <rguenther@suse.de>
3304
3305         PR target/101877
3306         * tree-ssa-forwprop.c (pass_forwprop::execute): Do not decompose
3307         hard-register accesses.
3308
3309 2021-08-11  Richard Biener  <rguenther@suse.de>
3310
3311         * tree-ssa-operands.c (operands_scanner::get_expr_operands):
3312         Do not look at COMPONENT_REF FIELD_DECLs TREE_THIS_VOLATILE
3313         to determine has_volatile_ops.
3314
3315 2021-08-11  Eric Botcazou  <ebotcazou@gcc.gnu.org>
3316
3317         * cfgexpand.c (expand_used_vars): Reuse attribs local variable.
3318
3319 2021-08-11  Jan Hubicka  <hubicka@ucw.cz>
3320             Alexandre Oliva  <oliva@adacore.com>
3321
3322         * ipa-modref.c (modref_lattice::dump): Fix escape_point's min_flags
3323         dumping.
3324         (modref_lattice::merge_deref): Fix handling of indirect scape points.
3325         (update_escape_summary_1): Likewise.
3326         (update_escape_summary): Likewise.
3327         (ipa_merge_modref_summary_after_inlining): Likewise.
3328
3329 2021-08-11  Richard Biener  <rguenther@suse.de>
3330
3331         PR middle-end/101858
3332         * fold-const.c (fold_binary_loc): Guard simplification
3333         of  X < (cast) (1 << Y) to integer types.
3334
3335 2021-08-11  Richard Biener  <rguenther@suse.de>
3336
3337         PR tree-optimization/101861
3338         * tree-vect-stmts.c (vectorizable_load): Fix error in
3339         previous change with regard to gather vectorization.
3340
3341 2021-08-11  prathamesh.kulkarni  <prathamesh.kulkarni@linaro.org>
3342
3343         PR target/66791
3344         * config/arm/arm_neon.h (vdup_n_s8): Replace call to builtin
3345         with constructor.
3346         (vdup_n_s16): Likewise.
3347         (vdup_n_s32): Likewise.
3348         (vdup_n_s64): Likewise.
3349         (vdup_n_u8): Likewise.
3350         (vdup_n_u16): Likewise.
3351         (vdup_n_u32): Likewise.
3352         (vdup_n_u64): Likewise.
3353         (vdup_n_p8): Likewise.
3354         (vdup_n_p16): Likewise.
3355         (vdup_n_p64): Likewise.
3356         (vdup_n_f16): Likewise.
3357         (vdup_n_f32): Likewise.
3358         (vdupq_n_s8): Likewise.
3359         (vdupq_n_s16): Likewise.
3360         (vdupq_n_s32): Likewise.
3361         (vdupq_n_s64): Likewise.
3362         (vdupq_n_u8): Likewise.
3363         (vdupq_n_u16): Likewise.
3364         (vdupq_n_u32): Likewise.
3365         (vdupq_n_u64): Likewise.
3366         (vdupq_n_p8): Likewise.
3367         (vdupq_n_p16): Likewise.
3368         (vdupq_n_p64): Likewise.
3369         (vdupq_n_f16): Likewise.
3370         (vdupq_n_f32): Likewise.
3371         (vmov_n_s8): Replace call to builtin with call to corresponding
3372         vdup_n intrinsic.
3373         (vmov_n_s16): Likewise.
3374         (vmov_n_s32): Likewise.
3375         (vmov_n_s64): Likewise.
3376         (vmov_n_u8): Likewise.
3377         (vmov_n_u16): Likewise.
3378         (vmov_n_u32): Likewise.
3379         (vmov_n_u64): Likewise.
3380         (vmov_n_p8): Likewise.
3381         (vmov_n_p16): Likewise.
3382         (vmov_n_f16): Likewise.
3383         (vmov_n_f32): Likewise.
3384         (vmovq_n_s8): Likewise.
3385         (vmovq_n_s16): Likewise.
3386         (vmovq_n_s32): Likewise.
3387         (vmovq_n_s64): Likewise.
3388         (vmovq_n_u8): Likewise.
3389         (vmovq_n_u16): Likewise.
3390         (vmovq_n_u32): Likewise.
3391         (vmovq_n_u64): Likewise.
3392         (vmovq_n_p8): Likewise.
3393         (vmovq_n_p16): Likewise.
3394         (vmovq_n_f16): Likewise.
3395         (vmovq_n_f32): Likewise.
3396         * config/arm/arm_neon_builtins.def: Remove entries for vdup_n.
3397
3398 2021-08-11  liuhongt  <hongtao.liu@intel.com>
3399
3400         PR target/98309
3401         * config/i386/i386.md (ldexp<mode>3): Extend to vscalefs[sd]
3402         when TARGET_AVX512F and TARGET_SSE_MATH.
3403
3404 2021-08-10  Jakub Jelinek  <jakub@redhat.com>
3405
3406         PR target/80355
3407         * config/i386/i386-expand.c (expand_vec_perm_even_odd): Return false
3408         for V32HImode if !TARGET_AVX512BW.
3409         (ix86_vectorize_vec_perm_const) <case E_V32HImode, case E_V64QImode>:
3410         If !TARGET_AVX512BW and TARGET_AVX512F and d.testing_p, don't fail
3411         early, but actually check the permutation.
3412
3413 2021-08-10  Richard Biener  <rguenther@suse.de>
3414
3415         PR tree-optimization/101809
3416         * tree-vect-stmts.c (get_load_store_type): Allow emulated
3417         gathers with offset vector nunits being a constant multiple
3418         of the data vector nunits.
3419         (vect_get_gather_scatter_ops): Use the appropriate nunits
3420         for the offset vector defs.
3421         (vectorizable_store): Adjust call to
3422         vect_get_gather_scatter_ops.
3423         (vectorizable_load): Likewise.  Handle the case of less
3424         offset vectors than data vectors.
3425
3426 2021-08-10  Jakub Jelinek  <jakub@redhat.com>
3427
3428         PR target/80355
3429         * config/i386/sse.md (*avx512f_shuf_<shuffletype>64x2_1<mask_name>_1,
3430         *avx512f_shuf_<shuffletype>32x4_1<mask_name>_1): New define_insn
3431         patterns.
3432
3433 2021-08-10  Richard Biener  <rguenther@suse.de>
3434
3435         PR tree-optimization/101801
3436         PR tree-optimization/101819
3437         * tree-vectorizer.h (vect_emulated_vector_p): Declare.
3438         * tree-vect-loop.c (vect_emulated_vector_p): New function.
3439         (vectorizable_reduction): Re-instantiate a check for emulated
3440         operations.
3441         * tree-vect-stmts.c (vectorizable_shift): Likewise.
3442         (vectorizable_operation): Likewise.  Cost emulated vector
3443         operations according to the scalar sequence synthesized by
3444         vector lowering.
3445
3446 2021-08-10  Richard Biener  <rguenther@suse.de>
3447
3448         PR middle-end/101824
3449         * tree-nested.c (get_frame_field): Mark the COMPONENT_REF as
3450         volatile in case the variable was.
3451
3452 2021-08-10  H.J. Lu  <hjl.tools@gmail.com>
3453
3454         PR target/101804
3455         * config/i386/constraints.md (BC): Document for integer SSE
3456         constant all bits set operand.
3457         (BF): New constraint for const floating-point all bits set
3458         vectors.
3459         * config/i386/i386.c (standard_sse_constant_p): Likewise.
3460         (standard_sse_constant_opcode): Likewise.
3461         * config/i386/sse.md (sseconstm1): New mode attribute.
3462         (mov<mode>_internal): Replace BC with <sseconstm1>.
3463
3464 2021-08-10  liuhongt  <hongtao.liu@intel.com>
3465
3466         * config/i386/sse.md (cond_<insn><mode>): New expander.
3467         (VI248_AVX512VLBW): New mode iterator.
3468         * config/i386/predicates.md
3469         (nonimmediate_or_const_vec_dup_operand): New predicate.
3470
3471 2021-08-09  Andrew MacLeod  <amacleod@redhat.com>
3472
3473         PR tree-optimization/101741
3474         * gimple-range-fold.cc (fold_using_range::range_of_builtin_call): Check
3475         type of parameter for toupper/tolower.
3476
3477 2021-08-09  Martin Jambor  <mjambor@suse.cz>
3478
3479         PR testsuite/101654
3480         * ipa-prop.c (propagate_controlled_uses): Removed a spurious space.
3481
3482 2021-08-09  Pat Haugen  <pthaugen@linux.ibm.com>
3483
3484         * config/rs6000/rs6000.c (is_load_insn1): Verify destination is a
3485         register.
3486         (is_store_insn1): Verify source is a register.
3487
3488 2021-08-09  Uroš Bizjak  <ubizjak@gmail.com>
3489
3490         PR target/101812
3491         * config/i386/mmx.md (<any_logic:code>v2sf3):
3492         Rename from *mmx_<any_logic:code>v2sf3
3493
3494 2021-08-09  Thomas Schwinge  <thomas@codesourcery.com>
3495
3496         * config/nvptx/nvptx.c: Cross-reference parts adapted in
3497         'gcc/omp-oacc-neuter-broadcast.cc'.
3498         * omp-low.c: Likewise.
3499         * omp-oacc-neuter-broadcast.cc: Cross-reference parts adapted from
3500         the above files.
3501
3502 2021-08-09  Julian Brown  <julian@codesourcery.com>
3503             Kwok Cheung Yeung  <kcy@codesourcery.com>
3504             Thomas Schwinge  <thomas@codesourcery.com>
3505
3506         * config/gcn/gcn.c (gcn_init_builtins): Override decls for
3507         BUILT_IN_GOACC_SINGLE_START, BUILT_IN_GOACC_SINGLE_COPY_START,
3508         BUILT_IN_GOACC_SINGLE_COPY_END and BUILT_IN_GOACC_BARRIER.
3509         (gcn_goacc_validate_dims): Turn on worker partitioning unconditionally.
3510         (gcn_fork_join): Update comment.
3511         * config/gcn/gcn.opt (flag_worker_partitioning): Remove.
3512         (macc_experimental_workers): Remove unused option.
3513
3514 2021-08-09  Julian Brown  <julian@codesourcery.com>
3515             Nathan Sidwell  <nathan@codesourcery.com> (via 'gcc/config/nvptx/nvptx.c' master)
3516             Kwok Cheung Yeung  <kcy@codesourcery.com>
3517             Thomas Schwinge  <thomas@codesourcery.com>
3518
3519         * Makefile.in (OBJS): Add omp-oacc-neuter-broadcast.o.
3520         * doc/tm.texi.in (TARGET_GOACC_CREATE_WORKER_BROADCAST_RECORD):
3521         Add documentation hook.
3522         * doc/tm.texi: Regenerate.
3523         * omp-oacc-neuter-broadcast.cc: New file.
3524         * omp-builtins.def (BUILT_IN_GOACC_BARRIER)
3525         (BUILT_IN_GOACC_SINGLE_START, BUILT_IN_GOACC_SINGLE_COPY_START)
3526         (BUILT_IN_GOACC_SINGLE_COPY_END): New builtins.
3527         * passes.def (pass_omp_oacc_neuter_broadcast): Add pass.
3528         * target.def (goacc.create_worker_broadcast_record): Add target
3529         hook.
3530         * tree-pass.h (make_pass_omp_oacc_neuter_broadcast): Add
3531         prototype.
3532         * config/gcn/gcn-protos.h (gcn_goacc_adjust_propagation_record):
3533         Rename prototype to...
3534         (gcn_goacc_create_worker_broadcast_record): ... this.
3535         * config/gcn/gcn-tree.c (gcn_goacc_adjust_propagation_record): Rename
3536         function to...
3537         (gcn_goacc_create_worker_broadcast_record): ... this.
3538         * config/gcn/gcn.c (TARGET_GOACC_ADJUST_PROPAGATION_RECORD):
3539         Rename to...
3540         (TARGET_GOACC_CREATE_WORKER_BROADCAST_RECORD): ... this.
3541
3542 2021-08-09  Tejas Belagod  <tejas.belagod@arm.com>
3543
3544         PR target/101609
3545         * config/aarch64/aarch64-simd.md (vlshr<mode>3, vashr<mode>3): Use
3546         the right iterator.
3547
3548 2021-08-09  Thomas Schwinge  <thomas@codesourcery.com>
3549
3550         * Makefile.in (GTFILES): Remove '$(srcdir)/omp-offload.c'.
3551
3552 2021-08-09  Thomas Schwinge  <thomas@codesourcery.com>
3553
3554         * builtins.def (DEF_GOACC_BUILTIN, DEF_GOMP_BUILTIN): Don't
3555         consider '-foffload-abi'.
3556         * common.opt (-foffload-abi): Remove 'Var', 'Init'.
3557         * opts.c (common_handle_option) <-foffload-abi> [ACCEL_COMPILER]:
3558         Ignore.
3559
3560 2021-08-09  Thomas Schwinge  <thomas@codesourcery.com>
3561
3562         * optc-gen.awk: Sanity check that 'Init' doesn't appear without
3563         'Var'.
3564
3565 2021-08-09  Thomas Schwinge  <thomas@codesourcery.com>
3566
3567         * omp-builtins.def (BUILT_IN_ACC_GET_DEVICE_TYPE): Remove.
3568
3569 2021-08-09  Thomas Schwinge  <thomas@codesourcery.com>
3570
3571         * doc/gty.texi (Files): Update.
3572
3573 2021-08-09  Thomas Schwinge  <thomas@codesourcery.com>
3574
3575         * doc/gty.texi (Files): Fix GTY header file example.
3576
3577 2021-08-09  Roger Sayle  <roger@nextmovesoftware.com>
3578
3579         * tree-ssa-ccp.c (value_mask_to_min_max): Helper function to
3580         determine the upper and lower bounds from a mask-value pair.
3581         (bit_value_unop) [ABS_EXPR, ABSU_EXPR]: Add support for
3582         absolute value and unsigned absolute value expressions.
3583         (bit_value_binop):  Initialize *VAL's precision.
3584         [LT_EXPR, LE_EXPR]: Use value_mask_to_min_max to determine
3585         upper and lower bounds of operands.  Add LE_EXPR/GE_EXPR
3586         support when the operands are unknown but potentially equal.
3587         [MIN_EXPR, MAX_EXPR]: Support minimum/maximum expressions.
3588
3589 2021-08-09  Bin Cheng  <bin.cheng@linux.alibaba.com>
3590
3591         * config/aarch64/aarch64.md
3592         (*extend<SHORT:mode><GPI:mode>2_aarch64): Use %<GPI:w>0.
3593
3594 2021-08-08  Sergei Trofimovich  <siarheit@google.com>
3595
3596         * lra-constraints.c: Fix s/otput/output/ typo.
3597
3598 2021-08-06  Martin Sebor  <msebor@redhat.com>
3599
3600         * builtins.c (expand_builtin_memchr): Move to gimple-ssa-warn-access.cc.
3601         (expand_builtin_strcat): Same.
3602         (expand_builtin_stpncpy): Same.
3603         (expand_builtin_strncat): Same.
3604         (check_read_access): Same.
3605         (check_memop_access): Same.
3606         (expand_builtin_strlen): Move checks to gimple-ssa-warn-access.cc.
3607         (expand_builtin_strnlen): Same.
3608         (expand_builtin_memcpy): Same.
3609         (expand_builtin_memmove): Same.
3610         (expand_builtin_mempcpy): Same.
3611         (expand_builtin_strcpy): Same.
3612         (expand_builtin_strcpy_args): Same.
3613         (expand_builtin_stpcpy_1): Same.
3614         (expand_builtin_strncpy): Same.
3615         (expand_builtin_memset): Same.
3616         (expand_builtin_bzero): Same.
3617         (expand_builtin_strcmp): Same.
3618         (expand_builtin_strncmp): Same.
3619         (expand_builtin): Remove handlers.
3620         (fold_builtin_strlen): Add a comment.
3621         * builtins.h (check_access): Move to gimple-ssa-warn-access.cc.
3622         * calls.c (maybe_warn_nonstring_arg): Same.
3623         * diagnostic-spec.c (nowarn_spec_t::nowarn_spec_t): Add warning option.
3624         * gimple-fold.c (gimple_fold_builtin_strcpy): Pass argument to callee.
3625         (gimple_fold_builtin_stpcpy): Same.
3626         * gimple-ssa-warn-access.cc (has_location): New function.
3627         (get_location): Same.
3628         (get_callee_fndecl): Same.
3629         (call_nargs): Same.
3630         (call_arg): Same.
3631         (warn_string_no_nul): Define.
3632         (unterminated_array): Same.
3633         (check_nul_terminated_array): Same.
3634         (maybe_warn_nonstring_arg): Same.
3635         (maybe_warn_for_bound): Same.
3636         (warn_for_access): Same.
3637         (check_access): Same.
3638         (check_memop_access): Same.
3639         (check_read_access): Same.
3640         (warn_dealloc_offset): Use helper functions.
3641         (maybe_emit_free_warning): Same.
3642         (class pass_waccess): Add members.
3643         (check_strcat): New function.
3644         (check_strncat): New function.
3645         (check_stxcpy): New function.
3646         (check_stxncpy): New function.
3647         (check_strncmp): New function.
3648         (pass_waccess::check_builtin): New function.
3649         (pass_waccess::check): Call it.
3650         * gimple-ssa-warn-access.h (warn_string_no_nul): Move here from
3651         builtins.h.
3652         (maybe_warn_for_bound): Same.
3653         (check_access): Same.
3654         (check_memop_access): Same.
3655         (check_read_access): Same.
3656         * pointer-query.h (struct access_data): Define a ctor overload.
3657
3658 2021-08-06  Richard Biener  <rguenther@suse.de>
3659
3660         PR tree-optimization/101801
3661         * tree-vectorizer.h (vect_worthwhile_without_simd_p): Rename...
3662         (vect_can_vectorize_without_simd_p): ... to this.
3663         * tree-vect-loop.c (vect_worthwhile_without_simd_p): Rename...
3664         (vect_can_vectorize_without_simd_p): ... to this and fold
3665         in vect_min_worthwhile_factor.
3666         (vect_min_worthwhile_factor): Remove.
3667         (vectorizable_reduction): Adjust and remove the cost part.
3668         * tree-vect-stmts.c (vectorizable_shift): Likewise.
3669         (vectorizable_operation): Likewise.
3670
3671 2021-08-06  Uroš Bizjak  <ubizjak@gmail.com>
3672
3673         PR target/101797
3674         * config/i386/i386.md (cmove reg-to-reg move elimination peephole2s):
3675         Add general_gr_operand predicate to operand 3.
3676
3677 2021-08-06  Roger Sayle  <roger@nextmovesoftware.com>
3678
3679         * tree-ssa-phiopt.c (cond_removal_in_builtin_zero_pattern): Use
3680         CFN_BUILT_IN_CLRSB* instead of BUILT_IN_CLRSB* for consistency.
3681
3682 2021-08-06  Tamar Christina  <tamar.christina@arm.com>
3683
3684         * config/aarch64/aarch64-sve-builtins.cc (register_svpattern,
3685         register_svprfop): Pass vec<> by pointer.
3686         * langhooks-def.h (lhd_simulate_enum_decl): Likewise.
3687         * langhooks.c (lhd_simulate_enum_decl): Likewise.
3688         * langhooks.h (struct lang_hooks_for_types): Likewise.
3689
3690 2021-08-06  Jonathan Wright  <jonathan.wright@arm.com>
3691
3692         * config/aarch64/arm_neon.h (vst1_bf16_x2): Use
3693         __builtin_memcpy instead of constructing an additional
3694         __builtin_aarch64_simd_oi one vector at a time.
3695         (vst1q_bf16_x2): Likewise.
3696         (vst1_bf16_x3): Use __builtin_memcpy instead of constructing
3697         an additional __builtin_aarch64_simd_ci one vector at a time.
3698         (vst1q_bf16_x3): Likewise.
3699         (vst1_bf16_x4): Use __builtin_memcpy instead of a union.
3700         (vst1q_bf16_x4): Likewise.
3701         (vst2_bf16): Use __builtin_memcpy instead of constructing an
3702         additional __builtin_aarch64_simd_oi one vector at a time.
3703         (vst2q_bf16): Likewise.
3704         (vst3_bf16): Use __builtin_memcpy instead of constructing an
3705         additional __builtin_aarch64_simd_ci mode one vector at a
3706         time.
3707         (vst3q_bf16): Likewise.
3708         (vst4_bf16): Use __builtin_memcpy instead of constructing an
3709         additional __builtin_aarch64_simd_xi one vector at a time.
3710         (vst4q_bf16): Likewise.
3711
3712 2021-08-06  Jonathan Wright  <jonathan.wright@arm.com>
3713
3714         * config/aarch64/arm_neon.h (__ST2_LANE_FUNC): Delete.
3715         (__ST2Q_LANE_FUNC): Delete.
3716         (vst2_lane_f16): Use __builtin_memcpy to copy vector
3717         structure instead of constructing __builtin_aarch64_simd_oi
3718         one vector at a time.
3719         (vst2_lane_f32): Likewise.
3720         (vst2_lane_f64): Likewise.
3721         (vst2_lane_p8): Likewise.
3722         (vst2_lane_p16): Likewise.
3723         (vst2_lane_p64): Likewise.
3724         (vst2_lane_s8): Likewise.
3725         (vst2_lane_s16): Likewise.
3726         (vst2_lane_s32): Likewise.
3727         (vst2_lane_s64): Likewise.
3728         (vst2_lane_u8): Likewise.
3729         (vst2_lane_u16): Likewise.
3730         (vst2_lane_u32): Likewise.
3731         (vst2_lane_u64): Likewise.
3732         (vst2_lane_bf16): Likewise.
3733         (vst2q_lane_f16): Use __builtin_memcpy to copy vector
3734         structure instead of using a union.
3735         (vst2q_lane_f32): Likewise.
3736         (vst2q_lane_f64): Likewise.
3737         (vst2q_lane_p8): Likewise.
3738         (vst2q_lane_p16): Likewise.
3739         (vst2q_lane_p64): Likewise.
3740         (vst2q_lane_s8): Likewise.
3741         (vst2q_lane_s16): Likewise.
3742         (vst2q_lane_s32): Likewise.
3743         (vst2q_lane_s64): Likewise.
3744         (vst2q_lane_u8): Likewise.
3745         (vst2q_lane_u16): Likewise.
3746         (vst2q_lane_u32): Likewise.
3747         (vst2q_lane_u64): Likewise.
3748         (vst2q_lane_bf16): Likewise.
3749
3750 2021-08-06  Jonathan Wright  <jonathan.wright@arm.com>
3751
3752         * config/aarch64/arm_neon.h (__ST3_LANE_FUNC): Delete.
3753         (__ST3Q_LANE_FUNC): Delete.
3754         (vst3_lane_f16): Use __builtin_memcpy to copy vector
3755         structure instead of constructing __builtin_aarch64_simd_ci
3756         one vector at a time.
3757         (vst3_lane_f32): Likewise.
3758         (vst3_lane_f64): Likewise.
3759         (vst3_lane_p8): Likewise.
3760         (vst3_lane_p16): Likewise.
3761         (vst3_lane_p64): Likewise.
3762         (vst3_lane_s8): Likewise.
3763         (vst3_lane_s16): Likewise.
3764         (vst3_lane_s32): Likewise.
3765         (vst3_lane_s64): Likewise.
3766         (vst3_lane_u8): Likewise.
3767         (vst3_lane_u16): Likewise.
3768         (vst3_lane_u32): Likewise.
3769         (vst3_lane_u64): Likewise.
3770         (vst3_lane_bf16): Likewise.
3771         (vst3q_lane_f16): Use __builtin_memcpy to copy vector
3772         structure instead of using a union.
3773         (vst3q_lane_f32): Likewise.
3774         (vst3q_lane_f64): Likewise.
3775         (vst3q_lane_p8): Likewise.
3776         (vst3q_lane_p16): Likewise.
3777         (vst3q_lane_p64): Likewise.
3778         (vst3q_lane_s8): Likewise.
3779         (vst3q_lane_s16): Likewise.
3780         (vst3q_lane_s32): Likewise.
3781         (vst3q_lane_s64): Likewise.
3782         (vst3q_lane_u8): Likewise.
3783         (vst3q_lane_u16): Likewise.
3784         (vst3q_lane_u32): Likewise.
3785         (vst3q_lane_u64): Likewise.
3786         (vst3q_lane_bf16): Likewise.
3787
3788 2021-08-06  Jonathan Wright  <jonathan.wright@arm.com>
3789
3790         * config/aarch64/arm_neon.h (__ST4_LANE_FUNC): Delete.
3791         (__ST4Q_LANE_FUNC): Delete.
3792         (vst4_lane_f16): Use __builtin_memcpy to copy vector
3793         structure instead of constructing __builtin_aarch64_simd_xi
3794         one vector at a time.
3795         (vst4_lane_f32): Likewise.
3796         (vst4_lane_f64): Likewise.
3797         (vst4_lane_p8): Likewise.
3798         (vst4_lane_p16): Likewise.
3799         (vst4_lane_p64): Likewise.
3800         (vst4_lane_s8): Likewise.
3801         (vst4_lane_s16): Likewise.
3802         (vst4_lane_s32): Likewise.
3803         (vst4_lane_s64): Likewise.
3804         (vst4_lane_u8): Likewise.
3805         (vst4_lane_u16): Likewise.
3806         (vst4_lane_u32): Likewise.
3807         (vst4_lane_u64): Likewise.
3808         (vst4_lane_bf16): Likewise.
3809         (vst4q_lane_f16): Use __builtin_memcpy to copy vector
3810         structure instead of using a union.
3811         (vst4q_lane_f32): Likewise.
3812         (vst4q_lane_f64): Likewise.
3813         (vst4q_lane_p8): Likewise.
3814         (vst4q_lane_p16): Likewise.
3815         (vst4q_lane_p64): Likewise.
3816         (vst4q_lane_s8): Likewise.
3817         (vst4q_lane_s16): Likewise.
3818         (vst4q_lane_s32): Likewise.
3819         (vst4q_lane_s64): Likewise.
3820         (vst4q_lane_u8): Likewise.
3821         (vst4q_lane_u16): Likewise.
3822         (vst4q_lane_u32): Likewise.
3823         (vst4q_lane_u64): Likewise.
3824         (vst4q_lane_bf16): Likewise.
3825
3826 2021-08-06  Martin Liska  <mliska@suse.cz>
3827
3828         * config/rs6000/rs6000.c (rs6000_option_override_internal): When
3829         a target option is restored, it can have
3830         rs6000_long_double_type_size set to FLOAT_PRECISION_TFmode
3831         and error should not be emitted.
3832
3833 2021-08-06  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3834
3835         * gcov-io.h (gcov_write): Declare.
3836         * gcov-io.c (gcov_write): New.
3837         (gcov_write_counter): Remove.
3838         (gcov_write_tag_length): Likewise.
3839         (gcov_write_summary): Replace gcov_write_tag_length() with calls to
3840         gcov_write_unsigned().
3841         * doc/invoke.texi (fprofile-info-section): Mention
3842         __gcov_info_to_gdca().
3843
3844 2021-08-06  Martin Sebor  <msebor@redhat.com>
3845
3846         * dominance.c (prune_bbs_to_update_dominators): Adjust by-value vec
3847         arguments to by-reference.
3848         (iterate_fix_dominators): Same.
3849         * dominance.h (iterate_fix_dominators): Same.
3850         * ipa-prop.h: Call auto_vec::to_vec_legacy.
3851         * tree-data-ref.c (dump_data_dependence_relation): Adjust by-value vec
3852         arguments to by-reference.
3853         (debug_data_dependence_relation): Same.
3854         (dump_data_dependence_relations): Same.
3855         * tree-data-ref.h (debug_data_dependence_relation): Same.
3856         (dump_data_dependence_relations): Same.
3857         * tree-predcom.c (dump_chains): Same.
3858         (initialize_root_vars_lm): Same.
3859         (determine_unroll_factor): Same.
3860         (replace_phis_by_defined_names): Same.
3861         (insert_init_seqs): Same.
3862         (pcom_worker::tree_predictive_commoning_loop): Call
3863          auto_vec::to_vec_legacy.
3864         * tree-ssa-pre.c (insert_into_preds_of_block): Adjust by-value vec
3865         arguments to by-reference.
3866         * tree-ssa-threadbackward.c (populate_worklist): Same.
3867         (back_threader::resolve_def): Same.
3868         * tree-vect-data-refs.c (vect_check_nonzero_value): Same.
3869         (vect_enhance_data_refs_alignment): Same.
3870         (vect_check_lower_bound): Same.
3871         (vect_prune_runtime_alias_test_list): Same.
3872         (vect_permute_store_chain): Same.
3873         * tree-vect-slp-patterns.c (vect_normalize_conj_loc): Same.
3874         * tree-vect-stmts.c (vect_create_vectorized_demotion_stmts): Same.
3875         * tree-vectorizer.h (vect_permute_store_chain): Same.
3876         * vec.c (test_init): New function.
3877         (vec_c_tests): Call new function.
3878         * vec.h (vec): Declare ctors, dtor, and assignment.
3879         (auto_vec::vec_to_legacy): New function.
3880         (vec::copy): Adjust initialization.
3881
3882 2021-08-05  H.J. Lu  <hjl.tools@gmail.com>
3883
3884         PR target/99744
3885         * config/i386/i386.c (ix86_can_inline_p): Ignore MASK_80387 if
3886         callee only uses GPRs.
3887         * config/i386/ia32intrin.h: Revert commit 5463cee2770.
3888         * config/i386/serializeintrin.h: Revert commit 71958f740f1.
3889         * config/i386/x86gprintrin.h: Add
3890         #pragma GCC target("general-regs-only") and #pragma GCC pop_options
3891         to disable non-GPR ISAs.
3892
3893 2021-08-05  Richard Sandiford  <richard.sandiford@arm.com>
3894
3895         PR middle-end/101787
3896         * doc/md.texi (cond_ashl, cond_ashr, cond_lshr): Document.
3897
3898 2021-08-05  Richard Sandiford  <richard.sandiford@arm.com>
3899
3900         * tree-vectorizer.h (vect_is_store_elt_extraction, vect_is_reduction)
3901         (vect_reduc_type, vect_embedded_comparison_type, vect_comparison_type)
3902         (vect_is_extending_load, vect_is_integer_truncation): New functions,
3903         moved from aarch64.c but given different names.
3904         * config/aarch64/aarch64.c (aarch64_is_store_elt_extraction)
3905         (aarch64_is_reduction, aarch64_reduc_type)
3906         (aarch64_embedded_comparison_type, aarch64_comparison_type)
3907         (aarch64_extending_load_p, aarch64_integer_truncation_p): Delete
3908         in favor of the above.  Update callers accordingly.
3909
3910 2021-08-05  Richard Earnshaw  <rearnsha@arm.com>
3911
3912         PR target/101723
3913         * config/arm/arm-cpus.in (generic-armv7-a): Add quirk to suppress
3914         writing .cpu directive in asm output.
3915         * config/arm/arm.c (arm_identify_fpu_from_isa): New variable.
3916         (arm_last_printed_arch_string): Delete.
3917         (arm_last-printed_fpu_string): Delete.
3918         (arm_configure_build_target): If use of floating-point/SIMD is
3919         disabled, remove all fp/simd related features from the target ISA.
3920         (last_arm_targ_options): New variable.
3921         (arm_print_asm_arch_directives): Add new parameters.  Change order
3922         of emitted directives and handle all cases here.
3923         (arm_file_start): Always call arm_print_asm_arch_directives, move
3924         all generation of .arch/.arch_extension here.
3925         (arm_file_end): Call arm_print_asm_arch.
3926         (arm_declare_function_name): Call arm_print_asm_arch_directives
3927         instead of printing .arch/.fpu directives directly.
3928
3929 2021-08-05  Richard Earnshaw  <rearnsha@arm.com>
3930
3931         * config/arm/arm.c (arm_configure_build_target): Don't call
3932         arm_option_reconfigure_globals.
3933         (arm_option_restore): Call arm_option_reconfigure_globals after
3934         reconfiguring the target.
3935         * config/arm/arm-c.c (arm_pragma_target_parse): Likewise.
3936
3937 2021-08-05  Richard Earnshaw  <rearnsha@arm.com>
3938
3939         * config/arm/arm.c (arm_configure_build_target): Ensure the target's
3940         arch_name is always set.
3941
3942 2021-08-05  Jonathan Wright  <jonathan.wright@arm.com>
3943
3944         * config/aarch64/aarch64.c: Traverse RTL tree to prevent cost
3945         of vec_select high-half from being added into Neon subtract
3946         cost.
3947
3948 2021-08-05  Jonathan Wright  <jonathan.wright@arm.com>
3949
3950         * config/aarch64/aarch64.c: Traverse RTL tree to prevent cost
3951         of vec_select high-half from being added into Neon add cost.
3952
3953 2021-08-05  Kewen Lin  <linkw@linux.ibm.com>
3954
3955         * cfgloop.h (loops_list::loops_list): Add one optional argument
3956         root and adjust accordingly, update loop tree walking and factor
3957         out to ...
3958         * cfgloop.c (loops_list::walk_loop_tree): ... this.  New function.
3959
3960 2021-08-05  Eric Botcazou  <ebotcazou@gcc.gnu.org>
3961
3962         PR tree-optimization/101626
3963         * tree-sra.c (propagate_subaccesses_from_rhs): Do not set the
3964         reverse scalar storage order on a pointer or vector component.
3965
3966 2021-08-05  liuhongt  <hongtao.liu@intel.com>
3967
3968         * config/i386/sse.md (cond_<code><mode>): New expander.
3969
3970 2021-08-05  liuhongt  <hongtao.liu@intel.com>
3971
3972         * config/i386/sse.md (cond_<code><mode>): New expander.
3973
3974 2021-08-05  liuhongt  <hongtao.liu@intel.com>
3975
3976         * config/i386/sse.md (cond_<code><mode>): New expander.
3977
3978 2021-08-04  David Malcolm  <dmalcolm@redhat.com>
3979
3980         PR analyzer/101570
3981         * Makefile.in (ANALYZER_OBJS): Add analyzer/region-model-asm.o.
3982
3983 2021-08-04  H.J. Lu  <hjl.tools@gmail.com>
3984
3985         PR target/101742
3986         * config/i386/i386.h (STORE_MAX_PIECES): Allow 16/32/64 bytes
3987         only if TARGET_INTER_UNIT_MOVES_TO_VEC is true.
3988
3989 2021-08-04  H.J. Lu  <hjl.tools@gmail.com>
3990
3991         PR target/101772
3992         * config/i386/i386-expand.c (ix86_expand_vector_move): Call
3993         ix86_gen_scratch_sse_rtx to get a scratch SSE register to copy
3994         data with SSE register from one memory location to another.
3995
3996 2021-08-04  Andreas Krebbel  <krebbel@linux.ibm.com>
3997
3998         * config/s390/s390.c (expand_perm_with_vpdi): New function.
3999         (vectorize_vec_perm_const_1): Call expand_perm_with_vpdi.
4000         * config/s390/vector.md (*vpdi1<mode>, @vpdi1<mode>): Enable a
4001         parameterized expander.
4002         (*vpdi4<mode>, @vpdi4<mode>): Likewise.
4003
4004 2021-08-04  Andreas Krebbel  <krebbel@linux.ibm.com>
4005
4006         * config/s390/s390.c (MAX_VECT_LEN): Define macro.
4007         (struct expand_vec_perm_d): Define struct.
4008         (expand_perm_with_merge): New function.
4009         (vectorize_vec_perm_const_1): New function.
4010         (s390_vectorize_vec_perm_const): New function.
4011         (TARGET_VECTORIZE_VEC_PERM_CONST): Define target macro.
4012
4013 2021-08-04  Andreas Krebbel  <krebbel@linux.ibm.com>
4014
4015         * config/s390/vector.md (V_HW_64): Remove mode iterator.
4016         (*vec_load_pair<mode>): Use V_HW_2 instead of V_HW_64.
4017         * config/s390/vx-builtins.md
4018         (vec_scatter_element<V_HW_2:mode>_SI): Use V_HW_2 instead of
4019         V_HW_64.
4020
4021 2021-08-04  Andreas Krebbel  <krebbel@linux.ibm.com>
4022
4023         * config/s390/s390.md (UNSPEC_VEC_PERMI): Remove constant
4024         definition.
4025         * config/s390/vector.md (*vpdi1<mode>, *vpdi4<mode>): New pattern
4026         definitions.
4027         * config/s390/vx-builtins.md (*vec_permi<mode>): Emit generic rtx
4028         instead of an unspec.
4029
4030 2021-08-04  Andreas Krebbel  <krebbel@linux.ibm.com>
4031
4032         * config/s390/s390-modes.def: Add more vector modes to support
4033         concatenation of two vectors.
4034         * config/s390/s390-protos.h (s390_expand_merge_perm_const): Add
4035         prototype.
4036         (s390_expand_merge): Likewise.
4037         * config/s390/s390.c (s390_expand_merge_perm_const): New function.
4038         (s390_expand_merge): New function.
4039         * config/s390/s390.md (UNSPEC_VEC_MERGEH, UNSPEC_VEC_MERGEL):
4040         Remove constant definitions.
4041         * config/s390/vector.md (V_HW_2): Add mode iterators.
4042         (VI_HW_4, V_HW_4): Rename VI_HW_4 to V_HW_4.
4043         (vec_2x_nelts, vec_2x_wide): New mode attributes.
4044         (*vmrhb, *vmrlb, *vmrhh, *vmrlh, *vmrhf, *vmrlf, *vmrhg, *vmrlg):
4045         New pattern definitions.
4046         (vec_widen_umult_lo_<mode>, vec_widen_umult_hi_<mode>)
4047         (vec_widen_smult_lo_<mode>, vec_widen_smult_hi_<mode>)
4048         (vec_unpacks_lo_v4sf, vec_unpacks_hi_v4sf, vec_unpacks_lo_v2df)
4049         (vec_unpacks_hi_v2df): Adjust expanders to emit non-unspec RTX for
4050         vec merge.
4051         * config/s390/vx-builtins.md (V_HW_4): Remove mode iterator. Now
4052         in vector.md.
4053         (vec_mergeh<mode>, vec_mergel<mode>): Use s390_expand_merge to
4054         emit vec merge pattern.
4055
4056 2021-08-04  Jonathan Wright  <jonathan.wright@arm.com>
4057
4058         * config/aarch64/aarch64.c (aarch64_strip_extend_vec_half):
4059         Define.
4060         (aarch64_rtx_mult_cost): Traverse RTL tree to prevent cost of
4061         vec_select high-half from being added into Neon multiply
4062         cost.
4063         * rtlanal.c (vec_series_highpart_p): Define.
4064         * rtlanal.h (vec_series_highpart_p): Declare.
4065
4066 2021-08-04  Jonathan Wright  <jonathan.wright@arm.com>
4067
4068         * config/aarch64/aarch64.c (aarch64_strip_duplicate_vec_elt):
4069         Define.
4070         (aarch64_rtx_mult_cost): Traverse RTL tree to prevent
4071         vec_select cost from being added into Neon multiply cost.
4072
4073 2021-08-04  Richard Sandiford  <richard.sandiford@arm.com>
4074
4075         * tree-vect-loop.c (vect_better_loop_vinfo_p): Detect cases in
4076         which old_loop_vinfo is an epilogue loop that handles a constant
4077         number of iterations.
4078
4079 2021-08-04  Richard Sandiford  <richard.sandiford@arm.com>
4080
4081         * tree-vect-loop.c (vect_analyze_loop): Print a dump message
4082         when a reanalyzed loop fails to be cheaper than the current
4083         main loop.
4084
4085 2021-08-04  Richard Sandiford  <richard.sandiford@arm.com>
4086
4087         * config/aarch64/aarch64.c: Fix a typo.
4088
4089 2021-08-04  Vincent Lefèvre  <vincent-gcc@vinc17.net>
4090
4091         PR gcov-profile/101773
4092         * gcov-io.c (gcov_close): Check return code of a fclose.
4093
4094 2021-08-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4095
4096         PR ada/101575
4097         * dwarf2out.c (dwarf2out_assembly_start): Emit a dummy
4098         .file statement when needed.
4099
4100 2021-08-04  Richard Biener  <rguenther@suse.de>
4101
4102         * tree-vect-data-refs.c (vect_check_gather_scatter):
4103         Include widening conversions only when the result is
4104         still handed by native gather or the current offset
4105         size not already matches the data size.
4106         Also succeed analysis in case there's no native support,
4107         noted by a IFN_LAST ifn and a NULL decl.
4108         (vect_analyze_data_refs): Always consider gathers.
4109         * tree-vect-patterns.c (vect_recog_gather_scatter_pattern):
4110         Test for no IFN gather rather than decl gather.
4111         * tree-vect-stmts.c (vect_model_load_cost): Pass in the
4112         gather-scatter info and cost emulated gathers accordingly.
4113         (vect_truncate_gather_scatter_offset): Properly test for
4114         no IFN gather.
4115         (vect_use_strided_gather_scatters_p): Likewise.
4116         (get_load_store_type): Handle emulated gathers and its
4117         restrictions.
4118         (vectorizable_load): Likewise.  Emulate them by extracting
4119         scalar offsets, doing scalar loads and a vector construct.
4120
4121 2021-08-04  H.J. Lu  <hjl.tools@gmail.com>
4122
4123         PR target/101742
4124         * expr.c (op_by_pieces_d::op_by_pieces_d): Add a max_pieces
4125         argument to set m_max_size.
4126         (move_by_pieces_d): Pass MOVE_MAX_PIECES to op_by_pieces_d.
4127         (store_by_pieces_d): Pass STORE_MAX_PIECES to op_by_pieces_d.
4128         (compare_by_pieces_d): Pass COMPARE_MAX_PIECES to op_by_pieces_d.
4129
4130 2021-08-04  Roger Sayle  <roger@nextmovesoftware.com>
4131             Marc Glisse  <marc.glisse@inria.fr>
4132
4133         * match.pd (bit_ior, bit_xor): Canonicalize (X*C1)|(X*C2) and
4134         (X*C1)^(X*C2) as X*(C1+C2), and related variants, using
4135         tree_nonzero_bits to ensure that operands are bit-wise disjoint.
4136
4137 2021-08-04  Richard Biener  <rguenther@suse.de>
4138
4139         * tree-ssa-forwprop.c (pass_forwprop::execute): Split
4140         out code to decompose vector loads ...
4141         (optimize_vector_load): ... here.  Generalize it to
4142         handle intermediate widening and TARGET_MEM_REF loads
4143         and apply it to loads with a supported vector mode as well.
4144
4145 2021-08-04  Richard Biener  <rguenther@suse.de>
4146
4147         PR tree-optimization/101756
4148         * tree-vect-slp.c (vectorizable_bb_reduc_epilogue): Make sure
4149         the result of the reduction epilogue is compatible to the original
4150         scalar result.
4151
4152 2021-08-04  liuhongt  <hongtao.liu@intel.com>
4153
4154         PR target/101743
4155         * config/i386/i386.md (peephole2): Refine predicate from
4156         register_operand to general_reg_operand.
4157
4158 2021-08-04  Aldy Hernandez  <aldyh@redhat.com>
4159
4160         * gimple-range-path.h (path_range_query::dump): Mark override.
4161
4162 2021-08-04  Richard Biener  <rguenther@suse.de>
4163
4164         PR tree-optimization/101769
4165         * tree-tailcall.c (eliminate_tail_call): Add the created loop
4166         for the first recursion and return it via the new output parameter.
4167         (optimize_tail_call): Pass through new output param.
4168         (tree_optimize_tail_calls_1): After creating all latches,
4169         add the created loop to the loop tree.  Do not mark loops for fixup.
4170
4171 2021-08-04  Martin Liska  <mliska@suse.cz>
4172
4173         * doc/invoke.texi: Document threader-mode param.
4174
4175 2021-08-04  liuhongt  <hongtao.liu@intel.com>
4176
4177         * config/i386/sse.md (cond_fma<mode>): New expander.
4178         (cond_fms<mode>): Ditto.
4179         (cond_fnma<mode>): Ditto.
4180         (cond_fnms<mode>): Ditto.
4181
4182 2021-08-03  Segher Boessenkool  <segher@kernel.crashing.org>
4183
4184         * config/rs6000/vsx.md (*vsx_le_perm_store_<mode>): Use && instead of &.
4185
4186 2021-08-03  Segher Boessenkool  <segher@kernel.crashing.org>
4187
4188         * config/rs6000/constraints.md: Remove "e" from the list of available
4189         constraint characters.
4190
4191 2021-08-03  Eugene Rozenfeld  <erozen@microsoft.com>
4192
4193         PR gcov-profile/71672
4194         * auto-profile.c (afdo_indirect_call): Fix setup of the historgram value for indirect calls.
4195
4196 2021-08-03  Paul A. Clarke  <pc@us.ibm.com>
4197
4198         * config/rs6000/smmintrin.h (_mm_minpos_epu16): New.
4199
4200 2021-08-03  H.J. Lu  <hjl.tools@gmail.com>
4201
4202         * config/i386/i386.c (ix86_gen_scratch_sse_rtx): In 64-bit mode,
4203         try XMM31 to avoid vzeroupper.
4204
4205 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4206
4207         * doc/invoke.texi: Document -mtune=neoverse-512tvb and
4208         -mcpu=neoverse-512tvb.
4209         * config/aarch64/aarch64-cores.def (neoverse-512tvb): New entry.
4210         * config/aarch64/aarch64-tune.md: Regenerate.
4211         * config/aarch64/aarch64.c (neoverse512tvb_sve_vector_cost)
4212         (neoverse512tvb_sve_issue_info, neoverse512tvb_vec_issue_info)
4213         (neoverse512tvb_vector_cost, neoverse512tvb_tunings): New structures.
4214         (aarch64_adjust_body_cost_sve): Handle -mtune=neoverse-512tvb.
4215         (aarch64_adjust_body_cost): Likewise.
4216
4217 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4218
4219         * config/aarch64/aarch64.c (aarch64_add_stmt_cost): Only
4220         record issue information for operations that occur in the
4221         innermost loop.
4222
4223 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4224
4225         * config/aarch64/aarch64.c (aarch64_multiply_add_p): Add a vec_flags
4226         parameter.  Detect cases in which an Advanced SIMD MLA would almost
4227         certainly require a MOV.
4228         (aarch64_count_ops): Update accordingly.
4229
4230 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4231
4232         * config/aarch64/aarch64.c (aarch64_is_store_elt_extraction): New
4233         function, split out from...
4234         (aarch64_detect_vector_stmt_subtype): ...here.
4235         (aarch64_add_stmt_cost): Treat extracting element 0 as free.
4236
4237 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4238
4239         * config/aarch64/aarch64-protos.h (sve_vec_cost):
4240         Add gather_load_x32_cost and gather_load_x64_cost.
4241         * config/aarch64/aarch64.c (generic_sve_vector_cost)
4242         (a64fx_sve_vector_cost, neoversev1_sve_vector_cost): Update
4243         accordingly, using the values given by the scalar_load * number
4244         of elements calculation that we used previously.
4245         (aarch64_detect_vector_stmt_subtype): Use the new fields.
4246
4247 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4248
4249         * config/aarch64/aarch64.c (aarch64_adjust_body_cost_sve): New
4250         function, split out from...
4251         (aarch64_adjust_body_cost): ...here.
4252
4253 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4254
4255         * config/aarch64/fractional-cost.h: New file.
4256         * config/aarch64/aarch64.c: Include <algorithm> (indirectly)
4257         and cost_fraction.h.
4258         (vec_cost_fraction): New typedef.
4259         (aarch64_detect_scalar_stmt_subtype): Use it for statement costs.
4260         (aarch64_detect_vector_stmt_subtype): Likewise.
4261         (aarch64_sve_adjust_stmt_cost, aarch64_adjust_stmt_cost): Likewise.
4262         (aarch64_estimate_min_cycles_per_iter): Use vec_cost_fraction
4263         for cycle counts.
4264         (aarch64_adjust_body_cost): Likewise.
4265         (aarch64_test_cost_fraction): New function.
4266         (aarch64_run_selftests): Call it.
4267
4268 2021-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4269
4270         * config/aarch64/aarch64-protos.h (tune_params::sve_width): Turn
4271         into a bitmask.
4272         * config/aarch64/aarch64.c (aarch64_cmp_autovec_modes): Update
4273         accordingly.
4274         (aarch64_estimated_poly_value): Likewise.  Use the least significant
4275         set bit for the minimum and likely values.  Use the most significant
4276         set bit for the maximum value.
4277
4278 2021-08-03  liuhongt  <hongtao.liu@intel.com>
4279
4280         * config/i386/sse.md (cond_<insn><mode>): New expander.
4281         (cond_mul<mode>): Ditto.
4282
4283 2021-08-03  Kewen Lin  <linkw@linux.ibm.com>
4284
4285         * tree-cfg.c (move_sese_region_to_fn): Fix typos on dloop.
4286
4287 2021-08-03  liuhongt  <hongtao.liu@intel.com>
4288
4289         * config/i386/sse.md (cond_<insn><mode>):New expander.
4290         (cond_mul<mode>): Ditto.
4291         (cond_div<mode>): Ditto.
4292
4293 2021-08-02  H.J. Lu  <hjl.tools@gmail.com>
4294
4295         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Also
4296         check stack_realign_needed for stack realignment.
4297         (ix86_legitimate_constant_p): Always allow CONST_WIDE_INT smaller
4298         than the largest integer supported by vector register.
4299         * config/i386/i386.h (MAX_MOVE_MAX): New.  Set to 64.
4300         (MOVE_MAX): Set to bytes of the largest integer supported by
4301         vector register.
4302         (STORE_MAX_PIECES): New.
4303
4304 2021-08-02  H.J. Lu  <hjl.tools@gmail.com>
4305
4306         * config/i386/i386-expand.c (ix86_expand_vector_move): Call
4307         ix86_gen_scratch_sse_rtx to get a scratch SSE register to copy
4308         data from one memory location to another.
4309
4310 2021-08-02  H.J. Lu  <hjl.tools@gmail.com>
4311
4312         PR middle-end/90773
4313         * config/i386/i386.c (TARGET_GEN_MEMSET_SCRATCH_RTX): New.
4314
4315 2021-08-02  Aldy Hernandez  <aldyh@redhat.com>
4316
4317         PR tree-optimization/101724
4318         * params.opt: Remove --param=threader-iterative.
4319         * tree-ssa-threadbackward.c (pass_thread_jumps::execute): Remove
4320         iterative mode.
4321
4322 2021-08-02  Tom de Vries  <tdevries@suse.de>
4323
4324         PR middle-end/101665
4325         * doc/extend.texi (nonnull attribute): Improve documentation.
4326
4327 2021-08-02  Andrew Pinski  <apinski@marvell.com>
4328
4329         PR rtl-optimization/101683
4330         * rtlanal.c (may_trap_p_1): Handle UNSIGNED_FIX.
4331
4332 2021-08-02  Roger Sayle  <roger@nextmovesoftware.com>
4333
4334         * tree-ssa-phiopt.c (cond_removal_in_builtin_zero_pattern):
4335         Renamed from cond_removal_in_popcount_clz_ctz_pattern.
4336         Add support for BSWAP, FFS, PARITY and CLRSB builtins.
4337         (tree_ssa_phiop_worker): Update call to function above.
4338
4339 2021-08-01  H.J. Lu  <hjl.tools@gmail.com>
4340
4341         PR target/78103
4342         * config/i386/i386.md (bsr_rex64_1_zext): New.
4343         (combine splitter for constant - clzll): Replace gen_bsr_rex64_1
4344         with gen_bsr_rex64_1_zext.
4345
4346 2021-07-31  Jakub Jelinek  <jakub@redhat.com>
4347
4348         PR target/78103
4349         * config/i386/i386.md (bsr_rex64_1, bsr_1, bsr_zext_1): New
4350         define_insn patterns.
4351         (*bsr_rex64_2, *bsr_2): New define_insn_and_split patterns.
4352         Add combine splitters for constant - clz.
4353         (clz<mode>2): Use a temporary pseudo for bsr result.
4354
4355 2021-07-30  Paul A. Clarke  <pc@us.ibm.com>
4356
4357         * config/rs6000/smmintrin.h (_mm_floor_pd, _mm_floor_ps,
4358         _mm_floor_sd, _mm_floor_ss): New.
4359
4360 2021-07-30  Paul A. Clarke  <pc@us.ibm.com>
4361
4362         * config/rs6000/smmintrin.h (_mm_ceil_pd, _mm_ceil_ps,
4363         _mm_ceil_sd, _mm_ceil_ss): New.
4364
4365 2021-07-30  Paul A. Clarke  <pc@us.ibm.com>
4366
4367         * config/rs6000/smmintrin.h (_mm_blend_pd, _mm_blendv_pd,
4368         _mm_blend_ps, _mm_blendv_ps): New.
4369
4370 2021-07-30  Roger Sayle  <roger@nextmovesoftware.com>
4371             Uroš Bizjak  <ubizjak@gmail.com>
4372
4373         * config/i386/i386.md (*dec_cmov<mode>): New define_insn_and_split
4374         to generate a conditional move using the carry flag after sub $1.
4375         (peephole2): Eliminate a register-to-register move by inverting
4376         the condition of a conditional move.
4377
4378 2021-07-30  Hans-Peter Nilsson  <hp@bitrange.com>
4379
4380         * config/mmix/mmix.md ("call", "call_value", "*call_real")
4381         ("*call_value_real"): Don't generate rtx mentioning the generic
4382         operands 1 and 2 to "call", and similarly for "call_value".
4383         * config/mmix/mmix.c (mmix_print_operand_punct_valid_p)
4384         (mmix_print_operand): Use '!' instead of 'p'.
4385
4386 2021-07-30  Hans-Peter Nilsson  <hp@bitrange.com>
4387
4388         * doc/md.texi (call): Correct information about operand 2.
4389         * config/mmix/mmix.md ("call", "call_value"): Remove fixed FIXMEs.
4390
4391 2021-07-30  Andrew MacLeod  <amacleod@redhat.com>
4392
4393         * range-op.cc (operator_trunc_mod::wi_fold): Fold constants.
4394
4395 2021-07-30  Andrew MacLeod  <amacleod@redhat.com>
4396
4397         * range-op.cc (operator_div::wi_fold): Return UNDEFINED for [0, 0] divisor.
4398
4399 2021-07-30  Andrew MacLeod  <amacleod@redhat.com>
4400
4401         * gimple-range-cache.cc (*::set_bb_range): Change const basic_block to
4402         const_basic_block..
4403         (*::get_bb_range): Ditto.
4404         (*::bb_range_p): Ditto.
4405         * gimple-range-cache.h: Change prototypes.
4406
4407 2021-07-30  H.J. Lu  <hjl.tools@gmail.com>
4408
4409         PR middle-end/90773
4410         * builtins.c (builtin_memcpy_read_str): Change the mode argument
4411         from scalar_int_mode to fixed_size_mode.
4412         (builtin_strncpy_read_str): Likewise.
4413         (gen_memset_value_from_prev): New function.
4414         (builtin_memset_read_str): Change the mode argument from
4415         scalar_int_mode to fixed_size_mode.  Use gen_memset_value_from_prev
4416         and support CONST_VECTOR.
4417         (builtin_memset_gen_str): Likewise.
4418         (try_store_by_multiple_pieces): Use by_pieces_constfn to declare
4419         constfun.
4420         * builtins.h (builtin_strncpy_read_str): Replace scalar_int_mode
4421         with fixed_size_mode.
4422         (builtin_memset_read_str): Likewise.
4423         * expr.c (widest_int_mode_for_size): Renamed to ...
4424         (widest_fixed_size_mode_for_size): Add a bool argument to
4425         indicate if QI vector mode can be used.
4426         (by_pieces_ninsns): Call widest_fixed_size_mode_for_size
4427         instead of widest_int_mode_for_size.
4428         (pieces_addr::adjust): Change the mode argument from
4429         scalar_int_mode to fixed_size_mode.
4430         (op_by_pieces_d): Make m_len read-only.  Add a bool member,
4431         m_qi_vector_mode, to indicate that QI vector mode can be used.
4432         (op_by_pieces_d::op_by_pieces_d): Add a bool argument to
4433         initialize m_qi_vector_mode.  Call widest_fixed_size_mode_for_size
4434         instead of widest_int_mode_for_size.
4435         (op_by_pieces_d::get_usable_mode): Change the mode argument from
4436         scalar_int_mode to fixed_size_mode.  Call
4437         widest_fixed_size_mode_for_size instead of
4438         widest_int_mode_for_size.
4439         (op_by_pieces_d::smallest_fixed_size_mode_for_size): New member
4440         function to return the smallest integer or QI vector mode.
4441         (op_by_pieces_d::run): Call widest_fixed_size_mode_for_size
4442         instead of widest_int_mode_for_size.  Call
4443         smallest_fixed_size_mode_for_size instead of
4444         smallest_int_mode_for_size.
4445         (store_by_pieces_d::store_by_pieces_d): Add a bool argument to
4446         indicate that QI vector mode can be used and pass it to
4447         op_by_pieces_d::op_by_pieces_d.
4448         (can_store_by_pieces): Call widest_fixed_size_mode_for_size
4449         instead of widest_int_mode_for_size.  Pass memsetp to
4450         widest_fixed_size_mode_for_size to support QI vector mode.
4451         Allow all CONST_VECTORs for memset if vec_duplicate is supported.
4452         (store_by_pieces): Pass memsetp to
4453         store_by_pieces_d::store_by_pieces_d.
4454         (clear_by_pieces_1): Removed.
4455         (clear_by_pieces): Replace clear_by_pieces_1 with
4456         builtin_memset_read_str and pass true to store_by_pieces_d to
4457         support vector mode broadcast.
4458         (string_cst_read_str): Change the mode argument from
4459         scalar_int_mode to fixed_size_mode.
4460         * expr.h (by_pieces_constfn): Change scalar_int_mode to
4461         fixed_size_mode.
4462         (by_pieces_prev): Likewise.
4463         * rtl.h (lowpart_subreg_regno): New.
4464         * rtlanal.c (lowpart_subreg_regno): New.  A wrapper around
4465         simplify_subreg_regno.
4466         * target.def (gen_memset_scratch_rtx): New hook.
4467         * doc/tm.texi.in: Add TARGET_GEN_MEMSET_SCRATCH_RTX.
4468         * doc/tm.texi: Regenerated.
4469
4470 2021-07-30  Xi Ruoyao  <xry111@mengyan1223.wang>
4471
4472         PR target/94780
4473         * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use
4474           TARGET_EXPR instead of MODIFY_EXPR.
4475
4476 2021-07-30  Xi Ruoyao  <xry111@mengyan1223.wang>
4477
4478         PR target/101132
4479         * config/mips/mips-protos.h (mips_expand_vec_cmp_expr): Declare.
4480         * config/mips/mips.c (mips_expand_vec_cmp_expr): New function.
4481         * config/mips/mips-msa.md (vec_cmp<MSA:mode><mode_i>): New
4482           expander.
4483           (vec_cmpu<IMSA:mode><mode_i>): New expander.
4484
4485 2021-07-30  H.J. Lu  <hjl.tools@gmail.com>
4486
4487         PR target/101685
4488         * config/i386/i386-options.c (ix86_option_override_internal):
4489         Don't enable LZCNT/POPCNT if they have been disabled explicitly.
4490
4491 2021-07-30  prathamesh.kulkarni  <prathamesh.kulkarni@linaro.org>
4492
4493         PR target/66791
4494         * config/arm/arm_neon.h (vld1_p64): Replace call to builtin by
4495         explicitly dereferencing __a.
4496         (vld1_s64): Likewise.
4497         (vld1_u64): Likewise.
4498         * config/arm/arm_neon_builtins.def (vld1): Remove entry for di
4499         and change to VAR13.
4500
4501 2021-07-30  Aldy Hernandez  <aldyh@redhat.com>
4502
4503         * gimple-loop-versioning.cc (lv_dom_walker::lv_dom_walker): Remove
4504         use of m_range_analyzer.
4505         (loop_versioning::lv_dom_walker::before_dom_children): Same.
4506         (loop_versioning::lv_dom_walker::after_dom_children): Remove.
4507         (loop_versioning::prune_loop_conditions): Replace vr_values use
4508         with range_query interface.
4509         (pass_loop_versioning::execute): Use ranger.
4510
4511 2021-07-30  Xi Ruoyao  <xry111@mengyan1223.wang>
4512
4513         PR ipa/101396
4514         * ipa-devirt.c (ipa_odr_read_section): Compare the precision of
4515           enum values, and emit a warning if they mismatch.
4516
4517 2021-07-30  Kewen Lin  <linkw@linux.ibm.com>
4518
4519         * cfgloop.h (as_const): New function.
4520         (class loop_iterator): Rename to ...
4521         (class loops_list): ... this.
4522         (loop_iterator::next): Rename to ...
4523         (loops_list::Iter::fill_curr_loop): ... this and adjust.
4524         (loop_iterator::loop_iterator): Rename to ...
4525         (loops_list::loops_list): ... this and adjust.
4526         (loops_list::Iter): New class.
4527         (loops_list::iterator): New type.
4528         (loops_list::const_iterator): New type.
4529         (loops_list::begin): New function.
4530         (loops_list::end): Likewise.
4531         (loops_list::begin const): Likewise.
4532         (loops_list::end const): Likewise.
4533         (FOR_EACH_LOOP): Remove.
4534         (FOR_EACH_LOOP_FN): Remove.
4535         * cfgloop.c (flow_loops_dump): Adjust FOR_EACH_LOOP* with range-based
4536         for loop with loops_list instance.
4537         (sort_sibling_loops): Likewise.
4538         (disambiguate_loops_with_multiple_latches): Likewise.
4539         (verify_loop_structure): Likewise.
4540         * cfgloopmanip.c (create_preheaders): Likewise.
4541         (force_single_succ_latches): Likewise.
4542         * config/aarch64/falkor-tag-collision-avoidance.c
4543         (execute_tag_collision_avoidance): Likewise.
4544         * config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc): Likewise.
4545         * config/s390/s390.c (s390_adjust_loops): Likewise.
4546         * doc/loop.texi: Likewise.
4547         * gimple-loop-interchange.cc (pass_linterchange::execute): Likewise.
4548         * gimple-loop-jam.c (tree_loop_unroll_and_jam): Likewise.
4549         * gimple-loop-versioning.cc (loop_versioning::analyze_blocks): Likewise.
4550         (loop_versioning::make_versioning_decisions): Likewise.
4551         * gimple-ssa-split-paths.c (split_paths): Likewise.
4552         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
4553         * graphite.c (canonicalize_loop_form): Likewise.
4554         (graphite_transform_loops): Likewise.
4555         * ipa-fnsummary.c (analyze_function_body): Likewise.
4556         * ipa-pure-const.c (analyze_function): Likewise.
4557         * loop-doloop.c (doloop_optimize_loops): Likewise.
4558         * loop-init.c (loop_optimizer_finalize): Likewise.
4559         (fix_loop_structure): Likewise.
4560         * loop-invariant.c (calculate_loop_reg_pressure): Likewise.
4561         (move_loop_invariants): Likewise.
4562         * loop-unroll.c (decide_unrolling): Likewise.
4563         (unroll_loops): Likewise.
4564         * modulo-sched.c (sms_schedule): Likewise.
4565         * predict.c (predict_loops): Likewise.
4566         (pass_profile::execute): Likewise.
4567         * profile.c (branch_prob): Likewise.
4568         * sel-sched-ir.c (sel_finish_pipelining): Likewise.
4569         (sel_find_rgns): Likewise.
4570         * tree-cfg.c (replace_loop_annotate): Likewise.
4571         (replace_uses_by): Likewise.
4572         (move_sese_region_to_fn): Likewise.
4573         * tree-if-conv.c (pass_if_conversion::execute): Likewise.
4574         * tree-loop-distribution.c (loop_distribution::execute): Likewise.
4575         * tree-parloops.c (parallelize_loops): Likewise.
4576         * tree-predcom.c (tree_predictive_commoning): Likewise.
4577         * tree-scalar-evolution.c (scev_initialize): Likewise.
4578         (scev_reset): Likewise.
4579         * tree-ssa-dce.c (find_obviously_necessary_stmts): Likewise.
4580         * tree-ssa-live.c (remove_unused_locals): Likewise.
4581         * tree-ssa-loop-ch.c (ch_base::copy_headers): Likewise.
4582         * tree-ssa-loop-im.c (analyze_memory_references): Likewise.
4583         (tree_ssa_lim_initialize): Likewise.
4584         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Likewise.
4585         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Likewise.
4586         * tree-ssa-loop-manip.c (get_loops_exits): Likewise.
4587         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations): Likewise.
4588         (free_numbers_of_iterations_estimates): Likewise.
4589         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Likewise.
4590         * tree-ssa-loop-split.c (tree_ssa_split_loops): Likewise.
4591         * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Likewise.
4592         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
4593         (pass_scev_cprop::execute): Likewise.
4594         * tree-ssa-propagate.c (clean_up_loop_closed_phi): Likewise.
4595         * tree-ssa-sccvn.c (do_rpo_vn): Likewise.
4596         * tree-ssa-threadupdate.c
4597         (jump_thread_path_registry::thread_through_all_blocks): Likewise.
4598         * tree-vectorizer.c (vectorize_loops): Likewise.
4599         * tree-vrp.c (vrp_asserts::find_assert_locations): Likewise.
4600
4601 2021-07-29  Hans-Peter Nilsson  <hp@bitrange.com>
4602
4603         * config/mmix/mmix.c (mmix_function_arg_1): Avoid
4604         generating a VOIDmode register for e.g the
4605         function_arg_info::end_marker.
4606
4607 2021-07-29  Jeff Law  <jeffreyalaw@gmail.com>
4608
4609         * config/h8300/h8300-modes.def: Add CCZ, CCV and CCC, drop CCZNV.
4610         * config/h8300/h8300.md (H8cc mode iterator): Add CCZ.
4611         (cc mode_attr): Similarly.
4612         (ccz subst_attr): Similarly.
4613         * config/h8300/jumpcall.md: Add new patterns for branch-on-bit.
4614         * config/h8300/testcompare.md: Remove various cc0 based patterns
4615         that had been commented out.  Add pattern to set CCZ from a bit
4616         test.
4617
4618 2021-07-29  Thomas Schwinge  <thomas@codesourcery.com>
4619             Julian Brown  <julian@codesourcery.com>
4620             Kwok Cheung Yeung  <kcy@codesourcery.com>
4621
4622         * omp-offload.c (oacc_loop_xform_head_tail, oacc_loop_process):
4623         'update_stmt' after modification.
4624         (pass_oacc_loop_designation): New function, extracted out of...
4625         (pass_oacc_device_lower): ... this.
4626         (pass_data_oacc_loop_designation, pass_oacc_loop_designation)
4627         (make_pass_oacc_loop_designation): New
4628         * passes.def: Add it.
4629         * tree-parloops.c (create_parallel_loop): Adjust.
4630         * tree-pass.h (make_pass_oacc_loop_designation): New.
4631
4632 2021-07-29  Aldy Hernandez  <aldyh@redhat.com>
4633
4634         * flag-types.h (enum threader_mode): New.
4635         * params.opt: Add entry for --param=threader-mode.
4636         * tree-ssa-threadbackward.c (THREADER_ITERATIVE_MODE): New.
4637         (class back_threader): New.
4638         (back_threader::back_threader): New.
4639         (back_threader::~back_threader): New.
4640         (back_threader::maybe_register_path): New.
4641         (back_threader::find_taken_edge): New.
4642         (back_threader::find_taken_edge_switch): New.
4643         (back_threader::find_taken_edge_cond): New.
4644         (back_threader::resolve_def): New.
4645         (back_threader::resolve_phi): New.
4646         (back_threader::find_paths_to_names): New.
4647         (back_threader::find_paths): New.
4648         (dump_path): New.
4649         (debug): New.
4650         (thread_jumps::find_jump_threads_backwards): Call ranger threader.
4651         (thread_jumps::find_jump_threads_backwards_with_ranger): New.
4652         (pass_thread_jumps::execute): Abstract out code...
4653         (try_thread_blocks): ...here.
4654         * tree-ssa-threadedge.c (jump_threader::thread_outgoing_edges):
4655         Abstract out threading candidate code to...
4656         (single_succ_to_potentially_threadable_block): ...here.
4657         * tree-ssa-threadedge.h (single_succ_to_potentially_threadable_block):
4658         New.
4659         * tree-ssa-threadupdate.c (register_jump_thread): Return boolean.
4660         * tree-ssa-threadupdate.h (class jump_thread_path_registry):
4661         Return bool from register_jump_thread.
4662
4663 2021-07-29  Andreas Krebbel  <krebbel@linux.ibm.com>
4664
4665         * target.def: in0 and in1 do not need to be registers.
4666         * doc/tm.texi: Regenerate.
4667
4668 2021-07-29  liuhongt  <hongtao.liu@intel.com>
4669
4670         PR target/39821
4671         * config/i386/i386.c (ix86_widen_mult_cost): New function.
4672         (ix86_add_stmt_cost): Use ix86_widen_mult_cost for
4673         WIDEN_MULT_EXPR.
4674
4675 2021-07-29  Jiufu Guo  <guojiufu@linux.ibm.com>
4676
4677         PR target/61837
4678         * config/rs6000/rs6000.c (TARGET_PREFERRED_DOLOOP_MODE): New hook.
4679         (rs6000_preferred_doloop_mode): New hook.
4680         * doc/tm.texi: Regenerate.
4681         * doc/tm.texi.in: Add hook preferred_doloop_mode.
4682         * target.def (preferred_doloop_mode): New hook.
4683         * targhooks.c (default_preferred_doloop_mode): New hook.
4684         * targhooks.h (default_preferred_doloop_mode): New hook.
4685         * tree-ssa-loop-ivopts.c (compute_doloop_base_on_mode): New function.
4686         (add_iv_candidate_for_doloop): Call targetm.preferred_doloop_mode
4687         and compute_doloop_base_on_mode.
4688
4689 2021-07-28  Martin Sebor  <msebor@redhat.com>
4690
4691         PR middle-end/101494
4692         * tree-ssa-uninit.c (maybe_warn_operand): Correct object offset
4693         and size computation.
4694
4695 2021-07-28  Martin Sebor  <msebor@redhat.com>
4696
4697         PR middle-end/101601
4698         * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Remove
4699         a pointless test.
4700         Handle pointers to functions.
4701
4702 2021-07-28  Martin Sebor  <msebor@redhat.com>
4703
4704         * Makefile.in (OBJS): Add gimple-ssa-warn-access.o and pointer-query.o.
4705         * attribs.h (fndecl_dealloc_argno): Move fndecl_dealloc_argno to tree.h.
4706         * builtins.c (compute_objsize_r): Move to pointer-query.cc.
4707         (access_ref::access_ref): Same.
4708         (access_ref::phi): Same.
4709         (access_ref::get_ref): Same.
4710         (access_ref::size_remaining): Same.
4711         (access_ref::offset_in_range): Same.
4712         (access_ref::add_offset): Same.
4713         (access_ref::inform_access): Same.
4714         (ssa_name_limit_t::visit_phi): Same.
4715         (ssa_name_limit_t::leave_phi): Same.
4716         (ssa_name_limit_t::next): Same.
4717         (ssa_name_limit_t::next_phi): Same.
4718         (ssa_name_limit_t::~ssa_name_limit_t): Same.
4719         (pointer_query::pointer_query): Same.
4720         (pointer_query::get_ref): Same.
4721         (pointer_query::put_ref): Same.
4722         (pointer_query::flush_cache): Same.
4723         (warn_string_no_nul): Move to gimple-ssa-warn-access.cc.
4724         (check_nul_terminated_array): Same.
4725         (unterminated_array): Same.
4726         (maybe_warn_for_bound): Same.
4727         (check_read_access): Same.
4728         (warn_for_access): Same.
4729         (get_size_range): Same.
4730         (check_access): Same.
4731         (gimple_call_alloc_size): Move to tree.c.
4732         (gimple_parm_array_size): Move to pointer-query.cc.
4733         (get_offset_range): Same.
4734         (gimple_call_return_array): Same.
4735         (handle_min_max_size): Same.
4736         (handle_array_ref): Same.
4737         (handle_mem_ref): Same.
4738         (compute_objsize): Same.
4739         (gimple_call_alloc_p): Move to gimple-ssa-warn-access.cc.
4740         (call_dealloc_argno): Same.
4741         (fndecl_dealloc_argno): Same.
4742         (new_delete_mismatch_p): Same.
4743         (matching_alloc_calls_p): Same.
4744         (warn_dealloc_offset): Same.
4745         (maybe_emit_free_warning): Same.
4746         * builtins.h (check_nul_terminated_array): Move to
4747         gimple-ssa-warn-access.h.
4748         (check_nul_terminated_array): Same.
4749         (warn_string_no_nul): Same.
4750         (unterminated_array): Same.
4751         (class ssa_name_limit_t): Same.
4752         (class pointer_query): Same.
4753         (struct access_ref): Same.
4754         (class range_query): Same.
4755         (struct access_data): Same.
4756         (gimple_call_alloc_size): Same.
4757         (gimple_parm_array_size): Same.
4758         (compute_objsize): Same.
4759         (class access_data): Same.
4760         (maybe_emit_free_warning): Same.
4761         * calls.c (initialize_argument_information): Remove call to
4762         maybe_emit_free_warning.
4763         * gimple-array-bounds.cc: Include new header..
4764         * gimple-fold.c: Same.
4765         * gimple-ssa-sprintf.c: Same.
4766         * gimple-ssa-warn-restrict.c: Same.
4767         * passes.def: Add pass_warn_access.
4768         * tree-pass.h (make_pass_warn_access): Declare.
4769         * tree-ssa-strlen.c: Include new headers.
4770         * tree.c (fndecl_dealloc_argno): Move here from builtins.c.
4771         * tree.h (fndecl_dealloc_argno): Move here from attribs.h.
4772         * gimple-ssa-warn-access.cc: New file.
4773         * gimple-ssa-warn-access.h: New file.
4774         * pointer-query.cc: New file.
4775         * pointer-query.h: New file.
4776
4777 2021-07-28  Jakub Jelinek  <jakub@redhat.com>
4778
4779         PR middle-end/101624
4780         * ubsan.c (maybe_instrument_pointer_overflow,
4781         instrument_object_size): Only test DECL_REGISTER on VAR_DECLs,
4782         PARM_DECLs or RESULT_DECLs.
4783         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Likewise.
4784
4785 2021-07-28  Jakub Jelinek  <jakub@redhat.com>
4786
4787         PR middle-end/101642
4788         * match.pd (bswap16 (x) == bswap16 (y)): Cast both operands
4789         to type of bswap16 for comparison.
4790         (bswap16 (x) == cst): Cast bswap16 operand to type of cst.
4791
4792 2021-07-28  Richard Biener  <rguenther@suse.de>
4793
4794         PR tree-optimization/101615
4795         * tree-vect-slp.c (vect_optimize_slp): Materialize permutes
4796         at CTOR SLP graph entries.
4797
4798 2021-07-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4799
4800         * config/aarch64/aarch64.md (*extend<SHORT:mode><GPI:mode>2_aarch64):
4801         Add "r,w" alternative.
4802
4803 2021-07-28  H.J. Lu  <hjl.tools@gmail.com>
4804
4805         PR target/101456
4806         * config/i386/i386.c (ix86_avx_u128_mode_needed): Don't set
4807         AVX_U128_DIRTY when all bits are zero.
4808
4809 2021-07-28  Richard Biener  <rguenther@suse.de>
4810
4811         PR tree-optimization/101615
4812         * tree-vect-slp.c (vect_optimize_slp): Pre-existing vector
4813         external nodes cannot be permuted so make them perm_out 0.
4814
4815 2021-07-28  Andrew Stubbs  <ams@codesourcery.com>
4816
4817         PR target/100208
4818         * config.in: Regenerate.
4819         * config/gcn/gcn-hsa.h (A_FIJI): New define.
4820         (A_900): New define.
4821         (A_906): New define.
4822         (A_908): New define.
4823         (ASM_SPEC): Use A_FIJI, A_900, A_906 and A_908.
4824         * config/gcn/gcn.c (output_file_start): Adjust attributes according
4825         to the assembler capabilities.
4826         * config/gcn/mkoffload.c (main): Likewise.
4827         * configure: Regenerate.
4828         * configure.ac: Add tests for LLVM assembler attribute features.
4829
4830 2021-07-28  Andrew MacLeod  <amacleod@redhat.com>
4831
4832         * gimple-range-gori.cc (gori_compute::outgoing_edge_range_p): Check for
4833         cond_false and cond_true on branches.
4834
4835 2021-07-28  Bin Cheng  <bin.cheng@linux.alibaba.com>
4836
4837         * config/aarch64/aarch64.c (aarch64_gen_adjusted_ldpstp): use
4838         gcc_stablesort.
4839
4840 2021-07-28  Bin Cheng  <bin.cheng@linux.alibaba.com>
4841
4842         * alias.c (init_alias_analysis): Don't skip prologue/epilogue.
4843
4844 2021-07-28  Jakub Jelinek  <jakub@redhat.com>
4845
4846         PR target/101611
4847         * config/i386/sse.md (vashr<mode>3): Split into vashrv8di3 expander
4848         and vashrv4di3 expander, where the latter requires just TARGET_AVX2
4849         and has special !TARGET_AVX512VL expansion.
4850         (vashrv2di3<mask_name>): Rename to ...
4851         (vashrv2di3): ... this.  Change condition to TARGET_XOP || TARGET_AVX2
4852         and add special !TARGET_XOP && !TARGET_AVX512VL expansion.
4853
4854 2021-07-28  Martin Uecker  <muecker@gwdg.de>
4855
4856         * calls.c (maybe_warn_rdwr_sizes): Correct argument
4857         numbers in warning that were switched.
4858
4859 2021-07-28  Kewen Lin  <linkw@linux.ibm.com>
4860
4861         PR tree-optimization/101596
4862         * tree-vect-patterns.c (vect_recog_mulhs_pattern): Fix wrong check
4863         by using new_type's precision instead.
4864
4865 2021-07-28  liuhongt  <hongtao.liu@intel.com>
4866
4867         PR target/99881
4868         * config/i386/i386.h (processor_costs): Add new member
4869         integer_to_sse.
4870         * config/i386/x86-tune-costs.h (ix86_size_cost, i386_cost,
4871         i486_cost, pentium_cost, lakemont_cost, pentiumpro_cost,
4872         geode_cost, k6_cost, athlon_cost, k8_cost, amdfam10_cost,
4873         bdver_cost, znver1_cost, znver2_cost, znver3_cost,
4874         btver1_cost, btver2_cost, btver3_cost, pentium4_cost,
4875         nocona_cost, atom_cost, atom_cost, slm_cost, intel_cost,
4876         generic_cost, core_cost): Initialize integer_to_sse same value
4877         as sse_op.
4878         (skylake_cost): Initialize integer_to_sse twice as much as sse_op.
4879         * config/i386/i386.c (ix86_builtin_vectorization_cost):
4880         Use integer_to_sse instead of sse_op to calculate the cost of
4881         vec_construct.
4882
4883 2021-07-27  Bill Schmidt  <wschmidt@linux.ibm.com>
4884
4885         * config/rs6000/rs6000-gen-builtins.c (write_ovld_static_init): New
4886         function.
4887         (write_init_file): Call write_ovld_static_init.
4888
4889 2021-07-27  Bill Schmidt  <wschmidt@linux.ibm.com>
4890
4891         * config/rs6000/rs6000-gen-builtins.c (write_bif_static_init): New
4892         function.
4893         (write_init_file): Call write_bif_static_init.
4894
4895 2021-07-27  Bill Schmidt  <wschmidt@linux.ibm.com>
4896
4897         * config/rs6000/rs6000-gen-builtins.c (typemap): New struct.
4898         (TYPE_MAP_SIZE): New macro.
4899         (type_map): New initialized variable.
4900         (typemap_cmp): New function.
4901         (write_type_node): Likewise.
4902         (write_fntype_init): Implement.
4903
4904 2021-07-27  Martin Sebor  <msebor@redhat.com>
4905
4906         PR tree-optimization/101584
4907         * tree-ssa-uninit.c (builtin_call_nomodifying_p): New function.
4908         (check_defs): Call it.
4909
4910 2021-07-27  Aldy Hernandez  <aldyh@redhat.com>
4911
4912         * tree-ssa-dom.c (dom_jump_threader_simplifier):
4913         Put avail_exprs_stack in the class, instead of passing it to
4914         jump_threader_simplifier.
4915         (dom_jump_threader_simplifier::simplify): Add state argument.
4916         (dom_opt_dom_walker): Add state.
4917         (pass_dominator::execute): Pass state to threader.
4918         (dom_opt_dom_walker::before_dom_children): Use state.
4919         * tree-ssa-threadedge.c (jump_threader::jump_threader): Replace
4920         arguments by state.
4921         (jump_threader::record_temporary_equivalences_from_phis):
4922         Register equivalences through the state variable.
4923         (jump_threader::record_temporary_equivalences_from_stmts_at_dest):
4924         Record ranges in a statement through the state variable.
4925         (jump_threader::simplify_control_stmt_condition): Pass state to
4926         simplify.
4927         (jump_threader::simplify_control_stmt_condition_1): Same.
4928         (jump_threader::thread_around_empty_blocks): Remove obsolete
4929         comment.
4930         (jump_threader::thread_through_normal_block): Record equivalences
4931         on edge through the state variable.
4932         (jump_threader::thread_across_edge): Abstract state pushing.
4933         (jt_state::jt_state): New.
4934         (jt_state::push): New.
4935         (jt_state::pop): New.
4936         (jt_state::register_equiv): New.
4937         (jt_state::record_ranges_from_stmt): New.
4938         (jt_state::register_equivs_on_edge): New.
4939         (jump_threader_simplifier::jump_threader_simplifier): Move from
4940         header.
4941         (jump_threader_simplifier::simplify): Add state argument.
4942         * tree-ssa-threadedge.h (class jt_state): New.
4943         (class jump_threader): Add state to constructor.
4944         (class jump_threader_simplifier): Add state to simplify.  Remove
4945         avail_exprs_stack from class.
4946         * tree-vrp.c (vrp_jump_threader_simplifier::simplify): Add state
4947         argument.
4948         (vrp_jump_threader::vrp_jump_threader): Add state.
4949         (vrp_jump_threader::~vrp_jump_threader): Cleanup state.
4950
4951 2021-07-27  Aldy Hernandez  <aldyh@redhat.com>
4952
4953         * Makefile.in (OBJS): Add gimple-range-path.o.
4954         * gimple-range-path.cc: New file.
4955         * gimple-range-path.h: New file.
4956
4957 2021-07-27  Jonathan Wright  <jonathan.wright@arm.com>
4958
4959         * config/aarch64/aarch64-simd.md: Push sign/zero-extension
4960         inside vec_duplicate for all patterns.
4961         * simplify-rtx.c (simplify_context::simplify_unary_operation_1):
4962         Push sign/zero-extension inside vec_duplicate.
4963
4964 2021-07-27  Richard Biener  <rguenther@suse.de>
4965
4966         PR tree-optimization/101573
4967         * tree-ssa-uninit.c (warn_uninit_phi_uses): New function
4968         looking at uninitialized PHI arg defs in some constrained cases.
4969         (warn_uninitialized_vars): Call it.
4970         (execute_early_warn_uninitialized): Calculate dominators.
4971
4972 2021-07-27  Richard Biener  <rguenther@suse.de>
4973
4974         PR tree-optimization/39821
4975         * tree-vect-stmts.c (vect_model_promotion_demotion_cost): Use
4976         vector_stmt for widening arithmetic.
4977         (vectorizable_conversion): Adjust.
4978
4979 2021-07-27  Martin Jambor  <mjambor@suse.cz>
4980
4981         * cgraph.h (ipa_replace_map): New field force_load_ref.
4982         * ipa-prop.h (ipa_param_descriptor): Reduce precision of move_cost,
4983         aded new flag load_dereferenced, adjusted comments.
4984         (ipa_get_param_dereferenced): New function.
4985         (ipa_set_param_dereferenced): Likewise.
4986         * cgraphclones.c (cgraph_node::create_virtual_clone): Follow it.
4987         * ipa-cp.c: Include gimple.h.
4988         (ipcp_discover_new_direct_edges): Take into account dereferenced flag.
4989         (get_replacement_map): New parameter force_load_ref, set the
4990         appropriate flag in ipa_replace_map if set.
4991         (struct symbol_and_index_together): New type.
4992         (adjust_refs_in_act_callers): New function.
4993         (adjust_references_in_caller): Likewise.
4994         (create_specialized_node): When appropriate, call
4995         adjust_references_in_caller and force only load references.
4996         * ipa-prop.c (load_from_dereferenced_name): New function.
4997         (ipa_analyze_controlled_uses): Also detect loads from a
4998         dereference, harden testing of call statements.
4999         (ipa_write_node_info): Stream the dereferenced flag.
5000         (ipa_read_node_info): Likewise.
5001         (ipa_set_jf_constant): Also create refdesc when jump function
5002         references a variable.
5003         (cgraph_node_for_jfunc): Rename to symtab_node_for_jfunc, work
5004         also on references of variables and return a symtab_node.  Adjust
5005         all callers.
5006         (propagate_controlled_uses): Also remove references to VAR_DECLs.
5007
5008 2021-07-27  Jakub Jelinek  <jakub@redhat.com>
5009
5010         PR middle-end/101586
5011         * gimple-fold.c (clear_padding_type): Ignore FIELD_DECLs with byte
5012         positions above or equal to sz except for diagnostics of flexible
5013         array members.
5014
5015 2021-07-26  Andrew MacLeod  <amacleod@redhat.com>
5016
5017         PR tree-optimization/78888
5018         * gimple-range-fold.cc (get_letter_range): New.
5019         (fold_using_range::range_of_builtin_call): Call get_letter_range.
5020
5021 2021-07-26  Andrew MacLeod  <amacleod@redhat.com>
5022
5023         PR tree-optimization/78888
5024         * gimple-range-fold.cc (fold_using_range::range_of_builtin_call): Add cases
5025         for CFN_BUILT_IN_TOUPPER and CFN_BUILT_IN_TOLOWER.
5026
5027 2021-07-26  Roger Sayle  <roger@nextmovesoftware.com>
5028             Marc Glisse  <marc.glisse@inria.fr>
5029
5030         * match.pd (rotate): Simplify equality/inequality of rotations.
5031         (bswap): Simplify equality/inequality tests of byte swapping.
5032
5033 2021-07-26  Aldy Hernandez  <aldyh@redhat.com>
5034
5035         * range-op.cc (operator_bitwise_xor::op1_op2_relation_effect):
5036         New.
5037
5038 2021-07-26  Aldy Hernandez  <aldyh@redhat.com>
5039
5040         * range-op.cc (operator_lshift::fold_range): Pass rel to
5041         base class fold_range.
5042         (operator_rshift::fold_range): Same.
5043
5044 2021-07-26  Ashimida  <ashimida@linux.alibaba.com>
5045
5046         PR driver/101447
5047         * toplev.h (min_align_loops_log): Remove declaration.
5048         (min_align_jumps_log, min_align_labels_log): Likewise.
5049         (min_align_functions_log): Likewise.
5050
5051 2021-07-26  Aldy Hernandez  <aldyh@redhat.com>
5052
5053         * tree-vrp.c (vrp_simplify_cond_using_ranges): Rename vr_values
5054         with range_query.
5055         (execute_vrp): Abstract out simplification of conditionals...
5056         (simplify_casted_conds): ...here.
5057
5058 2021-07-26  Aldy Hernandez  <aldyh@redhat.com>
5059
5060         * gimple-array-bounds.cc (array_bounds_checker::get_value_range):
5061         Add gimple argument.
5062         (array_bounds_checker::check_array_ref): Same.
5063         (array_bounds_checker::check_addr_expr): Same.
5064         (array_bounds_checker::check_array_bounds): Pass statement to
5065         check_array_bounds and check_addr_expr.
5066         * gimple-array-bounds.h (check_array_bounds): Add gimple argument.
5067         (check_addr_expr): Same.
5068         (get_value_range): Same.
5069
5070 2021-07-26  Tamar Christina  <tamar.christina@arm.com>
5071
5072         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): Rename to..
5073         (sdot_prod, udot_prod): ... This.
5074         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): Merged
5075         into...
5076         (<sur>dot_prod<vsi2qi>): ... this.
5077         (aarch64_<sur>dot_lane<vsi2qi>, aarch64_<sur>dot_laneq<vsi2qi>):
5078         Change operands order.
5079         (<sur>sadv16qi): Use new operands order.
5080         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32,
5081         vdotq_s32): Use new RTL ordering.
5082
5083 2021-07-26  Tamar Christina  <tamar.christina@arm.com>
5084
5085         * config/aarch64/aarch64-builtins.c (TYPES_TERNOP_SUSS,
5086         aarch64_types_ternop_suss_qualifiers): New.
5087         * config/aarch64/aarch64-simd-builtins.def (usdot_prod): Use it.
5088         * config/aarch64/aarch64-simd.md (usdot_prod<vsi2qi>): Re-organize RTL.
5089         * config/aarch64/arm_neon.h (vusdot_s32, vusdotq_s32): Use it.
5090
5091 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
5092
5093         PR rtl-optimization/101562
5094         * expmed.c (store_integral_bit_field): Only use movstrict_optab
5095         if the operand isn't paradoxical.
5096
5097 2021-07-23  Aldy Hernandez  <aldyh@redhat.com>
5098
5099         * gimple-array-bounds.h (class array_bounds_checker): Change
5100         ranges type to range_query.
5101
5102 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5103
5104         * config/aarch64/arm_neon.h (vst1_s64_x2): Use
5105         __builtin_memcpy instead of constructing
5106         __builtin_aarch64_simd_oi one vector at a time.
5107         (vst1_u64_x2): Likewise.
5108         (vst1_f64_x2): Likewise.
5109         (vst1_s8_x2): Likewise.
5110         (vst1_p8_x2): Likewise.
5111         (vst1_s16_x2): Likewise.
5112         (vst1_p16_x2): Likewise.
5113         (vst1_s32_x2): Likewise.
5114         (vst1_u8_x2): Likewise.
5115         (vst1_u16_x2): Likewise.
5116         (vst1_u32_x2): Likewise.
5117         (vst1_f16_x2): Likewise.
5118         (vst1_f32_x2): Likewise.
5119         (vst1_p64_x2): Likewise.
5120         (vst1q_s8_x2): Likewise.
5121         (vst1q_p8_x2): Likewise.
5122         (vst1q_s16_x2): Likewise.
5123         (vst1q_p16_x2): Likewise.
5124         (vst1q_s32_x2): Likewise.
5125         (vst1q_s64_x2): Likewise.
5126         (vst1q_u8_x2): Likewise.
5127         (vst1q_u16_x2): Likewise.
5128         (vst1q_u32_x2): Likewise.
5129         (vst1q_u64_x2): Likewise.
5130         (vst1q_f16_x2): Likewise.
5131         (vst1q_f32_x2): Likewise.
5132         (vst1q_f64_x2): Likewise.
5133         (vst1q_p64_x2): Likewise.
5134
5135 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5136
5137         * config/aarch64/arm_neon.h (vst1_s64_x3): Use
5138         __builtin_memcpy instead of constructing
5139         __builtin_aarch64_simd_ci one vector at a time.
5140         (vst1_u64_x3): Likewise.
5141         (vst1_f64_x3): Likewise.
5142         (vst1_s8_x3): Likewise.
5143         (vst1_p8_x3): Likewise.
5144         (vst1_s16_x3): Likewise.
5145         (vst1_p16_x3): Likewise.
5146         (vst1_s32_x3): Likewise.
5147         (vst1_u8_x3): Likewise.
5148         (vst1_u16_x3): Likewise.
5149         (vst1_u32_x3): Likewise.
5150         (vst1_f16_x3): Likewise.
5151         (vst1_f32_x3): Likewise.
5152         (vst1_p64_x3): Likewise.
5153         (vst1q_s8_x3): Likewise.
5154         (vst1q_p8_x3): Likewise.
5155         (vst1q_s16_x3): Likewise.
5156         (vst1q_p16_x3): Likewise.
5157         (vst1q_s32_x3): Likewise.
5158         (vst1q_s64_x3): Likewise.
5159         (vst1q_u8_x3): Likewise.
5160         (vst1q_u16_x3): Likewise.
5161         (vst1q_u32_x3): Likewise.
5162         (vst1q_u64_x3): Likewise.
5163         (vst1q_f16_x3): Likewise.
5164         (vst1q_f32_x3): Likewise.
5165         (vst1q_f64_x3): Likewise.
5166         (vst1q_p64_x3): Likewise.
5167
5168 2021-07-23  H.J. Lu  <hjl.tools@gmail.com>
5169
5170         PR target/101504
5171         * config/i386/i386.c (ix86_gen_scratch_sse_rtx): Don't return
5172         hard register when LRA is in progress.
5173
5174 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5175
5176         * config/aarch64/arm_neon.h (vst1_s8_x4): Use
5177         __builtin_memcpy instead of using a union.
5178         (vst1q_s8_x4): Likewise.
5179         (vst1_s16_x4): Likewise.
5180         (vst1q_s16_x4): Likewise.
5181         (vst1_s32_x4): Likewise.
5182         (vst1q_s32_x4): Likewise.
5183         (vst1_u8_x4): Likewise.
5184         (vst1q_u8_x4): Likewise.
5185         (vst1_u16_x4): Likewise.
5186         (vst1q_u16_x4): Likewise.
5187         (vst1_u32_x4): Likewise.
5188         (vst1q_u32_x4): Likewise.
5189         (vst1_f16_x4): Likewise.
5190         (vst1q_f16_x4): Likewise.
5191         (vst1_f32_x4): Likewise.
5192         (vst1q_f32_x4): Likewise.
5193         (vst1_p8_x4): Likewise.
5194         (vst1q_p8_x4): Likewise.
5195         (vst1_p16_x4): Likewise.
5196         (vst1q_p16_x4): Likewise.
5197         (vst1_s64_x4): Likewise.
5198         (vst1_u64_x4): Likewise.
5199         (vst1_p64_x4): Likewise.
5200         (vst1q_s64_x4): Likewise.
5201         (vst1q_u64_x4): Likewise.
5202         (vst1q_p64_x4): Likewise.
5203         (vst1_f64_x4): Likewise.
5204         (vst1q_f64_x4): Likewise.
5205
5206 2021-07-23  Jonathan Wrightt  <jonathan.wright@arm.com>
5207
5208         * config/aarch64/arm_neon.h (vst2_s64): Use __builtin_memcpy
5209         instead of constructing __builtin_aarch64_simd_oi one vector
5210         at a time.
5211         (vst2_u64): Likewise.
5212         (vst2_f64): Likewise.
5213         (vst2_s8): Likewise.
5214         (vst2_p8): Likewise.
5215         (vst2_s16): Likewise.
5216         (vst2_p16): Likewise.
5217         (vst2_s32): Likewise.
5218         (vst2_u8): Likewise.
5219         (vst2_u16): Likewise.
5220         (vst2_u32): Likewise.
5221         (vst2_f16): Likewise.
5222         (vst2_f32): Likewise.
5223         (vst2_p64): Likewise.
5224         (vst2q_s8): Likewise.
5225         (vst2q_p8): Likewise.
5226         (vst2q_s16): Likewise.
5227         (vst2q_p16): Likewise.
5228         (vst2q_s32): Likewise.
5229         (vst2q_s64): Likewise.
5230         (vst2q_u8): Likewise.
5231         (vst2q_u16): Likewise.
5232         (vst2q_u32): Likewise.
5233         (vst2q_u64): Likewise.
5234         (vst2q_f16): Likewise.
5235         (vst2q_f32): Likewise.
5236         (vst2q_f64): Likewise.
5237         (vst2q_p64): Likewise.
5238
5239 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5240
5241         * config/aarch64/arm_neon.h (vst3_s64): Use __builtin_memcpy
5242         instead of constructing __builtin_aarch64_simd_ci one vector
5243         at a time.
5244         (vst3_u64): Likewise.
5245         (vst3_f64): Likewise.
5246         (vst3_s8): Likewise.
5247         (vst3_p8): Likewise.
5248         (vst3_s16): Likewise.
5249         (vst3_p16): Likewise.
5250         (vst3_s32): Likewise.
5251         (vst3_u8): Likewise.
5252         (vst3_u16): Likewise.
5253         (vst3_u32): Likewise.
5254         (vst3_f16): Likewise.
5255         (vst3_f32): Likewise.
5256         (vst3_p64): Likewise.
5257         (vst3q_s8): Likewise.
5258         (vst3q_p8): Likewise.
5259         (vst3q_s16): Likewise.
5260         (vst3q_p16): Likewise.
5261         (vst3q_s32): Likewise.
5262         (vst3q_s64): Likewise.
5263         (vst3q_u8): Likewise.
5264         (vst3q_u16): Likewise.
5265         (vst3q_u32): Likewise.
5266         (vst3q_u64): Likewise.
5267         (vst3q_f16): Likewise.
5268         (vst3q_f32): Likewise.
5269         (vst3q_f64): Likewise.
5270         (vst3q_p64): Likewise.
5271
5272 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5273
5274         * config/aarch64/arm_neon.h (vst4_s64): Use __builtin_memcpy
5275         instead of constructing __builtin_aarch64_simd_xi one vector
5276         at a time.
5277         (vst4_u64): Likewise.
5278         (vst4_f64): Likewise.
5279         (vst4_s8): Likewise.
5280         (vst4_p8): Likewise.
5281         (vst4_s16): Likewise.
5282         (vst4_p16): Likewise.
5283         (vst4_s32): Likewise.
5284         (vst4_u8): Likewise.
5285         (vst4_u16): Likewise.
5286         (vst4_u32): Likewise.
5287         (vst4_f16): Likewise.
5288         (vst4_f32): Likewise.
5289         (vst4_p64): Likewise.
5290         (vst4q_s8): Likewise.
5291         (vst4q_p8): Likewise.
5292         (vst4q_s16): Likewise.
5293         (vst4q_p16): Likewise.
5294         (vst4q_s32): Likewise.
5295         (vst4q_s64): Likewise.
5296         (vst4q_u8): Likewise.
5297         (vst4q_u16): Likewise.
5298         (vst4q_u32): Likewise.
5299         (vst4q_u64): Likewise.
5300         (vst4q_f16): Likewise.
5301         (vst4q_f32): Likewise.
5302         (vst4q_f64): Likewise.
5303         (vst4q_p64): Likewise.
5304
5305 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5306
5307         * config/aarch64/arm_neon.h (vtbx4_s8): Use __builtin_memcpy
5308         instead of constructing __builtin_aarch64_simd_oi one vector
5309         at a time.
5310         (vtbx4_u8): Likewise.
5311         (vtbx4_p8): Likewise.
5312
5313 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5314
5315         * config/aarch64/arm_neon.h (vtbl3_s8): Use __builtin_memcpy
5316         instead of constructing __builtin_aarch64_simd_oi one vector
5317         at a time.
5318         (vtbl3_u8): Likewise.
5319         (vtbl3_p8): Likewise.
5320         (vtbl4_s8): Likewise.
5321         (vtbl4_u8): Likewise.
5322         (vtbl4_p8): Likewise.
5323
5324 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5325
5326         * config/aarch64/arm_neon.h (vqtbx2_s8): Use __builtin_memcpy
5327         instead of constructing __builtin_aarch64_simd_oi one vector
5328         at a time.
5329         (vqtbx2_u8): Likewise.
5330         (vqtbx2_p8): Likewise.
5331         (vqtbx2q_s8): Likewise.
5332         (vqtbx2q_u8): Likewise.
5333         (vqtbx2q_p8): Likewise.
5334         (vqtbx3_s8): Use __builtin_memcpy instead of constructing
5335         __builtin_aarch64_simd_ci one vector at a time.
5336         (vqtbx3_u8): Likewise.
5337         (vqtbx3_p8): Likewise.
5338         (vqtbx3q_s8): Likewise.
5339         (vqtbx3q_u8): Likewise.
5340         (vqtbx3q_p8): Likewise.
5341         (vqtbx4_s8): Use __builtin_memcpy instead of constructing
5342         __builtin_aarch64_simd_xi one vector at a time.
5343         (vqtbx4_u8): Likewise.
5344         (vqtbx4_p8): Likewise.
5345         (vqtbx4q_s8): Likewise.
5346         (vqtbx4q_u8): Likewise.
5347         (vqtbx4q_p8): Likewise.
5348
5349 2021-07-23  Jonathan Wright  <jonathan.wright@arm.com>
5350
5351         * config/aarch64/arm_neon.h (vqtbl2_s8): Use __builtin_memcpy
5352         instead of constructing __builtin_aarch64_simd_oi one vector
5353         at a time.
5354         (vqtbl2_u8): Likewise.
5355         (vqtbl2_p8): Likewise.
5356         (vqtbl2q_s8): Likewise.
5357         (vqtbl2q_u8): Likewise.
5358         (vqtbl2q_p8): Likewise.
5359         (vqtbl3_s8): Use __builtin_memcpy instead of constructing
5360         __builtin_aarch64_simd_ci one vector at a time.
5361         (vqtbl3_u8): Likewise.
5362         (vqtbl3_p8): Likewise.
5363         (vqtbl3q_s8): Likewise.
5364         (vqtbl3q_u8): Likewise.
5365         (vqtbl3q_p8): Likewise.
5366         (vqtbl4_s8): Use __builtin_memcpy instead of constructing
5367         __builtin_aarch64_simd_xi one vector at a time.
5368         (vqtbl4_u8): Likewise.
5369         (vqtbl4_p8): Likewise.
5370         (vqtbl4q_s8): Likewise.
5371         (vqtbl4q_u8): Likewise.
5372         (vqtbl4q_p8): Likewise.
5373
5374 2021-07-23  Haochen Gui  <guihaoc@gcc.gnu.org>
5375
5376         PR target/100952
5377         * config/rs6000/rs6000.md (cstore<mode>4): Fix wrong fall through.
5378
5379 2021-07-22  Andrew Pinski  <apinski@marvell.com>
5380
5381         PR tree-optimization/10153
5382         * tree-tailcall.c (create_tailcall_accumulator):
5383         Don't call fold_convert as the type should be correct already.
5384         (tree_optimize_tail_calls_1): Use build_{one,zero}_cst instead
5385         of integer_{one,zero}_node for the call of create_tailcall_accumulator.
5386
5387 2021-07-22  Aldy Hernandez  <aldyh@redhat.com>
5388
5389         * gimple-range-cache.cc (non_null_ref::adjust_range): Replace
5390         varying_p check for null/non-null check.
5391
5392 2021-07-22  Andrew MacLeod  <amacleod@redhat.com>
5393
5394         PR tree-optimization/101511
5395         * value-relation.cc (relation_oracle::query_relation): Check if ssa1
5396         is in ssa2's equiv set, and don't trap if so.
5397
5398 2021-07-22  Andrew MacLeod  <amacleod@redhat.com>
5399
5400         PR tree-optimization/101497
5401         * gimple-range-fold.cc (fold_using_range::range_of_cond_expr): Check
5402         for undefined.
5403
5404 2021-07-22  Andrew MacLeod  <amacleod@redhat.com>
5405
5406         PR tree-optimization/101496
5407         * vr-values.c (simplify_using_ranges::fold_cond): Call range_of_stmt
5408         first, then vrp_visit_cond_Stmt.
5409
5410 2021-07-22  liuhongt  <hongtao.liu@intel.com>
5411
5412         * config/i386/i386-expand.c
5413         (ix86_broadcast_from_integer_constant): Rename to ..
5414         (ix86_broadcast_from_constant): .. this, and extend it to
5415         handle float mode.
5416         (ix86_expand_vector_move): Extend to float mode.
5417         * config/i386/i386-features.c
5418         (replace_constant_pool_with_broadcast): Remove.
5419         (remove_partial_avx_dependency_gate): Ditto.
5420         (constant_pool_broadcast): Ditto.
5421         (class pass_constant_pool_broadcast): Ditto.
5422         (make_pass_constant_pool_broadcast): Ditto.
5423         (remove_partial_avx_dependency): Adjust gate.
5424         * config/i386/i386-passes.def: Remove pass_constant_pool_broadcast.
5425         * config/i386/i386-protos.h
5426         (make_pass_constant_pool_broadcast): Remove.
5427
5428 2021-07-22  liuhongt  <hongtao.liu@intel.com>
5429
5430         * config/i386/constraints.md (Wb): New constraint.
5431         (Ww): Ditto.
5432         * config/i386/i386.md (*ashlhi3_1): Extend to avx512 mask
5433         shift.
5434         (*ashlqi3_1): Ditto.
5435         (*<insn><mode>3_1): Split to ..
5436         (*ashr<mode>3_1): this, ...
5437         (*lshr<mode>3_1): and this, also extend this pattern to avx512
5438         mask registers.
5439         (*<insn><mode>3_1): Split to ..
5440         (*ashr<mode>3_1): this, ...
5441         (*lshrqi3_1): and this, also extend this pattern to avx512
5442         mask registers.
5443         (*lshrhi3_1): And this, also extend this pattern to avx512
5444         mask registers.
5445         * config/i386/sse.md (k<code><mode>): New define_split after
5446         it to convert generic shift pattern to mask shift ones.
5447
5448 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
5449             Joseph Myers  <joseph@codesourcery.com>
5450             Cesar Philippidis  <cesar@codesourcery.com>
5451
5452         * tree-core.h (omp_clause_code): Add 'OMP_CLAUSE_NOHOST'.
5453         * tree.c (omp_clause_num_ops, omp_clause_code_name, walk_tree_1):
5454         Handle it.
5455         * tree-pretty-print.c (dump_omp_clause): Likewise.
5456         * omp-general.c (oacc_verify_routine_clauses): Likewise.
5457         * gimplify.c (gimplify_scan_omp_clauses)
5458         (gimplify_adjust_omp_clauses): Likewise.
5459         * tree-nested.c (convert_nonlocal_omp_clauses)
5460         (convert_local_omp_clauses): Likewise.
5461         * omp-low.c (scan_sharing_clauses): Likewise.
5462         * omp-offload.c (execute_oacc_device_lower): Update.
5463
5464 2021-07-21  Martin Sebor  <msebor@redhat.com>
5465
5466         * tree-ssa-alias.c (walk_aliased_vdefs_1): Fix typos in a comment.
5467
5468 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5469
5470         * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table):
5471         Implement.
5472
5473 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5474
5475         * config/rs6000/rs6000-gen-builtins.c (write_fntype): New
5476         callback function.
5477         (write_fntype_init): New stub function.
5478         (write_init_bif_table): Likewise.
5479         (write_init_ovld_table): New function.
5480         (write_init_file): Implement.
5481
5482 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5483
5484         * config/rs6000/rs6000-gen-builtins.c
5485         (write_autogenerated_header): New function.
5486         (write_decls): Likewise.
5487         (write_extern_fntype): New callback function.
5488         (write_header_file): Implement.
5489
5490 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5491
5492         * config/rs6000/rs6000-gen-builtins.c (write_defines_file):
5493         Implement.
5494
5495 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5496
5497         * config/rs6000/rs6000-gen-builtins.c (complete_vector_type): New
5498         function.
5499         (complete_base_type): Likewise.
5500         (construct_fntype_id): Likewise.
5501         (parse_bif_entry): Call contruct_fntype_id.
5502         (parse_ovld_entry): Likewise.
5503
5504 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5505
5506         * config/rs6000/rs6000-gen-builtins.c (ovld_stanza): New struct.
5507         (MAXOVLDSTANZAS): New macro.
5508         (ovld_stanzas): New variable.
5509         (curr_ovld_stanza): Likewise.
5510         (MAXOVLDS): New macro.
5511         (ovlddata): New struct.
5512         (ovlds): New variable.
5513         (curr_ovld): Likewise.
5514         (max_ovld_args): Likewise.
5515         (parse_ovld_entry): New function.
5516         (parse_ovld_stanza): Likewise.
5517         (parse_ovld): Implement.
5518
5519 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5520
5521         * config/rs6000/rs6000-gen-builtins.c (parse_bif_attrs):
5522         Implement.
5523
5524 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5525
5526         * config/rs6000/rs6000-gen-builtins.c (parse_args): New function.
5527         (parse_prototype): Implement.
5528
5529 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5530
5531         * config/rs6000/rs6000-gen-builtins.c (bif_stanza): New enum.
5532         (curr_bif_stanza): New variable.
5533         (stanza_entry): New struct.
5534         (stanza_map): New initialized variable.
5535         (enable_string): Likewise.
5536         (fnkinds): New enum.
5537         (typelist): New struct.
5538         (attrinfo): Likewise.
5539         (MAXRESTROPNDS): New macro.
5540         (prototype): New struct.
5541         (MAXBIFS): New macro.
5542         (bifdata): New struct.
5543         (bifs): New variable.
5544         (curr_bif): Likewise.
5545         (bif_order): Likewise.
5546         (bif_index): Likewise.
5547         (fatal): New function.
5548         (stanza_name_to_stanza): Likewise.
5549         (parse_bif_attrs): New stub function.
5550         (parse_prototype): Likewise.
5551         (parse_bif_entry): New function.
5552         (parse_bif_stanza): Likewise.
5553         (parse_bif): Implement.
5554         (set_bif_order): New function.
5555         (create_bif_order): Implement.
5556
5557 2021-07-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5558
5559         * config/rs6000/rs6000-gen-builtins.c (rbtree.h): New #include.
5560         (num_bifs): New variable.
5561         (num_ovld_stanzas): Likewise.
5562         (num_ovlds): Likewise.
5563         (parse_codes): New enum.
5564         (bif_rbt): New variable.
5565         (ovld_rbt): Likewise.
5566         (fntype_rbt): Likewise.
5567         (bifo_rbt): Likewise.
5568         (parse_bif): New stub function.
5569         (create_bif_order): Likewise.
5570         (parse_ovld): Likewise.
5571         (write_header_file): Likewise.
5572         (write_init_file): Likewise.
5573         (write_defines_file): Likewise.
5574         (delete_output_files): New function.
5575         (main): Likewise.
5576
5577 2021-07-21  H.J. Lu  <hjl.tools@gmail.com>
5578
5579         PR target/101549
5580         * config/i386/i386-builtin.def: Remove OPTION_MASK_ISA_SSE4_2
5581         from CRC32 _builtin functions.
5582
5583 2021-07-21  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5584
5585         * coverage.c (build_gcov_info_var_registration): Mark the object placed
5586         in the linker set as referenced so that it does not get optimized away.
5587
5588 2021-07-21  Kito Cheng  <kito.cheng@sifive.com>
5589
5590         Revert:
5591         2021-07-20  Kito Cheng  <kito.cheng@sifive.com>
5592
5593         * config.gcc (riscv*-*-*): Detect which python is available.
5594
5595 2021-07-21  Jakub Jelinek  <jakub@redhat.com>
5596
5597         PR middle-end/101535
5598         * gimplify.c (omp_check_private): Properly skip ORT_TARGET_DATA
5599         contexts in which decl isn't privatized and for ORT_TARGET return
5600         false if decl is mapped.
5601
5602 2021-07-21  Richard Sandiford  <richard.sandiford@arm.com>
5603
5604         * gimple-loop-jam.c: Include tree-ssa-sccvn.h.
5605         (tree_loop_unroll_and_jam): Run value-numbering on a loop that
5606         has been successfully unrolled.
5607
5608 2021-07-21  Richard Sandiford  <richard.sandiford@arm.com>
5609
5610         * tree-ssa-loop-manip.c (determine_exit_conditions): Return a null
5611         exit condition if no tail loop is needed, and if the original exit
5612         condition should therefore be kept as-is.
5613         (tree_transform_and_unroll_loop): Handle that case here too.
5614
5615 2021-07-21  Kewen Lin  <linkw@linux.ibm.com>
5616
5617         * tree-data-ref.c (free_dependence_relations): Adjust to pass vec
5618         by reference.
5619         (free_data_refs): Likewise.
5620         * tree-data-ref.h (free_dependence_relations): Likewise.
5621         (free_data_refs): Likewise.
5622         * tree-predcom.c (struct chain): Use auto_vec instead of vec for
5623         members.
5624         (struct component): Likewise.
5625         (pcom_worker::pcom_worker): Adjust for auto_vec and renaming changes.
5626         (pcom_worker::~pcom_worker): Likewise.
5627         (pcom_worker::release_chain): Adjust as auto_vec changes.
5628         (pcom_worker::loop): Rename to ...
5629         (pcom_worker::m_loop): ... this.
5630         (pcom_worker::datarefs): Rename to ...
5631         (pcom_worker::m_datarefs): ... this.  Use auto_vec instead of vec.
5632         (pcom_worker::dependences): Rename to ...
5633         (pcom_worker::m_dependences): ... this.  Use auto_vec instead of vec.
5634         (pcom_worker::chains): Rename to ...
5635         (pcom_worker::m_chains): ... this.  Use auto_vec instead of vec.
5636         (pcom_worker::looparound_phis): Rename to ...
5637         (pcom_worker::m_looparound_phis): ... this.  Use auto_vec instead of
5638         vec.
5639         (pcom_worker::cache): Rename to ...
5640         (pcom_worker::m_cache): ... this.  Use auto_vec instead of vec.
5641         (pcom_worker::release_chain): Adjust for auto_vec changes.
5642         (pcom_worker::release_chains): Adjust for auto_vec and renaming
5643         changes.
5644         (release_component): Remove.
5645         (release_components): Adjust for release_component removal.
5646         (component_of): Adjust to use vec.
5647         (merge_comps): Likewise.
5648         (pcom_worker::aff_combination_dr_offset): Adjust for renaming changes.
5649         (pcom_worker::determine_offset): Likewise.
5650         (class comp_ptrs): Remove.
5651         (pcom_worker::split_data_refs_to_components): Adjust for renaming
5652         changes, for comp_ptrs removal with auto_vec.
5653         (pcom_worker::suitable_component_p): Adjust for renaming changes.
5654         (pcom_worker::filter_suitable_components): Adjust for release_component
5655         removal.
5656         (pcom_worker::valid_initializer_p): Adjust for renaming changes.
5657         (pcom_worker::find_looparound_phi): Likewise.
5658         (pcom_worker::add_looparound_copies): Likewise.
5659         (pcom_worker::determine_roots_comp): Likewise.
5660         (pcom_worker::single_nonlooparound_use): Likewise.
5661         (pcom_worker::execute_pred_commoning_chain): Likewise.
5662         (pcom_worker::execute_pred_commoning): Likewise.
5663         (pcom_worker::try_combine_chains): Likewise.
5664         (pcom_worker::prepare_initializers_chain): Likewise.
5665         (pcom_worker::prepare_initializers): Likewise.
5666         (pcom_worker::prepare_finalizers_chain): Likewise.
5667         (pcom_worker::prepare_finalizers): Likewise.
5668         (pcom_worker::tree_predictive_commoning_loop): Likewise.
5669
5670 2021-07-20  Martin Sebor  <msebor@redhat.com>
5671
5672         PR middle-end/101397
5673         * builtins.c (gimple_call_return_array): Add argument.  Correct
5674         offsets for memchr, mempcpy, stpcpy, and stpncpy.
5675         (compute_objsize_r): Adjust offset computation for argument returning
5676         built-ins.
5677
5678 2021-07-20  Martin Sebor  <msebor@redhat.com>
5679
5680         PR middle-end/101300
5681         * tree-ssa-uninit.c (check_defs): Handle UBSAN built-ins.
5682
5683 2021-07-20  Jeff Law  <jlaw@localhost.localdomain>
5684
5685         * function.c (assign_parm_setup_block): Use adjust_address instead
5686         of change_address to preserve MEM_EXPR and friends.
5687
5688 2021-07-20  Martin Sebor  <msebor@redhat.com>
5689
5690         * cfgloop.h (single_likely_exit): Adjust by-value argument to
5691         by-const-reference.
5692         * cfgloopanal.c (single_likely_exit): Same.
5693         * cgraph.h (struct cgraph_node): Same.
5694         * cgraphclones.c (cgraph_node::create_virtual_clone): Same.
5695         * genautomata.c (merge_states): Same.
5696         * genextract.c (VEC_char_to_string): Same.
5697         * genmatch.c (dt_node::gen_kids_1): Same.
5698         (walk_captures): Adjust by-value argument to by-reference.
5699         * gimple-ssa-store-merging.c (check_no_overlap): Adjust by-value argument
5700         to by-const-reference.
5701         * gimple.c (gimple_build_call_vec): Same.
5702         (gimple_build_call_internal_vec): Same.
5703         (gimple_build_switch): Same.
5704         (sort_case_labels): Same.
5705         (preprocess_case_label_vec_for_gimple): Adjust by-value argument to
5706         by-reference.
5707         * gimple.h (gimple_build_call_vec): Adjust by-value argument to
5708         by-const-reference.
5709         (gimple_build_call_internal_vec): Same.
5710         (gimple_build_switch): Same.
5711         (sort_case_labels): Same.
5712         (preprocess_case_label_vec_for_gimple): Adjust by-value argument to
5713         by-reference.
5714         * haifa-sched.c (calc_priorities): Adjust by-value argument to
5715         by-const-reference.
5716         (sched_init_luids): Same.
5717         (haifa_init_h_i_d): Same.
5718         * ipa-cp.c (ipa_get_indirect_edge_target_1): Same.
5719         (adjust_callers_for_value_intersection): Adjust by-value argument to
5720         by-reference.
5721         (find_more_scalar_values_for_callers_subset): Adjust by-value argument to
5722         by-const-reference.
5723         (find_more_contexts_for_caller_subset): Same.
5724         (find_aggregate_values_for_callers_subset): Same.
5725         (copy_useful_known_contexts): Same.
5726         * ipa-fnsummary.c (remap_edge_summaries): Same.
5727         (remap_freqcounting_predicate): Same.
5728         * ipa-inline.c (add_new_edges_to_heap): Adjust by-value argument to
5729         by-reference.
5730         * ipa-predicate.c (predicate::remap_after_inlining): Adjust by-value argument
5731         to by-const-reference.
5732         * ipa-predicate.h (predicate::remap_after_inlining): Same.
5733         * ipa-prop.c (ipa_find_agg_cst_for_param): Same.
5734         * ipa-prop.h (ipa_find_agg_cst_for_param): Same.
5735         * ira-build.c (ira_loop_tree_body_rev_postorder): Same.
5736         * read-rtl.c (add_overload_instance): Same.
5737         * rtl.h (native_decode_rtx): Same.
5738         (native_decode_vector_rtx): Same.
5739         * sched-int.h (sched_init_luids): Same.
5740         (haifa_init_h_i_d): Same.
5741         * simplify-rtx.c (native_decode_vector_rtx): Same.
5742         (native_decode_rtx): Same.
5743         * tree-call-cdce.c (gen_shrink_wrap_conditions): Same.
5744         (shrink_wrap_one_built_in_call_with_conds): Same.
5745         (shrink_wrap_conditional_dead_built_in_calls): Same.
5746         * tree-data-ref.c (create_runtime_alias_checks): Same.
5747         (compute_all_dependences): Same.
5748         * tree-data-ref.h (compute_all_dependences): Same.
5749         (create_runtime_alias_checks): Same.
5750         (index_in_loop_nest): Same.
5751         * tree-if-conv.c (mask_exists): Same.
5752         * tree-loop-distribution.c (class loop_distribution): Same.
5753         (loop_distribution::create_rdg_vertices): Same.
5754         (dump_rdg_partitions): Same.
5755         (debug_rdg_partitions): Same.
5756         (partition_contains_all_rw): Same.
5757         (loop_distribution::distribute_loop): Same.
5758         * tree-parloops.c (oacc_entry_exit_ok_1): Same.
5759         (oacc_entry_exit_single_gang): Same.
5760         * tree-ssa-loop-im.c (hoist_memory_references): Same.
5761         (loop_suitable_for_sm): Same.
5762         * tree-ssa-loop-niter.c (bound_index): Same.
5763         * tree-ssa-reassoc.c (update_ops): Same.
5764         (swap_ops_for_binary_stmt): Same.
5765         (rewrite_expr_tree): Same.
5766         (rewrite_expr_tree_parallel): Same.
5767         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Same.
5768         * tree-ssa-sccvn.h (ao_ref_init_from_vn_reference): Same.
5769         * tree-ssa-structalias.c (process_all_all_constraints): Same.
5770         (make_constraints_to): Same.
5771         (handle_lhs_call): Same.
5772         (find_func_aliases_for_builtin_call): Same.
5773         (sort_fieldstack): Same.
5774         (check_for_overlaps): Same.
5775         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Same.
5776         (vect_create_cond_for_unequal_addrs): Same.
5777         (vect_create_cond_for_lower_bounds): Same.
5778         (vect_create_cond_for_alias_checks): Same.
5779         * tree-vect-slp-patterns.c (vect_validate_multiplication): Same.
5780         * tree-vect-slp.c (vect_analyze_slp_instance): Same.
5781         (vect_make_slp_decision): Same.
5782         (vect_slp_bbs): Same.
5783         (duplicate_and_interleave): Same.
5784         (vect_transform_slp_perm_load): Same.
5785         (vect_schedule_slp): Same.
5786         * tree-vectorizer.h (vect_transform_slp_perm_load): Same.
5787         (vect_schedule_slp): Same.
5788         (duplicate_and_interleave): Same.
5789         * tree.c (build_vector_from_ctor): Same.
5790         (build_vector): Same.
5791         (check_vector_cst): Same.
5792         (check_vector_cst_duplicate): Same.
5793         (check_vector_cst_fill): Same.
5794         (check_vector_cst_stepped): Same.
5795         * tree.h (build_vector_from_ctor): Same.
5796
5797 2021-07-20  Jakub Jelinek  <jakub@redhat.com>
5798
5799         PR target/101384
5800         * config/rs6000/rs6000-protos.h (easy_altivec_constant): Change return
5801         type from bool to int.
5802         * config/rs6000/rs6000.c (vspltis_constant): Fix up handling the
5803         EASY_VECTOR_MSB case if either step or copies is not 1.
5804         (vspltis_shifted): Fix comment typo.
5805         (easy_altivec_constant): Change return type from bool to int, instead
5806         of returning true return byte size of the element mode that should be
5807         used to synthetize the constant.
5808         * config/rs6000/predicates.md (easy_vector_constant_msb): Require
5809         that vspltis_shifted is 0, handle the case where easy_altivec_constant
5810         assumes using different vector mode from CONST_VECTOR's mode.
5811         * config/rs6000/altivec.md (easy_vector_constant_msb splitter): Use
5812         easy_altivec_constant to determine mode in which -1 >> -1 should be
5813         performed, use rs6000_expand_vector_init instead of gen_vec_initv4sisi.
5814
5815 2021-07-20  Richard Biener  <rguenther@suse.de>
5816
5817         PR debug/101473
5818         * dwarf2out.h (dwarf_file_data): Add key member.
5819         * dwarf2out.c (dwarf_file_hasher::equal): Compare key.
5820         (dwarf_file_hasher::hash): Hash key.
5821         (lookup_filename): Remap the filename and store it in the
5822         filename member of dwarf_file_data when creating a new
5823         dwarf_file_data.
5824         (file_name_acquire): Do not remap the filename again.
5825         (maybe_emit_file): Likewise.
5826
5827 2021-07-20  Jonathan Wright  <jonathan.wright@arm.com>
5828
5829         * config/aarch64/aarch64-simd-builtins.def: Use two variant
5830         generators for all TBL/TBX intrinsics and rename to
5831         consistent forms: qtbl[1234] or qtbx[1234].
5832         * config/aarch64/aarch64-simd.md (aarch64_tbl1<mode>):
5833         Rename to...
5834         (aarch64_qtbl1<mode>): This.
5835         (aarch64_tbx1<mode>): Rename to...
5836         (aarch64_qtbx1<mode>): This.
5837         (aarch64_tbl2v16qi): Delete.
5838         (aarch64_tbl3<mode>): Rename to...
5839         (aarch64_qtbl2<mode>): This.
5840         (aarch64_tbx4<mode>): Rename to...
5841         (aarch64_qtbx2<mode>): This.
5842         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_1): Use
5843         renamed qtbl1 and qtbl2 RTL patterns.
5844         * config/aarch64/arm_neon.h (vqtbl1_p8): Use renamed qtbl1
5845         RTL pattern.
5846         (vqtbl1_s8): Likewise.
5847         (vqtbl1_u8): Likewise.
5848         (vqtbl1q_p8): Likewise.
5849         (vqtbl1q_s8): Likewise.
5850         (vqtbl1q_u8): Likewise.
5851         (vqtbx1_s8): Use renamed qtbx1 RTL pattern.
5852         (vqtbx1_u8): Likewise.
5853         (vqtbx1_p8): Likewise.
5854         (vqtbx1q_s8): Likewise.
5855         (vqtbx1q_u8): Likewise.
5856         (vqtbx1q_p8): Likewise.
5857         (vtbl1_s8): Use renamed qtbl1 RTL pattern.
5858         (vtbl1_u8): Likewise.
5859         (vtbl1_p8): Likewise.
5860         (vtbl2_s8): Likewise
5861         (vtbl2_u8): Likewise.
5862         (vtbl2_p8): Likewise.
5863         (vtbl3_s8): Use renamed qtbl2 RTL pattern.
5864         (vtbl3_u8): Likewise.
5865         (vtbl3_p8): Likewise.
5866         (vtbl4_s8): Likewise.
5867         (vtbl4_u8): Likewise.
5868         (vtbl4_p8): Likewise.
5869         (vtbx2_s8): Use renamed qtbx2 RTL pattern.
5870         (vtbx2_u8): Likewise.
5871         (vtbx2_p8): Likewise.
5872         (vqtbl2_s8): Use renamed qtbl2 RTL pattern.
5873         (vqtbl2_u8): Likewise.
5874         (vqtbl2_p8): Likewise.
5875         (vqtbl2q_s8): Likewise.
5876         (vqtbl2q_u8): Likewise.
5877         (vqtbl2q_p8): Likewise.
5878         (vqtbx2_s8): Use renamed qtbx2 RTL pattern.
5879         (vqtbx2_u8): Likewise.
5880         (vqtbx2_p8): Likewise.
5881         (vqtbx2q_s8): Likewise.
5882         (vqtbx2q_u8): Likewise.
5883         (vqtbx2q_p8): Likewise.
5884         (vtbx4_s8): Likewise.
5885         (vtbx4_u8): Likewise.
5886         (vtbx4_p8): Likewise.
5887
5888 2021-07-20  Uroš Bizjak  <ubizjak@gmail.com>
5889
5890         PR target/100182
5891         * config/i386/sync.md (define_peephole2 atomic_storedi_fpu):
5892         Remove.
5893         (define_peephole2 atomic_loaddi_fpu): Ditto.
5894
5895 2021-07-20  Kito Cheng  <kito.cheng@sifive.com>
5896
5897         * config.gcc (riscv*-*-*): Detect which python is available.
5898
5899 2021-07-20  Kewen Lin  <linkw@linux.ibm.com>
5900
5901         * config/rs6000/vsx.md (mulhs_<mode>): Rename to...
5902         (smul<mode>3_highpart): ... this.
5903         (mulhu_<mode>): Rename to...
5904         (umul<mode>3_highpart): ... this.
5905         * config/rs6000/rs6000-builtin.def (MULHS_V2DI, MULHS_V4SI,
5906         MULHU_V2DI, MULHU_V4SI): Adjust.
5907
5908 2021-07-20  Kewen Lin  <linkw@linux.ibm.com>
5909
5910         PR tree-optimization/100696
5911         * internal-fn.c (first_commutative_argument): Add info for IFN_MULH.
5912         * internal-fn.def (IFN_MULH): New internal function.
5913         * tree-vect-patterns.c (vect_recog_mulhs_pattern): Add support to
5914         recog normal multiply highpart as IFN_MULH.
5915         * config/i386/i386.c (ix86_add_stmt_cost): Adjust for combined
5916         function CFN_MULH.
5917
5918 2021-07-19  Indu Bhagat  <indu.bhagat@oracle.com>
5919
5920         * config/elfos.h (CTF_DEBUGGING_INFO): New definition.
5921         (BTF_DEBUGGING_INFO): Likewise.
5922         * doc/tm.texi.in: Document the new macros.
5923         * doc/tm.texi: Regenerated.
5924         * toplev.c: Guard initialization of debug hooks.
5925
5926 2021-07-19  Indu Bhagat  <indu.bhagat@oracle.com>
5927
5928         * flags.h (ctf_debuginfo_p): New function declaration.
5929         * opts.c (ctf_debuginfo_p): New function definition.
5930
5931 2021-07-19  Andrew Stubbs  <ams@codesourcery.com>
5932
5933         PR target/100208
5934         * config/gcn/gcn-hsa.h (DRIVER_SELF_SPECS): New.
5935         (ASM_SPEC): Set -mattr for xnack and sram-ecc.
5936         * config/gcn/gcn-opts.h (enum sram_ecc_type): New.
5937         * config/gcn/gcn-valu.md: Add a warning comment.
5938         * config/gcn/gcn.c (gcn_option_override): Add "sorry" for -mxnack.
5939         (output_file_start): Add xnack and sram-ecc state to ".amdgcn_target".
5940         * config/gcn/gcn.md: Add a warning comment.
5941         * config/gcn/gcn.opt: Add -mxnack and -msram-ecc.
5942         * config/gcn/mkoffload.c (EF_AMDGPU_MACH_AMDGCN_GFX908): Remove
5943         SRAM-ECC flag.
5944         (EF_AMDGPU_XNACK): New.
5945         (EF_AMDGPU_SRAM_ECC): New.
5946         (elf_flags): New.
5947         (copy_early_debug_info): Use elf_flags.
5948         (main): Handle -mxnack and -msram-ecc options.
5949         * doc/invoke.texi: Document -mxnack and -msram-ecc.
5950
5951 2021-07-19  Andrew Pinski  <apinski@marvell.com>
5952
5953         PR target/101205
5954         * config/aarch64/aarch64.md (csneg3_uxtw_insn): Rename to ...
5955         (*cs<neg_not_cs>3_uxtw_insn4): and extend to NEG_NOT.
5956
5957 2021-07-19  Richard Biener  <rguenther@suse.de>
5958
5959         PR tree-optimization/101505
5960         * tree-vect-patterns.c (vect_determine_precisions): Walk
5961         PHIs also for loop vectorization.
5962
5963 2021-07-19  Richard Biener  <rguenther@suse.de>
5964
5965         * gimple.h (gimple_expr_type): Remove.
5966         * doc/gimple.texi: Remove gimple_expr_type documentation.
5967
5968 2021-07-19  Richard Biener  <rguenther@suse.de>
5969
5970         * tree-ssa-sccvn.c (vn_reference_eq): Handle NULL vr->type.
5971         (ao_ref_init_from_vn_reference): Likewise.
5972         (fully_constant_reference): Likewise.
5973         (vn_reference_lookup_call): Do not set vr->type to random
5974         values.
5975         * tree-ssa-pre.c (compute_avail): Do not try to PRE calls
5976         without a value.
5977         * tree-vect-generic.c (expand_vector_piecewise): Pass in
5978         whether we expanded parallel.
5979         (expand_vector_parallel): Adjust.
5980         (expand_vector_addition): Likewise.
5981         (expand_vector_comparison): Likewise.
5982         (expand_vector_operation): Likewise.
5983         (expand_vector_scalar_condition): Likewise.
5984         (expand_vector_conversion): Likewise.
5985
5986 2021-07-19  Richard Biener  <rguenther@suse.de>
5987
5988         * tree-vrp.c (register_edge_assert_for_2): Use the
5989         type from the LHS.
5990         (vrp_folder::fold_predicate_in): Likewise.
5991         * vr-values.c (gimple_assign_nonzero_p): Likewise.
5992         (vr_values::extract_range_from_comparison): Likewise.
5993         (vr_values::extract_range_from_ubsan_builtin): Use the
5994         type of the first operand.
5995         (vr_values::extract_range_basic): Push down type
5996         computation, use the appropriate LHS.
5997         (vr_values::extract_range_from_assignment): Use the
5998         type of the LHS.
5999
6000 2021-07-18  H.J. Lu  <hjl.tools@gmail.com>
6001
6002         PR target/101492
6003         * common/config/i386/i386-common.c (ix86_handle_option): For
6004         -mgeneral-regs-only, enable the GPR only instructions which are
6005         enabled implicitly by SSE ISAs unless they have been disabled
6006         explicitly.
6007
6008 2021-07-18  H.J. Lu  <hjl.tools@gmail.com>
6009
6010         PR target/101495
6011         * config/i386/i386.c (ix86_check_avx_upper_stores): Moved before
6012         ix86_avx_u128_mode_needed.
6013         (ix86_avx_u128_mode_needed): Return AVX_U128_DIRTY if callee
6014         returns AVX register.
6015
6016 2021-07-17  Jan Hubicka  <hubicka@ucw.cz>
6017
6018         * tree-ssa-structalias.c (handle_rhs_call): Support EAF_NOT_RETURNED.
6019         (handle_const_call): Liekise
6020         (handle_pure_call): Liekise
6021
6022 2021-07-17  Andrew MacLeod  <amacleod@redhat.com>
6023
6024         PR tree-optimization/96542
6025         * range-op.cc (range_operator::wi_fold_in_parts): New.
6026         (range_operator::fold_range): Call wi_fold_in_parts.
6027         (operator_lshift::wi_fold): Fix broken lshift by [0,0].
6028         * range-op.h (wi_fold_in_parts): Add prototype.
6029
6030 2021-07-16  David Malcolm  <dmalcolm@redhat.com>
6031
6032         * doc/analyzer.texi: Add __analyzer_dump_state.
6033
6034 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6035
6036         * config/rs6000/rbtree.c: New file.
6037         * config/rs6000/rbtree.h: New file.
6038
6039 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6040
6041         * config/rs6000/rs6000-gen-builtins.c (restriction): New enum.
6042         (typeinfo): Add restr field.
6043         (match_bracketed_pair): New function.
6044         (match_const_restriction): Implement.
6045
6046 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6047
6048         * config/rs6000/rs6000-gen-builtins.c (match_basetype): Implement.
6049
6050 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6051
6052         * config/rs6000/rs6000-gen-builtins.c (void_status): New enum.
6053         (basetype): Likewise.
6054         (typeinfo): Likewise.
6055         (handle_pointer): New function.
6056         (match_basetype): New stub function.
6057         (match_const_restriction): Likewise.
6058         (match_type): New function.
6059
6060 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6061
6062         * config/rs6000/rs6000-gen-builtins.c (consume_whitespace): New
6063         function.
6064         (advance_line): Likewise.
6065         (safe_inc_pos): Likewise.
6066         (match_identifier): Likewise.
6067         (match_integer): Likewise.
6068         (match_to_right_bracket): Likewise.
6069
6070 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6071
6072         * config/rs6000/rs6000-gen-builtins.c (bif_file): New variable.
6073         (ovld_file): Likewise.
6074         (header_file): Likewise.
6075         (init_file): Likewise.
6076         (defines_file): Likewise.
6077         (pgm_path): Likewise.
6078         (bif_path): Likewise.
6079         (ovld_path): Likewise.
6080         (header_path): Likewise.
6081         (init_path): Likewise.
6082         (defines_path): Likewise.
6083         (LINELEN): New macro.
6084         (linebuf): New variable.
6085         (line): Likewise.
6086         (pos): Likewise.
6087         (diag): Likewise.
6088         (bif_diag): New function.
6089         (ovld_diag): Likewise.
6090
6091 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6092
6093         * config/rs6000/rs6000-builtin-new.def: New.
6094         * config/rs6000/rs6000-overload.def: New.
6095
6096 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6097
6098         * config/rs6000/rs6000-gen-builtins.c: New.
6099
6100 2021-07-16  Bill Schmidt  <wschmidt@linux.ibm.com>
6101
6102         * Makefile.in (EXTRA_GTYPE_DEPS): New variable.
6103         (s-gtype): Depend on EXTRA_GTYPE_DEPS.
6104         * gengtype-state.c (state_writer::write_state_file_list): Add a
6105         parameter to the fileslist expression for the number of build
6106         headers to scan.
6107         (read_state_files_list): Detect build headers and strip the
6108         initial "./" or ".\" from their names.
6109         * gengtype.c (build_headers): New global variable.
6110         (num_build_headers): Likewise.
6111         (open_base_files): Emit #include for each build header.
6112         (main): Detect and count build headers.
6113         * gengtype.h (build_headers): New extern variable.
6114         (num_build_headers): Likewise.
6115
6116 2021-07-16  Richard Biener   <rguenther@suse.de>
6117
6118         * gimple-ssa-store-merging.c (verify_symbolic_number_p): Use
6119         the type of the LHS.
6120         (find_bswap_or_nop_1): Likewise.
6121         (find_bswap_or_nop): Likewise.
6122         * tree-vectorizer.h (vect_get_smallest_scalar_type): Adjust
6123         prototype.
6124         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
6125         Remove unused parameters, pass in the scalar type.  Fix
6126         internal store function handling.
6127         * tree-vect-stmts.c (vect_analyze_stmt): Remove assert.
6128         (vect_get_vector_types_for_stmt): Move down check for
6129         existing vector stmt after we've determined a scalar type.
6130         Pass down the used scalar type to vect_get_smallest_scalar_type.
6131         * tree-vect-generic.c (expand_vector_condition): Use
6132         the type of the LHS.
6133         (expand_vector_scalar_condition): Likewise.
6134         (expand_vector_operations_1): Likewise.
6135         * tree-vect-patterns.c (vect_widened_op_tree): Likewise.
6136         (vect_recog_dot_prod_pattern): Likewise.
6137         (vect_recog_sad_pattern): Likewise.
6138         (vect_recog_widen_op_pattern): Likewise.
6139         (vect_recog_widen_sum_pattern): Likewise.
6140         (vect_recog_mixed_size_cond_pattern): Likewise.
6141
6142 2021-07-16  Jan Hubicka  <hubicka@ucw.cz>
6143
6144         * ipa-modref.c (struct escape_entry): Use eaf_fleags_t.
6145         (dump_eaf_flags): Dump EAF_NOT_RETURNED
6146         (eaf_flags_useful_p): Use eaf_fleags_t; handle const functions
6147         and EAF_NOT_RETURNED.
6148         (modref_summary::useful_p): Likewise.
6149         (modref_summary_lto::useful_p): Likewise.
6150         (struct) modref_summary_lto: Use eaf_fleags_t.
6151         (deref_flags): Handle EAF_NOT_RETURNED.
6152         (struct escape_point): Use min_flags.
6153         (modref_lattice::init): Add EAF_NOT_RETURNED.
6154         (merge_call_lhs_flags): Ignore EAF_NOT_RETURNED functions
6155         (analyze_ssa_name_flags): Clear EAF_NOT_RETURNED on return;
6156         handle call flags.
6157         (analyze_parms): Also analyze const functions; update conition on
6158         flags usefulness.
6159         (modref_write): Update streaming.
6160         (read_section): Update streaming.
6161         (remap_arg_flags): Use eaf_flags_t.
6162         (modref_merge_call_site_flags): Hanlde EAF_NOT_RETURNED.
6163         * ipa-modref.h: (eaf_flags_t): New typedef.
6164         (struct modref_summary): Use eaf_flags_t.
6165         * tree-core.h (EAF_NOT_RETURNED): New constant.
6166
6167 2021-07-16  Richard Biener  <rguenther@suse.de>
6168
6169         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Use
6170         the type of the LHS.
6171         (gimple_assign_nonnegative_warnv_p): Likewise.
6172         (gimple_call_nonnegative_warnv_p): Likewise.  Return false
6173         if the call has no LHS.
6174         * gimple.c (gimple_could_trap_p_1): Use the type of the LHS.
6175         * tree-eh.c (stmt_could_throw_1_p): Likewise.
6176         * tree-inline.c (insert_init_stmt): Likewise.
6177         * tree-ssa-loop-niter.c (get_val_for): Likewise.
6178         * tree-outof-ssa.c (ssa_is_replaceable_p): Use the type of
6179         the def.
6180         * tree-ssa-sccvn.c (init_vn_nary_op_from_stmt): Take a
6181         gassign *.  Use the type of the lhs.
6182         (vn_nary_op_lookup_stmt): Adjust.
6183         (vn_nary_op_insert_stmt): Likewise.
6184
6185 2021-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
6186
6187         * config/s390/predicates.md (bras_sym_operand): Accept all
6188         functions in 64-bit mode, use UNSPEC_PLT31.
6189         (larl_operand): Use UNSPEC_PLT31.
6190         * config/s390/s390.c (s390_loadrelative_operand_p): Likewise.
6191         (legitimize_pic_address): Likewise.
6192         (s390_emit_tls_call_insn): Mark __tls_get_offset as function,
6193         use UNSPEC_PLT31.
6194         (s390_delegitimize_address): Use UNSPEC_PLT31.
6195         (s390_output_addr_const_extra): Likewise.
6196         (print_operand): Add @PLT to TLS calls, handle %K.
6197         (s390_function_profiler): Mark __fentry__/_mcount as function,
6198         use %K, use UNSPEC_PLT31.
6199         (s390_output_mi_thunk): Use only UNSPEC_GOT, use %K.
6200         (s390_emit_call): Use UNSPEC_PLT31.
6201         (s390_emit_tpf_eh_return): Mark __tpf_eh_return as function.
6202         * config/s390/s390.md (UNSPEC_PLT31): Rename from UNSPEC_PLT.
6203         (*movdi_64): Use %K.
6204         (reload_base_64): Likewise.
6205         (*sibcall_brc): Likewise.
6206         (*sibcall_brcl): Likewise.
6207         (*sibcall_value_brc): Likewise.
6208         (*sibcall_value_brcl): Likewise.
6209         (*bras): Likewise.
6210         (*brasl): Likewise.
6211         (*bras_r): Likewise.
6212         (*brasl_r): Likewise.
6213         (*bras_tls): Likewise.
6214         (*brasl_tls): Likewise.
6215         (main_base_64): Likewise.
6216         (reload_base_64): Likewise.
6217         (@split_stack_call<mode>): Likewise.
6218
6219 2021-07-16  Richard Biener  <rguenther@suse.de>
6220
6221         PR tree-optimization/101467
6222         * tree-vect-stmts.c (vect_gen_while): Properly guard
6223         make_temp_ssa_name usage.
6224
6225 2021-07-16  Cooper Qu  <cooper.qu@linux.alibaba.com>
6226
6227         * config.gcc: Don't use forked print-sysroot-suffix.sh and
6228         t-sysroot-suffix for C-SKY.
6229         * config/csky/print-sysroot-suffix.sh: Delete.
6230         * config/csky/t-csky-linux: Delete.
6231         * config/csky/t-sysroot-suffix: Define MULTILIB_DIRNAMES
6232         instead of CSKY_MULTILIB_DIRNAMES.
6233
6234 2021-07-16  Richard Biener  <rguenther@suse.de>
6235
6236         * tree-vect-loop.c (vect_transform_cycle_phi): Correct sign
6237         conversion issues with the partial reduction of the reused
6238         vector accumulator.
6239
6240 2021-07-16  Richard Biener  <rguenther@suse.de>
6241
6242         * config/i386/i386-options.c (ix86_option_override_internal): Set
6243         param_vect_partial_vector_usage to zero if not set.
6244
6245 2021-07-15  Uroš Bizjak  <ubizjak@gmail.com>
6246
6247         PR target/101346
6248         * config/i386/i386.h (VALID_SSE_REG_MODE): Add TDmode.
6249         (VALID_INT_MODE_P): Add SDmode and DDmode.
6250         Add TDmode for TARGET_64BIT.
6251         (VALID_DFP_MODE_P): Remove.
6252         * config/i386/i386.c (ix86_hard_regno_mode_ok):
6253         Do not use VALID_DFP_MODE_P.
6254
6255 2021-07-15  Andrew MacLeod  <amacleod@redhat.com>
6256
6257         * gimple-range-fold.cc (adjust_pointer_diff_expr): Use
6258         gimple_range_type.
6259         (fold_using_range::fold_stmt): Ditto.
6260         (fold_using_range::range_of_range_op): Ditto.
6261         (fold_using_range::range_of_phi): Ditto.
6262         (fold_using_range::range_of_call): Ditto.
6263         (fold_using_range::range_of_builtin_ubsan_call): Ditto.
6264         (fold_using_range::range_of_builtin_call): Ditto.
6265         (fold_using_range::range_of_cond_expr): Ditto.
6266         * gimple-range-fold.h (gimple_range_type): New.
6267
6268 2021-07-15  Martin Sebor  <msebor@redhat.com>
6269
6270         PR middle-end/97027
6271         * tree-ssa-strlen.c (handle_assign): New function.
6272         (maybe_warn_overflow): Add argument.
6273         (nonzero_bytes_for_type): New function.
6274         (count_nonzero_bytes): Handle more tree types.  Call
6275         nonzero_bytes_for_tye.
6276         (count_nonzero_bytes): Handle types.
6277         (handle_store): Handle stores from function calls.
6278         (strlen_check_and_optimize_call): Move code to handle_assign.  Call
6279         it for assignments from function calls.
6280
6281 2021-07-15  David Malcolm  <dmalcolm@redhat.com>
6282
6283         PR analyzer/95006
6284         PR analyzer/94713
6285         PR analyzer/94714
6286         * doc/invoke.texi: Add -Wanalyzer-use-of-uninitialized-value.
6287
6288 2021-07-15  David Malcolm  <dmalcolm@redhat.com>
6289
6290         * doc/invoke.texi (-fdump-analyzer-exploded-paths): New.
6291
6292 2021-07-15  Martin Sebor  <msebor@redhat.com>
6293
6294         PR c/101289
6295         PR c/97548
6296         * fold-const.c (operand_compare::operand_equal_p): Handle OEP_DECL_NAME.
6297         (operand_compare::verify_hash_value): Same.
6298         * tree-core.h (OEP_DECL_NAME): New.
6299
6300 2021-07-15  Martin Jambor  <mjambor@suse.cz>
6301
6302         * profile-count.h (profile_count::value): Change the return type to
6303         uint64_t.
6304         * gimple-pretty-print.c (dump_gimple_bb_header): Adjust print
6305         statement.
6306         * tree-cfg.c (dump_function_to_file): Likewise.
6307
6308 2021-07-15  Bill Schmidt  <wschmidt@linux.ibm.com>
6309
6310         PR target/101129
6311         * config/rs6000/rs6000-p8swap.c (has_part_mult): New.
6312         (rs6000_analyze_swaps): Insns containing a subreg of a mult are
6313         not swappable.
6314
6315 2021-07-15  Richard Biener  <rguenther@suse.de>
6316
6317         * tree-vectorizer.h (vect_gen_while): Match up with
6318         vect_gen_while_not.
6319         * tree-vect-stmts.c (vect_gen_while): Adjust API to that
6320         of vect_gen_while_not.
6321         (vect_gen_while_not): Adjust.
6322         * tree-vect-loop-manip.c (vect_set_loop_controls_directly): Likewise.
6323
6324 2021-07-15  Aldy Hernandez  <aldyh@redhat.com>
6325
6326         * gimple-range-cache.cc (non_null_ref::adjust_range): New.
6327         (ranger_cache::range_of_def): Call adjust_range.
6328         (ranger_cache::entry_range): Same.
6329         * gimple-range-cache.h (non_null_ref::adjust_range): New.
6330         * gimple-range.cc (gimple_ranger::range_of_expr): Call
6331         adjust_range.
6332         (gimple_ranger::range_on_entry): Same.
6333
6334 2021-07-15  Tamar Christina  <tamar.christina@arm.com>
6335
6336         Revert:
6337         2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6338
6339         * config/arm/neon.md (<sup>dot_prod<vsi2qi>): Drop statements.
6340
6341 2021-07-15  Tamar Christina  <tamar.christina@arm.com>
6342
6343         Revert:
6344         2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6345
6346         * config/aarch64/aarch64-simd-builtins.def (udot, sdot): Rename to...
6347         (sdot_prod, udot_prod): ...These.
6348         * config/aarch64/aarch64-simd.md (<sur>dot_prod<vsi2qi>): Remove.
6349         (aarch64_<sur>dot<vsi2qi>): Rename to...
6350         (<sur>dot_prod<vsi2qi>): ...This.
6351         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
6352         Update builtins.
6353
6354 2021-07-15  Jakub Jelinek  <jakub@redhat.com>
6355
6356         PR middle-end/101437
6357         * gimplify.c (gimplify_expr): Throw away volatile reads from empty
6358         types even if they have non-BLKmode TYPE_MODE.
6359
6360 2021-07-15  Richard Biener  <rguenther@suse.de>
6361
6362         PR driver/101383
6363         * gcc.c (process_command): Process -gtoggle like process_options
6364         would after parsing options.
6365
6366 2021-07-15  Trevor Saunders  <tbsaunde@tbsaunde.org>
6367
6368         * cfgexpand.c (expand_asm_loc): Adjust.
6369         (expand_asm_stmt): Likewise.
6370         * config/arm/aarch-common-protos.h (arm_md_asm_adjust): Likewise.
6371         * config/arm/aarch-common.c (arm_md_asm_adjust): Likewise.
6372         * config/arm/arm.c (thumb1_md_asm_adjust): Likewise.
6373         * config/avr/avr.c (avr_md_asm_adjust): Likewise.
6374         * config/cris/cris.c (cris_md_asm_adjust): Likewise.
6375         * config/i386/i386.c (ix86_md_asm_adjust): Likewise.
6376         * config/mn10300/mn10300.c (mn10300_md_asm_adjust): Likewise.
6377         * config/nds32/nds32.c (nds32_md_asm_adjust): Likewise.
6378         * config/pdp11/pdp11.c (pdp11_md_asm_adjust): Likewise.
6379         * config/rs6000/rs6000.c (rs6000_md_asm_adjust): Likewise.
6380         * config/s390/s390.c (s390_md_asm_adjust): Likewise.
6381         * config/vax/vax.c (vax_md_asm_adjust): Likewise.
6382         * config/visium/visium.c (visium_md_asm_adjust): Likewise.
6383         * doc/tm.texi: Regenerate.
6384         * target.def: Add location argument to md_asm_adjust.
6385
6386 2021-07-15  Trevor Saunders  <tbsaunde@tbsaunde.org>
6387
6388         * tree-diagnostic.c (diagnostic_report_current_function): Use the
6389         diagnostic's location, not input_location.
6390
6391 2021-07-15  Trevor Saunders  <tbsaunde@tbsaunde.org>
6392
6393         * cfgexpand.c (tree_conflicts_with_clobbers_p): Pass location to
6394         diagnostics.
6395         (expand_asm_stmt): Likewise.
6396
6397 2021-07-14  Peter Bergner  <bergner@linux.ibm.com>
6398
6399         * config/rs6000/rs6000.c (adjacent_mem_locations): Return the lower
6400         addressed memory rtx, if any.
6401         (rs6000_split_multireg_move): Fix code formatting.
6402         Handle MMA build built-ins with operands in adjacent memory locations.
6403
6404 2021-07-14  Peter Bergner  <bergner@linux.ibm.com>
6405
6406         * config/rs6000/rs6000.c (rs6000_split_multireg_move): Move to later
6407         in the file.
6408
6409 2021-07-14  Jason Merrill  <jason@redhat.com>
6410
6411         * sel-sched-ir.h (get_all_loop_exits): Use auto_vec.
6412
6413 2021-07-14  Jason Merrill  <jason@redhat.com>
6414
6415         * doc/invoke.texi: -fdelete-dead-exceptions is on by default for
6416         C++.
6417
6418 2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6419
6420         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6421         Remove erroneous line.
6422
6423 2021-07-14  Andrew MacLeod  <amacleod@redhat.com>
6424
6425         * params.opt (param_evrp_mode): Change default.
6426
6427 2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6428
6429         * config/aarch64/aarch64-simd-builtins.def (udot, sdot): Rename to...
6430         (sdot_prod, udot_prod): ...These.
6431         * config/aarch64/aarch64-simd.md (<sur>dot_prod<vsi2qi>): Remove.
6432         (aarch64_<sur>dot<vsi2qi>): Rename to...
6433         (<sur>dot_prod<vsi2qi>): ...This.
6434         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
6435         Update builtins.
6436
6437 2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6438
6439         * config/arm/neon.md (<sup>dot_prod<vsi2qi>): Drop statements.
6440
6441 2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6442
6443         * doc/sourcebuild.texi (arm_v8_2a_i8mm_neon_hw): Document.
6444
6445 2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6446
6447         * config/arm/neon.md (usdot_prod<vsi2qi>): New.
6448
6449 2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6450
6451         * config/aarch64/aarch64-simd.md (aarch64_usdot<vsi2qi>): Rename to...
6452         (usdot_prod<vsi2qi>): ... This.
6453         * config/aarch64/aarch64-simd-builtins.def (usdot): Rename to...
6454         (usdot_prod): ...This.
6455         * config/aarch64/arm_neon.h (vusdot_s32, vusdotq_s32): Likewise.
6456         * config/aarch64/aarch64-sve.md (@aarch64_<sur>dot_prod<vsi2qi>):
6457         Rename to...
6458         (@<sur>dot_prod<vsi2qi>): ...This.
6459         * config/aarch64/aarch64-sve-builtins-base.cc
6460         (svusdot_impl::expand): Use it.
6461
6462 2021-07-14  Tamar Christina  <tamar.christina@arm.com>
6463
6464         * optabs.def (usdot_prod_optab): New.
6465         * doc/md.texi: Document it and clarify other dot prod optabs.
6466         * optabs-tree.h (enum optab_subtype): Add optab_vector_mixed_sign.
6467         * optabs-tree.c (optab_for_tree_code): Support usdot_prod_optab.
6468         * optabs.c (expand_widen_pattern_expr): Likewise.
6469         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6470         * tree-vect-loop.c (vectorizable_reduction): Query dot-product kind.
6471         * tree-vect-patterns.c (vect_supportable_direct_optab_p): Take optional
6472         optab subtype.
6473         (vect_widened_op_tree): Optionally ignore
6474         mismatch types.
6475         (vect_recog_dot_prod_pattern): Support usdot_prod_optab.
6476
6477 2021-07-14  H.J. Lu  <hjl.tools@gmail.com>
6478
6479         PR target/101395
6480         * config/i386/driver-i386.c (host_detect_local_cpu): Check
6481         "arch [32|64]" and "tune [32|64]" for 32-bit and 64-bit codegen.
6482         Enable UINTR only for 64-bit codegen.
6483         * config/i386/i386-options.c
6484         (ix86_option_override_internal::DEF_PTA): Skip PTA_UINTR if not
6485         in 64-bit mode.
6486         * config/i386/i386.h (ARCH_ARG): New.
6487         (CC1_CPU_SPEC): Pass "[arch|tune] 32" for 32-bit codegen and
6488         "[arch|tune] 64" for 64-bit codegen.
6489
6490 2021-07-14  Richard Biener  <rguenther@suse.de>
6491
6492         PR tree-optimization/101445
6493         * tree-vect-stmts.c (vectorizable_load): Do the gap adjustment
6494         of the IV in the correct direction for negative stride
6495         accesses.
6496
6497 2021-07-14  Jakub Jelinek  <jakub@redhat.com>
6498
6499         PR go/101407
6500         * godump.c (godump_str_hash): New type.
6501         (godump_container::pot_dummy_types): Use string_hash instead of
6502         ptr_hash in the hash_set.
6503
6504 2021-07-14  Richard Biener  <rguenther@suse.de>
6505
6506         * tree-vect-loop.c (vect_find_reusable_accumulator): Handle
6507         vector types where the old vector type has a multiple of
6508         the new vector type elements.
6509         (vect_create_partial_epilog): New function, split out from...
6510         (vect_create_epilog_for_reduction): ... here.
6511         (vect_transform_cycle_phi): Reduce the re-used accumulator
6512         to the new vector type.
6513
6514 2021-07-14  Alexandre Oliva  <oliva@adacore.com>
6515
6516         * tree-ssa-alias.c (attr_fnspec::verify): Fix index in
6517         non-'t'-sized arg check.
6518
6519 2021-07-14  Alexandre Oliva  <oliva@adacore.com>
6520
6521         * tree-cfg.c (cleanup_dead_labels_eh): Update
6522         post_landing_pad label upon change of landing pad block's
6523         primary label.
6524         (cleanup_dead_labels): Check that a removed label is not that
6525         of a landing pad.
6526
6527 2021-07-13  Jonathan Wright  <jonathan.wright@arm.com>
6528
6529         * combine.c (combine_simplify_rtx): Add vec_select -> subreg
6530         simplification.
6531         * config/aarch64/aarch64.md (*zero_extend<SHORT:mode><GPI:mode>2_aarch64):
6532         Add Neon to general purpose register case for zero-extend
6533         pattern.
6534         * config/arm/vfp.md (*arm_movsi_vfp): Remove "*" from *t -> r
6535         case to prevent some cases opting to go through memory.
6536         * cse.c (fold_rtx): Add vec_select -> subreg simplification.
6537         * rtl.c (rtvec_series_p): Define predicate to determine
6538         whether a vector contains a linear series of integers.
6539         * rtl.h (rtvec_series_p): Define.
6540         * rtlanal.c (vec_series_lowpart_p): Define predicate to
6541         determine if a vector selection is equivalent to the low part
6542         of the vector.
6543         * rtlanal.h (vec_series_lowpart_p): Define.
6544         * simplify-rtx.c (simplify_context::simplify_binary_operation_1):
6545         Add vec_select -> subreg simplification.
6546
6547 2021-07-13  Paul A. Clarke  <pc@us.ibm.com>
6548
6549         * config/rs6000/smmintrin.h (_mm_testz_si128, _mm_testc_si128,
6550         _mm_testnzc_si128, _mm_test_all_ones, _mm_test_all_zeros,
6551         _mm_test_mix_ones_zeros): New.
6552
6553 2021-07-13  Roger Sayle  <roger@nextmovesoftware.com>
6554             Richard Biener  <rguenther@suse.de>
6555
6556         * gimple.c (gimple_could_trap_p_1):  Make S argument a
6557         "const gimple*".  Preserve constness in call to
6558         gimple_asm_volatile_p.
6559         (gimple_could_trap_p): Make S argument a "const gimple*".
6560         * gimple.h (gimple_could_trap_p_1, gimple_could_trap_p):
6561         Update function prototypes.
6562
6563 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6564
6565         * tree-vectorizer.h (vect_reusable_accumulator): New structure.
6566         (_loop_vec_info::main_loop_edge): New field.
6567         (_loop_vec_info::skip_main_loop_edge): Likewise.
6568         (_loop_vec_info::skip_this_loop_edge): Likewise.
6569         (_loop_vec_info::reusable_accumulators): Likewise.
6570         (_stmt_vec_info::reduc_scalar_results): Likewise.
6571         (_stmt_vec_info::reused_accumulator): Likewise.
6572         (vect_get_main_loop_result): Declare.
6573         * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize
6574         reduc_scalar_inputs.
6575         (vec_info::free_stmt_vec_info): Free reduc_scalar_inputs.
6576         * tree-vect-loop-manip.c (vect_get_main_loop_result): New function.
6577         (vect_do_peeling): Fill an epilogue loop's main_loop_edge,
6578         skip_main_loop_edge and skip_this_loop_edge fields.
6579         * tree-vect-loop.c (INCLUDE_ALGORITHM): Define.
6580         (vect_emit_reduction_init_stmts): New function.
6581         (get_initial_def_for_reduction): Use it.
6582         (get_initial_defs_for_reduction): Likewise.  Change the vinfo
6583         parameter to a loop_vec_info.
6584         (vect_create_epilog_for_reduction): Store the scalar results
6585         in the reduc_info.  If an epilogue loop is reusing an accumulator
6586         from the main loop, and if the epilogue loop can also be skipped,
6587         try to place the reduction code in the join block.  Record
6588         accumulators that could potentially be reused by epilogue loops.
6589         (vect_transform_cycle_phi): When vectorizing epilogue loops,
6590         try to reuse accumulators from the main loop.  Record the initial
6591         value in reduc_info for non-SLP reductions too.
6592
6593 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6594
6595         * tree-vect-loop.c (get_initial_def_for_reduction): Remove
6596         adjustment handling.  Take the neutral value as an argument,
6597         in place of the code argument.
6598         (vect_transform_cycle_phi): Update accordingly.  Handle the
6599         initial values of cond reductions separately from code reductions.
6600         Choose the adjustment here rather than in
6601         get_initial_def_for_reduction.  Sink the splat of vec_initial_def.
6602
6603 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6604
6605         * tree-vect-loop.c (neutral_op_for_slp_reduction): Replace with...
6606         (neutral_op_for_reduction): ...this, providing a more general
6607         interface.
6608         (vect_create_epilog_for_reduction): Update accordingly.
6609         (vectorizable_reduction): Likewise.
6610         (vect_transform_cycle_phi): Likewise.
6611
6612 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6613
6614         * tree-vect-loop.c (get_initial_def_for_reduction): Take the
6615         reduc_info instead of the original stmt_vec_info.
6616         (vect_transform_cycle_phi): Update accordingly.
6617
6618 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6619
6620         * tree-vect-loop.c (get_initial_defs_for_reduction): Take the
6621         reduc_info as an additional parameter.
6622         (vect_transform_cycle_phi): Update accordingly.
6623
6624 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6625
6626         * tree-vectorizer.h: Include tree-ssa-operands.h.
6627         (vect_phi_initial_value): New function.
6628         * tree-vect-loop.c (neutral_op_for_slp_reduction): Use it.
6629         (get_initial_defs_for_reduction, info_for_reduction): Likewise.
6630         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6631         (vect_transform_cycle_phi, vectorizable_induction): Likewise.
6632
6633 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6634
6635         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
6636         the phi results to vectype after creating them.  Remove later
6637         conversion code that thus becomes redundant.
6638
6639 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6640
6641         * tree-vect-loop.c (vect_create_epilog_for_reduction): Replace
6642         the new_phis vector with a reduc_inputs vector.  Combine handling
6643         of reduction chains and ncopies > 1.
6644
6645 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6646
6647         * tree-vect-loop.c (vect_create_epilog_for_reduction): Truncate
6648         scalar_results to group_size elements after reducing down from
6649         N*group_size elements.  Construct an array_slice of the live-out
6650         stmts and assert that there is one stmt per scalar result.
6651
6652 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6653
6654         * tree-vect-loop.c (vect_create_epilog_for_reduction): Remove
6655         nested_in_vect_loop and use double_reduc everywhere.  Remove dead
6656         assignment to "loop".
6657
6658 2021-07-13  Richard Sandiford  <richard.sandiford@arm.com>
6659
6660         * internal-fn.c (vectorized_internal_fn_supported_p): Handle
6661         vector types first.  For scalar types, consider both the preferred
6662         vector mode and the alternative vector modes.
6663         * optabs-query.c (can_vec_mask_load_store_p): Use the same
6664         structure as above, in particular using related_vector_mode
6665         for modes provided by autovectorize_vector_modes.
6666
6667 2021-07-13  Jakub Jelinek  <jakub@redhat.com>
6668             Richard Biener  <rguenther@suse.de>
6669
6670         PR tree-optimization/101419
6671         * tree-pass.h (PROP_objsz): Define.
6672         (make_pass_early_object_sizes): Declare.
6673         * passes.def (pass_all_early_optimizations): Rename pass_object_sizes
6674         there to pass_early_object_sizes, drop parameter.
6675         (pass_all_optimizations): Move pass_object_sizes right after pass_ccp,
6676         drop parameter, move pass_post_ipa_warn right after that.
6677         * tree-object-size.c (pass_object_sizes::execute): Rename to...
6678         (object_sizes_execute): ... this.  Add insert_min_max_p argument.
6679         (pass_data_object_sizes): Move after object_sizes_execute.
6680         (pass_object_sizes): Likewise.  In execute method call
6681         object_sizes_execute, drop set_pass_param method and insert_min_max_p
6682         non-static data member and its initializer in the ctor.
6683         (pass_data_early_object_sizes, pass_early_object_sizes,
6684         make_pass_early_object_sizes): New.
6685         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use
6686         (cfun->curr_properties & PROP_objsz) instead of cfun->after_inlining.
6687
6688 2021-07-13  Kito Cheng  <kito.cheng@sifive.com>
6689
6690         PR target/101275
6691         * config/riscv/constraints.md ("S"): Update description and remove
6692         @internal.
6693         * doc/md.texi (Machine Constraints): Document the 'S' constraints
6694         for RISC-V.
6695
6696 2021-07-13  Richard Biener  <rguenther@suse.de>
6697
6698         Revert:
6699         2021-07-12  Richard Biener  <rguenther@suse.de>
6700
6701         * tree-vect-slp.c (vect_slp_region): Show the number of
6702         SLP graph entries in the optimization message.
6703
6704 2021-07-13  Michael Meissner  <meissner@linux.ibm.com>
6705
6706         * config/rs6000/altivec.md (xxspltiw_v4sf): Change local variable
6707         value to to long.
6708         * config/rs6000/rs6000-protos.h (rs6000_const_f32_to_i32): Change
6709         return type to long.
6710         * config/rs6000/rs6000.c (rs6000_const_f32_to_i32): Change return
6711         type to long.
6712
6713 2021-07-12  Andrew MacLeod  <amacleod@redhat.com>
6714
6715         * gimple-range-fold.cc (fold_using_range::range_of_builtin_ubsan_call):
6716         Query relation between the 2 operands and use it.
6717
6718 2021-07-12  Sergei Trofimovich  <siarheit@google.com>
6719
6720         * doc/cfg.texi: Fix s/ei_safe_safe/ei_safe_edge/ typo.
6721
6722 2021-07-12  Uroš Bizjak  <ubizjak@gmail.com>
6723
6724         PR target/101424
6725         * config/i386/predicates.md (vec_setm_sse41_operand):
6726         Rename from vec_setm_operand.
6727         (vec_setm_avx2_operand): New predicate.
6728         * config/i386/sse.md (vec_set<V_128:mode>): Use V_128 mode iterator.
6729         Use vec_setm_sse41_operand as operand 2 predicate.
6730         (vec_set<V_256_512:mode): New expander.
6731         * config/i386/mmx.md (vec_setv2hi): Use vec_setm_sse41_operand
6732         as operand 2 predicate.
6733
6734 2021-07-12  Andrew MacLeod  <amacleod@redhat.com>
6735
6736         PR tree-optimization/101335
6737         * range-op.cc (operator_cast::lhs_op1_relation): Delete.
6738
6739 2021-07-12  Andrew Pinski  <apinski@marvell.com>
6740
6741         * tree-ssa-phiopt.c (match_simplify_replacement): Move
6742         insert of the sequence before the movement of the
6743         statement. Check if to see if the statement is used
6744         outside of the original phi to see if we should move it.
6745
6746 2021-07-12  Richard Biener  <rguenther@suse.de>
6747
6748         * dump-context.h (debug_dump_context::debug_dump_context):
6749         Add FILE * parameter defaulted to stderr.
6750         * dumpfile.c (debug_dump_context::debug_dump_context): Adjust.
6751         * tree-vect-slp.c (dot_slp_tree): New functions.
6752
6753 2021-07-12  Richard Biener  <rguenther@suse.de>
6754
6755         PR tree-optimization/101373
6756         * tree-ssa-pre.c (prune_clobbered_mems): Also prune trapping
6757         references when the BB may not return.
6758         (compute_avail): Pass in the function we're working on and
6759         replace cfun references with it.  Externally throwing
6760         const calls also possibly terminate the function.
6761         (pass_pre::execute): Pass down the function we're working on.
6762         * gcse.c (compute_hash_table_work): Externally throwing
6763         const/pure calls also need record_last_mem_set_info.
6764         * postreload-gcse.c (record_opr_changes): Looping or externally
6765         throwing const/pure calls also need record_last_mem_set_info.
6766
6767 2021-07-12  Uroš Bizjak  <ubizjak@gmail.com>
6768
6769         * recog.c (memory_address_addr_space_p): Change the type to bool.
6770         Return true/false instead of 1/0.
6771         (offsettable_memref_p): Ditto.
6772         (offsettable_nonstrict_memref_p): Ditto.
6773         (offsettable_address_addr_space_p): Ditto.
6774         Change the type of addressp indirect function to bool.
6775         * recog.h (memory_address_addr_space_p): Change the type to bool.
6776         (strict_memory_address_addr_space_p): Ditto.
6777         (offsettable_memref_p): Ditto.
6778         (offsettable_nonstrict_memref_p): Ditto.
6779         (offsettable_address_addr_space_p): Ditto.
6780         * reload.c (maybe_memory_address_addr_space_p): Ditto.
6781         (strict_memory_address_addr_space_p): Change the type to bool.
6782         Return true/false instead of 1/0.
6783         (maybe_memory_address_addr_space_p): Change the type to bool.
6784
6785 2021-07-12  Richard Biener  <rguenther@suse.de>
6786
6787         * tree-vect-slp.c (vect_slp_region): Show the number of
6788         SLP graph entries in the optimization message.
6789
6790 2021-07-12  Richard Biener  <rguenther@suse.de>
6791
6792         PR tree-optimization/101394
6793         * tree-ssa-pre.c (do_pre_regular_insertion): Avoid inserting
6794         copies from abnormals for a full redundancy.
6795
6796 2021-07-12  Richard Biener  <rguenther@suse.de>
6797
6798         PR middle-end/101423
6799         * gimple.c (gimple_could_trap_p_1): Internal function calls
6800         do not trap.
6801         * tree-eh.c (tree_could_trap_p): Likewise.
6802
6803 2021-07-12  prathamesh.kulkarni  <prathamesh.kulkarni@linaro.org>
6804
6805         PR target/66791
6806         * config/arm/arm_neon.h (vmul_n_u32): Replace call to builtin with
6807         __a * __b.
6808         (vmulq_n_u32): Likewise.
6809         (vmul_n_f32): Gate __a * __b on __FAST_MATH__.
6810         (vmulq_n_f32): Likewise.
6811         (vmul_n_f16): Likewise.
6812         (vmulq_n_f16): Likewise.
6813
6814 2021-07-12  Martin Liska  <mliska@suse.cz>
6815
6816         PR sanitizer/101425
6817         * gcc.c (check_offload_target_name): Call
6818           candidates_list_and_hint only if we have a candidate.
6819
6820 2021-07-12  prathamesh.kulkarni  <prathamesh.kulkarni@linaro.org>
6821
6822         PR target/98435
6823         * config/arm/neon.md (vec_init): Move to ...
6824         * config/arm/vec-common.md (vec_init): ... here.
6825         Change the pattern's mode to VDQX and gate it on VALID_MVE_MODE.
6826
6827 2021-07-12  Roger Sayle  <roger@nextmovesoftware.com>
6828
6829         PR tree-optimization/101403
6830         * match.pd ((T)bswap(X)>>C): Correctly handle cases where
6831         signedness of the shift is not the same as the signedness of
6832         the type extension.
6833
6834 2021-07-09  Roger Sayle  <roger@nextmovesoftware.com>
6835             Uroš Bizjak  <ubizjak@gmail.com>
6836
6837         * config/i386/i386.md (*divmodsi4_const): Optimize SImode
6838         divmod of a constant numerator with new define_insn_and_split.
6839
6840 2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
6841
6842         PR target/100152
6843         * config/i386/i386-expand.c (ix86_expand_call): If a call is
6844         to a non-local-binding, or local but to a public symbol, then
6845         assume that it might be indirected via the lazy symbol binder.
6846         Mark R10 and R10 as clobbered in that case.
6847
6848 2021-07-09  Eric Botcazou  <ebotcazou@adacore.com>
6849
6850         PR target/101377
6851         * gcc.c (ASM_DEBUG_DWARF_OPTION): Set again to --gdwarf2 in
6852         the case where HAVE_AS_WORKING_DWARF_N_FLAG is not defined
6853         and HAVE_LD_BROKEN_PE_DWARF5 is defined.
6854
6855 2021-07-09  Uroš Bizjak  <ubizjak@gmail.com>
6856
6857         * config/i386/i386.md (*udivmodsi4_pow2_zext_1): Limit the
6858         log2 range of operands[3] to [1,31].
6859         (*udivmodsi4_pow2_zext_2): Ditto.  Correct insn RTX pattern.
6860
6861 2021-07-09  Sergei Trofimovich  <siarheit@google.com>
6862
6863         * doc/md.texi: Don't split @smallexample in multiple @groups.
6864
6865 2021-07-09  Sergei Trofimovich  <siarheit@google.com>
6866
6867         * doc/md.texi: Add missing 'see' word.
6868
6869 2021-07-09  Andrew Pinski  <apinski@marvell.com>
6870
6871         * tree-ssa-phiopt.c (phiopt_early_allow): Change arguments
6872         to take sequence and gimple_match_op.  Accept the case where
6873         op is a SSA_NAME and one statement in the sequence.
6874         Also allow constants.
6875         (gimple_simplify_phiopt): Always pass a sequence to resimplify.
6876         Update call to phiopt_early_allow.  Discard the sequence if not
6877         used.
6878
6879 2021-07-09  Xi Ruoyao  <xry111@mengyan1223.wang>
6880
6881         PR target/100760
6882         PR target/100761
6883         PR target/100762
6884         * config/mips/mips.c (mips_const_insns): Use MSA_SUPPORTED_MODE_P
6885         instead of ISA_HAS_MSA.
6886         (mips_expand_vec_unpack): Likewise.
6887         (mips_expand_vector_init): Likewise.
6888
6889 2021-07-09  Kewen Lin  <linkw@linux.ibm.com>
6890
6891         * config/rs6000/vsx.md (mods_<mode>): Rename to...
6892         (mod<mode>3): ... this.
6893         (modu_<mode>): Rename to...
6894         (umod<mode>3): ... this.
6895         * config/rs6000/rs6000-builtin.def (MODS_V2DI, MODS_V4SI, MODU_V2DI,
6896         MODU_V4SI): Adjust.
6897
6898 2021-07-08  Jeff Law  <jeffreyalaw@gmail.com>
6899
6900         * config/h8300/shiftrotate.md (variable shifts): Expose condition
6901         code handling for the test before the loop.
6902
6903 2021-07-08  Martin Jambor  <mjambor@suse.cz>
6904
6905         PR ipa/101066
6906         * ipa-sra.c (class isra_call_summary): New member
6907         m_before_any_store, initialize it in the constructor.
6908         (isra_call_summary::dump): Dump the new field.
6909         (ipa_sra_call_summaries::duplicate): Copy it.
6910         (process_scan_results): Set it.
6911         (isra_write_edge_summary): Stream it.
6912         (isra_read_edge_summary): Likewise.
6913         (param_splitting_across_edge): Only override
6914         safe_to_import_accesses if m_before_any_store is set.
6915
6916 2021-07-08  Martin Sebor  <msebor@redhat.com>
6917
6918         PR bootstrap/101374
6919         * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref):
6920         Use Object Size Type 0 instead of 1.
6921
6922 2021-07-08  Richard Sandiford  <richard.sandiford@arm.com>
6923
6924         * tree-vect-loop.c (vectorizable_reduction): Remove always-true
6925         if condition.
6926
6927 2021-07-08  Richard Sandiford  <richard.sandiford@arm.com>
6928
6929         * match.pd: Simplify an extend-operate-truncate sequence involving
6930         a POLY_INT_CST.
6931
6932 2021-07-08  Roger Sayle  <roger@nextmovesoftware.com>
6933             Richard Biener  <rguenther@suse.de>
6934
6935         PR tree-optimization/40210
6936         * match.pd (bswap optimizations): Simplify (bswap(x)>>C1)&C2 as
6937         (x>>C3)&C2 when possible.  Simplify bswap(x)>>C1 as ((T)x)>>C2
6938         when possible.  Simplify bswap(x)&C1 as (x>>C2)&C1 when 0<=C1<=255.
6939
6940 2021-07-08  Uroš Bizjak  <ubizjak@gmail.com>
6941
6942         PR target/100637
6943         * config/i386/i386-expand.c (ix86_expand_sse_unpack):
6944         Handle V4QI mode.
6945         * config/i386/mmx.md (V_32): New mode iterator.
6946         (mov<V_32:mode>): Use V_32 mode iterator.
6947         (*mov<V_32:mode>_internal): Ditto.
6948         (*push<V_32:mode>2_rex64): Ditto.
6949         (*push<V_32:mode>2): Ditto.
6950         (movmisalign<V_32:mode>): Ditto.
6951         (mmx_<any_shiftrt:insn>v1si3): New insn pattern.
6952         (sse4_1_<any_extend:code>v2qiv2hi2): Ditto.
6953         (vec_unpacks_lo_v4qi): New expander.
6954         (vec_unpacks_hi_v4qi): Ditto.
6955         (vec_unpacku_lo_v4qi): Ditto.
6956         (vec_unpacku_hi_v4qi): Ditto.
6957         * config/i386/i386.h (VALID_SSE2_REG_MODE): Add V1SImode.
6958         (VALID_INT_MODE_P): Ditto.
6959
6960 2021-07-08  Michael Meissner  <meissner@linux.ibm.com>
6961
6962         PR target/100809
6963         * config/rs6000/rs6000.md (udivti3): New insn.
6964         (divti3): New insn.
6965         (umodti3): New insn.
6966         (modti3): New insn.
6967
6968 2021-07-07  Martin Sebor  <msebor@redhat.com>
6969
6970         PR tree-optimization/100137
6971         PR tree-optimization/99121
6972         PR tree-optimization/97027
6973         * builtins.c (access_ref::access_ref): Also set offmax.
6974         (access_ref::offset_in_range): Define new function.
6975         (access_ref::add_offset): Set offmax.
6976         (access_ref::inform_access): Handle access_none.
6977         (handle_mem_ref): Clear ostype.
6978         (compute_objsize_r): Handle ASSERT_EXPR.
6979         * builtins.h (struct access_ref): Add offmax member.
6980         * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Use
6981         compute_objsize() and simplify.
6982
6983 2021-07-07  Peter Bergner  <bergner@linux.ibm.com>
6984
6985         * config/rs6000/rs6000-call.c (mma_init_builtins): Use VSX_BUILTIN_LXVP
6986         and VSX_BUILTIN_STXVP.
6987
6988 2021-07-07  Martin Sebor  <msebor@redhat.com>
6989
6990         PR target/101363
6991         * config/aarch64/aarch64.c (aarch64_simd_lane_bounds): Remove
6992         a stray %K from error_at() missed in r12-2088.
6993
6994 2021-07-07  Richard Biener  <rguenther@suse.de>
6995
6996         PR tree-optimization/99728
6997         * tree-ssa-loop-im.c (gather_mem_refs_stmt): Record
6998         aggregate copies.
6999         (mem_refs_may_alias_p): Add assert we handled aggregate
7000         copies elsewhere.
7001         (sm_seq_valid_bb): Give up when running into aggregate copies.
7002         (ref_indep_loop_p): Handle aggregate copies as never
7003         being invariant themselves but allow other refs to be
7004         disambiguated against them.
7005         (can_sm_ref_p): Do not try to apply store-motion to aggregate
7006         copies.
7007
7008 2021-07-06  Indu Bhagat  <indu.bhagat@oracle.com>
7009
7010         PR debug/101283
7011         * dwarf2ctf.c (ctf_get_AT_data_member_location): Multiply by 8 to get
7012         number of bits.
7013
7014 2021-07-06  Martin Sebor  <msebor@redhat.com>
7015
7016         * gimple-pretty-print.c (percent_G_format): Remove.
7017         * tree-diagnostic.c (default_tree_printer): Remove calls.
7018         * tree-pretty-print.c (percent_K_format): Remove.
7019         * tree-pretty-print.h (percent_K_format): Remove.
7020
7021 2021-07-06  Martin Sebor  <msebor@redhat.com>
7022
7023         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_builtin):
7024         Remove %K and use error_at.
7025         (aarch64_expand_fcmla_builtin): Same.
7026         (aarch64_expand_builtin_tme): Same.
7027         (aarch64_expand_builtin_memtag): Same.
7028         * config/arm/arm-builtins.c (arm_expand_acle_builtin): Same.
7029         (arm_expand_builtin): Same.
7030         * config/arm/arm.c (bounds_check): Same.
7031
7032 2021-07-06  Martin Sebor  <msebor@redhat.com>
7033
7034         * builtins.c (warn_string_no_nul): Remove %G.
7035         (maybe_warn_for_bound): Same.
7036         (warn_for_access): Same.
7037         (check_access): Same.
7038         (check_strncat_sizes): Same.
7039         (expand_builtin_strncat): Same.
7040         (expand_builtin_strncmp): Same.
7041         (expand_builtin): Same.
7042         (expand_builtin_object_size): Same.
7043         (warn_dealloc_offset): Same.
7044         (maybe_emit_free_warning): Same.
7045         * calls.c (maybe_warn_alloc_args_overflow): Same.
7046         (maybe_warn_nonstring_arg): Same.
7047         (maybe_warn_rdwr_sizes): Same.
7048         * expr.c (expand_expr_real_1): Remove %K.
7049         * gimple-fold.c (gimple_fold_builtin_strncpy): Remove %G.
7050         (gimple_fold_builtin_strncat): Same.
7051         * gimple-ssa-sprintf.c (format_directive): Same.
7052         (handle_printf_call): Same.
7053         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Same.
7054         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Same.
7055         (maybe_diag_access_bounds): Same.  Call gimple_location.
7056         (check_bounds_or_overlap): Same.
7057         * trans-mem.c (ipa_tm_scan_irr_block): Remove %K.  Simplify.
7058         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Remove %G.
7059         * tree-ssa-strlen.c (maybe_warn_overflow): Same.
7060         (maybe_diag_stxncpy_trunc): Same.
7061         (handle_builtin_stxncpy_strncat): Same.
7062         (maybe_warn_pointless_strcmp): Same.
7063         * tree-ssa-uninit.c (maybe_warn_operand): Same.
7064
7065 2021-07-06  Uroš Bizjak  <ubizjak@gmail.com>
7066
7067         PR target/97194
7068         * config/i386/predicates.md (vec_setm_operand): Enable
7069         register_operand for TARGET_SSE4_1.
7070         * config/i386/mmx.md (vec_setv2hi): Use vec_setm_operand
7071         as operand 2 predicate.  Call ix86_expand_vector_set_var
7072         for non-constant index operand.
7073         (vec_setv4qi): Use vec_setm_mmx_operand as operand 2 predicate.
7074         Call ix86_expand_vector_set_var for non-constant index operand.
7075
7076 2021-07-06  Jeff Law  <jeffreyalaw@gmail.com>
7077
7078         * config/h8300/jumpcall.md (*branch): When possible, generate
7079         the comparison in CCZN mode.
7080         * config/h8300/predicates.md (simple_memory_operand): Reject all
7081         auto-increment addressing modes.
7082
7083 2021-07-06  Iain Sandoe  <iain@sandoe.co.uk>
7084
7085         PR bootstrap/100246
7086         * config/i386/i386.h (struct stringop_algs): Define a CTOR for
7087         this type.
7088
7089 2021-07-06  Richard Biener  <rguenther@suse.de>
7090
7091         * doc/md.texi (vec_fmaddsub<mode>4): Document.
7092         (vec_fmsubadd<mode>4): Likewise.
7093         * optabs.def (vec_fmaddsub$a4): Add.
7094         (vec_fmsubadd$a4): Likewise.
7095         * internal-fn.def (IFN_VEC_FMADDSUB): Add.
7096         (IFN_VEC_FMSUBADD): Likewise.
7097         * tree-vect-slp-patterns.c (addsub_pattern::recognize):
7098         Refactor to handle IFN_VEC_FMADDSUB and IFN_VEC_FMSUBADD.
7099         (addsub_pattern::build): Likewise.
7100         * tree-vect-slp.c (vect_optimize_slp): CFN_VEC_FMADDSUB
7101         and CFN_VEC_FMSUBADD are not transparent for permutes.
7102         * config/i386/sse.md (vec_fmaddsub<mode>4): New expander.
7103         (vec_fmsubadd<mode>4): Likewise.
7104
7105 2021-07-06  Richard Biener  <rguenther@suse.de>
7106
7107         * doc/invoke.texi (fmove-loop-stores): Document.
7108         * common.opt (fmove-loop-stores): New option.
7109         * opts.c (default_options_table): Enable -fmove-loop-stores
7110         at -O1 but not -Og.
7111         * tree-ssa-loop-im.c (pass_lim::execute): Pass
7112         flag_move_loop_stores instead of true to
7113         loop_invariant_motion_in_fun.
7114
7115 2021-07-06  Iain Sandoe  <iain@sandoe.co.uk>
7116
7117         * doc/install.texi: Document --with-dsymutil.
7118
7119 2021-07-06  Andrew Pinski  <apinski@marvell.com>
7120
7121         PR tree-optimization/101256
7122         * dbgcnt.def (phiopt_edge_range): New counter.
7123         * tree-ssa-phiopt.c (replace_phi_edge_with_variable):
7124         Check to make sure the new name is defined in the same
7125         bb as the conditional before duplicating range info.
7126         Also add debug counter.
7127
7128 2021-07-06  Kewen Lin  <linkw@linux.ibm.com>
7129
7130         PR rtl-optimization/100328
7131         * config/i386/i386-options.c (ix86_option_override_internal):
7132         Set param_ira_consider_dup_in_all_alts to 0.
7133
7134 2021-07-06  Kewen Lin  <linkw@linux.ibm.com>
7135
7136         PR rtl-optimization/100328
7137         * doc/invoke.texi (ira-consider-dup-in-all-alts): Document new
7138         parameter.
7139         * ira.c (ira_get_dup_out_num): Adjust as parameter
7140         param_ira_consider_dup_in_all_alts.
7141         * params.opt (ira-consider-dup-in-all-alts): New.
7142         * ira-conflicts.c (process_regs_for_copy): Add one parameter
7143         single_input_op_has_cstr_p.
7144         (get_freq_for_shuffle_copy): New function.
7145         (add_insn_allocno_copies): Adjust as single_input_op_has_cstr_p.
7146         * ira-int.h (ira_get_dup_out_num): Add one bool parameter.
7147
7148 2021-07-05  Jeff Law  <jeffreyalaw@gmail.com>
7149
7150         * config/h8300/shiftrotate.md (shift-by-variable patterns): Update to
7151         generate condition code aware RTL directly.
7152
7153 2021-07-05  Andrew Pinski  <apinski@marvell.com>
7154
7155         PR tree-optimization/101039
7156         * match.pd (A CMP 0 ? A : -A): New patterns.
7157         * tree-ssa-phiopt.c (abs_replacement): Delete function.
7158         (tree_ssa_phiopt_worker): Don't call abs_replacement.
7159         Update comment about abs_replacement.
7160
7161 2021-07-05  Andrew Pinski  <apinski@marvell.com>
7162
7163         * tree-ssa-phiopt.c (gimple_simplify_phiopt):
7164         If "A ? B : C" fails to simplify, try "(!A) ? C : B".
7165
7166 2021-07-05  Andrew Pinski  <apinski@marvell.com>
7167
7168         * tree-ssa-phiopt.c (match_simplify_replacement):
7169         Add early_p argument. Call gimple_simplify_phiopt
7170         instead of gimple_simplify.
7171         (tree_ssa_phiopt_worker): Update call to
7172         match_simplify_replacement and allow unconditionally.
7173         (phiopt_early_allow): New function.
7174         (gimple_simplify_phiopt): New function.
7175
7176 2021-07-05  Andrew Pinski  <apinski@marvell.com>
7177
7178         PR middle-end/101237
7179         * fold-const.c (negate_expr_p): Remove call to element_mode
7180         and TREE_MODE/TREE_TYPE when calling HONOR_SIGNED_ZEROS,
7181         HONOR_SIGN_DEPENDENT_ROUNDING, and HONOR_SNANS.
7182         (fold_negate_expr_1): Likewise.
7183         (const_unop): Likewise.
7184         (fold_cond_expr_with_comparison): Likewise.
7185         (fold_binary_loc): Likewise.
7186         (fold_ternary_loc): Likewise.
7187         (tree_call_nonnegative_warnv_p): Likewise.
7188         * match.pd (-(A + B) -> (-B) - A): Likewise.
7189
7190 2021-07-05  Iain Sandoe  <iain@sandoe.co.uk>
7191
7192         * configure.ac: Handle --with-dsymutil in the same way as we
7193         do for the assembler and linker.  (DEFAULT_DSYMUTIL): New.
7194         Extract the type and version for the dsymutil configured or
7195         found by the default searches.
7196         * config.in: Regenerated.
7197         * configure: Regenerated.
7198         * collect2.c (do_dsymutil): Handle locating dsymutil in the
7199         same way as for the assembler and  linker.
7200         * config/darwin.h (DSYMUTIL): Delete.
7201         * gcc.c: Report a configured dsymutil correctly.
7202         * exec-tool.in: Allow for dsymutil.
7203
7204 2021-07-05  Uroš Bizjak  <ubizjak@gmail.com>
7205
7206         * config/i386/i386-expand.c (ix86_split_mmx_punpck):
7207         Handle V4QI and V2HI modes.
7208         (expand_vec_perm_blend): Allow 4-byte vector modes with TARGET_SSE4_1.
7209         Handle V4QI mode. Emit mmx_pblendvb32 for 4-byte modes.
7210         (expand_vec_perm_pshufb): Rewrite to use switch statemets.
7211         Handle 4-byte dual operands with TARGET_XOP and single operands
7212         with TARGET_SSSE3.  Emit mmx_ppermv32 for TARGET_XOP and
7213         mmx_pshufbv4qi3 for TARGET_SSSE3.
7214         (expand_vec_perm_pblendv): Allow 4-byte vector modes with TARGET_SSE4_1.
7215         (expand_vec_perm_interleave2): Allow 4-byte vector modes.
7216         (expand_vec_perm_pshufb2): Allow 4-byte vector modes with TARGET_SSSE3.
7217         (expand_vec_perm_even_odd_1): Handle V4QI mode.
7218         (expand_vec_perm_broadcast_1): Handle V4QI mode.
7219         (ix86_vectorize_vec_perm_const): Handle V4QI mode.
7220         * config/i386/mmx.md (mmx_ppermv32): New insn pattern.
7221         (mmx_pshufbv4qi3): Ditto.
7222         (*mmx_pblendw32): Ditto.
7223         (*mmx_pblendw64): Rename from *mmx_pblendw.
7224         (mmx_punpckhbw_low): New insn_and_split pattern.
7225         (mmx_punpcklbw_low): Ditto.
7226
7227 2021-07-05  Richard Biener  <rguenther@suse.de>
7228
7229         * tree-vect-loop-manip.c (vect_loop_versioning): Do not
7230         set LOOP_C_INFINITE on the vectorized loop.
7231
7232 2021-07-05  Richard Biener  <rguenther@suse.de>
7233
7234         PR middle-end/101291
7235         * cfgloopmanip.c (loop_version): Set the loop copy of the
7236         versioned loop to the new loop.
7237
7238 2021-07-04  Iain Sandoe  <iain@sandoe.co.uk>
7239
7240         PR target/100269
7241         * config.gcc: Ensure that Darwin biarch definitions are
7242         added before i386.h.
7243         * config/i386/darwin.h (TARGET_64BIT): Remove.
7244         (PR80556_WORKAROUND): New.
7245         (REAL_LIBGCC_SPEC): Amend to use PR80556_WORKAROUND.
7246         (DARWIN_SUBARCH_SPEC): New.
7247         * config/i386/darwin32-biarch.h (TARGET_64BIT_DEFAULT,
7248         TARGET_BI_ARCH, PR80556_WORKAROUND): New.
7249         (REAL_LIBGCC_SPEC): Remove.
7250         * config/i386/darwin64-biarch.h (TARGET_64BIT_DEFAULT,
7251         TARGET_BI_ARCH, PR80556_WORKAROUND): New.
7252         (REAL_LIBGCC_SPEC): Remove.
7253
7254 2021-07-03  H.J. Lu  <hjl.tools@gmail.com>
7255
7256         PR middle-end/101294
7257         * expr.c (store_constructor): Don't use vec_duplicate on vector.
7258
7259 2021-07-02  Martin Sebor  <msebor@redhat.com>
7260
7261         PR middle-end/98871
7262         PR middle-end/98512
7263         * diagnostic.c (get_any_inlining_info): New.
7264         (update_effective_level_from_pragmas): Handle inlining context.
7265         (diagnostic_enabled): Same.
7266         (diagnostic_report_diagnostic): Same.
7267         * diagnostic.h (struct diagnostic_info): Add ctor.
7268         (struct diagnostic_context): Add new member.
7269         * tree-diagnostic.c (set_inlining_locations): New.
7270         (tree_diagnostics_defaults): Set new callback pointer.
7271
7272 2021-07-02  Peter Bergner  <bergner@linux.ibm.com>
7273
7274         * config/rs6000/rs6000-builtin.def (BU_MMA_PAIR_LD, BU_MMA_PAIR_ST):
7275         New macros.
7276         (__builtin_vsx_lxvp, __builtin_vsx_stxvp): New built-ins.
7277         * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Expand
7278         lxvp and stxvp built-ins.
7279         (mma_init_builtins): Handle lxvp and stxvp built-ins.
7280         (builtin_function_type): Likewise.
7281         * doc/extend.texi (__builtin_vsx_lxvp, __builtin_mma_stxvp): Document.
7282
7283 2021-07-02  Jeff Law  <jeffreyalaw@gmail.com>
7284
7285         * config/h8300/h8300-protos.h (compute_a_shift_cc): Accept
7286         additional argument for the code.
7287         * config/h8300/h8300.c (compute_a_shift_cc): Accept additional
7288         argument for the code.  Just return if the ZN bits are useful or
7289         not rather than the old style CC_* enums.
7290         * config/h8300/shiftrotate.md (shiftqi_noscratch): Move before
7291         more generic shiftqi patterns.
7292         (shifthi_noscratch, shiftsi_noscratch): Similarly.
7293         (shiftqi_noscratch_set_flags): New pattern.
7294         (shifthi_noscratch_set_flags, shiftsi_noscratch_set_flags): Likewise.
7295
7296 2021-07-02  Andrew MacLeod  <amacleod@redhat.com>
7297
7298         PR tree-optimization/101223
7299         * range-op.cc (build_lt): Add -1 for signed values.
7300         (built_gt): Subtract -1 for signed values.
7301
7302 2021-07-02  David Faust  <david.faust@oracle.com>
7303
7304         * btfout.c (get_btf_kind): Support BTF_KIND_FLOAT.
7305         (btf_asm_type): Likewise.
7306
7307 2021-07-02  Jeff Law  <jeffreyalaw@gmail.com>
7308
7309         * config/h8300/h8300-protos.h (output_a_shift): Make first argument
7310         an array of rtx rather than a pointer to rtx.  Add code argument.
7311         (compute_a_shift_length): Similarly.
7312         * config/h8300/h8300.c (h8300_shift_costs): Adjust now that the
7313         shift itself isn't an operand.  Create dummy operand[0] to carry
7314         a mode and pass a suitable rtx code to compute_a_shift_length.
7315         (get_shift_alg): Adjust operand number of clobber in output templates.
7316         (output_a_shift): Make first argument an array of rtx rather than
7317         a pointer to rtx.  Add code argument for the type of shift.
7318         Adjust now that the shift itself is no longer an operand.
7319         (compute_a_shift_length): Similarly.
7320         * config/h8300/shiftrotate.md (shiftqi, shifthi, shiftsi): Use an
7321         iterator rather than nshift_operator.
7322         (shiftqi_noscratch, shifthi_noscratch, shiftsi_noscratch): Likewise.
7323         (shiftqi_clobber_flags): Adjust to API changes in output_a_shift
7324         and compute_a_shift_length.
7325         (shiftqi_noscratch_clobber_flags): Likewise.
7326         (shifthi_noscratch_clobber_flags): Likewise.
7327         (shiftsi_noscratch_clobber_flags): Likewise.
7328
7329 2021-07-02  Iain Sandoe  <iain@sandoe.co.uk>
7330
7331         PR debug/101283
7332         * config/darwin.h (DSYMUTIL_SPEC): Do not try to run
7333         dsymutil for BTF/CTF.
7334
7335 2021-07-02  Iain Sandoe  <iain@sandoe.co.uk>
7336
7337         PR debug/101283
7338         * config/darwin.h (CTF_INFO_SECTION_NAME): Update the
7339         segment to include BTF.
7340         (BTF_INFO_SECTION_NAME): New.
7341
7342 2021-07-02  Jeff Law  <jeffreyalaw@gmail.com>
7343
7344         * config/m32r/m32r-protos.h (call_operand): Adjust return type.
7345         (small_data_operand, memreg_operand, small_insn_p): Likewise.
7346         * config/m32r/m32r.c (call_operand): Adjust return type.
7347         (small_data_operand, memreg_operand): Likewise.
7348
7349 2021-07-02  Jeff Law  <jeffreyalaw@gmail.com>
7350
7351         * config/frv/frv-protos.h  (integer_register_operand): Adjust return
7352         type.
7353         (frv_load_operand, gpr_or_fpr_operand, gpr_no_subreg_operand): Likewise.
7354         (fpr_or_int6_operand, gpr_or_int_operand); Likewise.
7355         (gpr_or_int12_operand, gpr_or_int10_operand); Likewise.
7356         (move_source_operand, move_destination_operand): Likewise.
7357         (condexec_source_operand, condexec_dest_operand): Likewise.
7358         (lr_operand, gpr_or_memory_operand, fpr_or_memory_operand): Likewise.
7359         (reg_or_0_operand, fcc_operand, icc_operand, cc_operand): Likewise.
7360         (fcr_operand, icr_operand, cr_operand, call_operand): Likewise.
7361         (fpr_operand, even_reg_operand, odd_reg_operand): Likewise.
7362         (even_gpr_operand, odd_gpr_operand, quad_fpr_operand): Likewise.
7363         (even_fpr_operand, odd_fpr_operand): Likewise.
7364         (dbl_memory_one_insn_operand, dbl_memory_two_insn_operand): Likewise.
7365         (int12_operand, int6_operand, int5_operand, uint5_operand): Likewise.
7366         (uint4_operand, uint1_operand, int_2word_operand): Likewise
7367         (upper_int16_operand, uint16_operand, symbolic_operand): Likewise.
7368         (relational_operator, float_relational_operator): Likewise.
7369         (ccr_eqne_operator, minmax_operator): Likewise.
7370         (condexec_si_binary_operator, condexec_si_media_operator): Likewise.
7371         (condexec_si_divide_operator, condexec_si_unary_operator): Likewise.
7372         (condexec_sf_conv_operator, condexec_sf_add_operator): Likewise.
7373         (intop_compare_operator, acc_operand, even_acc_operand): Likewise.
7374         (quad_acc_operand, accg_operand): Likewise.
7375
7376 2021-07-02  Jeff Law  <jeffreyalaw@gmail.com>
7377
7378         * config/stormy16/stormy16-protos.h (xstormy16_below_100_symbol): Change
7379         return type to a bool.
7380         (nonimmediate_nonstack_operand): Likewise.
7381         (xstormy16_splittable_below100_operand): Likewise.
7382         * config/stormy16/stormy16.c (xstormy16_below_100_symbol): Fix
7383         return type.
7384         (xstormy16_splittable_below100_operand): Likewise.
7385
7386 2021-07-02  Richard Biener  <rguenther@suse.de>
7387
7388         PR tree-optimization/101293
7389         * tree-ssa-loop-im.c (mem_ref_hasher::equal): Compare MEM_REF bases
7390         with combined offsets.
7391         (gather_mem_refs_stmt): Hash MEM_REFs as if their offset were
7392         combined with the rest of the offset.
7393
7394 2021-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7395
7396         * config/i386/i386.c (asm_preferred_eh_data_format): Always use the
7397         PIC encodings for PE-COFF targets.
7398
7399 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
7400
7401         PR target/101286
7402         * config/i386/i386-expand.c (ix86_broadcast_from_integer_constant):
7403         Return nullptr for TImode inner mode.
7404
7405 2021-07-02  Richard Biener  <rguenther@suse.de>
7406
7407         PR tree-optimization/101280
7408         PR tree-optimization/101173
7409         * gimple-loop-interchange.cc
7410         (tree_loop_interchange::valid_data_dependences): Properly
7411         guard all dependence checks with DDR_REVERSED_P or its
7412         inverse.
7413
7414 2021-07-02  Hongyu Wang  <hongyu.wang@intel.com>
7415
7416         * config/i386/i386-expand.c (ix86_expand_builtin):
7417         Add branch to clear odata when ZF is set for asedecenc_expand
7418         and wideaesdecenc_expand.
7419
7420 2021-07-02  Eugene Rozenfeld  <erozen@microsoft.com>
7421
7422         * config/i386/gcc-auto-profile: regenerate
7423
7424 2021-07-02  liuhongt  <hongtao.liu@intel.com>
7425
7426         * config/i386/sse.md (trunc<mode><pmov_dst_4>2): Refined to ..
7427         (trunc<mode><pmov_dst_4_lower>2): this.
7428
7429 2021-07-01  David Malcolm  <dmalcolm@redhat.com>
7430
7431         * diagnostic.h (diagnostic_context::m_file_cache): New field.
7432         * input.c (class fcache): Rename to...
7433         (class file_cache_slot): ...this, making most members private and
7434         prefixing fields with "m_".
7435         (file_cache_slot::get_file_path): New accessor.
7436         (file_cache_slot::get_use_count): New accessor.
7437         (file_cache_slot::missing_trailing_newline_p): New accessor.
7438         (file_cache_slot::inc_use_count): New.
7439         (fcache_buffer_size): Move to...
7440         (file_cache_slot::buffer_size): ...here.
7441         (fcache_line_record_size): Move to...
7442         (file_cache_slot::line_record_size): ...here.
7443         (fcache_tab): Delete, in favor of global_dc->m_file_cache.
7444         (fcache_tab_size): Move to file_cache::num_file_slots.
7445         (diagnostic_file_cache_init): Update for move of fcache_tab
7446         to global_dc->m_file_cache.
7447         (diagnostic_file_cache_fini): Likewise.
7448         (lookup_file_in_cache_tab): Convert to...
7449         (file_cache::lookup_file): ...this.
7450         (diagnostics_file_cache_forcibly_evict_file): Update for move of
7451         fcache_tab to global_dc->m_file_cache, moving most of
7452         implementation to...
7453         (file_cache::forcibly_evict_file): ...this new function and...
7454         (file_cache_slot::evict): ...this new function.
7455         (evicted_cache_tab_entry): Convert to...
7456         (file_cache::evicted_cache_tab_entry): ...this.
7457         (add_file_to_cache_tab): Convert to...
7458         (file_cache::add_file): ...this, moving bulk of implementation
7459         to...
7460         (file_cache_slot::create): ..this new function.
7461         (file_cache::file_cache): New.
7462         (file_cache::~file_cache): New.
7463         (lookup_or_add_file_to_cache_tab): Convert to...
7464         (file_cache::lookup_or_add_file): ..this new function.
7465         (fcache::fcache): Rename to...
7466         (file_cache_slot::file_cache_slot): ...this, adding "m_" prefixes
7467         to fields.
7468         (fcache::~fcache): Rename to...
7469         (file_cache_slot::~file_cache_slot): ...this, adding "m_" prefixes
7470         to fields.
7471         (needs_read): Convert to...
7472         (file_cache_slot::needs_read_p): ...this.
7473         (needs_grow): Convert to...
7474         (file_cache_slot::needs_grow_p): ...this.
7475         (maybe_grow): Convert to...
7476         (file_cache_slot::maybe_grow): ...this.
7477         (read_data): Convert to...
7478         (file_cache_slot::read_data): ...this.
7479         (maybe_read_data): Convert to...
7480         (file_cache_slot::maybe_read_data): ...this.
7481         (get_next_line): Convert to...
7482         (file_cache_slot::get_next_line): ...this.
7483         (goto_next_line): Convert to...
7484         (file_cache_slot::goto_next_line): ...this.
7485         (read_line_num): Convert to...
7486         (file_cache_slot::read_line_num): ...this.
7487         (location_get_source_line): Update for moving of globals to
7488         global_dc->m_file_cache.
7489         (location_missing_trailing_newline): Likewise.
7490         * input.h (class file_cache_slot): New forward decl.
7491         (class file_cache): New.
7492
7493 2021-07-01  Michael Meissner  <meissner@linux.ibm.com>
7494
7495         * config/rs6000/rs6000.c (rs6000_maybe_emit_fp_cmove): Add IEEE
7496         128-bit floating point conditional move support.
7497         (have_compare_and_set_mask): Add IEEE 128-bit floating point
7498         types.
7499         * config/rs6000/rs6000.md (mov<mode>cc, IEEE128 iterator): New insn.
7500         (mov<mode>cc_p10, IEEE128 iterator): New insn.
7501         (mov<mode>cc_invert_p10, IEEE128 iterator): New insn.
7502         (fpmask<mode>, IEEE128 iterator): New insn.
7503         (xxsel<mode>, IEEE128 iterator): New insn.
7504
7505 2021-07-01  Iain Sandoe  <iain@sandoe.co.uk>
7506
7507         PR debug/101283
7508         * config/darwin.h (CTF_INFO_SECTION_NAME): New.
7509
7510 2021-07-01  H.J. Lu  <hjl.tools@gmail.com>
7511
7512         * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate):
7513         Make it global.
7514         * config/i386/i386-protos.h (ix86_expand_vector_init_duplicate):
7515         New prototype.
7516         * config/i386/sse.md (INT_BROADCAST_MODE): New mode iterator.
7517         (vec_duplicate<mode>): New expander.
7518
7519 2021-07-01  H.J. Lu  <hjl.tools@gmail.com>
7520
7521         PR target/100865
7522         * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate):
7523         New prototype.
7524         (ix86_byte_broadcast): New function.
7525         (ix86_convert_const_wide_int_to_broadcast): Likewise.
7526         (ix86_expand_move): Convert CONST_WIDE_INT to broadcast if mode
7527         size is 16 bytes or bigger.
7528         (ix86_broadcast_from_integer_constant): New function.
7529         (ix86_expand_vector_move): Convert CONST_WIDE_INT and CONST_VECTOR
7530         to broadcast if mode size is 16 bytes or bigger.
7531         * config/i386/i386-protos.h (ix86_gen_scratch_sse_rtx): New
7532         prototype.
7533         * config/i386/i386.c (ix86_gen_scratch_sse_rtx): New function.
7534
7535 2021-07-01  Uroš Bizjak  <ubizjak@gmail.com>
7536
7537         * config/i386/predicates.md (ix86_endbr_immediate_operand):
7538         Return true/false instead of 1/0.
7539         (movq_parallel): Ditto.
7540
7541 2021-07-01  Uroš Bizjak  <ubizjak@gmail.com>
7542
7543         * recog.c (general_operand): Return true/false instead of 1/0.
7544         (register_operand): Ditto.
7545         (immediate_operand): Ditto.
7546         (const_int_operand): Ditto.
7547         (const_scalar_int_operand): Ditto.
7548         (const_double_operand): Ditto.
7549         (push_operand): Ditto.
7550         (pop_operand): Ditto.
7551         (memory_operand): Ditto.
7552         (indirect_operand): Ditto.
7553
7554 2021-07-01  Uroš Bizjak  <ubizjak@gmail.com>
7555
7556         * genpreds.c (write_predicate_subfunction):
7557         Change the type of written subfunction to bool.
7558         (write_one_predicate_function):
7559         Change the type of written function to bool.
7560         (write_tm_preds_h): Ditto.
7561         * recog.h (*insn_operand_predicate_fn): Change the type to bool.
7562         * recog.c (general_operand): Change the type to bool.
7563         (address_operand): Ditto.
7564         (register_operand): Ditto.
7565         (pmode_register_operand): Ditto.
7566         (scratch_operand): Ditto.
7567         (immediate_operand): Ditto.
7568         (const_int_operand): Ditto.
7569         (const_scalar_int_operand): Ditto.
7570         (const_double_operand): Ditto.
7571         (nonimmediate_operand): Ditto.
7572         (nonmemory_operand): Ditto.
7573         (push_operand): Ditto.
7574         (pop_operand): Ditto.
7575         (memory_operand): Ditto.
7576         (indirect_operand): Ditto.
7577         (ordered_comparison_operator): Ditto.
7578         (comparison_operator): Ditto.
7579         * config/i386/i386-expand.c (ix86_expand_sse_cmp):
7580         Change the type of indirect predicate function to bool.
7581         * config/rs6000/rs6000.c (easy_vector_constant):
7582         Change the type to bool.
7583         * config/mips/mips-protos.h (m16_based_address_p):
7584         Change the type of operand 3 to bool.
7585
7586 2021-07-01  Richard Biener  <rguenther@suse.de>
7587
7588         PR tree-optimization/101280
7589         PR tree-optimization/101173
7590         * gimple-loop-interchange.cc
7591         (tree_loop_interchange::valid_data_dependences): Revert
7592         previous change and instead correctly handle DDR_REVERSED_P
7593         dependence.
7594
7595 2021-07-01  Richard Biener  <rguenther@suse.de>
7596
7597         PR tree-optimization/101278
7598         * tree-ssa-dse.c (dse_classify_store): First check for
7599         uses, then ignore stmt for chaining purposes.
7600
7601 2021-07-01  Richard Biener  <rguenther@suse.de>
7602
7603         PR tree-optimization/100778
7604         * tree-vect-slp.c (vect_schedule_slp_node): Do not place trapping
7605         vectorized ops ahead of their scalar BB.
7606
7607 2021-07-01  Uroš Bizjak  <ubizjak@gmail.com>
7608
7609         PR target/101044
7610         * config/i386/i386.md (*nabs<dwi>2_doubleword):
7611         New insn_and_split pattern.
7612         (*nabs<dwi>2_1): Ditto.
7613         * config/i386/i386-features.c
7614         (general_scalar_chain::compute_convert_gain):
7615         Handle (NEG (ABS (...))) RTX.  Rewrite src code
7616         scanner as switch statement.
7617         (general_scalar_chain::convert_insn):
7618         Handle (NEG (ABS (...))) RTX.
7619         (general_scalar_to_vector_candidate_p):
7620         Detect  (NEG (ABS (...))) RTX.  Reorder case statements
7621         for (AND (NOT (...) ...)) fallthrough.
7622
7623 2021-07-01  Richard Biener  <rguenther@suse.de>
7624
7625         PR tree-optimization/101178
7626         * tree-vect-slp.c (slpg_vertex::materialize): Remove.
7627         (slpg::perm_in): Add.
7628         (slpg::get_perm_in): Remove.
7629         (slpg::get_perm_materialized): Add.
7630         (vect_optimize_slp): Handle VEC_PERM nodes more optimally
7631         during permute propagation and materialization.
7632
7633 2021-07-01  Jakub Jelinek  <jakub@redhat.com>
7634
7635         PR debug/101266
7636         * dwarf2out.c (loc_list_from_tree_1): Handle COMPOUND_LITERAL_EXPR.
7637
7638 2021-07-01  Jakub Jelinek  <jakub@redhat.com>
7639
7640         PR middle-end/94366
7641         * omp-low.c (lower_rec_input_clauses): Rename is_fp_and_or to
7642         is_truth_op, set it for TRUTH_*IF_EXPR regardless of new_var's type,
7643         use boolean_type_node instead of integer_type_node as NE_EXPR type.
7644         (lower_reduction_clauses): Likewise.
7645
7646 2021-06-30  Hafiz Abid Qadeer  <abidh@codesourcery.com>
7647
7648         * config/gcn/gcn.c: Include dwarf2.h.
7649         (gcn_addr_space_debug): New function.
7650         (TARGET_ADDR_SPACE_DEBUG): New hook.
7651
7652 2021-06-30  Hafiz Abid Qadeer  <abidh@codesourcery.com>
7653
7654         * common/config/gcn/gcn-common.c
7655         (gcn_option_optimization_table): Change OPT_fomit_frame_pointer to -O3.
7656         * config/gcn/gcn.c (gcn_expand_prologue): Prefer the frame pointer
7657         when emitting CFI.
7658         (gcn_expand_prologue): Prefer the frame pointer when emitting CFI.
7659         (gcn_frame_pointer_rqd): New function.
7660         (TARGET_FRAME_POINTER_REQUIRED): New hook.
7661
7662 2021-06-30  Hafiz Abid Qadeer  <abidh@codesourcery.com>
7663
7664         * config/gcn/gcn.c (move_callee_saved_registers): Emit CFI notes for
7665         prologue register saves.
7666         (gcn_debug_unwind_info): Use UI_DWARF2.
7667         (gcn_dwarf_register_number): Map DWARF_LINK_REGISTER to DWARF PC.
7668         (gcn_dwarf_register_span): DWARF_LINK_REGISTER doesn't span.
7669         * config/gcn/gcn.h: (DWARF_FRAME_RETURN_COLUMN): New define.
7670         (DWARF_LINK_REGISTER): New define.
7671         (FIRST_PSEUDO_REGISTER): Increment.
7672         (FIXED_REGISTERS): Add entry for DWARF_LINK_REGISTER.
7673         (CALL_USED_REGISTERS): Likewise.
7674         (REGISTER_NAMES): Likewise.
7675
7676 2021-06-30  Richard Biener  <rguenther@suse.de>
7677
7678         PR tree-optimization/101267
7679         * tree-vect-stmts.c (vect_check_scalar_mask): Adjust
7680         API and use SLP compatible interface of vect_is_simple_use.
7681         Reject not vectorized SLP defs for callers that do not support
7682         that.
7683         (vect_check_store_rhs): Handle masked stores and pass down
7684         the appropriate operator index.
7685         (vectorizable_call): Adjust.
7686         (vectorizable_store): Likewise.
7687         (vectorizable_load): Likewise.  Handle SLP pecularity of
7688         masked loads.
7689         (vect_is_simple_use): Remove special-casing of masked stores.
7690
7691 2021-06-30  Tobias Burnus  <tobias@codesourcery.com>
7692
7693         * common.opt (foffload): Remove help as Driver only.
7694         * gcc.c (display_help): Add -foffload.
7695
7696 2021-06-30  Tobias Burnus  <tobias@codesourcery.com>
7697
7698         * gcc.c (close_at_file, execute): Replace alloca by XALLOCAVEC.
7699         (check_offload_target_name): Fix splitting OFFLOAD_TARGETS into
7700         a candidate list; better inform no offload target is configured
7701         and fix hint extraction when passed target is not '\0' at [len].
7702         * common.opt (foffload): Add tailing '.'.
7703         (foffload-options): Likewise; fix flag name in the help string.
7704
7705 2021-06-30  prathamesh.kulkarni  <prathamesh.kulkarni@linaro.org>
7706
7707         PR target/66791
7708         * config/arm/arm_neon.h: Move vabs intrinsics before vcage_f32.
7709         (vcage_f32): Gate comparison on __FAST_MATH__.
7710         (vcageq_f32): Likewise.
7711         (vcale_f32): Likewise.
7712         (vcaleq_f32): Likewise.
7713         (vcagt_f32): Likewise.
7714         (vcagtq_f32): Likewise.
7715         (vcalt_f32): Likewise.
7716         (vcaltq_f32): Likewise.
7717         (vcage_f16): Likewise.
7718         (vcageq_f16): Likewise.
7719         (vcale_f16): Likewise.
7720         (vcaleq_f16): Likewise.
7721         (vcagt_f16): Likewise.
7722         (vcagtq_f16): Likewise.
7723         (vcalt_f16): Likewise.
7724         (vcaltq_f16): Likewise.
7725
7726 2021-06-30  Richard Biener  <rguenther@suse.de>
7727
7728         PR tree-optimization/101264
7729         * tree-vect-slp.c (vect_optimize_slp): Propagate the
7730         computed perm_in to all "any" permute successors
7731         we cannot de-duplicate immediately.
7732
7733 2021-06-30  liuhongt  <hongtao.liu@intel.com>
7734
7735         PR target/101248
7736         * config/i386/sse.md
7737         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>):
7738         Refined to ..
7739         (avx512f_sfixupimm<mode><maskz_scalar_name><round_saeonly_name>):
7740         this.
7741         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>"): Refined.
7742         * config/i386/subst.md (maskz_scalar): New define_subst.
7743         (maskz_scalar_name): New subst_attr.
7744         (maskz_scalar_op5): Ditto.
7745         (round_saeonly_maskz_scalar_op5): Ditto.
7746         (round_saeonly_maskz_scalar_operand5): Ditto.
7747
7748 2021-06-30  David Edelsohn  <dje.gcc@gmail.com>
7749
7750         * config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags):
7751         Increase code CSECT alignment to at least 32 bytes.
7752         * config/rs6000/xcoff.h (TEXT_SECTION_ASM_OP): Add 32 byte
7753         alignment designation.
7754
7755 2021-06-29  Sergei Trofimovich  <siarheit@google.com>
7756
7757         * doc/generic.texi: Fix s/net yet/not yet/ typo.
7758
7759 2021-06-29  Andrew MacLeod  <amacleod@redhat.com>
7760
7761         PR tree-optimization/101254
7762         * range-op.cc (operator_minus::op1_op2_relation_effect): Check for
7763         wrapping/non-wrapping when setting the result range.
7764
7765 2021-06-29  Andrew MacLeod  <amacleod@redhat.com>
7766
7767         * value-query.cc (gimple_range_global): Allow phis.
7768
7769 2021-06-29  Andrew MacLeod  <amacleod@redhat.com>
7770
7771         * vr-values.c (vr_values::vrp_stmt_computes_nonzero): Use stmt.
7772         (simplify_using_ranges::op_with_boolean_value_range_p): Add a
7773         statement for location context.
7774         (check_for_binary_op_overflow): Ditto.
7775         (simplify_using_ranges::get_vr_for_comparison): Ditto.
7776         (simplify_using_ranges::compare_name_with_value): Ditto.
7777         (simplify_using_ranges::compare_names): Ditto.
7778         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Ditto.
7779         (simplify_using_ranges::simplify_truth_ops_using_ranges): Ditto.
7780         (simplify_using_ranges::simplify_min_or_max_using_ranges): Ditto.
7781         (simplify_using_ranges::simplify_internal_call_using_ranges): Ditto.
7782         (simplify_using_ranges::two_valued_val_range_p): Ditto.
7783         (simplify_using_ranges::simplify): Ditto.
7784         * vr-values.h: Adjust prototypes.
7785
7786 2021-06-29  Uroš Bizjak  <ubizjak@gmail.com>
7787
7788         PR target/95046
7789         * config/i386/mmx.md (vec_addsubv2sf3): New insn pattern.
7790
7791 2021-06-29  Julian Brown  <julian@codesourcery.com>
7792
7793         * config/gcn/gcn.c (gcn_init_libfuncs): New function.
7794         (TARGET_INIT_LIBFUNCS): Define target hook using above function.
7795         * config/gcn/gcn.h (UNITS_PER_WORD): Define to 8 for IN_LIBGCC2, 4
7796         otherwise.
7797         (LIBGCC2_UNITS_PER_WORD, BITS_PER_WORD): Remove definitions.
7798         (MAX_FIXED_MODE_SIZE): Change to 128.
7799
7800 2021-06-29  Julian Brown  <julian@codesourcery.com>
7801
7802         * config/gcn/gcn.md (UNSPEC_FLBIT_INT): New unspec constant.
7803         (s_mnemonic): Add clrsb.
7804         (gcn_flbit<mode>_int): Add insn pattern for SImode/DImode.
7805         (clrsb<mode>2): Add expander for SImode/DImode.
7806
7807 2021-06-29  Julian Brown  <julian@codesourcery.com>
7808
7809         * config/gcn/gcn.md (<su>mulsidi3, <su>mulsidi3_reg, <su>mulsidi3_imm,
7810         muldi3): Add patterns.
7811
7812 2021-06-29  Julian Brown  <julian@codesourcery.com>
7813
7814         * config/gcn/gcn.md (<su>mulsi3_highpart): Change to expander.
7815         (<su>mulsi3_highpart_reg, <su>mulsi3_highpart_imm): New patterns.
7816
7817 2021-06-29  Julian Brown  <julian@codesourcery.com>
7818
7819         * config/gcn/gcn.md (mulsi3): Make s_mulk_i32 variant clobber SCC.
7820
7821 2021-06-29  Joseph Myers  <joseph@codesourcery.com>
7822
7823         * btfout.c, ctfout.c: Include "memmodel.h".
7824
7825 2021-06-29  Tobias Burnus  <tobias@codesourcery.com>
7826
7827         * gcc.c (check_offload_target_name): Cast len argument to
7828         %q.*s to 'int'; avoid -Wstringop-truncation warning.
7829
7830 2021-06-29  Richard Biener  <rguenther@suse.de>
7831
7832         * tree-vect-slp.c (vect_optimize_slp): Forward propagate
7833         to "any" permute nodes and relax "any" permute proapgation
7834         during iterative backward propagation.
7835
7836 2021-06-29  Tobias Burnus  <tobias@codesourcery.com>
7837
7838         PR other/67300
7839         * common.opt (-foffload=): Update description.
7840         (-foffload-options=): New.
7841         * doc/invoke.texi (C Language Options): Document
7842         -foffload and -foffload-options.
7843         * gcc.c (check_offload_target_name): New, split off from
7844         handle_foffload_option.
7845         (check_foffload_target_names): New.
7846         (handle_foffload_option): Handle -foffload=default.
7847         (driver_handle_option): Update for -foffload-options.
7848         * lto-opts.c (lto_write_options): Use -foffload-options
7849         instead of -foffload.
7850         * lto-wrapper.c (merge_and_complain, append_offload_options):
7851         Likewise.
7852         * opts.c (common_handle_option): Likewise.
7853
7854 2021-06-29  Tobias Burnus  <tobias@codesourcery.com>
7855
7856         * doc/invoke.texi (C Language Options): Sort options
7857         alphabetically in optlist and also the description itself.
7858         Remove leftover -fallow-single-precision from and add missing
7859         -fgnu-tm to the optlist.
7860
7861 2021-06-29  Richard Biener  <rguenther@suse.de>
7862
7863         * tree-vect-slp.c (slpg_vertex::visited): Remove.
7864         (vect_slp_perms_eq): Handle -1 permutes.
7865         (vect_optimize_slp): Rewrite permute propagation.
7866
7867 2021-06-29  Jakub Jelinek  <jakub@redhat.com>
7868
7869         PR c++/101210
7870         * match.pd ((intptr_t)x eq/ne CST to x eq/ne (typeof x) CST): Don't
7871         perform the optimization in GENERIC when sanitizing and x has a
7872         reference type.
7873
7874 2021-06-29  Richard Biener  <rguenther@suse.de>
7875
7876         PR tree-optimization/101242
7877         * tree-vect-slp.c (vect_slp_build_vertices): Force-add
7878         PHIs with not represented initial values as leafs.
7879
7880 2021-06-29  Jan-Benedict Glaw  <jbglaw@getslash.de>
7881
7882         * config/pdp11/pdp11.h (ASM_OUTPUT_SKIP): Fix signedness warning.
7883         * config/pdp11/pdp11.c (pdp11_asm_print_operand_punct_valid_p): Remove
7884         "register" keyword.
7885         (pdp11_initial_elimination_offset) Remove unused variable.
7886         (pdp11_cmp_length) Ditto.
7887         (pdp11_insn_cost): Ditto, and fix signedness warning.
7888
7889 2021-06-29  David Edelsohn  <dje.gcc@gmail.com>
7890
7891         * btfout.c: Include tm_p.h.
7892         * ctfout.c: Same.
7893
7894 2021-06-28  Indu Bhagat  <indu.bhagat@oracle.com>
7895
7896         * config/bpf/bpf.c (bpf_expand_prologue): Do not mark insns as
7897         frame related.
7898         (bpf_expand_epilogue): Likewise.
7899         * config/bpf/bpf.h (DWARF2_FRAME_INFO): Define to 0.
7900         Do not define DBX_DEBUGGING_INFO.
7901
7902 2021-06-28  Indu Bhagat  <indu.bhagat@oracle.com>
7903
7904         * doc/invoke.texi: Document the CTF and BTF debug info options.
7905
7906 2021-06-28  Indu Bhagat  <indu.bhagat@oracle.com>
7907             David Faust  <david.faust@oracle.com>
7908             Jose E. Marchesi  <jose.marchesi@oracle.com>
7909             Weimin Pan  <weimin.pan@oracle.com>
7910
7911         * Makefile.in: Add ctfc.*, ctfout.c and btfout.c files to
7912         GTFILES.  Add new object files.
7913         * common.opt: Add CTF and BTF debug info options.
7914         * btfout.c: New file.
7915         * ctfc.c: Likewise.
7916         * ctfc.h: Likewise.
7917         * ctfout.c: Likewise.
7918         * dwarf2ctf.c: Likewise.
7919         * dwarf2ctf.h: Likewise.
7920         * dwarf2cfi.c (dwarf2out_do_frame): Acknowledge CTF_DEBUG and
7921         BTF_DEBUG.
7922         * dwarf2out.c (dwarf2out_source_line): Likewise.
7923         (dwarf2out_finish): Skip emitting DWARF if CTF or BTF are to
7924         be generated.
7925         (debug_format_do_cu): New function.
7926         (dwarf2out_early_finish): Traverse DIEs and emit CTF/BTF for
7927         them if requested.
7928         Include dwarf2ctf.c.
7929         * final.c (dwarf2_debug_info_emitted_p): Acknowledge DWARF-based debug
7930         formats.
7931         * flag-types.h (enum debug_info_type): Add CTF_DEBUG and BTF_DEBUG.
7932         (CTF_DEBUG): New bitmask.
7933         (BTF_DEBUG): Likewise.
7934         (enum ctf_debug_info_levels): New enum.
7935         * gengtype.c (open_base_files): Handle ctfc.h.
7936         (main): Handle uint32_t type.
7937         * flags.h (btf_debuginfo_p): New definition.
7938         (dwarf_based_debuginfo_p): Likewise.
7939         * opts.c (debug_type_names): Add entries for CTF and BTF.
7940         (btf_debuginfo_p): New function.
7941         (dwarf_based_debuginfo_p): Likewise.
7942         (common_handle_option): Handle -gctfN and -gbtf options.
7943         (set_debug_level): Set CTF_DEBUG, BTF_DEBUG whenever appropriate.
7944         * toplev.c (process_options): Inform the user and ignore -gctfLEVEL if
7945         frontend is not C.
7946
7947 2021-06-28  Jose E. Marchesi  <jose.marchesi@oracle.com>
7948
7949         * dwarf2out.c (AT_class): Function is no longer static.
7950         (AT_int): Likewise.
7951         (AT_unsigned): Likewise.
7952         (AT_loc): Likewise.
7953         (get_AT): Likewise.
7954         (get_AT_string): Likewise.
7955         (get_AT_flag): Likewise.
7956         (get_AT_unsigned): Likewise.
7957         (get_AT_ref): Likewise.
7958         (new_die_raw): Likewise.
7959         (lookup_decl_die): Likewise.
7960         (base_type_die): Likewise.
7961         (add_name_attribute): Likewise.
7962         (add_AT_int): Likewise.
7963         (add_AT_unsigned): Likewise.
7964         (add_AT_loc): Likewise.
7965         (dw_get_die_tag): New function.
7966         (dw_get_die_child): Likewise.
7967         (dw_get_die_sib): Likewise.
7968         (struct dwarf_file_data): Move from here to dwarf2out.h
7969         (struct dw_attr_struct): Likewise.
7970         * dwarf2out.h: Analogous changes.
7971
7972 2021-06-28  Martin Jambor  <mjambor@suse.cz>
7973
7974         PR ipa/93385
7975         * ipa-param-manipulation.h (class ipa_param_body_adjustments): New
7976         members m_dead_stmts and m_dead_ssas.
7977         * ipa-param-manipulation.c
7978         (ipa_param_body_adjustments::mark_dead_statements): New function.
7979         (ipa_param_body_adjustments::common_initialization): Call it on
7980         all removed but not split parameters.
7981         (ipa_param_body_adjustments::ipa_param_body_adjustments): Initialize
7982         new mwmbers.
7983         (ipa_param_body_adjustments::modify_call_stmt): Remove arguments that
7984         are dead.
7985         * tree-inline.c (remap_gimple_stmt): Do not copy dead statements, reset
7986         dead debug statements.
7987         (copy_phis_for_bb): Do not copy dead PHI nodes.
7988
7989 2021-06-28  Martin Jambor  <mjambor@suse.cz>
7990
7991         PR ipa/93385
7992         * symtab-clones.h (clone_info): Removed member param_adjustments.
7993         * ipa-param-manipulation.h: Adjust initial comment to reflect how we
7994         deal with pass-through splits now.
7995         (ipa_param_performed_split): Removed.
7996         (ipa_param_adjustments::modify_call): Adjusted parameters.
7997         (class ipa_param_body_adjustments): Adjusted parameters of
7998         register_replacement, modify_gimple_stmt and modify_call_stmt.
7999         (ipa_verify_edge_has_no_modifications): Declare.
8000         (ipa_edge_modifications_finalize): Declare.
8001         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Remove
8002         performed_splits processing, pas only edge to padjs->modify_call,
8003         check that call arguments were not modified if they should not have
8004         been.
8005         * cgraphclones.c (cgraph_node::create_clone): Do not copy performed
8006         splits.
8007         * ipa-param-manipulation.c (struct pass_through_split_map): New type.
8008         (ipa_edge_modification_info): Likewise.
8009         (ipa_edge_modification_sum): Likewise.
8010         (ipa_edge_modifications): New edge summary.
8011         (ipa_verify_edge_has_no_modifications): New function.
8012         (transitive_split_p): Removed.
8013         (transitive_split_map): Likewise.
8014         (init_transitive_splits): Likewise.
8015         (ipa_param_adjustments::modify_call): Adjusted to use the new edge
8016         summary instead of performed_splits.
8017         (ipa_param_body_adjustments::register_replacement): Drop dummy
8018         parameter, set base_index of the created ipa_param_body_replacement.
8019         (phi_arg_will_live_p): New function.
8020         (ipa_param_body_adjustments::common_initialization): Do not create
8021         IPA_SRA dummy decls.
8022         (simple_tree_swap_info): Removed.
8023         (remap_split_decl_to_dummy): Likewise.
8024         (record_argument_state_1): New function.
8025         (record_argument_state): Likewise.
8026         (ipa_param_body_adjustments::modify_call_stmt): New parameter
8027         orig_stmt.  Do not work with dummy decls, save necessary info about
8028         changes to ipa_edge_modifications.
8029         (ipa_param_body_adjustments::modify_gimple_stmt): New parameter
8030         orig_stmt, pass it to modify_call_stmt.
8031         (ipa_param_body_adjustments::modify_cfun_body): Adjust call to
8032         modify_gimple_stmt.
8033         (ipa_edge_modifications_finalize): New function.
8034         * tree-inline.c (remap_gimple_stmt): Pass original statement to
8035         modify_gimple_stmt.
8036         (copy_phis_for_bb): Do not copy dead PHI nodes.
8037         (expand_call_inline): Do not remap performed_splits.
8038         (update_clone_info): Likewise.
8039         * toplev.c: Include ipa-param-manipulation.h.
8040         (toplev::finalize): Call ipa_edge_modifications_finalize.
8041
8042 2021-06-28  Andrew Pinski  <apinski@marvell.com>
8043
8044         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Duplicate range
8045         info if we're the only things setting the target PHI.
8046         (value_replacement): Don't duplicate range here.
8047         (minmax_replacement): Likewise.
8048
8049 2021-06-28  Richard Biener  <rguenther@suse.de>
8050
8051         PR tree-optimization/101229
8052         * gimple-walk.c (gimple_walk_op): Handle PHIs.
8053
8054 2021-06-28  Martin Liska  <mliska@suse.cz>
8055
8056         * config/v850/v850.c (construct_dispose_instruction): Allocate
8057         a bigger buffer.
8058         (construct_prepare_instruction): Likewise.
8059
8060 2021-06-28  Martin Liska  <mliska@suse.cz>
8061
8062         * config/v850/v850.c (v850_option_override): Build default
8063         target node.
8064         (v850_can_inline_p): New.  Allow MASK_PROLOG_FUNCTION to be
8065         ignored for inlining.
8066         (TARGET_CAN_INLINE_P): New.
8067
8068 2021-06-28  Richard Biener  <rguenther@suse.de>
8069
8070         PR tree-optimization/101207
8071         * tree-vect-slp.c (vect_optimize_slp): Do BB reduction
8072         permute eliding for load permutations properly.
8073
8074 2021-06-28  Richard Biener  <rguenther@suse.de>
8075
8076         PR tree-optimization/101173
8077         * gimple-loop-interchange.cc
8078         (tree_loop_interchange::valid_data_dependences): Disallow outer
8079         loop dependence distance of zero.
8080
8081 2021-06-28  liuhongt  <hongtao.liu@intel.com>
8082
8083         PR target/100648
8084         * config/i386/sse.md (*avx_cmp<mode>3_lt): New
8085         define_insn_and_split.
8086         (*avx_cmp<mode>3_ltint): Ditto.
8087         (*avx2_pcmp<mode>3_3): Ditto.
8088         (*avx2_pcmp<mode>3_4): Ditto.
8089         (*avx2_pcmp<mode>3_5): Ditto.
8090
8091 2021-06-28  liuhongt  <hongtao.liu@intel.com>
8092
8093         * config/i386/i386-builtin.def (IX86_BUILTIN_BLENDVPD256,
8094         IX86_BUILTIN_BLENDVPS256, IX86_BUILTIN_PBLENDVB256,
8095         IX86_BUILTIN_BLENDVPD, IX86_BUILTIN_BLENDVPS,
8096         IX86_BUILTIN_PBLENDVB128): Replace icode with
8097         CODE_FOR_nothing.
8098         * config/i386/i386.c (ix86_gimple_fold_builtin): Fold blendv
8099         builtins.
8100         * config/i386/sse.md (*<sse4_1_avx2>_pblendvb_lt_subreg_not):
8101         New pre_reload splitter.
8102
8103 2021-06-27  Andrew Pinski  <apinski@marvell.com>
8104
8105         PR middle-end/101230
8106         * fold-const.c (fold_ternary_loc): Check
8107         the return value of invert_tree_comparison.
8108
8109 2021-06-27  David Edelsohn  <dje.gcc@gmail.com>
8110
8111         * config.gcc: Add SPDX License Identifier.
8112         (powerpc-ibm-aix789): Default to aix73.h.
8113         (powerpc-ibm-aix7.2.*.*): New stanza.
8114         * config/rs6000/aix72.h: Add SPDX License Identifier.
8115         * config/rs6000/aix73.h: New file.
8116
8117 2021-06-26  Jason Merrill  <jason@redhat.com>
8118
8119         * except.c: #include "dwarf2.h" instead of "dwarf2out.h".
8120
8121 2021-06-26  Andrew Pinski  <apinski@marvell.com>
8122
8123         * genmatch.c (lower_cond): Copy for_subst_vec
8124         for the simplify also.
8125         (lower): Swap the order for lower_for and lower_cond.
8126
8127 2021-06-26  Andrew Pinski  <apinski@marvell.com>
8128
8129         * tree-ssa-phiopt.c (match_simplify_replacement): Reset
8130         flow senatitive info on the moved ssa set.
8131
8132 2021-06-26  Andrew Pinski  <apinski@marvell.com>
8133
8134         * fold-const.c (fold_cond_expr_with_comparison):
8135         Exand arg0 into comp_code, arg00, and arg01.
8136         (fold_ternary_loc): Use invert_tree_comparison
8137         instead of fold_invert_truthvalue for the case
8138         where we have A CMP B ? C : A.
8139
8140 2021-06-25  Martin Sebor  <msebor@redhat.com>
8141
8142         PR middle-end/101216
8143         * calls.c (maybe_warn_rdwr_sizes): Use the no_warning constant.
8144
8145 2021-06-25  Jeff Law  <jeffreyalaw@gmail.com>
8146
8147         * config/h8300/h8300.c (select_cc_mode): Handle ASHIFTRT and LSHIFTRT.
8148
8149 2021-06-25  Richard Biener  <rguenther@suse.de>
8150
8151         PR tree-optimization/101202
8152         * tree-vect-slp.c (vect_optimize_slp): Explicitely handle
8153         failed nodes.
8154
8155 2021-06-25  Richard Biener  <rguenther@suse.de>
8156
8157         * tree-vect-slp-patterns.c (addsub_pattern::build): Copy
8158         STMT_VINFO_REDUC_DEF from the original representative.
8159
8160 2021-06-25  Martin Sebor  <msebor@redhat.com>
8161
8162         * builtins.c (warn_string_no_nul): Replace uses of TREE_NO_WARNING,
8163         gimple_no_warning_p and gimple_set_no_warning with
8164         warning_suppressed_p, and suppress_warning.
8165         (c_strlen): Same.
8166         (maybe_warn_for_bound): Same.
8167         (warn_for_access): Same.
8168         (check_access): Same.
8169         (expand_builtin_strncmp): Same.
8170         (fold_builtin_varargs): Same.
8171         * calls.c (maybe_warn_nonstring_arg): Same.
8172         (maybe_warn_rdwr_sizes): Same.
8173         * cfgexpand.c (expand_call_stmt): Same.
8174         * cgraphunit.c (check_global_declaration): Same.
8175         * fold-const.c (fold_undefer_overflow_warnings): Same.
8176         (fold_truth_not_expr): Same.
8177         (fold_unary_loc): Same.
8178         (fold_checksum_tree): Same.
8179         * gimple-array-bounds.cc (array_bounds_checker::check_array_ref): Same.
8180         (array_bounds_checker::check_mem_ref): Same.
8181         (array_bounds_checker::check_addr_expr): Same.
8182         (array_bounds_checker::check_array_bounds): Same.
8183         * gimple-expr.c (copy_var_decl): Same.
8184         * gimple-fold.c (gimple_fold_builtin_strcpy): Same.
8185         (gimple_fold_builtin_strncat): Same.
8186         (gimple_fold_builtin_stxcpy_chk): Same.
8187         (gimple_fold_builtin_stpcpy): Same.
8188         (gimple_fold_builtin_sprintf): Same.
8189         (fold_stmt_1): Same.
8190         * gimple-ssa-isolate-paths.c (diag_returned_locals): Same.
8191         * gimple-ssa-nonnull-compare.c (do_warn_nonnull_compare): Same.
8192         * gimple-ssa-sprintf.c (handle_printf_call): Same.
8193         * gimple-ssa-store-merging.c (imm_store_chain_info::output_merged_store): Same.
8194         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Same.
8195         * gimple-ssa-warn-restrict.h: Adjust declarations.
8196         (maybe_diag_access_bounds): Replace uses of TREE_NO_WARNING,
8197         gimple_no_warning_p and gimple_set_no_warning with
8198         warning_suppressed_p, and suppress_warning.
8199         (check_call): Same.
8200         (check_bounds_or_overlap): Same.
8201         * gimple.c (gimple_build_call_from_tree): Same.
8202         * gimplify.c (gimplify_return_expr): Same.
8203         (gimplify_cond_expr): Same.
8204         (gimplify_modify_expr_complex_part): Same.
8205         (gimplify_modify_expr): Same.
8206         (gimple_push_cleanup): Same.
8207         (gimplify_expr): Same.
8208         * omp-expand.c (expand_omp_for_generic): Same.
8209         (expand_omp_taskloop_for_outer): Same.
8210         * omp-low.c (lower_rec_input_clauses): Same.
8211         (lower_lastprivate_clauses): Same.
8212         (lower_send_clauses): Same.
8213         (lower_omp_target): Same.
8214         * tree-cfg.c (pass_warn_function_return::execute): Same.
8215         * tree-complex.c (create_one_component_var): Same.
8216         * tree-inline.c (remap_gimple_op_r): Same.
8217         (copy_tree_body_r): Same.
8218         (declare_return_variable): Same.
8219         (expand_call_inline): Same.
8220         * tree-nested.c (lookup_field_for_decl): Same.
8221         * tree-sra.c (create_access_replacement): Same.
8222         (generate_subtree_copies): Same.
8223         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Same.
8224         * tree-ssa-forwprop.c (combine_cond_expr_cond): Same.
8225         * tree-ssa-loop-ch.c (ch_base::copy_headers): Same.
8226         * tree-ssa-loop-im.c (execute_sm): Same.
8227         * tree-ssa-phiopt.c (cond_store_replacement): Same.
8228         * tree-ssa-strlen.c (maybe_warn_overflow): Same.
8229         (handle_builtin_strcpy): Same.
8230         (maybe_diag_stxncpy_trunc): Same.
8231         (handle_builtin_stxncpy_strncat): Same.
8232         (handle_builtin_strcat): Same.
8233         * tree-ssa-uninit.c (get_no_uninit_warning): Same.
8234         (set_no_uninit_warning): Same.
8235         (uninit_undefined_value_p): Same.
8236         (warn_uninit): Same.
8237         (maybe_warn_operand): Same.
8238         * tree-vrp.c (compare_values_warnv): Same.
8239         * vr-values.c (vr_values::extract_range_for_var_from_comparison_expr): Same.
8240         (test_for_singularity): Same.
8241         * gimple.h (warning_suppressed_p): New function.
8242         (suppress_warning): Same.
8243         (copy_no_warning): Same.
8244         (gimple_set_block): Call gimple_set_location.
8245         (gimple_set_location): Call copy_warning.
8246
8247 2021-06-25  Martin Sebor  <msebor@redhat.com>
8248
8249         * tree.h (warning_suppressed_at, copy_warning,
8250         warning_suppressed_p, suppress_warning): New functions.
8251
8252 2021-06-25  Martin Sebor  <msebor@redhat.com>
8253
8254         * Makefile.in (OBJS-libcommon): Add diagnostic-spec.o.
8255         * gengtype.c (open_base_files): Add diagnostic-spec.h.
8256         * diagnostic-spec.c: New file.
8257         * diagnostic-spec.h: New file.
8258         * tree.h (no_warning, all_warnings, suppress_warning_at): New
8259         declarations.
8260         * warning-control.cc: New file.
8261
8262 2021-06-25  liuhongt  <hongtao.liu@intel.com>
8263
8264         PR target/101185
8265         * config/i386/i386.c (x86_order_regs_for_local_alloc):
8266         Revert r12-1669.
8267
8268 2021-06-24  Andrew MacLeod  <amacleod@redhat.com>
8269
8270         PR tree-optimization/101189
8271         * gimple-range-fold.cc (fold_using_range::range_of_range_op): Pass
8272         LHS range of condition to postfold routine.
8273         (fold_using_range::postfold_gcond_edges): Only process the TRUE or
8274         FALSE edge if the LHS range supports it being taken.
8275         * gimple-range-fold.h (postfold_gcond_edges): Add range parameter.
8276
8277 2021-06-24  Andrew MacLeod  <amacleod@redhat.com>
8278
8279         * value-relation.cc (equiv_oracle::dump): Do not dump NULL blocks.
8280         (relation_oracle::find_relation_block): Check correct bitmap.
8281         (relation_oracle::dump): Do not dump NULL blocks.
8282
8283 2021-06-24  Andrew MacLeod  <amacleod@redhat.com>
8284
8285         * gimple-range-cache.cc (ranger_cache::propagate_cache): Call
8286         range_on_edge instead of manually calculating.
8287
8288 2021-06-24  Andrew MacLeod  <amacleod@redhat.com>
8289
8290         * range-op.cc: Fix comment.
8291
8292 2021-06-24  Uroš Bizjak  <ubizjak@gmail.com>
8293
8294         PR target/89021
8295         * config/i386/i386-expand.c (ix86_expand_sse_unpack):
8296         Handle V8QI and V4HI modes.
8297         * config/i386/mmx.md (sse4_1_<any_extend:code>v4qiv4hi2):
8298         New insn pattern.
8299         (sse4_1_<any_extend:code>v4qiv4hi2): Ditto.
8300         (mmxpackmode): New mode attribute.
8301         (vec_pack_trunc_<mmxpackmode:mode>): New expander.
8302         (mmxunpackmode): New mode attribute.
8303         (vec_unpacks_lo_<mmxunpackmode:mode>): New expander.
8304         (vec_unpacks_hi_<mmxunpackmode:mode>): Ditto.
8305         (vec_unpacku_lo_<mmxunpackmode:mode>): Ditto.
8306         (vec_unpacku_hi_<mmxunpackmode:mode>): Ditto.
8307         * config/i386/i386.md (extsuffix): Move from ...
8308         * config/i386/sse.md: ... here.
8309
8310 2021-06-24  Eric Botcazou  <ebotcazou@adacore.com>
8311
8312         * dwarf2out.c (dwarf2out_assembly_start): Emit .file 0 marker here..
8313         (dwarf2out_finish): ...instead of here.
8314
8315 2021-06-24  Eric Botcazou  <ebotcazou@adacore.com>
8316
8317         * configure.ac (--gdwarf-5 option): Use objdump instead of readelf.
8318         (working --gdwarf-4/--gdwarf-5 for all sources): Likewise.
8319         (--gdwarf-4 not refusing generated .debug_line): Adjust for Windows.
8320         * configure: Regenerate.
8321
8322 2021-06-24  Richard Biener  <rguenther@suse.de>
8323
8324         * config/i386/sse.md (vec_addsubv4df3, vec_addsubv2df3,
8325         vec_addsubv8sf3, vec_addsubv4sf3): Merge into ...
8326         (vec_addsub<mode>3): ... using a new addsub_cst mode attribute.
8327
8328 2021-06-24  Richard Biener  <rguenther@suse.de>
8329
8330         * config/i386/sse.md (avx_addsubv4df3): Rename to
8331         vec_addsubv4df3.
8332         (avx_addsubv8sf3): Rename to vec_addsubv8sf3.
8333         (sse3_addsubv2df3): Rename to vec_addsubv2df3.
8334         (sse3_addsubv4sf3): Rename to vec_addsubv4sf3.
8335         * config/i386/i386-builtin.def: Adjust.
8336         * internal-fn.def (VEC_ADDSUB): New internal optab fn.
8337         * optabs.def (vec_addsub_optab): New optab.
8338         * tree-vect-slp-patterns.c (class addsub_pattern): New.
8339         (slp_patterns): Add addsub_pattern.
8340         * tree-vect-slp.c (vect_optimize_slp): Disable propagation
8341         across CFN_VEC_ADDSUB.
8342         * tree-vectorizer.h (vect_pattern::vect_pattern): Make
8343         m_ops optional.
8344         * doc/md.texi (vec_addsub<mode>3): Document.
8345
8346 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
8347
8348         PR middle-end/101170
8349         * df-scan.c (df_ref_record): For paradoxical big-endian SUBREGs
8350         where regno + subreg_regno_offset wraps around use 0 as starting
8351         regno.
8352
8353 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
8354
8355         PR middle-end/101172
8356         * stor-layout.c (finish_bitfield_representative): If nextf has
8357         error_mark_node type, set repr type to error_mark_node too.
8358
8359 2021-06-24  Ilya Leoshkevich  <iii@linux.ibm.com>
8360
8361         * config/s390/s390.c (s390_function_profiler): Ignore labelno
8362         parameter.
8363         * config/s390/s390.h (NO_PROFILE_COUNTERS): Define.
8364
8365 2021-06-24  Richard Biener  <rguenther@suse.de>
8366
8367         * tree-vect-slp.c (vect_optimize_slp): Do not propagate
8368         across operations that have different semantics on different
8369         lanes.
8370
8371 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
8372
8373         * tree.h (OMP_CLAUSE_MAP_IN_REDUCTION): Document meaning for OpenMP.
8374         * gimplify.c (gimplify_scan_omp_clauses): For OpenMP map clauses
8375         with OMP_CLAUSE_MAP_IN_REDUCTION flag partially defer gimplification
8376         of non-decl OMP_CLAUSE_DECL.  For OMP_CLAUSE_IN_REDUCTION on
8377         OMP_TARGET user outer_ctx instead of ctx for placeholders and
8378         initializer/combiner gimplification.
8379         * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_MAP_IN_REDUCTION
8380         on target constructs.
8381         (lower_rec_input_clauses): Likewise.
8382         (lower_omp_target): Likewise.
8383         * omp-expand.c (expand_omp_target): Temporarily ignore nowait clause
8384         on target if in_reduction is present.
8385
8386 2021-06-24  Kewen Lin  <linkw@linux.ibm.com>
8387
8388         * tree-predcom.c (class pcom_worker): New class.
8389         (release_chain): Renamed to...
8390         (pcom_worker::release_chain): ...this.
8391         (release_chains): Renamed to...
8392         (pcom_worker::release_chains): ...this.
8393         (aff_combination_dr_offset): Renamed to...
8394         (pcom_worker::aff_combination_dr_offset): ...this.
8395         (determine_offset): Renamed to...
8396         (pcom_worker::determine_offset): ...this.
8397         (class comp_ptrs): New class.
8398         (split_data_refs_to_components): Renamed to...
8399         (pcom_worker::split_data_refs_to_components): ...this,
8400         and update with class comp_ptrs.
8401         (suitable_component_p): Renamed to...
8402         (pcom_worker::suitable_component_p): ...this.
8403         (filter_suitable_components): Renamed to...
8404         (pcom_worker::filter_suitable_components): ...this.
8405         (valid_initializer_p): Renamed to...
8406         (pcom_worker::valid_initializer_p): ...this.
8407         (find_looparound_phi): Renamed to...
8408         (pcom_worker::find_looparound_phi): ...this.
8409         (add_looparound_copies): Renamed to...
8410         (pcom_worker::add_looparound_copies): ...this.
8411         (determine_roots_comp): Renamed to...
8412         (pcom_worker::determine_roots_comp): ...this.
8413         (determine_roots): Renamed to...
8414         (pcom_worker::determine_roots): ...this.
8415         (single_nonlooparound_use): Renamed to...
8416         (pcom_worker::single_nonlooparound_use): ...this.
8417         (remove_stmt): Renamed to...
8418         (pcom_worker::remove_stmt): ...this.
8419         (execute_pred_commoning_chain): Renamed to...
8420         (pcom_worker::execute_pred_commoning_chain): ...this.
8421         (execute_pred_commoning): Renamed to...
8422         (pcom_worker::execute_pred_commoning): ...this.
8423         (struct epcc_data): New member worker.
8424         (execute_pred_commoning_cbck): Call execute_pred_commoning
8425         with pcom_worker pointer.
8426         (find_use_stmt): Renamed to...
8427         (pcom_worker::find_use_stmt): ...this.
8428         (find_associative_operation_root): Renamed to...
8429         (pcom_worker::find_associative_operation_root): ...this.
8430         (find_common_use_stmt): Renamed to...
8431         (pcom_worker::find_common_use_stmt): ...this.
8432         (combinable_refs_p): Renamed to...
8433         (pcom_worker::combinable_refs_p): ...this.
8434         (reassociate_to_the_same_stmt): Renamed to...
8435         (pcom_worker::reassociate_to_the_same_stmt): ...this.
8436         (stmt_combining_refs): Renamed to...
8437         (pcom_worker::stmt_combining_refs): ...this.
8438         (combine_chains): Renamed to...
8439         (pcom_worker::combine_chains): ...this.
8440         (try_combine_chains): Renamed to...
8441         (pcom_worker::try_combine_chains): ...this.
8442         (prepare_initializers_chain): Renamed to...
8443         (pcom_worker::prepare_initializers_chain): ...this.
8444         (prepare_initializers): Renamed to...
8445         (pcom_worker::prepare_initializers): ...this.
8446         (prepare_finalizers_chain): Renamed to...
8447         (pcom_worker::prepare_finalizers_chain): ...this.
8448         (prepare_finalizers): Renamed to...
8449         (pcom_worker::prepare_finalizers): ...this.
8450         (tree_predictive_commoning_loop): Renamed to...
8451         (pcom_worker::tree_predictive_commoning_loop): ...this, adjust
8452         some calls and remove some cleanup code.
8453         (tree_predictive_commoning): Adjusted to use pcom_worker instance.
8454         (static variable looparound_phis): Remove.
8455         (static variable name_expansions): Remove.
8456
8457 2021-06-24  Richard Biener  <rguenther@suse.de>
8458
8459         * tree-vect-slp.c (slpg_vertex): New struct.
8460         (vect_slp_build_vertices): Adjust.
8461         (vect_optimize_slp): Likewise.  Maintain an outgoing permute
8462         and a materialized one.
8463
8464 2021-06-24  Richard Biener  <rguenther@suse.de>
8465
8466         PR tree-optimization/101105
8467         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list):
8468         Only ignore steps when they are equal or scalar order is preserved.
8469
8470 2021-06-24  liuhongt  <hongtao.liu@intel.com>
8471
8472         PR target/98434
8473         * config/i386/i386-expand.c (ix86_expand_vec_interleave):
8474         Adjust comments for ix86_expand_vecop_qihi2.
8475         (ix86_expand_vecmul_qihi): Renamed to ..
8476         (ix86_expand_vecop_qihi2): Adjust function prototype to
8477         support shift operation, add static to definition.
8478         (ix86_expand_vec_shift_qihi_constant): Add static to definition.
8479         (ix86_expand_vecop_qihi): Call ix86_expand_vecop_qihi2 and
8480         ix86_expand_vec_shift_qihi_constant.
8481         * config/i386/i386-protos.h (ix86_expand_vecmul_qihi): Deleted.
8482         (ix86_expand_vec_shift_qihi_constant): Deleted.
8483         * config/i386/sse.md (VI12_256_512_AVX512VL): New mode
8484         iterator.
8485         (mulv8qi3): Call ix86_expand_vecop_qihi directly, add
8486         condition TARGET_64BIT.
8487         (mul<mode>3): Ditto.
8488         (<insn><mode>3): Ditto.
8489         (vlshr<mode>3): Extend to support avx512 vlshr.
8490         (v<insn><mode>3): New expander for
8491         vashr/vlshr/vashl.
8492         (v<insn>v8qi3): Ditto.
8493         (vashrv8hi3<mask_name>): Renamed to ..
8494         (vashr<mode>3): And extend to support V16QImode for avx512.
8495         (vashrv16qi3): Deleted.
8496         (vashrv2di3<mask_name>): Extend expander to support avx512
8497         instruction.
8498
8499 2021-06-23  Dimitar Dimitrov  <dimitar@dinux.eu>
8500
8501         * doc/lto.texi (Design Overview): Update that slim objects are
8502         the default.
8503
8504 2021-06-23  Aaron Sawdey  <acsawdey@linux.ibm.com>
8505
8506         * config/rs6000/rs6000-cpus.def: Take OPTION_MASK_PCREL_OPT out
8507         of OTHER_POWER10_MASKS so it will not be enabled by default.
8508
8509 2021-06-23  Richard Biener  <rguenther@suse.de>
8510             Martin Jambor  <mjambor@suse.cz>
8511
8512         * tree-inline.c (setup_one_parameter): Set TREE_READONLY of the
8513         param replacement unconditionally.  Adjust comment.
8514
8515 2021-06-23  Andrew MacLeod  <amacleod@redhat.com>
8516
8517         * Makefile.in (OBJS): Add gimple-range-fold.o
8518         * gimple-range-fold.cc: New.
8519         * gimple-range-fold.h: New.
8520         * gimple-range-gori.cc (gimple_range_calc_op1): Move to here.
8521         (gimple_range_calc_op2): Ditto.
8522         * gimple-range-gori.h: Move prototypes to here.
8523         * gimple-range.cc: Adjust include files.
8524         (fur_source:fur_source): Relocate to gimple-range-fold.cc.
8525         (fur_source::get_operand): Ditto.
8526         (fur_source::get_phi_operand): Ditto.
8527         (fur_source::query_relation): Ditto.
8528         (fur_source::register_relation): Ditto.
8529         (class fur_edge): Ditto.
8530         (fur_edge::fur_edge): Ditto.
8531         (fur_edge::get_operand): Ditto.
8532         (fur_edge::get_phi_operand): Ditto.
8533         (fur_stmt::fur_stmt): Ditto.
8534         (fur_stmt::get_operand): Ditto.
8535         (fur_stmt::get_phi_operand): Ditto.
8536         (fur_stmt::query_relation): Ditto.
8537         (class fur_depend): Relocate to gimple-range-fold.h.
8538         (fur_depend::fur_depend): Relocate to gimple-range-fold.cc.
8539         (fur_depend::register_relation): Ditto.
8540         (fur_depend::register_relation): Ditto.
8541         (class fur_list): Ditto.
8542         (fur_list::fur_list): Ditto.
8543         (fur_list::get_operand): Ditto.
8544         (fur_list::get_phi_operand): Ditto.
8545         (fold_range): Ditto.
8546         (adjust_pointer_diff_expr): Ditto.
8547         (gimple_range_adjustment): Ditto.
8548         (gimple_range_base_of_assignment): Ditto.
8549         (gimple_range_operand1): Ditto.
8550         (gimple_range_operand2): Ditto.
8551         (gimple_range_calc_op1): Relocate to gimple-range-gori.cc.
8552         (gimple_range_calc_op2): Ditto.
8553         (fold_using_range::fold_stmt): Relocate to gimple-range-fold.cc.
8554         (fold_using_range::range_of_range_op): Ditto.
8555         (fold_using_range::range_of_address): Ditto.
8556         (fold_using_range::range_of_phi): Ditto.
8557         (fold_using_range::range_of_call): Ditto.
8558         (fold_using_range::range_of_builtin_ubsan_call): Ditto.
8559         (fold_using_range::range_of_builtin_call): Ditto.
8560         (fold_using_range::range_of_cond_expr): Ditto.
8561         (fold_using_range::range_of_ssa_name_with_loop_info): Ditto.
8562         (fold_using_range::relation_fold_and_or): Ditto.
8563         (fold_using_range::postfold_gcond_edges): Ditto.
8564         * gimple-range.h: Add gimple-range-fold.h to include files. Change
8565         GIMPLE_RANGE_STMT_H to GIMPLE_RANGE_H.
8566         (gimple_range_handler): Relocate to gimple-range-fold.h.
8567         (gimple_range_ssa_p): Ditto.
8568         (range_compatible_p): Ditto.
8569         (class fur_source): Ditto.
8570         (class fur_stmt): Ditto.
8571         (class fold_using_range): Ditto.
8572         (gimple_range_calc_op1): Relocate to gimple-range-gori.h
8573         (gimple_range_calc_op2): Ditto.
8574
8575 2021-06-23  Andrew MacLeod  <amacleod@redhat.com>
8576
8577         PR tree-optimization/101148
8578         PR tree-optimization/101014
8579         * gimple-range-cache.cc (ranger_cache::ranger_cache): Adjust.
8580         (ranger_cache::~ranger_cache): Adjust.
8581         (ranger_cache::block_range): Check if propagation disallowed.
8582         (ranger_cache::propagate_cache): Disallow propagation if new value
8583         can't be stored properly.
8584         * gimple-range-cache.h (ranger_cache::m_propfail): New member.
8585
8586 2021-06-23  Andrew MacLeod  <amacleod@redhat.com>
8587
8588         * gimple-range-cache.cc (class ssa_block_ranges): Adjust prototype.
8589         (sbr_vector::set_bb_range): Return true.
8590         (class sbr_sparse_bitmap): Adjust.
8591         (sbr_sparse_bitmap::set_bb_range): Return value.
8592         (block_range_cache::set_bb_range): Return value.
8593         (ranger_cache::propagate_cache): Use return value to print msg.
8594         * gimple-range-cache.h (class block_range_cache): Adjust.
8595
8596 2021-06-23  Andrew MacLeod  <amacleod@redhat.com>
8597
8598         * gimple-range.cc (dump_bb): Use range_on_edge from the cache.
8599
8600 2021-06-23  Jeff Law  <jeffreyalaw@gmail.com>
8601
8602         * config/h8300/logical.md (<code><mode>3<ccnz>): Use <cczn>
8603         so this pattern can be used for test/compare removal.  Pass
8604         current insn to compute_logical_op_length and output_logical_op.
8605         * config/h8300/h8300.c (compute_logical_op_cc): Remove.
8606         (h8300_and_costs): Add argument to compute_logical_op_length.
8607         (output_logical_op): Add new argument.  Use it to determine if the
8608         condition codes are used and adjust the output accordingly.
8609         (compute_logical_op_length): Add new argument and update length
8610         computations when condition codes are used.
8611         * config/h8300/h8300-protos.h (compute_logical_op_length): Update
8612         prototype.
8613         (output_logical_op): Likewise.
8614
8615 2021-06-23  Uroš Bizjak  <ubizjak@gmail.com>
8616
8617         PR target/89021
8618         * config/i386/i386-expand.c (expand_vec_perm_pshufb):
8619         Handle 64bit modes for TARGET_XOP.  Use indirect gen_* functions.
8620         * config/i386/mmx.md (mmx_ppermv64): New insn pattern.
8621         * config/i386/i386.md (unspec): Move UNSPEC_XOP_PERMUTE from ...
8622         * config/i386/sse.md (unspec): ... here.
8623
8624 2021-06-23  Martin Liska  <mliska@suse.cz>
8625
8626         PR target/98636
8627         * optc-save-gen.awk: Put back arm_fp16_format to
8628         checked_options.
8629
8630 2021-06-23  Uroš Bizjak  <ubizjak@gmail.com>
8631
8632         PR target/101175
8633         * config/i386/i386.md (bsr_rex64): Add zero-flag setting RTX.
8634         (bsr): Ditto.
8635         (*bsrhi): Remove.
8636         (clz<mode>2): Update RTX pattern for additions.
8637
8638 2021-06-23  Jakub Jelinek  <jakub@redhat.com>
8639
8640         PR middle-end/101167
8641         * omp-low.c (lower_omp_regimplify_p): Regimplify also PARM_DECLs
8642         and RESULT_DECLs that have DECL_HAS_VALUE_EXPR_P set.
8643
8644 2021-06-22  Sergei Trofimovich  <siarheit@google.com>
8645
8646         * doc/rtl.texi: drop unbalanced parenthesis.
8647
8648 2021-06-22  Richard Biener  <rguenther@suse.de>
8649
8650         PR middle-end/101156
8651         * gimplify.c (gimplify_expr): Remove premature incorrect
8652         optimization.
8653
8654 2021-06-22  Jakub Jelinek  <jakub@redhat.com>
8655
8656         PR tree-optimization/101159
8657         * tree-vect-patterns.c (vect_recog_popcount_pattern): Fix some
8658         comment typos.
8659
8660 2021-06-22  Jakub Jelinek  <jakub@redhat.com>
8661
8662         PR middle-end/101160
8663         * function.c (assign_parms): For decl_result with TYPE_EMPTY_P type
8664         clear crtl->return_rtx instead of keeping it referencing a pseudo.
8665
8666 2021-06-22  Jakub Jelinek  <jakub@redhat.com>
8667             Andrew Pinski  <apinski@marvell.com>
8668
8669         PR tree-optimization/101162
8670         * fold-const.c (range_check_type): Handle OFFSET_TYPE like pointer
8671         types.
8672
8673 2021-06-22  Andrew MacLeod  <amacleod@redhat.com>
8674
8675         * range-op.cc (range_relational_tests): New.
8676         (range_op_tests): Call range_relational_tests.
8677
8678 2021-06-22  Andrew MacLeod  <amacleod@redhat.com>
8679
8680         * range-op.cc (operator_cast::lhs_op1_relation): New.
8681         (operator_identity::lhs_op1_relation): Mew.
8682
8683 2021-06-22  Andrew MacLeod  <amacleod@redhat.com>
8684
8685         * range-op.cc (operator_minus::op1_op2_relation_effect): New.
8686
8687 2021-06-22  Andrew MacLeod  <amacleod@redhat.com>
8688
8689         * range-op.cc (operator_plus::lhs_op1_relation): New.
8690         (operator_plus::lhs_op2_relation): New.
8691
8692 2021-06-22  Andrew MacLeod  <amacleod@redhat.com>
8693
8694         * gimple-range-cache.cc (ranger_cache::ranger_cache): Create a
8695         relation_oracle if dominators exist.
8696         (ranger_cache::~ranger_cache): Dispose of oracle.
8697         (ranger_cache::dump_bb): Dump oracle.
8698         * gimple-range.cc (fur_source::fur_source): New.
8699         (fur_source::get_operand): Use mmeber query.
8700         (fur_source::get_phi_operand): Use member_query.
8701         (fur_source::query_relation): New.
8702         (fur_source::register_dependency): Delete.
8703         (fur_source::register_relation): New.
8704         (fur_edge::fur_edge): Adjust.
8705         (fur_edge::get_phi_operand): Fix comment.
8706         (fur_edge::query): Delete.
8707         (fur_stmt::fur_stmt): Adjust.
8708         (fur_stmt::query): Delete.
8709         (fur_depend::fur_depend): Adjust.
8710         (fur_depend::register_relation): New.
8711         (fur_depend::register_relation): New.
8712         (fur_list::fur_list): Adjust.
8713         (fur_list::get_operand): Use member query.
8714         (fold_using_range::range_of_range_op): Process and query relations.
8715         (fold_using_range::range_of_address): Adjust dependency call.
8716         (fold_using_range::range_of_phi): Ditto.
8717         (gimple_ranger::gimple_ranger): New.  Use ranger_ache oracle.
8718         (fold_using_range::relation_fold_and_or): New.
8719         (fold_using_range::postfold_gcond_edges): New.
8720         * gimple-range.h (class gimple_ranger): Adjust.
8721         (class fur_source): Adjust members.
8722         (class fur_stmt): Ditto.
8723         (class fold_using_range): Ditto.
8724
8725 2021-06-22  Andrew MacLeod  <amacleod@redhat.com>
8726
8727         * range-op.cc (range_operator::wi_fold): Apply relation effect.
8728         (range_operator::fold_range): Adjust and apply relation effect.
8729         (*::fold_range): Add relation parameters.
8730         (*::op1_range): Ditto.
8731         (*::op2_range): Ditto.
8732         (range_operator::lhs_op1_relation): New.
8733         (range_operator::lhs_op2_relation): New.
8734         (range_operator::op1_op2_relation): New.
8735         (range_operator::op1_op2_relation_effect): New.
8736         (relop_early_resolve): New.
8737         (operator_equal::op1_op2_relation): New.
8738         (operator_equal::fold_range): Call relop_early_resolve.
8739         (operator_not_equal::op1_op2_relation): New.
8740         (operator_not_equal::fold_range): Call relop_early_resolve.
8741         (operator_lt::op1_op2_relation): New.
8742         (operator_lt::fold_range): Call relop_early_resolve.
8743         (operator_le::op1_op2_relation): New.
8744         (operator_le::fold_range): Call relop_early_resolve.
8745         (operator_gt::op1_op2_relation): New.
8746         (operator_gt::fold_range): Call relop_early_resolve.
8747         (operator_ge::op1_op2_relation): New.
8748         (operator_ge::fold_range): Call relop_early_resolve.
8749         * range-op.h (class range_operator): Adjust parameters and methods.
8750
8751 2021-06-22  Andrew MacLeod  <amacleod@redhat.com>
8752
8753         * Makefile.in (OBJS): Add value-relation.o.
8754         * gimple-range.h: Adjust include files.
8755         * tree-data-ref.c: Adjust include file order.
8756         * value-query.cc (range_query::get_value_range): Default to no oracle.
8757         (range_query::query_relation): New.
8758         (range_query::query_relation): New.
8759         * value-query.h (class range_query): Adjust.
8760         * value-relation.cc: New.
8761         * value-relation.h: New.
8762
8763 2021-06-22  Richard Biener  <rguenther@suse.de>
8764
8765         PR tree-optimization/101151
8766         * tree-ssa-sink.c (statement_sink_location): Expand irreducible
8767         region check.
8768
8769 2021-06-22  Jojo R  <rjiejie@linux.alibaba.com>
8770
8771         * config/riscv/riscv.c (thead_c906_tune_info): New.
8772         (riscv_tune_info_table): Use new tune.
8773
8774 2021-06-22  Richard Biener  <rguenther@suse.de>
8775
8776         PR tree-optimization/101158
8777         * tree-vect-slp.c (vect_build_slp_tree_1): Move same operand
8778         checking after checking for matching operation.
8779
8780 2021-06-22  Richard Biener  <rguenther@suse.de>
8781
8782         PR tree-optimization/101159
8783         * tree-vect-patterns.c (vect_recog_popcount_pattern): Add
8784         missing NULL vectype check.
8785
8786 2021-06-22  Richard Biener  <rguenther@suse.de>
8787
8788         PR tree-optimization/101154
8789         * tree-vect-slp.c (vect_build_slp_tree_2): Fix out-of-bound access.
8790
8791 2021-06-22  Jakub Jelinek  <jakub@redhat.com>
8792
8793         PR target/11877
8794         * config/i386/i386-protos.h (ix86_last_zero_store_uid): Declare.
8795         * config/i386/i386-expand.c (ix86_last_zero_store_uid): New variable.
8796         * config/i386/i386.c (ix86_expand_prologue): Clear it.
8797         * config/i386/i386.md (peephole2s for 1/2/4 stores of const0_rtx):
8798         Remove "" from match_operand.  Emit new insns using emit_move_insn and
8799         set ix86_last_zero_store_uid to INSN_UID of the last store.
8800         Add peephole2s for 1/2/4 stores of const0_rtx following previous
8801         successful peep2s.
8802
8803 2021-06-22  Martin Liska  <mliska@suse.cz>
8804
8805         * auto-profile.c (AUTO_PROFILE_VERSION): Bump as string format
8806         was changed.
8807
8808 2021-06-22  Martin Liska  <mliska@suse.cz>
8809
8810         * gcov-io.h: Remove padding entries.
8811
8812 2021-06-22  liuhongt  <hongtao.liu@intel.com>
8813
8814         PR tree-optimization/97770
8815         * tree-vect-patterns.c (vect_recog_popcount_pattern):
8816         New.
8817         (vect_recog_func vect_vect_recog_func_ptrs): Add new pattern.
8818
8819 2021-06-22  liuhongt  <hongtao.liu@intel.com>
8820
8821         PR target/100267
8822         * config/i386/i386-builtin.def (BDESC): Adjust builtin name.
8823         * config/i386/sse.md (<avx512>_expand<mode>_mask): Rename to ..
8824         (expand<mode>_mask): this ..
8825         (*expand<mode>_mask): New pre_reload splitter to transform
8826         v{,p}expand* to vmov* when mask is zero, all ones, or has all
8827         ones in it's lower part, otherwise still generate
8828         v{,p}expand*.
8829
8830 2021-06-22  liuhongt  <hongtao.liu@intel.com>
8831
8832         PR target/100310
8833         * config/i386/i386-expand.c
8834         (ix86_expand_special_args_builtin): Keep constm1_operand only
8835         if it satisfies insn's operand predicate.
8836
8837 2021-06-21  Jason Merrill  <jason@redhat.com>
8838
8839         PR target/88529
8840         * df-scan.c (df_ref_record): Check that regno < endregno.
8841         * function.c (assign_parms, expand_function_end): Do nothing with a
8842         TYPE_EMPTY_P result.
8843
8844 2021-06-21  Richard Biener  <rguenther@suse.de>
8845
8846         PR tree-optimization/101120
8847         * tree-vect-data-refs.c (bump_vector_ptr): Fold the
8848         built increment.
8849         * tree-vect-slp.c (vect_transform_slp_perm_load): Add
8850         DR chain DCE capability.
8851         * tree-vectorizer.h (vect_transform_slp_perm_load): Adjust.
8852         * tree-vect-stmts.c (vectorizable_load): Remove unused
8853         loads in the DR chain for SLP.
8854
8855 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
8856
8857         PR inline-asm/100785
8858         * gimplify.c (gimplify_asm_expr): Don't diagnose errors if
8859         output or input operands were already error_mark_node.
8860         * cfgexpand.c (expand_asm_stmt): If errors are emitted,
8861         remove all inputs, outputs and clobbers from the asm and
8862         set template to "".
8863
8864 2021-06-21  prathamesh.kulkarni  <prathamesh.kulkarni@linaro.org>
8865
8866         * config/arm/arm_neon.h (vceq_s8): Replace builtin with __a == __b.
8867         (vceq_s16): Likewise.
8868         (vceq_s32): Likewise.
8869         (vceq_u8): Likewise.
8870         (vceq_u16): Likewise.
8871         (vceq_u32): Likewise.
8872         (vceq_p8): Likewise.
8873         (vceqq_s8): Likewise.
8874         (vceqq_s16): Likewise.
8875         (vceqq_s32): Likewise.
8876         (vceqq_u8): Likewise.
8877         (vceqq_u16): Likewise.
8878         (vceqq_u32): Likewise.
8879         (vceqq_p8): Likewise.
8880         (vceq_f32): Gate __a == __b on __FAST_MATH__.
8881         (vceqq_f32): Likewise.
8882         (vceq_f16): Likewise.
8883         (vceqq_f16): Likewise.
8884
8885 2021-06-21  prathamesh.kulkarni  <prathamesh.kulkarni@linaro.org>
8886
8887         PR target/97906
8888         * config/arm/iterators.md (NEON_VACMP): Remove.
8889         * config/arm/neon.md (neon_vca<cmp_op><mode>): Use GLTE instead of GTGE
8890         iterator.
8891         (neon_vca<cmp_op><mode>_insn): Likewise.
8892         (neon_vca<cmp_op_unsp><mode>_insn_unspec): Use NEON_VAGLTE instead of
8893         NEON_VACMP.
8894
8895 2021-06-21  Richard Biener  <rguenther@suse.de>
8896
8897         PR tree-optimization/101121
8898         * tree-vect-slp.c (vect_build_slp_tree_2): To not fail fatally
8899         when we just lack a stmt with the desired op when doing permutation.
8900         (vect_build_slp_tree): When caching a failed SLP build attempt
8901         assert that at least one lane is marked as not matching.
8902
8903 2021-06-21  liuhongt  <hongtao.liu@intel.com>
8904
8905         PR target/101142
8906         * config/i386/i386.md: (*anddi_1): Disparage slightly the mask
8907         register alternative.
8908         (*and<mode>_1): Ditto.
8909         (*andqi_1): Ditto.
8910         (*andn<mode>_1): Ditto.
8911         (*<code><mode>_1): Ditto.
8912         (*<code>qi_1): Ditto.
8913         (*one_cmpl<mode>2_1): Ditto.
8914         (*one_cmplsi2_1_zext): Ditto.
8915         (*one_cmplqi2_1): Ditto.
8916         * config/i386/i386.c (x86_order_regs_for_local_alloc): Change
8917         the order of mask registers to be before general registers.
8918
8919 2021-06-21  Roger Sayle  <roger@nextmovesoftware.com>
8920
8921         PR target/11877
8922         * config/i386/i386.md: New define_peephole2s to shrink writing
8923         1, 2 or 4 consecutive zeros to memory when optimizing for size.
8924
8925 2021-06-18  Jeff Law  <jeffreyalaw@gmail.com>
8926
8927         * config/h8300/h8300.c (h8300_select_cc_mode): Handle SYMBOL_REF.
8928         * config/h8300/logical.md (<code><mode>3 logcial expander): Generate
8929         more efficient code when the source can be trivially simplified.
8930
8931 2021-06-18  Andrew MacLeod  <amacleod@redhat.com>
8932
8933         * gimple-range-cache.cc (ranger_cache::range_of_def):  Calculate
8934         a range if global is not available.
8935         (ranger_cache::entry_range): Fallback to range_of_def.
8936         * gimple-range-cache.h (range_of_def): Adjust prototype.
8937
8938 2021-06-18  Andrew MacLeod  <amacleod@redhat.com>
8939
8940         PR tree-optimization/101014
8941         * gimple-range-cache.cc (ranger_cache::ranger_cache): Remove poor
8942         value list.
8943         (ranger_cache::~ranger_cache): Ditto.
8944         (ranger_cache::enable_new_values): Delete.
8945         (ranger_cache::push_poor_value): Delete.
8946         (ranger_cache::range_of_def): Remove poor value processing.
8947         (ranger_cache::entry_range): Ditto.
8948         (ranger_cache::fill_block_cache): Ditto.
8949         * gimple-range-cache.h (class ranger_cache): Remove poor value members.
8950         * gimple-range.cc (gimple_ranger::range_of_expr): Remove call.
8951         * gimple-range.h (class gimple_ranger): Adjust.
8952
8953 2021-06-18  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
8954
8955         PR target/100856
8956         * common/config/arm/arm-common.c (arm_canon_arch_option_1): New function
8957         derived from arm_canon_arch.
8958         (arm_canon_arch_option): Call it.
8959         (arm_canon_arch_multilib_option): New function.
8960         * config/arm/arm-cpus.in (IGNORE_FOR_MULTILIB): New fgroup.
8961         * config/arm/arm.h (arm_canon_arch_multilib_option): New prototype.
8962         (CANON_ARCH_MULTILIB_SPEC_FUNCTION): New macro.
8963         (MULTILIB_ARCH_CANONICAL_SPECS): New macro.
8964         (DRIVER_SELF_SPECS): Add MULTILIB_ARCH_CANONICAL_SPECS.
8965         * config/arm/arm.opt (mlibarch): New option.
8966         * config/arm/t-rmprofile (MULTILIB_MATCHES): For armv8*-m, replace use
8967         of march on RHS with mlibarch.
8968
8969 2021-06-18  Marcel Vollweiler  <marcel@codesourcery.com>
8970
8971         * config.in: Regenerate.
8972         * config/gcn/gcn.c (print_operand_address): Fix for global_load assembler
8973         functions.
8974         * configure: Regenerate.
8975         * configure.ac: Fix for global_load assembler functions.
8976
8977 2021-06-18  Richard Biener  <rguenther@suse.de>
8978
8979         PR tree-optimization/101112
8980         * tree-vect-slp.c (vect_slp_linearize_chain): Fix condition
8981         to lookup a pattern stmt def.
8982
8983 2021-06-18  Jakub Jelinek  <jakub@redhat.com>
8984
8985         PR middle-end/101062
8986         * stor-layout.c (finish_bitfield_layout): Don't add bitfield
8987         representatives in QUAL_UNION_TYPE.
8988
8989 2021-06-18  Andrew Pinski  <apinski@marvell.com>
8990
8991         * tree-ssa-phiopt.c (replace_phi_edge_with_variable):
8992         Add counting of how many times it is done.
8993         (factor_out_conditional_conversion): Likewise.
8994         (match_simplify_replacement): Likewise.
8995         (value_replacement): Likewise.
8996         (spaceship_replacement): Likewise.
8997         (cond_store_replacement): Likewise.
8998         (cond_if_else_store_replacement_1): Likewise.
8999         (hoist_adjacent_loads): Likewise.
9000
9001 2021-06-18  Andrew Pinski  <apinski@marvell.com>
9002
9003         * tree-cfg.c (verify_gimple_assign_unary): Reject point and offset
9004         types on NEGATE_EXPR, ABS_EXPR, BIT_NOT_EXPR, PAREN_EXPR and CNONJ_EXPR.
9005         (verify_gimple_assign_binary): Reject point and offset types on
9006         MULT_EXPR, MULT_HIGHPART_EXPR, TRUNC_DIV_EXPR, CEIL_DIV_EXPR,
9007         FLOOR_DIV_EXPR, ROUND_DIV_EXPR, TRUNC_MOD_EXPR, CEIL_MOD_EXPR,
9008         FLOOR_MOD_EXPR, ROUND_MOD_EXPR, RDIV_EXPR, and EXACT_DIV_EXPR.
9009
9010 2021-06-18  Michael Meissner  <meissner@linux.ibm.com>
9011
9012         * config/rs6000/rs6000.c (rs6000_emit_minmax): Add support for ISA
9013         3.1 IEEE 128-bit floating point xsmaxcqp/xsmincqp instructions.
9014         * config/rs6000/rs6000.md (s<minmax><mode>3, IEEE128 iterator):
9015         New insns.
9016
9017 2021-06-17  Aaron Sawdey  <acsawdey@linux.ibm.com>
9018
9019         * config/rs6000/genfusion.pl (gen_logical_addsubf): Add
9020         earlyclobber to alts 0/1.
9021         (gen_addadd): Add earlyclobber to alts 0/1.
9022         * config/rs6000/fusion.md: Regenerate file.
9023
9024 2021-06-17  Trevor Saunders  <tbsaunde@tbsaunde.org>
9025
9026         * cfgloopanal.c (get_loop_hot_path): Make path an auto_vec.
9027
9028 2021-06-17  Andrew MacLeod  <amacleod@redhat.com>
9029
9030         * gimple-range-cache.cc: Comment cleanups.
9031         * gimple-range-gori.cc: Comment cleanups.
9032         * gimple-range.cc: Comment/spacing cleanups
9033         * value-range.h: Comment cleanups.
9034
9035 2021-06-17  H.J. Lu  <hjl.tools@gmail.com>
9036
9037         PR target/100704
9038         * calls.c (expand_call): Replace PUSH_ARGS with
9039         targetm.calls.push_argument (0).
9040         (emit_library_call_value_1): Likewise.
9041         * defaults.h (PUSH_ARGS): Removed.
9042         (PUSH_ARGS_REVERSED): Replace PUSH_ARGS with
9043         targetm.calls.push_argument (0).
9044         * expr.c (block_move_libcall_safe_for_call_parm): Likewise.
9045         (emit_push_insn): Pass the number bytes to push to
9046         targetm.calls.push_argument and pass 0 if ARGS_ADDR is 0.
9047         * hooks.c (hook_bool_uint_true): New.
9048         * hooks.h (hook_bool_uint_true): Likewise.
9049         * rtlanal.c (nonzero_bits1): Replace PUSH_ARGS with
9050         targetm.calls.push_argument (0).
9051         * target.def (push_argument): Add a targetm.calls hook.
9052         * targhooks.c (default_push_argument): New.
9053         * targhooks.h (default_push_argument): Likewise.
9054         * config/bpf/bpf.h (PUSH_ARGS): Removed.
9055         * config/cr16/cr16.c (TARGET_PUSH_ARGUMENT): New.
9056         * config/cr16/cr16.h (PUSH_ARGS): Removed.
9057         * config/i386/i386.c (ix86_push_argument): New.
9058         (TARGET_PUSH_ARGUMENT): Likewise.
9059         * config/i386/i386.h (PUSH_ARGS): Removed.
9060         * config/m32c/m32c.c (TARGET_PUSH_ARGUMENT): New.
9061         * config/m32c/m32c.h (PUSH_ARGS): Removed.
9062         * config/nios2/nios2.h (PUSH_ARGS): Likewise.
9063         * config/pru/pru.h (PUSH_ARGS): Likewise.
9064         * doc/tm.texi.in: Remove PUSH_ARGS documentation.  Add
9065         TARGET_PUSH_ARGUMENT hook.
9066         * doc/tm.texi: Regenerated.
9067
9068 2021-06-17  Uroš Bizjak  <ubizjak@gmail.com>
9069
9070         PR target/97194
9071         * config/i386/i386-expand.c (expand_vector_set_var):
9072         Handle V2FS mode remapping.  Pass TARGET_MMX_WITH_SSE to
9073         ix86_expand_vector_init_duplicate.
9074         (ix86_expand_vector_init_duplicate): Emit insv_1 for
9075         QImode for !TARGET_PARTIAL_REG_STALL.
9076         * config/i386/predicates.md (vec_setm_mmx_operand): New predicate.
9077         * config/i386/mmx.md (vec_setv2sf): Use vec_setm_mmx_operand
9078         as operand 2 predicate.  Call ix86_expand_vector_set_var
9079         for non-constant index operand.
9080         (vec_setv2si): Ditto.
9081         (vec_setv4hi): Ditto.
9082         (vec_setv8qi): ditto.
9083
9084 2021-06-17  Aldy Hernandez  <aldyh@redhat.com>
9085
9086         PR tree-optimization/100790
9087         * gimple-range.cc (range_of_builtin_call): Cleanup clz and ctz
9088         code.
9089
9090 2021-06-17  Martin Liska  <mliska@suse.cz>
9091
9092         * doc/invoke.texi: Use consistently -O1 instead of -O.
9093
9094 2021-06-17  Martin Liska  <mliska@suse.cz>
9095
9096         * gcov-io.h: Update documentation entry about string format.
9097
9098 2021-06-17  Marius Hillenbrand  <mhillen@linux.ibm.com>
9099
9100         PR target/100871
9101         * config/s390/vecintrin.h (vec_doublee): Fix to use
9102           __builtin_s390_vflls.
9103         (vec_floate): Fix to use __builtin_s390_vflrd.
9104
9105 2021-06-17  Trevor Saunders  <tbsaunde@tbsaunde.org>
9106
9107         * dominance.c (get_dominated_to_depth): Return auto_vec<basic_block>.
9108         * dominance.h (get_dominated_to_depth): Likewise.
9109         (get_all_dominated_blocks): Likewise.
9110         * cfgcleanup.c (delete_unreachable_blocks): Adjust.
9111         * gcse.c (hoist_code): Likewise.
9112         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
9113         * tree-parloops.c (oacc_entry_exit_ok): Likewise.
9114         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise.
9115         * tree-ssa-phiprop.c (pass_phiprop::execute): Likewise.
9116
9117 2021-06-17  Trevor Saunders  <tbsaunde@tbsaunde.org>
9118
9119         * dominance.c (get_dominated_by_region): Return auto_vec<basic_block>.
9120         * dominance.h (get_dominated_by_region): Likewise.
9121         * tree-cfg.c (gimple_duplicate_sese_region): Adjust.
9122         (gimple_duplicate_sese_tail): Likewise.
9123         (move_sese_region_to_fn): Likewise.
9124
9125 2021-06-17  Trevor Saunders  <tbsaunde@tbsaunde.org>
9126
9127         * dominance.c (get_dominated_by): Return auto_vec<basic_block>.
9128         * dominance.h (get_dominated_by): Likewise.
9129         * auto-profile.c (afdo_find_equiv_class): Adjust.
9130         * cfgloopmanip.c (duplicate_loop_to_header_edge): Likewise.
9131         * loop-unroll.c (unroll_loop_runtime_iterations): Likewise.
9132         * tree-cfg.c (test_linear_chain): Likewise.
9133         (test_diamond): Likewise.
9134
9135 2021-06-17  Trevor Saunders  <tbsaunde@tbsaunde.org>
9136
9137         * cfgloop.h (get_loop_hot_path): Return auto_vec<basic_block>.
9138         * cfgloopanal.c (get_loop_hot_path): Likewise.
9139         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
9140
9141 2021-06-17  Trevor Saunders  <tbsaunde@tbsaunde.org>
9142
9143         * cgraph.c (cgraph_node::collect_callers): Return
9144         auto_vec<cgraph_edge *>.
9145         * cgraph.h (cgraph_node::collect_callers): Likewise.
9146         * ipa-cp.c (create_specialized_node): Adjust.
9147         (decide_about_value): Likewise.
9148         (decide_whether_version_node): Likewise.
9149         * ipa-sra.c (process_isra_node_results): Likewise.
9150
9151 2021-06-17  Trevor Saunders  <tbsaunde@tbsaunde.org>
9152
9153         * vec.h (vl_ptr>::using_auto_storage): Handle null m_vec.
9154         (auto_vec<T, 0>::auto_vec): Define move constructor, and delete copy
9155         constructor.
9156         (auto_vec<T, 0>::operator=): Define move assignment and delete copy
9157         assignment.
9158
9159 2021-06-17  Aldy Hernandez  <aldyh@redhat.com>
9160
9161         * gimple-range.cc (debug_seed_ranger): New.
9162         (dump_ranger): New.
9163         (debug_ranger): New.
9164
9165 2021-06-17  Richard Biener   <rguenther@suse.de>
9166
9167         PR tree-optimization/54400
9168         * tree-vectorizer.h (enum slp_instance_kind): Add
9169         slp_inst_kind_bb_reduc.
9170         (reduction_fn_for_scalar_code): Declare.
9171         * tree-vect-data-refs.c (vect_slp_analyze_instance_dependence):
9172         Check SLP_INSTANCE_KIND instead of looking at the
9173         representative.
9174         (vect_slp_analyze_instance_alignment): Likewise.
9175         * tree-vect-loop.c (reduction_fn_for_scalar_code): Export.
9176         * tree-vect-slp.c (vect_slp_linearize_chain): Split out
9177         chain linearization from vect_build_slp_tree_2 and generalize
9178         for the use of BB reduction vectorization.
9179         (vect_build_slp_tree_2): Adjust accordingly.
9180         (vect_optimize_slp): Elide permutes at the root of BB reduction
9181         instances.
9182         (vectorizable_bb_reduc_epilogue): New function.
9183         (vect_slp_prune_covered_roots): Likewise.
9184         (vect_slp_analyze_operations): Use them.
9185         (vect_slp_check_for_constructors): Recognize associatable
9186         chains for BB reduction vectorization.
9187         (vectorize_slp_instance_root_stmt): Generate code for the
9188         BB reduction epilogue.
9189
9190 2021-06-17  Andrew MacLeod  <amacleod@redhat.com>
9191
9192         * gimple-range-gori.cc (gori_compute::has_edge_range_p): Check with
9193         may_recompute_p.
9194         (gori_compute::may_recompute_p): New.
9195         (gori_compute::outgoing_edge_range_p): Perform recomputations.
9196         * gimple-range-gori.h (class gori_compute): Add prototype.
9197
9198 2021-06-17  Andrew MacLeod  <amacleod@redhat.com>
9199
9200         * gimple-range-cache.cc (ranger_cache::range_on_edge): Always return
9201         true when a range can be calculated.
9202         * gimple-range.cc (gimple_ranger::dump_bb): Check has_edge_range_p.
9203
9204 2021-06-16  Martin Sebor  <msebor@redhat.com>
9205
9206         * doc/invoke.texi (-Wmismatched-dealloc, -Wmismatched-new-delete):
9207         Correct documented defaults.
9208
9209 2021-06-16  Andrew MacLeod  <amacleod@redhat.com>
9210
9211         * gimple-range-cache.cc (ranger_cache::ranger_cache): Initialize
9212         m_new_value_p directly.
9213
9214 2021-06-16  Uroš Bizjak  <ubizjak@gmail.com>
9215
9216         PR target/89021
9217         * config/i386/i386-expand.c (expand_vec_perm_2perm_pblendv):
9218         Handle 64bit modes for TARGET_SSE4_1.
9219         (expand_vec_perm_pshufb2): Handle 64bit modes for TARGET_SSSE3.
9220         (expand_vec_perm_even_odd_pack): Handle V4HI mode.
9221         (expand_vec_perm_even_odd_1) <case E_V4HImode>: Expand via
9222         expand_vec_perm_pshufb2 for TARGET_SSSE3 and via
9223         expand_vec_perm_even_odd_pack for TARGET_SSE4_1.
9224         * config/i386/mmx.md (mmx_packusdw): New insn pattern.
9225
9226 2021-06-16  Jonathan Wright  <jonathan.wright@arm.com>
9227
9228         * config/aarch64/aarch64-simd.md (aarch64_<sur><addsub>hn<mode>):
9229         Change to an expander that emits the correct instruction
9230         depending on endianness.
9231         (aarch64_<sur><addsub>hn<mode>_insn_le): Define.
9232         (aarch64_<sur><addsub>hn<mode>_insn_be): Define.
9233
9234 2021-06-16  Jonathan Wright  <jonathan.wright@arm.com>
9235
9236         * config/aarch64/aarch64-simd-builtins.def: Split generator
9237         for aarch64_<su>qmovn builtins into scalar and vector
9238         variants.
9239         * config/aarch64/aarch64-simd.md (aarch64_<su>qmovn<mode>_insn_le):
9240         Define.
9241         (aarch64_<su>qmovn<mode>_insn_be): Define.
9242         (aarch64_<su>qmovn<mode>): Split into scalar and vector
9243         variants. Change vector variant to an expander that emits the
9244         correct instruction depending on endianness.
9245
9246 2021-06-16  Jonathan Wright  <jonathan.wright@arm.com>
9247
9248         * config/aarch64/aarch64-simd-builtins.def: Split generator
9249         for aarch64_sqmovun builtins into scalar and vector variants.
9250         * config/aarch64/aarch64-simd.md (aarch64_sqmovun<mode>):
9251         Split into scalar and vector variants. Change vector variant
9252         to an expander that emits the correct instruction depending
9253         on endianness.
9254         (aarch64_sqmovun<mode>_insn_le): Define.
9255         (aarch64_sqmovun<mode>_insn_be): Define.
9256
9257 2021-06-16  Jonathan Wright  <jonathan.wright@arm.com>
9258
9259         * config/aarch64/aarch64-simd.md (aarch64_xtn<mode>_insn_le):
9260         Define - modeling zero-high-half semantics.
9261         (aarch64_xtn<mode>): Change to an expander that emits the
9262         appropriate instruction depending on endianness.
9263         (aarch64_xtn<mode>_insn_be): Define - modeling zero-high-half
9264         semantics.
9265         (aarch64_xtn2<mode>_le): Rename to...
9266         (aarch64_xtn2<mode>_insn_le): This.
9267         (aarch64_xtn2<mode>_be): Rename to...
9268         (aarch64_xtn2<mode>_insn_be): This.
9269         (vec_pack_trunc_<mode>): Emit truncation instruction instead
9270         of aarch64_xtn.
9271         * config/aarch64/iterators.md (Vnarrowd): Add Vnarrowd mode
9272         attribute iterator.
9273
9274 2021-06-16  Martin Jambor  <mjambor@suse.cz>
9275
9276         PR tree-optimization/100453
9277         * tree-sra.c (create_access): Disqualify any const candidates
9278         which are written to.
9279         (sra_modify_expr): Do not store sub-replacements back to a const base.
9280         (handle_unscalarized_data_in_subtree): Likewise.
9281         (sra_modify_assign): Likewise.  Earlier, use TREE_READONLy test
9282         instead of constant_decl_p.
9283
9284 2021-06-16  Jakub Jelinek  <jakub@redhat.com>
9285
9286         PR middle-end/101062
9287         * stor-layout.c (finish_bitfield_representative): For fields in unions
9288         assume nextf is always NULL.
9289         (finish_bitfield_layout): Compute bit field representatives also in
9290         unions, but handle it as if each bitfield was the only field in the
9291         aggregate.
9292
9293 2021-06-16  Richard Biener  <rguenther@suse.de>
9294
9295         PR tree-optimization/101088
9296         * tree-ssa-loop-im.c (sm_seq_valid_bb): Only look for
9297         supported refs on edges.  Do not assert same ref but
9298         different kind stores are unsuported but mark them so.
9299         (hoist_memory_references): Only look for supported refs
9300         on exits.
9301
9302 2021-06-16  Roger Sayle  <roger@nextmovesoftware.com>
9303
9304         PR rtl-optimization/46235
9305         * config/i386/i386.md: New define_split for bt followed by cmov.
9306         (*bt<mode>_setcqi): New define_insn_and_split for bt followed by setc.
9307         (*bt<mode>_setncqi): New define_insn_and_split for bt then setnc.
9308         (*bt<mode>_setnc<mode>): New define_insn_and_split for bt followed
9309         by setnc with zero extension.
9310
9311 2021-06-16  Richard Biener  <rguenther@suse.de>
9312
9313         PR tree-optimization/101083
9314         * tree-vect-slp.c (vect_slp_build_two_operator_nodes): Get
9315         vectype as argument.
9316         (vect_build_slp_tree_2): Adjust.
9317
9318 2021-06-15  Martin Sebor  <msebor@redhat.com>
9319
9320         PR middle-end/100876
9321         * builtins.c: (gimple_call_return_array): Account for size_t
9322         mangling as either unsigned int or unsigned long
9323
9324 2021-06-15  Jeff Law  <jeffreyalaw@gmail.com>
9325
9326         * compare-elim.c (try_eliminate_compare): Run DCE to clean things
9327         up before eliminating comparisons.
9328
9329 2021-06-15  Aldy Hernandez  <aldyh@redhat.com>
9330
9331         * range-op.cc (operator_bitwise_or::wi_fold): Make sure
9332         nonzero|X is nonzero.
9333         (range_op_bitwise_and_tests): Add tests for above.
9334
9335 2021-06-15  Carl Love  <cel@us.ibm.com>
9336
9337         PR target/101022
9338         * config/rs6000/rs6000-builtin.def (VCMPEQUT): Fix the ICODE for the
9339         enum definition.
9340         (VRLQ, VSLQ, VSRQ, VSRAQ): Remove unused BU_P10_OVERLOAD_2
9341         definitions.
9342
9343 2021-06-15  Tobias Burnus  <tobias@codesourcery.com>
9344
9345         PR fortran/92568
9346         * gimplify.c (enum gimplify_defaultmap_kind): Add GDMK_SCALAR_TARGET.
9347         (struct gimplify_omp_ctx): Extend defaultmap array by one.
9348         (new_omp_context): Init defaultmap[GDMK_SCALAR_TARGET].
9349         (omp_notice_variable): Update type classification for Fortran.
9350         (gimplify_scan_omp_clauses): Update calls for new argument; handle
9351         GDMK_SCALAR_TARGET; for Fortran, GDMK_POINTER avoid GOVD_MAP_0LEN_ARRAY.
9352         * langhooks-def.h (lhd_omp_scalar_p): Add 'ptr_ok' argument.
9353         * langhooks.c (lhd_omp_scalar_p): Likewise.
9354         (LANG_HOOKS_OMP_ALLOCATABLE_P, LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
9355         (LANG_HOOKS_DECLS): Add them.
9356         * langhooks.h (struct lang_hooks_for_decls): Add new hooks, update
9357         omp_scalar_p pointer type to include the new bool argument.
9358
9359 2021-06-15  David Malcolm  <dmalcolm@redhat.com>
9360
9361         * doc/analyzer.texi
9362         (Special Functions for Debugging the Analyzer): Add
9363         __analyzer_dump_capacity.
9364
9365 2021-06-15  Jakub Jelinek  <jakub@redhat.com>
9366
9367         PR target/101046
9368         * expr.c (expand_expr_real_2) <case VEC_PACK_FIX_TRUNC_EXPR,
9369         case VEC_PACK_TRUNC_EXPR>: Clear subtarget when changing mode.
9370
9371 2021-06-15  Richard Biener  <rguenther@suse.de>
9372
9373         * cfgloopanal.c (mark_irreducible_loops): Use a dominance
9374         check to identify loop latches.
9375         * cfgloop.c (verify_loop_structure): Likewise.
9376         * loop-init.c (apply_loop_flags): Allow marked irreducible
9377         regions even with multiple latches.
9378         * predict.c (rebuild_frequencies): Simplify.
9379
9380 2021-06-15  Richard Biener  <rguenther@suse.de>
9381
9382         * tree-ssa-threadupdate.c
9383         (jump_thread_path_registry::mark_threaded_blocks): Assert we
9384         have marked irreducible regions.
9385
9386 2021-06-14  Martin Sebor  <msebor@redhat.com>
9387
9388         PR c++/100876
9389         * builtins.c (gimple_call_return_array): Check for attribute fn spec.
9390         Handle calls to placement new.
9391         (ndecl_dealloc_argno): Avoid placement delete.
9392
9393 2021-06-14  Peter Bergner  <bergner@linux.ibm.com>
9394
9395         PR target/100777
9396         * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Use
9397         create_tmp_reg_or_ssa_name().
9398
9399 2021-06-14  Andrew MacLeod  <amacleod@redhat.com>
9400
9401         * gimple-range-cache.cc (ranger_cache::ranger_cache): Adjust.
9402         (ranger_cache::enable_new_values): Set to specified value and
9403         return the old value.
9404         (ranger_cache::disable_new_values): Delete.
9405         (ranger_cache::fill_block_cache): Disable non 1st order derived
9406         poor values.
9407         * gimple-range-cache.h (ranger_cache): Adjust prototypes.
9408         * gimple-range.cc (gimple_ranger::range_of_expr): Adjust.
9409
9410 2021-06-14  Uroš Bizjak  <ubizjak@gmail.com>
9411
9412         PR target/101058
9413         * config/i386/i386-expand.c (ix86_vectorize_vec_perm_const):
9414         Return true early when testing with V2HImode.
9415         * config/i386/mmx.md (*punpckwd): Split to sse2_pshuflw_1.
9416
9417 2021-06-14  Christophe Lyon  <christophe.lyon@linaro.org>
9418
9419         * config/arm/mve.md (mve_vec_unpack<US>_lo_<mode>): New pattern.
9420         (mve_vec_unpack<US>_hi_<mode>): New pattern.
9421         (@mve_vec_pack_trunc_lo_<mode>): New pattern.
9422         (mve_vmovntq_<supf><mode>): Prefix with '@'.
9423         * config/arm/neon.md (vec_unpack<US>_hi_<mode>): Move to
9424         vec-common.md.
9425         (vec_unpack<US>_lo_<mode>): Likewise.
9426         (vec_pack_trunc_<mode>): Rename to
9427         neon_quad_vec_pack_trunc_<mode>.
9428         * config/arm/vec-common.md (vec_unpack<US>_hi_<mode>): New
9429         pattern.
9430         (vec_unpack<US>_lo_<mode>): New.
9431         (vec_pack_trunc_<mode>): New.
9432
9433 2021-06-14  Richard Biener  <rguenther@suse.de>
9434
9435         PR tree-optimization/100934
9436         * tree-ssa-dom.c (pass_dominator::execute): Properly
9437         mark irreducible regions.
9438
9439 2021-06-14  Martin Liska  <mliska@suse.cz>
9440
9441         * doc/invoke.texi: Put r{...} on the same line as @item.
9442
9443 2021-06-14  Martin Liska  <mliska@suse.cz>
9444
9445         * doc/invoke.texi: Add missing newline.
9446
9447 2021-06-14  Martin Liska  <mliska@suse.cz>
9448
9449         * doc/invoke.texi: Remove '+' charasters.
9450
9451 2021-06-14  Claudiu Zissulescu  <claziss@synopsys.com>
9452
9453         * config.gcc (arc): Add support for with_cpu option.
9454         * config/arc/arc.h (OPTION_DEFAULT_SPECS): Add fpu.
9455
9456 2021-06-14  Richard Biener  <rguenther@suse.de>
9457
9458         PR tree-optimization/101031
9459         * tree-ssa-strlen.c (maybe_invalidate): Increment max_size
9460         instead of size when accounting for a possibly string
9461         terminating nul.
9462
9463 2021-06-14  Martin Liska  <mliska@suse.cz>
9464
9465         * gimple-ssa-evrp.c (pointer_equiv_analyzer::~pointer_equiv_analyzer): Use delete[].
9466
9467 2021-06-14  Aldy Hernandez  <aldyh@redhat.com>
9468
9469         * value-query.cc (gimple_range_global): Call get_range_global
9470         if called after inlining.
9471
9472 2021-06-13  Uroš Bizjak  <ubizjak@gmail.com>
9473
9474         PR target/101021
9475         * config/i386/i386-expand.c (expand_vec_perm_pshufb):
9476         Emit constant permutation insn directly from here.
9477
9478 2021-06-13  Trevor Saunders  <tbsaunde@tbsaunde.org>
9479
9480         * attribs.c (find_attribute_namespace): Iterate over vec<> with
9481         range based for.
9482         * auto-profile.c (afdo_find_equiv_class): Likewise.
9483         * gcc.c (do_specs_vec): Likewise.
9484         (do_spec_1): Likewise.
9485         (driver::set_up_specs): Likewise.
9486         * gimple-loop-jam.c (any_access_function_variant_p): Likewise.
9487         * gimple-ssa-store-merging.c (compatible_load_p): Likewise.
9488         (imm_store_chain_info::try_coalesce_bswap): Likewise.
9489         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
9490         (get_location_for_stmts): Likewise.
9491         * graphite-poly.c (print_iteration_domains): Likewise.
9492         (free_poly_bb): Likewise.
9493         (remove_gbbs_in_scop): Likewise.
9494         (free_scop): Likewise.
9495         (dump_gbb_cases): Likewise.
9496         (dump_gbb_conditions): Likewise.
9497         (print_pdrs): Likewise.
9498         (print_scop): Likewise.
9499         * ifcvt.c (cond_move_process_if_block): Likewise.
9500         * lower-subreg.c (decompose_multiword_subregs): Likewise.
9501         * regcprop.c (pass_cprop_hardreg::execute): Likewise.
9502         * sanopt.c (sanitize_rewrite_addressable_params): Likewise.
9503         * sel-sched-dump.c (dump_insn_vector): Likewise.
9504         * store-motion.c (store_ops_ok): Likewise.
9505         (store_killed_in_insn): Likewise.
9506         * timevar.c (timer::named_items::print): Likewise.
9507         * tree-cfgcleanup.c (cleanup_control_flow_pre): Likewise.
9508         (cleanup_tree_cfg_noloop): Likewise.
9509         * tree-data-ref.c (dump_data_references): Likewise.
9510         (print_dir_vectors): Likewise.
9511         (print_dist_vectors): Likewise.
9512         (dump_data_dependence_relations): Likewise.
9513         (dump_dist_dir_vectors): Likewise.
9514         (dump_ddrs): Likewise.
9515         (create_runtime_alias_checks): Likewise.
9516         (free_subscripts): Likewise.
9517         (save_dist_v): Likewise.
9518         (save_dir_v): Likewise.
9519         (invariant_access_functions): Likewise.
9520         (same_access_functions): Likewise.
9521         (access_functions_are_affine_or_constant_p): Likewise.
9522         (find_data_references_in_stmt): Likewise.
9523         (graphite_find_data_references_in_stmt): Likewise.
9524         (free_dependence_relations): Likewise.
9525         (free_data_refs): Likewise.
9526         * tree-inline.c (copy_debug_stmts): Likewise.
9527         * tree-into-ssa.c (dump_currdefs): Likewise.
9528         (rewrite_update_phi_arguments): Likewise.
9529         * tree-ssa-propagate.c (clean_up_loop_closed_phi): Likewise.
9530         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
9531         Likewise.
9532         (vect_slp_analyze_node_dependences): Likewise.
9533         (vect_slp_analyze_instance_dependence): Likewise.
9534         (vect_record_base_alignments): Likewise.
9535         (vect_get_peeling_costs_all_drs): Likewise.
9536         (vect_peeling_supportable): Likewise.
9537         * tree-vectorizer.c (vec_info::~vec_info): Likewise.
9538         (vec_info::free_stmt_vec_infos): Likewise.
9539
9540 2021-06-13  Jeff Law  <jeffreyalaw@gmail.com>
9541
9542         * config/h8300/logical.md (<code>qi3_1<cczn>): New pattern.
9543         (andqi3_1<cczn>): Removed.
9544         (<ors>qi3_1): Do not split for IOR/XOR a single bit.
9545         (H8/SX bit logicals): Split out from other patterns.
9546         * config/h8300/multiply.md (mulqihi3_const<cczn>): Renamed from
9547         mulqihi3_const_clobber_flags.
9548         (mulqihi3<cczn>, mulhisi3_const<cczn>, mulhisi3<cczn>): Similarly
9549
9550 2021-06-13  H.J. Lu  <hjl.tools@gmail.com>
9551
9552         PR target/101023
9553         * config/i386/i386.c (ix86_expand_prologue): Set red_zone_used
9554         to true if red zone is used.
9555         (ix86_output_indirect_jmp): Replace ix86_red_zone_size with
9556         ix86_red_zone_used.
9557         * config/i386/i386.h (machine_function): Add red_zone_used.
9558         (ix86_red_zone_size): Removed.
9559         (ix86_red_zone_used): New.
9560         * config/i386/i386.md (peephole2 patterns): Replace
9561         ix86_red_zone_size with ix86_red_zone_used.
9562
9563 2021-06-12  Jason Merrill  <jason@redhat.com>
9564
9565         * doc/extend.texi (unused variable attribute): Applies to
9566         structure fields as well.
9567
9568 2021-06-12  Eugene Rozenfeld  <erozen@microsoft.com>
9569
9570         * auto-profile.c (read_profile): fix a typo in an error string
9571
9572 2021-06-11  Thomas Schwinge  <thomas@codesourcery.com>
9573
9574         * tree-pretty-print.h (dump_omp_clauses): Add 'bool = true'
9575         default argument.
9576         * tree-pretty-print.c (dump_omp_clauses): Update.
9577         (dump_generic_node) <OMP_CLAUSE>: Use it.
9578
9579 2021-06-11  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
9580
9581         PR target/101016
9582         * config/arm/arm_mve.h (__arm_vld1q): Change __ARM_mve_coerce(p0,
9583         int8_t const *) to __ARM_mve_coerce1(p0, int8_t *) in the argument for
9584         the polymorphic variants matching code.
9585         (__arm_vld1q_z): Likewise.
9586         (__arm_vld2q): Likewise.
9587         (__arm_vld4q): Likewise.
9588         (__arm_vldrbq_gather_offset): Likewise.
9589         (__arm_vldrbq_gather_offset_z): Likewise.
9590
9591 2021-06-11  Roger Sayle  <roger@nextmovesoftware.com>
9592
9593         PR tree-optimization/96392
9594         * fold-const.h (tree_expr_maybe_real_minus_zero_p): Fix prototype.
9595
9596 2021-06-11  Roger Sayle  <roger@nextmovesoftware.com>
9597
9598         PR tree-optimization/96392
9599         * fold-const.c (fold_real_zero_addition_p): Take both arguments
9600         of the addition or subtraction, not just the zero.  Use this
9601         other argument in tests for signaling NaNs and signed zeros.
9602         (tree_expr_maybe_real_minus_zero_p): New predicate.
9603         * fold-const.h (fold_real_zero_addition_p): Update prototype.
9604         (tree_expr_maybe_real_minus_zero_p): New function prototype.
9605         * match.pd: Update calls to fold_real_zero_addition_p.
9606         Replace HONOR_NANS with tree_expr_maybe_nan_p.
9607         Replace HONOR_SIGNED_ZEROS with tree_expr_maybe_real_minus_zero_p.
9608         Replace HONOR_SNANS with tree_expr_maybe_signaling_nan_p.
9609         * tree-ssa-reassoc.c (eliminate_using_constants): Update
9610         call to fold_real_zero_addition_p.
9611
9612 2021-06-11  Richard Biener  <rguenther@suse.de>
9613
9614         PR tree-optimization/101025
9615         * tree-ssa-loop-im.c (sm_seq_valid_bb): Make sure to process
9616         all refs that require dependence checking.
9617
9618 2021-06-11  Richard Biener  <rguenther@suse.de>
9619
9620         PR tree-optimization/101028
9621         * tree-vect-slp.c (vect_build_slp_tree_2): When SLP
9622         reassoc discovery fails fatally, mark appropriate lanes
9623         in matches[] so.
9624
9625 2021-06-11  Richard Biener  <rguenther@suse.de>
9626
9627         PR tree-optimization/101026
9628         * tree-vect-slp.c (vect_build_slp_tree_2): Make sure we
9629         have a representative for the associated chain nodes.
9630
9631 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
9632
9633         PR rtl-optimization/101008
9634         * simplify-rtx.c (relational_result): New function.
9635         (simplify_logical_relational_operation,
9636         simplify_relational_operation): Use it.
9637
9638 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
9639
9640         PR target/101007
9641         * config/i386/sse.md (*vec_concat<mode>_0_1): Require TARGET_SSE2.
9642
9643 2021-06-11  Uroš Bizjak  <ubizjak@gmail.com>
9644
9645         PR target/101021
9646         * config/i386/i386-expand.c (expand_vec_perm_pshufb): Return
9647         false if the permutation can be implemented with constant
9648         permutation instruction in wider mode.
9649         (canonicalize_vector_int_perm): Move above expand_vec_perm_pshufb.
9650         Handle V8QImode and V4HImode.
9651
9652 2021-06-11  Martin Liska  <mliska@suse.cz>
9653
9654         PR gcov-profile/100788
9655         * common.opt: Add new option.
9656         * coverage.c (coverage_begin_function): Emit warning instead on
9657         the internal compiler error.
9658         * doc/invoke.texi: Document the option.
9659         * toplev.c (process_options): Enable it by default.
9660
9661 2021-06-11  Richard Biener  <rguenther@suse.de>
9662
9663         PR middle-end/101009
9664         * tree-data-ref.c (build_classic_dist_vector_1): Make sure
9665         to set *init_b to true when we encounter a constant equal
9666         index pair.
9667         (compute_affine_dependence): Also dump the actual DR_REF.
9668
9669 2021-06-10  Aldy Hernandez  <aldyh@redhat.com>
9670
9671         PR tree-optimization/100984
9672         * gimple-ssa-evrp.c  (ssa_equiv_stack): Use auto_vec for
9673         replacements table.
9674         (ssa_equiv_stack::~ssa_equiv_stack): Remove.
9675
9676 2021-06-11  Kewen Lin  <linkw@linux.ibm.com>
9677
9678         * config/rs6000/rs6000.md
9679         (floatsi<SFDF:mode>2_lfiwax_<QHI:mode>_mem_zext): New
9680         define_insn_and_split.
9681
9682 2021-06-11  Richard Biener  <rguenther@suse.de>
9683
9684         * tree-vect-slp.c (vect_build_slp_tree_2): Use stablesort
9685         to sort operands of the associative chain.
9686
9687 2021-06-11  Richard Biener  <rguenther@suse.de>
9688
9689         * system.h (gcc_stablesort_r): Declare.
9690         * sort.cc (gcc_sort_r): Support stable sort.
9691         (gcc_stablesort_r): Define.
9692         * vec.h (vec<>::stablesort): Add.
9693
9694 2021-06-10  Uroš Bizjak  <ubizjak@gmail.com>
9695
9696         PR target/89021
9697         * config/i386/i386-expand.c (ix86_split_mmx_punpck):
9698         Handle V2SF mode.  Emit SHUFPS to fixup unpack-high for V2SF mode.
9699         (expand_vec_perm_blend): Handle 64bit modes for TARGET_SSE4_1.
9700         (expand_vec_perm_pshufb): Handle 64bit modes for TARGET_SSSE3.
9701         (expand_vec_perm_pblendv): Handle 64bit modes for TARGET_SSE4_1.
9702         (expand_vec_perm_interleave2): Handle 64bit modes.
9703         (expand_vec_perm_even_odd_pack): Handle V8QI mode.
9704         (expand_vec_perm_even_odd_1): Ditto.
9705         (ix86_vectorize_vec_perm_const): Ditto.
9706         * config/i386/i386.md (UNSPEC_PSHUFB): Move from ...
9707         * config/i386/sse.md: ... here.
9708         * config/i386/mmx.md (*vec_interleave_lowv2sf):
9709         New insn_and_split pattern.
9710         (*vec_interleave_highv2sf): Ditto.
9711         (mmx_pshufbv8qi3): New insn pattern.
9712         (*mmx_pblendw): Ditto.
9713
9714 2021-06-10  Peter Bergner  <bergner@linux.ibm.com>
9715
9716         * config/rs6000/rs6000-builtin.def (build_pair): New built-in.
9717         (build_acc): Likewise.
9718         * config/rs6000/rs6000-call.c (mma_expand_builtin): Swap assemble
9719         source operands in little-endian mode.
9720         (rs6000_gimple_fold_mma_builtin): Handle VSX_BUILTIN_BUILD_PAIR.
9721         (mma_init_builtins): Likewise.
9722         * config/rs6000/rs6000.c (rs6000_split_multireg_move): Handle endianness
9723         ordering for the MMA assemble and build source operands.
9724         * doc/extend.texi (__builtin_vsx_build_acc, __builtin_mma_build_pair):
9725         Document.
9726         (__builtin_mma_assemble_acc, __builtin_mma_assemble_pair): Remove
9727         documentation.
9728
9729 2021-06-10  Jeff Law  <jeffreyalaw@gmail.com>
9730
9731         * config/h8300/h8300.c (select_cc_mode): Handle MEM.  Use
9732         REG_P.
9733         * config/h8300/extensions.md: Replace _clobber_flags patterns
9734         with <cczn>.
9735
9736 2021-06-10  Robin Dapp  <rdapp@linux.ibm.com>
9737
9738         * config/s390/vector.md (vcond_mask_<mode><mode>): Change to
9739         (vcond_mask_<mode><tointvec>): this.
9740
9741 2021-06-10  Andrew Stubbs  <ams@codesourcery.com>
9742             Thomas Schwinge  <thomas@codesourcery.com>
9743
9744         * omp-builtins.def (BUILT_IN_GOACC_ENTER_EXIT_DATA): Split into...
9745         (BUILT_IN_GOACC_ENTER_DATA, BUILT_IN_GOACC_EXIT_DATA): ... these.
9746         * gimple.h (enum gf_mask): Split
9747         'GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA' into
9748         'GF_OMP_TARGET_KIND_OACC_ENTER_DATA' and
9749         'GF_OMP_TARGET_KIND_OACC_EXIT_DATA'.
9750         (is_gimple_omp_oacc): Update.
9751         * gimple-pretty-print.c (dump_gimple_omp_target): Likewise.
9752         * gimplify.c (gimplify_omp_target_update): Likewise.
9753         * omp-expand.c (expand_omp_target, build_omp_regions_1)
9754         (omp_make_gimple_edges): Likewise.
9755         * omp-low.c (check_omp_nesting_restrictions, lower_omp_target):
9756         Likewise.
9757
9758 2021-06-10  Aldy Hernandez  <aldyh@redhat.com>
9759
9760         * value-query.cc (value_query::value_on_edge): Rename name to
9761         expr.
9762         (range_query::range_on_edge): Same.
9763         (range_query::value_of_expr): Same.
9764         (range_query::value_on_edge): Same.
9765         * value-query.h (class value_query): Same.
9766         (class range_query): Same.
9767
9768 2021-06-10  Richard Biener  <rguenther@suse.de>
9769
9770         PR tree-optimization/101003
9771         * tree-vect-slp.c (vect_build_slp_tree_2): Appropriately
9772         use the pattern stmt defs when linearizing a chain.
9773
9774 2021-06-10  Jakub Jelinek  <jakub@redhat.com>
9775
9776         PR debug/100852
9777         * ifcvt.c (noce_get_alt_condition, noce_try_abs): Use
9778         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
9779
9780 2021-06-10  Clement Chigot  <clement.chigot@atos.net>
9781
9782         * config/rs6000/aix71.h (ASM_CPU_SPEC): Add Power10 directive.
9783         * config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.
9784
9785 2021-06-09  Andrew Pinski  <apinski@marvell.com>
9786
9787         PR tree-optimization/100925
9788         * match.pd (a ? CST1 : CST2): Limit transformations
9789         that would produce a negative to integeral types only.
9790         Change !POINTER_TYPE_P to INTEGRAL_TYPE_P also.
9791
9792 2021-06-09  Jeff Law  <jeffreyalaw@gmail.com>
9793
9794         Revert:
9795         2021-06-09  Jeff Law  <jeffreyalaw@gmail.com>
9796
9797         * doc/tm.texi: Correctly update.
9798
9799 2021-06-09  Jeff Law  <jeffreyalaw@gmail.com>
9800
9801         * doc/tm.texi: Correctly update.
9802
9803 2021-06-09  H.J. Lu  <hjl.tools@gmail.com>
9804
9805         PR other/100735
9806         * doc/tm.texi.in (Trampolines): Add a missing blank line.
9807
9808 2021-06-09  Paul Eggert  <eggert@cs.ucla.edu>
9809
9810         PR other/100735
9811         * doc/invoke.texi (Code Gen Options); Document that -fno-trampolines
9812         and -ftrampolines work only with Ada.
9813         * doc/tm.texi.in (Trampolines): Likewise.
9814         * doc/tm.texi: Regenerated.
9815
9816 2021-06-09  Carl Love  <cel@us.ibm.com>
9817
9818         * config/rs6000/altivec.h (vec_signextll, vec_signexti, vec_signextq):
9819         Add define for new builtins.
9820         * config/rs6000/altivec.md(altivec_vreveti2): Add define_expand.
9821         * config/rs6000/rs6000-builtin.def (VSIGNEXTI, VSIGNEXTLL):  Add
9822         overloaded builtin definitions.
9823         (VSIGNEXTSB2W, VSIGNEXTSH2W, VSIGNEXTSB2D, VSIGNEXTSH2D,VSIGNEXTSW2D,
9824         VSIGNEXTSD2Q):  Add builtin expansions.
9825         (SIGNEXT): Add P10 overload definition.
9826         * config/rs6000/rs6000-call.c (P9V_BUILTIN_VEC_VSIGNEXTI, P9V_BUILTIN_VEC_VSIGNEXTLL,
9827         P10_BUILTIN_VEC_SIGNEXT): Add overloaded argument definitions.
9828         * config/rs6000/vsx.md (vsx_sign_extend_v2di_v1ti): Add define_insn.
9829         (vsignextend_v2di_v1ti, vsignextend_qi_<mode>, vsignextend_hi_<mode>,
9830         vsignextend_si_v2di)[VIlong]: Add define_expand.
9831         Make define_insn vsx_sign_extend_si_v2di visible.
9832         * doc/extend.texi:  Add documentation for the vec_signexti,
9833         vec_signextll builtins and vec_signextq.
9834
9835 2021-06-09  Carl Love  <cel@us.ibm.com>
9836
9837         * config/rs6000/rs6000.c (__fixkfti, __fixunskfti, __floattikf,
9838         __floatuntikf): Names changed to __fixkfti_sw, __fixunskfti_sw,
9839         __floattikf_sw, __floatuntikf_sw respectively.
9840         * config/rs6000/rs6000.md (floatti<mode>2, floatunsti<mode>2,
9841         fix_trunc<mode>ti2, fixuns_trunc<mode>ti2): Add
9842         define_insn for mode IEEE 128.
9843
9844 2021-06-09  Carl Love  <cel@us.ibm.com>
9845
9846         * config/rs6000/altivec.md (altivec_vslq, altivec_vsrq):
9847         Rename to altivec_vslq_<mode>, altivec_vsrq_<mode>, mode VEC_TI.
9848         * config/rs6000/vector.md (VEC_TI): Was named VSX_TI in vsx.md.
9849         (vashlv1ti3): Change to vashl<mode>3, mode VEC_TI.
9850         (vlshrv1ti3): Change to vlshr<mode>3, mode VEC_TI.
9851         * config/rs6000/vsx.md (VSX_TI): Remove define_mode_iterator. Update
9852         uses of VSX_TI to VEC_TI.
9853
9854 2021-06-09  Carl Love  <cel@us.ibm.com>
9855
9856         * config/rs6000/dfp.md (floattitd2, fixtdti2): New define_insns.
9857
9858 2021-06-09  Carl Love  <cel@us.ibm.com>
9859
9860         * config/rs6000/altivec.h (vec_dive, vec_mod): Add define for new
9861         builtins.
9862         * config/rs6000/altivec.md (UNSPEC_VMULEUD, UNSPEC_VMULESD,
9863         UNSPEC_VMULOUD, UNSPEC_VMULOSD): New unspecs.
9864         (altivec_eqv1ti, altivec_gtv1ti, altivec_gtuv1ti, altivec_vmuleud,
9865         altivec_vmuloud, altivec_vmulesd, altivec_vmulosd, altivec_vrlq,
9866         altivec_vrlqmi, altivec_vrlqmi_inst, altivec_vrlqnm,
9867         altivec_vrlqnm_inst, altivec_vslq, altivec_vsrq, altivec_vsraq,
9868         altivec_vcmpequt_p, altivec_vcmpgtst_p, altivec_vcmpgtut_p): New
9869         define_insn.
9870         (vec_widen_umult_even_v2di, vec_widen_smult_even_v2di,
9871         vec_widen_umult_odd_v2di, vec_widen_smult_odd_v2di, altivec_vrlqmi,
9872         altivec_vrlqnm): New define_expands.
9873         * config/rs6000/rs6000-builtin.def (VCMPEQUT_P, VCMPGTST_P,
9874         VCMPGTUT_P): Add macro expansions.
9875         (BU_P10V_AV_P): Add builtin predicate definition.
9876         (VCMPGTUT, VCMPGTST, VCMPEQUT, CMPNET, CMPGE_1TI,
9877         CMPGE_U1TI, CMPLE_1TI, CMPLE_U1TI, VNOR_V1TI_UNS, VNOR_V1TI, VCMPNET_P,
9878         VCMPAET_P, VMULEUD, VMULESD, VMULOUD, VMULOSD, VRLQ,
9879         VSLQ, VSRQ, VSRAQ, VRLQNM, DIV_V1TI, UDIV_V1TI, DIVES_V1TI, DIVEU_V1TI,
9880         MODS_V1TI, MODU_V1TI, VRLQMI): New macro expansions.
9881         (VRLQ, VSLQ, VSRQ, VSRAQ, DIVE, MOD): New overload expansions.
9882         * config/rs6000/rs6000-call.c (P10_BUILTIN_VCMPEQUT,
9883         P10V_BUILTIN_CMPGE_1TI, P10V_BUILTIN_CMPGE_U1TI,
9884         P10V_BUILTIN_VCMPGTUT, P10V_BUILTIN_VCMPGTST,
9885         P10V_BUILTIN_CMPLE_1TI, P10V_BUILTIN_VCMPLE_U1TI,
9886         P10V_BUILTIN_DIV_V1TI, P10V_BUILTIN_UDIV_V1TI,
9887         P10V_BUILTIN_VMULESD, P10V_BUILTIN_VMULEUD,
9888         P10V_BUILTIN_VMULOSD, P10V_BUILTIN_VMULOUD,
9889         P10V_BUILTIN_VNOR_V1TI, P10V_BUILTIN_VNOR_V1TI_UNS,
9890         P10V_BUILTIN_VRLQ, P10V_BUILTIN_VRLQMI,
9891         P10V_BUILTIN_VRLQNM, P10V_BUILTIN_VSLQ,
9892         P10V_BUILTIN_VSRQ, P10V_BUILTIN_VSRAQ,
9893         P10V_BUILTIN_VCMPGTUT_P, P10V_BUILTIN_VCMPGTST_P,
9894         P10V_BUILTIN_VCMPEQUT_P, P10V_BUILTIN_VCMPGTUT_P,
9895         P10V_BUILTIN_VCMPGTST_P, P10V_BUILTIN_CMPNET,
9896         P10V_BUILTIN_VCMPNET_P, P10V_BUILTIN_VCMPAET_P,
9897         P10V_BUILTIN_DIVES_V1TI, P10V_BUILTIN_MODS_V1TI,
9898         P10V_BUILTIN_MODU_V1TI):
9899         New overloaded definitions.
9900         (rs6000_gimple_fold_builtin) [P10V_BUILTIN_VCMPEQUT,
9901         P10V_BUILTIN_CMPNET, P10V_BUILTIN_CMPGE_1TI,
9902         P10V_BUILTIN_CMPGE_U1TI, P10V_BUILTIN_VCMPGTUT,
9903         P10V_BUILTIN_VCMPGTST, P10V_BUILTIN_CMPLE_1TI,
9904         P10V_BUILTIN_CMPLE_U1TI]: New case statements.
9905         (rs6000_init_builtins) [bool_V1TI_type_node, int_ftype_int_v1ti_v1ti]:
9906         New assignments.
9907         (altivec_init_builtins): New E_V1TImode case statement.
9908         (builtin_function_type)[P10_BUILTIN_128BIT_VMULEUD,
9909         P10_BUILTIN_128BIT_VMULOUD, P10_BUILTIN_128BIT_DIVEU_V1TI,
9910         P10_BUILTIN_128BIT_MODU_V1TI, P10_BUILTIN_CMPGE_U1TI,
9911         P10_BUILTIN_VCMPGTUT, P10_BUILTIN_VCMPEQUT]: New case statements.
9912         * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute) [E_TImode,
9913         E_V1TImode]: New case statements.
9914         * config/rs6000/rs6000.h (rs6000_builtin_type_index): New enum
9915         value RS6000_BTI_bool_V1TI.
9916         * config/rs6000/vector.md (vector_gtv1ti,vector_nltv1ti,
9917         vector_gtuv1ti, vector_nltuv1ti, vector_ngtv1ti, vector_ngtuv1ti,
9918         vector_eq_v1ti_p, vector_ne_v1ti_p, vector_ae_v1ti_p,
9919         vector_gt_v1ti_p, vector_gtu_v1ti_p, vrotlv1ti3, vashlv1ti3,
9920         vlshrv1ti3, vashrv1ti3): New define_expands.
9921         * config/rs6000/vsx.md (UNSPEC_VSX_DIVSQ, UNSPEC_VSX_DIVUQ,
9922         UNSPEC_VSX_DIVESQ, UNSPEC_VSX_DIVEUQ, UNSPEC_VSX_MODSQ,
9923         UNSPEC_VSX_MODUQ): New unspecs.
9924         (mulv2di3, vsx_div_v1ti, vsx_udiv_v1ti, vsx_dives_v1ti,
9925         vsx_diveu_v1ti, vsx_mods_v1ti, vsx_modu_v1ti, xxswapd_v1ti): New
9926         define_insns.
9927         (vcmpnet): New define_expand.
9928         * doc/extend.texi: Add documentation for the new builtins vec_rl,
9929         vec_rlmi, vec_rlnm, vec_sl, vec_sr, vec_sra, vec_mule, vec_mulo,
9930         vec_div, vec_dive, vec_mod, vec_cmpeq, vec_cmpne, vec_cmpgt, vec_cmplt,
9931         vec_cmpge, vec_cmple, vec_all_eq, vec_all_ne, vec_all_gt, vec_all_lt,
9932         vec_all_ge, vec_all_le, vec_any_eq, vec_any_ne, vec_any_gt, vec_any_lt,
9933         vec_any_ge, vec_any_le.
9934
9935 2021-06-09  Carl Love  <cel@us.ibm.com>
9936
9937         * config/rs6000/altivec.md (altivec_vrl<VI_char>mi): Fix
9938         bug in argument generation.
9939
9940 2021-06-09  Christophe Lyon  <christophe.lyon@linaro.org>
9941
9942         * config/arm/iterators.md (<supf>): Remove VCLZQ_U, VCLZQ_S.
9943         (VCLZQ): Remove.
9944         * config/arm/mve.md (mve_vclzq_<supf><mode>): Add '@' prefix,
9945         remove <supf> iterator.
9946         (mve_vclzq_u<mode>): New.
9947         * config/arm/neon.md (clz<mode>2): Rename to neon_vclz<mode>.
9948         (neon_vclz<mode): Move to ...
9949         * config/arm/unspecs.md (VCLZQ_U, VCLZQ_S): Remove.
9950         * config/arm/vec-common.md: ... here. Add support for MVE.
9951
9952 2021-06-09  Christophe Lyon  <christophe.lyon@linaro.org>
9953
9954         * config/arm/mve.md (mve_vhaddq_<supf><mode>): Prefix with '@'.
9955         (@mve_vrhaddq_<supf><mode): Likewise.
9956         * config/arm/neon.md (neon_v<r>hadd<sup><mode>): Likewise.
9957         * config/arm/vec-common.md (avg<mode>3_floor, uavg<mode>3_floor)
9958         (avg<mode>3_ceil", uavg<mode>3_ceil): New patterns.
9959
9960 2021-06-09  imba-tjd  <109224573@qq.com>
9961
9962         * doc/invoke.texi: Fix typo.
9963
9964 2021-06-09  Roger Sayle  <roger@nextmovesoftware.com>
9965
9966         PR middle-end/53267
9967         * fold-const-call.c (fold_const_call_sss) [CASE_CFN_FMOD]:
9968         Support evaluation of fmod/fmodf/fmodl at compile-time.
9969
9970 2021-06-09  Richard Biener  <rguenther@suse.de>
9971
9972         PR tree-optimization/100981
9973         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
9974         gimple_get_lhs to also handle calls.
9975         * tree-vect-slp-patterns.c (complex_pattern::build): Transfer
9976         reduction info.
9977
9978 2021-06-09  Richard Biener  <rguenther@suse.de>
9979
9980         PR tree-optimization/97832
9981         * tree-vectorizer.h (_slp_tree::failed): New.
9982         * tree-vect-slp.c (_slp_tree::_slp_tree): Initialize
9983         failed member.
9984         (_slp_tree::~_slp_tree): Free failed.
9985         (vect_build_slp_tree): Retain failed nodes and record
9986         matches in them, copying that back out when running
9987         into a cached fail.  Dump start and end of discovery.
9988         (dt_sort_cmp): New.
9989         (vect_build_slp_tree_2): Handle associatable chains
9990         together doing more aggressive operand swapping.
9991
9992 2021-06-09  H.J. Lu  <hjl.tools@gmail.com>
9993
9994         PR target/100896
9995         * config.gcc (gcc_cv_initfini_array): Set to yes for Linux and
9996         GNU targets.
9997         * doc/install.texi: Require glibc 2.1 and binutils 2.12 for
9998         Linux and GNU targets.
9999
10000 2021-06-09  Richard Biener  <rguenther@suse.de>
10001
10002         * tree-vect-stmts.c (vect_is_simple_use): Always get dt
10003         from the stmt.
10004
10005 2021-06-09  Claudiu Zissulescu  <claziss@synopsys.com>
10006
10007         * config/arc/arc.md (loop_end): Change it to
10008         define_insn_and_split.
10009
10010 2021-06-09  Claudiu Zissulescu  <claziss@synopsys.com>
10011
10012         * config/arc/arc.md (maddhisi4): Use VMAC2H instruction.
10013         (machi): New pattern.
10014         (umaddhisi4): Use VMAC2HU instruction.
10015         (umachi): New pattern.
10016
10017 2021-06-09  Claudiu Zissulescu  <claziss@synopsys.com>
10018
10019         * config/arc/arc-protos.h (arc_split_move_p): New prototype.
10020         * config/arc/arc.c (arc_split_move_p): New function.
10021         (arc_split_move): Clean up.
10022         * config/arc/arc.md (movdi_insn): Clean up, use arc_split_move_p.
10023         (movdf_insn): Likewise.
10024         * config/arc/simdext.md (mov<VWH>_insn): Likewise.
10025
10026 2021-06-09  Uroš Bizjak  <ubizjak@gmail.com>
10027
10028         PR target/100936
10029         * config/i386/i386.c (print_operand_address_as): Rename "no_rip"
10030         argument to "raw".  Do not emit segment overrides when "raw" is true.
10031
10032 2021-06-09  Martin Liska  <mliska@suse.cz>
10033
10034         * doc/gcov.texi: Create a proper JSON files.
10035         * doc/invoke.texi: Remove dots in order to make it a valid
10036         JSON object.
10037
10038 2021-06-09  Xionghu Luo  <luoxhu@linux.ibm.com>
10039
10040         * config/rs6000/rs6000-p8swap.c (pattern_is_rotate64): New.
10041         (insn_is_load_p): Use pattern_is_rotate64.
10042         (insn_is_swap_p): Likewise.
10043         (quad_aligned_load_p): Likewise.
10044         (const_load_sequence_p): Likewise.
10045         (replace_swapped_aligned_load): Likewise.
10046         (recombine_lvx_pattern): Likewise.
10047         (recombine_stvx_pattern): Likewise.
10048
10049 2021-06-09  Andrew MacLeod  <amacleod@redhat.com>
10050
10051         * gimple-range-gori.cc (gori_compute::outgoing_edge_range_p): Use a
10052         fur_stmt source record.
10053         * gimple-range.cc (fur_source::get_operand): Generic range query.
10054         (fur_source::get_phi_operand): New.
10055         (fur_source::register_dependency): New.
10056         (fur_source::query): New.
10057         (class fur_edge): New.  Edge source for operands.
10058         (fur_edge::fur_edge): New.
10059         (fur_edge::get_operand): New.
10060         (fur_edge::get_phi_operand): New.
10061         (fur_edge::query): New.
10062         (fur_stmt::fur_stmt): New.
10063         (fur_stmt::get_operand): New.
10064         (fur_stmt::get_phi_operand): New.
10065         (fur_stmt::query): New.
10066         (class fur_depend): New.  Statement source and process dependencies.
10067         (fur_depend::fur_depend): New.
10068         (fur_depend::register_dependency): New.
10069         (class fur_list): New.  List source for operands.
10070         (fur_list::fur_list): New.
10071         (fur_list::get_operand): New.
10072         (fur_list::get_phi_operand): New.
10073         (fold_range): New.  Instantiate appropriate fur_source class and fold.
10074         (fold_using_range::range_of_range_op): Use new API.
10075         (fold_using_range::range_of_address): Ditto.
10076         (fold_using_range::range_of_phi): Ditto.
10077         (imple_ranger::fold_range_internal): Use fur_depend class.
10078         (fold_using_range::range_of_ssa_name_with_loop_info): Use new API.
10079         * gimple-range.h (class fur_source): Now a base class.
10080         (class fur_stmt): New.
10081         (fold_range): New prototypes.
10082         (fur_source::fur_source): Delete.
10083
10084 2021-06-08  Andrew Pinski  <apinski@marvell.com>
10085
10086         PR tree-optimization/25290
10087         * tree-ssa-phiopt.c (xor_replacement): Delete.
10088         (tree_ssa_phiopt_worker): Delete use of xor_replacement.
10089         (match_simplify_replacement): Allow one cheap preparation
10090         statement that can be moved to before the if.
10091
10092 2021-06-08  Pat Haugen  <pthaugen@linux.ibm.com>
10093
10094         * config/rs6000/power10.md (power10-fused-load, power10-fused-store,
10095         power10-fused_alu, power10-fused-vec, power10-fused-branch): New.
10096
10097 2021-06-08  Jeff Law  <jeffreyalaw@gmail.com>
10098
10099         * config/h8300/logical.md (andqi3_1): Move BCLR case into define_insn_and_split.
10100         Create length attribute on define_insn_and_split.  Only split for cases which we
10101         know will use AND.
10102         (andqi3_1<cczn>): Renamed from andqi3_1_clobber_flags.  Only handle AND here and
10103         fix length computation.
10104         (b<code><mode>msx): Combine QImode and HImode H8/SX patterns using iterator.
10105
10106 2021-06-08  Richard Biener  <rguenther@suse.de>
10107
10108         PR tree-optimization/100923
10109         * tree-ssa-sccvn.c (valueize_refs_1): Take a pointer to
10110         the operand vector to be valueized.
10111         (valueize_refs): Likewise.
10112         (valueize_shared_reference_ops_from_ref): Adjust.
10113         (valueize_shared_reference_ops_from_call): Likewise.
10114         (vn_reference_lookup_3): Likewise.
10115         (vn_reference_lookup_pieces): Likewise.  Re-valueize
10116         with honoring availability when we are about to create
10117         the ao_ref and valueized before.
10118         (vn_reference_lookup): Likewise.
10119         (vn_reference_insert_pieces): Adjust.
10120
10121 2021-06-08  Richard Biener  <rguenther@suse.de>
10122
10123         * tree-vectorizer.h (_slp_instance::root_stmt): Change to...
10124         (_slp_instance::root_stmts): ... a vector.
10125         (SLP_INSTANCE_ROOT_STMT): Rename to ...
10126         (SLP_INSTANCE_ROOT_STMTS): ... this.
10127         (slp_root::root): Change to...
10128         (slp_root::roots): ... a vector.
10129         (slp_root::slp_root): Adjust.
10130         * tree-vect-slp.c (_slp_instance::location): Adjust.
10131         (vect_free_slp_instance): Release the root stmt vector.
10132         (vect_build_slp_instance): Adjust.
10133         (vect_analyze_slp): Likewise.
10134         (_bb_vec_info::~_bb_vec_info): Likewise.
10135         (vect_slp_analyze_operations): Likewise.
10136         (vect_bb_vectorization_profitable_p): Likewise.  Adjust
10137         costs for the root stmt.
10138         (vect_slp_check_for_constructors): Gather all BIT_INSERT_EXPRs
10139         as root stmts.
10140         (vect_slp_analyze_bb_1): Simplify by marking all root stmts
10141         as pure_slp.
10142         (vectorize_slp_instance_root_stmt): Adjust.
10143         (vect_schedule_slp): Likewise.
10144
10145 2021-06-08  Aldy Hernandez  <aldyh@redhat.com>
10146
10147         * gimple-ssa-evrp.c (class ssa_equiv_stack): New.
10148         (ssa_equiv_stack::ssa_equiv_stack): New.
10149         (ssa_equiv_stack::~ssa_equiv_stack): New.
10150         (ssa_equiv_stack::enter): New.
10151         (ssa_equiv_stack::leave): New.
10152         (ssa_equiv_stack::push_replacement): New.
10153         (ssa_equiv_stack::get_replacement): New.
10154         (is_pointer_ssa): New.
10155         (class pointer_equiv_analyzer): New.
10156         (pointer_equiv_analyzer::pointer_equiv_analyzer): New.
10157         (pointer_equiv_analyzer::~pointer_equiv_analyzer): New.
10158         (pointer_equiv_analyzer::set_global_equiv): New.
10159         (pointer_equiv_analyzer::set_cond_equiv): New.
10160         (pointer_equiv_analyzer::get_equiv): New.
10161         (pointer_equiv_analyzer::enter): New.
10162         (pointer_equiv_analyzer::leave): New.
10163         (pointer_equiv_analyzer::get_equiv_expr): New.
10164         (pta_valueize): New.
10165         (pointer_equiv_analyzer::visit_stmt): New.
10166         (pointer_equiv_analyzer::visit_edge): New.
10167         (hybrid_folder::value_of_expr): Call PTA.
10168         (hybrid_folder::value_on_edge): Same.
10169         (hybrid_folder::pre_fold_bb): New.
10170         (hybrid_folder::post_fold_bb): New.
10171         (hybrid_folder::pre_fold_stmt): New.
10172         (rvrp_folder::pre_fold_bb): New.
10173         (rvrp_folder::post_fold_bb): New.
10174         (rvrp_folder::pre_fold_stmt): New.
10175         (rvrp_folder::value_of_expr): Call PTA.
10176         (rvrp_folder::value_on_edge): Same.
10177
10178 2021-06-08  Jakub Jelinek  <jakub@redhat.com>
10179
10180         PR c++/100957
10181         * tree-inline.c (copy_tree_body_r): For OMP_CLAUSE_DEPEND don't
10182         check TREE_CODE if OMP_CLAUSE_DECL is NULL.
10183
10184 2021-06-08  Richard Biener  <rguenther@suse.de>
10185
10186         PR middle-end/100951
10187         * tree-vect-generic.c (expand_vector_piecewise): Build a
10188         VECTOR_CST if all elements are constant.
10189         (expand_vector_condition): Likewise.
10190         (lower_vec_perm): Likewise.
10191         (expand_vector_conversion): Likewise.
10192
10193 2021-06-08  Martin Liska  <mliska@suse.cz>
10194
10195         * doc/invoke.texi: Document new param evrp-sparse-threshold.
10196
10197 2021-06-08  Martin Liska  <mliska@suse.cz>
10198
10199         * genautomata.c (create_automata): Fix typo.
10200
10201 2021-06-08  Kewen Lin  <linkw@linux.ibm.com>
10202
10203         PR tree-optimization/100794
10204         * tree-predcom.c (tree_predictive_commoning_loop): Add parameter
10205         allow_unroll_p and only allow unrolling when it's true.
10206         (tree_predictive_commoning): Add parameter allow_unroll_p and
10207         adjust for it.
10208         (run_tree_predictive_commoning): Likewise.
10209         (pass_predcom::gate): Check flag_tree_loop_vectorize and
10210         global_options_set.x_flag_predictive_commoning.
10211         (pass_predcom::execute): Adjust for allow_unroll_p.
10212
10213 2021-06-08  Kewen Lin  <linkw@linux.ibm.com>
10214
10215         * tree-predcom.c (execute_pred_commoning): Remove update_ssa call.
10216         (tree_predictive_commoning_loop): Factor some cleanup stuffs into
10217         lambda function cleanup, remove scev_reset call, and adjust return
10218         value.
10219         (tree_predictive_commoning): Adjust for different changed values,
10220         only set flag TODO_update_ssa_only_virtuals if changed.
10221         (pass_data pass_data_predcom): Remove TODO_update_ssa_only_virtuals
10222         from todo_flags_finish.
10223
10224 2021-06-07  Andrew MacLeod  <amacleod@redhat.com>
10225
10226         * gimple-range-cache.cc (class sbr_sparse_bitmap): New.
10227         (sbr_sparse_bitmap::sbr_sparse_bitmap): New.
10228         (sbr_sparse_bitmap::bitmap_set_quad): New.
10229         (sbr_sparse_bitmap::bitmap_get_quad): New.
10230         (sbr_sparse_bitmap::set_bb_range): New.
10231         (sbr_sparse_bitmap::get_bb_range): New.
10232         (sbr_sparse_bitmap::bb_range_p): New.
10233         (block_range_cache::block_range_cache): initialize bitmap obstack.
10234         (block_range_cache::~block_range_cache): Destruct obstack.
10235         (block_range_cache::set_bb_range): Decide when to utilze the
10236         sparse on entry cache.
10237         * gimple-range-cache.h (block_range_cache): Add bitmap obstack.
10238         * params.opt (-param=evrp-sparse-threshold): New.
10239
10240 2021-06-07  Andrew MacLeod  <amacleod@redhat.com>
10241
10242         * bitmap.c (bitmap_set_aligned_chunk): New.
10243         (bitmap_get_aligned_chunk): New.
10244         (test_aligned_chunk): New.
10245         (bitmap_c_tests): Call test_aligned_chunk.
10246         * bitmap.h (bitmap_set_aligned_chunk, bitmap_get_aligned_chunk): New.
10247
10248 2021-06-07  Uroš Bizjak  <ubizjak@gmail.com>
10249
10250         PR target/100637
10251         * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate):
10252         Handle V4QI mode.
10253         (ix86_expand_vector_init_one_nonzero): Ditto.
10254         (ix86_expand_vector_init_one_var): Ditto.
10255         (ix86_expand_vector_init_general): Ditto.
10256         * config/i386/mmx.md (vec_initv4qiqi): New expander.
10257
10258 2021-06-07  Jeff Law  <jeffreyalaw@gmail.com>
10259
10260         * config/h8300/movepush.md: Change most _clobber_flags
10261         patterns to instead use <cczn> subst.
10262         (movsi_cczn): New pattern with usable CC cases split out.
10263         (movsi_h8sx_cczn): Likewise.
10264
10265 2021-06-07  Martin Liska  <mliska@suse.cz>
10266
10267         * common/common-target.def: Split long lines and replace them
10268         with '\n\'.
10269         * target.def: Likewise.
10270         * doc/tm.texi: Re-generated.
10271
10272 2021-06-07  Jakub Jelinek  <jakub@redhat.com>
10273
10274         PR target/100887
10275         * fold-const.c (fold_read_from_vector): Return NULL if trying to
10276         read from a CONSTRUCTOR with vector type elements.
10277
10278 2021-06-07  Jakub Jelinek  <jakub@redhat.com>
10279
10280         PR middle-end/100898
10281         * tree-inline.c (copy_bb): Only use gimple_call_arg_ptr if memcpy
10282         should copy any arguments.  Don't call gimple_call_num_args
10283         on id->call_stmt or call_stmt more than once.
10284
10285 2021-06-07  liuhongt  <hongtao.liu@intel.com>
10286
10287         PR target/100885
10288         * config/i386/sse.md (*sse4_1_zero_extendv8qiv8hi2_3): Refine
10289         constraints.
10290         (<insn>v4siv4di2): Delete constraints for define_expand.
10291
10292 2021-06-07  liuhongt  <hongtao.liu@intel.com>
10293
10294         PR target/82735
10295         * config/i386/i386-expand.c (ix86_expand_builtin): Remove
10296         assignment of cfun->machine->has_explicit_vzeroupper.
10297         * config/i386/i386-features.c
10298         (ix86_add_reg_usage_to_vzerouppers): Delete.
10299         (ix86_add_reg_usage_to_vzeroupper): Ditto.
10300         (rest_of_handle_insert_vzeroupper): Remove
10301         ix86_add_reg_usage_to_vzerouppers, add df_analyze at the end
10302         of the function.
10303         (gate): Remove cfun->machine->has_explicit_vzeroupper.
10304         * config/i386/i386-protos.h (ix86_expand_avx_vzeroupper):
10305         Declared.
10306         * config/i386/i386.c (ix86_insn_callee_abi): New function.
10307         (ix86_initialize_callee_abi): Ditto.
10308         (ix86_expand_avx_vzeroupper): Ditto.
10309         (ix86_hard_regno_call_part_clobbered): Adjust for vzeroupper
10310         ABI.
10311         (TARGET_INSN_CALLEE_ABI): Define as ix86_insn_callee_abi.
10312         (ix86_emit_mode_set): Call ix86_expand_avx_vzeroupper
10313         directly.
10314         * config/i386/i386.h (struct GTY(()) machine_function): Delete
10315         has_explicit_vzeroupper.
10316         * config/i386/i386.md (enum unspec): New member
10317         UNSPEC_CALLEE_ABI.
10318         (ABI_DEFAULT,ABI_VZEROUPPER,ABI_UNKNOWN): New
10319         define_constants for insn callee abi index.
10320         * config/i386/predicates.md (vzeroupper_pattern): Adjust.
10321         * config/i386/sse.md (UNSPECV_VZEROUPPER): Deleted.
10322         (avx_vzeroupper): Call ix86_expand_avx_vzeroupper.
10323         (*avx_vzeroupper): Rename to ..
10324         (avx_vzeroupper_callee_abi): .. this, and adjust pattern as
10325         call_insn which has a special vzeroupper ABI.
10326         (*avx_vzeroupper_1): Deleted.
10327
10328 2021-06-07  liuhongt  <hongtao.liu@intel.com>
10329
10330         PR target/82735
10331         * df-scan.c (df_get_call_refs): When call_insn is a fake call,
10332         it won't use stack pointer reg.
10333         * final.c (leaf_function_p): When call_insn is a fake call, it
10334         won't affect caller as a leaf function.
10335         * reg-stack.c (callee_clobbers_any_stack_reg): New.
10336         (subst_stack_regs): When call_insn doesn't clobber any stack
10337         reg, don't clear the arguments.
10338         * rtl.c (shallow_copy_rtx): Don't clear flag used when orig is
10339         a insn.
10340         * shrink-wrap.c (requires_stack_frame_p): No need for stack
10341         frame for a fake call.
10342         * rtl.h (FAKE_CALL_P): New macro.
10343
10344 2021-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10345
10346         * config/sparc/sparc-protos.h (order_regs_for_local_alloc): Rename
10347         to...
10348         (sparc_order_regs_for_local_alloc): ...this.
10349         (sparc_leaf_reg_remap): Declare.
10350         * config/sparc/sparc.h (ADJUST_REG_ALLOC_ORDER): Adjust.
10351         (LEAF_REG_REMAP): Reimplement as call to sparc_leaf_reg_remap.
10352         * config/sparc/sparc.c (leaf_reg_remap): Delete.
10353         (order_regs_for_local_alloc): Rename to...
10354         (sparc_order_regs_for_local_alloc): ...this.
10355         (sparc_leaf_reg_remap): New function.
10356         (sparc_conditional_register_usage): Do not modify leaf_reg_remap.
10357
10358 2021-06-06  David Edelsohn  <dje.gcc@gmail.com>
10359
10360         * config/rs6000/rs6000.c (rs6000_xcoff_asm_output_aligned_decl_common):
10361         Use assemble_name to output BSS section name.
10362
10363 2021-06-06  Uroš Bizjak  <ubizjak@gmail.com>
10364
10365         * config/i386/constraints.md (Bs):
10366         Remove boolean operators from match_test RTX.
10367         (Bw): Ditto.
10368         (L): Ditto.
10369         (M): Use "mode" variable instead of GET_MODE (op) in match_test RTX.
10370         (Wz): Ditto.
10371
10372 2021-06-06  Martin Liska  <mliska@suse.cz>
10373
10374         * doc/extend.texi: Add missing @headitem.
10375         * doc/invoke.texi: Likewise.
10376         * doc/objc.texi: Likewise.
10377
10378 2021-06-06  Martin Liska  <mliska@suse.cz>
10379
10380         * genhooks.c (emit_findices): Remove unused function.
10381         (emit_documentation): Do not call emit_findices
10382         and do not search for @Fcode directives.
10383
10384 2021-06-06  Martin Liska  <mliska@suse.cz>
10385
10386         * doc/invoke.texi: Remove extra character.
10387
10388 2021-06-05  Kewen Lin  <linkw@linux.ibm.com>
10389
10390         * config/sh/sh.md (doloop_end_split): Fix empty split condition.
10391
10392 2021-06-05  Kewen Lin  <linkw@linux.ibm.com>
10393
10394         * config/sparc/sparc.md (*snedi<W:mode>_zero_vis3,
10395         *neg_snedi<W:mode>_zero_subxc, *plus_snedi<W:mode>_zero,
10396         *plus_plus_snedi<W:mode>_zero, *minus_snedi<W:mode>_zero,
10397         *minus_minus_snedi<W:mode>_zero): Fix empty split condition.
10398
10399 2021-06-05  Kewen Lin  <linkw@linux.ibm.com>
10400
10401         * config/or1k/or1k.md (*movdi): Fix empty split condition.
10402
10403 2021-06-05  Kewen Lin  <linkw@linux.ibm.com>
10404
10405         * config/mips/mips.md (<anonymous>, bswapsi2, bswapdi2): Fix empty
10406         split condition.
10407
10408 2021-06-05  Kewen Lin  <linkw@linux.ibm.com>
10409
10410         * config/m68k/m68k.md (*zero_extend_inc, *zero_extend_dec,
10411         *zero_extendsidi2): Fix empty split condition.
10412
10413 2021-06-05  Jeff Law  <jeffreyalaw@gmail.com>
10414
10415         * config/h8300/addsub.md: Fix split condition in define_insn_and_split
10416         patterns.
10417         * config/h8300/bitfield.md: Likewise.
10418         * config/h8300/combiner.md: Likewise.
10419         * config/h8300/divmod.md: Likewise.
10420         * config/h8300/extensions.md: Likewise.
10421         * config/h8300/jumpcall.md: Likewise.
10422         * config/h8300/movepush.md: Likewise.
10423         * config/h8300/multiply.md: Likewise.
10424         * config/h8300/other.md: Likewise.
10425         * config/h8300/shiftrotate.md: Likewise.
10426         * config/h8300/logical.md: Likewise.  Fix split pattern to use
10427         code iterator that somehow slipped through.
10428
10429 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
10430
10431         PR middle-end/100905
10432         * tree-nested.c (convert_nonlocal_omp_clauses,
10433         convert_local_omp_clauses): Handle OMP_CLAUSE_BIND.
10434
10435 2021-06-04  Martin Sebor  <msebor@redhat.com>
10436
10437         PR middle-end/100732
10438         * gimple-fold.c (gimple_fold_builtin_sprintf): Avoid folding calls
10439         with either source or destination argument of invalid type.
10440         * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Avoid checking
10441         calls with arguments of invalid type.
10442
10443 2021-06-04  Martin Sebor  <msebor@redhat.com>
10444
10445         * attribs.c (init_attr_rdwr_indices): Use VLA bounds in the expected
10446         order.
10447         (attr_access::vla_bounds): Also handle VLA bounds.
10448
10449 2021-06-04  Uroš Bizjak  <ubizjak@gmail.com>
10450
10451         * config/i386/predicates.md (GOT_memory_operand):
10452         Implement using match_code RTXes.
10453         (GOT32_symbol_operand): Ditto.
10454
10455 2021-06-04  Uroš Bizjak  <ubizjak@gmail.com>
10456
10457         PR target/100637
10458         * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate):
10459         Handle V2HI mode.
10460         (ix86_expand_vector_init_general): Ditto.
10461         Use SImode instead of word_mode for logic operations
10462         when GET_MODE_SIZE (mode) < UNITS_PER_WORD.
10463         (expand_vec_perm_even_odd_1): Assert that V2HI mode should be
10464         implemented by expand_vec_perm_1.
10465         (expand_vec_perm_broadcast_1): Assert that V2HI and V4HI modes
10466         should be implemented using standard shuffle patterns.
10467         (ix86_vectorize_vec_perm_const): Handle V2HImode.  Add V4HI and
10468         V2HI modes to modes, implementable with shuffle for one operand.
10469         * config/i386/mmx.md (*punpckwd): New insn_and_split pattern.
10470         (*pshufw_1): New insn pattern.
10471         (*vec_dupv2hi): Ditto.
10472         (vec_initv2hihi): New expander.
10473
10474 2021-06-04  Kewen Lin  <linkw@linux.ibm.com>
10475
10476         * config/arm/vfp.md (no_literal_pool_df_immediate,
10477         no_literal_pool_sf_immediate): Fix empty split condition.
10478
10479 2021-06-04  Kewen Lin  <linkw@linux.ibm.com>
10480
10481         * config/i386/i386.md (*load_tp_x32_zext, *add_tp_x32_zext,
10482         *tls_dynamic_gnu2_combine_32): Fix empty split condition.
10483         * config/i386/sse.md (*<sse2_avx2>_pmovmskb_lt,
10484         *<sse2_avx2>_pmovmskb_zext_lt, *sse2_pmovmskb_ext_lt,
10485         *<sse4_1_avx2>_pblendvb_lt): Likewise.
10486
10487 2021-06-04  Jakub Jelinek  <jakub@redhat.com>
10488
10489         PR target/100887
10490         * config/i386/i386-expand.c (ix86_expand_vector_init): Handle
10491         concatenation from half-sized modes with TImode elements.
10492
10493 2021-06-04  Claudiu Zissulescu  <claziss@synopsys.com>
10494
10495         * config/arc/arc.c (arc_override_options): Disable millicode
10496         thunks when RF16 is on.
10497
10498 2021-06-04  Haochen Gui  <guihaoc@gcc.gnu.org>
10499
10500         * config/rs6000/rs6000.h (PROMOTE_MODE): Remove.
10501
10502 2021-06-04  Haochen Gui  <guihaoc@gcc.gnu.org>
10503
10504         * config/rs6000/rs6000-call.c (rs6000_promote_function_mode):
10505         Replace PROMOTE_MODE marco with its content.
10506
10507 2021-06-03  Kewen Lin  <linkw@linux.ibm.com>
10508
10509         * config/cris/cris.md (*addi_reload): Fix empty split condition.
10510
10511 2021-06-03  Jim Wilson  <jimw@sifive.com>
10512
10513         * config.gcc (riscv*-*-*): If --with-riscv-attribute not used,
10514         turn it on for all riscv targets.
10515
10516 2021-06-03  Uroš Bizjak  <ubizjak@gmail.com>
10517
10518         PR target/100637
10519         * config/i386/i386-expand.c (ix86_expand_vector_set):
10520         Handle V2HI and V4QI modes.
10521         (ix86_expand_vector_extract): Ditto.
10522         * config/i386/mmx.md (*pinsrw): New insn pattern.
10523         (*pinsrb): Ditto.
10524         (*pextrw): Ditto.
10525         (*pextrw_zext): Ditto.
10526         (*pextrb): Ditto.
10527         (*pextrb_zext): Ditto.
10528         (vec_setv2hi): New expander.
10529         (vec_extractv2hihi): Ditto.
10530         (vec_setv4qi): Ditto.
10531         (vec_extractv4qiqi): Ditto.
10532         (vec_setv8qi): Enable only for TARGET_SSE4_1.
10533         (vec_extractv8qiqi): Ditto.
10534
10535 2021-06-03  Aaron Sawdey  <acsawdey@linux.ibm.com>
10536
10537         * config/rs6000/genfusion.pl (gen_logical_addsubf): Fix input
10538         order to subf instruction.
10539         * config/rs6000/fusion.md: Regenerate.
10540
10541 2021-06-03  Aldy Hernandez  <aldyh@redhat.com>
10542
10543         * calls.c (get_size_range): Use range_of_expr instead of
10544         determine_value_range.
10545         * tree-affine.c (expr_to_aff_combination): Same.
10546         * tree-data-ref.c (split_constant_offset): Same.
10547         * tree-vrp.c (determine_value_range_1): Remove.
10548         (determine_value_range): Remove.
10549         * tree-vrp.h (determine_value_range): Remove.
10550
10551 2021-06-03  Aldy Hernandez  <aldyh@redhat.com>
10552
10553         * function-tests.c (test_ranges): Call gimple_range_tests.
10554         * gimple-range-cache.cc (ranger_cache::range_of_expr): Pass stmt
10555         to get_tree_range.
10556         * gimple-range.cc (fur_source::get_operand): Do not call
10557         get_tree_range or gimple_range_global.
10558         get_tree_range.
10559         (get_tree_range): Move to value-query.cc.
10560         Call get_arith_expr_range.
10561         (gimple_ranger::range_of_expr): Add argument to get_tree_range.
10562         Include gimple-range-tests.cc.
10563         * gimple-range.h (fold_range): Add argument.
10564         (get_tree_range): Remove.
10565         * selftest.h (gimple_range_tests): New.
10566         * value-query.cc (global_range_query::range_of_expr): Add
10567         stmt argument.
10568         (range_query::get_tree_range): Move from gimple-range.cc.
10569         * value-query.h (class range_query): Add get_tree_range and
10570         get_arith_expr_range.  Make fur_source a friend.
10571         * vr-values.c (vr_values::range_of_expr): Pass stmt to
10572         get_tree_range.
10573         * gimple-range-tests.cc: New file.
10574
10575 2021-06-03  Aldy Hernandez  <aldyh@redhat.com>
10576
10577         * gimple-range.cc (gimple_ranger::export_global_ranges): Call
10578           update_global_range.
10579         * value-query.cc (update_global_range): New.
10580         * value-query.h (update_global_range): New.
10581
10582 2021-06-03  David Malcolm  <dmalcolm@redhat.com>
10583
10584         * diagnostic-show-locus.c (diagnostic_show_locus): Don't reject
10585         printing the same location twice if there are fix-it hints,
10586         multiple locations, or a label.
10587
10588 2021-06-03  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10589
10590         * tree-vect-loop.c (vect_transform_loop): Use main loop's various'
10591         thresholds to narrow the upper bound on epilogue iterations.
10592
10593 2021-06-03  Christophe Lyon  <christophe.lyon@linaro.org>
10594
10595         * config/arm/mve.md (mve_vabsq_f<mode>): Use 'abs' instead of unspec.
10596         (mve_vabsq_s<mode>): Likewise.
10597         * config/arm/neon.md (abs<mode>2): Rename to neon_abs<mode>2.
10598         * config/arm/unspecs.md (VABSQ_F, VABSQ_S): Delete.
10599         * config/arm/vec-common.md (neg<mode>2): Rename to
10600         <absneg_str><mode>2.
10601
10602 2021-06-03  Claudiu Zissulescu  <claziss@synopsys.com>
10603
10604         * common/config/arc/arc-common.c (arc_option_optimization_table):
10605         Remove malign-call.
10606         * config/arc/arc.c (arc_unalign_branch_p): Remove unused function.
10607         * config/arc/arc.h (TARGET_MIXED_CODE): Remove macro.
10608         (INDEX_REG_CLASS): Only refer to GENERAL_REGS.
10609         * config/arc/arc.md (abssi2_mixed): Remove pattern.
10610         * config/arc/arc.opt (munalign-prob-threshold): Mark it obsolete.
10611         (malign-call): Likewise.
10612         (mmixed-code): Likewise.
10613         * doc/invoke.texi (ARC): Update doc.
10614
10615 2021-06-03  Martin Liska  <mliska@suse.cz>
10616
10617         * common.opt: Use proper Enum values.
10618         * opts.c (COVERAGE_SANITIZER_OPT): Remove.
10619         (parse_sanitizer_options): Handle only sanitizer_opts.
10620         (common_handle_option): Just assign value.
10621
10622 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10623
10624         PR ipa/99122
10625         * tree-inline.c (inline_forbidden_p): Remove test on return type.
10626
10627 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10628
10629         * dwarf2out.c (loc_list_from_tree_1) <FUNCTION_DECL>: Also generate
10630         DW_OP_GNU_variable_value referencing an existing DIE at file scope.
10631         (type_byte_size): Inline into...
10632         (add_byte_size_attribute): ...this and call add_scalar_info.
10633
10634 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10635
10636         * dwarf2out.c (mem_loc_descriptor) <UDIV>: Fix typo.
10637         (typed_binop_from_tree): New function.
10638         (loc_list_from_tree_1) <EXACT_DIV_EXPR>: For an unsigned type,
10639         turn a divide by a power of 2 into a shift.
10640         <CEIL_DIV_EXPR>: For an unsigned type, use a signed divide if the
10641         size of the mode is lower than DWARF2_ADDR_SIZE; otherwise, do a
10642         typed divide by calling typed_binop_from_tree.
10643
10644 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10645
10646         * dwarf2out.c (scompare_loc_descriptor): Fix head comment.
10647         (is_handled_procedure_type): Likewise.
10648         (struct loc_descr_context): Add strict_signedness field.
10649         (resolve_args_picking_1): Deal with DW_OP_[GNU_]deref_type,
10650         DW_OP_[GNU_]convert and DW_OP_[GNU_]reinterpret.
10651         (resolve_args_picking): Minor tweak.
10652         (function_to_dwarf_procedure): Initialize strict_signedness field.
10653         (type_byte_size): Likewise.
10654         (field_byte_offset): Likewise.
10655         (gen_descr_array_type_die): Likewise.
10656         (gen_variant_part): Likewise.
10657         (loc_list_from_tree_1) <CALL_EXPR>: Tidy up and set strict_signedness
10658         to true when a context is present before evaluating the arguments.
10659         <COND_EXPR>: Do not generate a useless comparison with zero.
10660         When dereferencing an address, if strict_signedness is true and the
10661         type is small and signed, use DW_OP_deref_type to do the dereference
10662         and then DW_OP_convert to convert back to the generic type.
10663
10664 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
10665
10666         PR c++/100859
10667         * tree-inline.c (copy_tree_body_r): Handle iterators on
10668         OMP_CLAUSE_AFFINITY or OMP_CLAUSE_DEPEND.
10669
10670 2021-06-03  Kewen Lin  <linkw@linux.ibm.com>
10671
10672         * config/arc/arc.md (*bbit_di): Remove.
10673
10674 2021-06-02  Christoph Muellner  <cmuellner@gcc.gnu.org>
10675
10676         PR rtl-optimization/100264
10677         * ree.c (get_sub_rtx): Ignore SET expressions without register
10678         destinations and remove assertion, as it is not valid anymore
10679         with this new behaviour.
10680         (merge_def_and_ext): Eliminate destination check for register
10681         as such SET expressions can't occur anymore.
10682         (combine_reaching_defs): Likewise.
10683
10684 2021-06-02  Jakub Jelinek  <jakub@redhat.com>
10685
10686         PR target/100841
10687         * config/xtensa/xtensa.h (LEAF_REG_REMAP): Cast REGNO to int to avoid
10688         -Wtype-limits warnings.
10689         (DWARF_FRAME_REGISTER): Rewrite into ternary operator with addition
10690         in operands to avoid -Wsign-compare warnings.
10691
10692 2021-06-02  Pat Haugen  <pthaugen@linux.ibm.com>
10693
10694         * config/rs6000/rs6000-logue.c (rs6000_emit_prologue): Use
10695         gen_frame_store.
10696
10697 2021-06-02  Vineet Gupta  <vgupta@synopsys.com>
10698
10699         * config/arc/arc.h (TARGET_CPU_DEFAULT): Change to hs38_linux.
10700
10701 2021-06-02  Ilya Leoshkevich  <iii@linux.ibm.com>
10702
10703         * config/s390/s390.md(*ashrdi3_31<setcc><cconly>): Use a single
10704         constraint.
10705         * config/s390/subst.md(cconly_subst): Use a single constraint
10706         in (match_scratch).
10707
10708 2021-06-02  Martin Liska  <mliska@suse.cz>
10709
10710         * ipa-icf.h: Use auto_vec for memory_access_types.
10711
10712 2021-06-02  Jeff Law  <jeffreyalaw@gmail.com>
10713
10714         * config/h8300/h8300-protos.h (compute_a_shift_length): Drop unused
10715         argument from prototype.
10716         (output_logical_op): Add rtx_code argument.
10717         (compute_logical_op_length): Likewise.
10718         * config/h8300/h8300.c (h8300_and_costs): Pass additional argument
10719         to compute_a_shift_length.
10720         (output_logical_op); New argument with the rtx code rather than
10721         extracting it from an operand.  Handle QImode too.
10722         (compute_logical_op_length): Similary.
10723         (compute_a_shift_length): Drop unused argument.
10724         * config/h8300/h8300.md (logicals): New code iterator.
10725         * config/h8300/logical.md (<code><mode>3 expander): Combine
10726         the "and" expander with the "ior"/"xor" expander.
10727         (bclr<mode>msx): Combine the QI/HI mode patterns.
10728         (<logical><mode>3 insns): Use code iterator rather than match_operator.
10729         Handle QImode as well.   Update call to output_logical_op and
10730         compute_logical_op_length to pass in rtx_code
10731         Fix split condition on all define_insn_and_split patterns.
10732         (one_cmpl<mode>2<cczn>): Use <cczn> to support both clobbering
10733         the flags and setting ZN via existing define_subst.
10734         * config/h8300/shiftrotate.md: Drop unused argument from
10735         calls to compute_a_shift_length.
10736         Signed-off-by: Jeff Law <jeffreyalaw@gmail.com>
10737
10738 2021-06-01  Andrew Pinski  <apinski@marvell.com>
10739
10740         PR tree-optimization/25290
10741         * tree-ssa-phiopt.c (match_simplify_replacement):
10742         New function.
10743         (tree_ssa_phiopt_worker): Use match_simplify_replacement.
10744         (two_value_replacement): Change the comment about
10745         conditional_replacement.
10746         (conditional_replacement): Delete.
10747
10748 2021-06-01  Andrew Pinski  <apinski@marvell.com>
10749
10750         PR tree-optimization/95481
10751         * tree-tailcall.c (find_tail_calls): Handle empty typed
10752         return decls.
10753
10754 2021-06-01  Andrew Pinski  <apinski@marvell.com>
10755
10756         * gimplify.c (zero_sized_field_decl): Delete
10757         (zero_sized_type): Delete
10758         (gimplify_init_ctor_eval): Use is_empty_type instead
10759         of zero_sized_field_decl.
10760         (gimplify_modify_expr): Use is_empty_type instead of
10761         zero_sized_type.
10762
10763 2021-06-01  Jason Merrill  <jason@redhat.com>
10764
10765         PR c++/91859
10766         * tree.h (CALL_FROM_NEW_OR_DELETE_P): Adjust comment.
10767
10768 2021-06-01  Jason Merrill  <jason@redhat.com>
10769
10770         PR c++/94492
10771         * diagnostic.h (warning_enabled_at): Declare.
10772         * diagnostic.c (diagnostic_enabled): Factor out from...
10773         (diagnostic_report_diagnostic): ...here.
10774         (warning_enabled_at): New.
10775
10776 2021-06-01  Aldy Hernandez  <aldyh@redhat.com>
10777
10778         * gimple-ssa-evrp.c: Enable exporting of global ranges.
10779
10780 2021-06-01  Martin Liska  <mliska@suse.cz>
10781
10782         PR other/100826
10783         * doc/invoke.texi: Mention that -fgcse-after-reload
10784         is enabled with -O3.
10785
10786 2021-06-01  liuhongt  <hongtao.liu@intel.com>
10787
10788         PR tree-optimization/98365
10789         * tree-if-conv.c (strip_nop_cond_scalar_reduction): New function.
10790         (is_cond_scalar_reduction): Handle nop_expr in cond scalar reduction.
10791         (convert_scalar_cond_reduction): Ditto.
10792         (predicate_scalar_phi): Ditto.
10793
10794 2021-06-01  Andrew MacLeod  <amacleod@redhat.com>
10795
10796         PR tree-optimization/100781
10797         * gimple-range-cache.cc (ranger_cache::ranger_cache): Enable new
10798         value calculation by default.
10799         (ranger_cache::enable_new_values): New.
10800         (ranger_cache::disable_new_values): New.
10801         (ranger_cache::push_poor_value): Check if new values are allowed.
10802         * gimple-range-cache.h (class ranger_cache): New member/methods.
10803         * gimple-range.cc (gimple_ranger::range_of_expr): Check for debug
10804         statement, and disable/renable new value calculation.
10805
10806 2021-06-01  Andrew MacLeod  <amacleod@redhat.com>
10807
10808         * gimple-range-cache.cc (ranger_cache::ssa_range_in_bb): Delete.
10809         (ranger_cache::range_of_def): New.
10810         (ranger_cache::entry_range): New.
10811         (ranger_cache::exit_range): New.
10812         (ranger_cache::range_of_expr): Adjust.
10813         (ranger_cache::range_on_edge): Adjust.
10814         (ranger_cache::propagate_cache): Call exit_range directly.
10815         * gimple-range-cache.h (class ranger_cache): Adjust.
10816
10817 2021-06-01  Andrew MacLeod  <amacleod@redhat.com>
10818
10819         * gimple-range-cache.cc (ranger_cache::ranger_cache): Adjust for
10820         gori_compute being a member rather than base class.
10821         dervied call to member call.
10822         (ranger_cache::dump): No longer dump gori_map.
10823         (ranger_cache::dump_bb): New.
10824         (ranger_cache::get_non_stale_global_range): Adjust for gori_compute
10825         being a member rather than base class.
10826         (ranger_cache::set_global_range): Ditto.
10827         (ranger_cache::ssa_range_in_bb): Ditto.
10828         (ranger_cache::range_of_expr): New.
10829         (ranger_cache::range_on_edge): New.
10830         (ranger_cache::block_range): Adjust for gori_computes.  Debug changes.
10831         (ranger_cache::propagate_cache):  Adjust debugging output.
10832         (ranger_cache::fill_block_cache): Adjust for gori_computes.  Debug
10833         output changes.
10834         * gimple-range-cache.h (class ranger_cache): Make gori_compute a
10835         member, and inherit from range_query instead.
10836         (ranger_cache::dump_bb): New. split from dump.
10837         * gimple-range-gori.cc (gori_compute::ssa_range_in_bb): Delete.
10838         (gori_compute::expr_range_at_stmt): Delete.
10839         (gori_compute::compute_name_range_op): Delete.
10840         (gori_compute::compute_operand_range_switch): Add fur_source.
10841         (gori_compute::compute_operand_range): Add fur_source param, inline
10842         old compute_name_range_op and optimize_logical_operands.
10843         (struct tf_range): Delete.
10844         (gori_compute::logical_combine): Adjust
10845         (gori_compute::optimize_logical_operands): Delete.
10846         (gori_compute::compute_logical_operands_in_chain): Delete.
10847         (gori_compute::compute_logical_operands): Adjust.
10848         (gori_compute::compute_operand1_range): Adjust to fur_source.
10849         (gori_compute::compute_operand2_range): Ditto.
10850         (gori_compute::compute_operand1_and_operand2_range): Ditto.
10851         (gori_compute::outgoing_edge_range_p): Add range_query parameter,
10852         and adjust to fur_source.
10853         * gimple-range-gori.h (class gori_compute): Simplify and adjust to
10854         range_query and fur_source.
10855         * gimple-range.cc (gimple_ranger::range_on_edge): Query range_on_edge
10856         from the ranger_cache..
10857         (gimple_ranger::fold_range_internal): Adjust to base class change of
10858         ranger_cache.
10859         (gimple_ranger::dump_bb): Adjust dump.
10860         * gimple-range.h (gimple_ranger):export gori computes object.
10861
10862 2021-06-01  Andrew MacLeod  <amacleod@redhat.com>
10863
10864         PR tree-optimization/100774
10865         * gimple-range-cache.cc (ranger_cache::get_non_stale_global_range):
10866         Constant values are also not stale.
10867         (ranger_cache::set_global_range): Range invariant values should also
10868         have the correct timestamp.
10869
10870 2021-05-31  Martin Liska  <mliska@suse.cz>
10871
10872         * tree-streamer-in.c (unpack_ts_function_decl_value_fields):
10873         Unpack FUNCTION_DECL_DECL_TYPE.
10874         * tree-streamer-out.c (pack_ts_function_decl_value_fields):
10875         Stream FUNCTION_DECL_DECL_TYPE instead of
10876         DECL_IS_OPERATOR_NEW_P.
10877         * tree.h (set_function_decl_type): Use FUNCTION_DECL_DECL_TYPE
10878         macro.
10879         (DECL_IS_OPERATOR_NEW_P): Likewise.
10880         (DECL_IS_OPERATOR_DELETE_P): Likewise.
10881         (DECL_LAMBDA_FUNCTION_P): Likewise.
10882
10883 2021-05-31  Richard Biener  <rguenther@suse.de>
10884
10885         PR c++/88601
10886         * internal-fn.c (expand_SHUFFLEVECTOR): Define.
10887         * internal-fn.def (SHUFFLEVECTOR): New.
10888         * internal-fn.h (expand_SHUFFLEVECTOR): Declare.
10889         * doc/extend.texi: Document __builtin_shufflevector.
10890
10891 2021-05-31  Peter Bergner  <bergner@linux.ibm.com>
10892
10893         PR target/99842
10894         * config/rs6000/predicates.md(mma_assemble_input_operand): Allow
10895         indexed form addresses.
10896
10897 2021-05-29  Jeff Law  <jlaw@tachyum.com>
10898
10899         * config/h8300/h8300.c (h8300_emit_stack_adjustment): Drop unused
10900         parameter.  Call callers fixed.
10901         (push): Likewise.
10902         (output_plussi): Add FALLTHRU markers.
10903         (h8300_shift_needs_scratch_p): Add gcc_unreachable marker.
10904
10905 2021-05-29  Jakub Jelinek  <jakub@redhat.com>
10906
10907         PR middle-end/99928
10908         * gimplify.c (gimplify_scan_omp_clauses): For taskloop simd
10909         combined with parallel, make sure to add shared clause to
10910         parallel for explicit linear clause.
10911
10912 2021-05-29  Aldy Hernandez  <aldyh@redhat.com>
10913
10914         PR tree-optimization/100787
10915         * gimple-ssa-evrp.c: Disable exporting of global ranges.
10916
10917 2021-05-28  Jason Merrill  <jason@redhat.com>
10918
10919         * tree-iterator.h (struct tree_stmt_iterator): Add operator++,
10920         operator--, operator*, operator==, and operator!=.
10921         (class tsi_range): New.
10922
10923 2021-05-28  Richard Biener  <rguenther@suse.de>
10924
10925         PR tree-optimization/100778
10926         * tree-vect-slp.c (vect_build_slp_tree_1): Prevent possibly
10927         trapping ops in different BBs.
10928
10929 2021-05-28  Richard Biener  <rguenther@suse.de>
10930
10931         PR ipa/100791
10932         * tree-inline.c (copy_bb): When processing __builtin_va_arg_pack
10933         copy fntype from original call.
10934
10935 2021-05-28  Martin Liska  <mliska@suse.cz>
10936
10937         PR gcov-profile/100751
10938         * doc/gcov.texi: Revert partially a hunk that was wrong.
10939
10940 2021-05-28  Cooper Qu  <cooper.qu@linux.alibaba.com>
10941
10942         * config/csky/csky-linux-elf.h (HAVE_sync_compare_and_swapqi):
10943         Defined.
10944         (HAVE_sync_compare_and_swaphi): Likewise.
10945         (HAVE_sync_compare_and_swapsi): Likewise.
10946
10947 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
10948
10949         PR middle-end/99928
10950         * tree.h (OMP_CLAUSE_MAP_IMPLICIT): Define.
10951
10952 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
10953
10954         * gimplify.c (gimplify_omp_affinity): New.
10955         (gimplify_scan_omp_clauses): Call it; remove affinity clause afterwards.
10956         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_AFFINITY.
10957         * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_AFFINITY.
10958         * tree.c (omp_clause_num_ops, omp_clause_code_name): Add clause.
10959         (walk_tree_1): Handle OMP_CLAUSE_AFFINITY.
10960
10961 2021-05-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
10962             Richard Biener   <rguenther@suse.de>
10963
10964         * match.pd <popcount & / + pattern matching>:
10965         When generating popcount directly fails, try doing it in two halves.
10966
10967 2021-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10968
10969         * Makefile.in (generated_files): Add gimple-match.c and
10970         generic-match.c
10971
10972 2021-05-28  Joern Rennecke  <joern.rennecke@embecosm.com>
10973
10974         * gensupport.c (alter_predicate_for_insn): Handle MATCH_DUP.
10975
10976 2021-05-28  Joern Rennecke  <joern.rennecke@embecosm.com>
10977
10978         * gensupport.c (alter_constraints): Add MATCH_SCRATCH case.
10979
10980 2021-05-28  Kewen Lin  <linkw@linux.ibm.com>
10981
10982         PR tree-optimization/99398
10983         * tree-ssa-forwprop.c (simplify_permutation): Optimize some cases
10984         where the fed operands are CTOR/CST and propagated through
10985         VIEW_CONVERT_EXPR.  Call vec_perm_indices::new_shrunk_vector.
10986         * vec-perm-indices.c (vec_perm_indices::new_shrunk_vector): New
10987         function.
10988         * vec-perm-indices.h (vec_perm_indices::new_shrunk_vector): New
10989         declare.
10990
10991 2021-05-27  Uroš Bizjak  <ubizjak@gmail.com>
10992
10993         * config/i386/mmx.md (addv2sf3): Do not call
10994         ix86_fixup_binary_operands_no_copy.
10995         (subv2sf3): Ditto.
10996         (mulv2sf3): Ditto.
10997         (<smaxmin:code>v2sf3): Ditto.
10998         (<plusminus:insn><MMXMODEI:mode>3): Ditto.
10999         (<plusminus:insn><VI_32:mode>3): Remove expander.
11000         (<plusminus:insn><VI_32:mode>3): Rename from
11001         "*<plusminus:insn><VI_32:mode>3".
11002         (mulv4hi): Do not call ix86_fixup_binary_operands_no_copy.
11003         (mulv2hi3): Remove expander.
11004         (mulv2hi3): Rename from *mulv2hi3.
11005         (<s>mulv2hi3_highpart): Remove expander.
11006         (<s>mulv2hi3_highpart): Rename from *<s>mulv2hi3_highpart.
11007         (<smaxmin:code><MMXMODE14:mode>3): Rename from
11008         "*mmx_<smaxmin:code><MMXMODE14:mode>3".
11009         (<smaxmin:code><SMAXMIN_MMXMODEI:mode>3): Remove expander.
11010         (SMAXMIN_MMXMODEI): Remove mode iterator.
11011         (<smaxmin:code>v4hi3): New expander.
11012         (<smaxmin:code>v4qi3): Rename from *<smaxmin:code>v4qi3.
11013         (<smaxmin:code>v2hi3): Rename from *<smaxmin:code>v2hi3.
11014         (<smaxmin:code><SMAXMIN_VI_32:mode>3): Remove expander.
11015         (SMAXMIN_VI_32): Remove mode iterator.
11016         (<umaxmin:code><MMXMODE24:mode>3): Rename from
11017         "*mmx_<umaxmin:code><MMXMODE24:mode>3".
11018         (<umaxmin:code><UMAXMIN_MMXMODEI:mode>3): Remove expander.
11019         (UMAXMIN_MMXMODEI): Remove mode iterator.
11020         (<umaxmin:code>v8qi3): New expander.
11021         (<umaxmin:code>v4qi3): Rename from *<umaxmin:code>v4qi3.
11022         (<umaxmin:code>v2hi3): Rename from *<umaxmin:code>v2hi3.
11023         (<umaxmin:code><SMAXMIN_VI_32:mode>3): Remove expander.
11024         (UMAXMIN_VI_32): Remove mode iterator.
11025         (<any_shift:insn>v2hi3): Remove expander.
11026         (<any_shift:insn>v2hi3): Rename from *<any_shift:insn>v2hi3.
11027         (<any_logic:code><MMXMODEI:mode>3): Do not call
11028         ix86_fixup_binary_operands_no_copy.
11029         (<any_logic:code><VI_32:mode>3): Remove expander.
11030         (<any_logic:code><VI_32:mode>3): Rename from
11031         "*<any_logic:code><VI_32:mode>3".
11032         (uavg<mode>3_ceil): Do not call ix86_fixup_binary_operands_no_copy.
11033         * config/i386/sse.md (div<VF2:mode>3): Do not call
11034         ix86_fixup_binary_operands_no_copy.
11035         (div<VF1:mode>3): Ditto.
11036         (<maxmin:code><VI8_AVX2_AVX512F:mode>3): Ditto.
11037         (smulhrsv4hi3): Ditto.
11038         (smulhrsv2hi3): Ditto.
11039
11040 2021-05-27  Martin Sebor  <msebor@redhat.com>
11041
11042         * ggc.h (gt_ggc_mx): Add overloads for all integers.
11043         (gt_pch_nx):  Same.
11044         * hash-map.h (class hash_map): Add pch_nx_helper overloads for all
11045         integers.
11046         (hash_map::operator==): New function.
11047
11048 2021-05-27  Uroš Bizjak  <ubizjak@gmail.com>
11049
11050         PR target/100637
11051         * config/i386/i386-expand.c (ix86_expand_int_sse_cmp):
11052         For TARGET_XOP bypass SSE comparisons for all supported vector modes.
11053         * config/i386/mmx.md (*xop_maskcmp<MMXMODEI:mode>3): New insn pattern.
11054         (*xop_maskcmp<VI_32:mode>3): Ditto.
11055         (*xop_maskcmp_uns<MMXMODEI:mode>3): Ditto.
11056         (*xop_maskcmp_uns<VI_32:mode>3): Ditto.
11057
11058 2021-05-27  Richard Earnshaw  <rearnsha@arm.com>
11059
11060         PR target/100767
11061         * config/arm/arm.c (arm_configure_build_target): Remove parameter
11062         opts_set, directly check opts parameters for being non-null.
11063         (arm_option_restore): Update call to arm_configure_build_target.
11064         (arm_option_override): Likewise.
11065         (arm_can_inline_p): Likewise.
11066         (arm_valid_target_attribute_tree): Likewise.
11067         * config/arm/arm-c.c (arm_pragma_target_parse): Likewise.
11068         * config/arm/arm-protos.h (arm_configure_build_target): Adjust
11069         prototype.
11070
11071 2021-05-27  Aldy Hernandez  <aldyh@redhat.com>
11072
11073         * vr-values.c (simplify_conversion_using_ranges): Use
11074         get_range_query instead of get_global_range_query.
11075
11076 2021-05-27  Aldy Hernandez  <aldyh@redhat.com>
11077
11078         * gimple-range.cc (get_range_global): Move to value-query.cc.
11079         (gimple_range_global): Same.
11080         (get_global_range_query): Same.
11081         (global_range_query::range_of_expr): Same.
11082         * gimple-range.h (class global_range_query): Move to
11083         value-query.h.
11084         (gimple_range_global): Same.
11085         * tree-ssanames.c (get_range_info): Move to value-query.cc.
11086         (get_ptr_nonnull): Same.
11087         * tree-ssanames.h (get_range_info): Remove.
11088         (get_ptr_nonnull): Remove.
11089         * value-query.cc (get_ssa_name_range_info): Move from
11090         tree-ssanames.c.
11091         (get_ssa_name_ptr_info_nonnull): Same.
11092         (get_range_global): Move from gimple-range.cc.
11093         (gimple_range_global): Same.
11094         (get_global_range_query): Same.
11095         (global_range_query::range_of_expr): Same.
11096         * value-query.h (class global_range_query): Move from
11097         gimple-range.h.
11098         (gimple_range_global): Same.
11099
11100 2021-05-27  Uroš Bizjak  <ubizjak@gmail.com>
11101
11102         PR target/100637
11103         * config/i386/mmx.md (uavgv4qi3_ceil): New insn pattern.
11104         (uavgv2hi3_ceil): Ditto.
11105
11106 2021-05-26  Eric Botcazou  <ebotcazou@adacore.com>
11107
11108         PR c/100653
11109         * doc/extend.texi (scalar_storage_order): Rephrase slightly.
11110
11111 2021-05-26  Aldy Hernandez  <aldyh@redhat.com>
11112
11113         * tree-ssanames.c (get_range_info): Merge both copies of
11114         get_range_info into one that works with irange.
11115         * tree-ssanames.h (get_range_info): Remove version that works on
11116         wide_ints.
11117
11118 2021-05-26  Aldy Hernandez  <aldyh@redhat.com>
11119
11120         * builtins.c (check_nul_terminated_array): Convert to get_range_query.
11121         (expand_builtin_strnlen): Same.
11122         (determine_block_size): Same.
11123         * fold-const.c (expr_not_equal_to): Same.
11124         * gimple-fold.c (size_must_be_zero_p): Same.
11125         * gimple-match-head.c: Include gimple-range.h.
11126         * gimple-pretty-print.c (dump_ssaname_info): Convert to get_range_query.
11127         * gimple-ssa-warn-restrict.c
11128         (builtin_memref::extend_offset_range): Same.
11129         * graphite-sese-to-poly.c (add_param_constraints): Same.
11130         * internal-fn.c (get_min_precision): Same.
11131         * ipa-fnsummary.c (set_switch_stmt_execution_predicate): Same.
11132         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Same.
11133         * match.pd: Same.
11134         * tree-data-ref.c (split_constant_offset): Same.
11135         (dr_step_indicator): Same.
11136         * tree-dfa.c (get_ref_base_and_extent): Same.
11137         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
11138         * tree-ssa-loop-niter.c (refine_value_range_using_guard): Same.
11139         (determine_value_range): Same.
11140         (record_nonwrapping_iv): Same.
11141         (infer_loop_bounds_from_signedness): Same.
11142         (scev_var_range_cant_overflow): Same.
11143         * tree-ssa-phiopt.c (two_value_replacement): Same.
11144         * tree-ssa-pre.c (insert_into_preds_of_block): Same.
11145         * tree-ssa-reassoc.c (optimize_range_tests_to_bit_test): Same.
11146         * tree-ssa-strlen.c (handle_builtin_stxncpy_strncat): Same.
11147         (get_range): Same.
11148         (dump_strlen_info): Same.
11149         (set_strlen_range): Same.
11150         (maybe_diag_stxncpy_trunc): Same.
11151         (get_len_or_size): Same.
11152         (handle_integral_assign): Same.
11153         * tree-ssa-structalias.c (find_what_p_points_to): Same.
11154         * tree-ssa-uninit.c (find_var_cmp_const): Same.
11155         * tree-switch-conversion.c (bit_test_cluster::emit): Same.
11156         * tree-vect-patterns.c (vect_get_range_info): Same.
11157         (vect_recog_divmod_pattern): Same.
11158         * tree-vrp.c (intersect_range_with_nonzero_bits): Same.
11159         (register_edge_assert_for_2): Same.
11160         (determine_value_range_1): Same.
11161         * tree.c (get_range_pos_neg): Same.
11162         * vr-values.c (vr_values::get_lattice_entry): Same.
11163         (vr_values::update_value_range): Same.
11164         (simplify_conversion_using_ranges): Same.
11165
11166 2021-05-26  Aldy Hernandez  <aldyh@redhat.com>
11167
11168         * gimple-ssa-warn-alloca.c (alloca_call_type): Use
11169           get_range_query instead of query argument.
11170         (pass_walloca::execute): Enable and disable global ranger.
11171
11172 2021-05-26  Aldy Hernandez  <aldyh@redhat.com>
11173
11174         * gimple-ssa-evrp.c (rvrp_folder::rvrp_folder): Call
11175         enable_ranger.
11176         (rvrp_folder::~rvrp_folder): Call disable_ranger.
11177         (hybrid_folder::hybrid_folder): Call enable_ranger.
11178         (hybrid_folder::~hybrid_folder): Call disable_ranger.
11179
11180 2021-05-26  Aldy Hernandez  <aldyh@redhat.com>
11181
11182         * function.c (allocate_struct_function): Set cfun->x_range_query.
11183         * function.h (struct function): Declare x_range_query.
11184         (get_range_query): New.
11185         (get_global_range_query): New.
11186         * gimple-range-cache.cc (ssa_global_cache::ssa_global_cache):
11187         Remove call to safe_grow_cleared.
11188         * gimple-range.cc (get_range_global): New.
11189         (gimple_range_global): Move from gimple-range.h.
11190         (get_global_range_query): New.
11191         (global_range_query::range_of_expr): New.
11192         (enable_ranger): New.
11193         (disable_ranger): New.
11194         * gimple-range.h (gimple_range_global): Move to gimple-range.cc.
11195         (class global_range_query): New.
11196         (enable_ranger): New.
11197         (disable_ranger): New.
11198         * gimple-ssa-evrp.c (evrp_folder::~evrp_folder): Rename
11199         dump_all_value_ranges to dump.
11200         * tree-vrp.c (vrp_prop::finalize): Same.
11201         * value-query.cc (range_query::dump): New.
11202         * value-query.h (range_query::dump): New.
11203         * vr-values.c (vr_values::dump_all_value_ranges): Rename to...
11204         (vr_values::dump): ...this.
11205         * vr-values.h (class vr_values): Rename dump_all_value_ranges to
11206         dump and make virtual.
11207
11208 2021-05-26  Uroš Bizjak  <ubizjak@gmail.com>
11209
11210         * config/i386/i386.c (ix86_autovectorize_vector_modes):
11211         Add V4QImode and V16QImode for TARGET_SSE2.
11212         * doc/sourcebuild.texi (Vector-specific attributes):
11213         Add vect64 and vect32 description.
11214
11215 2021-05-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11216
11217         * gimple-range-gori.cc (range_def_chain::register_dependency):
11218         Resize m_def_chain when needed.
11219
11220 2021-05-26  Christophe Lyon  <christophe.lyon@linaro.org>
11221
11222         * config/arm/mve.md (mve_vaddvq_<supf><mode>): Prefix with '@'.
11223         * config/arm/neon.md (reduc_plus_scal_<mode>): Move to ..
11224         * config/arm/vec-common.md: .. here. Add support for MVE.
11225
11226 2021-05-26  Jakub Jelinek  <jakub@redhat.com>
11227
11228         * config/epiphany/epiphany.c (epiphany_print_operand_address): Remove
11229         register keywords.
11230         * config/microblaze/microblaze.c (microblaze_legitimize_address,
11231         call_internal1,
11232         microblaze_option_override, print_operand): Likewise.
11233         * config/microblaze/microblaze.md (call_internal_plt,
11234         call_value_intern_plt, call_value_intern): Likewise.
11235         * config/arm/aout.h (ASM_OUTPUT_ALIGN): Likewise.
11236         * config/iq2000/iq2000.md (call_internal1, call_value_internal1,
11237         call_value_multiple_internal1): Likewise.
11238         * config/bfin/bfin.c (symbolic_reference_mentioned_p): Likewise.
11239
11240 2021-05-26  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
11241
11242         * config/arc/arc.c (arc_address_cost, arc_print_operand_address,
11243         arc_ccfsm_advance, symbolic_reference_mentioned_p,
11244         arc_raw_symbolic_reference_mentioned_p): Remove register
11245         keyword.
11246
11247 2021-05-26  Jakub Jelinek  <jakub@redhat.com>
11248
11249         PR libgomp/100573
11250         * omp-low.c: Include omp-offload.h.
11251         (create_omp_child_function): If current_function_decl has
11252         "omp declare target" attribute and is_gimple_omp_offloaded,
11253         remove that attribute from the copy of attribute list and
11254         add "omp target entrypoint" attribute instead.
11255         (lower_omp_target): Mark .omp_data_sizes.* and .omp_data_kinds.*
11256         variables for offloading if in omp_maybe_offloaded_ctx.
11257         * omp-offload.c (pass_omp_target_link::execute): Nullify second
11258         argument to GOMP_target_data_ext in offloaded code.
11259
11260 2021-05-26  Geng Qi  <gengqi@linux.alibaba.com>
11261
11262         * config/csky/csky.c (csky_can_change_mode_class): Delete.
11263         For csky, HF/SF mode use the low bits of VREGS.
11264
11265 2021-05-26  Eric Botcazou  <ebotcazou@adacore.com>
11266
11267         * gimplify.c (gimplify_decl_expr): Do not clear TREE_READONLY on a
11268         DECL which is a reference for OMP.
11269
11270 2021-05-26  Martin Liska  <mliska@suse.cz>
11271
11272         PR gcov-profile/100751
11273         * doc/gcov.texi: Document that __gcov_dump can be called just
11274         once and that __gcov_reset resets run-time counters.
11275
11276 2021-05-26  Martin Liska  <mliska@suse.cz>
11277
11278         * doc/install.texi: Port relevant part from install-old.texi
11279         and re-generate list of CPUs and systems.
11280
11281 2021-05-26  Martin Liska  <mliska@suse.cz>
11282
11283         * Makefile.in: Remove it.
11284         * doc/include/fdl.texi: Update next/previous chapters.
11285         * doc/install.texi: Likewise.
11286         * doc/install-old.texi: Removed.
11287
11288 2021-05-26  Geng Qi  <gengqi@linux.alibaba.com>
11289
11290         * config/csky/csky.c (ck810_legitimate_index_p): Support
11291         "base + index" with DF mode.
11292         * config/csky/constraints.md ("Y"): New constraint for memory operands
11293         without index register.
11294         * config/csky/csky_insn_fpuv2.md (fpuv3_movdf): Use "Y" instead of "m"
11295         when mov between memory and general registers, and lower their priority.
11296         * config/csky/csky_insn_fpuv3.md (fpuv2_movdf): Likewise.
11297
11298 2021-05-26  Geng Qi  <gengqi@linux.alibaba.com>
11299
11300         * config/csky/csky.c (TARGET_PROMOTE_PROTOTYPES): Delete.
11301
11302 2021-05-26  Geng Qi  <gengqi@linux.alibaba.com>
11303
11304         * config/csky/csky.md (untyped_call): Emit clobber for return
11305         registers to mark them used.
11306
11307 2021-05-26  Geng Qi  <gengqi@linux.alibaba.com>
11308
11309         * config/csky/csky.md (cskyv2_sextend_ldbs): New.
11310
11311 2021-05-26  Andrew Pinski  <apinski@marvell.com>
11312
11313         * match.pd (x < 0 ? ~y : y): New patterns.
11314
11315 2021-05-26  Andrew Pinski  <apinski@marvell.com>
11316
11317         * match.pd (A?CST1:CST2): Add simplifcations for A?0:+-1, A?+-1:0,
11318         A?POW2:0 and A?0:POW2.
11319
11320 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11321
11322         * gimple-range-gori.cc (class logical_stmt_cache): Delete
11323         (logical_stmt_cache::logical_stmt_cache ): Delete.
11324         (logical_stmt_cache::~logical_stmt_cache): Delete.
11325         (logical_stmt_cache::cache_entry::dump): Delete.
11326         (logical_stmt_cache::get_range): Delete.
11327         (logical_stmt_cache::cached_name ): Delete.
11328         (logical_stmt_cache::same_cached_name): Delete.
11329         (logical_stmt_cache::cacheable_p): Delete.
11330         (logical_stmt_cache::slot_diagnostics ): Delete.
11331         (logical_stmt_cache::dump): Delete.
11332         (gori_compute_cache::gori_compute_cache): Delete.
11333         (gori_compute_cache::~gori_compute_cache): Delete.
11334         (gori_compute_cache::compute_operand_range): Delete.
11335         (gori_compute_cache::cache_stmt): Delete.
11336         * gimple-range-gori.h (gori_compute::compute_operand_range): Remove
11337         virtual.
11338         (class gori_compute_cache): Delete.
11339
11340 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11341
11342         * gimple-range.cc (fold_using_range::range_of_range_op): Use m_gori
11343         intead of m_cache.
11344         (fold_using_range::range_of_address): Adjust.
11345         (fold_using_range::range_of_phi): Adjust.
11346         * gimple-range.h (class fur_source): Adjust.
11347         (fur_source::fur_source): Adjust.
11348
11349 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11350
11351         * gimple-range-gori.cc (gori_compute::expr_range_at_stmt): Rename
11352         from expr_range_in_bb and adjust.
11353         (gori_compute::compute_name_range_op): Adjust.
11354         (gori_compute::optimize_logical_operands): Adjust.
11355         (gori_compute::compute_logical_operands_in_chain): Adjust.
11356         (gori_compute::compute_operand1_range): Adjust.
11357         (gori_compute::compute_operand2_range): Adjust.
11358         (ori_compute_cache::cache_stmt): Adjust.
11359         * gimple-range-gori.h (gori_compute): Rename prototype.
11360
11361 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11362
11363         * gimple-range.cc (gimple_ranger::range_of_expr): Non-null should be
11364         checked only after range_of_stmt, not range_on_entry.
11365         (gimple_ranger::range_on_entry): Check for non-null in any
11366         predecessor block, if it is not already non-null.
11367         (gimple_ranger::range_on_exit): DOnt check for non-null after
11368         range on entry call.
11369         (gimple_ranger::dump_bb): New.  Split from dump.
11370         (gimple_ranger::dump): Adjust.
11371         * gimple-range.h (class gimple_ranger): Adjust.
11372
11373 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11374
11375         * gimple-range-cache.cc (struct range_timestamp): Delete.
11376         (class temporal_cache): Adjust.
11377         (temporal_cache::get_timestamp): Delete.
11378         (temporal_cache::set_dependency): Delete.
11379         (temporal_cache::temporal_value): Adjust.
11380         (temporal_cache::current_p): Take dependencies as params.
11381         (temporal_cache::set_timestamp): Adjust.
11382         (temporal_cache::set_always_current): Adjust.
11383         (ranger_cache::get_non_stale_global_range): Adjust.
11384         (ranger_cache::register_dependency): Delete.
11385         * gimple-range-cache.h (class range_cache): Adjust.
11386
11387 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11388
11389         * gimple-range-gori.cc (range_def_chain::range_def_chain): init
11390         bitmap obstack.
11391         (range_def_chain::~range_def_chain): Dispose of obstack rather than
11392         each individual bitmap.
11393         (range_def_chain::set_import): New.
11394         (range_def_chain::get_imports): New.
11395         (range_def_chain::chain_import_p): New.
11396         (range_def_chain::register_dependency): Rename from build_def_chain
11397         and set imports.
11398         (range_def_chain::def_chain_in_bitmap_p): New.
11399         (range_def_chain::add_def_chain_to_bitmap): New.
11400         (range_def_chain::has_def_chain): Just check first depenedence.
11401         (range_def_chain::get_def_chain): Process imports, use generic
11402         register_dependency routine.
11403         (range_def_chain::dump): New.
11404         (gori_map::gori_map): Allocate import list.
11405         (gori_map::~gori_map): Release imports.
11406         (gori_map::exports): Check for past allocated block size.
11407         (gori_map::imports): New.
11408         (gori_map::def_chain_in_export_p): Delete.
11409         (gori_map::is_import_p): New.
11410         (gori_map::maybe_add_gori): Handle imports.
11411         (gori_map::dump): Adjust output, add imports.
11412         (gori_compute::has_edge_range_p): Remove def_chain_in_export call.
11413         (gori_export_iterator::gori_export_iterator): New.
11414         (gori_export_iterator::next): New.
11415         (gori_export_iterator::get_name): New.
11416         * gimple-range-gori.h (range_def_chain): Add imports and direct
11417         dependecies via struct rdc.
11418         (range_def_chain::depend1): New.
11419         (range_def_chain::depend2): New.
11420         (class gori_map): Adjust.
11421         (FOR_EACH_GORI_IMPORT_NAME): New.
11422         (FOR_EACH_GORI_EXPORT_NAME): New.
11423         (class gori_export_iterator): New.
11424
11425 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11426
11427         * gimple-range-cache.cc (ranger_cache::ranger_cache):  Move initial
11428         export cache filling to here.
11429         * gimple-range-gori.cc (gori_compute::gori_compute) : From Here.
11430
11431 2021-05-25  Andrew MacLeod  <amacleod@redhat.com>
11432
11433         * gimple-range-gori.cc (range_def_chain): Move to gimple-range-gori.h.
11434         (gori_map): Move to gimple-range-gori.h.
11435         (gori_compute::gori_compute): Adjust.
11436         (gori_compute::~gori_compute): Delete.
11437         (gori_compute::compute_operand_range_switch): Adjust.
11438         (gori_compute::compute_operand_range): Adjust.
11439         (gori_compute::compute_logical_operands): Adjust.
11440         (gori_compute::has_edge_range_p ): Adjust.
11441         (gori_compute::set_range_invariant): Delete.
11442         (gori_compute::dump): Adjust.
11443         (gori_compute::outgoing_edge_range_p): Adjust.
11444         * gimple-range-gori.h (class range_def_chain): Relocate here.
11445         (class gori_map): Relocate here.
11446         (class gori_compute): Inherit from gori_map, and adjust.
11447
11448 2021-05-25  Aldy Hernandez  <aldyh@redhat.com>
11449
11450         * value-range.cc (range_tests_legacy): Use
11451         build_nonstandard_integer_type instead of int and short.
11452
11453 2021-05-25  Eric Botcazou  <ebotcazou@adacore.com>
11454
11455         * gimplify.c (gimplify_decl_expr): Clear TREE_READONLY on the DECL
11456         when really creating an initialization statement for it.
11457
11458 2021-05-25  Eric Botcazou  <ebotcazou@adacore.com>
11459
11460         * tree-inline.c (setup_one_parameter): Fix thinko in new condition.
11461
11462 2021-05-25  Kito Cheng  <kito.cheng@sifive.com>
11463
11464         * config/riscv/riscv.h (ASM_SPEC): Pass -mno-relax.
11465
11466 2021-05-25  Martin Liska  <mliska@suse.cz>
11467
11468         PR tree-optimization/92860
11469         PR target/99592
11470         * optc-save-gen.awk: Remove exceptions.
11471
11472 2021-05-25  Martin Liska  <mliska@suse.cz>
11473
11474         * asan.h (sanitize_coverage_p): New function.
11475         * doc/extend.texi: Document it.
11476         * fold-const.c (fold_range_test): Use sanitize_flags_p
11477         instead of flag_sanitize_coverage.
11478         (fold_truth_andor): Likewise.
11479         * sancov.c: Likewise.
11480         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
11481         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Handle
11482         -fsanitize-coverage when inlining.
11483
11484 2021-05-25  Cooper Qu  <cooper.qu@linux.alibaba.com>
11485
11486         * config/csky/csky-modes.def : Fix copyright.
11487
11488 2021-05-25  Cooper Qu  <cooper.qu@linux.alibaba.com>
11489
11490         * config/csky/csky-modes.def : Amend copyright.
11491         * config/csky/csky_insn_fpuv2.md : Likewise.
11492         * config/csky/csky_insn_fpuv3.md : Likewise.
11493
11494 2021-05-25  Richard Biener  <rguenther@suse.de>
11495
11496         PR middle-end/100727
11497         * calls.c (initialize_argument_information): Explicitely test
11498         for WITH_SIZE_EXPR.
11499         * gimple-expr.c (mark_addressable): Skip outer WITH_SIZE_EXPR.
11500
11501 2021-05-25  Geng Qi  <gengqi@linux.alibaba.com>
11502
11503         * config/csky/csky.h (FRAME_POINTER_REGNUM): Use
11504         HARD_FRAME_POINTER_REGNUM and FRAME_POINTER_REGNUM instead of
11505         the signle definition. The signle definition may not work well
11506         at simplify_subreg_regno().
11507         (HARD_FRAME_POINTER_REGNUM): New.
11508         (ELIMINABLE_REGS): Add for HARD_FRAME_POINTER_REGNUM.
11509         * config/csky/csky.c (get_csky_live_regs, csky_can_eliminate,
11510         csky_initial_elimination_offset, csky_expand_prologue,
11511         csky_expand_epilogue): Add for HARD_FRAME_POINTER_REGNUM.
11512
11513 2021-05-25  Geng Qi  <gengqi@linux.alibaba.com>
11514
11515         * config/csky/csky.c (csky_option_override):
11516         Init csky_arch_isa_features[] in advance, so TARGET_DSP
11517         and TARGET_DIV can be set well.
11518
11519 2021-05-25  Geng Qi  <gengqi@linux.alibaba.com>
11520
11521         * config/csky/constraints.md ("l", "h"): Delete.
11522         * config/csky/csky.h (reg_class, REG_CLASS_NAMES,
11523         REG_CLASS_CONTENTS):  Delete LO_REGS and HI_REGS.
11524         * config/csky/csky.c (regno_reg_classm,
11525         csky_secondary_reload, csky_register_move_cost):
11526         Use HILO_REGS instead of LO_REGS and HI_REGS.
11527
11528 2021-05-25  Geng Qi  <gengqi@linux.alibaba.com>
11529
11530         * config/csky/constraints.md ("W"): New constriant for mem operand
11531         with base reg, index register.
11532         ("Q"): Renamed and modified "csky_valid_fpuv2_mem_operand" to
11533         "csky_valid_mem_constraint_operand" to deal with both "Q" and "W"
11534         constraint.
11535         ("Dv"): New constraint for const double value that can be used at
11536         fmovi instruction.
11537         * config/csky/csky-modes.def (HFmode): New mode.
11538         * config/csky/csky-protos.h (csky_valid_fpuv2_mem_operand): Rename
11539         to "csky_valid_mem_constraint_operand" and support new constraint
11540         "W".
11541         (csky_get_movedouble_length): New.
11542         (fpuv3_output_move): New.
11543         (fpuv3_const_double): New.
11544         * config/csky/csky.c (csky_option_override): New arch CK860 with fpv3.
11545         (decompose_csky_address): Refine.
11546         (csky_print_operand): New "CONST_DOUBLE" operand.
11547         (csky_output_move): Support fpv3 instructions.
11548         (csky_get_movedouble_length): New.
11549         (fpuv3_output_move): New.
11550         (fpuv3_const_double): New.
11551         (csky_emit_compare): Cover float comparsion.
11552         (csky_emit_compare_float): Refine.
11553         (csky_vaild_fpuv2_mem_operand): Rename to
11554         "csky_valid_mem_constraint_operand" and support new constraint "W".
11555         (ck860_rtx_costs): New.
11556         (csky_rtx_costs): Add the cost calculation of CK860.
11557         (regno_reg_class): New vregs for fpuv3.
11558         (csky_dbx_regno): Likewise.
11559         (csky_cpu_cpp_builtins): New builtin macro for fpuv3.
11560         (csky_conditional_register_usage): Suporrot fpuv3.
11561         (csky_dwarf_register_span): Suporrot fpuv3.
11562         (csky_init_builtins, csky_mangle_type): Support "__fp16" type.
11563         (ck810_legitimate_index_p): Support fp16.
11564         * config/csky/csky.h (TARGET_TLS): ADD CK860.
11565         (CSKY_VREG_P, CSKY_VREG_LO_P, CSKY_VREG_HI_P): Support fpuv3.
11566         (TARGET_SINGLE_FPU): Support fpuv3.
11567         (TARGET_SUPPORT_FPV3): New.
11568         (FIRST_PSEUDO_REGISTER): Change to 202 to hold the new fpuv3 registers.
11569         (FIXED_REGISTERS, CALL_REALLY_USED_REGISTERS, REGISTER_NAMES,
11570          REG_CLASS_CONTENTS): Support fpuv3.
11571         * config/csky/csky.md (movsf): Move to cksy_insn_fpu.md and refine.
11572         (csky_movsf_fpv2): Likewise.
11573         (ck801_movsf): Likewise.
11574         (csky_movsf): Likewise.
11575         (movdf): Likewise.
11576         (csky_movdf_fpv2): Likewise.
11577         (ck801_movdf): Likewise.
11578         (csky_movdf): Likewise.
11579         (movsicc): Refine. Use "comparison_operatior" instead of
11580         "ordered_comparison_operatior".
11581         (addsicc): Likewise.
11582         (CSKY_FIRST_VFP3_REGNUM, CSKY_LAST_VFP3_REGNUM): New constant.
11583         (call_value_internal_vh): New.
11584         * config/csky/csky_cores.def (CK860): New arch and cpu.
11585         (fpv3_hf): New.
11586         (fpv3_hsf): New.
11587         (fpv3_sdf): New.
11588         (fpv3): New.
11589         * config/csky/csky_insn_fpu.md: Refactor. Separate all float patterns
11590         into emit-patterns and match-patterns, remain the emit-patterns here,
11591         and move the match-patterns to csky_insn_fpuv2.md or
11592         csky_insn_fpuv3.md.
11593         * config/csky/csky_insn_fpuv2.md: New file for fpuv2 instructions.
11594         * config/csky/csky_insn_fpuv3.md: New file and new patterns for fpuv3
11595         isntructions.
11596         * config/csky/csky_isa.def (fcr): New.
11597         (fpv3_hi): New.
11598         (fpv3_hf): New.
11599         (fpv3_sf): New.
11600         (fpv3_df): New.
11601         (CK860): New definition for ck860.
11602         * config/csky/csky_tables.opt (ck860): New processors ck860,
11603         ck860f. And new arch ck860.
11604         (fpv3_hf): New.
11605         (fpv3_hsf): New.
11606         (fpv3_hdf): New.
11607         (fpv3): New.
11608         * config/csky/predicates.md (csky_float_comparsion_operator): Delete
11609         "geu", "gtu", "leu", "ltu", which will never appear at float comparison.
11610         * config/csky/t-csky-elf: Support 860.
11611         * config/csky/t-csky-linux: Likewise.
11612         * doc/md.texi: Add "Q" and "W" constraints for C-SKY.
11613
11614 2021-05-24  Aaron Sawdey  <acsawdey@linux.ibm.com>
11615
11616         * config/rs6000/genfusion.pl (gen_logical_addsubf): Refactor to
11617         add generation of logical-add and add-logical fusion pairs.
11618         * config/rs6000/rs6000-cpus.def: Add new fusion to ISA 3.1 mask
11619         and powerpc mask.
11620         * config/rs6000/rs6000.c (rs6000_option_override_internal): Turn on
11621         logical-add and add-logical fusion by default.
11622         * config/rs6000/rs6000.opt: Add -mpower10-fusion-logical-add and
11623         -mpower10-fusion-add-logical options.
11624         * config/rs6000/fusion.md: Regenerate file.
11625
11626 2021-05-24  Aldy Hernandez  <aldyh@redhat.com>
11627
11628         * value-range.cc (irange::legacy_equal_p): Check type when
11629         comparing VR_VARYING types.
11630         (range_tests_legacy): Test comparing VARYING ranges of different
11631         sizes.
11632
11633 2021-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
11634
11635         * config/aarch64/aarch64.c (neoversen1_tunings):
11636         Enable AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
11637
11638 2021-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
11639
11640         * config/aarch64/aarch64.c (aarch64_classify_symbol): Use GOT for
11641         extern weak symbols.  Limit symbol offsets for non-GOT symbols with
11642         PIC/PIE.
11643
11644 2021-05-24  Christophe Lyon  <christophe.lyon@linaro.org>
11645
11646         * config/arm/neon.md (vec_load_lanesxi<mode>)
11647         (vec_store_lanexoi<mode>): Move ...
11648         * config/arm/vec-common.md: here.
11649
11650 2021-05-24  Christophe Lyon  <christophe.lyon@linaro.org>
11651
11652         * config/arm/neon.md (vec_load_lanesoi<mode>)
11653         (vec_store_lanesoi<mode>): Move ...
11654         * config/arm/vec-common.md: here.
11655
11656 2021-05-24  liuhongt  <hongtao.liu@intel.com>
11657
11658         PR target/100660
11659         * config/i386/i386.c (ix86_gimple_fold_builtin): Replacing
11660         stmt with GIMPLE_NOP when lhs doesn't exist.
11661
11662 2021-05-23  Uroš Bizjak  <ubizjak@gmail.com>
11663
11664         PR target/100722
11665         * config/i386/mmx.md (*push<VI_32:mode>2_rex64):
11666         New instruction pattern.
11667         (*push<VI_32:mode>2): Ditto.
11668         (push splitter for SSE registers): New splitter.
11669
11670 2021-05-23  Andrew Pinski  <apinski@marvell.com>
11671
11672         * match.pd ((A & C) != 0 ? D : 0): Limit to non pointer types.
11673
11674 2021-05-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
11675
11676         * config/rs6000/genfusion.pl (gen_addadd): Fix incorrect attr types.
11677         * config/rs6000/fusion.md: Regenerate file.
11678
11679 2021-05-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
11680
11681         * config/rs6000/genfusion.pl (gen_addadd): New function.
11682         * config/rs6000/fusion.md: Regenerate file.
11683         * config/rs6000/rs6000-cpus.def: Add
11684         OPTION_MASK_P10_FUSION_2ADD to masks.
11685         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11686         Handle default value of OPTION_MASK_P10_FUSION_2ADD.
11687         * config/rs6000/rs6000.opt: Add -mpower10-fusion-2add.
11688
11689 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
11690
11691         PR middle-end/99928
11692         * tree.h (OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET): Define.
11693         * gimplify.c (enum gimplify_omp_var_data): Fix up
11694         GOVD_MAP_HAS_ATTACHMENTS value, add GOVD_FIRSTPRIVATE_IMPLICIT.
11695         (omp_lastprivate_for_combined_outer_constructs): If combined target
11696         has GOVD_FIRSTPRIVATE_IMPLICIT set for the decl, change it to
11697         GOVD_MAP | GOVD_SEEN.
11698         (gimplify_scan_omp_clauses): Set GOVD_FIRSTPRIVATE_IMPLICIT for
11699         firstprivate clauses with OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT.
11700         (gimplify_adjust_omp_clauses): For firstprivate clauses with
11701         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT either clear that bit and
11702         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET too, or remove it and
11703         let it be replaced by implicit map clause.
11704
11705 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
11706
11707         PR middle-end/99928
11708         * gimplify.c (omp_lastprivate_for_combined_outer_constructs): New
11709         function.
11710         (gimplify_scan_omp_clauses) <case OMP_CLAUSE_LASTPRIVATE>: Use it.
11711         (gimplify_omp_for): Likewise.
11712
11713 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11714
11715         PR middle-end/90115
11716         * omp-low.c (oacc_privatization_candidate_p): Reject 'static',
11717         'external' in blocks.
11718
11719 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11720
11721         PR middle-end/90115
11722         * flag-types.h (enum openacc_privatization): New.
11723         * params.opt (-param=openacc-privatization): New.
11724         * doc/invoke.texi (openacc-privatization): Document it.
11725         * omp-general.h (get_openacc_privatization_dump_flags): New
11726         function.
11727         * omp-low.c (oacc_privatization_candidate_p): Add diagnostics.
11728         * omp-offload.c (execute_oacc_device_lower)
11729         <IFN_UNIQUE_OACC_PRIVATE>: Re-work diagnostics.
11730         * target.def (goacc.adjust_private_decl): Add 'location_t'
11731         parameter.
11732         * doc/tm.texi: Regenerate.
11733         * config/gcn/gcn-protos.h (gcn_goacc_adjust_private_decl): Adjust.
11734         * config/gcn/gcn-tree.c (gcn_goacc_adjust_private_decl): Likewise.
11735         * config/nvptx/nvptx.c (nvptx_goacc_adjust_private_decl):
11736         Likewise.  Preserve it for...
11737         (nvptx_goacc_expand_var_decl): ... use here.
11738
11739 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11740
11741         * doc/sourcebuild.texi (Other attributes): Document '__OPTIMIZE__'
11742         DejaGnu selector.
11743
11744 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11745
11746         PR middle-end/90115
11747         * omp-low.c (oacc_privatization_candidate_p): New function.
11748         (oacc_privatization_scan_clause_chain)
11749         (oacc_privatization_scan_decl_chain): Use it.  Also
11750         'gcc_checking_assert' that we're not seeing duplicates.
11751
11752 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11753
11754         PR middle-end/90115
11755         * omp-offload.c (execute_oacc_device_lower): Skip processing if no
11756         work to be done.
11757
11758 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11759
11760         PR middle-end/90115
11761         * omp-offload.c (execute_oacc_device_lower): Explain.
11762
11763 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11764
11765         PR middle-end/90115
11766         * omp-offload.c (execute_oacc_device_lower)
11767         <IFN_UNIQUE_OACC_PRIVATE>: Diagnose and handle for 'level == -1'
11768         case, too.
11769         * internal-fn.c (expand_UNIQUE): Don't expect
11770         'IFN_UNIQUE_OACC_PRIVATE'.
11771
11772 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11773
11774         PR middle-end/90115
11775         * omp-low.c (lower_omp_for): Don't evaluate OpenMP 'for' clauses.
11776
11777 2021-05-21  Thomas Schwinge  <thomas@codesourcery.com>
11778
11779         PR middle-end/90115
11780         * config/nvptx/nvptx.c (nvptx_goacc_adjust_private_decl)
11781         (nvptx_goacc_expand_var_decl): Tighten.
11782
11783 2021-05-21  Julian Brown  <julian@codesourcery.com>
11784             Chung-Lin Tang  <cltang@codesourcery.com>
11785             Thomas Schwinge  <thomas@codesourcery.com>
11786
11787         PR middle-end/90115
11788         * doc/tm.texi.in (TARGET_GOACC_EXPAND_VAR_DECL)
11789         (TARGET_GOACC_ADJUST_PRIVATE_DECL): Add documentation hooks.
11790         * doc/tm.texi: Regenerate.
11791         * expr.c (expand_expr_real_1): Expand decls using the
11792         expand_var_decl OpenACC hook if defined.
11793         * internal-fn.c (expand_UNIQUE): Handle IFN_UNIQUE_OACC_PRIVATE.
11794         * internal-fn.h (IFN_UNIQUE_CODES): Add OACC_PRIVATE.
11795         * omp-low.c (omp_context): Add oacc_privatization_candidates
11796         field.
11797         (lower_oacc_reductions): Add PRIVATE_MARKER parameter.  Insert
11798         before fork.
11799         (lower_oacc_head_tail): Add PRIVATE_MARKER parameter.  Modify
11800         private marker's gimple call arguments, and pass it to
11801         lower_oacc_reductions.
11802         (oacc_privatization_scan_clause_chain)
11803         (oacc_privatization_scan_decl_chain, lower_oacc_private_marker):
11804         New functions.
11805         (lower_omp_for, lower_omp_target, lower_omp_1): Use these.
11806         * omp-offload.c (convert.h): Include.
11807         (oacc_loop_xform_head_tail): Treat private-variable markers like
11808         fork/join when transforming head/tail sequences.
11809         (struct var_decl_rewrite_info): Add struct.
11810         (oacc_rewrite_var_decl, is_sync_builtin_call): New functions.
11811         (execute_oacc_device_lower): Support rewriting gang-private
11812         variables using target hook, and fix up addr_expr and var_decl
11813         nodes afterwards.
11814         * target.def (adjust_private_decl, expand_var_decl): New hooks.
11815         * config/gcn/gcn-protos.h (gcn_goacc_adjust_gangprivate_decl):
11816         Rename to...
11817         (gcn_goacc_adjust_private_decl): ...this.
11818         * config/gcn/gcn-tree.c (gcn_goacc_adjust_gangprivate_decl):
11819         Rename to...
11820         (gcn_goacc_adjust_private_decl): ...this. Add LEVEL parameter.
11821         * config/gcn/gcn.c (TARGET_GOACC_ADJUST_GANGPRIVATE_DECL): Rename
11822         definition using gcn_goacc_adjust_gangprivate_decl...
11823         (TARGET_GOACC_ADJUST_PRIVATE_DECL): ...to this, using
11824         gcn_goacc_adjust_private_decl.
11825         * config/nvptx/nvptx.c (tree-pretty-print.h): Include.
11826         (gang_private_shared_size): New global variable.
11827         (gang_private_shared_align): Likewise.
11828         (gang_private_shared_sym): Likewise.
11829         (gang_private_shared_hmap): Likewise.
11830         (nvptx_option_override): Initialize these.
11831         (nvptx_file_end): Output gang_private_shared_sym.
11832         (nvptx_goacc_adjust_private_decl, nvptx_goacc_expand_var_decl):
11833         New functions.
11834         (nvptx_set_current_function): Clear gang_private_shared_hmap.
11835         (TARGET_GOACC_ADJUST_PRIVATE_DECL): Define hook.
11836         (TARGET_GOACC_EXPAND_VAR_DECL): Likewise.
11837
11838 2021-05-21  H.J. Lu  <hjl.tools@gmail.com>
11839
11840         * config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): Removed.
11841
11842 2021-05-21  Richard Biener  <rguenther@suse.de>
11843             H.J. Lu  <hjl.tools@gmail.com>
11844
11845         PR middle-end/90773
11846         * expr.c (expand_constructor): Elide expand_constructor if
11847         move by pieces is preferred.
11848
11849 2021-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11850
11851         * config/aarch64/aarch64-builtins.c (aarch64_call_properties):
11852         Take a flag and mode value as arguments.
11853         (aarch64_modifies_global_state_p): Likewise.
11854         (aarch64_reads_global_state_p): Likewise.
11855         (aarch64_could_trap_p): Likewise.
11856         (aarch64_get_attributes): Likewise.
11857         (aarch64_init_simd_builtins): Adjust callsite of above.
11858         (aarch64_init_fcmla_laneq_builtins): Use aarch64_get_attributes to get
11859         function attributes to apply to builtins.
11860         (aarch64_init_crc32_builtins): Likewise.
11861         (aarch64_init_builtin_rsqrt): Likewise.
11862
11863 2021-05-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
11864
11865         * config/rs6000/rs6000.md (define_attr "type"): Add types for fusion.
11866         * config/rs6000/genfusion.pl (gen_ld_cmpi_p10): Use new fusion types.
11867         (gen_2logical): Use new fusion types.
11868         * config/rs6000/fusion.md: Regenerate.
11869
11870 2021-05-21  Uroš Bizjak  <ubizjak@gmail.com>
11871
11872         PR target/100637
11873         * config/i386/i386-expand.c (ix86_expand_sse_movcc):
11874         Handle V4QI and V2HI modes.
11875         (ix86_expand_sse_movcc): Ditto.
11876         * config/i386/mmx.md (*<sat_plusminus:insn><VI_32:mode>3):
11877         New instruction pattern.
11878         (*eq<VI_32:mode>3): Ditto.
11879         (*gt<VI_32:mode>3): Ditto.
11880         (*xop_pcmov_<VI_32:mode>): Ditto.
11881         (mmx_pblendvb32): Ditto.
11882         (mmx_pblendvb64): Rename from mmx_pblendvb.
11883         (vec_cmp<VI_32:mode><VI_32:mode>): New expander.
11884         (vec_cmpu<VI_32:mode><VI_32:mode>): Ditto.
11885         (vcond<VI_32:mode><VI_32:mode>): Ditto.
11886         (vcondu<VI_32:mode><VI_32:mode>): Ditto.
11887         (vcond_mask_<VI_32:mode><VI_32:mode>): Ditto.
11888
11889 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
11890
11891         PR tree-optimization/94589
11892         * tree-ssa-phiopt.c (spaceship_replacement): For integral rhs1 and
11893         rhs2, treat x <= 4 equivalently to x < 5 etc.  In cmp1 and cmp2 (if
11894         not the same as cmp3) treat <= the same as < and >= the same as >.
11895         Don't require that cond2_phi_edge is true edge, instead take
11896         false/true edges into account based on cmp1/cmp2 comparison kinds.
11897
11898 2021-05-21  Uroš Bizjak  <ubizjak@gmail.com>
11899
11900         PR target/100637
11901         * config/i386/mmx.md (SMAXMIN_MMXMODEI): New mode iterator.
11902         (<smaxmin:code><SMAXMIN_MMXMODEI:mode>3): Macroize expander
11903         from <smaxmin:code>v4hi3> and <smaxmin:code><MMXMODE14:mode>3
11904         using SMAXMIN_MMXMODEI mode iterator.
11905         (*<smaxmin:code>v4qi3): New insn pattern.
11906         (*<smaxmin:code>v2hi3): Ditto.
11907         (SMAXMIN_VI_32): New mode iterator.
11908         (<smaxmin:code><SMAXMIN_VI_32>mode3): New expander.
11909         (UMAXMIN_MMXMODEI): New mode iterator.
11910         (<umaxmin:code><UMAXMIN_MMXMODEI:mode>3): Macroize expander
11911         from <umaxmin:code>v8qi3> and <umaxmin:code><MMXMODE24:mode>3
11912         using UMAXMIN_MMXMODEI mode iterator.
11913         (*<umaxmin:code>v4qi3): New insn pattern.
11914         (*<umaxmin:code>v2hi3): Ditto.
11915         (UMAXMIN_VI_32): New mode iterator.
11916         (<umaxmin:code><UMAXMIN_VI_32>mode3): New expander.
11917         (abs<VI_32:mode>2): New insn pattern.
11918         (ssse3_abs<MMXMODEI:mode>2, abs<MMXMODEI:mode>2): Move from ...
11919         * config/i386/sse.md: ... here.
11920
11921 2021-05-20  Clement Chigot  <clement.chigot@atos.net>
11922             David Edelsohn  <dje.gcc@gmail.com>
11923
11924         * collect2.c (scan_prog_file): Issue non-fatal warning for
11925         non-COFF files.
11926
11927 2021-05-20  Jonathan Wakely  <jwakely@redhat.com>
11928
11929         * doc/invoke.texi (-Wno-c++11-extensions)
11930         (-Wno-c++14-extensions, -Wno-c++17-extensions)
11931         (-Wno-c++20-extensions, -Wno-c++23-extensions): Document
11932         new options.
11933
11934 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
11935
11936         * config/c6x/c6x.c (c6x_output_file_unwind): Use dwarf_debuginfo_p.
11937         * config/darwin.c (darwin_override_options): Likewise.
11938         * config/i386/cygming.h (DBX_REGISTER_NUMBER): Likewise.
11939         * config/i386/darwin.h (DBX_REGISTER_NUMBER): Likewise.
11940         (DWARF2_FRAME_REG_OUT): Likewise.
11941         * config/mips/mips.c (mips_output_filename): Likewise.
11942         * config/rs6000/rs6000.c (rs6000_xcoff_declare_function_name):
11943         Likewise.
11944         (rs6000_dbx_register_number): Likewise.
11945         * dbxout.c: Include flags.h.
11946         * dwarf2cfi.c (cfi_label_required_p): Likewise.
11947         (dwarf2out_do_frame): Likewise.
11948         * except.c: Include flags.h.
11949         * final.c (dwarf2_debug_info_emitted_p): Likewise.
11950         (final_scan_insn_1): Likewise.
11951         * flags.h (dwarf_debuginfo_p): New function declaration.
11952         * opts.c (dwarf_debuginfo_p): New function definition.
11953         * targhooks.c (default_debug_unwind_info): Use dwarf_debuginfo_p.
11954         * toplev.c (process_options): Likewise.
11955
11956 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
11957
11958         * common.opt: Change type to support bitmasks.
11959         * flag-types.h (enum debug_info_type): Rename enumerator constants.
11960         (NO_DEBUG): New bitmask.
11961         (DBX_DEBUG): Likewise.
11962         (DWARF2_DEBUG): Likewise.
11963         (XCOFF_DEBUG): Likewise.
11964         (VMS_DEBUG): Likewise.
11965         (VMS_AND_DWARF2_DEBUG): Likewise.
11966         * flags.h (debug_set_to_format): New function declaration.
11967         (debug_set_count): Likewise.
11968         (debug_set_names): Likewise.
11969         * opts.c (debug_type_masks): Array of bitmasks for debug formats.
11970         (debug_set_to_format): New function definition.
11971         (debug_set_count): Likewise.
11972         (debug_set_names): Likewise.
11973         (set_debug_level): Update access to debug_type_names.
11974         * toplev.c: Likewise.
11975
11976 2021-05-20  Martin Sebor  <msebor@redhat.com>
11977
11978         PR middle-end/100684
11979         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Handle C++ lambda.
11980
11981 2021-05-20  Uroš Bizjak  <ubizjak@gmail.com>
11982
11983         PR target/100701
11984         * config/i386/i386.md (isa): Remove x64_bmi.
11985         (enabled): Remove x64_bmi.
11986         * config/i386/mmx.md (mmx_andnot<MMXMODEI:mode>3):
11987         Remove general register alternative.
11988         (*andnot<VI_32:mode>3): Ditto.
11989         (*mmx_<any_logic:code><MMXMODEI:mode>3): Ditto.
11990         (*<any_logic:code><VI_32:mode>3): Ditto.
11991
11992 2021-05-20  Kewen Lin  <linkw@linux.ibm.com>
11993
11994         * config/arm/arm.c: Include head files tree-vectorizer.h and
11995         cfgloop.h.
11996
11997 2021-05-20  Uroš Bizjak  <ubizjak@gmail.com>
11998
11999         PR target/100637
12000         * config/i386/mmx.md (Yv_Yw): Revert adding V4QI and V2HI modes.
12001         (*<plusminus:insn><VI_32:mode>3): Use Yw instad of <Yv_Yw> constrint.
12002         (<s>mulv4hi3_highpart): New expander.
12003         (*<s>mulv2hi3_highpart): New insn pattern.
12004         (<s>mulv2hi3_higpart): New expander.
12005         (*<any_shift:insn>v2hi3): New insn pattern.
12006         (<any_shift:insn>v2hi3): New expander.
12007         * config/i386/sse.md (smulhrsv2hi3): New expander.
12008         (*smulhrsv2hi3): New insn pattern.
12009
12010 2021-05-20  Kewen Lin  <linkw@linux.ibm.com>
12011
12012         * doc/invoke.texi (vect-inner-loop-cost-factor): Document new
12013         parameter.
12014         * params.opt (vect-inner-loop-cost-factor): New.
12015         * targhooks.c (default_add_stmt_cost): Replace hardcoded factor
12016         50 with LOOP_VINFO_INNER_LOOP_COST_FACTOR, include head file
12017         tree-vectorizer.h and its required ones.
12018         * config/aarch64/aarch64.c (aarch64_add_stmt_cost): Replace
12019         hardcoded factor 50 with LOOP_VINFO_INNER_LOOP_COST_FACTOR.
12020         * config/arm/arm.c (arm_add_stmt_cost): Likewise.
12021         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12022         * config/rs6000/rs6000.c (rs6000_add_stmt_cost): Likewise.
12023         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12024         Likewise.
12025         (_loop_vec_info::_loop_vec_info): Init inner_loop_cost_factor.
12026         * tree-vectorizer.h (_loop_vec_info): Add inner_loop_cost_factor.
12027         (LOOP_VINFO_INNER_LOOP_COST_FACTOR): New macro.
12028
12029 2021-05-20  Christophe Lyon  <christophe.lyon@linaro.org>
12030             Torbjörn Svensson  <torbjorn.svensson@st.com>
12031
12032         PR c/42579
12033         * doc/cpp.texi (Common Predefined Macros): Document __FILE_NAME__.
12034
12035 2021-05-20  Jakub Jelinek  <jakub@redhat.com>
12036
12037         PR middle-end/99928
12038         * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_LINEAR>: For
12039         explicit linear clause when combined with target, make it map(tofrom:)
12040         instead of no clause or firstprivate.
12041
12042 2021-05-20  Jakub Jelinek  <jakub@redhat.com>
12043
12044         PR tree-optimization/94589
12045         * match.pd ((X & Y) == X -> (X & ~Y) == 0): Simplify even in presence
12046         of integral conversions.
12047
12048 2021-05-19  Andrew MacLeod  <amacleod@redhat.com>
12049
12050         * gimple-range.cc (fur_source::get_operand): New.
12051         (gimple_range_fold): Delete.
12052         (fold_using_range::fold_stmt): Move from gimple_ranger::calc_stmt.
12053         (fold_using_range::range_of_range_op): Move from gimple_ranger.
12054         (fold_using_range::range_of_address): Ditto.
12055         (fold_using_range::range_of_phi): Ditto.
12056         (fold_using_range::range_of_call): Ditto.
12057         (fold_using_range::range_of_builtin_ubsan_call): Move from
12058         range_of_builtin_ubsan_call.
12059         (fold_using_range::range_of_builtin_call): Move from
12060         range_of_builtin_call.
12061         (gimple_ranger::range_of_builtin_call): Delete.
12062         (fold_using_range::range_of_cond_expr): Move from gimple_ranger.
12063         (gimple_ranger::fold_range_internal): New.
12064         (gimple_ranger::range_of_stmt): Use new fold_using_range API.
12065         (fold_using_range::range_of_ssa_name_with_loop_info): Move from
12066         gimple_ranger.  Improve ranges of SSA_NAMES when possible.
12067         * gimple-range.h (gimple_ranger): Remove various range_of routines.
12068         (class fur_source): New.
12069         (class fold_using_range): New.
12070         (fur_source::fur_source): New.
12071         (fold_range): New.
12072         * vr-values.c (vr_values::extract_range_basic): Use fold_using_range
12073         instead of range_of_builtin_call.
12074
12075 2021-05-19  Jonathan Wakely  <jwakely@redhat.com>
12076
12077         * doc/cpp.texi (Common Predefined Macros): Update documentation
12078         for the __GXX_EXPERIMENTAL_CXX0X__ macro.
12079
12080 2021-05-19  Alex Coplan  <alex.coplan@arm.com>
12081
12082         PR target/100333
12083         * config/arm/arm.md (nonsecure_call_internal): Always ensure
12084         callee's address is in a register.
12085
12086 2021-05-19  Geng Qi  <gengqi@linux.alibaba.com>
12087
12088         * common/config/riscv/riscv-common.c
12089         (riscv_subset_list::parsing_subset_version): Properly parse the letter
12090         'p' in '-march'.
12091         (riscv_subset_list::parse_std_ext,
12092          riscv_subset_list::parse_multiletter_ext): To handle errors generated
12093         in riscv_subset_list::parsing_subset_version.
12094
12095 2021-05-19  Jonathan Wright  <jonathan.wright@arm.com>
12096
12097         * config/aarch64/aarch64-simd.md: Use "neon_move_narrow_q"
12098         type attribute in patterns generating XTN(2).
12099
12100 2021-05-19  Jonathan Wright  <jonathan.wright@arm.com>
12101
12102         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_pack_trunc_<mode>):
12103         Remove as duplicate of...
12104         (aarch64_xtn<mode>): This.
12105         (aarch64_xtn2<mode>_le): Move position in file.
12106         (aarch64_xtn2<mode>_be): Move position in file.
12107         (aarch64_xtn2<mode>): Move position in file.
12108         (vec_pack_trunc_<mode>): Define as an expander.
12109
12110 2021-05-19  Jonathan Wright  <jonathan.wright@arm.com>
12111
12112         * config/aarch64/aarch64-simd-builtins.def: Split builtin
12113         generation for aarch64_<sur>q<r>shr<u>n_n<mode> pattern into
12114         separate scalar and vector generators.
12115         * config/aarch64/aarch64-simd.md
12116         (aarch64_<sur>q<r>shr<u>n_n<mode>): Define as an expander and
12117         split into...
12118         (aarch64_<sur>q<r>shr<u>n_n<mode>_insn_le): This and...
12119         (aarch64_<sur>q<r>shr<u>n_n<mode>_insn_be): This.
12120         * config/aarch64/iterators.md: Define SD_HSDI iterator.
12121
12122 2021-05-19  Jonathn Wright  <jonathan.wright@arm.com>
12123
12124         * config/aarch64/aarch64-simd.md: Use UNSPEC_SQXTUN instead
12125         of UNSPEC_SQXTUN2.
12126         * config/aarch64/iterators.md: Remove UNSPEC_SQXTUN2.
12127
12128 2021-05-19  Jonathan Wright  <jonathan.wright@arm.com>
12129
12130         * config/aarch64/aarch64-simd.md (aarch64_<sur>q<r>shr<u>n2_n<mode>):
12131         Implement as an expand emitting a big/little endian
12132         instruction pattern.
12133         (aarch64_<sur>q<r>shr<u>n2_n<mode>_insn_le): Define.
12134         (aarch64_<sur>q<r>shr<u>n2_n<mode>_insn_be): Define.
12135
12136 2021-05-19  Jonathan Wright  <jonathan.wright@arm.com>
12137
12138         * config/aarch64/aarch64-simd.md (aarch64_<sur><addsub>hn2<mode>):
12139         Implement as an expand emitting a big/little endian
12140         instruction pattern.
12141         (aarch64_<sur><addsub>hn2<mode>_insn_le): Define.
12142         (aarch64_<sur><addsub>hn2<mode>_insn_be): Define.
12143         * config/aarch64/iterators.md: Remove UNSPEC_[R]ADDHN2 and
12144         UNSPEC_[R]SUBHN2 unspecs and ADDSUBHN2 iterator.
12145
12146 2021-05-19  Richard Biener  <rguenther@suse.de>
12147
12148         PR middle-end/100672
12149         * fold-const.c (fold_negate_expr_1): Use element_precision.
12150         (negate_expr_p): Likewise.
12151
12152 2021-05-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12153
12154         * config/aarch64/iterators.md (SVE_PRED_LOAD): New iterator.
12155         (pred_load): New int attribute.
12156         * config/aarch64/aarch64-sve.md
12157         (aarch64_load_<ANY_EXTEND:optab><SVE_HSDI:mode><SVE_PARTIAL_I:mode>): Use
12158         SVE_PRED_LOAD enum iterator and corresponding pred_load attribute.
12159         * config/aarch64/aarch64-sve-builtins-base.cc (expand): Update call to
12160         code_for_aarch64_load.
12161
12162 2021-05-19  Richard Biener  <rguenther@suse.de>
12163
12164         * cfgexpand.c (discover_nonconstant_array_refs_r): Make
12165         sure TARGET_MEM_REF bases are expanded as memory.
12166         * tree-ssa-operands.c (operands_scanner::get_tmr_operands):
12167         Do not mark TARGET_MEM_REF bases addressable.
12168         * tree-ssa.c (non_rewritable_mem_ref_base): Handle
12169         TARGET_MEM_REF bases as never rewritable.
12170         * gimple-walk.c (walk_stmt_load_store_addr_ops): Do not
12171         walk TARGET_MEM_REF bases as address-takens.
12172         * tree-ssa-dce.c (ref_may_be_aliased): Handle TARGET_MEM_REF.
12173
12174 2021-05-19  Richard Biener  <rguenther@suse.de>
12175
12176         * builtins.c (get_object_alignment_1): Strip outer
12177         WITH_SIZE_EXPR.
12178         * tree-dfa.c (get_ref_base_and_extent): Handle outer
12179         WITH_SIZE_EXPR for size processing and process the
12180         containing ref.
12181         * tree-ssa-alias.c (ao_ref_base_alias_set): Strip
12182         outer WITH_SIZE_EXPR.
12183         (ao_ref_base_alias_ptr_type): Likewise.
12184         (refs_may_alias_p_2): Allow WITH_SIZE_EXPR in ref->ref
12185         and handle that accordingly, stripping it for the
12186         core alias workers.
12187         * tree.c (get_base_address): Handle WITH_SIZE_EXPR by
12188         looking through it instead of returning NULL.
12189
12190 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
12191
12192         PR middle-end/100576
12193         * builtins.c (check_read_access): Convert bound to size_type_node if
12194         non-NULL.
12195
12196 2021-05-19  Richard Biener  <rguenther@suse.de>
12197
12198         * tree-cfg.c (verify_types_in_gimple_min_lval): Inline...
12199         (verify_types_in_gimple_reference): ... here.  Sanitize.
12200         (verify_gimple_call): Verify references in LHS and arguments.
12201         (verify_gimple_assign_single): Reject WITH_SIZE_EXPR.
12202
12203 2021-05-19  Uroš Bizjak  <ubizjak@gmail.com>
12204
12205         * config/i386/i386.h (VALID_INT_MODE_P):
12206         Add V8QI, V4HI and V2SI modes for TARGET_64BIT.
12207         * config/i386/i386.md (isa): Add x64_bmi.
12208         (enabled): Handle x64_bmi.
12209         * config/i386/mmx.md (mmx_andnot<MMXMODEI:mode>3):
12210         Add alternative using 64bit general registers.
12211         (*mmx_<any_logic:code><MMXMODEI:mode>3): Ditto.
12212
12213 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
12214
12215         PR middle-end/99928
12216         * tree.h (OMP_MASTER_COMBINED): Define.
12217         * gimplify.c (gimplify_scan_omp_clauses): Rewrite lastprivate
12218         handling for outer combined/composite constructs to a loop.
12219         Handle lastprivate on combined target.
12220         (gimplify_expr): Formatting fix.
12221
12222 2021-05-19  Xionghu Luo  <luoxhu@linux.ibm.com>
12223
12224         * passes.def: Add sink_code pass before store_merging.
12225         * tree-ssa-sink.c (pass_sink_code:clone): New.
12226
12227 2021-05-18  Bill Schmidt  <wschmidt@linux.ibm.com>
12228
12229         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Remove call to
12230         rs6000_special_adjust_field_align_p.
12231         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
12232         * config/rs6000/rs6000-call.c (rs6000_function_arg_boundary):
12233         Remove ABI warning.
12234         (rs6000_function_arg): Likewise.
12235         * config/rs6000/rs6000-protos.h
12236         (rs6000_special_adjust_field_align_p): Remove prototype.
12237         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
12238         Remove.
12239         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove call to
12240         rs6000_special_adjust_field_align_p.
12241
12242 2021-05-18  Uroš Bizjak  <ubizjak@gmail.com>
12243
12244         PR target/100637
12245         * config/i386/i386.h (VALID_SSE2_REG_MODE):
12246         Add V4QI and V2HI modes.
12247         (VALID_INT_MODE_P): Ditto.
12248         * config/i386/mmx.md (VI_32): New mode iterator.
12249         (mmxvecsize): Handle V4QI and V2HI.
12250         (Yv_Yw): Ditto.
12251         (mov<VI_32:mode>): New expander.
12252         (*mov<mode>_internal): New insn pattern.
12253         (movmisalign<VI_32:mode>): New expander.
12254         (neg<VI_32:mode>): New expander.
12255         (<plusminus:insn><VI_32:mode>3): New expander.
12256         (*<plusminus:insn><VI_32:mode>3): New insn pattern.
12257         (mulv2hi3): New expander.
12258         (*mulv2hi3): New insn pattern.
12259         (one_cmpl<VI_32:mode>2): New expander.
12260         (*andnot<VI_32:mode>3): New insn pattern.
12261         (<any_logic:code><VI_32:mode>3): New expander.
12262         (*<any_logic:code><VI_32:mode>3): New insn pattern.
12263
12264 2021-05-18  Uroš Bizjak  <ubizjak@gmail.com>
12265
12266         * config/i386/sse.md (<any_extend:insn>v4qiv4di2):
12267         Fix a mode mismatch with operand 1.
12268
12269 2021-05-18  Uroš Bizjak  <ubizjak@gmail.com>
12270
12271         PR target/100626
12272         * config/i386/i386-expand.c (split_double_mode): Return
12273         temporary register when simplify_gen_subreg fails with
12274         the high half od the paradoxical subreg.
12275
12276 2021-05-18  Richard Biener  <rguenther@suse.de>
12277
12278         * cfgexpand.c (expand_one_var): Pass in forced_stack_var
12279         and honor it when expanding.
12280         (expand_used_vars_for_block): Pass through forced_stack_var.
12281         (expand_used_vars): Likewise.
12282         (discover_nonconstant_array_refs_r): Set bits in
12283         forced_stack_vars instead of marking vars TREE_ADDRESSABLE.
12284         (avoid_type_punning_on_regs): Likewise.
12285         (discover_nonconstant_array_refs): Likewise.
12286         (pass_expand::execute): Create and pass down forced_stack_var
12287         bitmap.  For parameters and returns temporarily set
12288         TREE_ADDRESSABLE when expand_function_start.
12289
12290 2021-05-18  Thomas Schwinge  <thomas@codesourcery.com>
12291
12292         * doc/sourcebuild.texi: Document 'dg-note'.
12293
12294 2021-05-18  Tobias Burnus  <tobias@codesourcery.com>
12295
12296         PR other/100598
12297         * configure: Regenerate.
12298         * configure.ac (BUILD_CFLAG, BUILD_CXXFLAGS): Add $(CFLAGS-$@).
12299
12300 2021-05-18  Thomas Schwinge  <thomas@codesourcery.com>
12301
12302         * gimple.h (is_gimple_omp_oacc): Tighten.
12303         * omp-low.c (check_omp_nesting_restrictions): Adjust.
12304
12305 2021-05-18  Richard Biener  <rguenther@suse.de>
12306
12307         * tree-ssa-operands.c (mark_address_taken): Simplify.
12308
12309 2021-05-18  Martin Liska  <mliska@suse.cz>
12310
12311         * config/gcn/mkoffload.c (STR): Redefine.
12312         * config/i386/intelmic-mkoffload.c (STR): Likewise.
12313         * config/nvptx/mkoffload.c (STR): Likewise.
12314
12315 2021-05-18  Martin Liska  <mliska@suse.cz>
12316
12317         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
12318         Use startswith function instead of strncmp.
12319         * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise.
12320         * common/config/riscv/riscv-common.c (riscv_subset_list::parse): Likewise.
12321         * config/aarch64/aarch64-sve-builtins-shapes.cc (parse_type): Likewise.
12322         * config/aarch64/aarch64.c (aarch64_process_one_target_attr): Likewise.
12323         * config/alpha/alpha.c (alpha_elf_section_type_flags): Likewise.
12324         * config/arm/aarch-common.c (arm_md_asm_adjust): Likewise.
12325         * config/arm/arm.c (arm_file_start): Likewise.
12326         (arm_valid_target_attribute_rec): Likewise.
12327         (thumb1_md_asm_adjust): Likewise.
12328         * config/arm/driver-arm.c (host_detect_local_cpu): Likewise.
12329         * config/avr/avr.c (STR_PREFIX_P): Likewise.
12330         (avr_set_current_function): Likewise.
12331         (avr_handle_addr_attribute): Likewise.
12332         (avr_asm_output_aligned_decl_common): Likewise.
12333         (avr_asm_named_section): Likewise.
12334         (avr_section_type_flags): Likewise.
12335         (avr_asm_select_section): Likewise.
12336         * config/c6x/c6x.c (c6x_in_small_data_p): Likewise.
12337         (c6x_section_type_flags): Likewise.
12338         * config/darwin-c.c (darwin_cfstring_ref_p): Likewise.
12339         (darwin_objc_declare_unresolved_class_reference): Likewise.
12340         (darwin_objc_declare_class_definition): Likewise.
12341         * config/darwin.c (indirect_data): Likewise.
12342         (darwin_encode_section_info): Likewise.
12343         (darwin_objc2_section): Likewise.
12344         (darwin_objc1_section): Likewise.
12345         (machopic_select_section): Likewise.
12346         (darwin_globalize_label): Likewise.
12347         (darwin_label_is_anonymous_local_objc_name): Likewise.
12348         (darwin_asm_named_section): Likewise.
12349         (darwin_asm_output_dwarf_offset): Likewise.
12350         * config/frv/frv.c (frv_string_begins_with): Likewise.
12351         (frv_in_small_data_p): Likewise.
12352         * config/gcn/mkoffload.c (STR): Likewise.
12353         (main): Likewise.
12354         * config/i386/i386-builtins.c (get_builtin_code_for_version): Likewise.
12355         * config/i386/i386-options.c (ix86_option_override_internal): Likewise.
12356         * config/i386/i386.c (x86_64_elf_section_type_flags): Likewise.
12357         (ix86_md_asm_adjust): Likewise.
12358         * config/i386/intelmic-mkoffload.c (STR): Likewise.
12359         * config/i386/winnt.c (i386_pe_asm_named_section): Likewise.
12360         (i386_pe_file_end): Likewise.
12361         * config/ia64/ia64.c (ia64_in_small_data_p): Likewise.
12362         (ia64_section_type_flags): Likewise.
12363         * config/mips/driver-native.c (host_detect_local_cpu): Likewise.
12364         * config/mips/mips.c (mips_handle_interrupt_attr): Likewise.
12365         (mips16_stub_function_p): Likewise.
12366         (mips_function_rodata_section): Likewise.
12367         * config/msp430/msp430.c (msp430_mcu_name): Likewise.
12368         (msp430_function_section): Likewise.
12369         (msp430_section_type_flags): Likewise.
12370         (msp430_expand_helper): Likewise.
12371         * config/nios2/nios2.c (nios2_small_section_name_p): Likewise.
12372         (nios2_valid_target_attribute_rec): Likewise.
12373         * config/nvptx/mkoffload.c (process): Likewise.
12374         (STR): Likewise.
12375         * config/pa/som.h: Likewise.
12376         * config/pdp11/pdp11.c (pdp11_output_ident): Likewise.
12377         * config/riscv/riscv.c (riscv_elf_select_rtx_section): Likewise.
12378         * config/rs6000/rs6000.c (VTABLE_NAME_P): Likewise.
12379         (rs6000_inner_target_options): Likewise.
12380         * config/s390/driver-native.c (s390_host_detect_local_cpu): Likewise.
12381         * config/sparc/driver-sparc.c (host_detect_local_cpu): Likewise.
12382         * config/vax/vax.c (vax_output_int_move): Likewise.
12383         * config/vms/vms-ld.c (startswith): Likewise.
12384         (process_args): Likewise.
12385         (main): Likewise.
12386         * config/vms/vms.c: Likewise.
12387
12388 2021-05-18  Jakub Jelinek  <jakub@redhat.com>
12389
12390         PR rtl-optimization/100590
12391         * regcprop.c (copyprop_hardreg_forward_1): Only DCE dead sets if
12392         they are NONJUMP_INSN_P.
12393
12394 2021-05-18  Jakub Jelinek  <jakub@redhat.com>
12395
12396         PR c++/100580
12397         * function.c (push_dummy_function): Set DECL_ARTIFICIAL and
12398         DECL_ASSEMBLER_NAME on the fn_decl.
12399
12400 2021-05-18  Jakub Jelinek  <jakub@redhat.com>
12401
12402         PR tree-optimization/94589
12403         * tree-ssa-phiopt.c (spaceship_replacement): Pattern match
12404         phi result used in (res & ~1) == 0 comparison as res >= 0 as
12405         res == 2 would be UB with -ffinite-math-only.
12406
12407 2021-05-18  Martin Liska  <mliska@suse.cz>
12408
12409         * Makefile.in: genversion.o should depend on DATESTAMP.
12410
12411 2021-05-18  Claudiu Zissulescu  <claziss@synopsys.com>
12412
12413         * config/arc/simdext.md (negv2si2): Remove round bracket.
12414
12415 2021-05-18  Andreas Krebbel  <krebbel@linux.ibm.com>
12416
12417         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define
12418         _Bool as macro expanding to _Bool.
12419
12420 2021-05-18  Andreas Krebbel  <krebbel@linux.ibm.com>
12421
12422         PR c++/100281
12423         * tree.c (build_reference_type_for_mode)
12424         (build_pointer_type_for_mode): Pick pointer mode if MODE argument
12425         is VOIDmode.
12426         (build_reference_type, build_pointer_type): Invoke
12427         build_*_type_for_mode with VOIDmode.
12428
12429 2021-05-17  Andrew MacLeod  <amacleod@redhat.com>
12430
12431         PR tree-optimization/100512
12432         * gimple-range-cache.cc (ranger_cache::set_global_range): Mark const
12433         and non-zero pointer ranges as invariant.
12434         * gimple-range.cc (gimple_ranger::range_of_stmt): Remove pointer
12435         processing from here.
12436
12437 2021-05-17  Tom de Vries  <tdevries@suse.de>
12438
12439         PR target/100497
12440         * config/nvptx/nvptx-protos.h (nvptx_output_atomic_insn): Declare
12441         * config/nvptx/nvptx.c (nvptx_output_barrier)
12442         (nvptx_output_atomic_insn): New function.
12443         (nvptx_print_operand): Add support for 'B'.
12444         * config/nvptx/nvptx.md: Use nvptx_output_atomic_insn for atomic
12445         insns.
12446
12447 2021-05-17  Aldy Hernandez  <aldyh@redhat.com>
12448
12449         PR tree-optimization/100349
12450         * vr-values.c (bounds_of_var_in_loop): Bail if scev returns
12451           NULL.
12452
12453 2021-05-17  Tamar Christina  <tamar.christina@arm.com>
12454
12455         * config/aarch64/driver-aarch64.c (DEFAULT_ARCH): New.
12456         (host_detect_local_cpu): Use it.
12457
12458 2021-05-17  Martin Liska  <mliska@suse.cz>
12459
12460         * doc/invoke.texi: Add 2 missing dots.
12461
12462 2021-05-17  Marius Hillenbrand  <mhillen@linux.ibm.com>
12463
12464         PR bootstrap/100552
12465         * configure.ac: Replace pattern substitution with call to sed.
12466         * configure: Regenerate.
12467
12468 2021-05-17  Richard Biener  <rguenther@suse.de>
12469
12470         PR middle-end/100582
12471         * tree.c (array_at_struct_end_p): Get to the base of the
12472         reference before looking for the underlying decl.
12473
12474 2021-05-17  Joern Rennecke  <joern.rennecke@embecosm.com>
12475
12476         * genoutput.c (validate_insn_alternatives) Make "wrong number of
12477         alternatives" message more specific, and remove assumption on where
12478         the problem is.
12479
12480 2021-05-17  Christophe Lyon  <christophe.lyon@linaro.org>
12481
12482         * config/arm/iterators.md (V16): New iterator.
12483         (VH_cvtto): New iterator.
12484         (v_cmp_result): Added V4HF and V8HF support.
12485         * config/arm/vec-common.md (vec_cmp<mode><v_cmp_result>): Use VDQWH.
12486         (vcond<mode><mode>): Likewise.
12487         (vcond_mask_<mode><v_cmp_result>): Likewise.
12488         (vcond<VH_cvtto><mode>): New expander.
12489
12490 2021-05-17  Christophe Lyon  <christophe.lyon@linaro.org>
12491
12492         * config/arm/arm-protos.h (arm_expand_vector_compare): Update
12493         prototype.
12494         * config/arm/arm.c (arm_expand_vector_compare): Add support for
12495         MVE.
12496         (arm_expand_vcond): Likewise.
12497         * config/arm/iterators.md (supf): Remove VCMPNEQ_S, VCMPEQQ_S,
12498         VCMPEQQ_N_S, VCMPNEQ_N_S.
12499         (VCMPNEQ, VCMPEQQ, VCMPEQQ_N, VCMPNEQ_N): Remove.
12500         * config/arm/mve.md (@mve_vcmp<mve_cmp_op>q_<mode>): Add '@' prefix.
12501         (@mve_vcmp<mve_cmp_op>q_f<mode>): Likewise.
12502         (@mve_vcmp<mve_cmp_op>q_n_f<mode>): Likewise.
12503         (@mve_vpselq_<supf><mode>): Likewise.
12504         (@mve_vpselq_f<mode>"): Likewise.
12505         * config/arm/neon.md (vec_cmp<mode><v_cmp_result): Enable for MVE
12506         and move to vec-common.md.
12507         (vec_cmpu<mode><mode>): Likewise.
12508         (vcond<mode><mode>): Likewise.
12509         (vcond<V_cvtto><mode>): Likewise.
12510         (vcondu<mode><v_cmp_result>): Likewise.
12511         (vcond_mask_<mode><v_cmp_result>): Likewise.
12512         * config/arm/unspecs.md (VCMPNEQ_U, VCMPNEQ_S, VCMPEQQ_S)
12513         (VCMPEQQ_N_S, VCMPNEQ_N_S, VCMPEQQ_U, CMPEQQ_N_U, VCMPNEQ_N_U)
12514         (VCMPGEQ_N_S, VCMPGEQ_S, VCMPGTQ_N_S, VCMPGTQ_S, VCMPLEQ_N_S)
12515         (VCMPLEQ_S, VCMPLTQ_N_S, VCMPLTQ_S, VCMPCSQ_N_U, VCMPCSQ_U)
12516         (VCMPHIQ_N_U, VCMPHIQ_U): Remove.
12517         * config/arm/vec-common.md (vec_cmp<mode><v_cmp_result): Moved
12518         from neon.md.
12519         (vec_cmpu<mode><mode>): Likewise.
12520         (vcond<mode><mode>): Likewise.
12521         (vcond<V_cvtto><mode>): Likewise.
12522         (vcondu<mode><v_cmp_result>): Likewise.
12523         (vcond_mask_<mode><v_cmp_result>): Likewise. Added unsafe math
12524         condition.
12525
12526 2021-05-17  liuhongt  <hongtao.liu@intel.com>
12527
12528         PR target/100549
12529         * config/i386/i386.c (ix86_gimple_fold_builtin): Use
12530         gsi_insert_seq_before instead.
12531
12532 2021-05-17  Christophe Lyon  <christophe.lyon@linaro.org>
12533
12534         * doc/sourcebuild.texi (arm_qbit_ok): Rename into...
12535         (arm_sat_ok): ...this.
12536
12537 2021-05-17  Martin Liska  <mliska@suse.cz>
12538
12539         * lto-wrapper.c (merge_flto_options): Factor out a new function.
12540         (merge_and_complain): Use it.
12541         (run_gcc): Merge also linker command line -flto=foo argument
12542         with IL files.
12543
12544 2021-05-16  Christophe Lyon  <christophe.lyon@linaro.org>
12545
12546         * config/arm/arm.h (CPP_SPEC): Remove error message about
12547         -mlittle-endian/-mbig-endian conflict.
12548
12549 2021-05-15  Bill Schmidt  <wschmidt@linux.ibm.com>
12550
12551         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define
12552         __ROP_PROTECT__ if -mrop-protect is selected.
12553
12554 2021-05-15  Bill Schmidt  <wschmidt@linux.ibm.com>
12555
12556         * config/rs6000/rs6000-internal.h (rs6000_stack): Add
12557         rop_hash_save_offset and rop_hash_size.
12558         * config/rs6000/rs6000-logue.c (rs6000_stack_info): Compute
12559         rop_hash_size and rop_hash_save_offset.
12560         (debug_stack_info): Dump rop_hash_save_offset and rop_hash_size.
12561         (rs6000_emit_prologue): Emit hashst[p] in prologue.
12562         (rs6000_emit_epilogue): Emit hashchk[p] in epilogue.
12563         * config/rs6000/rs6000.md (unspec): Add UNSPEC_HASHST and
12564         UNSPEC_HASHCHK.
12565         (hashst): New define_insn.
12566         (hashchk): Likewise.
12567
12568 2021-05-15  Bill Schmidt  <wschmidt@linux.ibm.com>
12569
12570         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12571         Disable shrink wrap when inserting ROP-protect instructions.
12572         * config/rs6000/rs6000.opt (mrop-protect): New option.
12573         (mprivileged): Likewise.
12574         * doc/invoke.texi: Document mrop-protect and mprivileged.
12575
12576 2021-05-15  Hans-Peter Nilsson  <hp@axis.com>
12577
12578         * reorg.c (fill_slots_from_thread): Reinstate code typoed out in
12579         "Remove CC0".
12580
12581 2021-05-15  Martin Jambor  <mjambor@suse.cz>
12582
12583         Revert:
12584         2021-05-13  Martin Jambor  <mjambor@suse.cz>
12585
12586         PR tree-optimization/100453
12587         * tree-sra.c (sra_modify_assign): All const base accesses do not
12588         need refreshing, not just those from decl_pool.
12589         (sra_modify_assign): Do not refresh into a const base decl.
12590
12591 2021-05-15  Jakub Jelinek  <jakub@redhat.com>
12592
12593         PR rtl-optimization/100342
12594         * regcprop.c (copy_value): When copying a source reg in a wider
12595         mode than it has recorded for the value, adjust recorded destination
12596         mode too or punt if !REG_CAN_CHANGE_MODE_P.
12597
12598 2021-05-14  Jason Merrill  <jason@redhat.com>
12599
12600         * intl.h: Add comments.
12601
12602 2021-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12603
12604         * config/aarch64/aarch64-simd.md
12605         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Split into...
12606         (aarch64_sqdmlsl2_lane<mode>_internal): ... This...
12607         (aarch64_sqdmlal2_lane<mode>_internal): ... And this.
12608         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Split into ...
12609         (aarch64_sqdmlsl2_laneq<mode>_internal): ... This...
12610         (aarch64_sqdmlal2_laneq<mode>_internal): ... And this.
12611         (aarch64_sqdml<SBINQOPS:as>l2_n<mode>_internal): Split into...
12612         (aarch64_sqdmlsl2_n<mode>_internal): ... This...
12613         (aarch64_sqdmlal2_n<mode>_internal): ... And this.
12614
12615 2021-05-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12616
12617         PR target/66791
12618         * config/arm/arm_neon.h (vtst_s8): Replace call to vtst builtin with it's
12619         boolean logic equivalent.
12620         (vtst_s16): Likewise.
12621         (vtst_s32): Likewise.
12622         (vtst_u8): Likewise.
12623         (vtst_u16): Likewise.
12624         (vtst_u32): Likewise.
12625         (vtst_p8): Likewise.
12626         (vtst_p16): Likewise.
12627         (vtstq_s8): Likewise.
12628         (vtstq_s16): Likewise.
12629         (vtstq_s32): Likewise.
12630         (vtstq_u8): Likewise.
12631         (vtstq_u16): Likewise.
12632         (vtstq_u32): Likewise.
12633         (vtstq_p8): Likewise.
12634         (vtstq_p16): Likewise.
12635         * config/arm/arm_neon_builtins.def: Remove entry for vtst.
12636         * config/arm/neon.md (neon_vtst<mode>): Remove pattern.
12637
12638 2021-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12639
12640         * config/aarch64/aarch64-simd.md (aarch64_sqdmlal2<mode>): Merge into...
12641         (aarch64_sqdml<SBINQOPS:as>l2<mode>): ... This.
12642         (aarch64_sqdmlsl2<mode>): Delete.
12643         (aarch64_sqdmlal2_lane<mode>): Merge this...
12644         (aarch64_sqdmlsl2_lane<mode>): ... And this...
12645         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>): ... Into this.
12646         (aarch64_sqdmlal2_laneq<mode>): Merge this...
12647         (aarch64_sqdmlsl2_laneq<mode>): ... And this...
12648         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>): ... Into this.
12649         (aarch64_sqdmlal2_n<mode>): Merge this...
12650         (aarch64_sqdmlsl2_n<mode>): ... And this...
12651         (aarch64_sqdml<SBINQOPS:as>l2_n<mode>): ... Into this.
12652
12653 2021-05-13  Martin Sebor  <msebor@redhat.com>
12654
12655         PR middle-end/100574
12656         * builtins.c (access_ref::get_ref): Improve detection of PHIs with
12657         all null arguments.
12658
12659 2021-05-13  Martin Sebor  <msebor@redhat.com>
12660
12661         PR tree-optimization/93100
12662         PR middle-end/98583
12663         * tree-ssa-uninit.c (check_defs): Exclude intrinsic functions that
12664         don't modify referenced objects.
12665
12666 2021-05-13  Martin Jambor  <mjambor@suse.cz>
12667
12668         PR tree-optimization/100453
12669         * tree-sra.c (sra_modify_assign): All const base accesses do not
12670         need refreshing, not just those from decl_pool.
12671         (sra_modify_assign): Do not refresh into a const base decl.
12672
12673 2021-05-13  Martin Liska  <mliska@suse.cz>
12674
12675         * tree-ssa-dom.c: Remove m_simplifier.
12676
12677 2021-05-13  Richard Earnshaw  <rearnsha@arm.com>
12678
12679         PR target/100563
12680         * config/arm/arm.c (arm_canonicalize_comparison): Correctly
12681         canonicalize DImode inequality comparisons against the
12682         maximum integral value.
12683
12684 2021-05-13  Jakub Jelinek  <jakub@redhat.com>
12685
12686         PR tree-optimization/98856
12687         * config/i386/i386.c (ix86_shift_rotate_cost): Add CODE argument.
12688         Expect V2DI and V4DI arithmetic right shifts to be emulated.
12689         (ix86_rtx_costs, ix86_add_stmt_cost): Adjust ix86_shift_rotate_cost
12690         caller.
12691         * config/i386/i386-expand.c (expand_vec_perm_2perm_interleave,
12692         expand_vec_perm_2perm_pblendv): New functions.
12693         (ix86_expand_vec_perm_const_1): Use them.
12694         * config/i386/sse.md (ashr<mode>3<mask_name>): Rename to ...
12695         (<mask_codefor>ashr<mode>3<mask_name>): ... this.
12696         (ashr<mode>3): New define_expand with VI248_AVX512BW iterator.
12697         (ashrv4di3): New define_expand.
12698         (ashrv2di3): Change condition to TARGET_SSE2, handle !TARGET_XOP
12699         and !TARGET_AVX512VL expansion.
12700
12701 2021-05-13  Uroš Bizjak  <ubizjak@gmail.com>
12702
12703         PR target/100581
12704         * config/i386/i386-expand.c (ix86_expand_sse_movcc): Force mode
12705         sizes < 16 to a register when constructing vpcmov pattern.
12706         * config/i386/mmx.md (*xop_pcmov_<mode>): Use MMXMODE124 mode.
12707
12708 2021-05-13  Martin Liska  <mliska@suse.cz>
12709
12710         * gcov-io.c (gcov_write_block): Remove.
12711         (gcov_write_words): Likewise.
12712         (gcov_read_words): Re-implement using gcov_read_bytes.
12713         (gcov_allocate): Remove.
12714         (GCOV_BLOCK_SIZE): Likewise.
12715         (struct gcov_var): Remove most of the fields.
12716         (gcov_position): Implement with ftell.
12717         (gcov_rewrite): Remove setting of start and offset fields.
12718         (from_file): Re-format.
12719         (gcov_open): Remove setbuf call. It should not be needed.
12720         (gcov_close): Remove internal buffer handling.
12721         (gcov_magic): Use __builtin_bswap32.
12722         (gcov_write_counter): Use directly gcov_write_unsigned.
12723         (gcov_write_string): Use direct fwrite and do not round
12724         to 4 bytes.
12725         (gcov_seek): Use directly fseek.
12726         (gcov_write_tag): Use gcov_write_unsigned directly.
12727         (gcov_write_length): Likewise.
12728         (gcov_write_tag_length): Likewise.
12729         (gcov_read_bytes): Use directly fread.
12730         (gcov_read_unsigned): Use gcov_read_words.
12731         (gcov_read_counter): Likewise.
12732         (gcov_read_string): Use gcov_read_bytes.
12733         * gcov-io.h (GCOV_WORD_SIZE): Adjust to reflect
12734         that size is not in bytes, but words (4B).
12735         (GCOV_TAG_FUNCTION_LENGTH): Likewise.
12736         (GCOV_TAG_ARCS_LENGTH): Likewise.
12737         (GCOV_TAG_ARCS_NUM): Likewise.
12738         (GCOV_TAG_COUNTER_LENGTH): Likewise.
12739         (GCOV_TAG_COUNTER_NUM): Likewise.
12740         (GCOV_TAG_SUMMARY_LENGTH): Likewise.
12741
12742 2021-05-13  liuhongt  <hongtao.liu@intel.com>
12743
12744         PR target/94680
12745         * config/i386/sse.md (ssedoublevecmode): Add attribute for
12746         V64QI/V32HI/V16SI/V4DI.
12747         (ssehalfvecmode): Add attribute for V2DI/V2DF.
12748         (*vec_concatv4si_0): Extend to VI124_128.
12749         (*vec_concat<mode>_0): New pre-reload splitter.
12750         * config/i386/predicates.md (movq_parallel): New predicate.
12751
12752 2021-05-13  Alexandre Oliva  <oliva@adacore.com>
12753
12754         * targhooks.c (default_zero_call_used_regs): Retry using
12755         successfully-zeroed registers as sources.
12756
12757 2021-05-12  Tobias Burnus  <tobias@codesourcery.com>
12758
12759         * omp-low.c (finish_taskreg_scan): Use the proper detach decl.
12760
12761 2021-05-12  Aldy Hernandez  <aldyh@redhat.com>
12762
12763         PR c/100521
12764         * gimple-range.cc (range_of_builtin_call): Skip out on
12765           processing __builtin_clz when varying.
12766
12767 2021-05-12  Tom de Vries  <tdevries@suse.de>
12768
12769         PR target/96005
12770         * config/nvptx/nvptx-opts.h (enum ptx_version): New enum.
12771         * config/nvptx/nvptx.c (nvptx_file_start): Print .version according
12772         to ptx_version_option.
12773         * config/nvptx/nvptx.h (TARGET_PTX_6_3): Define.
12774         * config/nvptx/nvptx.md (define_insn "nvptx_shuffle<mode>")
12775         (define_insn "nvptx_vote_ballot"): Use sync variant for
12776         TARGET_PTX_6_3.
12777         * config/nvptx/nvptx.opt (ptx_version): Add enum.
12778         (mptx): Add option.
12779         * doc/invoke.texi (Nvidia PTX Options): Add mptx item.
12780
12781 2021-05-12  Richard Biener  <rguenther@suse.de>
12782
12783         PR tree-optimization/100566
12784         * tree-ssa-sccvn.c (dominated_by_p_w_unex): Properly handle
12785         allow_back for all edge queries.
12786
12787 2021-05-12  liuhongt  <hongtao.liu@intel.com>
12788
12789         PR target/99908
12790         * config/i386/sse.md (<sse4_1_avx2>_pblendvb): Add
12791         splitters for pblendvb of NOT mask register.
12792
12793 2021-05-12  Richard Biener  <rguenther@suse.de>
12794
12795         PR tree-optimization/100519
12796         * tree-ssa-reassoc.c (can_associate_p): Split into...
12797         (can_associate_op_p): ... this
12798         (can_associate_type_p): ... and this.
12799         (is_reassociable_op): Call can_associate_op_p.
12800         (break_up_subtract_bb): Call the appropriate predicates.
12801         (reassociate_bb): Likewise.
12802
12803 2021-05-12  Martin Liska  <mliska@suse.cz>
12804
12805         * lto-wrapper.c (merge_and_complain): Merge -flto=arg options.
12806         (run_gcc): Use -flto argument detection for merged
12807         fdecoded_options.
12808
12809 2021-05-12  Martin Liska  <mliska@suse.cz>
12810
12811         * lto-wrapper.c (print_lto_docs_link): New function.
12812         (run_gcc): Print warning about missing job server detection
12813         after we know NR of partitions. Do the same for -flto{,=1}.
12814         * opts.c (get_option_html_page): Support -flto option.
12815
12816 2021-05-12  Martin Liska  <mliska@suse.cz>
12817
12818         * lto-wrapper.c (get_options_from_collect_gcc_options): Change
12819         return type.
12820         (append_option): Remove.
12821         (find_option): Rework to use the vector type.
12822         (remove_option): Remove.
12823         (merge_and_complain): Use vectors for cl_decoded_option data
12824         type arguments.
12825         (append_compiler_options): Likewise.
12826         (append_diag_options): Likewise.
12827         (append_linker_options): Likewise.
12828         (append_offload_options): Likewise.
12829         (compile_offload_image): Likewise.
12830         (compile_images_for_offload_targets): Likewise.
12831         (find_and_merge_options): Likewise.
12832         (run_gcc): Likewise.
12833
12834 2021-05-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12835
12836         PR debug/100515
12837         * dwarf2out.c (dwarf2out_finish): Set
12838         have_multiple_function_sections with multi-range text_section.
12839
12840 2021-05-12  Martin Liska  <mliska@suse.cz>
12841
12842         PR bootstrap/100560
12843         * Makefile.in: Remove version.h from linker command line.
12844
12845 2021-05-12  Richard Biener  <rguenther@suse.de>
12846
12847         PR middle-end/100547
12848         * rtl.h (rtvec_alloc): Make argument size_t.
12849         * rtl.c (rtvec_alloc): Verify the count is less than INT_MAX.
12850
12851 2021-05-12  Jakub Jelinek  <jakub@redhat.com>
12852
12853         PR middle-end/100508
12854         * cfgexpand.c (expand_debug_expr): For DEBUG_EXPR_DECL with vector
12855         type, don't reuse DECL_RTL if it has different mode, instead force
12856         creation of a new DEBUG_EXPR.
12857
12858 2021-05-12  Jakub Jelinek  <jakub@redhat.com>
12859             Marc Glisse  <marc.glisse@inria.fr>
12860
12861         PR tree-optimization/94589
12862         * match.pd ((X & Y) == X -> (X & ~Y) == 0,
12863         (X | Y) == Y -> (X & ~Y) == 0): New GIMPLE simplifications.
12864
12865 2021-05-12  Uroš Bizjak  <ubizjak@gmail.com>
12866
12867         PR target/98218
12868         * config/i386/i386-expand.c (ix86_expand_sse_movcc): Handle V2SF mode.
12869         * config/i386/mmx.md (MMXMODE124): New mode iterator.
12870         (V2FI): Ditto.
12871         (mmxintvecmode): New mode attribute.
12872         (mmxintvecmodelower): Ditto.
12873         (*mmx_maskcmpv2sf3_comm): New insn pattern.
12874         (*mmx_maskcmpv2sf3): Ditto.
12875         (vec_cmpv2sfv2si): New expander.
12876         (vcond<V2FI:mode>v2si): Ditto.
12877         (mmx_vlendvps): New insn pattern.
12878         (vcond<MMXMODE124:mode><MMXMODEI:mode>): Also handle V2SFmode.
12879         (vcondu<MMXMODE124:mode><MMXMODEI:mode>): Ditto.
12880         (vcond_mask_<mode><mmxintvecmodelower>): Ditto.
12881
12882 2021-05-11  Martin Sebor  <msebor@redhat.com>
12883
12884         PR middle-end/21433
12885         * expr.c (expand_expr_real_1): Replace unreachable code with an assert.
12886
12887 2021-05-11  Richard Biener  <rguenther@suse.de>
12888
12889         * gimple-fold.c (gimple_fold_call): Do not call
12890         maybe_fold_reference on call arguments or the static chain.
12891         (fold_stmt_1): Do not call maybe_fold_reference on GIMPLE_ASM
12892         inputs.
12893
12894 2021-05-11  Martin Liska  <mliska@suse.cz>
12895
12896         * builtins.def (DEF_HSAIL_BUILTIN): Remove.
12897         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
12898         (DEF_HSAIL_SAT_BUILTIN): Likewise.
12899         (DEF_HSAIL_INTR_BUILTIN): Likewise.
12900         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
12901         * doc/frontends.texi: Remove BRIG.
12902         * doc/install.texi: Likewise.
12903         * doc/invoke.texi: Likewise.
12904         * doc/standards.texi: Likewise.
12905         * brig-builtins.def: Removed.
12906         * brig/ChangeLog: Removed.
12907         * brig/Make-lang.in: Removed.
12908         * brig/brig-builtins.h: Removed.
12909         * brig/brig-c.h: Removed.
12910         * brig/brig-lang.c: Removed.
12911         * brig/brigfrontend/brig-arg-block-handler.cc: Removed.
12912         * brig/brigfrontend/brig-atomic-inst-handler.cc: Removed.
12913         * brig/brigfrontend/brig-basic-inst-handler.cc: Removed.
12914         * brig/brigfrontend/brig-branch-inst-handler.cc: Removed.
12915         * brig/brigfrontend/brig-cmp-inst-handler.cc: Removed.
12916         * brig/brigfrontend/brig-code-entry-handler.cc: Removed.
12917         * brig/brigfrontend/brig-code-entry-handler.h: Removed.
12918         * brig/brigfrontend/brig-comment-handler.cc: Removed.
12919         * brig/brigfrontend/brig-control-handler.cc: Removed.
12920         * brig/brigfrontend/brig-copy-move-inst-handler.cc: Removed.
12921         * brig/brigfrontend/brig-cvt-inst-handler.cc: Removed.
12922         * brig/brigfrontend/brig-fbarrier-handler.cc: Removed.
12923         * brig/brigfrontend/brig-function-handler.cc: Removed.
12924         * brig/brigfrontend/brig-function.cc: Removed.
12925         * brig/brigfrontend/brig-function.h: Removed.
12926         * brig/brigfrontend/brig-inst-mod-handler.cc: Removed.
12927         * brig/brigfrontend/brig-label-handler.cc: Removed.
12928         * brig/brigfrontend/brig-lane-inst-handler.cc: Removed.
12929         * brig/brigfrontend/brig-machine.c: Removed.
12930         * brig/brigfrontend/brig-machine.h: Removed.
12931         * brig/brigfrontend/brig-mem-inst-handler.cc: Removed.
12932         * brig/brigfrontend/brig-module-handler.cc: Removed.
12933         * brig/brigfrontend/brig-queue-inst-handler.cc: Removed.
12934         * brig/brigfrontend/brig-seg-inst-handler.cc: Removed.
12935         * brig/brigfrontend/brig-signal-inst-handler.cc: Removed.
12936         * brig/brigfrontend/brig-to-generic.cc: Removed.
12937         * brig/brigfrontend/brig-to-generic.h: Removed.
12938         * brig/brigfrontend/brig-util.cc: Removed.
12939         * brig/brigfrontend/brig-util.h: Removed.
12940         * brig/brigfrontend/brig-variable-handler.cc: Removed.
12941         * brig/brigfrontend/hsa-brig-format.h: Removed.
12942         * brig/brigfrontend/phsa.h: Removed.
12943         * brig/brigspec.c: Removed.
12944         * brig/config-lang.in: Removed.
12945         * brig/gccbrig.texi: Removed.
12946         * brig/lang-specs.h: Removed.
12947         * brig/lang.opt: Removed.
12948
12949 2021-05-11  Richard Biener  <rguenther@suse.de>
12950
12951         PR ipa/100513
12952         * ipa-param-manipulation.c
12953         (ipa_param_body_adjustments::modify_call_stmt): Avoid
12954         altering SSA_NAME_DEF_STMT by adjusting the calls LHS
12955         via gimple_call_lhs_ptr.
12956
12957 2021-05-11  Alex Coplan  <alex.coplan@arm.com>
12958
12959         PR target/99725
12960         * config/arm/arm.c (cmse_nonsecure_call_inline_register_clear):
12961         Avoid emitting CFA adjusts on the sp if we have the fp.
12962
12963 2021-05-11  Richard Sandiford  <richard.sandiford@arm.com>
12964
12965         * config/aarch64/iterators.md (VMUL_CHANGE_NLANES): Delete.
12966         (VMULD): New iterator.
12967         (VCOND): Handle V4HF and V8HF.
12968         (VCONQ): Fix entry for V2SF.
12969         * config/aarch64/aarch64-simd.md (mul_lane<mode>3): Use VMULD
12970         instead of VMUL.  Use a 64-bit vector mode for the indexed operand.
12971         (*aarch64_mul3_elt_<vswap_width_name><mode>): Merge with...
12972         (mul_laneq<mode>3): ...this define_insn.  Use VMUL instead of VDQSF.
12973         Use a 128-bit vector mode for the indexed operand.  Use stype for
12974         the scheduling type.
12975
12976 2021-05-11  Richard Biener  <rguenther@suse.de>
12977
12978         * gimple-fold.c (maybe_fold_reference): Only return
12979         is_gimple_min_invariant values.
12980
12981 2021-05-11  Richard Biener  <rguenther@suse.de>
12982
12983         PR middle-end/100509
12984         * gimple-fold.c (fold_gimple_assign): Only call
12985         get_symbol_constant_value on register type symbols.
12986
12987 2021-05-11  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
12988             Joe Ramsay   <joe.ramsay@arm.com>
12989
12990         PR target/100419
12991         * config/arm/arm_mve.h (__arm_vstrwq_scatter_offset): Fix wrong arguments.
12992         (__arm_vcmpneq): Remove duplicate definition.
12993         (__arm_vstrwq_scatter_offset_p): Likewise.
12994         (__arm_vmaxq_x): Likewise.
12995         (__arm_vmlsdavaq): Likewise.
12996         (__arm_vmlsdavaxq): Likewise.
12997         (__arm_vmlsdavq_p): Likewise.
12998         (__arm_vmlsdavxq_p): Likewise.
12999         (__arm_vrmlaldavhaq): Likewise.
13000         (__arm_vstrbq_p): Likewise.
13001         (__arm_vstrbq_scatter_offset): Likewise.
13002         (__arm_vstrbq_scatter_offset_p): Likewise.
13003         (__arm_vstrdq_scatter_offset): Likewise.
13004         (__arm_vstrdq_scatter_offset_p): Likewise.
13005         (__arm_vstrdq_scatter_shifted_offset): Likewise.
13006         (__arm_vstrdq_scatter_shifted_offset_p): Likewise.
13007
13008 2021-05-11  Jakub Jelinek  <jakub@redhat.com>
13009
13010         PR middle-end/100471
13011         * omp-low.c (lower_omp_task_reductions): For OMP_TASKLOOP, if data
13012         is 0, bypass the reduction loop including
13013         GOMP_taskgroup_reduction_unregister call.
13014
13015 2021-05-11  Kewen Lin  <linkw@linux.ibm.com>
13016
13017         * config/rs6000/rs6000.c (struct rs6000_cost_data): New member
13018         costing_for_scalar.
13019         (rs6000_density_test): Early return if costing_for_scalar is true.
13020         (rs6000_init_cost): Init costing_for_scalar of rs6000_cost_data.
13021
13022 2021-05-11  Kewen Lin  <linkw@linux.ibm.com>
13023
13024         * doc/tm.texi: Regenerated.
13025         * target.def (init_cost): Add new parameter costing_for_scalar.
13026         * targhooks.c (default_init_cost): Adjust for new parameter.
13027         * targhooks.h (default_init_cost): Likewise.
13028         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13029         (vect_compute_single_scalar_iteration_cost): Likewise.
13030         (vect_analyze_loop_2): Likewise.
13031         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13032         (vect_bb_vectorization_profitable_p): Likewise.
13033         * tree-vectorizer.h (init_cost): Likewise.
13034         * config/aarch64/aarch64.c (aarch64_init_cost): Likewise.
13035         * config/i386/i386.c (ix86_init_cost): Likewise.
13036         * config/rs6000/rs6000.c (rs6000_init_cost): Likewise.
13037
13038 2021-05-11  Kewen Lin  <linkw@linux.ibm.com>
13039
13040         * config/rs6000/rs6000.c (rs6000_vect_nonmem): Renamed to
13041         vect_nonmem and moved into...
13042         (struct rs6000_cost_data): ...here.
13043         (rs6000_init_cost): Use vect_nonmem of cost_data instead.
13044         (rs6000_add_stmt_cost): Likewise.
13045         (rs6000_finish_cost): Likewise.
13046
13047 2021-05-10  Eric Botcazou  <ebotcazou@adacore.com>
13048
13049         * range-op.cc (get_bool_state): Adjust head comment.
13050         (operator_not_equal::op1_range): Fix comment.
13051         (operator_bitwise_xor::op1_range): Remove call to gcc_unreachable.
13052
13053 2021-05-10  Martin Sebor  <msebor@redhat.com>
13054
13055         PR middle-end/100425
13056         PR middle-end/100510
13057         * gimple-ssa-warn-alloca.c (pass_walloca::firast_time_p): Rename...
13058         (pass_walloca::xlimit_certain_p): ...to this.
13059         (pass_walloca::gate): Execute for any kind of handled warning.
13060         (pass_walloca::execute): Avoid issuing "maybe" and "unbounded"
13061         warnings when xlimit_certain_p is set.
13062
13063 2021-05-10  Pat Haugen  <pthaugen@linux.ibm.com>
13064
13065         * config/rs6000/rs6000.c (rs6000_ira_change_pseudo_allocno_class):
13066         Return ALTIVEC_REGS if that is best_class.
13067         (rs6000_compute_pressure_classes): Add ALTIVEC_REGS.
13068
13069 2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>
13070
13071         * config/arm/arm.h (CPP_SPEC): Remove error message about
13072         -mfloat-abi.
13073
13074 2021-05-10  Martin Jambor  <mjambor@suse.cz>
13075
13076         * ipa-prop.h (IPA_NODE_REF): Removed.
13077         (IPA_NODE_REF_GET_CREATE): Likewise.
13078         (IPA_EDGE_REF): Likewise.
13079         (IPA_EDGE_REF_GET_CREATE): Likewise.
13080         (IS_VALID_JUMP_FUNC_INDEX): Likewise.
13081         * ipa-cp.c (print_all_lattices): Replaced IPA_NODE_REF with a direct
13082         use of ipa_node_params_sum.
13083         (ipcp_versionable_function_p): Likewise.
13084         (push_node_to_stack): Likewise.
13085         (pop_node_from_stack): Likewise.
13086         (set_single_call_flag): Replaced two IPA_NODE_REF with one single
13087         direct use of ipa_node_params_sum.
13088         (initialize_node_lattices): Replaced IPA_NODE_REF with a direct use of
13089         ipa_node_params_sum.
13090         (ipa_context_from_jfunc): Replaced IPA_EDGE_REF with a direct use of
13091         ipa_edge_args_sum.
13092         (ipcp_verify_propagated_values): Replaced IPA_NODE_REF with a direct
13093         use of ipa_node_params_sum.
13094         (self_recursively_generated_p): Likewise.
13095         (propagate_scalar_across_jump_function): Likewise.
13096         (propagate_context_across_jump_function): Replaced IPA_EDGE_REF with a
13097         direct use of ipa_edge_args_sum, moved the lookup after the early
13098         exit.  Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum.
13099         (propagate_bits_across_jump_function): Replaced IPA_NODE_REF with
13100         direct uses of ipa_node_params_sum.
13101         (propagate_vr_across_jump_function): Likewise.
13102         (propagate_aggregate_lattice): Likewise.
13103         (propagate_aggs_across_jump_function): Likewise.
13104         (propagate_constants_across_call): Likewise, also replaced
13105         IPA_EDGE_REF with a direct use of ipa_edge_args_sum.
13106         (good_cloning_opportunity_p): Replaced IPA_NODE_REF with a direct use
13107         of ipa_node_params_sum.
13108         (estimate_local_effects): Likewise.
13109         (add_all_node_vals_to_toposort): Likewise.
13110         (propagate_constants_topo): Likewise.
13111         (ipcp_propagate_stage): Likewise.
13112         (ipcp_discover_new_direct_edges): Likewise.
13113         (calls_same_node_or_its_all_contexts_clone_p): Likewise.
13114         (cgraph_edge_brings_value_p): Likewise (in both overloaded functions).
13115         (get_info_about_necessary_edges): Likewise.
13116         (want_remove_some_param_p): Likewise.
13117         (create_specialized_node): Likewise.
13118         (self_recursive_pass_through_p): Likewise.
13119         (self_recursive_agg_pass_through_p): Likewise.
13120         (find_more_scalar_values_for_callers_subset): Likewise and also
13121         replaced IPA_EDGE_REF with direct uses of ipa_edge_args_sum, in one
13122         case replacing two of those with a single query.
13123         (find_more_contexts_for_caller_subset): Likewise for the
13124         ipa_polymorphic_call_context overload.
13125         (intersect_aggregates_with_edge): Replaced IPA_EDGE_REF with a direct
13126         use of ipa_edge_args_sum.  Replaced IPA_NODE_REF with direct uses of
13127         ipa_node_params_sum.
13128         (find_aggregate_values_for_callers_subset): Likewise, also reusing
13129         results of ipa_edge_args_sum->get.
13130         (cgraph_edge_brings_all_scalars_for_node): Replaced IPA_NODE_REF with
13131         direct uses of ipa_node_params_sum, replaced IPA_EDGE_REF with a
13132         direct use of ipa_edge_args_sum.
13133         (cgraph_edge_brings_all_agg_vals_for_node): Likewise, moved node
13134         summary query after the early exit and reused the result later.
13135         (decide_about_value): Replaced IPA_NODE_REF with a direct use of
13136         ipa_node_params_sum.
13137         (decide_whether_version_node): Likewise.  Removed re-querying for
13138         summaries after cloning.
13139         (spread_undeadness): Replaced IPA_NODE_REF with a direct use of
13140         ipa_node_params_sum.
13141         (has_undead_caller_from_outside_scc_p): Likewise, reusing results of
13142         some queries.
13143         (identify_dead_nodes): Likewise.
13144         (ipcp_store_bits_results): Replaced IPA_NODE_REF with direct uses of
13145         ipa_node_params_sum.
13146         (ipcp_store_vr_results): Likewise.
13147         * ipa-fnsummary.c (evaluate_properties_for_edge): Likewise.
13148         (ipa_fn_summary_t::duplicate): Likewise.
13149         (analyze_function_body): Likewise.
13150         (estimate_calls_size_and_time): Likewise.
13151         (ipa_cached_call_context::duplicate_from): Likewise.
13152         (ipa_call_context::equal_to): Likewise.
13153         (remap_edge_params): Likewise.
13154         (ipa_merge_fn_summary_after_inlining): Likewise.
13155         (inline_read_section): Likewise.
13156         * ipa-icf.c (sem_function::param_used_p): Likewise.
13157         * ipa-modref.c (compute_parm_map): Likewise.
13158         (compute_parm_map): Replaced IPA_EDGE_REF with a direct use of
13159         ipa_edge_args_sum.
13160         (get_access_for_fnspec): Replaced IPA_NODE_REF with a direct use of
13161         ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of
13162         ipa_edge_args_sum.
13163         * ipa-profile.c (check_argument_count): Likewise.
13164         * ipa-prop.c (ipa_alloc_node_params): Replaced IPA_NODE_REF_GET_CREATE
13165         with a direct use of ipa_node_params_sum.
13166         (ipa_initialize_node_params): Likewise.
13167         (ipa_print_node_jump_functions_for_edge): Replaced IPA_EDGE_REF with a
13168         direct use of ipa_edge_args_sum and reused the query result.
13169         (ipa_compute_jump_functions_for_edge): Replaced IPA_NODE_REF with a
13170         direct use of ipa_node_params_sum and replaced IPA_EDGE_REF with a
13171         direct use of ipa_edge_args_sum.
13172         (ipa_note_param_call): Replaced IPA_NODE_REF with a direct use of
13173         ipa_node_params_sum and reused the result of the query.
13174         (ipa_analyze_node): Likewise.
13175         (ipa_analyze_controlled_uses): Replaced IPA_NODE_REF with a direct use
13176         of ipa_node_params_sum.
13177         (update_jump_functions_after_inlining): Replaced IPA_EDGE_REF with
13178         direct uses of ipa_edge_args_sum.
13179         (update_indirect_edges_after_inlining): Replaced IPA_NODE_REF with
13180         direct uses of ipa_node_params_sum and replaced IPA_EDGE_REF with a
13181         direct use of ipa_edge_args_sum.  Removed superficial re-querying the
13182         top edge summary.
13183         (propagate_controlled_uses): Replaced IPA_NODE_REF with direct uses of
13184         ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of
13185         ipa_edge_args_sum.
13186         (ipa_propagate_indirect_call_infos): Replaced IPA_EDGE_REF with a
13187         direct use of ipa_edge_args_sum.
13188         (ipa_edge_args_sum_t::duplicate): Replaced IPA_NODE_REF with a direct
13189         use of ipa_node_params_sum.
13190         (ipa_print_node_params): Likewise.
13191         (ipa_write_node_info): Likewise and also replaced IPA_EDGE_REF with
13192         direct uses of ipa_edge_args_sum.
13193         (ipa_read_edge_info): Replaced IPA_EDGE_REF with a direct use of
13194         ipa_edge_args_sum.
13195         (ipa_read_node_info): Replaced IPA_NODE_REF with a direct use of
13196         ipa_node_params_sum.
13197         (ipa_prop_write_jump_functions): Likewise.  Move variable node to the
13198         scopes where it is used.
13199
13200 2021-05-10  Uroš Bizjak  <ubizjak@gmail.com>
13201
13202         * config/i386/i386-expand.c (ix86_expand_sse_movcc)
13203         <case E_V2SImode>: Force op_true to register.
13204
13205 2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>
13206
13207         * config/arm/iterators.md (MVE_FP_COMPARISONS): New.
13208         * config/arm/mve.md (mve_vcmp<mve_cmp_op>q_f<mode>)
13209         (mve_vcmp<mve_cmp_op>q_n_f<mode>): New, merge all vcmp_*f*
13210         patterns.
13211         (mve_vcmpeqq_f<mode>, mve_vcmpeqq_n_f<mode>, mve_vcmpgeq_f<mode>)
13212         (mve_vcmpgeq_n_f<mode>, mve_vcmpgtq_f<mode>)
13213         (mve_vcmpgtq_n_f<mode>, mve_vcmpleq_f<mode>)
13214         (mve_vcmpleq_n_f<mode>, mve_vcmpltq_f<mode>)
13215         (mve_vcmpltq_n_f<mode>, mve_vcmpneq_f<mode>)
13216         (mve_vcmpneq_n_f<mode>): Remove.
13217         * config/arm/unspecs.md (VCMPEQQ_F, VCMPEQQ_N_F, VCMPGEQ_F)
13218         (VCMPGEQ_N_F, VCMPGTQ_F, VCMPGTQ_N_F, VCMPLEQ_F, VCMPLEQ_N_F)
13219         (VCMPLTQ_F, VCMPLTQ_N_F, VCMPNEQ_F, VCMPNEQ_N_F): Remove.
13220
13221 2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>
13222
13223         * config/arm/iterators.md (MVE_COMPARISONS): New.
13224         (mve_cmp_op): New.
13225         (mve_cmp_type): New.
13226         * config/arm/mve.md (mve_vcmp<mve_cmp_op>q_<mode>): New, merge all
13227         mve_vcmp patterns.
13228         (mve_vcmpneq_<mode>, mve_vcmpcsq_n_<mode>, mve_vcmpcsq_<mode>)
13229         (mve_vcmpeqq_n_<mode>, mve_vcmpeqq_<mode>, mve_vcmpgeq_n_<mode>)
13230         (mve_vcmpgeq_<mode>, mve_vcmpgtq_n_<mode>, mve_vcmpgtq_<mode>)
13231         (mve_vcmphiq_n_<mode>, mve_vcmphiq_<mode>, mve_vcmpleq_n_<mode>)
13232         (mve_vcmpleq_<mode>, mve_vcmpltq_n_<mode>, mve_vcmpltq_<mode>)
13233         (mve_vcmpneq_n_<mode>, mve_vcmpltq_n_<mode>, mve_vcmpltq_<mode>)
13234         (mve_vcmpneq_n_<mode>): Remove.
13235
13236 2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>
13237
13238         * config/arm/arm_mve.h (__arm_vcmp*): Remove 's' suffix.
13239         * config/arm/arm_mve_builtins.def (vcmp*): Remove 's' suffix.
13240         * config/arm/mve.md (mve_vcmp*): Remove 's' suffix in pattern
13241         names.
13242
13243 2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>
13244
13245         * config/arm/arm_mve_builtins.def (vcmpneq_u): Remove.
13246         (vcmpneq_n_u): Likewise.
13247         (vcmpeqq_u,): Likewise.
13248         (vcmpeqq_n_u): Likewise.
13249         * config/arm/iterators.md (supf): Remove VCMPNEQ_U, VCMPEQQ_U,
13250         VCMPEQQ_N_U and VCMPNEQ_N_U.
13251         * config/arm/mve.md (mve_vcmpneq): Remove <supf> iteration.
13252         (mve_vcmpeqq_n): Likewise.
13253         (mve_vcmpeqq): Likewise.
13254         (mve_vcmpneq_n): Likewise.
13255
13256 2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>
13257
13258         * config/arm/arm_mve.h (__arm_vcmpeq*u*, __arm_vcmpne*u*): Call
13259         the 's' version of the builtin.
13260
13261 2021-05-10  Richard Biener  <rguenther@suse.de>
13262
13263         PR tree-optimization/100492
13264         * tree-loop-distribution.c (find_seed_stmts_for_distribution):
13265         Find nothing when the loop contains an irreducible region.
13266
13267 2021-05-10  Richard Biener  <rguenther@suse.de>
13268
13269         PR middle-end/100464
13270         PR c++/100468
13271         * gimple-fold.c (canonicalize_constructor_val): Do not set
13272         TREE_ADDRESSABLE.
13273
13274 2021-05-10  Richard Biener  <rguenther@suse.de>
13275
13276         PR tree-optimization/100434
13277         * tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle
13278         call LHS.
13279         (dse_optimize_stmt): Handle call LHS by dropping the
13280         LHS or the whole call if it doesn't have other
13281         side-effects.
13282         (pass_dse::execute): Adjust.
13283
13284 2021-05-10  Martin Liska  <mliska@suse.cz>
13285
13286         * Makefile.in: Add missing genversion rule.
13287
13288 2021-05-10  Alex Coplan  <alex.coplan@arm.com>
13289
13290         PR target/99960
13291         * config/arm/mve.md (*mve_mov<mode>): Simplify output code. Use
13292         vldrw.u32 and vstrw.32 for V2D[IF]mode loads and stores.
13293
13294 2021-05-10  Martin Liska  <mliska@suse.cz>
13295
13296         * builtins.c (is_builtin_name): Use startswith
13297         function instead of strncmp.
13298         * collect2.c (main): Likewise.
13299         (has_lto_section): Likewise.
13300         (scan_libraries): Likewise.
13301         * coverage.c (coverage_checksum_string): Likewise.
13302         (coverage_init): Likewise.
13303         * dwarf2out.c (is_cxx): Likewise.
13304         (gen_compile_unit_die): Likewise.
13305         * gcc-ar.c (main): Likewise.
13306         * gcc.c (init_spec): Likewise.
13307         (read_specs): Likewise.
13308         (execute): Likewise.
13309         (check_live_switch): Likewise.
13310         * genattrtab.c (write_attr_case): Likewise.
13311         (IS_ATTR_GROUP): Likewise.
13312         * gencfn-macros.c (main): Likewise.
13313         * gengtype.c (type_for_name): Likewise.
13314         (gen_rtx_next): Likewise.
13315         (get_file_langdir): Likewise.
13316         (write_local): Likewise.
13317         * genmatch.c (get_operator): Likewise.
13318         (get_operand_type): Likewise.
13319         (expr::gen_transform): Likewise.
13320         * genoutput.c (validate_optab_operands): Likewise.
13321         * incpath.c (add_sysroot_to_chain): Likewise.
13322         * langhooks.c (lang_GNU_C): Likewise.
13323         (lang_GNU_CXX): Likewise.
13324         (lang_GNU_Fortran): Likewise.
13325         (lang_GNU_OBJC): Likewise.
13326         * lto-wrapper.c (run_gcc): Likewise.
13327         * omp-general.c (omp_max_simt_vf): Likewise.
13328         * omp-low.c (omp_runtime_api_call): Likewise.
13329         * opts-common.c (parse_options_from_collect_gcc_options): Likewise.
13330         * read-rtl-function.c (function_reader::read_rtx_operand_r): Likewise.
13331         * real.c (real_from_string): Likewise.
13332         * selftest.c (assert_str_startswith): Likewise.
13333         * timevar.c (timer::validate_phases): Likewise.
13334         * tree.c (get_file_function_name): Likewise.
13335         * ubsan.c (ubsan_use_new_style_p): Likewise.
13336         * varasm.c (default_function_rodata_section): Likewise.
13337         (incorporeal_function_p): Likewise.
13338         (default_section_type_flags): Likewise.
13339         * system.h (startswith): Define startswith.
13340
13341 2021-05-10  Martin Liska  <mliska@suse.cz>
13342
13343         * bitmap.h (class auto_bitmap): Remove
13344         __cplusplus >= 201103.
13345         * config/aarch64/aarch64.c: Likewise.
13346         * gimple-ssa-store-merging.c (store_immediate_info::store_immediate_info):
13347         Likewise.
13348         * sbitmap.h: Likewise.
13349
13350 2021-05-10  Martin Liska  <mliska@suse.cz>
13351
13352         * Makefile.in: Rename gcov-iov to genversion and depend
13353         on version.h (instead of gcov-iov.h).
13354         * gcov-io.h: Include version.h instread of gcov-iov.h.
13355         * gengtype-state.c (read_state_version): Likewise.
13356         * gcov-iov.c: Moved to...
13357         * genversion.c: ...here.
13358         * lto-streamer.h (LTO_major_version): Define it with
13359         GCC_major_version.
13360         * version.c: Removed.
13361         * version.h: Removed.
13362
13363 2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
13364
13365         * config/arc/arc.md (UNSPEC_ARC_DMPYWH): Define.
13366         * config/arc/simdext.md (VCT): Add predicates for iterator
13367         elements.
13368         (EMUVEC): Define.
13369         (voptab): Likewise.
13370         (vec_widen_<V_US>mult_hi_v4hi): Change pattern predicate.
13371         (<voptab>v2si3): New patterns.
13372         (neg): Likewise.
13373         (reduc_plus_scal_v4hi): Likewise.
13374         (reduc_plus_scal_v2si): Likewise.
13375         (vec_duplicatev2si): Likewise.
13376         (vec_duplicatev4hi): Likewise.
13377
13378 2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
13379
13380         * config/arc/simdext.md: Format and cleanup file.
13381
13382 2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
13383
13384         * config/arc/simdext.md (movmisalignv2hi): Allow misaligned access
13385         only when munaligned-access option is on.
13386         (movmisalign<mode>): Likewise.
13387
13388 2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
13389
13390         * common/config/arc/arc-common.c (arc_handle_option): Remove dot
13391         from string.
13392         * config/arc/arc.c (arc_reorg): Remove underscore from string.
13393
13394 2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
13395
13396         * config/arc/arc.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13397         (CTZ_DEFINED_VALUE_AT_ZERO): Likewise.
13398         * config/arc/arc.md (clrsbsi2): Cleanup pattern.
13399         (norm_f): Likewise.
13400         (ffs): Likewise.
13401         (ffs_f): Likewise.
13402         (clzsi2): Use fls instruction when available.
13403         (arc_clzsi2): Likewise.
13404
13405 2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
13406
13407         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add r26 and r27.
13408
13409 2021-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
13410
13411         * doc/extend.texi (__builtin_arc_sr): Swap arguments.
13412
13413 2021-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13414
13415         PR middle-end/100467
13416         * toplev.c (compile_file): Call insn_locations_init before
13417         targetm.asm_out.code_end.
13418
13419 2021-05-07  Andrew Stubbs  <ams@codesourcery.com>
13420
13421         Revert:
13422         2021-05-07  Andrew Stubbs  <ams@codesourcery.com>
13423
13424         * config/gcn/gcn.c (gcn_scalar_mode_supported_p): Disable TImode.
13425
13426 2021-05-07  Jakub Jelinek  <jakub@redhat.com>
13427             Andrew Stubbs  <amd@codesourcery.com>
13428
13429         PR target/100418
13430         * builtins.c (try_store_by_multiple_pieces): Use force_operand for
13431         emit_move_insn operands.
13432
13433 2021-05-07  Eric Botcazou  <ebotcazou@adacore.com>
13434
13435         * cfgexpand.c (expand_gimple_basic_block): Do not inherit a current
13436         location for the outgoing edges of an empty block.
13437         * dwarf2out.c (add_subscript_info): Retrieve the bounds and index
13438         type by means of the get_array_descr_info langhook, if it is set and
13439         returns true.  Remove obsolete code dealing with unnamed subtypes.
13440
13441 2021-05-07  Andrew MacLeod  <amacleod@redhat.com>
13442
13443         * gimple-range-cache.cc (ssa_block_ranges): Virtualize.
13444         (sbr_vector): Renamed from ssa_block_cache.
13445         (sbr_vector::sbr_vector): Allocate from obstack abd initialize.
13446         (ssa_block_ranges::~ssa_block_ranges): Remove.
13447         (sbr_vector::set_bb_range): Use varying and undefined cached values.
13448         (ssa_block_ranges::set_bb_varying): Remove.
13449         (sbr_vector::get_bb_range): Adjust assert.
13450         (sbr_vector::bb_range_p): Adjust assert.
13451         (~block_range_cache): No freeing loop required.
13452         (block_range_cache::get_block_ranges): Remove.
13453         (block_range_cache::set_bb_range): Inline get_block_ranges.
13454         (block_range_cache::set_bb_varying): Remove.
13455         * gimple-range-cache.h (set_bb_varying): Remove prototype.
13456         * value-range.h (irange_allocator::get_memory): New.
13457
13458 2021-05-07  Andrew MacLeod  <amacleod@redhat.com>
13459
13460         * gimple-range-cache.cc (non_null_ref::non_null_deref_p): Search
13461         dominator tree is available and requested.
13462         (ranger_cache::ssa_range_in_bb): Don't search dom tree here.
13463         (ranger_cache::fill_block_cache): Don't search dom tree here either.
13464         * gimple-range-cache.h (non_null_deref_p): Add dom_search param.
13465
13466 2021-05-07  Andrew MacLeod  <amacleod@redhat.com>
13467
13468         * gimple-range.cc (gimple_ranger::range_on_exit): Handle block with
13469         only PHI nodes better.
13470
13471 2021-05-07  Andrew MacLeod  <amacleod@redhat.com>
13472
13473         * gimple-range-edge.h (gimple_outgoing_range): Rename from
13474         outgoing_range.
13475         (gcond_edge_range): Export prototype.
13476         * gimple-range-edge.cc (gcond_edge_range): New.
13477         (gimple_outgoing_range::edge_range_p): Use gcond_edge_range.
13478         * gimple-range-gori.h (gori_compute): Use gimple_outgoing_range.
13479
13480 2021-05-07  Andrew MacLeod  <amacleod@redhat.com>
13481
13482         * gimple-range-edge.cc (outgoing_range::calc_switch_ranges): Compute
13483         default range into a temp and allocate only what is needed.
13484
13485 2021-05-07  Andrew MacLeod  <amacleod@redhat.com>
13486
13487         * range-op.cc (operator_trunc_mod::wi_fold): x % 0 is UNDEFINED.
13488
13489 2021-05-07  Andrew MacLeod  <amacleod@redhat.com>
13490
13491         * gimple-range.h (gimple_range_global): Pick up parameter initial
13492         values, and use-before defined locals are UNDEFINED.
13493
13494 2021-05-07  Eric Botcazou  <ebotcazou@adacore.com>
13495
13496         * doc/extend.texi (scalar_storage_order): Mention effect on pointer
13497         and vector fields.
13498         * tree.h (reverse_storage_order_for_component_p): Return false if
13499         the type is a pointer.
13500
13501 2021-05-07  Andrew Stubbs  <ams@codesourcery.com>
13502
13503         * config/gcn/gcn.c (gcn_scalar_mode_supported_p): Disable TImode.
13504
13505 2021-05-07  Uroš Bizjak  <ubizjak@gmail.com>
13506
13507         PR target/98218
13508         * config/i386/i386-expand.c (ix86_expand_sse_movcc):
13509         Handle V8QI, V4HI and V2SI modes.
13510         * config/i386/mmx.md (mmx_pblendvb): New insn pattern.
13511         * config/i386/sse.md (unspec): Move UNSPEC_BLENDV ...
13512         * config/i386/i386.md (unspec): ... here.
13513
13514 2021-05-07  Tobias Burnus  <tobias@codesourcery.com>
13515             Tom de Vries  <tdevries@suse.de>
13516
13517         * omp-low.c (lower_rec_simd_input_clauses): Set max_vf = 1 if
13518         a truth_value_p reduction variable is nonintegral.
13519
13520 2021-05-07  Uroš Bizjak  <ubizjak@gmail.com>
13521
13522         PR target/100445
13523         * config/i386/i386-expand.c (ix86_use_mask_cmp_p):
13524         Return false for mode sizes < 16.
13525
13526 2021-05-07  Jakub Jelinek  <jakub@redhat.com>
13527
13528         PR target/100445
13529         * config/i386/mmx.md (*xop_pcmov_<mode>): New define_insn.
13530
13531 2021-05-06  Martin Jambor  <mjambor@suse.cz>
13532
13533         * ipa-sra.c (ipa_sra_dump_all_summaries): Dump edge summaries even
13534         when there is no function summary.
13535         (ipa_sra_summarize_function): produce edge summaries even when
13536         bailing out early.
13537
13538 2021-05-06  Tom Tromey  <tom@tromey.com>
13539
13540         * godump.c (string_hash_eq): Remove.
13541         (go_finish): Use htab_eq_string.
13542
13543 2021-05-06  Tom Tromey  <tom@tromey.com>
13544
13545         * gengtype-state.c (read_state): Use htab_eq_string.
13546         (string_eq): Remove.
13547
13548 2021-05-06  Tom Tromey  <tom@tromey.com>
13549
13550         * gensupport.c (htab_eq_string): Remove.
13551
13552 2021-05-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13553
13554         PR ipa/97937
13555         * debug.h (gcc_debug_hooks): Add set_ignored_loc function pointer.
13556         * dwarf2out.h (dw_fde_node::ignored_debug): New data item.
13557         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Add dummy
13558         set_ignored_loc callbacks.
13559         * debug.c (do_nothing_debug_hooks): Likewise.
13560         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
13561         * dwarf2out.c (text_section_used, cold_text_section_used): Remove.
13562         (in_text_section_p, last_text_label, last_cold_label,
13563         switch_text_ranges, switch_cold_ranges): New data items.
13564         (dwarf2out_note_section_used): Remove.
13565         (dwarf2out_begin_prologue): Set fde->ignored_debug and
13566         in_text_section_p.
13567         (mark_ignored_debug_section): New helper function.
13568         (dwarf2out_end_epilogue, dwarf2out_switch_text_section): Call
13569         mark_ignored_debug_section.
13570         (dwarf2_debug_hooks): Use dwarf2out_set_ignored_loc.
13571         (dwarf2_lineno_debug_hooks): Use dummy for set_ignored_loc.
13572         (size_of_aranges): Adjust formula for multi-part text ranges size.
13573         (output_aranges): Output multi-part text ranges.
13574         (dwarf2out_set_ignored_loc): New callback function.
13575         (dwarf2out_finish): Output multi-part text ranges.
13576         (dwarf2out_c_finalize): Clear new data items.
13577         * final.c (final_start_function_1): Call set_ignored_loc callback.
13578         (final_scan_insn_1): Likewise.
13579         * ggc-page.c (gt_ggc_mx): New helper function.
13580         * stringpool.c (gt_pch_nx): Likewise.
13581
13582 2021-05-06  Richard Biener  <rguenther@suse.de>
13583
13584         * timevar.def (TV_TREE_INSERT_PHI_NODES): Remove.
13585         (TV_TREE_SSA_REWRITE_BLOCKS): Likewise.
13586         (TV_TREE_INTO_SSA): New.
13587         * tree-into-ssa.c (insert_phi_nodes): Do not account separately.
13588         (rewrite_blocks): Likewise.
13589         (pass_data_build_ssa): Account to TV_TREE_INTO_SSA.
13590
13591 2021-05-06  Jakub Jelinek  <jakub@redhat.com>
13592
13593         * tree-ssa-phiopt.c (value_replacement, minmax_replacement,
13594         abs_replacement, xor_replacement,
13595         cond_removal_in_popcount_clz_ctz_pattern,
13596         replace_phi_edge_with_variable): Change type of phi argument from
13597         gimple * to gphi *.
13598
13599 2021-05-06  Richard Biener  <rguenther@suse.de>
13600
13601         * tree-ssa-loop-split.c (split_loop): Delay updating SSA form.
13602         Output an opt-info message.
13603         (do_split_loop_on_cond): Likewise.
13604         (tree_ssa_split_loops): Update SSA form here.
13605
13606 2021-05-06  Richard Biener  <rguenther@suse.de>
13607
13608         * tree-inline.c (tree_function_versioning): Fix DECL_BY_REFERENCE
13609         return variable removal.
13610
13611 2021-05-06  Marius Hillenbrand  <mhillen@linux.ibm.com>
13612
13613         * config/s390/s390-builtins.def (O_M5, O1_M5, ...): Remove unused macros.
13614         (s390_vec_permi_s64, s390_vec_permi_b64, s390_vec_permi_u64)
13615         (s390_vec_permi_dbl, s390_vpdi): Use the O3_U2 type for the immediate
13616         operand.
13617         * config/s390/s390.c (s390_const_operand_ok): Remove unused
13618         values.
13619
13620 2021-05-06  Jakub Jelinek  <jakub@redhat.com>
13621
13622         PR tree-optimization/94589
13623         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Call
13624         spaceship_replacement.
13625         (cond_only_block_p, spaceship_replacement): New functions.
13626
13627 2021-05-06  Richard Biener  <rguenther@suse.de>
13628
13629         PR ipa/100373
13630         * tree-emutls.c (gen_emutls_addr): Pass in whether we're
13631         dealing with a debug use and only query existing addresses
13632         if so.
13633         (lower_emutls_1): Avoid splitting out addresses for debug
13634         stmts, reset the debug stmt when we fail to find existing
13635         lowered addresses.
13636         (lower_emutls_phi_arg): Set wi.stmt.
13637
13638 2021-05-06  Christoph Muellner  <cmuellner@gcc.gnu.org>
13639
13640         PR target/100266
13641         * config/riscv/riscv.c (riscv_block_move_loop): Use cbranch helper.
13642         * config/riscv/riscv.md (cbranch<mode>4): Generate helpers.
13643         (stack_protect_test): Use cbranch helper.
13644
13645 2021-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13646
13647         PR target/100402
13648         * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
13649         always return the establisher frame for __builtin_frame_address (0).
13650
13651 2021-05-05  Ivan Sorokin  <vanyacpp@gmail.com>
13652
13653         PR target/91400
13654         * config/i386/i386-builtins.c (ix86_cpu_model_type_node): New.
13655         (ix86_cpu_model_var): Likewise.
13656         (ix86_cpu_features2_type_node): Likewise.
13657         (ix86_cpu_features2_var): Likewise.
13658         (fold_builtin_cpu): Cache __cpu_model and __cpu_features2 with
13659         their types.
13660
13661 2021-05-05  Martin Sebor  <msebor@redhat.com>
13662
13663         * passes.def (pass_warn_printf): Run after SSA.
13664
13665 2021-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13666
13667         * config/arm/neon.md (neon_vtst_combine<mode>): New pattern.
13668         * config/arm/predicates.md (minus_one_operand): New predicate.
13669
13670 2021-05-05  Jeff Law  <jlaw@tachyum.com>
13671
13672         * config/avr/avr.md: Remove references to CC_STATUS_INIT.
13673
13674 2021-05-05  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>
13675
13676         PR rtl-optimization/100263
13677         * postreload.c (move2add_valid_value_p): Ensure register can
13678         change mode.
13679
13680 2021-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13681
13682         PR rtl-optimization/100411
13683         * cfgcleanup.c (try_crossjump_to_edge): Also skip end of prologue
13684         and beginning of function markers.
13685
13686 2021-05-05  Jeff Law  <jlaw@tachyum.com>
13687
13688         * config/cr16/cr16.h (NOTICE_UPDATE_CC): Remove.
13689         * config/cr16/cr16.c (notice_update_cc): Remove.
13690         * config/cr16/cr16-protos.h (notice_update_cc): Remove.
13691
13692 2021-05-05  Uroš Bizjak  <ubizjak@gmail.com>
13693
13694         PR target/98218
13695         * config/i386/i386-expand.c (ix86_expand_int_sse_cmp):
13696         Handle V8QI, V4HI and V2SI modes.
13697         * config/i386/i386.c (ix86_build_const_vector): Handle V2SImode.
13698         (ix86_build_signbit_mask): Ditto.
13699         * config/i386/mmx.md (MMXMODE14): New mode iterator.
13700         (<smaxmin:code><MMXMODE14:mode>3): New expander.
13701         (*mmx_<smaxmin:code><MMXMODE14:mode>3): New insn pattern.
13702         (<umaxmin:code><MMXMODE24:mode>3): New expander.
13703         (*mmx_<umaxmin:code><MMXMODE24:mode>3): New insn pattern.
13704         (vec_cmp<MMXMODEI:mode><MMXMODEI:mode>): New expander.
13705         (vec_cmpu<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
13706         (vcond<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
13707         (vcondu<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
13708         (vcond_mask_<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
13709
13710 2021-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13711
13712         * dwarf2out.c (loc_list_from_tree_1) <DECL>: During early DWARF, do
13713         not expand the VALUE_EXPR of variables put in the non-local frame.
13714         * gimplify.c (gimplify_type_sizes) <RECORD_TYPE>: If the type is not
13715         to be ignored for debug info, ensure its variable offsets are not.
13716
13717 2021-05-05  Richard Biener  <rguenther@suse.de>
13718
13719         PR tree-optimization/79333
13720         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt):
13721         Fold stmt following SSA edges.
13722
13723 2021-05-05  Richard Biener  <rguenther@suse.de>
13724
13725         PR middle-end/100394
13726         * calls.c (expand_call): Preserve possibly throwing calls.
13727         * cfgexpand.c (expand_call_stmt): When a call can throw signal
13728         RTL expansion there are side-effects.
13729         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Simplify,
13730         mark all possibly throwing stmts necessary unless we can elide
13731         dead EH.
13732         * tree-ssa-dse.c (pass_dse::execute): Preserve exceptions unless
13733         -fdelete-dead-exceptions.
13734         * tree.h (DECL_PURE_P): Add note about exceptions.
13735
13736 2021-05-05  Alexandre Oliva  <oliva@adacore.com>
13737
13738         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Make it
13739         unconditional.
13740
13741 2021-05-04  David Edelsohn  <dje.gcc@gmail.com>
13742
13743         * config/rs6000/rs6000-call.c (rs6000_output_mi_thunk): Use
13744         get_fnname_from_decl for name of thunk.
13745         * config/rs6000/rs6000.c (rs6000_declare_alias): Use assemble_name
13746         and ASM_OUTPUT_LABEL.
13747         (rs6000_xcoff_declare_function_name): Use assemble_name and
13748         ASM_OUTPUT_LABEL.
13749         (rs6000_xcoff_declare_object_name): Use ASM_OUTPUT_LABEL.
13750         (rs6000_xcoff_encode_section_info): Don't add mapping class
13751         for aliases.  Always add [DS] mapping class to primary
13752         FUNCTION_DECL.
13753         (rs6000_asm_weaken_decl): Don't explicitly add [DS].
13754
13755 2021-05-04  Martin Sebor  <msebor@redhat.com>
13756
13757         PR middle-end/100307
13758         * builtins.c (compute_objsize_r): Clear base0 for pointers.
13759
13760 2021-05-04  Jeff Law  <jlaw@tachyum.com>
13761
13762         * config/bfin/bfin.h (NOTICE_UPDATE_CC): Remove.
13763
13764 2021-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
13765
13766         * caller-save.c: Remove CC0.
13767         * cfgcleanup.c: Remove CC0.
13768         * cfgrtl.c: Remove CC0.
13769         * combine.c: Remove CC0.
13770         * compare-elim.c: Remove CC0.
13771         * conditions.h: Remove CC0.
13772         * config/h8300/h8300.h: Remove CC0.
13773         * config/h8300/h8300-protos.h: Remove CC0.
13774         * config/h8300/peepholes.md: Remove CC0.
13775         * config/i386/x86-tune-sched.c: Remove CC0.
13776         * config/m68k/m68k.c: Remove CC0.
13777         * config/rl78/rl78.c: Remove CC0.
13778         * config/sparc/sparc.c: Remove CC0.
13779         * config/xtensa/xtensa.c: Remove CC0.
13780         (gen_conditional_move):  Use pc_rtx instead of cc0_rtx in a piece of
13781         RTL where that is used as a placeholder only.
13782         * cprop.c: Remove CC0.
13783         * cse.c: Remove CC0.
13784         * cselib.c: Remove CC0.
13785         * df-problems.c: Remove CC0.
13786         * df-scan.c: Remove CC0.
13787         * doc/md.texi: Remove CC0.  Adjust an example.
13788         * doc/rtl.texi: Remove CC0.  Adjust an example.
13789         * doc/tm.texi: Regenerate.
13790         * doc/tm.texi.in: Remove CC0.
13791         * emit-rtl.c: Remove CC0.
13792         * final.c: Remove CC0.
13793         * fwprop.c: Remove CC0.
13794         * gcse-common.c: Remove CC0.
13795         * gcse.c: Remove CC0.
13796         * genattrtab.c: Remove CC0.
13797         * genconfig.c: Remove CC0.
13798         * genemit.c: Remove CC0.
13799         * genextract.c: Remove CC0.
13800         * gengenrtl.c: Remove CC0.
13801         * genrecog.c: Remove CC0.
13802         * haifa-sched.c: Remove CC0.
13803         * ifcvt.c: Remove CC0.
13804         * ira-costs.c: Remove CC0.
13805         * ira.c: Remove CC0.
13806         * jump.c: Remove CC0.
13807         * loop-invariant.c: Remove CC0.
13808         * lra-constraints.c: Remove CC0.
13809         * lra-eliminations.c: Remove CC0.
13810         * optabs.c: Remove CC0.
13811         * postreload-gcse.c: Remove CC0.
13812         * postreload.c: Remove CC0.
13813         * print-rtl.c: Remove CC0.
13814         * read-rtl-function.c: Remove CC0.
13815         * reg-notes.def: Remove CC0.
13816         * reg-stack.c: Remove CC0.
13817         * reginfo.c: Remove CC0.
13818         * regrename.c: Remove CC0.
13819         * reload.c: Remove CC0.
13820         * reload1.c: Remove CC0.
13821         * reorg.c: Remove CC0.
13822         * resource.c: Remove CC0.
13823         * rtl.c: Remove CC0.
13824         * rtl.def: Remove CC0.
13825         * rtl.h: Remove CC0.
13826         * rtlanal.c: Remove CC0.
13827         * sched-deps.c: Remove CC0.
13828         * sched-rgn.c: Remove CC0.
13829         * shrink-wrap.c: Remove CC0.
13830         * simplify-rtx.c: Remove CC0.
13831         * system.h: Remove CC0.  Poison NOTICE_UPDATE_CC, CC_STATUS_MDEP_INIT,
13832         CC_STATUS_MDEP, and CC_STATUS.
13833         * target.def: Remove CC0.
13834         * valtrack.c: Remove CC0.
13835         * var-tracking.c: Remove CC0.
13836
13837 2021-05-04  Richard Biener  <rguenther@suse.de>
13838
13839         PR tree-optimization/100414
13840         * tree-ssa-phiopt.c (get_non_trapping): Do not compute dominance
13841         info here.
13842         (tree_ssa_phiopt_worker): But unconditionally here.
13843
13844 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
13845
13846         * omp-low.c (lower_rec_input_clauses, lower_reduction_clauses): Handle
13847         && and || with floating-point and complex arguments.
13848
13849 2021-05-04  Eric Botcazou  <ebotcazou@adacore.com>
13850
13851         * tree-inline.c (insert_debug_decl_map): Delete.
13852         (copy_debug_stmt): Minor tweak.
13853         (setup_one_parameter): Do not use a variable if the value is either
13854         a read-only DECL or a non-addressable local variable in the caller.
13855         In this case, insert the debug-only variable in the map manually.
13856         (expand_call_inline): Do not generate a CLOBBER for these values.
13857         * tree-inline.h (debug_map): Minor tweak.
13858
13859 2021-05-04  Eric Botcazou  <ebotcazou@adacore.com>
13860
13861         * builtins.c (builtin_with_linkage_p): Return true for stp[n]cpy.
13862         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Tidy up.
13863
13864 2021-05-04  Richard Biener  <rguenther@suse.de>
13865
13866         PR tree-optimization/100329
13867         * tree-ssa-reassoc.c (can_reassociate_p): Do not reassociate
13868         asm goto defs.
13869         (insert_stmt_after): Assert we're not running into asm goto.
13870
13871 2021-05-04  Richard Biener  <rguenther@suse.de>
13872
13873         PR tree-optimization/100398
13874         * tree-ssa-dse.c (pass_dse::execute): Preserve control
13875         altering stmts.
13876
13877 2021-05-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13878
13879         * builtins.c (try_store_by_multiple_pieces): Fix constfun's prototype.
13880
13881 2021-05-04  Alexandre Oliva  <oliva@adacore.com>
13882
13883         * builtins.c (try_store_by_multiple_pieces): New.
13884         (expand_builtin_memset_args): Use it.  If target_char_cast
13885         fails, proceed as for non-constant val.  Pass len's ctz to...
13886         * expr.c (clear_storage_hints): ... this.  Try store by
13887         multiple pieces after setmem.
13888         (clear_storage): Adjust.
13889         * expr.h (clear_storage_hints): Likewise.
13890         (try_store_by_multiple_pieces): Declare.
13891         * passes.def: Replace the last copy_prop with ccp.
13892
13893 2021-05-03  Tom de Vries  <tdevries@suse.de>
13894
13895         PR target/100321
13896         * omp-low.c (lower_rec_input_clauses): Disable SIMT for user-defined
13897         reduction.
13898
13899 2021-05-03  Richard Biener  <rguenther@suse.de>
13900
13901         * tree-ssa-dse.c (dse_classify_store): Track two PHI defs.
13902
13903 2021-05-03  Richard Biener  <rguenther@suse.de>
13904
13905         * tree-ssa-dse.c: Do not include domwalk.h but cfganal.h.
13906         (dse_dom_walker): Remove.
13907         (dse_dom_walker::dse_optimize_stmt): Rename...
13908         (dse_optimize_stmt): ... to this, pass in live_bytes sbitmap.
13909         (dse_dom_walker::before_dom_children): Inline ...
13910         (pass_dse::execute): ... here.  Perform a reverse program
13911         order walk.
13912
13913 2021-05-03  H.J. Lu  <hjl.tools@gmail.com>
13914
13915         PR bootstrap/99703
13916         * configure: Regenerated.
13917
13918 2021-05-03  Ilya Leoshkevich  <iii@linux.ibm.com>
13919
13920         PR target/100217
13921         * config/s390/s390.c (s390_hard_fp_reg_p): New function.
13922         (s390_md_asm_adjust): Handle hard registers.
13923
13924 2021-05-03  Jakub Jelinek  <jakub@redhat.com>
13925
13926         PR tree-optimization/100382
13927         * tree-ssa-dse.c: Include tree-eh.h.
13928         (dse_dom_walker::before_dom_children): Don't remove stmts if
13929         stmt_unremovable_because_of_non_call_eh_p is true.
13930
13931 2021-05-02  David Edelsohn  <dje.gcc@gmail.com>
13932
13933         * varasm.c (compute_reloc_for_var): Split out from...
13934         (get_variable_section): Use it.
13935         * output.h (compute_reloc_for_var): Declare.
13936         * config/rs6000/rs6000-protos.h
13937         (rs6000_xcoff_asm_output_aligned_decl_common): Change alignment to
13938         unsigned int.
13939         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address_aix):
13940         Don't append storage mapping class to symbol.
13941         (rs6000_xcoff_asm_named_section): Add BS and UL mapping classes.
13942         Don't convert TLS BSS to common.
13943         (rs6000_xcoff_unique_section): Don't fall back to select_secton.
13944         (rs6000_xcoff_section_type_flags): Add SECTION_BSS if DECL is
13945         bss_initializer.
13946         (rs6000_xcoff_asm_globalize_decl_name): Don't strip storage
13947         mapping class.
13948         (rs6000_xcoff_asm_output_aligned_decl_common): Align is unsigned int.
13949         If align is 0 from TLS class, use the same rules as varasm.c
13950         If not common, switch to BSS section manually.
13951         If common, emit appropriate comm or lcomm directive.
13952         (rs6000_xcoff_encode_section_info): Add logic to append all
13953         storage mapping classes.
13954         (rs6000_asm_weaken_decl): Adjust for qualname symbols.
13955         * config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use
13956         rs6000_xcoff_asm_output_aligned_decl_common.
13957         (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use
13958         rs6000_xcoff_asm_output_aligned_decl_common.
13959         (ASM_OUTPUT_TLS_COMMON): Use
13960         rs6000_xcoff_asm_output_aligned_decl_common.
13961
13962 2021-05-02  Jakub Jelinek  <jakub@redhat.com>
13963
13964         PR target/100375
13965         * config/nvptx/nvptx.c (nvptx_sese_pseudo): Use nullptr instead of 0
13966         as first argument of pseudo_node_t constructors.
13967
13968 2021-05-02  Jakub Jelinek  <jakub@redhat.com>
13969
13970         PR target/100336
13971         * config/i386/t-i386 (TM_H): Add $(srcdir)/config/i386/i386-isa.def.
13972
13973 2021-05-01  Aldy Hernandez  <aldyh@redhat.com>
13974
13975         * value-range.cc (DEFINE_INT_RANGE_GC_STUBS): Remove.
13976         (gt_pch_nx (int_range<1> *&)): New.
13977         (gt_ggc_mx (int_range<1> *&)): New.
13978         * value-range.h (class irange): Add GTY support for
13979         the base class.
13980
13981 2021-05-01  Geng Qi  <gengqi@linux.alibaba.com>
13982
13983         * doc/options.texi (Negative): Change either or to both and.
13984
13985 2021-04-30  Jonathan Wright  <jonathan.wright@arm.com>
13986
13987         * config/aarch64/aarch64-simd-builtins.def: Add
13988         float_ml[as][q]_laneq builtin generator macros.
13989         * config/aarch64/aarch64-simd.md (mul_laneq<mode>3): Define.
13990         (aarch64_float_mla_laneq<mode>): Define.
13991         (aarch64_float_mls_laneq<mode>): Define.
13992         * config/aarch64/arm_neon.h (vmla_laneq_f32): Use RTL builtin
13993         instead of GCC vector extensions.
13994         (vmlaq_laneq_f32): Likewise.
13995         (vmls_laneq_f32): Likewise.
13996         (vmlsq_laneq_f32): Likewise.
13997
13998 2021-04-30  Jonathan Wright  <jonathan.wright@arm.com>
13999
14000         * config/aarch64/aarch64-simd-builtins.def: Add
14001         float_ml[as]_lane builtin generator macros.
14002         * config/aarch64/aarch64-simd.md (*aarch64_mul3_elt<mode>):
14003         Rename to...
14004         (mul_lane<mode>3): This, and re-order arguments.
14005         (aarch64_float_mla_lane<mode>): Define.
14006         (aarch64_float_mls_lane<mode>): Define.
14007         * config/aarch64/arm_neon.h (vmla_lane_f32): Use RTL builtin
14008         instead of GCC vector extensions.
14009         (vmlaq_lane_f32): Likewise.
14010         (vmls_lane_f32): Likewise.
14011         (vmlsq_lane_f32): Likewise.
14012
14013 2021-04-30  Jonathan Wright  <jonathan.wright@arm.com>
14014
14015         * config/aarch64/aarch64-simd-builtins.def: Add float_ml[as]
14016         builtin generator macros.
14017         * config/aarch64/aarch64-simd.md (aarch64_float_mla<mode>):
14018         Define.
14019         (aarch64_float_mls<mode>): Define.
14020         * config/aarch64/arm_neon.h (vmla_f32): Use RTL builtin
14021         instead of relying on GCC vector extensions.
14022         (vmla_f64): Likewise.
14023         (vmlaq_f32): Likewise.
14024         (vmlaq_f64): Likewise.
14025         (vmls_f32): Likewise.
14026         (vmls_f64): Likewise.
14027         (vmlsq_f32): Likewise.
14028         (vmlsq_f64): Likewise.
14029         * config/aarch64/iterators.md: Define VDQF_DF mode iterator.
14030
14031 2021-04-30  Jonathan Wright  <jonathan.wright@arm.com>
14032
14033         * config/aarch64/aarch64-simd-builtins.def: Add
14034         float_ml[as]_n_builtin generator macros.
14035         * config/aarch64/aarch64-simd.md (*aarch64_mul3_elt_from_dup<mode>):
14036         Rename to...
14037         (mul_n<mode>3): This, and re-order arguments.
14038         (aarch64_float_mla_n<mode>): Define.
14039         (aarch64_float_mls_n<mode>): Define.
14040         * config/aarch64/arm_neon.h (vmla_n_f32): Use RTL builtin
14041         instead of inline asm.
14042         (vmlaq_n_f32): Likewise.
14043         (vmls_n_f32): Likewise.
14044         (vmlsq_n_f32): Likewise.
14045
14046 2021-04-30  Jonathan Wright  <joanthan.wright@arm.com>
14047
14048         * config/aarch64/aarch64-simd-builtins.def: Add pmull[2]
14049         builtin generator macros.
14050         * config/aarch64/aarch64-simd.md (aarch64_pmullv8qi): Define.
14051         (aarch64_pmull_hiv16qi_insn): Define.
14052         (aarch64_pmull_hiv16qi): Define.
14053         * config/aarch64/arm_neon.h (vmull_high_p8): Use RTL builtin
14054         instead of inline asm.
14055         (vmull_p8): Likewise.
14056
14057 2021-04-30  Senthil Kumar Selvaraj  <saaadhu@gcc.gnu.org>
14058
14059         * config/avr/avr.md: Adjust peepholes to match and
14060         generate parallels with clobber of REG_CC.
14061         (mov<mode>_insn): Rename to mov<mode>_insn_split.
14062         (*mov<mode>_insn): Rename to mov<mode>_insn.
14063
14064 2021-04-30  David Edelsohn  <dje.gcc@gmail.com>
14065
14066         * varasm.c (use_blocks_for_decl_p): Don't use section anchors
14067         for VAR_DECLs if -fdata-sections enabled.
14068
14069 2021-04-30  Michael Meissner  <meissner@linux.ibm.com>
14070
14071         PR bootstrap/100327
14072         * config/rs6000/rs6000.c
14073         (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
14074         (rs6000_libgcc_floating_mode_supported_p): New target hook.
14075
14076 2021-04-30  Aldy Hernandez  <aldyh@redhat.com>
14077
14078         * tree-ssa-threadbackward.c (class thread_jumps): Split out code
14079         from here...
14080         (class back_threader_registry): ...to here...
14081         (class back_threader_profitability): ...and here...
14082         (thread_jumps::thread_through_all_blocks): Remove argument.
14083         (back_threader_registry::back_threader_registry): New.
14084         (back_threader_registry::~back_threader_registry): New.
14085         (back_threader_registry::thread_through_all_blocks): New.
14086         (thread_jumps::profitable_jump_thread_path): Move from here...
14087         (back_threader_profitability::profitable_path_p): ...to here.
14088         (thread_jumps::find_taken_edge): New.
14089         (thread_jumps::convert_and_register_current_path): Move...
14090         (back_threader_registry::register_path): ...to here.
14091         (thread_jumps::register_jump_thread_path_if_profitable): Move...
14092         (thread_jumps::maybe_register_path): ...to here.
14093         (thread_jumps::handle_phi): Call find_taken_edge and
14094         maybe_register_path.
14095         (thread_jumps::handle_assignment): Same.
14096         (thread_jumps::fsm_find_control_statement_thread_paths): Remove
14097         tree argument to handle_phi and handle_assignment.
14098         (thread_jumps::find_jump_threads_backwards): Set m_name.  Remove
14099         set of m_speed_p and m_max_threaded_paths.
14100         (pass_thread_jumps::execute): Remove second argument from
14101         find_jump_threads_backwards.
14102         (pass_early_thread_jumps::execute): Same.
14103
14104 2021-04-30  Aldy Hernandez  <aldyh@redhat.com>
14105
14106         * tree-ssa-dom.c (class dom_jump_threader_simplifier): New.
14107         (class dom_opt_dom_walker): Initialize some class variables.
14108         (pass_dominator::execute): Pass evrp_range_analyzer and
14109         dom_jump_threader_simplifier to dom_opt_dom_walker.
14110         Adjust for some functions moving into classes.
14111         (simplify_stmt_for_jump_threading): Adjust and move to...
14112         (jump_threader_simplifier::simplify): ...here.
14113         (dom_opt_dom_walker::before_dom_children): Adjust for
14114         m_evrp_range_analyzer.
14115         (dom_opt_dom_walker::after_dom_children): Remove x_vr_values hack.
14116         (test_for_singularity): Place in dom_opt_dom_walker class.
14117         (dom_opt_dom_walker::optimize_stmt): The argument
14118         evrp_range_analyzer is now a class field.
14119         * tree-ssa-threadbackward.c (class thread_jumps): Add m_registry.
14120         (thread_jumps::thread_through_all_blocks): New.
14121         (thread_jumps::convert_and_register_current_path): Use m_registry.
14122         (pass_thread_jumps::execute): Adjust for thread_through_all_blocks
14123         being in the threader class.
14124         (pass_early_thread_jumps::execute): Same.
14125         * tree-ssa-threadedge.c (threadedge_initialize_values): Move...
14126         (jump_threader::jump_threader): ...here.
14127         (threadedge_finalize_values): Move...
14128         (jump_threader::~jump_threader): ...here.
14129         (jump_threader::remove_jump_threads_including): New.
14130         (jump_threader::thread_through_all_blocks): New.
14131         (record_temporary_equivalences_from_phis): Move...
14132         (jump_threader::record_temporary_equivalences_from_phis): ...here.
14133         (record_temporary_equivalences_from_stmts_at_dest): Move...
14134         (jump_threader::record_temporary_equivalences_from_stmts_at_dest):
14135         Here...
14136         (simplify_control_stmt_condition_1): Move to jump_threader class.
14137         (simplify_control_stmt_condition): Move...
14138         (jump_threader::simplify_control_stmt_condition): ...here.
14139         (thread_around_empty_blocks): Move...
14140         (jump_threader::thread_around_empty_blocks): ...here.
14141         (thread_through_normal_block): Move...
14142         (jump_threader::thread_through_normal_block): ...here.
14143         (thread_across_edge): Move...
14144         (jump_threader::thread_across_edge): ...here.
14145         (thread_outgoing_edges): Move...
14146         (jump_threader::thread_outgoing_edges): ...here.
14147         * tree-ssa-threadedge.h: Move externally facing functings...
14148         (class jump_threader): ...here...
14149         (class jump_threader_simplifier): ...and here.
14150         * tree-ssa-threadupdate.c (struct redirection_data): Remove comment.
14151         (jump_thread_path_allocator::jump_thread_path_allocator): New.
14152         (jump_thread_path_allocator::~jump_thread_path_allocator): New.
14153         (jump_thread_path_allocator::allocate_thread_edge): New.
14154         (jump_thread_path_allocator::allocate_thread_path): New.
14155         (jump_thread_path_registry::jump_thread_path_registry): New.
14156         (jump_thread_path_registry::~jump_thread_path_registry): New.
14157         (jump_thread_path_registry::allocate_thread_edge): New.
14158         (jump_thread_path_registry::allocate_thread_path): New.
14159         (dump_jump_thread_path): Make extern.
14160         (debug (const vec<jump_thread_edge *> &path)): New.
14161         (struct removed_edges): Move to tree-ssa-threadupdate.h.
14162         (struct thread_stats_d): Remove.
14163         (remove_ctrl_stmt_and_useless_edges): Make static.
14164         (lookup_redirection_data): Move...
14165         (jump_thread_path_registry::lookup_redirection_data): ...here.
14166         (ssa_redirect_edges): Make static.
14167         (thread_block_1): Move...
14168         (jump_thread_path_registry::thread_block_1): ...here.
14169         (thread_block): Move...
14170         (jump_thread_path_registry::thread_block): ...here.
14171         (thread_through_loop_header):  Move...
14172         (jump_thread_path_registry::thread_through_loop_header): ...here.
14173         (mark_threaded_blocks): Move...
14174         (jump_thread_path_registry::mark_threaded_blocks): ...here.
14175         (debug_path): Move...
14176         (jump_thread_path_registry::debug_path): ...here.
14177         (debug_all_paths): Move...
14178         (jump_thread_path_registry::dump): ..here.
14179         (rewire_first_differing_edge): Move...
14180         (jump_thread_path_registry::rewire_first_differing_edge): ...here.
14181         (adjust_paths_after_duplication): Move...
14182         (jump_thread_path_registry::adjust_paths_after_duplication): ...here.
14183         (duplicate_thread_path): Move...
14184         (jump_thread_path_registry::duplicate_thread_path): ..here.
14185         (remove_jump_threads_including): Move...
14186         (jump_thread_path_registry::remove_jump_threads_including): ...here.
14187         (thread_through_all_blocks): Move to...
14188         (jump_thread_path_registry::thread_through_all_blocks): ...here.
14189         (delete_jump_thread_path): Remove.
14190         (register_jump_thread): Move...
14191         (jump_thread_path_registry::register_jump_thread): ...here.
14192         * tree-ssa-threadupdate.h: Move externally facing functions...
14193         (class jump_thread_path_allocator): ...here...
14194         (class jump_thread_path_registry): ...and here.
14195         (thread_through_all_blocks): Remove.
14196         (struct removed_edges): New.
14197         (register_jump_thread): Remove.
14198         (remove_jump_threads_including): Remove.
14199         (delete_jump_thread_path): Remove.
14200         (remove_ctrl_stmt_and_useless_edges): Remove.
14201         (free_dom_edge_info): New prototype.
14202         * tree-vrp.c: Remove x_vr_values hack.
14203         (class vrp_jump_threader_simplifier): New.
14204         (vrp_jump_threader_simplifier::simplify): New.
14205         (vrp_jump_threader::vrp_jump_threader): Adjust method signature.
14206         Remove m_dummy_cond.
14207         Instantiate m_simplifier and m_threader.
14208         (vrp_jump_threader::thread_through_all_blocks): New.
14209         (vrp_jump_threader::simplify_stmt): Remove.
14210         (vrp_jump_threader::after_dom_children): Do not set m_dummy_cond.
14211         Remove x_vr_values hack.
14212         (execute_vrp): Adjust for thread_through_all_blocks being in a
14213         class.
14214
14215 2021-04-30  Christophe Lyon  <christophe.lyon@linaro.org>
14216
14217         * genflags.c (gen_insn): Print failed expansion string.
14218
14219 2021-04-30  H.J. Lu  <hjl.tools@gmail.com>
14220
14221         * expr.c (alignment_for_piecewise_move): Call mode_for_size
14222         without limit to MAX_FIXED_MODE_SIZE.
14223
14224 2021-04-30  H.J. Lu  <hjl.tools@gmail.com>
14225
14226         PR middle-end/90773
14227         * builtins.c (builtin_memset_gen_str): Don't use return from
14228         simplify_gen_subreg.
14229
14230 2021-04-30  Uroš Bizjak  <ubizjak@gmail.com>
14231
14232         PR target/98060
14233         * config/i386/i386.md (*add<mode>3_carry_0r): New insn pattern.
14234         (*addsi3_carry_zext_0r): Ditto.
14235         (*sub<mode>3_carry_0): Ditto.
14236         (*subsi3_carry_zext_0r): Ditto.
14237         * config/i386/predicates.md (ix86_carry_flag_unset_operator):
14238         New predicate.
14239         * config/i386/i386.c (ix86_rtx_costs) <case PLUS, case MINUS>:
14240         Also consider ix86_carry_flag_unset_operator to calculate
14241         the cost of adc/sbb insn.
14242
14243 2021-04-30  Roman Zhuykov  <zhroma@ispras.ru>
14244
14245         PR rtl-optimization/100225
14246         PR rtl-optimization/84878
14247         * modulo-sched.c (sms_schedule): Use note_stores to skip loops
14248         where we have an instruction which touches (writes) any hard
14249         register from df->regular_block_artificial_uses set.
14250         Allow not-single-set instruction only right before basic block
14251         tail.
14252
14253 2021-04-30  Geng Qi  <gengqi@linux.alibaba.com>
14254
14255         * config/riscv/riscv.opt (march=,mabi=): Negative itself.
14256
14257 2021-04-30  LevyHsu  <admin@levyhsu.com>
14258
14259         * config/riscv/riscv.c (riscv_min_arithmetic_precision): New.
14260         * config/riscv/riscv.h (TARGET_MIN_ARITHMETIC_PRECISION): New.
14261         * config/riscv/riscv.md (addv<mode>4, uaddv<mode>4): New.
14262         (subv<mode>4, usubv<mode>4, mulv<mode>4, umulv<mode>4): New.
14263
14264 2021-04-29  Alexandre Oliva  <oliva@adacore.com>
14265
14266         * config.gcc: Merged x86 and x86_64 cpu_type-setting cases.
14267
14268 2021-04-29  Alexandre Oliva  <oliva@adacore.com>
14269
14270         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Rename to...
14271         (ASM_OUTPUT_MAX_SKIP_ALIGN): ... this.  Enclose in do/while(0).
14272         * config/i386/i386.c: Adjust.
14273         * config/i386/i386.md: Adjust.
14274         * config/i386/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Drop.
14275         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14276         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14277         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14278         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14279         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14280         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14281         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14282         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14283         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14284         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14285
14286 2021-04-29  Uroš Bizjak  <ubizjak@gmail.com>
14287
14288         * config/i386/i386-expand.c (ix86_expand_int_compare):
14289         Swap operands of GTU and LEU comparison to emit carry flag comparison.
14290         * config/i386/i386.md (*add<mode>3_carry_0): Change insn
14291         predicate to allow more combine opportunities with memory operands.
14292         (*sub<mode>3_carry_0): Ditto.
14293
14294 2021-04-29  Richard Sandiford  <richard.sandiford@arm.com>
14295
14296         PR rtl-optimization/100303
14297         * rtl-ssa/accesses.cc (function_info::make_use_available): Take a
14298         boolean that indicates whether the use will only be used in
14299         debug instructions.  Treat it in the same way that existing
14300         cross-EBB debug references would be handled if so.
14301         (function_info::make_uses_available): Likewise.
14302         * rtl-ssa/functions.h (function_info::make_uses_available): Update
14303         prototype accordingly.
14304         (function_info::make_uses_available): Likewise.
14305         * fwprop.c (try_fwprop_subst): Update call accordingly.
14306
14307 2021-04-29  Jeff Law  <jlaw@tachyum.com>
14308
14309         * config/nios2/nios2-protos.h (nios2_fpu_insn_enabled): Move outside
14310         of RTX_CODE guard.
14311
14312 2021-04-29  Uroš Bizjak  <ubizjak@gmail.com>
14313             Richard Biener  <rguenther@suse.de>
14314
14315         PR target/100312
14316         * config/i386/i386-builtin.def (IX86_BUILTIN_MASKLOADPD)
14317         (IX86_BUILTIN_MASKLOADPS, IX86_BUILTIN_MASKLOADPD256)
14318         (IX86_BUILTIN_MASKLOADPS256, IX86_BUILTIN_MASKLOADD)
14319         (IX86_BUILTIN_MASKLOADQ, IX86_BUILTIN_MASKLOADD256)
14320         (IX86_BUILTIN_MASKLOADQ256): Move from SPECIAL_ARGS
14321         to PURE_ARGS category.
14322         * config/i386/i386-builtins.c (ix86_init_mmx_sse_builtins):
14323         Handle PURE_ARGS category.
14324         * config/i386/i386-expand.c (ix86_expand_builtin): Ditto.
14325
14326 2021-04-29  Eric Botcazou  <ebotcazou@adacore.com>
14327
14328         * configure.ac: Check for the presence of sys/locking.h header and
14329         for whether _LK_LOCK is supported by _locking.
14330         * configure: Regenerate.
14331         * config.in: Likewise.
14332         * gcov-io.h: Define GCOV_LOCKED_WITH_LOCKING if HOST_HAS_LK_LOCK.
14333         * gcov-io.c (gcov_open): Add support for GCOV_LOCKED_WITH_LOCKING.
14334         * system.h: Include <sys/locking.h> if HAVE_SYS_LOCKING_H.
14335
14336 2021-04-29  Uroš Bizjak  <ubizjak@gmail.com>
14337
14338         * config/i386/predicates.md (fcmov_comparison_operator):
14339         Do not check for trivial FP comparison operator.
14340         <case GEU, case LTU>: Allow CCGZmode.
14341         <case GTU, case LEU>: Do not allow CCCmode.
14342         (ix86_comparison_operator) <case GTU, case LEU>: Allow only CCmode.
14343         (ix86_carry_flag_operator): Match only LTU and UNLT code.
14344         Do not check for trivial FP comparison operator.  Allow CCGZmode.
14345
14346 2021-04-29  Tom de Vries  <tdevries@suse.de>
14347
14348         * omp-expand.c (expand_omp_simd): Add step_orig, and replace uses of
14349         fd->loop.step by either step or orig_step.
14350
14351 2021-04-29  Eric Botcazou  <ebotcazou@adacore.com>
14352
14353         * config/sparc/sparc.c (gen_load_pcrel_sym): Delete.
14354         (load_got_register): Do the PIC dance here.
14355         (sparc_legitimize_tls_address): Simplify.
14356         (sparc_emit_probe_stack_range): Likewise.
14357         (sparc32_initialize_trampoline): Likewise.
14358         (sparc64_initialize_trampoline): Likewise.
14359         * config/sparc/sparc.md (load_pcrel_sym<P:mode>): Add @ marker.
14360         (probe_stack_range<P:mode>): Likewise.
14361         (flush<P:mode>): Likewise.
14362         (tgd_hi22<P:mode>): Likewise.
14363         (tgd_lo10<P:mode>): Likewise.
14364         (tgd_add<P:mode>): Likewise.
14365         (tgd_call<P:mode>): Likewise.
14366         (tldm_hi22<P:mode>): Likewise.
14367         (tldm_lo10<P:mode>): Likewise.
14368         (tldm_add<P:mode>): Likewise.
14369         (tldm_call<P:mode>): Likewise.
14370         (tldo_hix22<P:mode>): Likewise.
14371         (tldo_lox10<P:mode>): Likewise.
14372         (tldo_add<P:mode>): Likewise.
14373         (tie_hi22<P:mode>): Likewise.
14374         (tie_lo10<P:mode>): Likewise.
14375         (tie_add<P:mode>): Likewise.
14376         (tle_hix22<P:mode>): Likewise.
14377         (tle_lox10<P:mode>): Likewise.
14378         (stack_protect_setsi): Rename to...
14379         (stack_protect_set32): ...this.
14380         (stack_protect_setdi): Rename to...
14381         (stack_protect_set64): ...this.
14382         (stack_protect_set): Adjust calls to above.
14383         (stack_protect_testsi): Rename to...
14384         (stack_protect_test32): ...this.
14385         (stack_protect_testdi): Rename to...
14386         (stack_protect_test64): ...this.
14387         (stack_protect_test): Adjust calls to above.
14388
14389 2021-04-29  H.J. Lu  <hjl.tools@gmail.com>
14390
14391         PR middle-end/90773
14392         * builtins.c (builtin_memcpy_read_str): Add a dummy argument.
14393         (builtin_strncpy_read_str): Likewise.
14394         (builtin_memset_read_str): Add an argument for the previous RTL
14395         information and generate the new RTL from the previous RTL info.
14396         (builtin_memset_gen_str): Likewise.
14397         * builtins.h (builtin_strncpy_read_str): Update the prototype.
14398         (builtin_memset_read_str): Likewise.
14399         * expr.c (by_pieces_ninsns): If targetm.overlap_op_by_pieces_p()
14400         returns true, round up size and alignment to the widest integer
14401         mode for maximum size.
14402         (pieces_addr::adjust): Add a pointer to by_pieces_prev argument
14403         and pass it to m_constfn.
14404         (op_by_pieces_d): Add m_push and m_overlap_op_by_pieces.
14405         (op_by_pieces_d::op_by_pieces_d): Add a bool argument to
14406         initialize m_push.  Initialize m_overlap_op_by_pieces with
14407         targetm.overlap_op_by_pieces_p ().
14408         (op_by_pieces_d::run): Pass the previous RTL information to
14409         pieces_addr::adjust and generate overlapping operations if
14410         m_overlap_op_by_pieces is true.
14411         (PUSHG_P): New.
14412         (move_by_pieces_d::move_by_pieces_d): Updated for op_by_pieces_d
14413         change.
14414         (store_by_pieces_d::store_by_pieces_d): Updated for op_by_pieces_d
14415         change.
14416         (can_store_by_pieces): Use by_pieces_constfn on constfun.
14417         (store_by_pieces): Use by_pieces_constfn on constfun.  Updated
14418         for op_by_pieces_d change.
14419         (clear_by_pieces_1): Add a dummy argument.
14420         (clear_by_pieces): Updated for op_by_pieces_d change.
14421         (compare_by_pieces_d::compare_by_pieces_d): Likewise.
14422         (string_cst_read_str): Add a dummy argument.
14423         * expr.h (by_pieces_constfn): Add a dummy argument.
14424         (by_pieces_prev): New.
14425         * target.def (overlap_op_by_pieces_p): New target hook.
14426         * config/i386/i386.c (TARGET_OVERLAP_OP_BY_PIECES_P): New.
14427         * doc/tm.texi.in: Add TARGET_OVERLAP_OP_BY_PIECES_P.
14428         * doc/tm.texi: Regenerated.
14429
14430 2021-04-29  Richard Biener  <rguenther@suse.de>
14431
14432         PR tree-optimization/100253
14433         * tree-vect-stmts.c (vectorizable_load): Do not assume
14434         element alignment when DR_MISALIGNMENT is -1.
14435         (vectorizable_store): Likewise.
14436
14437 2021-04-29  Jakub Jelinek  <jakub@redhat.com>
14438
14439         PR target/100302
14440         * config/aarch64/aarch64.c (aarch64_add_offset_1_temporaries): Use
14441         absu_hwi instead of abs_hwi.
14442
14443 2021-04-29  Richard Biener  <rguenther@suse.de>
14444
14445         PR middle-end/38474
14446         * tree-ssa-structalias.c (add_graph_edge): Avoid direct
14447         forwarding when indirect forwarding through ESCAPED
14448         alread happens.
14449
14450 2021-04-29  Tom de Vries  <tdevries@suse.de>
14451
14452         PR target/100232
14453         * internal-fn.c (expand_GOMP_SIMT_ENTER_ALLOC)
14454         (expand_GOMP_SIMT_LAST_LANE, expand_GOMP_SIMT_ORDERED_PRED)
14455         (expand_GOMP_SIMT_VOTE_ANY, expand_GOMP_SIMT_XCHG_BFLY)
14456         (expand_GOMP_SIMT_XCHG_IDX): Ensure target is assigned to.
14457
14458 2021-04-29  Richard Biener  <rguenther@suse.de>
14459
14460         PR tree-optimization/99912
14461         * tree-ssa-dse.c (dse_dom_walker::m_need_cfg_cleanup): New.
14462         (dse_dom_walker::todo): Likewise.
14463         (dse_dom_walker::dse_optimize_stmt): Move VDEF check to the
14464         caller.
14465         (dse_dom_walker::before_dom_children): Remove trivially
14466         dead SSA defs and schedule CFG cleanup if we removed all
14467         PHIs in a block.
14468         (pass_dse::execute): Get TODO as computed by the DOM walker
14469         and return it.  Wipe dominator info earlier.
14470
14471 2021-04-29  Richard Biener  <rguenther@suse.de>
14472
14473         PR ipa/100308
14474         * ipa-prop.c (ipcp_modif_dom_walker::before_dom_children):
14475         Track blocks to cleanup EH in new m_need_eh_cleanup.
14476         (ipcp_modif_dom_walker::cleanup_eh): New.
14477         (ipcp_transform_function): Release dominator info before
14478         doing EH cleanup.
14479
14480 2021-04-29  Martin Sebor  <msebor@redhat.com>
14481
14482         PR middle-end/100250
14483         * attribs.c (attr_access::array_as_string): Avoid dereferencing
14484         a pointer when it's null.
14485
14486 2021-04-29  Martin Sebor  <msebor@redhat.com>
14487
14488         * Makefile.in (OBJS): Add ipa-free-lang-data.o.
14489         * ipa-free-lang-data.cc: New file.
14490         * tree.c: Move pass free_lang_data to file above.
14491          (build_array_type_1): Declare extern.
14492         * tree.h (build_array_type_1): Declare.
14493
14494 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14495
14496         * config/aarch64/aarch64-simd-builtins.def: Modify comment to
14497         make consistent with updated RTL pattern.
14498         * config/aarch64/aarch64-simd.md (aarch64_<sur>qmovn<mode>):
14499         Implement using ss_truncate and us_truncate rather than
14500         unspecs.
14501         * config/aarch64/iterators.md: Remove redundant unspecs and
14502         iterator: UNSPEC_[SU]QXTN and SUQMOVN respectively.
14503
14504 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14505
14506         * config/aarch64/arm_acle.h (__attribute__): Make intrinsic
14507         attributes consistent with those defined in arm_neon.h.
14508
14509 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14510
14511         * config/aarch64/arm_fp16.h (__attribute__): Make intrinsic
14512         attributes consistent with those defined in arm_neon.h.
14513
14514 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14515
14516         * config/aarch64/aarch64-simd-builtins.def: Add
14517         float_trunc_rodd builtin generator macros.
14518         * config/aarch64/aarch64-simd.md (aarch64_float_trunc_rodd_df):
14519         Define.
14520         (aarch64_float_trunc_rodd_lo_v2sf): Define.
14521         (aarch64_float_trunc_rodd_hi_v4sf_le): Define.
14522         (aarch64_float_trunc_rodd_hi_v4sf_be): Define.
14523         (aarch64_float_trunc_rodd_hi_v4sf): Define.
14524         * config/aarch64/arm_neon.h (vcvtx_f32_f64): Use RTL builtin
14525         instead of inline asm.
14526         (vcvtx_high_f32_f64): Likewise.
14527         (vcvtxd_f32_f64): Likewise.
14528         * config/aarch64/iterators.md: Add FCVTXN unspec.
14529
14530 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14531
14532         * config/aarch64/aarch64-simd-builtins.def: Add tbx1 builtin
14533         generator macros.
14534         * config/aarch64/aarch64-simd.md (aarch64_tbx1<mode>):
14535         Define.
14536         * config/aarch64/arm_neon.h (vqtbx1_s8): USE RTL builtin
14537         instead of inline asm.
14538         (vqtbx1_u8): Likewise.
14539         (vqtbx1_p8): Likewise.
14540         (vqtbx1q_s8): Likewise.
14541         (vqtbx1q_u8): Likewise.
14542         (vqtbx1q_p8): Likewise.
14543         (vtbx2_s8): Likewise.
14544         (vtbx2_u8): Likewise.
14545         (vtbx2_p8): Likewise.
14546
14547 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14548
14549         * config/aarch64/aarch64-simd-builtins.def: Add tbl1 builtin
14550         generator macros.
14551         * config/aarch64/arm_neon.h (vqtbl1_p8): Use RTL builtin
14552         instead of inline asm.
14553         (vqtbl1_s8): Likewise.
14554         (vqtbl1_u8): Likewise.
14555         (vqtbl1q_p8): Likewise.
14556         (vqtbl1q_s8): Likewise.
14557         (vqtbl1q_u8): Likewise.
14558         (vtbl1_s8): Likewise.
14559         (vtbl1_u8): Likewise.
14560         (vtbl1_p8): Likewise.
14561         (vtbl2_s8): Likewise.
14562         (vtbl2_u8): Likewise.
14563         (vtbl2_p8): Likewise.
14564
14565 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14566
14567         * config/aarch64/aarch64-simd-builtins.def: Add polynomial
14568         ssri_n buitin generator macro.
14569         * config/aarch64/arm_neon.h (vsri_n_p8): Use RTL builtin
14570         instead of inline asm.
14571         (vsri_n_p16): Likewise.
14572         (vsri_n_p64): Likewise.
14573         (vsriq_n_p8): Likewise.
14574         (vsriq_n_p16): Likewise.
14575         (vsriq_n_p64): Likewise.
14576
14577 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14578
14579         * config/aarch64/aarch64-simd-builtins.def: Use VALLP mode
14580         iterator for polynomial ssli_n builtin generator macro.
14581         * config/aarch64/arm_neon.h (vsli_n_p8): Use RTL builtin
14582         instead of inline asm.
14583         (vsli_n_p16): Likewise.
14584         (vsliq_n_p8): Likewise.
14585         (vsliq_n_p16): Likewise.
14586         * config/aarch64/iterators.md: Define VALLP mode iterator.
14587
14588 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14589
14590         * config/aarch64/aarch64-simd-builtins.def: Use VDQV_L
14591         iterator to generate [su]adalp RTL builtins.
14592         * config/aarch64/aarch64-simd.md: Use VDQV_L iterator in
14593         [su]adalp RTL pattern.
14594         * config/aarch64/arm_neon.h (vpadal_s32): Use RTL builtin
14595         instead of inline asm.
14596         (vpadal_u32): Likewise.
14597
14598 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14599
14600         * config/aarch64/aarch64-simd-builtins.def: Add [su]addlp
14601         builtin generator macros.
14602         * config/aarch64/aarch64-simd.md (aarch64_<su>addlp<mode>):
14603         Define.
14604         * config/aarch64/arm_neon.h (vpaddl_s8): Use RTL builtin
14605         instead of inline asm.
14606         (vpaddl_s16): Likewise.
14607         (vpaddl_s32): Likewise.
14608         (vpaddl_u8): Likewise.
14609         (vpaddl_u16): Likewise.
14610         (vpaddl_u32): Likewise.
14611         (vpaddlq_s8): Likewise.
14612         (vpaddlq_s16): Likewise.
14613         (vpaddlq_s32): Likewise.
14614         (vpaddlq_u8): Likewise.
14615         (vpaddlq_u16): Likewise.
14616         (vpaddlq_u32): Liwewise.
14617         * config/aarch64/iterators.md: Define [SU]ADDLP unspecs with
14618         appropriate attributes.
14619
14620 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14621
14622         * config/aarch64/aarch64-simd-builtins.def: Use VDQ_I iterator
14623         for aarch64_addp<mode> builtin macro generator.
14624         * config/aarch64/aarch64-simd.md: Use VDQ_I iterator in
14625         aarch64_addp<mode> RTL pattern.
14626         * config/aarch64/arm_neon.h (vpaddq_s8): Use RTL builtin
14627         instead of inline asm.
14628         (vpaddq_s16): Likewise.
14629         (vpaddq_s32): Likewise.
14630         (vpaddq_s64): Likewise.
14631         (vpaddq_u8): Likewise.
14632         (vpaddq_u16): Likewise.
14633         (vpaddq_u32): Likewise.
14634         (vpaddq_u64): Likewise.
14635
14636 2021-04-28  Jonathan Wright  <jonathan.wright@arm.com>
14637
14638         * config/aarch64/aarch64-simd-builtins.def: Add sq[r]dmulh_n
14639         builtin generator macros.
14640         * config/aarch64/aarch64-simd.md (aarch64_sq<r>dmulh_n<mode>):
14641         Define.
14642         * config/aarch64/arm_neon.h (vqdmulh_n_s16): Use RTL builtin
14643         instead of inline asm.
14644         (vqdmulh_n_s32): Likewise.
14645         (vqdmulhq_n_s16): Likewise.
14646         (vqdmulhq_n_s32): Likewise.
14647         (vqrdmulh_n_s16): Likewise.
14648         (vqrdmulh_n_s32): Likewise.
14649         (vqrdmulhq_n_s16): Likewise.
14650         (vqrdmulhq_n_s32): Likewise.
14651
14652 2021-04-28  Tobias Burnus  <tobias@codesourcery.com>
14653
14654         * doc/install.texi (--enable-offload-defaulted): Document.
14655
14656 2021-04-28  Senthil Kumar Selvaraj  <saaadhu@gcc.gnu.org>
14657
14658         * config/avr/avr-dimode.md: Turn existing patterns into
14659         define_insn_and_split style patterns where the splitter
14660         adds a clobber of the condition code register.  Drop "cc"
14661         attribute.  Add new patterns to match output of
14662         the splitters.
14663         * config/avr/avr-fixed.md: Likewise.
14664         * config/avr/avr.c (cc_reg_rtx): New.
14665         (avr_parallel_insn_from_insns): Adjust insn count
14666         for removal of set of cc0.
14667         (avr_is_casesi_sequence): Likewise.
14668         (avr_casei_sequence_check_operands): Likewise.
14669         (avr_optimize_casesi): Likewise. Also insert
14670         new insns after jump_insn.
14671         (avr_pass_casesi::avr_rest_of_handle_casesi): Adjust
14672         for removal of set of cc0.
14673         (avr_init_expanders): Initialize cc_reg_rtx.
14674         (avr_regno_reg_class): Handle REG_CC.
14675         (cond_string): Remove usage of CC_OVERFLOW_UNUSABLE.
14676         (avr_notice_update_cc): Remove function.
14677         (ret_cond_branch): Remove usage of CC_OVERFLOW_UNUSABLE.
14678         (compare_condition): Adjust for PARALLEL with
14679         REG_CC clobber.
14680         (out_shift_with_cnt): Likewise.
14681         (ashlhi3_out): Likewise.
14682         (ashrhi3_out): Likewise.
14683         (lshrhi3_out): Likewise.
14684         (avr_class_max_nregs): Return single reg for REG_CC.
14685         (avr_compare_pattern): Check for REG_CC instead
14686         of cc0_rtx.
14687         (avr_reorg_remove_redundant_compare): Likewise.
14688         (avr_reorg):Adjust for PARALLEL with REG_CC clobber.
14689         (avr_hard_regno_nregs): Return single reg for REG_CC.
14690         (avr_hard_regno_mode_ok): Allow only CCmode for REG_CC.
14691         (avr_md_asm_adjust): Clobber REG_CC.
14692         (TARGET_HARD_REGNO_NREGS): Define.
14693         (TARGET_CLASS_MAX_NREGS): Define.
14694         (TARGET_MD_ASM_ADJUST): Define.
14695         * config/avr/avr.h (FIRST_PSEUDO_REGISTER): Adjust
14696         for REG_CC.
14697         (enum reg_class): Add CC_REG class.
14698         (NOTICE_UPDATE_CC): Remove.
14699         (CC_OVERFLOW_UNUSABLE): Remove.
14700         (CC_NO_CARRY): Remove.
14701         * config/avr/avr.md: Turn existing patterns into
14702         define_insn_and_split style patterns where the splitter
14703         adds a clobber of the condition code register.  Drop "cc"
14704         attribute.  Add new patterns to match output of
14705         the splitters.
14706         (sez): Remove unused pattern.
14707
14708 2021-04-28  Richard Earnshaw  <rearnsha@arm.com>
14709
14710         PR target/100311
14711         * config/arm/arm.c (arm_hard_regno_mode_ok): Only allow VPR to be
14712         used in HImode.
14713
14714 2021-04-28  Richard Sandiford  <richard.sandiford@arm.com>
14715
14716         PR target/100305
14717         * config/aarch64/constraints.md (Utq): Require the address to
14718         be valid for both the element mode and for V2DImode.
14719
14720 2021-04-28  Jakub Jelinek  <jakub@redhat.com>
14721             Tobias Burnus  <tobias@codesourcery.com>
14722
14723         * configure.ac (OFFLOAD_DEFAULTED): AC_DEFINE if offload-defaulted.
14724         * gcc.c (process_command): New variable.
14725         (driver::maybe_putenv_OFFLOAD_TARGETS): If OFFLOAD_DEFAULTED,
14726         set it if -foffload is defaulted.
14727         * lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define.
14728         (compile_offload_image): If OFFLOAD_DEFAULTED and
14729         OFFLOAD_TARGET_DEFAULT is in the environment, don't fail
14730         if corresponding mkoffload can't be found.
14731         (compile_images_for_offload_targets): Likewise.  Free and clear
14732         offload_names if no valid offload is found.
14733         * config.in: Regenerate.
14734         * configure: Regenerate.
14735
14736 2021-04-28  Richard Biener  <rguenther@suse.de>
14737
14738         PR tree-optimization/100292
14739         * tree-vect-generic.c (expand_vector_condition): Do not fold
14740         the comparisons.
14741
14742 2021-04-27  David Edelsohn  <dje.gcc@gmail.com>
14743
14744         * config/rs6000/aix.h (SUBTARGET_DRIVER_SELF_SPECS): New.
14745         * config/rs6000/aix64.opt (m64): New.
14746         (m32): New.
14747
14748 2021-04-27  Maciej W. Rozycki  <macro@orcam.me.uk>
14749
14750         * config/vax/vax.c (print_operand_address, vax_address_cost_1)
14751         (index_term_p): Handle ASHIFT too.
14752
14753 2021-04-27  Maciej W. Rozycki  <macro@orcam.me.uk>
14754
14755         * config/vax/builtins.md (jbb<ccss>i<mode>): Remove operand #3.
14756         (sync_lock_test_and_set<mode>): Adjust accordingly.
14757         (sync_lock_release<mode>): Likewise.
14758
14759 2021-04-27  Maciej W. Rozycki  <macro@orcam.me.uk>
14760
14761         * config/vax/vax-protos.h (adjacent_operands_p): Remove
14762         prototype.
14763         * config/vax/vax.c (adjacent_operands_p): Remove.
14764
14765 2021-04-27  Maciej W. Rozycki  <macro@linux-mips.org>
14766
14767         * ifcvt.c (dead_or_predicable) [!IFCVT_MODIFY_TESTS]: Fall
14768         through to the non-conditional execution case if getting the
14769         condition for conditional execution has failed.
14770
14771 2021-04-27  Richard Sandiford  <richard.sandiford@arm.com>
14772
14773         PR middle-end/100284
14774         * gimple.c (gimple_could_trap_p_1): Remove VEC_COND_EXPR test.
14775         * tree-eh.c (operation_could_trap_p): Handle VEC_COND_EXPR rather
14776         than asserting on it.
14777
14778 2021-04-27  David Edelsohn  <dje.gcc@gmail.com>
14779
14780         * config/rs6000/rs6000.c (rs6000_aix_precompute_tls_p): Protect
14781         with TARGET_AIX_OS.
14782
14783 2021-04-27  David Edelsohn  <dje.gcc@gmail.com>
14784
14785         PR target/94177
14786         * calls.c (precompute_register_parameters): Additionally test
14787         targetm.precompute_tls_p to pre-compute argument.
14788         * config/rs6000/aix.h (TARGET_PRECOMPUTE_TLS_P): Define.
14789         * config/rs6000/rs6000.c (rs6000_aix_precompute_tls_p): New.
14790         * target.def (precompute_tls_p): New.
14791         * doc/tm.texi.in (TARGET_PRECOMPUTE_TLS_P): Add hook documentation.
14792         * doc/tm.texi: Regenerated.
14793
14794 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
14795
14796         PR target/100200
14797         * config/aarch64/aarch64.c (aarch64_print_operand): Cast -UINTVAL
14798         back to HOST_WIDE_INT.
14799
14800 2021-04-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14801
14802         PR target/100106
14803         * simplify-rtx.c (simplify_context::simplify_subreg): Check the
14804         memory alignment for the outer mode.
14805
14806 2021-04-27  H.J. Lu  <hjl.tools@gmail.com>
14807
14808         PR middle-end/90773
14809         * expr.c (op_by_pieces_d::get_usable_mode): New member function.
14810         (op_by_pieces_d::run): Cange a while loop to a do-while loop.
14811
14812 2021-04-27  Alex Coplan  <alex.coplan@arm.com>
14813
14814         PR target/99977
14815         * config/arm/arm.c (arm_split_compare_and_swap): Fix up codegen
14816         with negative immediates: ensure we expand cbranchsi4_scratch
14817         correctly and ensure we satisfy its constraints.
14818         * config/arm/sync.md
14819         (@atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): Don't
14820         attempt to tie two output operands together with constraints;
14821         collapse two alternatives.
14822         (@atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
14823         * config/arm/thumb1.md (cbranchsi4_neg_late): New.
14824
14825 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
14826
14827         PR target/100200
14828         * config/aarch64/predicates.md (aarch64_sub_immediate,
14829         aarch64_plus_immediate): Use -UINTVAL instead of -INTVAL.
14830         * config/aarch64/aarch64.md (casesi, rotl<mode>3): Likewise.
14831         * config/aarch64/aarch64.c (aarch64_print_operand,
14832         aarch64_split_atomic_op, aarch64_expand_subvti): Likewise.
14833
14834 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
14835
14836         PR tree-optimization/100239
14837         * tree-vect-generic.c (lower_vec_perm): Don't accept constant
14838         permutations with all indices from the first zero element as vec_shl.
14839
14840 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
14841
14842         PR rtl-optimization/100254
14843         * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION on
14844         last1 and last2 insns rather than BB_END (bb1) and BB_END (bb2) insns.
14845
14846 2021-04-27  Richard Biener  <rguenther@suse.de>
14847
14848         PR tree-optimization/99912
14849         * passes.def: Add comment about new TODO_remove_unused_locals.
14850         * tree-stdarg.c (pass_data_stdarg): Run TODO_remove_unused_locals
14851         at start.
14852
14853 2021-04-27  Richard Biener  <rguenther@suse.de>
14854
14855         PR tree-optimization/99912
14856         * passes.def (pass_all_optimizations): Add pass_dse before
14857         the first pass_dce, move the first pass_dse before the
14858         pass_dce following pass_pre.
14859
14860 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
14861
14862         PR tree-optimization/95527
14863         * generic-match-head.c: Include tm.h.
14864         * gimple-match-head.c: Include tm.h.
14865         * match.pd (CLZ == INTEGER_CST): Don't use
14866         #ifdef CLZ_DEFINED_VALUE_AT_ZERO, only test CLZ_DEFINED_VALUE_AT_ZERO
14867         if clz == CFN_CLZ.  Add missing val declaration.
14868         (CTZ cmp CST): New simplifications.
14869
14870 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
14871
14872         PR tree-optimization/96696
14873         * expr.c (expand_expr_divmod): New function.
14874         (expand_expr_real_2) <case TRUNC_DIV_EXPR>: Use it for truncations and
14875         divisions.  Formatting fixes.
14876         <case MULT_EXPR>: Optimize x / y * y as x - x % y if the latter is
14877         cheaper.
14878
14879 2021-04-27  Martin Jambor  <mjambor@suse.cz>
14880
14881         PR ipa/99951
14882         * ipa-param-manipulation.c (ipa_param_adjustments::modify_call):
14883         If removing a call statement LHS SSA name, release it.
14884
14885 2021-04-27  Richard Earnshaw  <rearnsha@arm.com>
14886
14887         PR target/100236
14888         * config/arm/arm.c (THUMB2_WORK_REGS): Check PIC_OFFSET_TABLE_REGNUM
14889         is valid before including it in the mask.
14890
14891 2021-04-27  Richard Sandiford  <richard.sandiford@arm.com>
14892
14893         PR target/100270
14894         * config/aarch64/aarch64.c (aarch64_comp_type_attributes): Handle
14895         SVE attributes.
14896
14897 2021-04-27  Richard Biener  <rguenther@suse.de>
14898
14899         PR tree-optimization/100051
14900         * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Add
14901         disambiguator based on access size vs. decl size.
14902
14903 2021-04-27  Richard Biener  <rguenther@suse.de>
14904
14905         PR tree-optimization/100278
14906         * tree-ssa-pre.c (compute_avail): Give up when we cannot
14907         adjust TBAA beacuse of mismatching bases.
14908
14909 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
14910
14911         PR target/99405
14912         * config/i386/i386.md (*<insn><mode>3_mask, *<insn><mode>3_mask_1):
14913         For any_rotate define_insn_split and following splitters, use
14914         SWI iterator instead of SWI48.
14915
14916 2021-04-27  Richard Biener  <rguenther@suse.de>
14917
14918         PR tree-optimization/99776
14919         * match.pd (bit_field_ref (ctor)): Relax element extract
14920         type compatibility checks.
14921
14922 2021-04-27  Cui,Lili  <lili.cui@intel.com>
14923
14924         * common/config/i386/i386-common.c (processor_names):
14925         Sync processor_names with processor_type.
14926         * config/i386/i386-options.c (processor_cost_table):
14927         Sync processor_cost_table with processor_type.
14928
14929 2021-04-26  Aldy Hernandez  <aldyh@redhat.com>
14930
14931         * value-range.cc (irange::irange_set_1bit_anti_range): Add assert.
14932         (irange::set): Call irange_set_1bit_anti_range for handling all
14933         1-bit ranges.  Fall through on ~[MIN,MAX].
14934
14935 2021-04-26  Aldy Hernandez  <aldyh@redhat.com>
14936
14937         * value-range.cc (irange::legacy_num_pairs): Remove.
14938         (irange::invert): Change gcc_assert to gcc_checking_assert.
14939         * value-range.h (irange::num_pairs): Adjust for a cached
14940         num_pairs().  Also, rename all gcc_assert's to
14941         gcc_checking_assert's.
14942
14943 2021-04-26  Aldy Hernandez  <aldyh@redhat.com>
14944
14945         * value-range.cc (irange::operator=): Set m_kind.
14946         (irange::copy_to_legacy): Handle varying and undefined sources
14947         as a legacy copy since they can be easily copied.
14948         (irange::irange_set): Set m_kind.
14949         (irange::irange_set_anti_range): Same.
14950         (irange::set): Rename normalize_min_max to normalize_kind.
14951         (irange::verify_range): Adjust for multi-ranges having the
14952         m_kind field set.
14953         (irange::irange_union): Set m_kind.
14954         (irange::irange_intersect): Same.
14955         (irange::invert): Same.
14956         * value-range.h (irange::kind): Always return m_kind.
14957         (irange::varying_p): Rename to...
14958         (irange::varying_comptaible_p): ...this.
14959         (irange::undefined_p): Only look at m_kind.
14960         (irange::irange): Always set VR_UNDEFINED if applicable.
14961         (irange::set_undefined): Always set VR_UNDEFINED.
14962         (irange::set_varying): Always set m_kind to VR_VARYING.
14963         (irange::normalize_min_max): Rename to...
14964         (irange::normalize_kind): ...this.
14965
14966 2021-04-26  Aldy Hernandez  <aldyh@redhat.com>
14967
14968         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
14969         Adjust for constant_p including varying_p.
14970         * tree-vrp.c (vrp_prop::finalize): Same.
14971         (determine_value_range): Same.
14972         * vr-values.c (vr_values::range_of_expr): Same.
14973         * value-range.cc (irange::symbolic_p): Do not check varying_p.
14974         (irange::constant_p): Same.
14975
14976 2021-04-26  Aldy Hernandez  <aldyh@redhat.com>
14977
14978         * value-range.cc (irange::legacy_lower_bound): Replace
14979           !undefined_p check with num_ranges > 0.
14980         (irange::legacy_upper_bound): Same.
14981         * value-range.h (irange::type): Same.
14982         (irange::lower_bound): Same.
14983         (irange::upper_bound): Same.
14984
14985 2021-04-26  Richard Biener  <rguenther@suse.de>
14986
14987         PR tree-optimization/99956
14988         * gimple-loop-interchange.cc (compute_access_stride):
14989         Try instantiating the access in a shallower loop nest
14990         if instantiating failed.
14991         (compute_access_strides): Pass adjustable loop_nest
14992         to compute_access_stride.
14993
14994 2021-04-26  Christophe Lyon  <christophe.lyon@linaro.org>
14995
14996         * doc/sourcebuild.texi (arm_cmse_hw): Document.
14997
14998 2021-04-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14999
15000         * config/aarch64/iterators.md (vwcore): Handle V4BF, V8BF.
15001
15002 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
15003             Nathan Sidwell  <nathan@codesourcery.com>
15004             Tom de Vries  <vries@codesourcery.com>
15005             Julian Brown  <julian@codesourcery.com>
15006             Kwok Cheung Yeung  <kcy@codesourcery.com>
15007
15008         * omp-offload.c (oacc_validate_dims): Implement
15009         '-Wopenacc-parallelism'.
15010         * doc/invoke.texi (-Wopenacc-parallelism): Document.
15011
15012 2021-04-26  Richard Biener  <rguenther@suse.de>
15013
15014         * tree-cfg.h (gimplify_build1): Remove.
15015         (gimplify_build2): Likewise.
15016         (gimplify_build3): Likewise.
15017         * tree-cfg.c (gimplify_build1): Move to tree-vect-generic.c.
15018         (gimplify_build2): Likewise.
15019         (gimplify_build3): Likewise.
15020         * tree-vect-generic.c (gimplify_build1): Move from tree-cfg.c.
15021         Modernize.
15022         (gimplify_build2): Likewise.
15023         (gimplify_build3): Likewise.
15024         (tree_vec_extract): Use resimplify with following SSA edges.
15025         (expand_vector_parallel): Avoid passing NULL size/bitpos
15026         to tree_vec_extract.
15027         * expr.c (store_constructor): Deal with zero-element CTORs.
15028         * match.pd (bit_field_ref <vector CTOR>): Make sure to
15029         produce vector constants when possible.
15030
15031 2021-04-26  Richard Biener  <rguenther@suse.de>
15032
15033         * tree-complex.c: Include gimple-fold.h.
15034         (expand_complex_addition): Use gimple_build.
15035         (expand_complex_multiplication_components): Likewise.
15036         (expand_complex_multiplication): Likewise.
15037         (expand_complex_div_straight): Likewise.
15038         (expand_complex_div_wide): Likewise.
15039         (expand_complex_division): Likewise.
15040         (expand_complex_conjugate): Likewise.
15041         (expand_complex_comparison): Likewise.
15042
15043 2021-04-26  Richard Biener  <rguenther@suse.de>
15044
15045         * tree-ssa-phiopt.c (two_value_replacement): Remove use
15046         of legacy gimplify_buildN API.
15047
15048 2021-04-26  Richard Biener  <rguenther@suse.de>
15049
15050         PR tree-optimization/99473
15051         * tree-ssa-phiopt.c (cond_store_replacement): Handle all
15052         stores.
15053
15054 2021-04-26  Richard Biener  <rguenther@suse.de>
15055
15056         * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin):
15057         Use replace_call_with_value.
15058
15059 2021-04-26  Richard Biener  <rguenther@suse.de>
15060
15061         * tree-ssa-propagate.h (valid_gimple_rhs_p): Remove.
15062         (update_gimple_call): Likewise.
15063         (update_call_from_tree): Likewise.
15064         * tree-ssa-propagate.c (valid_gimple_rhs_p): Remove.
15065         (valid_gimple_call_p): Likewise.
15066         (move_ssa_defining_stmt_for_defs): Likewise.
15067         (finish_update_gimple_call): Likewise.
15068         (update_gimple_call): Likewise.
15069         (update_call_from_tree): Likewise.
15070         (propagate_tree_value_into_stmt): Use replace_call_with_value.
15071         * gimple-fold.h (update_gimple_call): Declare.
15072         * gimple-fold.c (valid_gimple_rhs_p): Move here from
15073         tree-ssa-propagate.c.
15074         (update_gimple_call): Likewise.
15075         (valid_gimple_call_p): Likewise.
15076         (finish_update_gimple_call): Likewise, and simplify.
15077         (gimplify_and_update_call_from_tree): Implement
15078         update_call_from_tree functionality, avoid excessive
15079         push/pop_gimplify_context.
15080         (gimple_fold_builtin): Use only gimplify_and_update_call_from_tree.
15081         (gimple_fold_call): Likewise.
15082         * gimple-ssa-sprintf.c (try_substitute_return_value): Likewise.
15083         * tree-ssa-ccp.c (ccp_folder::fold_stmt): Likewise.
15084         (pass_fold_builtins::execute): Likewise.
15085         (optimize_stack_restore): Use replace_call_with_value.
15086         * tree-cfg.c (fold_loop_internal_call): Likewise.
15087         * tree-ssa-dce.c (maybe_optimize_arith_overflow): Use
15088         only gimplify_and_update_call_from_tree.
15089         * tree-ssa-strlen.c (handle_builtin_strlen): Likewise.
15090         (handle_builtin_strchr): Likewise.
15091         * tsan.c: Include gimple-fold.h instead of tree-ssa-propagate.h.
15092
15093 2021-04-26  Jakub Jelinek  <jakub@redhat.com>
15094
15095         PR debug/100255
15096         * vmsdbgout.c (ASM_OUTPUT_DEBUG_STRING, vmsdbgout_begin_block,
15097         vmsdbgout_end_block, lookup_filename, vmsdbgout_source_line): Remove
15098         register keywords.
15099
15100 2021-04-25  liuhongt  <hongtao.liu@intel.com>
15101
15102         PR target/98911
15103         * config/i386/i386-builtin.def (BDESC): Change the icode of
15104         the following builtins to CODE_FOR_nothing.
15105         * config/i386/i386.c (ix86_gimple_fold_builtin): Fold
15106         IX86_BUILTIN_PCMPEQB128, IX86_BUILTIN_PCMPEQW128,
15107         IX86_BUILTIN_PCMPEQD128, IX86_BUILTIN_PCMPEQQ,
15108         IX86_BUILTIN_PCMPEQB256, IX86_BUILTIN_PCMPEQW256,
15109         IX86_BUILTIN_PCMPEQD256, IX86_BUILTIN_PCMPEQQ256,
15110         IX86_BUILTIN_PCMPGTB128, IX86_BUILTIN_PCMPGTW128,
15111         IX86_BUILTIN_PCMPGTD128, IX86_BUILTIN_PCMPGTQ,
15112         IX86_BUILTIN_PCMPGTB256, IX86_BUILTIN_PCMPGTW256,
15113         IX86_BUILTIN_PCMPGTD256, IX86_BUILTIN_PCMPGTQ256.
15114         * config/i386/sse.md (avx2_eq<mode>3): Deleted.
15115         (sse2_eq<mode>3): Ditto.
15116         (sse4_1_eqv2di3): Ditto.
15117         (sse2_gt<mode>3): Rename to ..
15118         (*sse2_gt<mode>3): .. this.
15119
15120 2021-04-24  Iain Sandoe  <iain@sandoe.co.uk>
15121
15122         Revert:
15123         2021-04-24  Iain Sandoe  <iain@sandoe.co.uk>
15124
15125         PR target/100152
15126         * config/darwin.c (darwin_binds_local_p): Assume that any
15127         public symbol might be interposed for PIC code. Update function
15128         header comment to reflect current Darwin capability.
15129
15130 2021-04-24  Iain Sandoe  <iain@sandoe.co.uk>
15131
15132         PR target/100152
15133         * config/darwin.c (darwin_binds_local_p): Assume that any
15134         public symbol might be interposed for PIC code. Update function
15135         header comment to reflect current Darwin capability.
15136
15137 2021-04-24  Richard Sandiford  <richard.sandiford@arm.com>
15138
15139         * doc/sourcebuild.texi: Document no-opts and any-opts target
15140         selectors.
15141
15142 2021-04-23  YiFei Zhu  <zhuyifei1999@gmail.com>
15143
15144         * config/bpf/bpf.h (ASM_OUTPUT_ALIGNED_BSS): Use .type and .lcomm.
15145
15146 2021-04-23  YiFei Zhu  <zhuyifei1999@gmail.com>
15147
15148         * config/bpf/bpf.h (FUNCTION_BOUNDARY): Set to 64.
15149
15150 2021-04-23  Uroš Bizjak  <ubizjak@gmail.com>
15151
15152         PR target/100041
15153         * config/i386/i386-options.c (ix86_option_override_internal):
15154         Error out when -m96bit-long-double is used with 64bit targets.
15155         * config/i386/i386.md (*pushxf_rounded): Remove pattern.
15156
15157 2021-04-23  Martin Liska  <mliska@suse.cz>
15158
15159         * lto-wrapper.c: Remove FIXME about usage of
15160         hardware_concurrency. The function is not on par with
15161         what we have now.
15162
15163 2021-04-23  Uroš Bizjak  <ubizjak@gmail.com>
15164
15165         PR target/100182
15166         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
15167         Copy operand 3 to operand 4.  Use sse_reg_operand
15168         as operand 3 predicate.
15169         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): Ditto.
15170         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
15171         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
15172         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2):
15173         Copy operand 1 to operand 0.
15174         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): Ditto.
15175         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
15176         (LDX_ATOMIC/LDX_ATOMIC FP store peephole2 with mem blockage): Ditto.
15177
15178 2021-04-23  Alex Coplan  <alex.coplan@arm.com>
15179
15180         PR rtl-optimization/100230
15181         * early-remat.c (early_remat::sort_candidates): Use delete[]
15182         instead of delete for array allocated with new[].
15183
15184 2021-04-23  Richard Biener  <rguenther@suse.de>
15185
15186         * genmatch.c (lower_cond): Remove VEC_COND_EXPR special-casing.
15187         (capture_info::capture_info): Likewise.
15188         (capture_info::walk_match): Likewise.
15189         (expr::gen_transform): Likewise.
15190         (dt_simplify::gen_1): Likewise.
15191         * gimple-match-head.c (maybe_resimplify_conditional_op):
15192         Remove VEC_COND_EXPR special-casing.
15193         (gimple_simplify): Likewise.
15194         * gimple.c (gimple_could_trap_p_1): Adjust.
15195         * tree-ssa-pre.c (compute_avail): Allow VEC_COND_EXPR
15196         to participate in PRE.
15197
15198 2021-04-23  Richard Biener  <rguenther@suse.de>
15199
15200         * cfganal.c (connect_infinite_loops_to_exit): First call
15201         add_noreturn_fake_exit_edges.
15202         * ipa-sra.c (process_scan_results): Do not call the now redundant
15203         add_noreturn_fake_exit_edges.
15204         * predict.c (tree_estimate_probability): Likewise.
15205         (rebuild_frequencies): Likewise.
15206         * store-motion.c (one_store_motion_pass): Likewise.
15207
15208 2021-04-23  Richard Biener  <rguenther@suse.de>
15209
15210         PR tree-optimization/100222
15211         * predict.c (pass_profile::execute): Remove redundant call to
15212         mark_irreducible_loops.
15213         (report_predictor_hitrates): Likewise.
15214
15215 2021-04-23  Richard Biener  <rguenther@suse.de>
15216
15217         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Avoid
15218         valid_gimple_rhs_p by instead gimplifying to one.
15219
15220 2021-04-23  Richard Biener  <rguenther@suse.de>
15221
15222         PR tree-optimization/99971
15223         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
15224         Always use TBAA for loads.
15225
15226 2021-04-23  liuhongt  <hongtao.liu@intel.com>
15227
15228         PR target/100093
15229         * config/i386/i386-options.c (ix86_option_override_internal):
15230         Clear MASK_AVX256_SPLIT_UNALIGNED_LOAD/STORE in x_target_flags
15231         when X86_TUNE_AVX256_UNALIGNED_LOAD/STORE_OPTIMAL is enabled
15232         by target attribute.
15233
15234 2021-04-23  David Edelsohn  <dje.gcc@gmail.com>
15235
15236         * config/rs6000/aix71.h (PREFERRED_DEBUGGING_TYPE): Change to
15237         DWARF2_DEBUG.
15238         * config/rs6000/aix72.h (PREFERRED_DEBUGGING_TYPE): Same.
15239
15240 2021-04-22  David Edelsohn  <dje.gcc@gmail.com>
15241
15242         * config.gcc (powerpc-ibm-aix6.*): Remove.
15243         * config/rs6000/aix61.h: Delete.
15244
15245 2021-04-22  Martin Liska  <mliska@suse.cz>
15246
15247         PR testsuite/100159
15248         PR testsuite/100192
15249         * builtins.c (expand_builtin): Fix typos and missing comments.
15250         * dwarf2out.c (gen_subprogram_die): Likewise.
15251         (gen_struct_or_union_type_die): Likewise.
15252
15253 2021-04-22  Uroš Bizjak  <ubizjak@gmail.com>
15254
15255         PR target/100119
15256         * config/i386/i386-expand.c (ix86_expand_convert_uns_sidf_sse):
15257         Remove the sign with FE_DOWNWARD, where x - x = -0.0.
15258
15259 2021-04-21  Iain Sandoe  <iain@sandoe.co.uk>
15260
15261         * config/i386/darwin.h (TARGET_64BIT): Remove definition
15262         based on TARGET_ISA_64BIT.
15263         (TARGET_64BIT_P): Remove definition based on
15264         TARGET_ISA_64BIT_P().
15265
15266 2021-04-21  Martin Liska  <mliska@suse.cz>
15267
15268         Revert:
15269         2021-04-21  Martin Liska  <mliska@suse.cz>
15270
15271         * lto-wrapper.c (cpuset_popcount): Remove.
15272         (init_num_threads): Remove and use hardware_concurrency.
15273
15274 2021-04-21  Martin Liska  <mliska@suse.cz>
15275
15276         PR jit/98615
15277         * main.c (main): Call toplev::finalize in CHECKING_P mode.
15278         * ipa-modref.c (ipa_modref_c_finalize): summaries are NULL
15279         when incremental LTO linking happens.
15280
15281 2021-04-21  Martin Liska  <mliska@suse.cz>
15282
15283         * lto-wrapper.c (run_gcc): When -flto=jobserver is used, but the
15284         makeserver cannot be detected, then use -flto=N fallback.
15285
15286 2021-04-21  Richard Sandiford  <richard.sandiford@arm.com>
15287
15288         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): When cross-compiling,
15289         default to yes for aarch64-linux-gnu.
15290         * configure: Regenerate.
15291
15292 2021-04-21  Martin Liska  <mliska@suse.cz>
15293
15294         * lto-wrapper.c (cpuset_popcount): Remove.
15295         (init_num_threads): Remove and use hardware_concurrency.
15296
15297 2021-04-21  Martin Liska  <mliska@suse.cz>
15298
15299         * config/i386/i386.c: Remove superfluous || TARGET_MACHO
15300         which remains to be '(... || 0)' and clang complains about it.
15301         * dwarf2out.c (AT_vms_delta): Declare conditionally.
15302         (add_AT_vms_delta): Likewise.
15303         * tree.c (fld_simplified_type): Use rather more common pattern
15304         for disabling of something (#if 0).
15305         (get_tree_code_name): Likewise.
15306         (verify_type_variant): Likewise.
15307
15308 2021-04-21  Martin Liska  <mliska@suse.cz>
15309
15310         * config/i386/i386-expand.c (decide_alignment): Use newly named
15311         macro TARGET_CPU_P.
15312         * config/i386/i386.c (ix86_decompose_address): Likewise.
15313         (ix86_address_cost): Likewise.
15314         (ix86_lea_outperforms): Likewise.
15315         (ix86_avoid_lea_for_addr): Likewise.
15316         (ix86_add_stmt_cost): Likewise.
15317         * config/i386/i386.h (TARGET_*): Remove.
15318         (TARGET_CPU_P): New macro.
15319         * config/i386/i386.md: Use newly named macro TARGET_CPU_P.
15320         * config/i386/x86-tune-sched-atom.c (do_reorder_for_imul): Likewise.
15321         (swap_top_of_ready_list): Likewise.
15322         (ix86_atom_sched_reorder): Likewise.
15323         * config/i386/x86-tune-sched-bd.c (ix86_bd_has_dispatch): Likewise.
15324         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Likewise.
15325
15326 2021-04-21  Martin Liska  <mliska@suse.cz>
15327
15328         * config/i386/i386-options.c (TARGET_EXPLICIT_NO_SAHF_P):
15329         Define.
15330         (SET_TARGET_NO_SAHF): Likewise.
15331         (TARGET_EXPLICIT_PREFETCH_SSE_P): Likewise.
15332         (SET_TARGET_PREFETCH_SSE): Likewise.
15333         (TARGET_EXPLICIT_NO_TUNE_P): Likewise.
15334         (SET_TARGET_NO_TUNE): Likewise.
15335         (TARGET_EXPLICIT_NO_80387_P): Likewise.
15336         (SET_TARGET_NO_80387): Likewise.
15337         (DEF_PTA): New.
15338         * config/i386/i386.h (TARGET_*): Remove.
15339         * opth-gen.awk: Generate new used macros.
15340
15341 2021-04-21  Martin Liska  <mliska@suse.cz>
15342
15343         * config/i386/i386.h (PTA_*): Remove.
15344         (enum pta_flag): New.
15345         (DEF_PTA): Generate PTA_* values from i386-isa.def.
15346         * config/i386/i386-isa.def: New file.
15347
15348 2021-04-21  Alex Coplan  <alex.coplan@arm.com>
15349
15350         PR target/99988
15351         * config/aarch64/aarch64-bti-insert.c (aarch64_bti_j_insn_p): New.
15352         (rest_of_insert_bti): Avoid inserting duplicate bti j insns for
15353         jump table targets.
15354
15355 2021-04-21  H.J. Lu  <hjl.tools@gmail.com>
15356
15357         * config.gcc: Install mwaitintrin.h for i[34567]86-*-* and
15358         x86_64-*-* targets.
15359         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_MWAIT_SET):
15360         New.
15361         (OPTION_MASK_ISA2_MWAIT_UNSET): Likewise.
15362         (ix86_handle_option): Handle -mmwait.
15363         * config/i386/i386-builtins.c (ix86_init_mmx_sse_builtins):
15364         Replace OPTION_MASK_ISA_SSE3 with OPTION_MASK_ISA2_MWAIT on
15365         __builtin_ia32_monitor and __builtin_ia32_mwait.
15366         * config/i386/i386-options.c (isa2_opts): Add -mmwait.
15367         (ix86_valid_target_attribute_inner_p): Likewise.
15368         (ix86_option_override_internal): Enable mwait/monitor
15369         instructions for -msse3.
15370         * config/i386/i386.h (TARGET_MWAIT): New.
15371         (TARGET_MWAIT_P): Likewise.
15372         * config/i386/i386.opt: Add -mmwait.
15373         * config/i386/mwaitintrin.h: New file.
15374         * config/i386/pmmintrin.h: Include <mwaitintrin.h>.
15375         * config/i386/sse.md (sse3_mwait): Replace TARGET_SSE3 with
15376         TARGET_MWAIT.
15377         (@sse3_monitor_<mode>): Likewise.
15378         * config/i386/x86gprintrin.h: Include <mwaitintrin.h>.
15379         * doc/extend.texi: Document mwait target attribute.
15380         * doc/invoke.texi: Document -mmwait.
15381
15382 2021-04-21  Martin Liska  <mliska@suse.cz>
15383
15384         * config/i386/i386-options.c (DEF_ENUM): Remove it.
15385         * config/i386/i386-opts.h (DEF_ENUM): Likewise.
15386         * config/i386/stringop.def (DEF_ENUM): Likewise.
15387
15388 2021-04-21  Martin Liska  <mliska@suse.cz>
15389
15390         * tree-cfg.c (gimple_verify_flow_info): Use qD instead
15391         of print_generic_expr.
15392
15393 2021-04-21  Jakub Jelinek  <jakub@redhat.com>
15394
15395         PR rtl-optimization/100148
15396         * cprop.c (constprop_register): Use next_nondebug_insn instead of
15397         NEXT_INSN.
15398
15399 2021-04-21  Martin Liska  <mliska@suse.cz>
15400
15401         PR ipa/98815
15402         * cgraphunit.c (cgraph_node::analyze): Remove duplicate
15403         free_dominance_info calls.
15404
15405 2021-04-21  Richard Biener  <rguenther@suse.de>
15406
15407         * gimple-fold.c (maybe_fold_reference): Remove is_lhs
15408         parameter (and assume it to be false).
15409         (fold_gimple_assign): Adjust, remove all callers of
15410         maybe_fold_reference calling it with is_lhs true.
15411         (gimple_fold_call): Likewise.
15412         (fold_stmt_1): Likewise.
15413
15414 2021-04-21  Richard Biener  <rguenther@suse.de>
15415
15416         * fold-const.c (pedantic_non_lvalue_loc): Remove.
15417         (fold_binary_loc): Adjust.
15418         (fold_ternary_loc): Likewise.
15419
15420 2021-04-21  Richard Sandiford  <richard.sandiford@arm.com>
15421
15422         PR middle-end/100130
15423         * varasm.c (get_block_for_decl): Make sure that any use of the
15424         retain attribute matches the section's retain flag.
15425         (switch_to_section): Check for retain mismatches even when
15426         changing sections, but do not warn if the given decl is the
15427         section's named.decl.
15428         (output_object_block): Pass the first decl in the block (if any)
15429         to switch_to_section.
15430
15431 2021-04-20  H.J. Lu  <hjl.tools@gmail.com>
15432
15433         * config/i386/i386-c.c (ix86_target_macros_internal): Define
15434         __CRC32__ for -mcrc32.
15435         * config/i386/i386-options.c (ix86_option_override_internal):
15436         Enable crc32 instruction for -msse4.2.
15437         * config/i386/i386.md (sse4_2_crc32<mode>): Remove TARGET_SSE4_2
15438         check.
15439         (sse4_2_crc32di): Likewise.
15440         * config/i386/ia32intrin.h: Use crc32 target option for CRC32
15441         intrinsics.
15442
15443 2021-04-20  Segher Boessenkool  <segher@kernel.crashing.org>
15444
15445         PR target/100108
15446         * config/rs6000/rs6000.c (rs6000_machine_from_flags): Do not consider
15447         OPTION_MASK_ISEL.
15448
15449 2021-04-20  Martin Liska  <mliska@suse.cz>
15450
15451         * doc/invoke.texi: Fix typo.
15452         * params.opt: Likewise.
15453
15454 2021-04-20  Martin Liska  <mliska@suse.cz>
15455
15456         * doc/invoke.texi: Document new param.
15457
15458 2021-04-19  Andrew MacLeod  <amacleod@redhat.com>
15459
15460         PR tree-optimization/100081
15461         * gimple-range-cache.h (ranger_cache): Inherit from gori_compute
15462         rather than gori_compute_cache.
15463         * gimple-range-gori.cc (is_gimple_logical_p): Move to top of file.
15464         (range_def_chain::m_logical_depth): New member.
15465         (range_def_chain::range_def_chain): Initialize m_logical_depth.
15466         (range_def_chain::get_def_chain): Don't build defchains through more
15467         than LOGICAL_LIMIT logical expressions.
15468         * params.opt (param_ranger_logical_depth): New.
15469
15470 2021-04-19  Richard Earnshaw  <rearnsha@arm.com>
15471
15472         PR target/100067
15473         * config/arm/arm.c (arm_configure_build_target): Do not strip
15474         extended FPU/SIMD feature bits from the target ISA when -mfpu
15475         is specified (partial revert of r11-8168).
15476
15477 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
15478
15479         * params.opt (-param=openacc-kernels=): Add.
15480         * omp-oacc-kernels-decompose.cc
15481         (pass_omp_oacc_kernels_decompose::gate): Use it.
15482         * doc/invoke.texi (-fopenacc-kernels=@var{mode}): Move...
15483         (--param): ... here, 'openacc-kernels'.
15484
15485 2021-04-19  Martin Liska  <mliska@suse.cz>
15486
15487         PR c/100143
15488         * gengtype.c (finish_root_table): Align function arguments
15489         in between declaration and definition.
15490
15491 2021-04-19  Eric Botcazou  <ebotcazou@adacore.com>
15492
15493         * config/i386/winnt.c (i386_pe_seh_cold_init): Properly deal with
15494         frames larger than the SEH maximum frame size.
15495
15496 2021-04-18  Segher Boessenkool  <segher@kernel.crashing.org>
15497
15498         PR rtl-optimization/99927
15499         * combine.c (distribute_notes) [REG_UNUSED]: If the register already
15500         is dead, just drop it.
15501
15502 2021-04-17  Iain Buclaw  <ibuclaw@gdcproject.org>
15503
15504         PR d/99914
15505         * config/i386/winnt-d.c (TARGET_D_TEMPLATES_ALWAYS_COMDAT): Define.
15506         * doc/tm.texi: Regenerate.
15507         * doc/tm.texi.in (D language and ABI): Add @hook for
15508         TARGET_D_TEMPLATES_ALWAYS_COMDAT.
15509
15510 2021-04-17  Iain Buclaw  <ibuclaw@gdcproject.org>
15511
15512         * config/darwin-d.c (darwin_d_handle_target_object_format): New
15513         function.
15514         (darwin_d_register_target_info): New function.
15515         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15516         * config/dragonfly-d.c (dragonfly_d_handle_target_object_format): New
15517         function.
15518         (dragonfly_d_register_target_info): New function.
15519         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15520         * config/freebsd-d.c (freebsd_d_handle_target_object_format): New
15521         function.
15522         (freebsd_d_register_target_info): New function.
15523         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15524         * config/glibc-d.c (glibc_d_handle_target_object_format): New
15525         function.
15526         (glibc_d_register_target_info): New function.
15527         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15528         * config/i386/i386-d.c (ix86_d_handle_target_object_format): New
15529         function.
15530         (ix86_d_register_target_info): Add ix86_d_handle_target_object_format
15531         as handler for objectFormat key.
15532         * config/i386/winnt-d.c (winnt_d_handle_target_object_format): New
15533         function.
15534         (winnt_d_register_target_info): New function.
15535         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15536         * config/netbsd-d.c (netbsd_d_handle_target_object_format): New
15537         function.
15538         (netbsd_d_register_target_info): New function.
15539         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15540         * config/openbsd-d.c (openbsd_d_handle_target_object_format): New
15541         function.
15542         (openbsd_d_register_target_info): New function.
15543         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15544         * config/pa/pa-d.c (pa_d_handle_target_object_format): New function.
15545         (pa_d_register_target_info): Add pa_d_handle_target_object_format as
15546         handler for objectFormat key.
15547         * config/rs6000/rs6000-d.c (rs6000_d_handle_target_object_format): New
15548         function.
15549         (rs6000_d_register_target_info): Add
15550         rs6000_d_handle_target_object_format as handler for objectFormat key.
15551         * config/sol2-d.c (solaris_d_handle_target_object_format): New
15552         function.
15553         (solaris_d_register_target_info): New function.
15554         (TARGET_D_REGISTER_OS_TARGET_INFO): Define.
15555
15556 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
15557
15558         PR target/91710
15559         * config/aarch64/aarch64.c (aarch64_function_arg_alignment): Change
15560         abi_break argument from bool * to unsigned *, store there the pre-GCC 9
15561         alignment.
15562         (aarch64_layout_arg, aarch64_gimplify_va_arg_expr): Adjust callers.
15563         (aarch64_function_arg_regno_p): Likewise.  Only emit -Wpsabi note if
15564         the old and new alignment after applying MIN/MAX to it is different.
15565
15566 2021-04-16  Tamar Christina  <tamar.christina@arm.com>
15567
15568         PR target/100048
15569         * config/aarch64/aarch64-sve.md (@aarch64_sve_trn1_conv<mode>): New.
15570         * config/aarch64/aarch64.c (aarch64_expand_sve_const_pred_trn): Use new
15571         TRN optab.
15572         * config/aarch64/iterators.md (UNSPEC_TRN1_CONV): New.
15573
15574 2021-04-16  Bill Schmidt  <wschmidt@linux.ibm.com>
15575
15576         * doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions): Revise
15577         this section and its subsections.
15578
15579 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
15580
15581         PR target/100075
15582         * config/aarch64/aarch64.md (*neg_asr_si2_extr, *extrsi5_insn_di): New
15583         define_insn patterns.
15584
15585 2021-04-16  Richard Sandiford  <richard.sandiford@arm.com>
15586
15587         PR rtl-optimization/98689
15588         * reg-notes.def (UNTYPED_CALL): New note.
15589         * combine.c (distribute_notes): Handle it.
15590         * emit-rtl.c (try_split): Likewise.
15591         * rtlanal.c (rtx_properties::try_to_add_insn): Likewise.  Assume
15592         that calls with the note implicitly set all return value registers.
15593         * builtins.c (expand_builtin_apply): Add a REG_UNTYPED_CALL
15594         to untyped_calls.
15595
15596 2021-04-16  Richard Sandiford  <richard.sandiford@arm.com>
15597
15598         PR rtl-optimization/99596
15599         * rtlanal.c (rtx_properties::try_to_add_insn): Don't add global
15600         register accesses for const calls.  Assume that pure functions
15601         can only read from global registers.  Ignore cases in which
15602         the stack pointer has been marked global.
15603
15604 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
15605
15606         PR target/99767
15607         * tree-vect-loop.c (vect_transform_loop): Don't remove just
15608         dead scalar .MASK_LOAD calls, but also dead .COND_* calls - replace
15609         them by their last argument.
15610
15611 2021-04-15  Martin Liska  <mliska@suse.cz>
15612
15613         * doc/invoke.texi: Other params don't use it, remove it.
15614
15615 2021-04-15  Richard Biener  <rguenther@suse.de>
15616
15617         * gimple-builder.h: Add deprecation note.
15618
15619 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
15620
15621         PR c++/98852
15622         * attribs.h (restrict_type_identity_attributes_to): Declare.
15623         * attribs.c (restrict_type_identity_attributes_to): New function.
15624
15625 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
15626
15627         PR c/98852
15628         * attribs.h (affects_type_identity_attributes): Declare.
15629         * attribs.c (remove_attributes_matching): New function.
15630         (affects_type_identity_attributes): Likewise.
15631
15632 2021-04-15  Jakub Jelinek  <jakub@redhat.com>
15633
15634         PR target/100056
15635         * config/aarch64/aarch64.md (*<LOGICAL:optab>_<SHIFT:optab><mode>3):
15636         Add combine splitters for *<LOGICAL:optab>_ashl<mode>3 with
15637         ZERO_EXTEND, SIGN_EXTEND or AND.
15638
15639 2021-04-14  Richard Sandiford  <richard.sandiford@arm.com>
15640
15641         PR rtl-optimization/99929
15642         * rtl.h (same_vector_encodings_p): New function.
15643         * cse.c (exp_equiv_p): Check that CONST_VECTORs have the same encoding.
15644         * cselib.c (rtx_equal_for_cselib_1): Likewise.
15645         * jump.c (rtx_renumbered_equal_p): Likewise.
15646         * lra-constraints.c (operands_match_p): Likewise.
15647         * reload.c (operands_match_p): Likewise.
15648         * rtl.c (rtx_equal_p_cb, rtx_equal_p): Likewise.
15649
15650 2021-04-14  Richard Sandiford  <richard.sandiford@arm.com>
15651
15652         * print-rtl.c (rtx_writer::print_rtx_operand_codes_E_and_V): Print
15653         more information about variable-length CONST_VECTORs.
15654
15655 2021-04-14  Vladimir N. Makarov  <vmakarov@redhat.com>
15656
15657         PR rtl-optimization/100066
15658         * lra-constraints.c (split_reg): Check paradoxical_subreg_p for
15659         ordered modes when choosing splitting mode for hard reg.
15660
15661 2021-04-14  Richard Sandiford  <richard.sandiford@arm.com>
15662
15663         PR target/99246
15664         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector_sel):
15665         New function.
15666         (aarch64_expand_sve_const_vector): Use it for nelts_per_pattern==2.
15667
15668 2021-04-14  Andreas Krebbel  <krebbel@linux.ibm.com>
15669
15670         * config/s390/s390-builtins.def (O_M5, O_M12, ...): Add new macros
15671         for mask operand types.
15672         (s390_vec_permi_s64, s390_vec_permi_b64, s390_vec_permi_u64)
15673         (s390_vec_permi_dbl, s390_vpdi): Use the M5 type for the immediate
15674         operand.
15675         (s390_vec_msum_u128, s390_vmslg): Use the M12 type for the
15676         immediate operand.
15677         * config/s390/s390.c (s390_const_operand_ok): Check the new
15678         operand types and generate a list of valid values.
15679
15680 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
15681
15682         * doc/tm.texi: Regenerate.
15683         * doc/tm.texi.in (D language and ABI): Add @hook for
15684         TARGET_D_REGISTER_OS_TARGET_INFO.
15685
15686 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
15687
15688         * config/aarch64/aarch64-d.c (aarch64_d_handle_target_float_abi): New
15689         function.
15690         (aarch64_d_register_target_info): New function.
15691         * config/aarch64/aarch64-protos.h (aarch64_d_register_target_info):
15692         Declare.
15693         * config/aarch64/aarch64.h (TARGET_D_REGISTER_CPU_TARGET_INFO):
15694         Define.
15695         * config/arm/arm-d.c (arm_d_handle_target_float_abi): New function.
15696         (arm_d_register_target_info): New function.
15697         * config/arm/arm-protos.h (arm_d_register_target_info): Declare.
15698         * config/arm/arm.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15699         * config/i386/i386-d.c (ix86_d_handle_target_float_abi): New function.
15700         (ix86_d_register_target_info): New function.
15701         * config/i386/i386-protos.h (ix86_d_register_target_info): Declare.
15702         * config/i386/i386.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15703         * config/mips/mips-d.c (mips_d_handle_target_float_abi): New function.
15704         (mips_d_register_target_info): New function.
15705         * config/mips/mips-protos.h (mips_d_register_target_info): Declare.
15706         * config/mips/mips.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15707         * config/pa/pa-d.c (pa_d_handle_target_float_abi): New function.
15708         (pa_d_register_target_info): New function.
15709         * config/pa/pa-protos.h (pa_d_register_target_info): Declare.
15710         * config/pa/pa.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15711         * config/riscv/riscv-d.c (riscv_d_handle_target_float_abi): New
15712         function.
15713         (riscv_d_register_target_info): New function.
15714         * config/riscv/riscv-protos.h (riscv_d_register_target_info): Declare.
15715         * config/riscv/riscv.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15716         * config/rs6000/rs6000-d.c (rs6000_d_handle_target_float_abi): New
15717         function.
15718         (rs6000_d_register_target_info): New function.
15719         * config/rs6000/rs6000-protos.h (rs6000_d_register_target_info):
15720         Declare.
15721         * config/rs6000/rs6000.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15722         * config/s390/s390-d.c (s390_d_handle_target_float_abi): New function.
15723         (s390_d_register_target_info): New function.
15724         * config/s390/s390-protos.h (s390_d_register_target_info): Declare.
15725         * config/s390/s390.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15726         * config/sparc/sparc-d.c (sparc_d_handle_target_float_abi): New
15727         function.
15728         (sparc_d_register_target_info): New function.
15729         * config/sparc/sparc-protos.h (sparc_d_register_target_info): Declare.
15730         * config/sparc/sparc.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define.
15731         * doc/tm.texi: Regenerate.
15732         * doc/tm.texi.in (D language and ABI): Add @hook for
15733         TARGET_D_REGISTER_CPU_TARGET_INFO.
15734
15735 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
15736
15737         * config/i386/i386-d.c (ix86_d_has_stdcall_convention): New function.
15738         * config/i386/i386-protos.h (ix86_d_has_stdcall_convention): Declare.
15739         * config/i386/i386.h (TARGET_D_HAS_STDCALL_CONVENTION): Define.
15740         * doc/tm.texi: Regenerate.
15741         * doc/tm.texi.in (D language and ABI): Add @hook for
15742         TARGET_D_HAS_STDCALL_CONVENTION.
15743
15744 2021-04-14  Richard Biener  <rguenther@suse.de>
15745
15746         * tree-cfg.c (verify_gimple_assign_ternary): Verify that
15747         VEC_COND_EXPRs have a gimple_val condition.
15748         * tree-ssa-propagate.c (valid_gimple_rhs_p): VEC_COND_EXPR
15749         can no longer have a GENERIC condition.
15750
15751 2021-04-14  Richard Earnshaw  <rearnsha@arm.com>
15752
15753         PR target/100067
15754         * config/arm/arm.c (arm_configure_build_target): Strip isa_all_fpbits
15755         from the isa_delta when -mfpu has been used.
15756         (arm_options_perform_arch_sanity_checks): It's the architecture that
15757         lacks an FPU not the processor.
15758
15759 2021-04-13  Richard Biener  <rguenther@suse.de>
15760
15761         PR tree-optimization/100053
15762         * tree-ssa-sccvn.c (vn_nary_op_get_predicated_value): Do
15763         not use optimistic dominance queries for backedges to validate
15764         predicated values.
15765         (dominated_by_p_w_unex): Add parameter to ignore executable
15766         state on backedges.
15767         (rpo_elim::eliminate_avail): Adjust.
15768
15769 2021-04-13  Jakub Jelinek  <jakub@redhat.com>
15770
15771         PR target/100028
15772         * config/aarch64/aarch64.md (*aarch64_bfxil<mode>_extr,
15773         *aarch64_bfxilsi_extrdi): New define_insn patterns.
15774
15775 2021-04-13  Jakub Jelinek  <jakub@redhat.com>
15776
15777         PR target/99648
15778         * simplify-rtx.c (simplify_immed_subreg): For MODE_COMPOSITE_P
15779         outermode, return NULL if the result doesn't encode back to the
15780         original byte sequence.
15781         (simplify_gen_subreg): Don't create SUBREGs from constants to
15782         MODE_COMPOSITE_P outermode.
15783
15784 2021-04-12  Jakub Jelinek  <jakub@redhat.com>
15785
15786         PR rtl-optimization/99905
15787         * combine.c (expand_compound_operation): If pos + len > modewidth,
15788         perform the right shift by pos in inner_mode and then convert to mode,
15789         instead of trying to simplify a shift of rtx with inner_mode by pos
15790         as if it was a shift in mode.
15791
15792 2021-04-12  Jakub Jelinek  <jakub@redhat.com>
15793
15794         PR debug/99830
15795         * combine.c (simplify_and_const_int_1): Don't optimize varop
15796         away if it has side-effects.
15797
15798 2021-04-12  Martin Liska  <mliska@suse.cz>
15799
15800         * doc/extend.texi: Escape @smallexample content.
15801
15802 2021-04-12  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>
15803
15804         * config/s390/s390.md ("*movdi_31", "*movdi_64"): Add
15805           alternative in order to load a DFP zero.
15806
15807 2021-04-12  Martin Liska  <mliska@suse.cz>
15808
15809         * doc/extend.texi: Be more precise in documentation
15810         of symver attribute.
15811
15812 2021-04-12  Martin Liska  <mliska@suse.cz>
15813
15814         PR sanitizer/99877
15815         * gimplify.c (gimplify_expr): Right now, we unpoison all
15816         variables before a goto <dest>. We should not do it if we are
15817         in a omp context.
15818
15819 2021-04-12  Cui,Lili  <lili.cui@intel.com>
15820
15821         * common/config/i386/cpuinfo.h (get_intel_cpu): Handle
15822         rocketlake.
15823         * common/config/i386/i386-common.c (processor_names): Add
15824         rocketlake.
15825         (processor_alias_table): Add rocketlake.
15826         * common/config/i386/i386-cpuinfo.h (processor_subtypes): Add
15827         INTEL_COREI7_ROCKETLAKE.
15828         * config.gcc: Add -march=rocketlake.
15829         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15830         rocketlake.
15831         * config/i386/i386-options.c (m_ROCKETLAKE)  : Define.
15832         (processor_cost_table): Add rocketlake cost.
15833         * config/i386/i386.h (ix86_size_cost) : Define
15834         TARGET_ROCKETLAKE.
15835         (processor_type) : Add PROCESSOR_ROCKETLAKE.
15836         (PTA_ROCKETLAKE): Ditto.
15837         * doc/extend.texi: Add rocketlake.
15838         * doc/invoke.texi: Add rocketlake.
15839
15840 2021-04-12  Cui,Lili  <lili.cui@intel.com>
15841
15842         * config/i386/i386.h (PTA_ALDERLAKE): Change alderlake ISA list.
15843         * config/i386/i386-options.c (m_CORE_AVX2): Add m_ALDERLAKE.
15844         * common/config/i386/cpuinfo.h (get_intel_cpu): Add AlderLake model.
15845         * doc/invoke.texi: Change alderlake ISA list.
15846
15847 2021-04-11  Hafiz Abid Qadeer  <abidh@codesourcery.com>
15848
15849         PR middle-end/98088
15850         * omp-expand.c (expand_oacc_collapse_init): Update condition in
15851         a gcc_assert.
15852
15853 2021-04-10  H.J. Lu  <hjl.tools@gmail.com>
15854
15855         PR target/99744
15856         * config/i386/serializeintrin.h (_serialize): Defined as macro.
15857
15858 2021-04-10  Jakub Jelinek  <jakub@redhat.com>
15859
15860         PR lto/99849
15861         * expr.c (expand_expr_addr_expr_1): Test is_global_var rather than
15862         just TREE_STATIC on COMPOUND_LITERAL_EXPR_DECLs.
15863
15864 2021-04-10  Jakub Jelinek  <jakub@redhat.com>
15865
15866         PR middle-end/99989
15867         * gimple-ssa-warn-alloca.c
15868         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit to
15869         0 with integer precision unconditionally.
15870
15871 2021-04-10  Jakub Jelinek  <jakub@redhat.com>
15872
15873         PR rtl-optimization/98601
15874         * rtlanal.c (rtx_addr_can_trap_p_1): Allow in assert unknown size
15875         not just for BLKmode, but also for VOIDmode.  For STRICT_ALIGNMENT
15876         unaligned_mems handle VOIDmode like BLKmode.
15877
15878 2021-04-10  Jan Hubicka  <hubicka@ucw.cz>
15879
15880         PR lto/99857
15881         * tree.c (free_lang_data_in_decl): Do not release body of
15882         declare_variant_alt.
15883
15884 2021-04-09  Richard Sandiford  <richard.sandiford@arm.com>
15885
15886         * config/aarch64/aarch64.c (aarch64_option_restore): If the
15887         architecture was specified explicitly and the tuning wasn't,
15888         tune for the architecture rather than the configured default CPU.
15889
15890 2021-04-09  Richard Sandiford  <richard.sandiford@arm.com>
15891
15892         * config/aarch64/aarch64.md (tlsdesc_small_sve_<mode>): Use X30
15893         as the temporary register.
15894
15895 2021-04-09  Martin Liska  <mliska@suse.cz>
15896
15897         * doc/extend.texi: Move non-target attributes on the top level.
15898
15899 2021-04-09  Martin Liska  <mliska@suse.cz>
15900
15901         * doc/invoke.texi: Document minimum and maximum value of the
15902         argument for both supported compression algorithms.
15903
15904 2021-04-08  David Edelsohn  <dje.gcc@gmail.com>
15905
15906         * config/rs6000/rs6000.c (rs6000_xcoff_select_section): Select
15907         TLS BSS before TLS data.
15908         * config/rs6000/xcoff.h (ASM_OUTPUT_TLS_COMMON): Use .comm.
15909
15910 2021-04-08  Richard Sandiford  <richard.sandiford@arm.com>
15911
15912         * doc/sourcebuild.texi (stdint_types_mbig_endian): Document.
15913
15914 2021-04-08  Richard Sandiford  <richard.sandiford@arm.com>
15915
15916         * match.pd: Extend vec_cond folds to handle shifts.
15917
15918 2021-04-08  Maciej W. Rozycki  <macro@orcam.me.uk>
15919
15920         * config/vax/vax.md: Fix comment for `*bit<mode>' pattern's
15921         peephole.
15922
15923 2021-04-08  Alex Coplan  <alex.coplan@arm.com>
15924
15925         PR target/99647
15926         * config/arm/iterators.md (MVE_vecs): New.
15927         (V_elem): Also handle V2DF.
15928         * config/arm/mve.md (*mve_mov<mode>): Rename to ...
15929         (*mve_vdup<mode>): ... this. Remove second alternative since
15930         vec_duplicate of const_int is not canonical RTL, and we don't
15931         want to match symbol_refs.
15932         (*mve_vec_duplicate<mode>): Delete (pattern is redundant).
15933
15934 2021-04-08  Xionghu Luo  <luoxhu@linux.ibm.com>
15935
15936         * fold-const.c (fold_single_bit_test): Fix typo.
15937         * print-rtl.c (print_rtx_insn_vec): Call print_rtl_single
15938         instead.
15939
15940 2021-04-07  Richard Sandiford  <richard.sandiford@arm.com>
15941
15942         PR tree-optimization/97513
15943         * tree-vect-slp.c (vect_add_slp_permutation): New function,
15944         split out from...
15945         (vectorizable_slp_permutation): ...here.  Detect cases in which
15946         all VEC_PERM_EXPRs are guaranteed to have the same stepped
15947         permute vector and only generate one permute vector for that case.
15948         Extend that case to handle variable-length vectors.
15949
15950 2021-04-07  Richard Sandiford  <richard.sandiford@arm.com>
15951
15952         PR tree-optimization/99873
15953         * tree-vect-slp.c (vect_slp_prefer_store_lanes_p): New function.
15954         (vect_build_slp_instance): Don't split store groups that could
15955         use IFN_STORE_LANES.
15956
15957 2021-04-07  Jakub Jelinek  <jakub@redhat.com>
15958
15959         PR target/99872
15960         * varasm.c (output_constant_pool_contents): Don't strip name encoding
15961         from XSTR (desc->sym, 0) or from label before passing those to
15962         ASM_OUTPUT_DEF.
15963
15964 2021-04-07  Richard Biener  <rguenther@suse.de>
15965
15966         PR tree-optimization/99954
15967         * tree-loop-distribution.c: Include tree-affine.h.
15968         (generate_memcpy_builtin): Try using tree-affine to prove
15969         non-overlap.
15970         (loop_distribution::classify_builtin_ldst): Always classify
15971         as PKIND_MEMMOVE.
15972
15973 2021-04-07  Richard Biener  <rguenther@suse.de>
15974
15975         PR tree-optimization/99947
15976         * tree-vect-loop.c (vectorizable_induction): Pre-allocate
15977         steps vector to avoid pushing elements from the reallocated
15978         vector.
15979
15980 2021-04-07  Richard Biener  <rguenther@suse.de>
15981
15982         * tree-ssa-sccvn.h (print_vn_reference_ops): Declare.
15983         * tree-ssa-pre.c (print_pre_expr): Factor out VN reference operand
15984         printing...
15985         * tree-ssa-sccvn.c (print_vn_reference_ops): ... into this new
15986         function.
15987         (debug_vn_reference_ops): New.
15988
15989 2021-04-07  Bin Cheng  <bin.cheng@linux.alibaba.com>
15990
15991         PR tree-optimization/98736
15992         * tree-loop-distribution.c
15993         * (loop_distribution::bb_top_order_init):
15994         Compute RPO with programing order preserved by calling function
15995         rev_post_order_and_mark_dfs_back_seme.
15996
15997 2021-04-06  Vladimir N. Makarov  <vmakarov@redhat.com>
15998
15999         PR target/99781
16000         * lra-constraints.c (split_reg): Don't check paradoxical_subreg_p.
16001         * lra-lives.c (clear_sparseset_regnos, regnos_in_sparseset_p): New
16002         functions.
16003         (process_bb_lives): Don't update biggest mode of hard reg for
16004         implicit in multi-register group.  Use the new functions for
16005         updating dead_set and unused_set by register notes.
16006
16007 2021-04-06  Xianmiao Qu  <xianmiao_qu@c-sky.com>
16008
16009         * config/csky/csky_pipeline_ck802.md : Use insn reservation name
16010         instead of *.
16011
16012 2021-04-06  H.J. Lu  <hjl.tools@gmail.com>
16013
16014         * config/i386/x86-tune-costs.h (skylake_memcpy): Updated.
16015         (skylake_memset): Likewise.
16016         (skylake_cost): Change CLEAR_RATIO to 17.
16017         * config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB):
16018         Replace m_CANNONLAKE, m_ICELAKE_CLIENT, m_ICELAKE_SERVER,
16019         m_TIGERLAKE and m_SAPPHIRERAPIDS with m_SKYLAKE and m_CORE_AVX512.
16020
16021 2021-04-06  Richard Biener  <rguenther@suse.de>
16022
16023         PR tree-optimization/99880
16024         * tree-vect-loop.c (maybe_set_vectorized_backedge_value): Only
16025         set vectorized defs of relevant PHIs.
16026
16027 2021-04-06  Richard Biener  <rguenther@suse.de>
16028
16029         PR tree-optimization/99924
16030         * tree-vect-slp.c (vect_bb_partition_graph_r): Do not mark
16031         nodes w/o scalar stmts as visited.
16032
16033 2021-04-06  Alex Coplan  <alex.coplan@arm.com>
16034
16035         PR target/99748
16036         * config/arm/arm.c (arm_libcall_uses_aapcs_base): Also use base
16037         PCS for [su]fix_optab.
16038
16039 2021-04-03  Iain Sandoe  <iain@sandoe.co.uk>
16040
16041         * config/darwin.c (machopic_legitimize_pic_address): Check
16042         that the current pic register is one of the hard reg set
16043         before setting liveness.
16044
16045 2021-04-03  Iain Sandoe  <iain@sandoe.co.uk>
16046
16047         * config/darwin.c (machopic_legitimize_pic_address): Fix
16048         whitespace, remove unused code.
16049
16050 2021-04-03  Jakub Jelinek  <jakub@redhat.com>
16051
16052         PR tree-optimization/99882
16053         * gimple-ssa-store-merging.c (bswap_view_convert): Handle val with
16054         pointer type.
16055
16056 2021-04-03  Jakub Jelinek  <jakub@redhat.com>
16057
16058         PR rtl-optimization/99863
16059         * dse.c (replace_read): Drop regs_live argument.  Instead of
16060         regs_live, use store_insn->fixed_regs_live if non-NULL,
16061         otherwise punt if insns sequence clobbers or sets any hard
16062         registers.
16063
16064 2021-04-03  Jakub Jelinek  <jakub@redhat.com>
16065
16066         PR testsuite/98125
16067         * targhooks.h (default_print_patchable_function_entry_1): Declare.
16068         * targhooks.c (default_print_patchable_function_entry_1): New function,
16069         copied from default_print_patchable_function_entry with an added flags
16070         argument.
16071         (default_print_patchable_function_entry): Rewritten into a small
16072         wrapper around default_print_patchable_function_entry_1.
16073         * config/rs6000/rs6000.c (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
16074         Redefine.
16075         (rs6000_print_patchable_function_entry): New function.
16076
16077 2021-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16078
16079         * doc/invoke.texi (fdelete-dead-exceptions): Minor tweak.
16080
16081 2021-04-01  Jason Merrill  <jason@redhat.com>
16082
16083         PR c++/98481
16084         * common.opt: Document v15 and v16.
16085
16086 2021-04-01  Richard Biener  <rguenther@suse.de>
16087
16088         PR tree-optimization/99863
16089         * gimplify.c (gimplify_init_constructor): Recompute vector
16090         constructor flags.
16091
16092 2021-04-01  Jakub Jelinek  <jakub@redhat.com>
16093
16094         * doc/extend.texi (symver attribute): Fix up syntax errors
16095         in the examples.
16096
16097 2021-04-01  Jakub Jelinek  <jakub@redhat.com>
16098
16099         PR tree-optimization/96573
16100         * gimple-ssa-store-merging.c (init_symbolic_number): Handle
16101         also pointer types.
16102
16103 2021-04-01  Richard Biener  <rguenther@suse.de>
16104
16105         PR tree-optimization/99856
16106         * tree-vect-patterns.c (vect_recog_over_widening_pattern): Promote
16107         precision to vector element precision.
16108
16109 2021-04-01  Martin Jambor  <mjambor@suse.cz>
16110
16111         PR tree-optimization/97009
16112         * tree-sra.c (access_or_its_child_written): New function.
16113         (propagate_subaccesses_from_rhs): Use it instead of a simple grp_write
16114         test.
16115
16116 2021-03-31  Jan Hubicka  <hubicka@ucw.cz>
16117
16118         PR ipa/98265
16119         * cif-code.def (USES_COMDAT_LOCAL): Make CIF_FINAL_NORMAL.
16120
16121 2021-03-31  Pat Haugen  <pthaugen@linux.ibm.com>
16122
16123         PR target/99133
16124         * config/rs6000/altivec.md (xxspltiw_v4si, xxspltiw_v4sf_inst,
16125         xxspltidp_v2df_inst, xxsplti32dx_v4si_inst, xxsplti32dx_v4sf_inst,
16126         xxblend_<mode>, xxpermx_inst, xxeval): Mark prefixed.
16127         * config/rs6000/mma.md (mma_<vvi4i4i8>, mma_<avvi4i4i8>,
16128         mma_<vvi4i4i2>, mma_<avvi4i4i2>, mma_<vvi4i4>, mma_<avvi4i4>,
16129         mma_<pvi4i2>, mma_<apvi4i2>, mma_<vvi4i4i4>, mma_<avvi4i4i4>):
16130         Likewise.
16131         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Adjust test.
16132         * config/rs6000/rs6000.md (define_attr "maybe_prefixed"): New.
16133         (define_attr "prefixed"): Update initializer.
16134
16135 2021-03-31  Jakub Jelinek  <jakub@redhat.com>
16136
16137         PR debug/99490
16138         * dwarf2out.c (debug_ranges_dwo_section): New variable.
16139         (DW_RANGES_IDX_SKELETON): Define.
16140         (struct dw_ranges): Add begin_entry and end_entry members.
16141         (DEBUG_DWO_RNGLISTS_SECTION): Define.
16142         (add_ranges_num): Adjust r initializer for addition of *_entry
16143         members.
16144         (add_ranges_by_labels): For -gsplit-dwarf and force_direct,
16145         set idx to DW_RANGES_IDX_SKELETON.
16146         (use_distinct_base_address_for_range): New function.
16147         (index_rnglists): Don't set r->idx if it is equal to
16148         DW_RANGES_IDX_SKELETON.  Initialize r->begin_entry and
16149         r->end_entry for -gsplit-dwarf if those will be needed by
16150         output_rnglists.
16151         (output_rnglists): Add DWO argument.  If true, switch to
16152         debug_ranges_dwo_section rather than debug_ranges_section.
16153         Adjust l1/l2 label indexes.  Only output the offset table when
16154         dwo is true and don't include in there the skeleton range
16155         entry if present.  For -gsplit-dwarf, skip ranges that belong
16156         to the other rnglists section.  Change return type from void
16157         to bool and return true if there are any range entries for
16158         the other section.  For dwarf_split_debug_info use
16159         DW_RLE_startx_endx, DW_RLE_startx_length and DW_RLE_base_addressx
16160         entries instead of DW_RLE_start_end, DW_RLE_start_length and
16161         DW_RLE_base_address.  Use use_distinct_base_address_for_range.
16162         (init_sections_and_labels): Initialize debug_ranges_dwo_section
16163         if -gsplit-dwarf and DWARF >= 5.  Adjust ranges_section_label
16164         and range_base_label indexes.
16165         (dwarf2out_finish): Call index_rnglists earlier before finalizing
16166         .debug_addr.  Never emit DW_AT_rnglists_base attribute.  For
16167         -gsplit-dwarf and DWARF >= 5 call output_rnglists up to twice
16168         with different dwo arguments.
16169         (dwarf2out_c_finalize): Clear debug_ranges_dwo_section.
16170
16171 2021-03-31  Richard Sandiford  <richard.sandiford@arm.com>
16172
16173         PR tree-optimization/98268
16174         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Call
16175         recompute_tree_invariant_for_addr_expr after successfully
16176         folding a TARGET_MEM_REF that occurs inside an ADDR_EXPR.
16177
16178 2021-03-31  Richard Sandiford  <richard.sandiford@arm.com>
16179
16180         PR tree-optimization/99726
16181         * tree-data-ref.c (create_intersect_range_checks_index): Bail
16182         out if there is more than one access function SCEV for the loop
16183         being versioned.
16184
16185 2021-03-31  Richard Sandiford  <richard.sandiford@arm.com>
16186
16187         PR rtl-optimization/97141
16188         PR rtl-optimization/98726
16189         * emit-rtl.c (valid_for_const_vector_p): Return true for
16190         CONST_POLY_INT_P.
16191         * rtx-vector-builder.h (rtx_vector_builder::step): Return a
16192         poly_wide_int instead of a wide_int.
16193         (rtx_vector_builder::apply_set): Take a poly_wide_int instead
16194         of a wide_int.
16195         * rtx-vector-builder.c (rtx_vector_builder::apply_set): Likewise.
16196         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Return
16197         false for CONST_VECTORs that cannot be forced to memory.
16198         * config/aarch64/aarch64-simd.md (mov<mode>): If a CONST_VECTOR
16199         is too complex to force to memory, build it up from individual
16200         elements instead.
16201
16202 2021-03-31  Jan Hubicka  <jh@suse.cz>
16203
16204         PR lto/99447
16205         * cgraph.c (cgraph_node::release_body): Fix overactive check.
16206
16207 2021-03-31  Christophe Lyon  <christophe.lyon@linaro.org>
16208
16209         PR target/99786
16210         * config/arm/vec-common.md (mul<mode>3): Disable on iwMMXT, expect
16211         for V4HI and V2SI.
16212
16213 2021-03-31  H.J. Lu  <hjl.tools@gmail.com>
16214
16215         * config/i386/i386-expand.c (expand_set_or_cpymem_via_rep):
16216         For TARGET_PREFER_KNOWN_REP_MOVSB_STOSB, don't convert QImode
16217         to SImode.
16218         (decide_alg): For TARGET_PREFER_KNOWN_REP_MOVSB_STOSB, use
16219         "rep movsb/stosb" only for known sizes.
16220         * config/i386/i386-options.c (processor_cost_table): Use Ice
16221         Lake cost for Cannon Lake, Ice Lake, Tiger Lake, Sapphire
16222         Rapids and Alder Lake.
16223         * config/i386/i386.h (TARGET_PREFER_KNOWN_REP_MOVSB_STOSB): New.
16224         * config/i386/x86-tune-costs.h (icelake_memcpy): New.
16225         (icelake_memset): Likewise.
16226         (icelake_cost): Likewise.
16227         * config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB):
16228         New.
16229
16230 2021-03-31  Richard Sandiford  <richard.sandiford@arm.com>
16231
16232         PR target/98119
16233         * config/aarch64/aarch64.c
16234         (aarch64_vectorize_preferred_vector_alignment): Query the size
16235         of the provided SVE vector; do not assume that all SVE vectors
16236         have the same size.
16237
16238 2021-03-31  Jan Hubicka  <jh@suse.cz>
16239
16240         PR lto/99447
16241         * cgraph.c (cgraph_node::release_body): Remove all callers and
16242         references.
16243         * cgraphclones.c (cgraph_node::materialize_clone): Do not do it here.
16244         * cgraphunit.c (cgraph_node::expand): And here.
16245
16246 2021-03-31  Martin Liska  <mliska@suse.cz>
16247
16248         * ipa-modref.c (analyze_ssa_name_flags): Fix coding style
16249         and one negated condition.
16250
16251 2021-03-31  Jakub Jelinek  <jakub@redhat.com>
16252             Richard Sandiford  <richard.sandiford@arm.com>
16253
16254         PR target/99813
16255         * config/aarch64/aarch64.md (*add<mode>3_poly_1): Swap Uai and Uav
16256         constraints on operands[2] and similarly 0 and rk constraints
16257         on operands[1] corresponding to that.
16258
16259 2021-03-31  Jakub Jelinek  <jakub@redhat.com>
16260
16261         PR bootstrap/98860
16262         * configure.ac (HAVE_LD_BROKEN_PE_DWARF5): New AC_DEFINE if PECOFF
16263         linker doesn't support DWARF sections new in DWARF5.
16264         * config/i386/i386-options.c (ix86_option_override_internal): Default
16265         to dwarf_version 4 if HAVE_LD_BROKEN_PE_DWARF5 for TARGET_PECOFF
16266         targets.
16267         * config.in: Regenerated.
16268         * configure: Regenerated.
16269
16270 2021-03-30  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16271
16272         PR target/99820
16273         * config/aarch64/aarch64.c (aarch64_analyze_loop_vinfo): Check for
16274         available issue_info before using it.
16275
16276 2021-03-30  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16277
16278         PR target/99822
16279         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): Do not allow zero
16280         in operand 1.
16281
16282 2021-03-30  Xionghu Luo  <luoxhu@linux.ibm.com>
16283
16284         PR target/99718
16285         * config/rs6000/altivec.md (altivec_lvsl_reg): Change to ...
16286         (altivec_lvsl_reg_<mode>): ... this.
16287         (altivec_lvsr_reg): Change to ...
16288         (altivec_lvsr_reg_<mode>): ... this.
16289         * config/rs6000/predicates.md (vec_set_index_operand): New.
16290         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16291         Enable 32bit variable vec_insert for all TARGET_VSX.
16292         * config/rs6000/rs6000.c (rs6000_expand_vector_set_var_p9):
16293         Enable 32bit variable vec_insert for p9 and above.
16294         (rs6000_expand_vector_set_var_p8): Rename to ...
16295         (rs6000_expand_vector_set_var_p7): ... this.
16296         (rs6000_expand_vector_set): Use TARGET_VSX and adjust assert
16297         position.
16298         * config/rs6000/vector.md (vec_set<mode>): Use vec_set_index_operand.
16299         * config/rs6000/vsx.md (xl_len_r): Use gen_altivec_lvsl_reg_di and
16300         gen_altivec_lvsr_reg_di.
16301
16302 2021-03-30  H.J. Lu  <hjl.tools@gmail.com>
16303
16304         PR target/99744
16305         * config/i386/ia32intrin.h (__rdtsc): Defined as macro.
16306         (__rdtscp): Likewise.
16307
16308 2021-03-30  Tamar Christina  <tamar.christina@arm.com>
16309
16310         PR tree-optimization/99825
16311         * tree-vect-slp-patterns.c (vect_check_evenodd_blend):
16312         Reject non-mult 2 lanes.
16313
16314 2021-03-30  Richard Earnshaw  <rearnsha@arm.com>
16315
16316         PR target/99773
16317         * config/arm/arm.c (arm_file_start): Fix emission of
16318         Tag_ABI_VFP_args attribute.
16319
16320 2021-03-30  Richard Biener  <rguenther@suse.de>
16321
16322         PR tree-optimization/99824
16323         * stor-layout.c (set_min_and_max_values_for_integral_type):
16324         Assert the precision is within the bounds of
16325         WIDE_INT_MAX_PRECISION.
16326         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
16327         the outermost component ref only to lower the access size
16328         and initialize that from the access type.
16329
16330 2021-03-30  Richard Sandiford  <richard.sandiford@arm.com>
16331
16332         PR target/98136
16333         * config/aarch64/aarch64.md (mov<mode>): Pass multi-instruction
16334         CONST_INTs to aarch64_expand_mov_immediate when called after RA.
16335
16336 2021-03-30  Mihailo Stojanovic  <mihailo.stojanovic@typhoon-hil.com>
16337
16338         * config/aarch64/aarch64.md
16339         (<optab>_trunc<fcvt_target><GPI:mode>2): Set the "arch"
16340         attribute to disambiguate between SIMD and FP variants of the
16341         instruction.
16342
16343 2021-03-29  Jan Hubicka  <hubicka@ucw.cz>
16344
16345         * ipa-modref.c (merge_call_lhs_flags): Correct handling of deref.
16346         (analyze_ssa_name_flags): Fix typo in comment.
16347
16348 2021-03-29  Alex Coplan  <alex.coplan@arm.com>
16349
16350         PR target/99216
16351         * config/aarch64/aarch64-sve-builtins.cc
16352         (function_builder::add_function): Add placeholder_p argument, use
16353         placeholder decls if this is set.
16354         (function_builder::add_unique_function): Instead of conditionally adding
16355         direct overloads, unconditionally add either a direct overload or a
16356         placeholder.
16357         (function_builder::add_overloaded_function): Set placeholder_p if we're
16358         using C++ overloads. Use the obstack for string storage instead
16359         of relying on the tree nodes.
16360         (function_builder::add_overloaded_functions): Don't return early for
16361         m_direct_overloads: we need to add placeholders.
16362         * config/aarch64/aarch64-sve-builtins.h
16363         (function_builder::add_function): Add placeholder_p argument.
16364
16365 2021-03-29  Richard Biener  <rguenther@suse.de>
16366
16367         PR tree-optimization/99807
16368         * tree-vect-slp.c (vect_slp_analyze_node_operations_1): Move
16369         assert below VEC_PERM handling.
16370
16371 2021-03-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16372
16373         PR target/99037
16374         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>): Use
16375         aarch64_simd_or_scalar_imm_zero to match zeroes.  Remove pattern
16376         matching const_int 0.
16377         (move_lo_quad_internal_be_<mode>): Likewise.
16378         (move_lo_quad_<mode>): Update for the above.
16379         * config/aarch64/iterators.md (VQ_2E): Delete.
16380
16381 2021-03-29  Jakub Jelinek  <jakub@redhat.com>
16382
16383         PR tree-optimization/99777
16384         * fold-const.c (extract_muldiv_1): For conversions, punt on casts from
16385         types other than scalar integral types.
16386
16387 2021-03-28  David Edelsohn  <dje.gcc@gmail.com>
16388
16389         * config/rs6000/rs6000.c (rs6000_output_dwarf_dtprel): Do not add
16390         XCOFF TLS reloc decorations.
16391
16392 2021-03-28  Gerald Pfeifer  <gerald@pfeifer.com>
16393
16394         * doc/analyzer.texi (Analyzer Internals): Update link to
16395         "A Memory Model for Static Analysis of C Programs".
16396
16397 2021-03-26  David Edelsohn  <dje.gcc@gmail.com>
16398
16399         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Call function.
16400         * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align):
16401         Declare.
16402         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align): New.
16403         (rs6000_special_round_type_align): Recursively check innermost first
16404         field.
16405
16406 2021-03-26  Jakub Jelinek  <jakub@redhat.com>
16407
16408         PR debug/99334
16409         * dwarf2out.h (struct dw_fde_node): Add rule18 member.
16410         * dwarf2cfi.c (dwarf2out_frame_debug_expr): When handling (set hfp sp)
16411         assignment with drap_reg active, queue reg save for hfp with offset 0
16412         and flush queued reg saves.  When handling a push with rule18,
16413         defer queueing reg save for hfp and just assert the offset is 0.
16414         (scan_trace): Assert that fde->rule18 is false.
16415
16416 2021-03-26  Vladimir Makarov  <vmakarov@redhat.com>
16417
16418         PR target/99766
16419         * ira-costs.c (record_reg_classes): Put case with
16420         CT_RELAXED_MEMORY adjacent to one with CT_MEMORY.
16421         * ira.c (ira_setup_alts): Ditto.
16422         * lra-constraints.c (process_alt_operands): Ditto.
16423         * recog.c (asm_operand_ok): Ditto.
16424         * reload.c (find_reloads): Ditto.
16425
16426 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16427
16428         * config/aarch64/aarch64-protos.h
16429         (cpu_addrcost_table::post_modify_ld3_st3): New member variable.
16430         (cpu_addrcost_table::post_modify_ld4_st4): Likewise.
16431         * config/aarch64/aarch64.c (generic_addrcost_table): Update
16432         accordingly, using the same costs as for post_modify.
16433         (exynosm1_addrcost_table, xgene1_addrcost_table): Likewise.
16434         (thunderx2t99_addrcost_table, thunderx3t110_addrcost_table):
16435         (tsv110_addrcost_table, qdf24xx_addrcost_table): Likewise.
16436         (a64fx_addrcost_table): Likewise.
16437         (neoversev1_addrcost_table): New.
16438         (neoversev1_tunings): Use neoversev1_addrcost_table.
16439         (aarch64_address_cost): Use the new post_modify costs for CImode
16440         and XImode.
16441
16442 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16443
16444         * config/aarch64/aarch64.opt
16445         (-param=aarch64-loop-vect-issue-rate-niters=): New parameter.
16446         * doc/invoke.texi: Document it.
16447         * config/aarch64/aarch64-protos.h (aarch64_base_vec_issue_info)
16448         (aarch64_scalar_vec_issue_info, aarch64_simd_vec_issue_info)
16449         (aarch64_advsimd_vec_issue_info, aarch64_sve_vec_issue_info)
16450         (aarch64_vec_issue_info): New structures.
16451         (cpu_vector_cost): Write comments above the variables rather
16452         than to the side.
16453         (cpu_vector_cost::issue_info): New member variable.
16454         * config/aarch64/aarch64.c: Include gimple-pretty-print.h
16455         and tree-ssa-loop-niter.h.
16456         (generic_vector_cost, a64fx_vector_cost, qdf24xx_vector_cost)
16457         (thunderx_vector_cost, tsv110_vector_cost, cortexa57_vector_cost)
16458         (exynosm1_vector_cost, xgene1_vector_cost, thunderx2t99_vector_cost)
16459         (thunderx3t110_vector_cost): Initialize issue_info to null.
16460         (neoversev1_scalar_issue_info, neoversev1_advsimd_issue_info)
16461         (neoversev1_sve_issue_info, neoversev1_vec_issue_info): New structures.
16462         (neoversev1_vector_cost): Use them.
16463         (aarch64_vec_op_count, aarch64_sve_op_count): New structures.
16464         (aarch64_vector_costs::saw_sve_only_op): New member variable.
16465         (aarch64_vector_costs::num_vector_iterations): Likewise.
16466         (aarch64_vector_costs::scalar_ops): Likewise.
16467         (aarch64_vector_costs::advsimd_ops): Likewise.
16468         (aarch64_vector_costs::sve_ops): Likewise.
16469         (aarch64_vector_costs::seen_loads): Likewise.
16470         (aarch64_simd_vec_costs_for_flags): New function.
16471         (aarch64_analyze_loop_vinfo): Initialize num_vector_iterations.
16472         Count the number of predicate operations required by SVE WHILE
16473         instructions.
16474         (aarch64_comparison_type, aarch64_multiply_add_p): New functions.
16475         (aarch64_sve_only_stmt_p, aarch64_in_loop_reduction_latency): Likewise.
16476         (aarch64_count_ops): Likewise.
16477         (aarch64_add_stmt_cost): Record whether see an SVE operation
16478         that cannot currently be implementing using Advanced SIMD.
16479         Record issue information about the scalar, Advanced SIMD
16480         and (where relevant) SVE versions of a loop.
16481         (aarch64_vec_op_count::dump): New function.
16482         (aarch64_sve_op_count::dump): Likewise.
16483         (aarch64_estimate_min_cycles_per_iter): Likewise.
16484         (aarch64_adjust_body_cost): If issue information is available,
16485         try to compare the issue rates of the various loop implementations
16486         and increase or decrease the vector body cost accordingly.
16487
16488 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16489
16490         * config/aarch64/aarch64.c (aarch64_detect_vector_stmt_subtype):
16491         Assume a zero cost for induction phis.
16492
16493 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16494
16495         * config/aarch64/aarch64.c (aarch64_embedded_comparison_type): New
16496         function.
16497         (aarch64_adjust_stmt_cost): Add the costs of embedded scalar and
16498         vector comparisons.
16499
16500 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16501
16502         * config/aarch64/aarch64.c (aarch64_detect_scalar_stmt_subtype):
16503         New function.
16504         (aarch64_add_stmt_cost): Call it.
16505
16506 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16507
16508         * config/aarch64/aarch64-tuning-flags.def (matched_vector_throughput):
16509         New tuning parameter.
16510         * config/aarch64/aarch64.c (neoversev1_tunings): Use it.
16511         (aarch64_estimated_sve_vq): New function.
16512         (aarch64_vector_costs::analyzed_vinfo): New member variable.
16513         (aarch64_vector_costs::is_loop): Likewise.
16514         (aarch64_vector_costs::unrolled_advsimd_niters): Likewise.
16515         (aarch64_vector_costs::unrolled_advsimd_stmts): Likewise.
16516         (aarch64_record_potential_advsimd_unrolling): New function.
16517         (aarch64_analyze_loop_vinfo, aarch64_analyze_bb_vinfo): Likewise.
16518         (aarch64_add_stmt_cost): Call aarch64_analyze_loop_vinfo or
16519         aarch64_analyze_bb_vinfo on the first use of a costs structure.
16520         Detect whether we're vectorizing a loop for SVE that might be
16521         completely unrolled if it used Advanced SIMD instead.
16522         (aarch64_adjust_body_cost_for_latency): New function.
16523         (aarch64_finish_cost): Call it.
16524
16525 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16526
16527         * config/aarch64/aarch64.c (aarch64_vector_costs): New structure.
16528         (aarch64_init_cost): New function.
16529         (aarch64_add_stmt_cost): Use aarch64_vector_costs instead of
16530         the default unsigned[3].
16531         (aarch64_finish_cost, aarch64_destroy_cost_data): New functions.
16532         (TARGET_VECTORIZE_INIT_COST): Override.
16533         (TARGET_VECTORIZE_FINISH_COST): Likewise.
16534         (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise.
16535
16536 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16537
16538         * config/aarch64/aarch64.c (neoversev1_advsimd_vector_cost)
16539         (neoversev1_sve_vector_cost): New cost structures.
16540         (neoversev1_vector_cost): Likewise.
16541         (neoversev1_tunings): Use them.  Enable use_new_vector_costs.
16542
16543 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16544
16545         * config/aarch64/aarch64-protos.h
16546         (sve_vec_cost::scatter_store_elt_cost): New member variable.
16547         * config/aarch64/aarch64.c (generic_sve_vector_cost): Update
16548         accordingly, taking the cost from the cost of a scalar_store.
16549         (a64fx_sve_vector_cost): Likewise.
16550         (aarch64_detect_vector_stmt_subtype): Detect scatter stores.
16551
16552 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16553
16554         * config/aarch64/aarch64-protos.h
16555         (simd_vec_cost::store_elt_extra_cost): New member variable.
16556         * config/aarch64/aarch64.c (generic_advsimd_vector_cost): Update
16557         accordingly, using the vec_to_scalar cost for the new field.
16558         (generic_sve_vector_cost, a64fx_advsimd_vector_cost): Likewise.
16559         (a64fx_sve_vector_cost, qdf24xx_advsimd_vector_cost): Likewise.
16560         (thunderx_advsimd_vector_cost, tsv110_advsimd_vector_cost): Likewise.
16561         (cortexa57_advsimd_vector_cost, exynosm1_advsimd_vector_cost)
16562         (xgene1_advsimd_vector_cost, thunderx2t99_advsimd_vector_cost)
16563         (thunderx3t110_advsimd_vector_cost): Likewise.
16564         (aarch64_detect_vector_stmt_subtype): Detect single-element stores.
16565
16566 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16567
16568         * config/aarch64/aarch64-protos.h (simd_vec_cost::ld2_st2_permute_cost)
16569         (simd_vec_cost::ld3_st3_permute_cost): New member variables.
16570         (simd_vec_cost::ld4_st4_permute_cost): Likewise.
16571         * config/aarch64/aarch64.c (generic_advsimd_vector_cost): Update
16572         accordingly, using zero for the new costs.
16573         (generic_sve_vector_cost, a64fx_advsimd_vector_cost): Likewise.
16574         (a64fx_sve_vector_cost, qdf24xx_advsimd_vector_cost): Likewise.
16575         (thunderx_advsimd_vector_cost, tsv110_advsimd_vector_cost): Likewise.
16576         (cortexa57_advsimd_vector_cost, exynosm1_advsimd_vector_cost)
16577         (xgene1_advsimd_vector_cost, thunderx2t99_advsimd_vector_cost)
16578         (thunderx3t110_advsimd_vector_cost): Likewise.
16579         (aarch64_ld234_st234_vectors): New function.
16580         (aarch64_adjust_stmt_cost): Likewise.
16581         (aarch64_add_stmt_cost): Call aarch64_adjust_stmt_cost if using
16582         the new vector costs.
16583
16584 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16585
16586         * config/aarch64/aarch64-protos.h (sve_vec_cost): Turn into a
16587         derived class of simd_vec_cost.  Add information about CLAST[AB]
16588         and FADDA instructions.
16589         * config/aarch64/aarch64.c (generic_sve_vector_cost): Update
16590         accordingly, using the vec_to_scalar costs for the new fields.
16591         (a64fx_sve_vector_cost): Likewise.
16592         (aarch64_reduc_type): New function.
16593         (aarch64_sve_in_loop_reduction_latency): Likewise.
16594         (aarch64_detect_vector_stmt_subtype): Take a vinfo parameter.
16595         Use aarch64_sve_in_loop_reduction_latency to handle SVE reductions
16596         that occur in the loop body.
16597         (aarch64_add_stmt_cost): Update call accordingly.
16598
16599 2021-03-26  Richard Sandiford  <richard.sandiford@arm.com>
16600
16601         * config/aarch64/aarch64-tuning-flags.def (use_new_vector_costs):
16602         New tuning flag.
16603         * config/aarch64/aarch64-protos.h (simd_vec_cost): Put comments
16604         above the fields rather than to the right.
16605         (simd_vec_cost::reduc_i8_cost): New member variable.
16606         (simd_vec_cost::reduc_i16_cost): Likewise.
16607         (simd_vec_cost::reduc_i32_cost): Likewise.
16608         (simd_vec_cost::reduc_i64_cost): Likewise.
16609         (simd_vec_cost::reduc_f16_cost): Likewise.
16610         (simd_vec_cost::reduc_f32_cost): Likewise.
16611         (simd_vec_cost::reduc_f64_cost): Likewise.
16612         * config/aarch64/aarch64.c (generic_advsimd_vector_cost): Update
16613         accordingly, using the vec_to_scalar_cost for the new fields.
16614         (generic_sve_vector_cost, a64fx_advsimd_vector_cost): Likewise.
16615         (a64fx_sve_vector_cost, qdf24xx_advsimd_vector_cost): Likewise.
16616         (thunderx_advsimd_vector_cost, tsv110_advsimd_vector_cost): Likewise.
16617         (cortexa57_advsimd_vector_cost, exynosm1_advsimd_vector_cost)
16618         (xgene1_advsimd_vector_cost, thunderx2t99_advsimd_vector_cost)
16619         (thunderx3t110_advsimd_vector_cost): Likewise.
16620         (aarch64_use_new_vector_costs_p): New function.
16621         (aarch64_simd_vec_costs): New function, split out from...
16622         (aarch64_builtin_vectorization_cost): ...here.
16623         (aarch64_is_reduction): New function.
16624         (aarch64_detect_vector_stmt_subtype): Likewise.
16625         (aarch64_add_stmt_cost): Call aarch64_detect_vector_stmt_subtype if
16626         using the new vector costs.
16627
16628 2021-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>
16629
16630         PR ipa/99466
16631         * tree-emutls.c (get_emutls_init_templ_addr): Mark initializer of weak
16632         TLS declarations as public.
16633
16634 2021-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>
16635
16636         * config/aarch64/aarch64-d.c (IN_TARGET_CODE): Define.
16637         * config/arm/arm-d.c (IN_TARGET_CODE): Likewise.
16638         * config/i386/i386-d.c (IN_TARGET_CODE): Likewise.
16639         * config/mips/mips-d.c (IN_TARGET_CODE): Likewise.
16640         * config/pa/pa-d.c (IN_TARGET_CODE): Likewise.
16641         * config/riscv/riscv-d.c (IN_TARGET_CODE): Likewise.
16642         * config/rs6000/rs6000-d.c (IN_TARGET_CODE): Likewise.
16643         * config/s390/s390-d.c (IN_TARGET_CODE): Likewise.
16644         * config/sparc/sparc-d.c (IN_TARGET_CODE): Likewise.
16645
16646 2021-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>
16647
16648         PR d/91595
16649         * config.gcc (*-*-cygwin*): Add winnt-d.o
16650         (*-*-mingw*): Likewise.
16651         * config/i386/cygwin.h (EXTRA_TARGET_D_OS_VERSIONS): New macro.
16652         * config/i386/mingw32.h (EXTRA_TARGET_D_OS_VERSIONS): Likewise.
16653         * config/i386/t-cygming: Add winnt-d.o.
16654         * config/i386/winnt-d.c: New file.
16655
16656 2021-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>
16657
16658         * config/freebsd-d.c: Include memmodel.h.
16659
16660 2021-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>
16661
16662         PR d/99691
16663         * config.gcc (*-*-openbsd*): Add openbsd-d.o.
16664         * config/t-openbsd: Add openbsd-d.o.
16665         * config/openbsd-d.c: New file.
16666
16667 2021-03-25  Stam Markianos-Wright  <stam.markianos-wright@arm.com>
16668
16669         PR tree-optimization/96974
16670         * tree-vect-stmts.c (vect_get_vector_types_for_stmt): Replace assert
16671         with graceful exit.
16672
16673 2021-03-25  H.J. Lu  <hjl.tools@gmail.com>
16674
16675         Revert:
16676         2021-03-25  H.J. Lu  <hjl.tools@gmail.com>
16677
16678         PR target/98209
16679         PR target/99744
16680         * config/i386/i386.c (ix86_can_inline_p): Don't check ISA for
16681         always_inline in system headers.
16682
16683 2021-03-25  Kewen Lin  <linkw@linux.ibm.com>
16684
16685         * tree-vect-loop.c (vect_model_reduction_cost): Init inside_cost.
16686
16687 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
16688
16689         PR c++/99565
16690         * tree-core.h (enum operand_equal_flag): Add OEP_ADDRESS_OF_SAME_FIELD.
16691         * fold-const.c (operand_compare::operand_equal_p): Don't compare
16692         field offsets if OEP_ADDRESS_OF_SAME_FIELD.
16693
16694 2021-03-25  H.J. Lu  <hjl.tools@gmail.com>
16695
16696         PR target/98209
16697         PR target/99744
16698         * config/i386/i386.c (ix86_can_inline_p): Don't check ISA for
16699         always_inline in system headers.
16700
16701 2021-03-25  Richard Biener  <rguenther@suse.de>
16702
16703         PR tree-optimization/99746
16704         * tree-vect-slp-patterns.c (complex_pattern::build): Do not mark
16705         the scalar stmt as patterned.  Instead set up required things
16706         manually.
16707
16708 2021-03-25  Xionghu Luo  <luoxhu@linux.ibm.com>
16709
16710         * config/rs6000/rs6000.c (power8_costs): Change l2 cache
16711         from 256 to 512.
16712
16713 2021-03-24  Martin Liska  <mliska@suse.cz>
16714
16715         PR target/99753
16716         * common/config/i386/i386-common.c (ARRAY_SIZE): Fix off-by-one
16717         error.
16718         * config/i386/i386-options.c (ix86_option_override_internal):
16719         Add run-time assert.
16720
16721 2021-03-24  Martin Jambor  <mjambor@suse.cz>
16722
16723         PR ipa/99122
16724         * ipa-cp.c (initialize_node_lattices): Mark as bottom all
16725         parameters with unknown type.
16726         (ipacp_value_safe_for_type): New function.
16727         (propagate_vals_across_arith_jfunc): Verify that the constant type
16728         can be used for a type of the formal parameter.
16729         (propagate_vals_across_ancestor): Likewise.
16730         (propagate_scalar_across_jump_function): Likewise.  Pass the type
16731         also to propagate_vals_across_ancestor.
16732
16733 2021-03-24  Christophe Lyon  <christophe.lyon@linaro.org>
16734
16735         PR target/99727
16736         * config/arm/mve.md (movmisalign<mode>_mve_store): Use Ux
16737         constraint.
16738         (movmisalign<mode>_mve_load): Likewise.
16739
16740 2021-03-24  Jakub Jelinek  <jakub@redhat.com>
16741
16742         PR target/99724
16743         * config/arm/vec-common.md (one_cmpl<mode>2, neg<mode>2,
16744         movmisalign<mode>): Disable expanders for TARGET_REALLY_IWMMXT.
16745
16746 2021-03-24  Alexandre Oliva  <oliva@adacore.com>
16747
16748         * doc/sourcebuild.texi (sysconf): New effective target.
16749
16750 2021-03-24  Alexandre Oliva  <oliva@adacore.com>
16751
16752         * config/i386/predicates.md (reg_or_const_vec_operand): New.
16753         * config/i386/sse.md (ssse3_pshufbv8qi3): Add an expander for
16754         the now *-prefixed insn_and_split, turn the splitter const vec
16755         into an input for the insn, making it an ignored immediate for
16756         non-split cases, and loaded into the scratch register
16757         otherwise.
16758
16759 2021-03-23  Vladimir N. Makarov  <vmakarov@redhat.com>
16760
16761         PR target/99581
16762         * config/aarch64/constraints.md (Utq, UOb, UOh, UOw, UOd, UOty):
16763         Use define_relaxed_memory_constraint for them.
16764
16765 2021-03-23  Iain Sandoe  <iain@sandoe.co.uk>
16766
16767         PR target/99733
16768         * config/host-darwin.c (darwin_gt_pch_use_address): Add a
16769         colon to the diagnostic message.
16770
16771 2021-03-23  Ilya Leoshkevich  <iii@linux.ibm.com>
16772
16773         * fwprop.c (fwprop_propagation::fwprop_propagation): Look at
16774         set_info's uses.
16775         (try_fwprop_subst_note): Use set_info instead of insn_info.
16776         (try_fwprop_subst_pattern): Likewise.
16777         (try_fwprop_subst_notes): Likewise.
16778         (try_fwprop_subst): Likewise.
16779         (forward_propagate_subreg): Likewise.
16780         (forward_propagate_and_simplify): Likewise.
16781         (forward_propagate_into): Likewise.
16782         * rtl-ssa/accesses.h (set_info::single_nondebug_use) New
16783         method.
16784         (set_info::single_nondebug_insn_use): Likewise.
16785         (set_info::single_phi_use): Likewise.
16786         * rtl-ssa/member-fns.inl (set_info::single_nondebug_use) New
16787         method.
16788         (set_info::single_nondebug_insn_use): Likewise.
16789         (set_info::single_phi_use): Likewise.
16790
16791 2021-03-23  Christophe Lyon  <christophe.lyon@linaro.org>
16792
16793         * doc/sourcebuild.texi (arm_dsp_ok, arm_dsp): Document.
16794
16795 2021-03-23  Jakub Jelinek  <jakub@redhat.com>
16796
16797         PR target/99540
16798         * config/aarch64/aarch64.c (aarch64_add_offset): Tell
16799         expand_mult to perform an unsigned rather than a signed
16800         multiplication.
16801
16802 2021-03-23  H.J. Lu  <hjl.tools@gmail.com>
16803
16804         PR target/99704
16805         * config/i386/cpuid.h (__cpuid): Add __volatile__.
16806         (__cpuid_count): Likewise.
16807
16808 2021-03-23  Richard Biener  <rguenther@suse.de>
16809
16810         PR tree-optimization/99721
16811         * tree-vect-slp.c (vect_slp_analyze_node_operations):
16812         Make sure we can schedule the node.
16813
16814 2021-03-23  Marcus Comstedt  <marcus@mc.pp.se>
16815
16816         * config/riscv/riscv.c (riscv_subword): Take endianness into
16817         account when calculating the byte offset.
16818
16819 2021-03-23  Marcus Comstedt  <marcus@mc.pp.se>
16820
16821         * config/riscv/predicates.md (subreg_lowpart_operator): New predicate
16822         * config/riscv/riscv.md (*addsi3_extended2, *subsi3_extended2)
16823         (*negsi2_extended2, *mulsi3_extended2, *<optab>si3_mask)
16824         (*<optab>si3_mask_1, *<optab>di3_mask, *<optab>di3_mask_1)
16825         (*<optab>si3_extend_mask, *<optab>si3_extend_mask_1): Use
16826         new predicate "subreg_lowpart_operator"
16827
16828 2021-03-23  Marcus Comstedt  <marcus@mc.pp.se>
16829
16830         * config/riscv/riscv.c (riscv_swap_instruction): New function
16831         to byteswap an SImode rtx containing an instruction.
16832         (riscv_trampoline_init): Byteswap the generated instructions
16833         when needed.
16834
16835 2021-03-23  Marcus Comstedt  <marcus@mc.pp.se>
16836
16837         * common/config/riscv/riscv-common.c
16838         (TARGET_DEFAULT_TARGET_FLAGS): Set default endianness.
16839         * config.gcc (riscv32be-*, riscv64be-*): Set
16840         TARGET_BIG_ENDIAN_DEFAULT to 1.
16841         * config/riscv/elf.h (LINK_SPEC): Change -melf* value
16842         depending on default endianness.
16843         * config/riscv/freebsd.h (LINK_SPEC): Likewise.
16844         * config/riscv/linux.h (LINK_SPEC): Likewise.
16845         * config/riscv/riscv.c (TARGET_DEFAULT_TARGET_FLAGS): Set
16846         default endianness.
16847         * config/riscv/riscv.h (DEFAULT_ENDIAN_SPEC): New macro.
16848
16849 2021-03-23  Marcus Comstedt  <marcus@mc.pp.se>
16850
16851         * config/riscv/elf.h (LINK_SPEC): Pass linker endianness flag.
16852         * config/riscv/freebsd.h (LINK_SPEC): Likewise.
16853         * config/riscv/linux.h (LINK_SPEC): Likewise.
16854         * config/riscv/riscv.h (ASM_SPEC): Pass -mbig-endian and
16855         -mlittle-endian.
16856         (BYTES_BIG_ENDIAN): Handle big endian.
16857         (WORDS_BIG_ENDIAN): Define to BYTES_BIG_ENDIAN.
16858         * config/riscv/riscv.opt (-mbig-endian, -mlittle-endian): New
16859         options.
16860         * doc/invoke.texi (-mbig-endian, -mlittle-endian): Document.
16861
16862 2021-03-23  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>
16863
16864         * regcprop.c (find_oldest_value_reg): Ask target whether
16865           different mode is fine for replacement register.
16866
16867 2021-03-23  Aldy Hernandez  <aldyh@redhat.com>
16868
16869         PR tree-optimization/99296
16870         * value-range.cc (irange::irange_set_1bit_anti_range): New.
16871         (irange::irange_set_anti_range): Call irange_set_1bit_anti_range
16872         * value-range.h (irange::irange_set_1bit_anti_range): New.
16873
16874 2021-03-22  Vladimir N. Makarov  <vmakarov@redhat.com>
16875
16876         PR target/99581
16877         * config/aarch64/constraints.md (UtQ): Use
16878         define_relaxed_memory_constraint for it.
16879         * doc/md.texi (define_relaxed_memory_constraint): Describe it.
16880         * genoutput.c (main): Process DEFINE_RELAXED_MEMORY_CONSTRAINT.
16881         * genpreds.c (constraint_data): Add bitfield is_relaxed_memory.
16882         (have_relaxed_memory_constraints): New static var.
16883         (relaxed_memory_start, relaxed_memory_end): Ditto.
16884         (add_constraint): Add arg is_relaxed_memory.  Check name for
16885         relaxed memory.  Set up is_relaxed_memory in constraint_data and
16886         have_relaxed_memory_constraints.  Adjust calls.
16887         (choose_enum_order): Process relaxed memory.
16888         (write_tm_preds_h): Ditto.
16889         (main): Process DEFINE_RELAXED_MEMORY_CONSTRAINT.
16890         * gensupport.c (process_rtx): Process DEFINE_RELAXED_MEMORY_CONSTRAINT.
16891         * ira-costs.c (record_reg_classes): Process CT_RELAXED_MEMORY.
16892         * ira-lives.c (single_reg_class): Use
16893         insn_extra_relaxed_memory_constraint.
16894         * ira.c (ira_setup_alts): CT_RELAXED_MEMORY.
16895         * lra-constraints.c (valid_address_p): Use
16896         insn_extra_relaxed_memory_constraint instead of other memory
16897         constraints.
16898         (process_alt_operands): Process CT_RELAXED_MEMORY.
16899         (curr_insn_transform): Use insn_extra_relaxed_memory_constraint.
16900         * recog.c (asm_operand_ok, preprocess_constraints): Process
16901         CT_RELAXED_MEMORY.
16902         * reload.c (find_reloads): Ditto.
16903         * rtl.def (DEFINE_RELAXED_MEMORY_CONSTRAINT): New.
16904         * stmt.c (parse_input_constraint): Use
16905         insn_extra_relaxed_memory_constraint.
16906
16907 2021-03-22  Segher Boessenkool  <segher@kernel.crashing.org>
16908
16909         PR target/97926
16910         * ubsan.c (ubsan_instrument_float_cast): Don't test for unordered if
16911         there are no NaNs.
16912
16913 2021-03-22  Alex Coplan  <alex.coplan@arm.com>
16914
16915         PR target/97252
16916         * config/arm/arm-protos.h (neon_make_constant): Add generate
16917         argument to guard emitting insns, default to true.
16918         * config/arm/arm.c (arm_legitimate_constant_p_1): Reject
16919         CONST_VECTORs which neon_make_constant can't handle.
16920         (neon_vdup_constant): Add generate argument, avoid emitting
16921         insns if it's not set.
16922         (neon_make_constant): Plumb new generate argument through.
16923         * config/arm/constraints.md (Ui): New. Use it...
16924         * config/arm/mve.md (*mve_mov<mode>): ... here.
16925         * config/arm/vec-common.md (movv8hf): Use neon_make_constant to
16926         synthesize constants.
16927
16928 2021-03-22  Richard Biener  <rguenther@suse.de>
16929
16930         * debug.h: Add deprecation warning.
16931
16932 2021-03-22  Richard Biener  <rguenther@suse.de>
16933
16934         PR tree-optimization/99694
16935         * tree-ssa-sccvn.c (visit_phi): Ignore edges with the
16936         PHI result.
16937
16938 2021-03-22  Kito Cheng  <kito.cheng@sifive.com>
16939
16940         PR target/99702
16941         * config/riscv/riscv.c (riscv_expand_block_move): Get RTL value
16942         after type checking.
16943
16944 2021-03-22  Jakub Jelinek  <jakub@redhat.com>
16945
16946         PR debug/99562
16947         PR debug/66728
16948         * dwarf2out.c (get_full_len): Use get_precision rather than
16949         min_precision.
16950         (add_const_value_attribute): Make sure add_AT_wide argument has
16951         precision prec rather than some very wide one.
16952
16953 2021-03-22  Kewen Lin  <linkw@linux.ibm.com>
16954
16955         * config/rs6000/rs6000.md (*rotldi3_insert_sf,
16956         *mov<SFDF:mode><SFDF2:mode>cc_p9, floatsi<mode>2_lfiwax,
16957         floatsi<mode>2_lfiwax_mem, floatunssi<mode>2_lfiwzx,
16958         floatunssi<mode>2_lfiwzx_mem, *floatsidf2_internal,
16959         *floatunssidf2_internal, fix_trunc<mode>si2_stfiwx,
16960         fix_trunc<mode>si2_internal, fixuns_trunc<mode>si2_stfiwx,
16961         *round32<mode>2_fprs, *roundu32<mode>2_fprs,
16962         *fix_trunc<mode>si2_internal): Fix empty split condition.
16963         * config/rs6000/vsx.md (*vsx_le_undo_permute_<mode>,
16964         vsx_reduc_<VEC_reduc_name>_v2df, vsx_reduc_<VEC_reduc_name>_v4sf,
16965         *vsx_reduc_<VEC_reduc_name>_v2df_scalar,
16966         *vsx_reduc_<VEC_reduc_name>_v4sf_scalar): Likewise.
16967
16968 2021-03-22  Xionghu Luo  <luoxhu@linux.ibm.com>
16969
16970         PR target/98914
16971         * config/rs6000/rs6000.c (rs6000_expand_vector_set_var_p9):
16972         Convert idx to DImode.
16973         (rs6000_expand_vector_set_var_p8): Likewise.
16974
16975 2021-03-21  Jakub Jelinek  <jakub@redhat.com>
16976
16977         PR debug/99388
16978         * dwarf2out.c (insert_float): Change return type from void to
16979         unsigned, handle GET_MODE_SIZE (mode) == 2 and return element size.
16980         (mem_loc_descriptor, loc_descriptor, add_const_value_attribute):
16981         Adjust callers.
16982
16983 2021-03-20  H.J. Lu  <hjl.tools@gmail.com>
16984
16985         PR target/99679
16986         * config/i386/i386.c (construct_container): Check cfun != NULL
16987         before accessing silent_p.
16988
16989 2021-03-20  Ahamed Husni  <ahamedhusni73@gmail.com>
16990
16991         * asan.c: Fix typos in comments.
16992
16993 2021-03-20  Vladimir N. Makarov  <vmakarov@redhat.com>
16994
16995         PR rtl-optimization/99680
16996         * lra-constraints.c (skip_contraint_modifiers): Rename to skip_constraint_modifiers.
16997         (process_address_1): Check empty constraint before using
16998         CONSTRAINT_LEN.
16999
17000 2021-03-19  Pat Haugen  <pthaugen@linux.ibm.com>
17001
17002         * config/rs6000/rs6000.c (power10_cost): New.
17003         (rs6000_option_override_internal): Set Power10 costs.
17004         (rs6000_issue_rate): Set Power10 issue rate.
17005         * config/rs6000/power10.md: Rewrite for Power10.
17006
17007 2021-03-19  Vladimir N. Makarov  <vmakarov@redhat.com>
17008
17009         PR target/99663
17010         * lra-constraints.c (process_address_1): Don't use unknown
17011         constraint for address constraint.
17012
17013 2021-03-19  Iain Sandoe  <iain@sandoe.co.uk>
17014
17015         PR target/99661
17016         * config.gcc (powerpc-*-darwin8): Delete the reference to
17017         the now removed darwin8.h.
17018
17019 2021-03-19  Olivier Hainque  <hainque@adacore.com>
17020
17021         PR target/99660
17022         * config/vxworksae.h (VX_CPU_PREFIX): Define.
17023
17024 2021-03-19  John David Anglin  <danglin@gcc.gnu.org>
17025
17026         * config/pa/pa.c (import_milli): Use memcpy instead of strncpy.
17027
17028 2021-03-19  Tamar Christina  <tamar.christina@arm.com>
17029
17030         PR tree-optimization/99656
17031         * tree-vect-slp-patterns.c (linear_loads_p,
17032         complex_add_pattern::matches, is_eq_or_top,
17033         vect_validate_multiplication, complex_mul_pattern::matches,
17034         complex_fms_pattern::matches): Remove complex_perm_kinds_t.
17035         * tree-vectorizer.h: (complex_load_perm_t): Removed.
17036         (slp_tree_to_load_perm_map_t): Use complex_perm_kinds_t instead of
17037         complex_load_perm_t.
17038
17039 2021-03-19  H.J. Lu  <hjl.tools@gmail.com>
17040
17041         PR target/99652
17042         * config/i386/i386-options.c (ix86_init_machine_status): Set
17043         silent_p to true.
17044         * config/i386/i386.c (init_cumulative_args): Set silent_p to
17045         false.
17046         (construct_container): Return early for return and argument
17047         errors if silent_p is true.
17048         * config/i386/i386.h (machine_function): Add silent_p.
17049
17050 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
17051
17052         PR target/99593
17053         * config/arm/constraints.md (Ds): New constraint.
17054         * config/arm/vec-common.md (mve_vshlq_<supf><mode>): Use w,Ds
17055         constraint instead of w,Dm.
17056
17057 2021-03-19  Andrew Stubbs  <ams@codesourcery.com>
17058
17059         * config/gcn/gcn.c (gcn_parse_amdgpu_hsa_kernel_attribute): Fix quotes
17060         in error message.
17061
17062 2021-03-19  Eric Botcazou  <ebotcazou@adacore.com>
17063
17064         PR middle-end/99641
17065         * fold-const.c (native_encode_initializer) <CONSTRUCTOR>: For an
17066         array type, do the computation of the current position in sizetype.
17067
17068 2021-03-18  Vladimir N. Makarov  <vmakarov@redhat.com>
17069
17070         PR target/99422
17071         * lra-constraints.c (process_address_1): Use lookup_constraint
17072         only for a single constraint.
17073
17074 2021-03-18  Martin Sebor  <msebor@redhat.com>
17075
17076         PR middle-end/99502
17077         * gimple-array-bounds.cc (inbounds_vbase_memaccess_p): Rename...
17078         (inbounds_memaccess_p): ...to this.  Check the ending offset of
17079         the accessed member.
17080
17081 2021-03-18  Andrew Stubbs  <ams@codesourcery.com>
17082
17083         * config/gcn/gcn.c (gcn_parse_amdgpu_hsa_kernel_attribute): Add %< and
17084           %> quote markers to error messages.
17085         (gcn_goacc_validate_dims): Likewise.
17086         (gcn_conditional_register_usage): Remove exclaimation mark from error
17087         message.
17088         (gcn_vectorize_vec_perm_const): Ensure perm is fully uninitialized.
17089
17090 2021-03-18  Jan Hubicka  <hubicka@ucw.cz>
17091
17092         * config/i386/x86-tune-costs.h (struct processor_costs): Fix costs of
17093         integer divides1.
17094
17095 2021-03-18  Sinan Lin  <sinan@isrc.iscas.ac.cn>
17096             Kito Cheng  <kito.cheng@sifive.com>
17097
17098         * config/riscv/riscv.c (riscv_block_move_straight): Change type
17099         to unsigned HOST_WIDE_INT for parameter and local variable with
17100         HOST_WIDE_INT type.
17101         (riscv_adjust_block_mem): Ditto.
17102         (riscv_block_move_loop): Ditto.
17103         (riscv_expand_block_move): Ditto.
17104
17105 2021-03-18  Nick Clifton  <nickc@redhat.com>
17106
17107         * config/v850/v850.c (construct_restore_jr): Increase static
17108          buffer size.
17109         (construct_save_jarl): Likewise.
17110         * config/v850/v850.h (DWARF2_DEBUGGING_INFO): Define.
17111
17112 2021-03-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17113
17114         * config/aarch64/aarch64.c (aarch64_adjust_generic_arch_tuning): Define.
17115         (aarch64_override_options_internal): Use it.
17116         (generic_tunings): Add AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS to
17117         tune_flags.
17118
17119 2021-03-17  Sandra Loosemore  <sandra@codesourcery.com>
17120
17121         * config/nios2/nios2.c (nios2_custom_check_insns): Clean up
17122         error message format issues.
17123         (nios2_option_override): Likewise.
17124         (nios2_expand_fpu_builtin): Likewise.
17125         (nios2_init_custom_builtins): Adjust to avoid bogus strncpy
17126         truncation warning.
17127         (nios2_expand_custom_builtin): More error message format fixes.
17128         (nios2_expand_rdwrctl_builtin): Likewise.
17129         (nios2_expand_rdprs_builtin): Likewise.
17130         (nios2_expand_eni_builtin): Likewise.
17131         (nios2_expand_builtin): Likewise.
17132         (nios2_register_custom_code): Likewise.
17133         (nios2_valid_target_attribute_rec): Likewise.
17134         (nios2_add_insn_asm): Fix uninitialized variable warning.
17135
17136 2021-03-17  Jan Hubicka  <jh@suse.cz>
17137
17138         * config/i386/x86-tune-costs.h (struct processor_costs): Update costs
17139         of gather to match reality.
17140         * config/i386/x86-tune.def (X86_TUNE_USE_GATHER): Enable for znver3.
17141
17142 2021-03-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17143
17144         * config/aarch64/aarch64-builtins.c (aarch64_expand_rng_builtin): Use EQ
17145         to compare against CC_REG rather than NE.
17146
17147 2021-03-17  H.J. Lu  <hjl.tools@gmail.com>
17148
17149         PR target/99504
17150         * config/i386/i386.c (ix86_force_load_from_GOT_p): Support
17151         inline assembly statements.
17152         (ix86_print_operand): Update 'P' handling for -fno-plt.
17153
17154 2021-03-17  Tamar Christina  <tamar.christina@arm.com>
17155
17156         PR target/99542
17157         * config/aarch64/aarch64.c
17158         (aarch64_simd_clone_compute_vecsize_and_simdlen): Remove unused var.
17159
17160 2021-03-16  Segher Boessenkool  <segher@kernel.crashing.org>
17161
17162         PR target/98092
17163         * config/rs6000/predicates.md (branch_comparison_operator): Allow
17164         ordered and unordered for CCFPmode, if flag_finite_math_only.
17165
17166 2021-03-16  Jakub Jelinek  <jakub@redhat.com>
17167
17168         PR target/99600
17169         * config/i386/i386-expand.c (ix86_split_lea_for_addr): Emit a MULT
17170         rather than ASHIFT.
17171         * config/i386/i386.md (mult by 1248 into ashift): New splitter.
17172
17173 2021-03-16  Martin Liska  <mliska@suse.cz>
17174
17175         PR target/99592
17176         * optc-save-gen.awk: Add flag_ipa_ra to exceptions for
17177         cl_optimization_compare function.
17178
17179 2021-03-16  Ilya Leoshkevich  <iii@linux.ibm.com>
17180
17181         * config/s390/s390.c (f_constraint_p): Treat "fv" constraints
17182         as "v".
17183
17184 2021-03-16  Jakub Jelinek  <jakub@redhat.com>
17185
17186         PR target/99563
17187         * config/i386/i386.h (struct machine_function): Add
17188         has_explicit_vzeroupper bitfield.
17189         * config/i386/i386-expand.c (ix86_expand_builtin): Set
17190         cfun->machine->has_explicit_vzeroupper when expanding
17191         IX86_BUILTIN_VZEROUPPER.
17192         * config/i386/i386-features.c (rest_of_handle_insert_vzeroupper):
17193         Do the mode switching only when TARGET_VZEROUPPER, expensive
17194         optimizations turned on and not optimizing for size.
17195         (pass_insert_vzeroupper::gate): Enable even when
17196         cfun->machine->has_explicit_vzeroupper is set.
17197
17198 2021-03-16  Jakub Jelinek  <jakub@redhat.com>
17199
17200         PR target/99542
17201         * config/aarch64/aarch64.c
17202         (aarch64_simd_clone_compute_vecsize_and_simdlen): If not a function
17203         definition, walk TYPE_ARG_TYPES list if non-NULL for argument types
17204         instead of DECL_ARGUMENTS.  Ignore types for uniform arguments.
17205
17206 2021-03-15  Richard Biener  <rguenther@suse.de>
17207
17208         PR tree-optimization/98834
17209         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle missing
17210         subsetting by truncating the access size.
17211
17212 2021-03-15  Jan Hubicka  <hubicka@ucw.cz>
17213
17214         * config/i386/i386-options.c (processor_cost_table): Add znver3_cost.
17215         * config/i386/x86-tune-costs.h (znver3_cost): New gobal variable; copy
17216         of znver2_cost.
17217
17218 2021-03-15  Martin Liska  <mliska@suse.cz>
17219
17220         * spellcheck.c: Add missing comma in initialization.
17221
17222 2021-03-14  Uroš Bizjak  <ubizjak@gmail.com>
17223
17224         * config/i386/sse.md (*vec_extract<mode>): Merge alternative 0 with
17225         alternative 2 and alternative 1 with alternative 3 using
17226         YW register constraint.
17227         (*vec_extract<PEXTR_MODE12:mode>_zext): Merge alternatives
17228         using YW register constraint.
17229         (*vec_extractv16qi_zext): Ditto.
17230         (*vec_extractv4si): Merge alternatives 4 and 5
17231         using Yw register constraint.
17232         (*ssse3_palignr<mode>_perm): Use Yw instead of v for alternative 3.
17233
17234 2021-03-13  Martin Sebor  <msebor@redhat.com>
17235
17236         PR tree-optimization/99489
17237         * builtins.c (gimple_call_alloc_size): Fail gracefully when argument
17238         is not a call statement.
17239
17240 2021-03-13  Jakub Jelinek  <jakub@redhat.com>
17241
17242         PR tree-optimization/99544
17243         * match.pd (X + (X << C) -> X * (1 + (1 << C))): Don't simplify
17244         if for vector types multiplication can't be done in type's mode.
17245
17246 2021-03-12  Eric Botcazou  <ebotcazou@adacore.com>
17247
17248         PR target/99422
17249         * config/sparc/constraints.md (w): Rename to...
17250         (W): ... this and ditch previous implementation.
17251         * config/sparc/sparc.md (*movdi_insn_sp64): Replace W with m.
17252         (*movdf_insn_sp64): Likewise.
17253         (*mov<VM64:mode>_insn_sp64): Likewise.
17254         * config/sparc/sync.md (*atomic_compare_and_swap<mode>_1): Replace
17255         w with W.
17256         (atomic_compare_and_swap_leon3_1): Likewise.
17257         (*atomic_compare_and_swapdi_v8plus): Likewise.
17258         * config/sparc/sparc.c (memory_ok_for_ldd): Remove useless test on
17259         architecture and add missing address validity check during LRA.
17260
17261 2021-03-12  Tobias Burnus  <tobias@codesourcery.com>
17262
17263         PR fortran/98858
17264         * gimplify.c (omp_add_variable): Handle NULL_TREE as size
17265         occuring for assumed-size arrays in use_device_{ptr,addr}.
17266
17267 2021-03-12  Jakub Jelinek  <jakub@redhat.com>
17268
17269         PR target/99321
17270         * config/i386/constraints.md (YW): New internal constraint.
17271         * config/i386/sse.md (v_Yw): Add V4TI, V2TI, V1TI and TI cases.
17272         (*<sse2_avx2>_<insn><mode>3<mask_name>,
17273         *<sse2_avx2>_uavg<mode>3<mask_name>, *abs<mode>2,
17274         *<s>mul<mode>3_highpart<mask_name>): Use <v_Yw> instead of v in
17275         constraints.
17276         (<sse2_avx2>_psadbw): Use YW instead of v in constraints.
17277         (*avx2_pmaddwd, *sse2_pmaddwd, *<code>v8hi3, *<code>v16qi3,
17278         avx2_pmaddubsw256, ssse3_pmaddubsw128): Merge last two alternatives
17279         into one, use Yw instead of former x,v.
17280         (ashr<mode>3, <insn><mode>3): Use <v_Yw> instead of x in constraints of
17281         the last alternative.
17282         (<sse2_avx2>_packsswb<mask_name>, <sse2_avx2>_packssdw<mask_name>,
17283         <sse2_avx2>_packuswb<mask_name>, <sse4_1_avx2>_packusdw<mask_name>,
17284         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, <ssse3_avx2>_palignr<mode>,
17285         <ssse3_avx2>_pshufb<mode>3<mask_name>): Merge last two alternatives
17286         into one, use <v_Yw> instead of former x,v.
17287         (avx2_interleave_highv32qi<mask_name>,
17288         vec_interleave_highv16qi<mask_name>): Use Yw instead of v in
17289         constraints.  Add && <mask_avx512bw_condition> to condition.
17290         (avx2_interleave_lowv32qi<mask_name>,
17291         vec_interleave_lowv16qi<mask_name>,
17292         avx2_interleave_highv16hi<mask_name>,
17293         vec_interleave_highv8hi<mask_name>,
17294         avx2_interleave_lowv16hi<mask_name>, vec_interleave_lowv8hi<mask_name>,
17295         avx2_pshuflw_1<mask_name>, sse2_pshuflw_1<mask_name>,
17296         avx2_pshufhw_1<mask_name>, sse2_pshufhw_1<mask_name>,
17297         avx2_<code>v16qiv16hi2<mask_name>, sse4_1_<code>v8qiv8hi2<mask_name>,
17298         *sse4_1_<code>v8qiv8hi2<mask_name>_1, <sse2_avx2>_<insn><mode>3): Use
17299         Yw instead of v in constraints.
17300         * config/i386/mmx.md (Yv_Yw): New define_mode_attr.
17301         (*mmx_<insn><mode>3, mmx_ashr<mode>3, mmx_<insn><mode>3): Use <Yv_Yw>
17302         instead of Yv in constraints.
17303         (*mmx_<insn><mode>3, *mmx_mulv4hi3, *mmx_smulv4hi3_highpart,
17304         *mmx_umulv4hi3_highpart, *mmx_pmaddwd, *mmx_<code>v4hi3,
17305         *mmx_<code>v8qi3, mmx_pack<s_trunsuffix>swb, mmx_packssdw,
17306         mmx_punpckhbw, mmx_punpcklbw, mmx_punpckhwd, mmx_punpcklwd,
17307         *mmx_uavgv8qi3, *mmx_uavgv4hi3, mmx_psadbw): Use Yw instead of Yv in
17308         constraints.
17309         (*mmx_pinsrw, *mmx_pinsrb, *mmx_pextrw, *mmx_pextrw_zext, *mmx_pextrb,
17310         *mmx_pextrb_zext): Use YW instead of Yv in constraints.
17311         (*mmx_eq<mode>3, mmx_gt<mode>3): Use x instead of Yv in constraints.
17312         (mmx_andnot<mode>3, *mmx_<code><mode>3): Split last alternative into
17313         two, one with just x, another isa avx512vl with v.
17314
17315 2021-03-12  Martin Liska  <mliska@suse.cz>
17316
17317         * doc/invoke.texi: Add missing param documentation.
17318
17319 2021-03-11  David Malcolm  <dmalcolm@redhat.com>
17320
17321         PR analyzer/96374
17322         * Makefile.in (ANALYZER_OBJS): Add analyzer/feasible-graph.o and
17323         analyzer/trimmed-graph.o.
17324         * doc/analyzer.texi (Analyzer Paths): Rewrite description of
17325         feasibility checking to reflect new implementation.
17326         * doc/invoke.texi (-fdump-analyzer-feasibility): Document new
17327         option.
17328         * shortest-paths.h (shortest_paths::get_shortest_distance): New.
17329
17330 2021-03-11  David Malcolm  <dmalcolm@redhat.com>
17331
17332         * digraph.cc (selftest::test_shortest_paths): Update
17333         shortest_paths init for new param.  Add test of
17334         SPS_TO_GIVEN_TARGET.
17335         * shortest-paths.h (enum shortest_path_sense): New.
17336         (shortest_paths::shortest_paths): Add "sense" param.
17337         Update for renamings.  Generalize to use "sense" param.
17338         (shortest_paths::get_shortest_path): Rename param.
17339         (shortest_paths::m_sense): New field.
17340         (shortest_paths::m_prev): Rename...
17341         (shortest_paths::m_best_edge): ...to this.
17342         (shortest_paths::get_shortest_path): Update for renamings.
17343         Conditionalize flipping of path on sense of traversal.
17344
17345 2021-03-11  David Malcolm  <dmalcolm@redhat.com>
17346
17347         * digraph.cc (selftest::test_shortest_paths): Add test coverage
17348         for paths from B and C.
17349         * shortest-paths.h (shortest_paths::shortest_paths): Handle
17350         unreachable nodes, rather than asserting.
17351
17352 2021-03-11  David Edelsohn  <dje.gcc@gmail.com>
17353
17354         PR target/99094
17355         * config/rs6000/rs6000.c (rs6000_xcoff_file_start): Don't create
17356         xcoff_tbss_section_name.
17357         * config/rs6000/xcoff.h (ASM_OUTPUT_TLS_COMMON): Use .lcomm.
17358         * xcoffout.c (xcoff_tbss_section_name): Delete.
17359         * xcoffout.h (xcoff_tbss_section_name): Delete.
17360
17361 2021-03-11  Richard Biener  <rguenther@suse.de>
17362
17363         PR tree-optimization/99523
17364         * tree-cfg.c (dump_function_to_file): Dump SSA names
17365         w/o identifier to the decls section as well, not only those
17366         without a VAR_DECL.
17367
17368 2021-03-11  Jakub Jelinek  <jakub@redhat.com>
17369
17370         PR ipa/99517
17371         * ipa-icf-gimple.c (func_checker::compare_gimple_call): For internal
17372         function calls with lhs fail if the lhs don't have compatible types.
17373
17374 2021-03-11  Hans-Peter Nilsson  <hp@axis.com>
17375
17376         * config/cris/cris.h (HARD_FRAME_POINTER_REGNUM): Define.
17377         Change FRAME_POINTER_REGNUM to correspond to a new faked
17378         register faked_fp, part of GENNONACR_REGS like faked_ap.
17379         (CRIS_FAKED_REGS_CONTENTS): New helper macro.
17380         (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS, CALL_USED_REGISTERS):
17381         (REG_ALLOC_ORDER, REG_CLASS_CONTENTS, REGNO_OK_FOR_BASE_P)
17382         (ELIMINABLE_REGS, REGISTER_NAMES): Adjust accordingly.
17383         * config/cris/cris.md (CRIS_FP_REGNUM): Renumber to new faked
17384         register.
17385         (CRIS_REAL_FP_REGNUM): New constant.
17386         * config/cris/cris.c (cris_reg_saved_in_regsave_area): Check
17387         for HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM.
17388         (cris_initial_elimination_offset): Handle elimination changes
17389         to HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM
17390         and add one from FRAME_POINTER_REGNUM to
17391         HARD_FRAME_POINTER_REGNUM.
17392         (cris_expand_prologue, cris_expand_epilogue): Emit code for
17393         hard_frame_pointer_rtx instead of frame_pointer_rtx.
17394
17395 2021-03-10  David Edelsohn  <dje.gcc@gmail.com>
17396
17397         PR target/99492
17398         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Add check for DCmode.
17399         * config/rs6000/rs6000.c (rs6000_special_round_type_align): Same.
17400
17401 2021-03-10  Vladimir N. Makarov  <vmakarov@redhat.com>
17402
17403         PR target/99422
17404         * lra-constraints.c (process_address_1): Don't check unknown
17405         constraint, use X for empty constraint.
17406
17407 2021-03-10  Alex Coplan  <alex.coplan@arm.com>
17408
17409         * config/aarch64/aarch64.c (aarch64_vfp_is_call_or_return_candidate):
17410         Fix typo in comment describing "is_ha" argument.
17411
17412 2021-03-10  John David Anglin  <danglin@gcc.gnu.org>
17413
17414         * doc/sourcebuild.texi: Document LRA target selector.
17415
17416 2021-03-10  David Malcolm  <dmalcolm@redhat.com>
17417
17418         * doc/ux.texi: Add subsection contrasting interactive versus
17419         batch usage of GCC.
17420
17421 2021-03-10  Joel Hutton  <joel.hutton@arm.com>
17422
17423         PR target/99102
17424         * tree-vect-stmts.c (vectorizable_store): Fix scatter store mask
17425         check condition.
17426         (vectorizable_load): Fix gather load mask check condition.
17427
17428 2021-03-10  Richard Biener  <rguenther@suse.de>
17429
17430         PR tree-optimization/99510
17431         * tree.c (check_aligned_type): Check that the candidate
17432         has TYPE_USER_ALIGN set instead of matching with the
17433         original type.
17434
17435 2021-03-10  Eric Botcazou  <ebotcazou@adacore.com>
17436
17437         * config/sparc/sparc.c (sparc_regmode_natural_size): Return 4 for
17438         float and vector integer modes only if the mode is not larger.
17439
17440 2021-03-10  Hans-Peter Nilsson  <hp@axis.com>
17441
17442         * config/cris/cris.h (DWARF_FRAME_REGISTERS): Define.
17443
17444 2021-03-09  Vladimir N. Makarov  <vmakarov@redhat.com>
17445
17446         * ira.c (ira_setup_alts, ira_get_dup_out_num): Process digital
17447         constraints > 9.
17448         * ira-lives.c (single_reg_class): Ditto.
17449
17450 2021-03-09  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17451
17452         * config.gcc (aarch64-*-rtems*): Include general rtems.h after
17453         the architecture-specific rtems.h.
17454         (aarch64-*-rtems*): Likewise.
17455         (arm*-*-rtems*): Likewise.
17456         (epiphany-*-rtems*): Likewise.
17457         (riscv*-*-rtems*): Likewise.
17458
17459 2021-03-09  Jakub Jelinek  <jakub@redhat.com>
17460
17461         PR tree-optimization/99305
17462         * tree-ssa-phiopt.c (conditional_replacement): Test integer_pow2p
17463         before integer_all_onesp instead of vice versa.
17464
17465 2021-03-09  Richard Earnshaw  <rearnsha@arm.com>
17466
17467         * common/config/arm/arm-common.c (arm_config_default): Change type
17468         of 'i' to unsigned.
17469
17470 2021-03-09  Vladimir N. Makarov  <vmakarov@redhat.com>
17471
17472         PR target/99454
17473         * lra-constraints.c (process_address_1): Process constraint 'g'
17474         separately and digital constraints containing more one digit.
17475
17476 2021-03-09  Nick Clifton  <nickc@redhat.com>
17477
17478         * config/rx/rx.h (DBX_DEBUGGING_INFO): Define.
17479         (DWARF"_DEBUGGING_INFO): Define.
17480
17481 2021-03-09  Eric Botcazou  <ebotcazou@adacore.com>
17482
17483         PR c++/90448
17484         * calls.c (initialize_argument_information): When the argument
17485         is passed by reference, do not make a copy in a thunk only if
17486         the argument is already in memory.  Remove redundant test for
17487         the case of callee copy.
17488
17489 2021-03-09  Vladimir N. Makarov  <vmakarov@redhat.com>
17490
17491         PR target/99454
17492         * lra-constraints.c (process_address_1): Process 0..9 constraints
17493         in process_address_1.
17494
17495 2021-03-09  Andreas Krebbel  <krebbel@linux.ibm.com>
17496
17497         * config/s390/s390.c (struct s390_processor processor_table):
17498         Binutils name string must not be empty.
17499
17500 2021-03-09  Claudiu Zissulescu  <claziss@synopsys.com>
17501
17502         * config/arc/arc.c (arc_attr_type): Remove function.
17503
17504 2021-03-09  Martin Liska  <mliska@suse.cz>
17505
17506         PR target/99464
17507         * config/i386/i386-options.c (ix86_option_override_internal):
17508         Set isa_flags for OPTS argument and not for the global
17509         global_options.
17510
17511 2021-03-09  Aaron Sawdey  <acsawdey@linux.ibm.com>
17512
17513         * config/rs6000/predicates.md (ds_form_mem_operand): Check
17514         in correct code.
17515
17516 2021-03-09  Aaron Sawdey  <acsawdey@linux.ibm.com>
17517
17518         PR target/99070
17519         * config/rs6000/predicates.md (ds_form_mem_operand) New
17520         predicate.
17521         * config/rs6000/genfusion.pl (gen_ld_cmpi_p10) Use
17522         ds_form_mem_operand in ld/lwa patterns.
17523         * config/rs6000/fusion.md: Regenerate file.
17524
17525 2021-03-08  Martin Sebor  <msebor@redhat.com>
17526
17527         PR middle-end/98266
17528         * gimple-array-bounds.cc (inbounds_vbase_memaccess_p): New function.
17529         (array_bounds_checker::check_array_bounds): Call it.
17530
17531 2021-03-08  Martin Sebor  <msebor@redhat.com>
17532
17533         PR middle-end/97631
17534         * tree-ssa-strlen.c (maybe_warn_overflow): Test rawmem.
17535         (handle_builtin_stxncpy_strncat): Rename locals.  Determine
17536         destination size from allocation calls.  Issue a more appropriate
17537         kind of warning.
17538         (handle_builtin_memcpy): Pass true as rawmem to maybe_warn_overflow.
17539         (handle_builtin_memset): Same.
17540
17541 2021-03-08  Peter Bergner  <bergner@linux.ibm.com>
17542
17543         PR target/98959
17544         * config/rs6000/rs6000.c (rs6000_emit_le_vsx_permute): Add an assert
17545         to ensure we do not have an Altivec style address.
17546         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): Disable if passed
17547         an Altivec style address.
17548         (*vsx_le_perm_store_<mode>): Likewise.
17549         (splitters after *vsx_le_perm_store_<mode>): Likewise.
17550         (vsx_load_<mode>): Disable special expander if passed an Altivec
17551         style address.
17552         (vsx_store_<mode>): Likewise.
17553
17554 2021-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17555
17556         PR target/99437
17557         * config/aarch64/predicates.md (aarch64_simd_shift_imm_vec_qi): Define.
17558         (aarch64_simd_shift_imm_vec_hi): Likewise.
17559         (aarch64_simd_shift_imm_vec_si): Likewise.
17560         (aarch64_simd_shift_imm_vec_di): Likewise.
17561         * config/aarch64/aarch64-simd.md (aarch64_shrn<mode>_insn_le): Use
17562         predicate from above.
17563         (aarch64_shrn<mode>_insn_be): Likewise.
17564         (aarch64_rshrn<mode>_insn_le): Likewise.
17565         (aarch64_rshrn<mode>_insn_be): Likewise.
17566         (aarch64_shrn2<mode>_insn_le): Likewise.
17567         (aarch64_shrn2<mode>_insn_be): Likewise.
17568         (aarch64_rshrn2<mode>_insn_le): Likewise.
17569         (aarch64_rshrn2<mode>_insn_be): Likewise.
17570
17571 2021-03-08  Vladimir N. Makarov  <vmakarov@redhat.com>
17572
17573         PR target/99422
17574         * lra-constraints.c (skip_contraint_modifiers): New function.
17575         (process_address_1): Use it before lookup_constraint call.
17576
17577 2021-03-08  Martin Liska  <mliska@suse.cz>
17578
17579         PR target/99463
17580         * config/i386/i386-options.c (ix86_option_override_internal):
17581         Enable UINTR and HRESET for -march that supports it.
17582
17583 2021-03-08  Ilya Leoshkevich  <iii@linux.ibm.com>
17584
17585         * config/s390/s390.c (f_constraint_p): New function.
17586         (s390_md_asm_adjust): Implement TARGET_MD_ASM_ADJUST.
17587         (TARGET_MD_ASM_ADJUST): Likewise.
17588
17589 2021-03-08  Tobias Burnus  <tobias@codesourcery.com>
17590
17591         PR fortran/97927
17592         * tree-nested.c (convert_local_reference_stmt): Avoid calling
17593         lookup_field_for_decl for Fortran module (= namespace context).
17594
17595 2021-03-08  Andreas Krebbel  <krebbel@linux.ibm.com>
17596
17597         * config/s390/s390.c (s390_expand_vec_compare): Implement <0
17598         comparison with arithmetic right shift.
17599         (s390_expand_vcond): No need for a force_reg anymore.
17600         s390_vec_compare will do it.
17601         * config/s390/vector.md ("vec_cmp<mode><tointvec>"): Accept also
17602         immediate operands.
17603
17604 2021-03-07  Jakub Jelinek  <jakub@redhat.com>
17605
17606         PR target/99321
17607         * config/i386/constraints.md (Yw): Use SSE_REGS if TARGET_SSE
17608         but TARGET_AVX512BW or TARGET_AVX512VL is not set.  Adjust description
17609         and comment.
17610         * config/i386/sse.md (v_Yw): New define_mode_attr.
17611         (*<insn><mode>3, *mul<mode>3<mask_name>, *avx2_<code><mode>3,
17612         *sse4_1_<code><mode>3<mask_name>): Use <v_Yw> instead of v
17613         in constraints.
17614         * config/i386/mmx.md (mmx_pshufw_1, *vec_dupv4hi): Use Yw instead of
17615         xYw in constraints.
17616
17617 2021-03-06  Julian Brown  <julian@codesourcery.com>
17618
17619         * tree-pretty-print.c (dump_generic_node): Emit non-generic
17620         address space info for aggregates.
17621
17622 2021-03-06  Hans-Peter Nilsson  <hp@axis.com>
17623
17624         * config/cris/cris.h (MAX_FIXED_MODE_SIZE): Don't define.
17625
17626 2021-03-05  Jakub Jelinek  <jakub@redhat.com>
17627
17628         PR middle-end/99322
17629         * tree-cfg.c (bb_to_omp_idx): New variable.
17630         (execute_build_cfg): Release the bb_to_omp_idx vector after
17631         cleanup_tree_cfg returns.
17632         (handle_abnormal_edges): Remove bb_to_omp_idx argument, adjust
17633         for bb_to_omp_idx being a vec<int> instead of pointer to array
17634         of ints.
17635         (make_edges): Remove bb_to_omp_idx local variable, don't pass
17636         it to handle_abnormal_edges, adjust for bb_to_omp_idx being a
17637         vec<int> instead of pointer to array of ints and don't free/release
17638         it at the end.
17639         (remove_bb): When removing a bb and placing forced label somewhere
17640         else, ensure it is put into the same OpenMP region during cfg
17641         pass if possible or to entry successor as fallback.  Unregister
17642         bb from bb_to_omp_idx.
17643
17644 2021-03-05  Vladimir N. Makarov  <vmakarov@redhat.com>
17645
17646         PR target/99378
17647         * lra-constraints.c (process_address_1): Skip decomposing address
17648         for asm insn operand with unknown constraint.
17649
17650 2021-03-05  Martin Jambor  <mjambor@suse.cz>
17651
17652         PR ipa/98078
17653         * cgraph.c (cgraph_edge::set_call_stmt): Do not update all
17654         corresponding speculative edges if we are about to resolve
17655         sepculation.  Make edge direct (and so resolve speculations) before
17656         removing it from call_site_hash.
17657         (cgraph_edge::make_direct): Relax the initial assert to allow calling
17658         the function on speculative direct edges.
17659
17660 2021-03-05  Eric Botcazou  <ebotcazou@adacore.com>
17661
17662         PR rtl-optimization/99376
17663         * rtlanal.c (nonzero_bits1) <arithmetic operators>: If the number
17664         of low-order zero bits is too large, set the result to 0 directly.
17665
17666 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
17667
17668         PR middle-end/93235
17669         * expmed.c (store_bit_field_using_insv): Return false of xop0 is a
17670         SUBREG and a SUBREG to op_mode can't be created.
17671
17672 2021-03-04  Alex Coplan  <alex.coplan@arm.com>
17673
17674         PR target/99381
17675         * config/aarch64/aarch64-sve-builtins.cc
17676         (function_resolver::require_vector_type): Handle error_mark_node.
17677
17678 2021-03-04  Ilya Leoshkevich  <iii@linux.ibm.com>
17679
17680         * cfgexpand.c (expand_asm_loc): Pass new parameter.
17681         (expand_asm_stmt): Likewise.
17682         * config/arm/aarch-common-protos.h (arm_md_asm_adjust): Add new
17683         parameter.
17684         * config/arm/aarch-common.c (arm_md_asm_adjust): Likewise.
17685         * config/arm/arm.c (thumb1_md_asm_adjust): Likewise.
17686         * config/cris/cris.c (cris_md_asm_adjust): Likewise.
17687         * config/i386/i386.c (ix86_md_asm_adjust): Likewise.
17688         * config/mn10300/mn10300.c (mn10300_md_asm_adjust): Likewise.
17689         * config/nds32/nds32.c (nds32_md_asm_adjust): Likewise.
17690         * config/pdp11/pdp11.c (pdp11_md_asm_adjust): Likewise.
17691         * config/rs6000/rs6000.c (rs6000_md_asm_adjust): Likewise.
17692         * config/vax/vax.c (vax_md_asm_adjust): Likewise.
17693         * config/visium/visium.c (visium_md_asm_adjust): Likewise.
17694         * doc/tm.texi (md_asm_adjust): Likewise.
17695         * target.def (md_asm_adjust): Likewise.
17696
17697 2021-03-04  Richard Biener  <rguenther@suse.de>
17698
17699         PR middle-end/97855
17700         * tree-pretty-print.c: Poison pp_printf.
17701         (dump_decl_name): Avoid use of pp_printf.
17702         (dump_block_node): Likewise.
17703         (dump_generic_node): Likewise.
17704
17705 2021-03-04  Martin Sebor  <msebor@redhat.com>
17706
17707         PR middle-end/96963
17708         PR middle-end/94655
17709         * builtins.c (handle_array_ref): New helper.
17710         (handle_mem_ref): New helper.
17711         (compute_objsize_r): Factor out ARRAY_REF and MEM_REF handling
17712         into new helper functions.  Correct a workaround for vectorized
17713         assignments.
17714
17715 2021-03-03  Pat Haugen  <pthaugen@linux.ibm.com>
17716
17717         * config/rs6000/dfp.md (extendddtd2, trunctddd2, *cmp<mode>_internal1,
17718         floatditd2, ftrunc<mode>2, fix<mode>di2, dfp_ddedpd_<mode>,
17719         dfp_denbcd_<mode>, dfp_dxex_<mode>, dfp_diex_<mode>,
17720         *dfp_sgnfcnc_<mode>, dfp_dscli_<mode>, dfp_dscri_<mode>): Update size
17721         attribute for Power10.
17722         * config/rs6000/mma.md (*movoo): Likewise.
17723         * config/rs6000/rs6000.md (define_attr "size"): Add 256.
17724         (define_mode_attr bits): Add DD/TD modes.
17725         * config/rs6000/sync.md (load_quadpti, store_quadpti, load_lockedpti,
17726         store_conditionalpti): Update size attribute for Power10.
17727
17728 2021-03-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17729
17730         PR bootstrap/92002
17731         * config/sparc/t-sparc (tree-ssanames.o-warn): Don't error for
17732         -Wuninitialized, -Wmaybe-uninitialized.
17733         (wide-int.o-warn): Likewise.
17734
17735 2021-03-03  Richard Earnshaw  <rearnsha@arm.com>
17736
17737         * common/config/arm/arm-common.c: Include configargs.h.
17738         (arm_config_default): New function.
17739         (arm_target_mode): Renamed from arm_target_thumb_only.  Handle
17740         processors that do not support Thumb.  Take into account the
17741         --with-mode configuration setting for selecting the default.
17742         * config/arm/arm.h (OPTION_DEFAULT_SPECS): Remove entry for 'mode'.
17743         (TARGET_MODE_SPEC_FUNCTIONS): Update for function name change.
17744
17745 2021-03-03  Martin Liska  <mliska@suse.cz>
17746
17747         PR gcov-profile/97461
17748         * gcov-io.h (GCOV_PREALLOCATED_KVP): Remove.
17749
17750 2021-03-03  Eric Botcazou  <ebotcazou@adacore.com>
17751
17752         PR target/99234
17753         * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
17754         point back the hard frame pointer to its default location when the
17755         frame is larger than SEH_MAX_FRAME_SIZE.
17756
17757 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
17758
17759         PR target/99321
17760         * config/i386/predicates.md (logic_operator): New define_predicate.
17761         * config/i386/i386.md (mov + mem using comm arith peephole2):
17762         Punt if operands[1] is EXT_REX_SSE_REGNO_P, AVX512BW is not enabled
17763         and the inner mode is [QH]Imode.
17764
17765 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
17766
17767         PR debug/99090
17768         * dwarf2out.c (dw_loc_list_struct): Add end_entry member.
17769         (new_loc_list): Clear end_entry.
17770         (output_loc_list): Only use DW_LLE_startx_length for -gsplit-dwarf
17771         if HAVE_AS_LEB128, otherwise use DW_LLE_startx_endx.  Fix comment
17772         typo.
17773         (index_location_lists): For dwarf_version >= 5 without HAVE_AS_LEB128,
17774         initialize also end_entry.
17775
17776 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
17777
17778         PR target/99085
17779         * cfgrtl.c (fixup_partitions): When changing some bbs from hot to cold
17780         partitions, if in non-layout mode after reorder_blocks also move
17781         affected blocks to ensure a single partition transition.
17782
17783 2021-03-03  Jason Merrill  <jason@redhat.com>
17784
17785         PR c++/96078
17786         * cgraphunit.c (process_function_and_variable_attributes): Don't
17787         warn about flatten on an alias if the target also has it.
17788         * cgraph.h (symtab_node::get_alias_target_tree): New.
17789
17790 2021-03-02  David Edelsohn  <dje.gcc@gmail.com>
17791
17792         * config/rs6000/rs6000.md (tls_get_tpointer_internal): Prepend
17793         period to symbol name.
17794         (tls_get_addr_internal<mode>): Same.
17795
17796 2021-03-02  David Malcolm  <dmalcolm@redhat.com>
17797
17798         PR c/99323
17799         * diagnostic-show-locus.c
17800         (selftest::test_one_liner_many_fixits_2): Fix accidental usage of
17801         column 0.
17802
17803 2021-03-02  Martin Sebor  <msebor@redhat.com>
17804
17805         PR middle-end/99276
17806         * builtins.c (warn_for_access): Remove stray warning text.
17807
17808 2021-03-02  Martin Sebor  <msebor@redhat.com>
17809
17810         PR middle-end/99295
17811         * doc/extend.texi (attribute malloc): Reword and clarify nonaliasing
17812         property.
17813
17814 2021-03-02  Jakub Jelinek  <jakub@redhat.com>
17815
17816         PR debug/99319
17817         * dwarf2out.c (output_macinfo_op): Use DW_MACRO_*_str* even with
17818         -gdwarf-5 -gstrict-dwarf.  For -gsplit-dwarf -gdwarf-5 use
17819         DW_MACRO_*_strx instead of DW_MACRO_*_strp.  Handle
17820         DW_MACRO_define_strx and DW_MACRO_undef_strx.
17821         (save_macinfo_strings): Use DW_MACRO_*_str* even with
17822         -gdwarf-5 -gstrict-dwarf.  Handle DW_MACRO_define_strx and
17823         DW_MACRO_undef_strx.
17824
17825 2021-03-02  Andreas Krebbel  <krebbel@linux.ibm.com>
17826
17827         * config/s390/s390-builtin-types.def (BT_FN_V4SF_V8HI_UINT): New
17828         builtin signature.
17829         (BT_FN_V8HI_V8HI_UINT): Likewise.
17830         (BT_FN_V8HI_V4SF_V4SF_UINT): Likewise.
17831         * config/s390/s390-builtins.def (B_NNPA): New macro definition.
17832         (s390_vclfnhs, s390_vclfnls, s390_vcrnfs, s390_vcfn, s390_vcnf):
17833         New builtin definitions.
17834         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Bump
17835         vector extension version.
17836         * config/s390/s390.c (s390_expand_builtin): Check if builtins are
17837         available with current -march level.
17838         * config/s390/s390.md (UNSPEC_NNPA_VCLFNHS_V8HI)
17839         (UNSPEC_NNPA_VCLFNLS_V8HI, UNSPEC_NNPA_VCRNFS_V8HI)
17840         (UNSPEC_NNPA_VCFN_V8HI, UNSPEC_NNPA_VCNF_V8HI): New constants.
17841         * config/s390/vecintrin.h (vec_extend_to_fp32_hi): New macro.
17842         (vec_extend_to_fp32_lo): Likewise.
17843         (vec_round_from_fp32): Likewise.
17844         (vec_convert_to_fp16): Likewise.
17845         (vec_convert_from_fp16): Likewise.
17846         * config/s390/vx-builtins.md (vclfnhs_v8hi): New insn pattern.
17847         (vclfnls_v8hi): Likewise.
17848         (vcrnfs_v8hi): Likewise.
17849         (vcfn_v8hi): Likewise.
17850         (vcnf_v8hi): Likewise.
17851
17852 2021-03-02  Andreas Krebbel  <krebbel@linux.ibm.com>
17853
17854         * common/config/s390/s390-common.c (processor_flags_table): New entry.
17855         * config.gcc: Enable arch14 for --with-arch and --with-tune.
17856         * config/s390/driver-native.c (s390_host_detect_local_cpu): Pick
17857         arch14 for unknown CPU models.
17858         * config/s390/s390-opts.h (enum processor_type): Add PROCESSOR_ARCH14.
17859         * config/s390/s390.c (s390_issue_rate): Add case for PROCESSOR_ARCH14.
17860         (s390_get_sched_attrmask): Likewise.
17861         (s390_get_unit_mask): Likewise.
17862         * config/s390/s390.h (enum processor_flags): Add PF_NNPA and PF_ARCH14.
17863         (TARGET_CPU_ARCH14, TARGET_CPU_ARCH14_P, TARGET_CPU_NNPA)
17864         (TARGET_CPU_NNPA_P, TARGET_ARCH14, TARGET_ARCH14_P, TARGET_NNPA)
17865         (TARGET_NNPA_P): New macro definitions.
17866         * config/s390/s390.md ("cpu_facility", "enabled"): Add arch14 and nnpa.
17867         * config/s390/s390.opt: Add PROCESSOR_ARCH14.
17868
17869 2021-03-02  Jakub Jelinek  <jakub@redhat.com>
17870
17871         PR middle-end/95757
17872         * tree-vrp.c (register_edge_assert_for): Remove superfluous ()s around
17873         condition.  Call register_edge_assert_for_1 for == 0, != 0, == 1 and
17874         != 1 comparisons if name is lhs of a comparison.
17875
17876 2021-03-01  Iain Sandoe  <iain@sandoe.co.uk>
17877
17878         PR target/44107
17879         PR target/48097
17880         * config/darwin-protos.h (darwin_should_restore_cfa_state): New.
17881         * config/darwin.c (darwin_should_restore_cfa_state): New.
17882         * config/darwin.h (TARGET_ASM_SHOULD_RESTORE_CFA_STATE): New.
17883         * doc/tm.texi: Regenerated.
17884         * doc/tm.texi.in: Document TARGET_ASM_SHOULD_RESTORE_CFA_STATE.
17885         * dwarf2cfi.c (connect_traces): If the target requests, restore
17886         the CFA expression after a DW_CFA_restore.
17887         * target.def (TARGET_ASM_SHOULD_RESTORE_CFA_STATE): New hook.
17888
17889 2021-03-01  Martin Liska  <mliska@suse.cz>
17890
17891         PR target/99313
17892         * optc-save-gen.awk: Add 4 more exceptions.
17893
17894 2021-03-01  Nathan Sidwell  <nathan@acm.org>
17895
17896         PR c++/99294
17897         * tree.h (TYPE_ALIGN_RAW): New accessor.
17898         (TYPE_ALIGN): Use it.
17899
17900 2021-03-01  Jan Hubicka  <jh@suse.cz>
17901
17902         PR ipa/98338
17903         * ipa-fnsummary.c (compute_fn_summary): Fix sanity check.
17904
17905 2021-03-01  Eric Botcazou  <ebotcazou@adacore.com>
17906
17907         PR target/99234
17908         * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
17909         point the hard frame pointer to the SSE register save area instead
17910         of the general register save area.  Perform only minimal adjustment
17911         for small frames if it is initially not correctly aligned.
17912         (ix86_expand_prologue): Remove early saves for a SEH target.
17913         * config/i386/winnt.c (struct seh_frame_state): Document constraint.
17914
17915 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
17916
17917         PR c/99304
17918         * ipa.c (symbol_table::remove_unreachable_nodes): Fix a comment
17919         typo - referneced -> referenced.
17920         * tree.c (component_ref_size): Fix comment typo -
17921         refernce -> reference.
17922         * tree-ssa-alias.c (access_path_may_continue_p): Fix comment typo -
17923         traling -> trailing.
17924         (aliasing_component_refs_p): Fix comment typos -
17925         refernce -> reference and refernece -> reference and
17926         traling -> trailing.
17927         (nonoverlapping_refs_since_match_p): Fix comment typo -
17928         referneces -> references.
17929         * doc/invoke.texi (--param modref-max-bases): Fix a typo -
17930         referneces -> references.
17931
17932 2021-02-27  Iain Sandoe  <iain@sandoe.co.uk>
17933
17934         * config/host-darwin.c (darwin_gt_pch_use_address): Modify
17935         diagnostic message to avoid use of a contraction and format
17936         warning.
17937
17938 2021-02-27  Jakub Jelinek  <jakub@redhat.com>
17939
17940         PR other/99288
17941         * gcse.c (gcse_or_cprop_is_too_expensive): Use %wu instead of
17942         HOST_WIDE_INT_PRINT_UNSIGNED in warning format string.
17943         * ipa-devirt.c (ipa_odr_read_section): Use %wd instead of
17944         HOST_WIDE_INT_PRINT_DEC in inform format string.  Fix comment
17945         typos.
17946
17947 2021-02-26  Richard Biener  <rguenther@suse.de>
17948
17949         PR middle-end/99281
17950         * expr.c (store_field): For calls with return-slot optimization
17951         and addressable return type expand the store directly.
17952
17953 2021-02-26  Richard Biener  <rguenther@suse.de>
17954
17955         PR c/99275
17956         * builtins.c (warn_string_no_nul): Fix diagnostic formatting.
17957
17958 2021-02-26  Peter Bergner  <bergner@linux.ibm.com>
17959
17960         PR target/99279
17961         * config/rs6000/rs6000-call.c (rs6000_init_builtins): Replace assert
17962         with an "if" test.
17963
17964 2021-02-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
17965
17966         * config.gcc: Add rs6000-pcrel-opt.o.
17967         * config/rs6000/rs6000-pcrel-opt.c: New file.
17968         * config/rs6000/pcrel-opt.md: New file.
17969         * config/rs6000/predicates.md: Add d_form_memory predicate.
17970         * config/rs6000/rs6000-cpus.def: Add OPTION_MASK_PCREL_OPT.
17971         * config/rs6000/rs6000-passes.def: Add pass_pcrel_opt.
17972         * config/rs6000/rs6000-protos.h: Add reg_to_non_prefixed(),
17973         pcrel_opt_valid_mem_p(), output_pcrel_opt_reloc(),
17974         and make_pass_pcrel_opt().
17975         * config/rs6000/rs6000.c (reg_to_non_prefixed): Make global.
17976         (rs6000_option_override_internal): Add pcrel-opt.
17977         (rs6000_delegitimize_address): Support pcrel-opt.
17978         (rs6000_opt_masks): Add pcrel-opt.
17979         (pcrel_opt_valid_mem_p): New function.
17980         (reg_to_non_prefixed): Make global.
17981         (rs6000_asm_output_opcode): Reset prepend_p_to_next_insn.
17982         (output_pcrel_opt_reloc): New function.
17983         * config/rs6000/rs6000.md (loads_extern_addr): New attr.
17984         (pcrel_extern_addr): Set loads_extern_addr.
17985         Add include for pcrel-opt.md.
17986         * config/rs6000/rs6000.opt: Add -mpcrel-opt.
17987         * config/rs6000/t-rs6000: Add rules for pcrel-opt.c and
17988         pcrel-opt.md.
17989
17990 2021-02-26  YunQiang Su  <yunqiang.su@cipunited.com>
17991
17992         PR target/98996
17993         * config/mips/mips.c (mips_expand_ext_as_unaligned_load):
17994         If TARGET_64BIT and dest is SUBREG, we check the width, if it
17995         equal to SImode, we use SImode operation, just like what we are
17996         doing for REG one.
17997
17998 2021-02-26  Marek Polacek  <polacek@redhat.com>
17999
18000         * builtins.c (warn_for_access): Fix typos.
18001
18002 2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
18003
18004         * config/aarch64/aarch64.md (<optab>_rol<mode>3): Add a '#'
18005         mark in front of the immediate quantity.
18006         (<optab>_rolsi3_uxtw): Likewise.
18007
18008 2021-02-25  Richard Earnshaw  <rearnsha@arm.com>
18009
18010         PR target/99271
18011         * config/arm/thumb2.md (nonsecure_call_reg_thumb2_fpcxt): New pattern.
18012         (nonsecure_call_value_reg_thumb2_fpcxt): Likewise.
18013         (nonsecure_call_reg_thumb2): Restrict to using r4 for the callee
18014         address and disable when the FPCXT is not available.
18015         (nonsecure_call_value_reg_thumb2): Likewise.
18016
18017 2021-02-25  Nathan Sidwell  <nathan@acm.org>
18018
18019         PR c++/99166
18020         * doc/invoke.texi (flang-info-module-cmi): Renamed option.
18021
18022 2021-02-25  Tamar Christina  <tamar.christina@arm.com>
18023
18024         * tree-vect-slp.c (optimize_load_redistribution_1): Abort on NULL nodes.
18025
18026 2021-02-25  Richard Biener  <rguenther@suse.de>
18027
18028         PR tree-optimization/99253
18029         * tree-vect-loop.c (check_reduction_path): First compute
18030         code, then verify out-of-loop uses.
18031
18032 2021-02-25  Jakub Jelinek  <jakub@redhat.com>
18033
18034         PR target/95798
18035         * match.pd ((T)(A) + CST -> (T)(A + CST)): Add :s to convert.
18036
18037 2021-02-25  Jakub Jelinek  <jakub@redhat.com>
18038
18039         PR tree-optimization/80635
18040         * tree-vrp.c (vrp_simplify_cond_using_ranges): Also handle
18041         VIEW_CONVERT_EXPR if modes are the same, innerop is integral and
18042         has mode precision.
18043
18044 2021-02-25  Richard Biener  <rguenther@suse.de>
18045
18046         * tree-vect-slp.c (optimize_load_redistribution_1): Delay
18047         load_map population.
18048         (vect_match_slp_patterns_2): Revert part of last change.
18049         (vect_analyze_slp): Do not interleave optimize_load_redistribution
18050         with pattern detection but do it afterwards.  Dump the
18051         whole SLP graph after pattern recognition and load
18052         redistribution optimization finished.
18053
18054 2021-02-24  Jakub Jelinek  <jakub@redhat.com>
18055
18056         PR fortran/99226
18057         * omp-low.c (struct omp_context): Add teams_nested_p and
18058         nonteams_nested_p members.
18059         (scan_omp_target): Diagnose teams nested inside of target with other
18060         directives strictly nested inside of the same target.
18061         (check_omp_nesting_restrictions): Set ctx->teams_nested_p or
18062         ctx->nonteams_nested_p as needed.
18063
18064 2021-02-24  Vladimir N. Makarov  <vmakarov@redhat.com>
18065
18066         PR inline-asm/99123
18067         * lra-constraints.c (uses_hard_regs_p): Don't use decompose_mem_address.
18068
18069 2021-02-24  Hans-Peter Nilsson  <hp@axis.com>
18070
18071         * config/cris/cris.c (cris_expand_prologue): Set
18072         current_function_static_stack_size, if flag_stack_usage_info.
18073
18074 2021-02-24  Pat Haugen  <pthaugen@linux.ibm.com>
18075
18076         * config/rs6000/rs6000.c (next_insn_prefixed_p): Rename.
18077         (rs6000_final_prescan_insn): Adjust.
18078         (rs6000_asm_output_opcode): Likewise.
18079
18080 2021-02-24  Martin Sebor  <msebor@redhat.com>
18081
18082         PR middle-end/97172
18083         * attribs.c (attr_access::free_lang_data): Clear attribute arg spec
18084         from function arguments.
18085
18086 2021-02-24  Tamar Christina  <tamar.christina@arm.com>
18087
18088         PR tree-optimization/99220
18089         * tree-vect-slp.c (optimize_load_redistribution_1): Remove
18090         node from cache when it's about to be deleted.
18091
18092 2021-02-24  Jakub Jelinek  <jakub@redhat.com>
18093
18094         PR tree-optimization/99225
18095         * fold-const.c (fold_binary_loc) <case NE_EXPR>: In (x & (1 << y)) != 0
18096         to ((x >> y) & 1) != 0 simplifications use build_one_cst instead of
18097         build_int_cst (..., 1).  Formatting fixes.
18098
18099 2021-02-24  Tamar Christina  <tamar.christina@arm.com>
18100
18101         PR tree-optimization/99149
18102         * tree-vect-slp-patterns.c (vect_detect_pair_op): Don't recreate the
18103         buffer.
18104         (vect_slp_reset_pattern): Remove.
18105         (complex_fma_pattern::matches): Remove call to vect_slp_reset_pattern.
18106         (complex_mul_pattern::build, complex_fma_pattern::build,
18107         complex_fms_pattern::build): Fix ref counts.
18108         * tree-vect-slp.c (vect_free_slp_tree): Undo SLP only pattern relevancy
18109         when node is being deleted.
18110         (vect_match_slp_patterns_2): Correct result of cache hit on patterns.
18111         (vect_schedule_slp): Invalidate SLP_TREE_REPRESENTATIVE of removed
18112         stores.
18113         * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize value.
18114
18115 2021-02-24  Matthias Klose  <doko@ubuntu.com>
18116
18117         Revert:
18118         2020-12-07  Matthias Klose  <doko@ubuntu.com>
18119
18120         * genextract.c (print_header): Undefine ENABLE_RTL_CHECKING
18121         and ENABLE_RTL_FLAG_CHECKING.
18122
18123 2021-02-24  Richard Biener  <rguenther@suse.de>
18124
18125         PR c/99224
18126         * builtins.c (fold_builtin_next_arg): Avoid NULL arg.
18127
18128 2021-02-23  Peter Bergner  <bergner@linux.ibm.com>
18129
18130         * config/rs6000/mma.md (mma_assemble_pair): Rename from this...
18131         (vsx_assemble_pair): ...to this.
18132         (*mma_assemble_pair): Rename from this...
18133         (*vsx_assemble_pair): ...to this.
18134         (mma_disassemble_pair): Rename from this...
18135         (vsx_disassemble_pair): ...to this.
18136         (*mma_disassemble_pair): Rename from this...
18137         (*vsx_disassemble_pair): ...to this.
18138         * config/rs6000/rs6000-builtin.def (BU_MMA_V2, BU_MMA_V3,
18139         BU_COMPAT): New macros.
18140         (mma_assemble_pair): Rename from this...
18141         (vsx_assemble_pair): ...to this.
18142         (mma_disassemble_pair): Rename from this...
18143         (vsx_disassemble_pair): ...to this.
18144         (mma_assemble_pair): New compatibility built-in.
18145         (mma_disassemble_pair): Likewise.
18146         * config/rs6000/rs6000-call.c (struct builtin_compatibility): New.
18147         (RS6000_BUILTIN_COMPAT): Define.
18148         (bdesc_compat): New.
18149         (mma_expand_builtin): Use VSX_BUILTIN_DISASSEMBLE_PAIR_INTERNAL.
18150         (rs6000_gimple_fold_mma_builtin): Use MMA_BUILTIN_DISASSEMBLE_PAIR
18151         and VSX_BUILTIN_ASSEMBLE_PAIR.
18152         (rs6000_init_builtins): Register compatibility built-ins.
18153         (mma_init_builtins): Use VSX_BUILTIN_ASSEMBLE_PAIR,
18154         VSX_BUILTIN_ASSEMBLE_PAIR_INTERNAL, VSX_BUILTIN_DISASSEMBLE_PAIR and
18155         VSX_BUILTIN_DISASSEMBLE_PAIR_INTERNAL.
18156         * doc/extend.texi (__builtin_mma_assemble_pair): Rename from this...
18157         (__builtin_vsx_assemble_pair): ...to this.
18158         (__builtin_mma_disassemble_pair): Rename from this...
18159         (__builtin_vsx_disassemble_pair): ...to this.
18160
18161 2021-02-23  Martin Liska  <mliska@suse.cz>
18162
18163         PR sanitizer/99168
18164         * ipa-icf.c (sem_variable::merge): Do not merge 2 variables
18165         with different alignment. That leads to an invalid red zone
18166         size allocated in runtime.
18167
18168 2021-02-23  Jakub Jelinek  <jakub@redhat.com>
18169
18170         PR tree-optimization/99204
18171         * fold-const.c (fold_read_from_constant_string): Check that
18172         tree_fits_uhwi_p (index) rather than just that index is INTEGER_CST.
18173
18174 2021-02-23  Segher Boessenkool  <segher@kernel.crashing.org>
18175             Kewen Lin  <linkw@gcc.gnu.org>
18176
18177         * config/rs6000/rs6000.md (*rotl<mode>3_insert_3): Renamed to...
18178         (rotl<mode>3_insert_3): ...this.
18179         (plus_ior_xor): New code_iterator.
18180         (define_split for GPR rl*imi): New splitter.
18181         * config/rs6000/vsx.md (vsx_init_v4si): Use gen_rotldi3_insert_3
18182         for integer merging.
18183
18184 2021-02-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18185
18186         * config/aarch64/aarch64-tuning-flags.def (cse_sve_vl_constants):
18187         Define.
18188         * config/aarch64/aarch64.md (add<mode>3): Force CONST_POLY_INT immediates
18189         into a register when the above is enabled.
18190         * config/aarch64/aarch64.c (neoversev1_tunings):
18191         AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS.
18192         (aarch64_rtx_costs): Use AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS.
18193
18194 2021-02-22  Hans-Peter Nilsson  <hp@axis.com>
18195
18196         * config/cris/cris.c (cris_print_operand) <'T'>: Change
18197         valid operand from is now an addi mult-value to shift-value.
18198         * config/cris/cris.md (*addi): Change expression of scaled
18199         operand from mult to ashift.
18200         * config/cris/cris.md (*addi_reload): New insn_and_split.
18201
18202 2021-02-22  John David Anglin  <danglin@gcc.gnu.org>
18203
18204         PR target/85074
18205         * config/pa/pa.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Define as
18206         hook_bool_const_tree_hwi_hwi_const_tree_true.
18207         (pa_asm_output_mi_thunk): Add support for nonzero vcall_offset.
18208
18209 2021-02-22  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18210
18211         PR rtl-optimization/98791
18212         * ira-conflicts.c (process_regs_for_copy): Don't create allocno copies
18213         for unordered modes.
18214
18215 2021-02-22  Martin Liska  <mliska@suse.cz>
18216
18217         * tree-inline.c (inline_forbidden_p): Set
18218         inline_forbidden_reason.
18219
18220 2021-02-22  Richard Biener  <rguenther@suse.de>
18221
18222         * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Dump
18223         costed subgraph.
18224
18225 2021-02-22  Richard Biener  <rguenther@suse.de>
18226
18227         PR tree-optimization/99165
18228         * gimple-ssa-store-merging.c (pass_store_merging::process_store):
18229         Accumulate changed to ret.
18230
18231 2021-02-21  Uros Bizjak  <ubizjak@gmail.com>
18232
18233         Revert:
18234         2020-12-09  Uroš Bizjak  <ubizjak@gmail.com>
18235
18236         * config/i386/i386.h (REG_ALLOC_ORDER): Remove
18237
18238 2021-02-20  Ilya Leoshkevich  <iii@linux.ibm.com>
18239
18240         PR target/99134
18241         * config/s390/vector.md (trunctf<DFP_ALL:mode>2_vr): New
18242         pattern.
18243         (trunctf<DFP_ALL:mode>2): Likewise.
18244         (trunctdtf2_vr): Likewise.
18245         (trunctdtf2): Likewise.
18246         (extend<DFP_ALL:mode>tf2_vr): Likewise.
18247         (extend<DFP_ALL:mode>tf2): Likewise.
18248         (extendtftd2_vr): Likewise.
18249         (extendtftd2): Likewise.
18250
18251 2021-02-20  Ilya Leoshkevich  <iii@linux.ibm.com>
18252
18253         * config/s390/vector.md (*fprx2_to_tf): Rename to fprx2_to_tf,
18254         add memory alternative.
18255         (tf_to_fprx2): New pattern.
18256
18257 2021-02-19  Martin Sebor  <msebor@redhat.com>
18258
18259         PR c/97172
18260         * attribs.c (init_attr_rdwr_indices): Guard vblist use.
18261         (attr_access::free_lang_data): Remove a spurious test.
18262
18263 2021-02-19  Nathan Sidwell  <nathan@acm.org>
18264
18265         * doc/invoke.texi (flang-info-module-read): Document.
18266
18267 2021-02-19  Martin Liska  <mliska@suse.cz>
18268
18269         PR translation/99167
18270         * params.opt: Fix typo.
18271
18272 2021-02-19  Richard Biener  <rguenther@suse.de>
18273
18274         PR middle-end/99122
18275         * tree-inline.c (inline_forbidden_p): Do not inline functions
18276         with VLA arguments or return value.
18277
18278 2021-02-19  Jakub Jelinek  <jakub@redhat.com>
18279
18280         PR target/98998
18281         * config/arm/arm.md (*stack_protect_combined_set_insn,
18282         *stack_protect_combined_test_insn): If force_const_mem result
18283         is not valid general operand, force its address into the destination
18284         register first.
18285
18286 2021-02-19  Jakub Jelinek  <jakub@redhat.com>
18287
18288         PR ipa/99034
18289         * tree-cfg.c (gimple_merge_blocks): If bb a starts with eh landing
18290         pad or non-local label, put FORCED_LABELs from bb b after that label
18291         rather than before it.
18292
18293 2021-02-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18294
18295         PR target/98657
18296         * config/aarch64/aarch64-sve.md (<ASHIFT:optab><mode>3): Use
18297         expand_vector_broadcast' to emit the vec_duplicate operand.
18298
18299 2021-02-18  Vladimir N. Makarov  <vmakarov@redhat.com>
18300
18301         PR rtl-optimization/96264
18302         * lra-remat.c (reg_overlap_for_remat_p): Check also output insn
18303         hard regs.
18304
18305 2021-02-18  H.J. Lu  <hjl.tools@gmail.com>
18306
18307         PR target/99113
18308         * varasm.c (get_section): Replace SUPPORTS_SHF_GNU_RETAIN with
18309         looking up the retain attribute.
18310         (resolve_unique_section): Likewise.
18311         (get_variable_section): Likewise.
18312         (switch_to_section): Likewise.  Warn when a symbol without the
18313         retain attribute and a symbol with the retain attribute are
18314         placed in the section with the same name, instead of the used
18315         attribute.
18316         * doc/extend.texi: Document the "retain" attribute.
18317
18318 2021-02-18  Nathan Sidwell  <nathan@acm.org>
18319
18320         PR c++/99023
18321         * doc/invoke.texi (flang-info-include-translate): Document header
18322         lookup behaviour.
18323
18324 2021-02-18  Richard Biener  <rguenther@suse.de>
18325
18326         PR middle-end/99122
18327         * ipa-fnsummary.c (analyze_function_body): Set
18328         CIF_FUNCTION_NOT_INLINABLE for VLA parameter calls.
18329         * tree-inline.c (insert_init_debug_bind): Pass NULL for
18330         error_mark_node values.
18331         (force_value_to_type): Do not build V_C_Es for WITH_SIZE_EXPR
18332         values.
18333         (setup_one_parameter): Delay force_value_to_type until when
18334         it's needed.
18335
18336 2021-02-18  Hans-Peter Nilsson  <hp@axis.com>
18337
18338         PR tree-optimization/99142
18339         * match.pd (clz cmp 0): Gate replacement on single_use of clz result.
18340
18341 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
18342
18343         * wide-int-bitmask.h (wide_int_bitmask::wide_int_bitmask (),
18344         wide_int_bitmask::wide_int_bitmask (uint64_t),
18345         wide_int_bitmask::wide_int_bitmask (uint64_t, uint64_t),
18346         wide_int_bitmask::operator ~ () const,
18347         wide_int_bitmask::operator | (wide_int_bitmask) const,
18348         wide_int_bitmask::operator & (wide_int_bitmask) const): Use constexpr
18349         instead of inline.
18350         * config/i386/i386.h (PTA_3DNOW, PTA_3DNOW_A, PTA_64BIT, PTA_ABM,
18351         PTA_AES, PTA_AVX, PTA_BMI, PTA_CX16, PTA_F16C, PTA_FMA, PTA_FMA4,
18352         PTA_FSGSBASE, PTA_LWP, PTA_LZCNT, PTA_MMX, PTA_MOVBE, PTA_NO_SAHF,
18353         PTA_PCLMUL, PTA_POPCNT, PTA_PREFETCH_SSE, PTA_RDRND, PTA_SSE, PTA_SSE2,
18354         PTA_SSE3, PTA_SSE4_1, PTA_SSE4_2, PTA_SSE4A, PTA_SSSE3, PTA_TBM,
18355         PTA_XOP, PTA_AVX2, PTA_BMI2, PTA_RTM, PTA_HLE, PTA_PRFCHW, PTA_RDSEED,
18356         PTA_ADX, PTA_FXSR, PTA_XSAVE, PTA_XSAVEOPT, PTA_AVX512F, PTA_AVX512ER,
18357         PTA_AVX512PF, PTA_AVX512CD, PTA_NO_TUNE, PTA_SHA, PTA_PREFETCHWT1,
18358         PTA_CLFLUSHOPT, PTA_XSAVEC, PTA_XSAVES, PTA_AVX512DQ, PTA_AVX512BW,
18359         PTA_AVX512VL, PTA_AVX512IFMA, PTA_AVX512VBMI, PTA_CLWB, PTA_MWAITX,
18360         PTA_CLZERO, PTA_NO_80387, PTA_PKU, PTA_AVX5124VNNIW, PTA_AVX5124FMAPS,
18361         PTA_AVX512VPOPCNTDQ, PTA_SGX, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES,
18362         PTA_AVX512VBMI2, PTA_VPCLMULQDQ, PTA_AVX512BITALG, PTA_RDPID,
18363         PTA_PCONFIG, PTA_WBNOINVD, PTA_AVX512VP2INTERSECT, PTA_PTWRITE,
18364         PTA_AVX512BF16, PTA_WAITPKG, PTA_MOVDIRI, PTA_MOVDIR64B, PTA_ENQCMD,
18365         PTA_CLDEMOTE, PTA_SERIALIZE, PTA_TSXLDTRK, PTA_AMX_TILE, PTA_AMX_INT8,
18366         PTA_AMX_BF16, PTA_UINTR, PTA_HRESET, PTA_KL, PTA_WIDEKL, PTA_AVXVNNI,
18367         PTA_X86_64_BASELINE, PTA_X86_64_V2, PTA_X86_64_V3, PTA_X86_64_V4,
18368         PTA_CORE2, PTA_NEHALEM, PTA_WESTMERE, PTA_SANDYBRIDGE, PTA_IVYBRIDGE,
18369         PTA_HASWELL, PTA_BROADWELL, PTA_SKYLAKE, PTA_SKYLAKE_AVX512,
18370         PTA_CASCADELAKE, PTA_COOPERLAKE, PTA_CANNONLAKE, PTA_ICELAKE_CLIENT,
18371         PTA_ICELAKE_SERVER, PTA_TIGERLAKE, PTA_SAPPHIRERAPIDS, PTA_ALDERLAKE,
18372         PTA_KNL, PTA_BONNELL, PTA_SILVERMONT, PTA_GOLDMONT, PTA_GOLDMONT_PLUS,
18373         PTA_TREMONT, PTA_KNM): Use constexpr instead of const.
18374
18375 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
18376
18377         PR middle-end/99109
18378         * gimple-array-bounds.cc (build_zero_elt_array_type): Rename to ...
18379         (build_printable_array_type): ... this.  Add nelts argument.  For
18380         overaligned eltype, use TYPE_MAIN_VARIANT (eltype) instead.  If
18381         nelts, call build_array_type_nelts.
18382         (array_bounds_checker::check_mem_ref): Use build_printable_array_type
18383         instead of build_zero_elt_array_type and build_array_type_nelts.
18384
18385 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
18386
18387         PR target/99104
18388         * config/i386/i386.c (distance_non_agu_define): Don't call
18389         extract_insn_cached here.
18390         (ix86_lea_outperforms): Save and restore recog_data around call
18391         to distance_non_agu_define and distance_agu_use.
18392         (ix86_ok_to_clobber_flags): Remove.
18393         (ix86_avoid_lea_for_add): Don't call ix86_ok_to_clobber_flags.
18394         (ix86_avoid_lea_for_addr): Likewise.  Adjust function comment.
18395         * config/i386/i386.md (*lea<mode>): Change from define_insn_and_split
18396         into define_insn.  Move the splitting to define_peephole2 and
18397         check there using peep2_regno_dead_p if FLAGS_REG is dead.
18398
18399 2021-02-17  Julian Brown  <julian@codesourcery.com>
18400
18401         * gimplify.c (gimplify_scan_omp_clauses): Handle ATTACH_DETACH
18402         for non-decls.
18403
18404 2021-02-17  Xi Ruoyao  <xry111@mengyan1223.wang>
18405
18406         PR target/98491
18407         * config/mips/mips.c (mips_symbol_insns): Do not use
18408         MSA_SUPPORTED_MODE_P if mode is MAX_MACHINE_MODE.
18409
18410 2021-02-16  Vladimir N. Makarov  <vmakarov@redhat.com>
18411
18412         PR inline-asm/98096
18413         * stmt.c (resolve_operand_name_1): Take inout operands into account
18414         for access to labels by names.
18415         * doc/extend.texi: Describe counting operands for accessing labels.
18416
18417 2021-02-16  Richard Biener  <rguenther@suse.de>
18418
18419         PR tree-optimization/38474
18420         * tree-ssa-structalias.c (variable_info::address_taken): New.
18421         (new_var_info): Initialize address_taken.
18422         (process_constraint): Set address_taken.
18423         (solve_constraints): Use the new address_taken flag rather
18424         than is_reg_var for sorting variables.
18425         (dump_constraint): Dump the variable number if the name
18426         is just NULL.
18427
18428 2021-02-16  Jakub Jelinek  <jakub@redhat.com>
18429
18430         PR target/99100
18431         * tree-vect-stmts.c (vectorizable_simd_clone_call): For num_calls != 1
18432         multiply by 4096 and for inbranch by 8192.
18433         * config/i386/i386.c (ix86_simd_clone_usable): For TARGET_AVX512F,
18434         return 3, 2 or 1 for mangle letters 'b', 'c' or 'd'.
18435
18436 2021-02-15  Maya Rashish  <coypu@sdf.org>
18437
18438         * config/aarch64/aarch64.c (aarch64_init_builtins):
18439         Call SUBTARGET_INIT_BUILTINS.
18440
18441 2021-02-15  Peter Bergner  <bergner@linux.ibm.com>
18442
18443         PR rtl-optimization/98872
18444         * init-regs.c (initialize_uninitialized_regs): Skip initialization
18445         if CONST0_RTX is NULL.
18446
18447 2021-02-15  Richard Sandiford  <richard.sandiford@arm.com>
18448
18449         PR rtl-optimization/98863
18450         * rtl-ssa/functions.h (function_info::bb_live_out_info): Delete.
18451         (function_info::build_info): Turn into a declaration, moving the
18452         definition to internals.h.
18453         (function_info::bb_walker): Declare.
18454         (function_info::create_reg_use): Likewise.
18455         (function_info::calculate_potential_phi_regs): Take a build_info
18456         parameter.
18457         (function_info::place_phis, function_info::create_ebbs): Declare.
18458         (function_info::calculate_ebb_live_in_for_debug): Likewise.
18459         (function_info::populate_backedge_phis): Delete.
18460         (function_info::start_block, function_info::end_block): Declare.
18461         (function_info::populate_phi_inputs): Delete.
18462         (function_info::m_potential_phi_regs): Move information to build_info.
18463         * rtl-ssa/internals.h: New file.
18464         (function_info::bb_phi_info): New class.
18465         (function_info::build_info): Moved from functions.h.
18466         Add a constructor and destructor.
18467         (function_info::build_info::ebb_use): Delete.
18468         (function_info::build_info::ebb_def): Likewise.
18469         (function_info::build_info::bb_live_out): Likewise.
18470         (function_info::build_info::tmp_ebb_live_in_for_debug): New variable.
18471         (function_info::build_info::potential_phi_regs): Likewise.
18472         (function_info::build_info::potential_phi_regs_for_debug): Likewise.
18473         (function_info::build_info::ebb_def_regs): Likewise.
18474         (function_info::build_info::bb_phis): Likewise.
18475         (function_info::build_info::bb_mem_live_out): Likewise.
18476         (function_info::build_info::bb_to_rpo): Likewise.
18477         (function_info::build_info::def_stack): Likewise.
18478         (function_info::build_info::old_def_stack_limit): Likewise.
18479         * rtl-ssa/internals.inl (function_info::build_info::record_reg_def):
18480         Remove the regno argument.  Push the previous definition onto the
18481         definition stack where necessary.
18482         * rtl-ssa/accesses.cc: Include internals.h.
18483         * rtl-ssa/changes.cc: Likewise.
18484         * rtl-ssa/blocks.cc: Likewise.
18485         (function_info::build_info::build_info): Define.
18486         (function_info::build_info::~build_info): Likewise.
18487         (function_info::bb_walker): New class.
18488         (function_info::bb_walker::bb_walker): Define.
18489         (function_info::add_live_out_use): Convert a logarithmic-complexity
18490         test into a linear one.  Allow the same definition to be passed
18491         multiple times.
18492         (function_info::calculate_potential_phi_regs): Moved from
18493         functions.cc.  Take a build_info parameter and store the
18494         information there instead.
18495         (function_info::place_phis): New function.
18496         (function_info::add_entry_block_defs): Update call to record_reg_def.
18497         (function_info::calculate_ebb_live_in_for_debug): New function.
18498         (function_info::add_phi_nodes): Use bb_phis to decide which
18499         registers need phi nodes and initialize ebb_def_regs accordingly.
18500         Do not add degenerate phis here.
18501         (function_info::add_artificial_accesses): Use create_reg_use.
18502         Assert that all definitions are listed in the DF LR sets.
18503         Update call to record_reg_def.
18504         (function_info::record_block_live_out): Record live-out register
18505         values in the phis of successor blocks.  Use the live-out set
18506         when processing the last block in an EBB, instead of always
18507         using the live-in sets of successor blocks.  AND the live sets
18508         with the set of registers that have been defined in the EBB,
18509         rather than with all potential phi registers.  Cope correctly
18510         with branches back to the start of the current EBB.
18511         (function_info::start_block): New function.
18512         (function_info::end_block): Likewise.
18513         (function_info::populate_phi_inputs): Likewise.
18514         (function_info::create_ebbs): Likewise.
18515         (function_info::process_all_blocks): Rewrite into a multi-phase
18516         process.
18517         * rtl-ssa/functions.cc: Include internals.h.
18518         (function_info::calculate_potential_phi_regs): Move to blocks.cc.
18519         (function_info::init_function_data): Remove caller.
18520         * rtl-ssa/insns.cc: Include internals.h
18521         (function_info::create_reg_use): New function.  Lazily any
18522         degenerate phis needed by the linear RPO view.
18523         (function_info::record_use): Use create_reg_use.  When processing
18524         debug uses, use potential_phi_regs and test it before checking
18525         whether the register is live on entry to the current EBB.  Lazily
18526         calculate ebb_live_in_for_debug.
18527         (function_info::record_call_clobbers): Update call to record_reg_def.
18528         (function_info::record_def): Likewise.
18529
18530 2021-02-15  Martin Liska  <mliska@suse.cz>
18531
18532         * toplev.c (init_asm_output): Free output of
18533         gen_command_line_string function.
18534         (process_options): Likewise.
18535
18536 2021-02-15  Martin Liska  <mliska@suse.cz>
18537
18538         * params.opt: Add 2 missing Param keywords.
18539
18540 2021-02-15  Eric Botcazou  <ebotcazou@adacore.com>
18541
18542         * df-core.c (df_worklist_dataflow_doublequeue): Use proper cast.
18543
18544 2021-02-15  Jakub Jelinek  <jakub@redhat.com>
18545
18546         PR tree-optimization/99079
18547         * match.pd (A % (pow2pcst << N) -> A & ((pow2pcst << N) - 1)): Remove
18548         useless tree_nop_conversion_p (type, TREE_TYPE (@3)) check.  Instead
18549         require both type and TREE_TYPE (@1) to be integral types and either
18550         type having smaller or equal precision, or TREE_TYPE (@1) being
18551         unsigned type, or type being signed type.  If TREE_TYPE (@1)
18552         doesn't have wrapping overflow, perform the subtraction of one in
18553         unsigned type.
18554
18555 2021-02-14  Jan Hubicka  <hubicka@ucw.cz>
18556             Richard Biener  <rguether@suse.de>
18557
18558         PR ipa/97346
18559         * ipa-reference.c (ipa_init): Only conditinally initialize
18560         reference_vars_to_consider.
18561         (propagate): Conditionally deninitialize reference_vars_to_consider.
18562         (ipa_reference_write_optimization_summary): Sanity check that
18563         reference_vars_to_consider is not allocated.
18564
18565 2021-02-13  Levy Hsu  <admin@levyhsu.com>
18566
18567         PR target/97417
18568         * config/riscv/riscv-shorten-memrefs.c (pass_shorten_memrefs): Add
18569         extend parameter to get_si_mem_base_reg declaration.
18570         (get_si_mem_base_reg): Add extend parameter.  Set it.
18571         (analyze): Pass extend arg to get_si_mem_base_reg.
18572         (transform): Likewise.  Use it when rewriting mems.
18573         * config/riscv/riscv.c (riscv_legitimize_move): Check for subword
18574         loads and emit sign/zero extending load followed by subreg move.
18575
18576 2021-02-13  Jim Wilson  <jimw@sifive.com>
18577
18578         PR target/97417
18579         * config/riscv/riscv.c (riscv_compressed_lw_address_p): Drop early
18580         exit when !reload_completed.  Only perform check for compressed reg
18581         if reload_completed.
18582         (riscv_rtx_costs): In MEM case, when optimizing for size and
18583         shorten memrefs, if not compressible, then increase cost.
18584
18585 2021-02-13  Jakub Jelinek  <jakub@redhat.com>
18586
18587         PR rtl-optimization/98439
18588         * recog.c (pass_split_before_regstack::gate): Enable even when
18589         pass_split_before_sched2 is enabled if -fselective-scheduling2 is
18590         on.
18591
18592 2021-02-13  Jakub Jelinek  <jakub@redhat.com>
18593
18594         PR target/96166
18595         * config/i386/mmx.md (*mmx_pshufd_1): Add a combine splitter for
18596         swap of V2SImode elements in memory into DImode memory rotate by 32.
18597
18598 2021-02-12  Martin Sebor  <msebor@redhat.com>
18599
18600         * tree-pretty-print.c (print_generic_expr_to_str): Update comment.
18601
18602 2021-02-12  Richard Sandiford  <richard.sandiford@arm.com>
18603
18604         * rtl-ssa/accesses.cc (function_info::make_use_available): Use
18605         m_temp_obstack rather than m_obstack to allocate the temporary use.
18606
18607 2021-02-12  Richard Sandiford  <richard.sandiford@arm.com>
18608
18609         * df-problems.c (df_lr_bb_local_compute): Treat partial definitions
18610         as read-modify operations.
18611
18612 2021-02-12  Richard Biener  <rguenther@suse.de>
18613
18614         PR middle-end/38474
18615         * ipa-fnsummary.c (unmodified_parm_1): Only walk when
18616         fbi->aa_walk_budget is bigger than zero.  Update
18617         fbi->aa_walk_budget.
18618         (param_change_prob): Likewise.
18619         * ipa-prop.c (detect_type_change_from_memory_writes):
18620         Properly account walk_aliased_vdefs.
18621         (parm_preserved_before_stmt_p): Canonicalize updates.
18622         (parm_ref_data_preserved_p): Likewise.
18623         (parm_ref_data_pass_through_p): Likewise.
18624         (determine_known_aggregate_parts): Account own alias queries.
18625
18626 2021-02-12  Martin Liska  <mliska@suse.cz>
18627
18628         * opts-common.c (decode_cmdline_option): Release werror_arg.
18629         * opts.c (gen_producer_string): Release output of
18630         gen_command_line_string.
18631
18632 2021-02-12  Richard Biener  <rguenther@suse.de>
18633
18634         PR tree-optimization/38474
18635         * params.opt (-param=max-store-chains-to-track=): New param.
18636         (-param=max-stores-to-track=): Likewise.
18637         * doc/invoke.texi (max-store-chains-to-track): Document.
18638         (max-stores-to-track): Likewise.
18639         * gimple-ssa-store-merging.c (pass_store_merging::m_n_chains):
18640         New.
18641         (pass_store_merging::m_n_stores): Likewise.
18642         (pass_store_merging::terminate_and_process_chain): Update
18643         m_n_stores and m_n_chains.
18644         (pass_store_merging::process_store): Likewise.   Terminate
18645         oldest chains if the number of stores or chains get too large.
18646         (imm_store_chain_info::terminate_and_process_chain): Dump
18647         chain length.
18648
18649 2021-02-11  Eric Botcazou  <ebotcazou@adacore.com>
18650
18651         * config/i386/winnt.c (i386_pe_seh_unwind_emit): When switching to
18652         the cold section, emit a nop before the directive if the previous
18653         active instruction can throw.
18654
18655 2021-02-11  Peter Bergner  <bergner@linux.ibm.com>
18656
18657         PR target/99041
18658         * config/rs6000/predicates.md (mma_assemble_input_operand): Restrict
18659         memory addresses that are legal for quad word accesses.
18660
18661 2021-02-11  Andrea Corallo  <andrea.corallo@arm.com>
18662
18663         PR target/98931
18664         * config/arm/thumb2.md (*doloop_end_internal): Generate
18665         alternative sequence to handle long range branches.
18666
18667 2021-02-11  Joel Hutton  <joel.hutton@arm.com>
18668
18669         PR tree-optimization/98772
18670         * optabs-tree.c (supportable_half_widening_operation): New function
18671         to check for supportable V8QI->V8HI widening patterns.
18672         * optabs-tree.h (supportable_half_widening_operation): New function.
18673         * tree-vect-stmts.c (vect_create_half_widening_stmts): New function
18674         to create promotion stmts for V8QI->V8HI widening patterns.
18675         (vectorizable_conversion): Add case for V8QI->V8HI.
18676
18677 2021-02-11  Richard Biener  <rguenther@suse.de>
18678
18679         * sparseset.h (SPARSESET_ELT_BITS): Remove.
18680         (SPARSESET_ELT_TYPE): Use unsigned int.
18681         * fwprop.c: Do not include sparseset.h.
18682
18683 2021-02-10  Jakub Jelinek  <jakub@redhat.com>
18684
18685         PR c++/99035
18686         * varasm.c (declare_weak): For -fsyntax-only, allow even
18687         TREE_ASM_WRITTEN function decls.
18688
18689 2021-02-10  Jakub Jelinek  <jakub@redhat.com>
18690
18691         PR target/99025
18692         * config/i386/sse.md (fix<fixunssuffix>_truncv2sfv2di2,
18693         <insn>v8qiv8hi2, <insn>v8qiv8si2, <insn>v4qiv4si2, <insn>v4hiv4si2,
18694         <insn>v8qiv8di2, <insn>v4qiv4di2, <insn>v2qiv2di2, <insn>v4hiv4di2,
18695         <insn>v2hiv2di2, <insn>v2siv2di2): Force operands[1] into REG before
18696         calling simplify_gen_subreg on it.
18697
18698 2021-02-10  Martin Liska  <mliska@suse.cz>
18699
18700         * config/nvptx/nvptx.c (nvptx_option_override): Use
18701         flag_patchable_function_entry instead of the removed
18702         function_entry_patch_area_size.
18703
18704 2021-02-10  Martin Liska  <mliska@suse.cz>
18705
18706         PR tree-optimization/99002
18707         PR tree-optimization/99026
18708         * gimple-if-to-switch.cc (if_chain::is_beneficial): Fix memory
18709         leak when adjacent cases are merged.
18710         * tree-switch-conversion.c (switch_decision_tree::analyze_switch_statement): Use
18711         release_clusters.
18712         (make_pass_lower_switch): Remove trailing whitespace.
18713         * tree-switch-conversion.h (release_clusters): New.
18714
18715 2021-02-10  Richard Biener  <rguenther@suse.de>
18716
18717         PR rtl-optimization/99054
18718         * cfgrtl.c (rtl-optimization/99054): Return an auto_vec.
18719         (fixup_partitions): Adjust.
18720         (rtl_verify_edges): Likewise.
18721
18722 2021-02-10  Jakub Jelinek  <jakub@redhat.com>
18723
18724         PR middle-end/99007
18725         * gimplify.c (gimplify_scan_omp_clauses): For MEM_REF on reductions,
18726         temporarily disable gimplify_ctxp->into_ssa around gimplify_expr
18727         calls.
18728
18729 2021-02-10  Richard Biener  <rguenther@suse.de>
18730
18731         PR ipa/99029
18732         * ipa-pure-const.c (propagate_malloc): Use an auto_vec<>
18733         for callees.
18734
18735 2021-02-10  Richard Biener  <rguenther@suse.de>
18736
18737         PR tree-optimization/99024
18738         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Only
18739         clear loop->aux if it is associated with the destroyed loop_vinfo.
18740
18741 2021-02-10  Martin Liska  <mliska@suse.cz>
18742
18743         PR tree-optimization/99002
18744         * gimple-if-to-switch.cc (find_conditions): Fix memory leak
18745         in the function.
18746
18747 2021-02-10  Martin Liska  <mliska@suse.cz>
18748
18749         PR ipa/99003
18750         * ipa-icf.c (sem_item::add_reference): Fix memory leak when
18751         a reference exists.
18752
18753 2021-02-10  Jakub Jelinek  <jakub@redhat.com>
18754
18755         PR debug/98755
18756         * dwarf2out.c (prune_unused_types_walk): Mark DW_TAG_variable DIEs
18757         at class scope for DWARF5+.
18758
18759 2021-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18760
18761         PR rtl-optimization/96015
18762         * reorg.c (skip_consecutive_labels): Minor comment tweaks.
18763         (relax_delay_slots): When deleting a jump to the next active
18764         instruction over a barrier, first delete the barrier if the
18765         jump is the only way to reach the target label.
18766
18767 2021-02-09  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18768
18769         * config/aarch64/aarch64-cost-tables.h: Add entries for vect.mul.
18770         * config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Use vect.mul for
18771         vector multiplies and vect.alu for SSRA.
18772         * config/arm/aarch-common-protos.h (struct vector_cost_table): Define
18773         vect.mul cost field.
18774         * config/arm/aarch-cost-tables.h: Add entries for vect.mul.
18775         * config/arm/arm.c: Likewise.
18776
18777 2021-02-09  Richard Biener  <rguenther@suse.de>
18778
18779         PR tree-optimization/98863
18780         * tree-ssa-sccvn.h (vn_avail::next_undo): Add.
18781         * tree-ssa-sccvn.c (last_pushed_avail): New global.
18782         (rpo_elim::eliminate_push_avail): Chain pushed avails.
18783         (unwind_state::avail_top): Add.
18784         (do_unwind): Rewrite unwinding of avail entries.
18785         (do_rpo_vn): Initialize last_pushed_avail and
18786         avail_top of the undo state.
18787
18788 2021-02-09  Jakub Jelinek  <jakub@redhat.com>
18789
18790         PR middle-end/99004
18791         * calls.c (maybe_warn_rdwr_sizes): Change s0 and s1 type from
18792         const char * to char * and free those pointers after use.
18793
18794 2021-02-09  Richard Biener  <rguenther@suse.de>
18795
18796         PR tree-optimization/99017
18797         * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Allow
18798         zero vector cost entries.
18799
18800 2021-02-08  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18801
18802         PR middle-end/98974
18803         * tree-vect-stmts.c (vectorizable_condition): Remove shadow vec_num
18804         parameter in vectorizable_condition.
18805
18806 2021-02-08  Richard Biener  <rguenther@suse.de>
18807
18808         PR lto/96591
18809         * tree.c (walk_tree_1): Walk VECTOR_CST elements.
18810
18811 2021-02-08  Martin Liska  <mliska@suse.cz>
18812
18813         PR lto/98971
18814         * cfgexpand.c (pass_expand::execute): Parse per-function option
18815         flag_patchable_function_entry and use it.
18816         * common.opt: Remove function_entry_patch_area_size and
18817         function_entry_patch_area_start global variables.
18818         * opts.c (parse_and_check_patch_area): New function.
18819         (common_handle_option): Use it.
18820         * opts.h (parse_and_check_patch_area): New function.
18821         * toplev.c (process_options): Parse and use
18822         function_entry_patch_area_size.
18823
18824 2021-02-08  Martin Sebor  <msebor@redhat.com>
18825
18826         * doc/extend.texi (attribute malloc): Correct typos.
18827
18828 2021-02-05  Nathan Sidwell  <nathan@acm.org>
18829
18830         PR driver/98943
18831         * gcc.c (driver::maybe_run_linker): Check for input file
18832         accessibility if not linking.
18833
18834 2021-02-05  Richard Biener  <rguenther@suse.de>
18835
18836         PR tree-optimization/98855
18837         * tree-vectorizer.h (add_stmt_cost): New overload.
18838         * tree-vect-slp.c (li_cost_vec_cmp): New.
18839         (vect_bb_slp_scalar_cost): Cost individual loop regions
18840         separately.  Account for the scalar instance root stmt.
18841
18842 2021-02-05  Tom de Vries  <tdevries@suse.de>
18843
18844         PR debug/98656
18845         * tree-switch-conversion.c (jump_table_cluster::emit): Add loc
18846         argument.
18847         (bit_test_cluster::emit): Reuse location_t for newly created
18848         gswitch statement.
18849         (switch_decision_tree::try_switch_expansion): Preserve
18850         location_t.
18851         * tree-switch-conversion.h: Change function signatures.
18852
18853 2021-02-05  Jakub Jelinek  <jakub@redhat.com>
18854
18855         PR target/98957
18856         * config/i386/i386-options.c (m_NONE, m_ALL): Define.
18857         * config/i386/x86-tune.def (X86_TUNE_BRANCH_PREDICTION_HINTS,
18858         X86_TUNE_PROMOTE_QI_REGS): Use m_NONE instead of 0U.
18859         (X86_TUNE_QIMODE_MATH): Use m_ALL instead of ~0U.
18860
18861 2021-02-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18862
18863         * config/aarch64/aarch64-simd-builtins.def (get_high): Define builtin.
18864         * config/aarch64/aarch64-simd.md (aarch64_get_high<mode>): Define.
18865         * config/aarch64/arm_neon.h (__GET_HIGH): Delete.
18866         (vget_high_f16): Reimplement using new builtin.
18867         (vget_high_f32): Likewise.
18868         (vget_high_f64): Likewise.
18869         (vget_high_p8): Likewise.
18870         (vget_high_p16): Likewise.
18871         (vget_high_p64): Likewise.
18872         (vget_high_s8): Likewise.
18873         (vget_high_s16): Likewise.
18874         (vget_high_s32): Likewise.
18875         (vget_high_s64): Likewise.
18876         (vget_high_u8): Likewise.
18877         (vget_high_u16): Likewise.
18878         (vget_high_u32): Likewise.
18879         (vget_high_u64): Likewise.
18880
18881 2021-02-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18882
18883         * config/aarch64/aarch64-simd-builtins.def (get_low): Define builtin.
18884         * config/aarch64/aarch64-simd.md (aarch64_get_low<mode>): Define.
18885         * config/aarch64/arm_neon.h (__GET_LOW): Delete.
18886         (vget_low_f16): Reimplement using new builtin.
18887         (vget_low_f32): Likewise.
18888         (vget_low_f64): Likewise.
18889         (vget_low_p8): Likewise.
18890         (vget_low_p16): Likewise.
18891         (vget_low_p64): Likewise.
18892         (vget_low_s8): Likewise.
18893         (vget_low_s16): Likewise.
18894         (vget_low_s32): Likewise.
18895         (vget_low_s64): Likewise.
18896         (vget_low_u8): Likewise.
18897         (vget_low_u16): Likewise.
18898         (vget_low_u32): Likewise.
18899         (vget_low_u64): Likewise.
18900
18901 2021-02-05  Kito Cheng  <kito.cheng@sifive.com>
18902
18903         * gcc.c (print_multilib_info): Check all required argument is provided
18904         by default arg.
18905
18906 2021-02-05  liuhongt  <hongtao.liu@intel.com>
18907
18908         PR target/98537
18909         * config/i386/i386-expand.c (ix86_expand_sse_cmp): Don't
18910         generate integer mask comparison for 128/256-bits vector when
18911         op_true/op_false is NULL_RTX or CONSTM1_RTX/CONST0_RTX. Also
18912         delete redundant !maskcmp condition.
18913         (ix86_expand_int_vec_cmp): Ditto but no redundant deletion
18914         here.
18915         (ix86_expand_sse_movcc): Delete definition of maskcmp, add the
18916         condition directly to if (maskcmp), add extra check for
18917         cmpmode, it should be MODE_INT.
18918         (ix86_expand_fp_vec_cmp): Pass NULL to ix86_expand_sse_cmp's
18919         parameters op_true/op_false.
18920         (ix86_use_mask_cmp_p): New.
18921
18922 2021-02-05  liuhongt  <hongtao.liu@intel.com>
18923
18924         PR target/98172
18925         * config/i386/x86-tune.def (X86_TUNE_AVX256_UNALIGNED_LOAD_OPTIMAL):
18926         Remove m_GENERIC from ~list.
18927         (X86_TUNE_AVX256_UNALIGNED_STORE_OPTIMAL): Ditto.
18928
18929 2021-02-04  David Malcolm  <dmalcolm@redhat.com>
18930
18931         PR c/97932
18932         * diagnostic-show-locus.c (compatible_locations_p): Require
18933         locations in the same macro map to be either both from the
18934         macro definition, or both from the macro arguments.
18935
18936 2021-02-04  Jonathan Wright  <jonathan.wright@arm.com>
18937
18938         * config/aarch64/aarch64-simd-builtins.def: Add
18939         [su]mull_hi_lane[q] builtin generator macros.
18940         * config/aarch64/aarch64-simd.md
18941         (aarch64_<su>mull_hi_lane<mode>_insn): Define.
18942         (aarch64_<su>mull_hi_lane<mode>): Define.
18943         (aarch64_<su>mull_hi_laneq<mode>_insn): Define.
18944         (aarch64_<su>mull_hi_laneq<mode>): Define.
18945         * config/aarch64/arm_neon.h (vmull_high_lane_s16): Use RTL
18946         builtin instead of inline asm.
18947         (vmull_high_lane_s32): Likewise.
18948         (vmull_high_lane_u16): Likewise.
18949         (vmull_high_lane_u32): Likewise.
18950         (vmull_high_laneq_s16): Likewise.
18951         (vmull_high_laneq_s32): Likewise.
18952         (vmull_high_laneq_u16): Likewise.
18953         (vmull_high_laneq_u32): Liekwise.
18954
18955 2021-02-04  Jonathan Wright  <jonathan.wright@arm.com>
18956
18957         * config/aarch64/aarch64-simd-builtins.def: Add [su]mull_hi_n
18958         builtin generator macros.
18959         * config/aarch64/aarch64-simd.md
18960         (aarch64_<su>mull_hi_n<mode>_insn): Define.
18961         (aarch64_<su>mull_hi_n<mode>): Define.
18962         * config/aarch64/arm_neon.h (vmull_high_n_s16): Use RTL builtin
18963         instead of inline asm.
18964         (vmull_high_n_s32): Likewise.
18965         (vmull_high_n_u16): Likewise.
18966         (vmull_high_n_u32): Likewise.
18967
18968 2021-02-04  Richard Biener  <rguenther@suse.de>
18969
18970         PR tree-optimization/98855
18971         * tree-vect-loop.c (vectorizable_phi): Do not cost
18972         single-argument PHIs.
18973         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Likewise.
18974         * tree-vect-stmts.c (vectorizable_bswap): Also perform
18975         costing for SLP operation.
18976
18977 2021-02-04  Martin Liska  <mliska@suse.cz>
18978
18979         * doc/extend.texi: Mention -mprefer-vector-width in target
18980         attributes.
18981
18982 2021-02-03  Martin Sebor  <msebor@redhat.com>
18983
18984         PR tree-optimization/98937
18985         * tree-ssa-strlen.c (strlen_dom_walker::~strlen_dom_walker): Define.
18986         Flush pointer_query cache.
18987
18988 2021-02-03  Aaron Sawdey  <acsawdey@linux.ibm.com>
18989
18990         * config/rs6000/genfusion.pl (gen_2logical): Add missing
18991         fixes based on patch review.
18992         * config/rs6000/fusion.md: Regenerate file.
18993
18994 2021-02-03  Aaron Sawdey  <acsawdey@linux.ibm.com>
18995
18996         * config/rs6000/t-rs6000: Comment out auto generation of
18997         fusion.md for now.
18998
18999 2021-02-03  Andrew Stubbs  <ams@codesourcery.com>
19000
19001         * config/gcn/gcn-opts.h (enum processor_type): Add PROCESSOR_GFX908.
19002         * config/gcn/gcn.c (gcn_omp_device_kind_arch_isa): Add gfx908.
19003         (output_file_start): Add gfx908.
19004         * config/gcn/gcn.opt (gpu_type): Add gfx908.
19005         * config/gcn/t-gcn-hsa (MULTILIB_OPTIONS): Add march=gfx908.
19006         (MULTILIB_DIRNAMES): Add gfx908.
19007         * config/gcn/mkoffload.c (EF_AMDGPU_MACH_AMDGCN_GFX908): New define.
19008         (main): Recognize gfx908.
19009         * config/gcn/t-omp-device: Add gfx908.
19010
19011 2021-02-03  Jonathan Wright  <jonathan.wright@arm.com>
19012
19013         * config/aarch64/aarch64-simd-builtins.def: Add
19014         [su]mlsl_hi_lane[q] builtin macro generators.
19015         * config/aarch64/aarch64-simd.md
19016         (aarch64_<su>mlsl_hi_lane<mode>_insn): Define.
19017         (aarch64_<su>mlsl_hi_lane<mode>): Define.
19018         (aarch64_<su>mlsl_hi_laneq<mode>_insn): Define.
19019         (aarch64_<su>mlsl_hi_laneq<mode>): Define.
19020         * config/aarch64/arm_neon.h (vmlsl_high_lane_s16): Use RTL
19021         builtin instead of inline asm.
19022         (vmlsl_high_lane_s32): Likewise.
19023         (vmlsl_high_lane_u16): Likewise.
19024         (vmlsl_high_lane_u32): Likewise.
19025         (vmlsl_high_laneq_s16): Likewise.
19026         (vmlsl_high_laneq_s32): Likewise.
19027         (vmlsl_high_laneq_u16): Likewise.
19028         (vmlsl_high_laneq_u32): Likewise.
19029         (vmlal_high_laneq_u32): Likewise.
19030
19031 2021-02-03  Jonathan Wright  <jonathan.wright@arm.com>
19032
19033         * config/aarch64/aarch64-simd-builtins.def: Add
19034         [su]mlal_hi_lane[q] builtin generator macros.
19035         * config/aarch64/aarch64-simd.md
19036         (aarch64_<su>mlal_hi_lane<mode>_insn): Define.
19037         (aarch64_<su>mlal_hi_lane<mode>): Define.
19038         (aarch64_<su>mlal_hi_laneq<mode>_insn): Define.
19039         (aarch64_<su>mlal_hi_laneq<mode>): Define.
19040         * config/aarch64/arm_neon.h (vmlal_high_lane_s16): Use RTL
19041         builtin instead of inline asm.
19042         (vmlal_high_lane_s32): Likewise.
19043         (vmlal_high_lane_u16): Likewise.
19044         (vmlal_high_lane_u32): Likewise.
19045         (vmlal_high_laneq_s16): Likewise.
19046         (vmlal_high_laneq_s32): Likewise.
19047         (vmlal_high_laneq_u16): Likewise.
19048         (vmlal_high_laneq_u32): Likewise.
19049
19050 2021-02-03  Jonathan Wright  <jonathan.wright@arm.com>
19051
19052         * config/aarch64/aarch64-simd-builtins.def: Add [su]mlsl_hi_n
19053         builtin generator macros.
19054         * config/aarch64/aarch64-simd.md (aarch64_<su>mlsl_hi_n<mode>_insn):
19055         Define.
19056         (aarch64_<su>mlsl_hi_n<mode>): Define.
19057         * config/aarch64/arm_neon.h (vmlsl_high_n_s16): Use RTL builtin
19058         instead of inline asm.
19059         (vmlsl_high_n_s32): Likewise.
19060         (vmlsl_high_n_u16): Likewise.
19061         (vmlsl_high_n_u32): Likewise.
19062
19063 2021-02-03  Jonathan Wright  <jonathan.wright@arm.com>
19064
19065         * config/aarch64/aarch64-simd-builtins.def: Add [su]mlal_hi_n
19066         builtin generator macros.
19067         * config/aarch64/aarch64-simd.md (aarch64_<su>mlal_hi_n<mode>_insn):
19068         Define.
19069         (aarch64_<su>mlal_hi_n<mode>): Define.
19070         * config/aarch64/arm_neon.h (vmlal_high_n_s16): Use RTL builtin
19071         instead of inline asm.
19072         (vmlal_high_n_s32): Likewise.
19073         (vmlal_high_n_u16): Likewise.
19074         (vmlal_high_n_u32): Likewise.
19075
19076 2021-02-03  Jonathan Wright  <jonathan.wright@arm.com>
19077
19078         * config/aarch64/aarch64-simd-builtins.def: Add RTL builtin
19079         generator macros.
19080         * config/aarch64/aarch64-simd.md (*aarch64_<su>mlal_hi<mode>):
19081         Rename to...
19082         (aarch64_<su>mlal_hi<mode>_insn): This.
19083         (aarch64_<su>mlal_hi<mode>): Define.
19084         * config/aarch64/arm_neon.h (vmlal_high_s8): Use RTL builtin
19085         instead of inline asm.
19086         (vmlal_high_s16): Likewise.
19087         (vmlal_high_s32): Likewise.
19088         (vmlal_high_u8): Likewise.
19089         (vmlal_high_u16): Likewise.
19090         (vmlal_high_u32): Likewise.
19091
19092 2021-02-03  Ilya Leoshkevich  <iii@linux.ibm.com>
19093
19094         * lra-spills.c (remove_pseudos): Call lra_update_insn_recog_data()
19095         after calling alter_subreg() on a (mem).
19096
19097 2021-02-03  Martin Liska  <mliska@suse.cz>
19098
19099         PR lto/98912
19100         * lto-streamer-out.c (produce_lto_section): Fill up missing
19101         padding.
19102         * lto-streamer.h (struct lto_section): Add _padding field.
19103
19104 2021-02-03  Richard Biener  <rguenther@suse.de>
19105
19106         * lto-streamer.c (lto_get_section_name): Free temporary
19107         buffer.
19108         * tree-loop-distribution.c
19109         (loop_distribution::merge_dep_scc_partitions): Free edge data.
19110
19111 2021-02-03  Jakub Jelinek  <jakub@redhat.com>
19112
19113         PR middle-end/97487
19114         * ifcvt.c (noce_can_force_operand): New function.
19115         (noce_emit_move_insn): Use it.
19116         (noce_try_sign_mask): Likewise.  Formatting fix.
19117
19118 2021-02-03  Jakub Jelinek  <jakub@redhat.com>
19119
19120         PR middle-end/97971
19121         * lra-constraints.c (process_alt_operands): For inline asm, don't call
19122         fatal_insn, but instead return false.
19123
19124 2021-02-03  Jakub Jelinek  <jakub@redhat.com>
19125
19126         PR tree-optimization/98287
19127         * config/i386/mmx.md (<insn><mode>3): For shifts don't enable expander
19128         for V1DImode.
19129
19130 2021-02-03  Tamar Christina  <tamar.christina@arm.com>
19131
19132         PR tree-optimization/98928
19133         * tree-vect-loop.c (vect_analyze_loop_2): Change
19134         STMT_VINFO_SLP_VECT_ONLY to STMT_VINFO_SLP_VECT_ONLY_PATTERN.
19135         * tree-vect-slp-patterns.c (complex_pattern::build): Likewise.
19136         * tree-vectorizer.h (STMT_VINFO_SLP_VECT_ONLY_PATTERN): New.
19137         (class _stmt_vec_info): Add slp_vect_pattern_only_p.
19138
19139 2021-02-02  Richard Biener  <rguenther@suse.de>
19140
19141         * gimple-loop-interchange.cc (prepare_data_references):
19142         Release vectors.
19143         * gimple-loop-jam.c (tree_loop_unroll_and_jam): Likewise.
19144         * tree-ssa-loop-im.c (hoist_memory_references): Likewise.
19145         * tree-vect-stmts.c (vectorizable_condition): Do not
19146         allocate vectors.
19147         (vectorizable_comparison): Likewise.
19148
19149 2021-02-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19150
19151         * config/aarch64/aarch64-simd-builtins.def (ursqrte): Define builtin.
19152         * config/aarch64/aarch64-simd.md (aarch64_ursqrte<mode>): New pattern.
19153         * config/aarch64/arm_neon.h (vrsqrte_u32): Reimplement using builtin.
19154         (vrsqrteq_u32): Likewise.
19155
19156 2021-02-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19157
19158         * config/aarch64/aarch64-simd-builtins.def (sqxtun2): Define builtin.
19159         * config/aarch64/aarch64-simd.md (aarch64_sqxtun2<mode>_le): Define.
19160         (aarch64_sqxtun2<mode>_be): Likewise.
19161         (aarch64_sqxtun2<mode>): Likewise.
19162         * config/aarch64/arm_neon.h (vqmovun_high_s16): Reimplement using builtin.
19163         (vqmovun_high_s32): Likewise.
19164         (vqmovun_high_s64): Likewise.
19165         * config/aarch64/iterators.md (UNSPEC_SQXTUN2): Define.
19166
19167 2021-02-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19168
19169         * config/aarch64/aarch64-simd-builtins.def (bfdot_lane, bfdot_laneq): Use
19170         AUTO_FP flags.
19171         (bfmlalb_lane, bfmlalt_lane, bfmlalb_lane_q, bfmlalt_lane_q): Use FP flags.
19172
19173 2021-02-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19174
19175         * config/aarch64/aarch64-simd-builtins.def (fcmla_lane0, fcmla_lane90,
19176         fcmla_lane180, fcmla_lane270, fcmlaq_lane0, fcmlaq_lane90, fcmlaq_lane180,
19177         fcmlaq_lane270, scvtf, ucvtf, fcvtzs, fcvtzu, scvtfsi, scvtfdi, ucvtfsi,
19178         ucvtfdi, fcvtzshf, fcvtzuhf, fmlal_lane_low, fmlsl_lane_low,
19179         fmlal_laneq_low, fmlsl_laneq_low, fmlalq_lane_low, fmlslq_lane_low,
19180         fmlalq_laneq_low, fmlslq_laneq_low, fmlal_lane_high, fmlsl_lane_high,
19181         fmlal_laneq_high, fmlsl_laneq_high, fmlalq_lane_high, fmlslq_lane_high,
19182         fmlalq_laneq_high, fmlslq_laneq_high): Use FP flags.
19183
19184 2021-02-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19185
19186         * config/aarch64/aarch64-builtins.c (FLAG_LOAD): Define.
19187         * config/aarch64/aarch64-simd-builtins.def (ld1x2, ld2, ld3, ld4, ld2r,
19188         ld3r, ld4r, ld1, ld1x3, ld1x4): Use LOAD flags.
19189
19190 2021-02-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19191
19192         * config/aarch64/aarch64-simd-builtins.def (combine, zip1, zip2,
19193         uzp1, uzp2, trn1, trn2, simd_bsl): Use AUTO_FP flags.
19194
19195 2021-02-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19196
19197         * config/aarch64/aarch64-simd-builtins.def (clrsb, clz, ctz, popcount,
19198         vec_smult_lane_, vec_smlal_lane_, vec_smult_laneq_, vec_smlal_laneq_,
19199         vec_umult_lane_, vec_umlal_lane_, vec_umult_laneq_, vec_umlal_laneq_,
19200         ashl, sshl, ushl, srshl, urshl, sdot_lane, udot_lane, sdot_laneq,
19201         udot_laneq, usdot_lane, usdot_laneq, sudot_lane, sudot_laneq, ashr,
19202         ashr_simd, lshr, lshr_simd, srshr_n, urshr_n, ssra_n, usra_n, srsra_n,
19203         ursra_n, sshll_n, ushll_n, sshll2_n, ushll2_n, ssri_n, usri_n, ssli_n,
19204         ssli_n, usli_n, bswap, rbit, simd_bsl, eor3q, rax1q, xarq, bcaxq): Use
19205         NONE builtin flags.
19206
19207 2021-02-02  Jakub Jelinek  <jakub@redhat.com>
19208
19209         PR tree-optimization/98848
19210         * tree-vect-patterns.c (vect_recog_over_widening_pattern): Punt if
19211         STMT_VINFO_DEF_TYPE (last_stmt_info) is vect_reduction_def.
19212
19213 2021-02-02  Kito Cheng  <kito.cheng@sifive.com>
19214
19215         PR target/98743
19216         * expr.c: Check mode before calling store_expr.
19217
19218 2021-02-02  Christophe Lyon  <christophe.lyon@linaro.org>
19219
19220         * config/arm/iterators.md (supf): Remove VORNQ_S and VORNQ_U.
19221         (VORNQ): Remove.
19222         * config/arm/mve.md (mve_vornq_s<mode>): New entry for vorn
19223         instruction using expression ior.
19224         (mve_vornq_u<mode>): New expander.
19225         (mve_vornq_f<mode>): Use ior code instead of unspec.
19226         * config/arm/unspecs.md (VORNQ_S, VORNQ_U, VORNQ_F): Remove.
19227
19228 2021-02-02  Alexandre Oliva  <oliva@adacore.com>
19229
19230         * tree-nested.c (convert_nonlocal_reference_op): Move
19231         current_function_decl restore after re-gimplification.
19232         (convert_local_reference_op): Likewise.
19233
19234 2021-02-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19235
19236         * config/aarch64/aarch64-simd-builtins.def (rshrn, rshrn2):
19237         Define builtins.
19238         * config/aarch64/aarch64-simd.md (aarch64_rshrn<mode>_insn_le):
19239         Define.
19240         (aarch64_rshrn<mode>_insn_be): Likewise.
19241         (aarch64_rshrn<mode>): Likewise.
19242         (aarch64_rshrn2<mode>_insn_le): Likewise.
19243         (aarch64_rshrn2<mode>_insn_be): Likewise.
19244         (aarch64_rshrn2<mode>): Likewise.
19245         * config/aarch64/aarch64.md (unspec): Add UNSPEC_RSHRN.
19246         * config/aarch64/arm_neon.h (vrshrn_high_n_s16): Reimplement
19247         using builtin.
19248         (vrshrn_high_n_s32): Likewise.
19249         (vrshrn_high_n_s64): Likewise.
19250         (vrshrn_high_n_u16): Likewise.
19251         (vrshrn_high_n_u32): Likewise.
19252         (vrshrn_high_n_u64): Likewise.
19253         (vrshrn_n_s16): Likewise.
19254         (vrshrn_n_s32): Likewise.
19255         (vrshrn_n_s64): Likewise.
19256         (vrshrn_n_u16): Likewise.
19257         (vrshrn_n_u32): Likewise.
19258         (vrshrn_n_u64): Likewise.
19259
19260 2021-02-01  Sergei Trofimovich  <siarheit@google.com>
19261
19262         PR tree-optimization/98499
19263         * ipa-modref.c (analyze_ssa_name_flags): treat RVO
19264         conservatively and assume all possible side-effects.
19265
19266 2021-02-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19267
19268         * config/aarch64/aarch64-simd-builtins.def (vec_unpacks_hi,
19269         vec_unpacku_hi_): Define builtins.
19270         * config/aarch64/arm_neon.h (vmovl_high_s8): Reimplement using
19271         builtin.
19272         (vmovl_high_s16): Likewise.
19273         (vmovl_high_s32): Likewise.
19274         (vmovl_high_u8): Likewise.
19275         (vmovl_high_u16): Likewise.
19276         (vmovl_high_u32): Likewise.
19277
19278 2021-02-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19279
19280         * config/aarch64/aarch64-simd-builtins.def (sabdl, uabdl):
19281         Define builtins.
19282         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl<mode>): New
19283         pattern.
19284         * config/aarch64/aarch64.md (unspec): Define UNSPEC_SABDL,
19285         UNSPEC_UABDL.
19286         * config/aarch64/arm_neon.h (vabdl_s8): Reimplemet using
19287         builtin.
19288         (vabdl_s16): Likewise.
19289         (vabdl_s32): Likewise.
19290         (vabdl_u8): Likewise.
19291         (vabdl_u16): Likewise.
19292         (vabdl_u32): Likewise.
19293         * config/aarch64/iterators.md (ABDL): New int iterator.
19294         (sur): Handle UNSPEC_SABDL, UNSPEC_UABDL.
19295
19296 2021-02-01  Martin Sebor  <msebor@redhat.com>
19297
19298         * tree.h (BLOCK_VARS): Add comment.
19299         (BLOCK_SUBBLOCKS): Same.
19300         (BLOCK_SUPERCONTEXT): Same.
19301         (BLOCK_ABSTRACT_ORIGIN): Same.
19302         (inlined_function_outer_scope_p): Same.
19303
19304 2021-02-01  Martin Sebor  <msebor@redhat.com>
19305
19306         PR middle-end/97172
19307         * attribs.c (attr_access::free_lang_data): Define new function.
19308         * attribs.h (attr_access::free_lang_data): Declare new function.
19309
19310 2021-02-01  Richard Biener  <rguenther@suse.de>
19311
19312         * vec.h (auto_vec::auto_vec): Add memory stat parameters
19313         and pass them on.
19314         * bitmap.h (auto_bitmap::auto_bitmap): Likewise.
19315
19316 2021-02-01  Tamar Christina  <tamar.christina@arm.com>
19317
19318         * config/aarch64/aarch64-simd.md (aarch64_<su>mlal_n<mode>,
19319         aarch64_<su>mlsl<mode>, aarch64_<su>mlsl_n<mode>): Flip mult operands.
19320
19321 2021-02-01  Richard Biener  <rguenther@suse.de>
19322
19323         PR rtl-optimization/98863
19324         * config/i386/i386-features.c (convert_scalars_to_vector):
19325         Set DF_RD_PRUNE_DEAD_DEFS.
19326
19327 2021-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19328
19329         * system.h (SIZE_MAX): Define if not already defined.
19330
19331 2021-01-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
19332
19333         * config/rs6000/genfusion.pl (gen_2logical): New function to
19334         generate patterns for logical-logical fusion.
19335         * config/rs6000/fusion.md: Regenerated patterns.
19336         * config/rs6000/rs6000-cpus.def: Add
19337         OPTION_MASK_P10_FUSION_2LOGICAL.
19338         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19339         Enable logical-logical fusion for p10.
19340         * config/rs6000/rs6000.opt: Add -mpower10-fusion-2logical.
19341
19342 2021-01-30  David Edelsohn  <dje.gcc@gmail.com>
19343
19344         * config/rs6000/rs6000.opt: Add periods to new AIX options.
19345
19346 2021-01-30  David Edelsohn  <dje.gcc@gmail.com>
19347
19348         * config/rs6000/rs6000.opt (mabi=vec-extabi): New.
19349         (mabi=vec-default): New.
19350         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define
19351         __EXTABI__ for AIX Vector extended ABI.
19352         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print AIX Vector
19353         extabi info.
19354         (conditional_register_usage): If AIX vec_extabi enabled, vs20-vs31
19355         are non-volatile.
19356         * doc/invoke.texi (PowerPC mabi): Add AIX vec-extabi and vec-default.
19357
19358 2021-01-30  Jakub Jelinek  <jakub@redhat.com>
19359
19360         * config/i386/i386-features.c (remove_partial_avx_dependency): Clear
19361         DF_DEFER_INSN_RESCAN after calling df_process_deferred_rescans.
19362
19363 2021-01-29  Vladimir N. Makarov  <vmakarov@redhat.com>
19364
19365         PR target/97701
19366         * lra-constraints.c (in_class_p): Don't narrow class only for REG
19367         or MEM.
19368
19369 2021-01-29  Will Schmidt  <will_schmidt@vnet.ibm.com>
19370
19371         * config/rs6000/rs6000-call.c (rs6000_expand_binup_builtin): Add
19372         clauses for CODE_FOR_vsx_xvcvuxddp_scale and
19373         CODE_FOR_vsx_xvcvsxddp_scale to the parameter checking code.
19374
19375 2021-01-29  Andrew MacLeod  <amacleod@redhat.com>
19376
19377         PR tree-optimization/98866
19378         * gimple-range-gori.h (gori_compute:set_range_invariant): New.
19379         * gimple-range-gori.cc (gori_map::set_range_invariant): New.
19380         (gori_map::m_maybe_invariant): Rename from all_outgoing.
19381         (gori_map::gori_map): Rename all_outgoing to m_maybe_invariant.
19382         (gori_map::is_export_p): Ditto.
19383         (gori_map::calculate_gori): Ditto.
19384         (gori_compute::set_range_invariant): New.
19385         * gimple-range.cc (gimple_ranger::range_of_stmt): Set range
19386         invariant for pointers evaluating to [1, +INF].
19387
19388 2021-01-29  Richard Biener  <rguenther@suse.de>
19389
19390         PR rtl-optimization/98863
19391         * config/i386/i386-features.c (remove_partial_avx_dependency):
19392         Do not perform DF analysis.
19393         (pass_data_remove_partial_avx_dependency): Remove
19394         TODO_df_finish.
19395
19396 2021-01-29  Jonathan Wright  <jonathan.wright@arm.com>
19397
19398         * config/aarch64/aarch64-simd-builtins.def: Add [su]mull_n
19399         builtin generator macros.
19400         * config/aarch64/aarch64-simd.md (aarch64_<su>mull_n<mode>):
19401         Define.
19402         * config/aarch64/arm_neon.h (vmull_n_s16): Use RTL builtin
19403         instead of inline asm.
19404         (vmull_n_s32): Likewise.
19405         (vmull_n_u16): Likewise.
19406         (vmull_n_u32): Likewise.
19407
19408 2021-01-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19409
19410         * config/aarch64/aarch64-simd-builtins.def (sabdl2, uabdl2):
19411         Define builtins.
19412         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
19413         Rename to...
19414         (aarch64_<sur>abdl2<mode>): ... This.
19415         (<sur>sadv16qi): Adjust use of above.
19416         * config/aarch64/arm_neon.h (vabdl_high_s8): Reimplement using
19417         builtin.
19418         (vabdl_high_s16): Likewise.
19419         (vabdl_high_s32): Likewise.
19420         (vabdl_high_u8): Likewise.
19421         (vabdl_high_u16): Likewise.
19422         (vabdl_high_u32): Likewise.
19423
19424 2021-01-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19425
19426         * config/aarch64/aarch64-simd-builtins.def (sabal2): Define
19427         builtin.
19428         (uabal2): Likewise.
19429         * config/aarch64/aarch64-simd.md (aarch64_<sur>abal2<mode>): New
19430         pattern.
19431         * config/aarch64/aarch64.md (unspec): Add UNSPEC_SABAL2 and
19432         UNSPEC_UABAL2.
19433         * config/aarch64/arm_neon.h (vabal_high_s8): Reimplement using
19434         builtin.
19435         (vabal_high_s16): Likewise.
19436         (vabal_high_s32): Likewise.
19437         (vabal_high_u8): Likewise.
19438         (vabal_high_u16): Likewise.
19439         (vabal_high_u32): Likewise.
19440         * config/aarch64/iterators.md (ABAL2): New mode iterator.
19441         (sur): Handle UNSPEC_SABAL2, UNSPEC_UABAL2.
19442
19443 2021-01-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19444
19445         * config/aarch64/aarch64-simd-builtins.def (sabal): Define
19446         builtin.
19447         (uabal): Likewise.
19448         * config/aarch64/aarch64-simd.md (aarch64_<sur>abal<mode>_4):
19449         Rename to...
19450         (aarch64_<sur>abal<mode>): ... This
19451         (<sur>sadv16qi): Adust use of the above.
19452         * config/aarch64/arm_neon.h (vabal_s8): Reimplement using
19453         builtin.
19454         (vabal_s16): Likewise.
19455         (vabal_s32): Likewise.
19456         (vabal_u8): Likewise.
19457         (vabal_u16): Likewise.
19458         (vabal_u32): Likewise.
19459
19460 2021-01-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19461
19462         * config/aarch64/aarch64-simd-builtins.def (saddlv, uaddlv):
19463         Define builtins.
19464         * config/aarch64/aarch64-simd.md (aarch64_<su>addlv<mode>):
19465         Define.
19466         * config/aarch64/arm_neon.h (vaddlv_s8): Reimplement using
19467         builtin.
19468         (vaddlv_s16): Likewise.
19469         (vaddlv_u8): Likewise.
19470         (vaddlv_u16): Likewise.
19471         (vaddlvq_s8): Likewise.
19472         (vaddlvq_s16): Likewise.
19473         (vaddlvq_s32): Likewise.
19474         (vaddlvq_u8): Likewise.
19475         (vaddlvq_u16): Likewise.
19476         (vaddlvq_u32): Likewise.
19477         (vaddlv_s32): Likewise.
19478         (vaddlv_u32): Likewise.
19479         * config/aarch64/iterators.md (VDQV_L): New mode iterator.
19480         (unspec): Add UNSPEC_SADDLV, UNSPEC_UADDLV.
19481         (Vwstype): New mode attribute.
19482         (Vwsuf): Likewise.
19483         (VWIDE_S): Likewise.
19484         (USADDLV): New int iterator.
19485         (su): Handle UNSPEC_SADDLV, UNSPEC_UADDLV.
19486
19487 2021-01-29  Jonathan Wright  <jonathan.wright@arm.com>
19488
19489         * config/aarch64/aarch64-simd-builtins.def: Add [su]mlsl_lane[q]
19490         builtin generator macros.
19491         * config/aarch64/aarch64-simd.md (aarch64_vec_<su>mlsl_lane<Qlane>):
19492         Define.
19493         * config/aarch64/arm_neon.h (vmlsl_lane_s16): Use RTL builtin
19494         instead of inline asm.
19495         (vmlsl_lane_s32): Likewise.
19496         (vmlsl_lane_u16): Likewise.
19497         (vmlsl_lane_u32): Likewise.
19498         (vmlsl_laneq_s16): Likewise.
19499         (vmlsl_laneq_s32): Likewise.
19500         (vmlsl_laneq_u16): Likewise.
19501         (vmlsl_laneq_u32): Likewise.
19502
19503 2021-01-29  Richard Biener  <rguenther@suse.de>
19504
19505         * doc/invoke.texi (--param max-gcse-memory): Document unit
19506         of size.
19507         * gcse.c (gcse_or_cprop_is_too_expensive): Adjust.
19508         * params.opt (--param max-gcse-memory): Adjust default and
19509         document unit of size.
19510
19511 2021-01-29  Richard Biener  <rguenther@suse.de>
19512
19513         PR rtl-optimization/98863
19514         * gcse.c (gcse_or_cprop_is_too_expensive): Use unsigned
19515         HOST_WIDE_INT for the memory estimate.
19516
19517 2021-01-29  Bin Cheng  <bin.cheng@linux.alibaba.com>
19518             Richard Biener  <rguenther@suse.de>
19519
19520         PR tree-optimization/97627
19521         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19522         Do not analyze fake edges.
19523
19524 2021-01-29  Richard Biener  <rguenther@suse.de>
19525
19526         PR rtl-optimization/98144
19527         * df.h (df_mir_bb_info): Add con_visited member.
19528         * df-problems.c (df_mir_alloc): Initialize con_visited,
19529         do not fully populate IN and OUT.
19530         (df_mir_reset): Likewise.
19531         (df_mir_confluence_0): Set con_visited.
19532         (df_mir_confluence_n): Properly handle implicitely
19533         fully populated IN and OUT as designated by con_visited
19534         and update con_visited accordingly.
19535
19536 2021-01-29  Jakub Jelinek  <jakub@redhat.com>
19537
19538         PR target/98849
19539         * config/arm/vec-common.md (mve_vshlq_<supf><mode>,
19540         vashl<mode>3, vashr<mode>3, vlshr<mode>3): Add
19541         && !TARGET_REALLY_IWMMXT to conditions.
19542
19543 2021-01-29  Jakub Jelinek  <jakub@redhat.com>
19544
19545         PR debug/98331
19546         * cfgbuild.c (find_bb_boundaries): Reset debug_insn when seeing
19547         a BARRIER.
19548
19549 2021-01-28  Marek Polacek  <polacek@redhat.com>
19550
19551         PR c++/94775
19552         * stor-layout.c (finalize_type_size): If we reset TYPE_USER_ALIGN in
19553         the main variant, maybe reset it in its variants too.
19554         * tree.c (check_base_type): Return true only if TYPE_USER_ALIGN match.
19555         (check_aligned_type): Check if TYPE_USER_ALIGN match.
19556
19557 2021-01-28  Christophe Lyon  <christophe.lyon@linaro.org>
19558
19559         PR target/98730
19560         * config/arm/arm.c (arm_rtx_costs_internal): Adjust cost of vector
19561         of constant zero for comparisons.
19562
19563 2021-01-28  Michael Meissner  <meissner@linux.ibm.com>
19564
19565         * config/rs6000/rs6000.c (rs6000_mangle_decl_assembler_name): Add
19566         support for mapping built-in function names for long double
19567         built-in functions if long double is IEEE 128-bit.
19568
19569 2021-01-28  Jonathan Wright  <jonathan.wright@arm.com>
19570
19571         * config/aarch64/aarch64-simd-builtins.def: Add [su]mlsl_n
19572         builtin generator macros.
19573         * config/aarch64/aarch64-simd.md (aarch64_<su>mlsl_n<mode>):
19574         Define.
19575         * config/aarch64/arm_neon.h (vmlsl_n_s16): Use RTL builtin
19576         instead of inline asm.
19577         (vmlsl_n_s32): Likewise.
19578         (vmlsl_n_u16): Likewise.
19579         (vmlsl_n_u32): Likewise.
19580
19581 2021-01-28  Jonathan Wright  <jonathan.wright@arm.com>
19582
19583         * config/aarch64/aarch64-simd-builtins.def: Add [su]mlal_n
19584         builtin generator macros.
19585         * config/aarch64/aarch64-simd.md (aarch64_<su>mlal_n<mode>):
19586         Define.
19587         * config/aarch64/arm_neon.h (vmlal_n_s16): Use RTL builtin
19588         instead of inline asm.
19589         (vmlal_n_s32): Likewise.
19590         (vmlal_n_u16): Likewise.
19591         (vmlal_n_u32): Likewise.
19592
19593 2021-01-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19594
19595         * config/aarch64/aarch64-simd-builtins.def (shrn2): Define
19596         builtin.
19597         * config/aarch64/aarch64-simd.md (aarch64_shrn2<mode>_insn_le):
19598         Define.
19599         (aarch64_shrn2<mode>_insn_be): Likewise.
19600         (aarch64_shrn2<mode>): Likewise.
19601         * config/aarch64/arm_neon.h (vshrn_high_n_s16): Reimlplement
19602         using builtins.
19603         (vshrn_high_n_s32): Likewise.
19604         (vshrn_high_n_s64): Likewise.
19605         (vshrn_high_n_u16): Likewise.
19606         (vshrn_high_n_u32): Likewise.
19607         (vshrn_high_n_u64): Likewise.
19608
19609 2021-01-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19610
19611         * config/aarch64/aarch64-simd-builtins.def (shrn): Define
19612         builtin.
19613         * config/aarch64/aarch64-simd.md (aarch64_shrn<mode>_insn_le):
19614         Define.
19615         (aarch64_shrn<mode>_insn_be): Likewise.
19616         (aarch64_shrn<mode>): Likewise.
19617         * config/aarch64/arm_neon.h (vshrn_n_s16): Reimplement using
19618         builtins.
19619         (vshrn_n_s32): Likewise.
19620         (vshrn_n_s64): Likewise.
19621         (vshrn_n_u16): Likewise.
19622         (vshrn_n_u32): Likewise.
19623         (vshrn_n_u64): Likewise.
19624         * config/aarch64/iterators.md (vn_mode): New mode attribute.
19625
19626 2021-01-28  Richard Biener  <rguenther@suse.de>
19627
19628         PR rtl-optimization/80960
19629         * dse.c (check_mem_read_rtx): Call get_addr on the
19630         offsetted address.
19631
19632 2021-01-28  Xionghu Luo  <luoxhu@linux.ibm.com>
19633             David Edelsohn  <dje.gcc@gmail.com>
19634
19635         PR target/98799
19636         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19637         Don't generate VIEW_CONVERT_EXPR for fcode ALTIVEC_BUILTIN_VEC_INSERT
19638         when -m32.
19639         * config/rs6000/rs6000-protos.h (rs6000_expand_vector_set_var):
19640         Delete.
19641         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Remove the
19642         wrapper call rs6000_expand_vector_set_var for cleanup.  Call
19643         rs6000_expand_vector_set_var_p9 and rs6000_expand_vector_set_var_p8
19644         directly.
19645         (rs6000_expand_vector_set_var): Delete.
19646         (rs6000_expand_vector_set_var_p9): Make static.
19647         (rs6000_expand_vector_set_var_p8): Make static.
19648
19649 2021-01-28  Xing GUO  <higuoxing@gmail.com>
19650
19651         * common/config/riscv/riscv-common.c
19652         (riscv_subset_list::parsing_subset_version): Fix -march option parsing
19653         when `p` extension exists.
19654
19655 2021-01-27  Vladimir N. Makarov  <vmakarov@redhat.com>
19656
19657         PR rtl-optimization/97684
19658         * ira.c (ira): Call ira_set_pseudo_classes before
19659         update_equiv_regs when it is necessary.
19660
19661 2021-01-27  Jakub Jelinek  <jakub@redhat.com>
19662
19663         PR target/98853
19664         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Use
19665         %w0, %w1 and %2 instead of %0, %1 and %2.
19666
19667 2021-01-27  Aaron Sawdey  <acsawdey@linux.ibm.com>
19668
19669         * config/rs6000/genfusion.pl: New script to generate
19670         define_insn_and_split patterns so combine can arrange fused
19671         instructions next to each other.
19672         * config/rs6000/fusion.md: New file, generated fused instruction
19673         patterns for combine.
19674         * config/rs6000/predicates.md (const_m1_to_1_operand): New predicate.
19675         (non_update_memory_operand): New predicate.
19676         * config/rs6000/rs6000-cpus.def: Add OPTION_MASK_P10_FUSION and
19677         OPTION_MASK_P10_FUSION_LD_CMPI to ISA_3_1_MASKS_SERVER and
19678         POWERPC_MASKS.
19679         * config/rs6000/rs6000-protos.h (address_is_non_pfx_d_or_x): Add
19680         prototype.
19681         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19682         Automatically set OPTION_MASK_P10_FUSION and
19683         OPTION_MASK_P10_FUSION_LD_CMPI if target is power10.
19684         (rs600_opt_masks): Allow -mpower10-fusion
19685         in function attributes.
19686         (address_is_non_pfx_d_or_x): New function.
19687         * config/rs6000/rs6000.h: Add MASK_P10_FUSION.
19688         * config/rs6000/rs6000.md: Include fusion.md.
19689         * config/rs6000/rs6000.opt: Add -mpower10-fusion
19690         and -mpower10-fusion-ld-cmpi.
19691         * config/rs6000/t-rs6000: Add dependencies involving fusion.md.
19692
19693 2021-01-27  Jonathan Wright  <jonathan.wright@arm.com>
19694
19695         * config/aarch64/aarch64-simd-builtins.def: Add [su]mlal
19696         builtin generator macros.
19697         * config/aarch64/aarch64-simd.md (*aarch64_<su>mlal<mode>):
19698         Rename to...
19699         (aarch64_<su>mlal<mode>): This.
19700         * config/aarch64/arm_neon.h (vmlal_s8): Use RTL builtin
19701         instead of inline asm.
19702         (vmlal_s16): Likewise.
19703         (vmlal_s32): Likewise.
19704         (vmlal_u8): Likewise.
19705         (vmlal_u16): Likewise.
19706         (vmlal_u32): Likewise.
19707
19708 2021-01-27  Richard Biener  <rguenther@suse.de>
19709
19710         PR tree-optimization/98854
19711         * tree-vect-slp.c (vect_build_slp_tree_2): Also build
19712         PHIs from scalars when the number of CTORs matches the
19713         number of children.
19714
19715 2021-01-27  Jonathan Wright  <jonathan.wright@arm.com>
19716
19717         * config/aarch64/aarch64-simd-builtins.def: Add mls_n builtin
19718         generator macro.
19719         * config/aarch64/aarch64-simd.md (*aarch64_mls_elt_merge<mode>):
19720         Rename to...
19721         (aarch64_mls_n<mode>): This.
19722         * config/aarch64/arm_neon.h (vmls_n_s16): Use RTL builtin
19723         instead of asm.
19724         (vmls_n_s32): Likewise.
19725         (vmls_n_u16): Likewise.
19726         (vmls_n_u32): Likewise.
19727         (vmlsq_n_s16): Likewise.
19728         (vmlsq_n_s32): Likewise.
19729         (vmlsq_n_u16): Likewise.
19730         (vmlsq_n_u32): Likewise.
19731
19732 2021-01-27  Jonathan Wright  <jonathan.wright@arm.com>
19733
19734         * config/aarch64/aarch64-simd-builtins.def: Add mls builtin
19735         generator macro.
19736         * config/aarch64/arm_neon.h (vmls_s8): Use RTL builtin rather
19737         than asm.
19738         (vmls_s16): Likewise.
19739         (vmls_s32): Likewise.
19740         (vmls_u8): Likewise.
19741         (vmls_u16): Likewise.
19742         (vmls_u32): Likewise.
19743         (vmlsq_s8): Likewise.
19744         (vmlsq_s16): Likewise.
19745         (vmlsq_s32): Likewise.
19746         (vmlsq_u8): Likewise.
19747         (vmlsq_u16): Likewise.
19748         (vmlsq_u32): Likewise.
19749
19750 2021-01-27  Jonathan Wright  <jonathan.wright@arm.com>
19751
19752         * config/aarch64/aarch64-simd-builtins.def: Add mla_n builtin
19753         generator macro.
19754         * config/aarch64/aarch64-simd.md (*aarch64_mla_elt_merge<mode>):
19755         Rename to...
19756         (aarch64_mla_n<mode>): This.
19757         * config/aarch64/arm_neon.h (vmla_n_s16): Use RTL builtin
19758         instead of asm.
19759         (vmla_n_s32): Likewise.
19760         (vmla_n_u16): Likewise.
19761         (vmla_n_u32): Likewise.
19762         (vmlaq_n_s16): Likewise.
19763         (vmlaq_n_s32): Likewise.
19764         (vmlaq_n_u16): Likewise.
19765         (vmlaq_n_u32): Likewise.
19766
19767 2021-01-27  liuhongt  <hongtao.liu@intel.com>
19768
19769         PR target/98833
19770         * config/i386/sse.md (sse2_gt<mode>3): Drop !TARGET_XOP in condition.
19771         (*sse2_eq<mode>3): Ditto.
19772
19773 2021-01-27  Jakub Jelinek  <jakub@redhat.com>
19774
19775         * tree-pass.h (PROP_trees): Rename to ...
19776         (PROP_gimple): ... this.
19777         * cfgexpand.c (pass_data_expand): Replace PROP_trees with PROP_gimple.
19778         * passes.c (execute_function_dump, execute_function_todo,
19779         execute_one_ipa_transform_pass, execute_one_pass): Likewise.
19780         * varpool.c (ctor_for_folding): Likewise.
19781
19782 2021-01-27  Jakub Jelinek  <jakub@redhat.com>
19783
19784         PR tree-optimization/97260
19785         * varpool.c: Include tree-pass.h.
19786         (ctor_for_folding): In GENERIC return DECL_INITIAL for TREE_READONLY
19787         non-TREE_SIDE_EFFECTS automatic variables.
19788
19789 2021-01-26  Paul Fee  <paul.f.fee@gmail.com>
19790
19791         * doc/cpp.texi (__cplusplus): Document value for -std=c++23
19792         or -std=gnu++23.
19793         * doc/invoke.texi: Document -std=c++23 and -std=gnu++23.
19794         * dwarf2out.c (highest_c_language): Recognise C++20 and C++23.
19795         (gen_compile_unit_die): Recognise C++23.
19796
19797 2021-01-26  Jakub Jelinek  <jakub@redhat.com>
19798
19799         PR bootstrap/98839
19800         * dwarf2asm.c (dw2_assemble_integer): Cast DWARF2_ADDR_SIZE to int
19801         in comparison.
19802
19803 2021-01-26  Jakub Jelinek  <jakub@redhat.com>
19804
19805         PR target/98681
19806         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
19807         Use UINTVAL (shft_amnt) and UINTVAL (mask) instead of INTVAL (shft_amnt)
19808         and INTVAL (mask).  Add && INTVAL (mask) > 0 condition.
19809
19810 2021-01-26  Richard Biener  <rguenther@suse.de>
19811
19812         * gimple-pretty-print.c (dump_binary_rhs): Handle
19813         VEC_WIDEN_{PLUS,MINUS}_{LO,HI}_EXPR.
19814
19815 2021-01-26  Richard Biener  <rguenther@suse.de>
19816
19817         PR middle-end/98726
19818         * tree.h (vector_cst_int_elt): Remove.
19819         * tree.c (vector_cst_int_elt): Use poly_wide_int for computations,
19820         make static.
19821
19822 2021-01-26  Andrew Stubbs  <ams@codesourcery.com>
19823
19824         * config/gcn/gcn.c (gcn_expand_reduc_scalar): Use move instructions
19825         for V64DFmode min/max reductions.
19826
19827 2021-01-26  Jakub Jelinek  <jakub@redhat.com>
19828
19829         * dwarf2asm.c (dw2_assemble_integer): Handle size twice as large
19830         as DWARF2_ADDR_SIZE if x is not a scalar int by emitting it as
19831         two halves, one with x and the other with const0_rtx, ordered
19832         depending on endianity.
19833
19834 2021-01-26  Alexandre Oliva  <oliva@adacore.com>
19835
19836         * gimplify.c (gimplify_decl_expr): Skip asan marking calls for
19837         temporaries not seen in binding block, and not about to be
19838         added as gimple variables.
19839
19840 2021-01-25  Martin Sebor  <msebor@redhat.com>
19841
19842         PR c++/98646
19843         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust warning text.
19844
19845 2021-01-25  Martin Liska  <mliska@suse.cz>
19846
19847         * value-prof.c (get_nth_most_common_value): Use %s instead
19848         of %qs string.
19849
19850 2021-01-25  Jakub Jelinek  <jakub@redhat.com>
19851
19852         PR debug/98811
19853         * configure.ac (HAVE_AS_GDWARF_5_DEBUG_FLAG): Only define if
19854         readelf -wi is able to read the emitted .debug_info back.
19855         * configure: Regenerated.
19856
19857 2021-01-25  Martin Liska  <mliska@suse.cz>
19858
19859         PR gcov-profile/98739
19860         * common.opt: Add missing sign symbol.
19861         * value-prof.c (get_nth_most_common_value): Restore handling
19862         of PROFILE_REPRODUCIBILITY_PARALLEL_RUNS and
19863         PROFILE_REPRODUCIBILITY_MULTITHREADED.
19864
19865 2021-01-25  Richard Biener  <rguenther@suse.de>
19866
19867         PR middle-end/98807
19868         * tree.c (vector_element_bits): Always use precision of
19869         the element type for boolean vectors.
19870
19871 2021-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19872
19873         * config/rtems.h (STARTFILE_SPEC): Remove qnolinkcmds.
19874         (ENDFILE_SPEC): Evaluate qnolinkcmds.
19875
19876 2021-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19877
19878         * config/rtems.h (STARTFILE_SPEC): Remove nostdlib and
19879         nostartfiles handling since this is already done by
19880         LINK_COMMAND_SPEC.  Evaluate qnolinkcmds.
19881         (ENDFILE_SPEC): Remove nostdlib and nostartfiles handling since this
19882         is already done by LINK_COMMAND_SPEC.
19883         (LIB_SPECS): Remove nostdlib and nodefaultlibs handling since
19884         this is already done by LINK_COMMAND_SPEC.  Remove qnolinkcmds
19885         evaluation.
19886
19887 2021-01-25  Jakub Jelinek  <jakub@redhat.com>
19888
19889         PR testsuite/98771
19890         * fold-const-call.c (host_size_t_cst_p): Renamed to ...
19891         (size_t_cst_p): ... this.  Check and store unsigned HOST_WIDE_INT
19892         value rather than host size_t.
19893         (fold_const_call): Change type of s2 from size_t to
19894         unsigned HOST_WIDE_INT.  Use size_t_cst_p instead of
19895         host_size_t_cst_p.  For strncmp calls, pass MIN (s2, SIZE_MAX)
19896         instead of s2 as last argument.
19897
19898 2021-01-25  Tamar Christina  <tamar.christina@arm.com>
19899
19900         * config/arm/iterators.md (rotsplit1, rotsplit2, conj_op, fcmac1,
19901         VCMLA_OP, VCMUL_OP): New.
19902         * config/arm/mve.md (mve_vcmlaq<mve_rot><mode>): Support vec_dup 0.
19903         * config/arm/neon.md (cmul<conj_op><mode>3): New.
19904         * config/arm/unspecs.md (UNSPEC_VCMLA_CONJ, UNSPEC_VCMLA180_CONJ,
19905         UNSPEC_VCMUL_CONJ): New.
19906         * config/arm/vec-common.md (cmul<conj_op><mode>3, arm_vcmla<rot><mode>,
19907         cml<fcmac1><conj_op><mode>4): New.
19908
19909 2021-01-23  Jakub Jelinek  <jakub@redhat.com>
19910
19911         PR testsuite/97301
19912         * config/rs6000/mmintrin.h (__m64): Add __may_alias__ attribute.
19913
19914 2021-01-22  Jonathan Wright  <jonathan.wright@arm.com>
19915
19916         * config/aarch64/aarch64-simd-builtins.def: Add mla builtin
19917         generator macro.
19918         * config/aarch64/arm_neon.h (vmla_s8): Use RTL builtin rather
19919         than asm.
19920         (vmla_s16): Likewise.
19921         (vmla_s32): Likewise.
19922         (vmla_u8): Likewise.
19923         (vmla_u16): Likewise.
19924         (vmla_u32): Likewise.
19925         (vmlaq_s8): Likewise.
19926         (vmlaq_s16): Likewise.
19927         (vmlaq_s32): Likewise.
19928         (vmlaq_u8): Likewise.
19929         (vmlaq_u16): Likewise.
19930         (vmlaq_u32): Likewise.
19931
19932 2021-01-22  David Malcolm  <dmalcolm@redhat.com>
19933
19934         * doc/invoke.texi (GCC_EXTRA_DIAGNOSTIC_OUTPUT): Add @findex
19935         directive.
19936
19937 2021-01-22  Jakub Jelinek  <jakub@redhat.com>
19938
19939         PR debug/98796
19940         * dwarf2out.c (output_file_names): For -gdwarf-5, if there are no
19941         filenames to emit, still emit the required 0 index directory and
19942         filename entries that match DW_AT_comp_dir and DW_AT_name of the
19943         compilation unit.
19944
19945 2021-01-22  Marek Polacek  <polacek@redhat.com>
19946
19947         PR c++/98545
19948         * doc/invoke.texi: Update C++ ABI Version 15 description.
19949
19950 2021-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19951
19952         PR tree-optimization/98766
19953         * tree-ssa-math-opts.c (convert_mult_to_fma): Use maybe_le when
19954         comparing against type size with param_avoid_fma_max_bits.
19955
19956 2021-01-22  Richard Biener  <rguenther@suse.de>
19957
19958         PR middle-end/98793
19959         * tree.c (vector_element_bits): Key single-bit bool vector on
19960         integer mode rather than not vector mode.
19961
19962 2021-01-22  Xionghu Luo  <luoxhu@linux.ibm.com>
19963
19964         PR target/98093
19965         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19966         Generate ARRAY_REF(VIEW_CONVERT_EXPR) for P8 and later
19967         platforms.
19968         * config/rs6000/rs6000.c (rs6000_expand_vector_set_var): Update
19969         to call different path for P8 and P9.
19970         (rs6000_expand_vector_set_var_p9): New function.
19971         (rs6000_expand_vector_set_var_p8): New function.
19972
19973 2021-01-22  Xionghu Luo  <luoxhu@linux.ibm.com>
19974
19975         PR target/79251
19976         PR target/98065
19977         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19978         Ajdust variable index vec_insert from address dereference to
19979         ARRAY_REF(VIEW_CONVERT_EXPR) tree expression.
19980         * config/rs6000/rs6000-protos.h (rs6000_expand_vector_set_var):
19981         New declaration.
19982         * config/rs6000/rs6000.c (rs6000_expand_vector_set_var): New function.
19983
19984 2021-01-22  Martin Liska  <mliska@suse.cz>
19985
19986         PR gcov-profile/98739
19987         * profile.c (compute_value_histograms): Drop time profile for
19988         -fprofile-reproducible=multithreaded.
19989
19990 2021-01-22  Nathan Sidwell  <nathan@acm.org>
19991
19992         * gcc.c (process_command): Don't check OPT_SPECIAL_input_file
19993         existence here.
19994
19995 2021-01-22  Richard Biener  <rguenther@suse.de>
19996
19997         PR middle-end/98773
19998         * tree-data-ref.c (initalize_matrix_A): Revert previous
19999         change, retaining failing on HOST_WIDE_INT_MIN CHREC_RIGHT.
20000
20001 2021-01-22  Jakub Jelinek  <jakub@redhat.com>
20002
20003         PR tree-optimization/90248
20004         * match.pd (X cmp 0.0 ? 1.0 : -1.0 -> copysign(1, +-X),
20005         X cmp 0.0 ? -1.0 : +1.0 -> copysign(1, -+X)): Remove
20006         simplifications.
20007         (X * (X cmp 0.0 ? 1.0 : -1.0) -> +-abs(X),
20008         X * (X cmp 0.0 ? -1.0 : 1.0) -> +-abs(X)): New simplifications.
20009
20010 2021-01-22  Jakub Jelinek  <jakub@redhat.com>
20011
20012         PR tree-optimization/98255
20013         * tree-dfa.c (get_ref_base_and_extent): For ARRAY_REFs, sign
20014         extend index - low_bound from sizetype's precision rather than index
20015         precision.
20016         (get_addr_base_and_unit_offset_1): Likewise.
20017         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Likewise.
20018         * gimple-fold.c (fold_const_aggregate_ref_1): Likewise.
20019
20020 2021-01-22  Richard Biener  <rguenther@suse.de>
20021
20022         PR tree-optimization/98786
20023         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Avoid
20024         adding new uses of abnormals.  Verify we deal with a conditional
20025         conversion.
20026
20027 2021-01-22  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20028
20029         PR target/98636
20030         * optc-save-gen.awk: Add arm_fp16_format to checked_options.
20031
20032 2021-01-22  liuhongt  <hongtao.liu@intel.com>
20033
20034         PR target/96891
20035         PR target/98348
20036         * config/i386/sse.md (VI_128_256): New mode iterator.
20037         (*avx_cmp<mode>3_1, *avx_cmp<mode>3_2, *avx_cmp<mode>3_3,
20038          *avx_cmp<mode>3_4, *avx2_eq<mode>3, *avx2_pcmp<mode>3_1,
20039          *avx2_pcmp<mode>3_2, *avx2_gt<mode>3): New
20040         define_insn_and_split to lower avx512 vector comparison to avx
20041         version when dest is vector.
20042         (*<avx512>_cmp<mode>3,*<avx512>_cmp<mode>3,*<avx512>_ucmp<mode>3):
20043         define_insn_and_split for negating the comparison result.
20044         * config/i386/predicates.md (float_vector_all_ones_operand):
20045         New predicate.
20046         * config/i386/i386-expand.c (ix86_expand_sse_movcc): Use
20047         general NOT operator without UNSPEC_MASKOP.
20048
20049 2021-01-21  Vladimir N. Makarov  <vmakarov@redhat.com>
20050
20051         PR rtl-optimization/98777
20052         * lra-int.h (lra_pmode_pseudo): New extern.
20053         * lra.c (lra_pmode_pseudo): New global.
20054         (lra): Set it up.
20055         * lra-eliminations.c (eliminate_regs_in_insn): Use it.
20056
20057 2021-01-21  Ilya Leoshkevich  <iii@linux.ibm.com>
20058
20059         * fwprop.c (fwprop_propagation::classify_result): Allow
20060         (subreg (mem)) simplifications.
20061
20062 2021-01-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20063
20064         * config/aarch64/aarch64-simd.md (aarch64_sqdml<SBINQOPS:as>l<mode>):
20065         Split into...
20066         (aarch64_sqdmlal<mode>): ... This...
20067         (aarch64_sqdmlsl<mode>): ... And this.
20068         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Split into...
20069         (aarch64_sqdmlal_lane<mode>): ... This...
20070         (aarch64_sqdmlsl_lane<mode>): ... And this.
20071         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Split into...
20072         (aarch64_sqdmlsl_laneq<mode>): ... This...
20073         (aarch64_sqdmlal_laneq<mode>):  ... And this.
20074         (aarch64_sqdml<SBINQOPS:as>l_n<mode>): Split into...
20075         (aarch64_sqdmlsl_n<mode>): ... This...
20076         (aarch64_sqdmlal_n<mode>): ... And this.
20077         (aarch64_sqdml<SBINQOPS:as>l2<mode>_internal): Split into...
20078         (aarch64_sqdmlal2<mode>_internal): ... This...
20079         (aarch64_sqdmlsl2<mode>_internal): ... And this.
20080
20081 2021-01-21  Christophe Lyon  <christophe.lyon@linaro.org>
20082
20083         * config/arm/arm_mve.h (__arm_vcmpneq_s8): Fix return type.
20084
20085 2021-01-21  Andrea Corallo  <andrea.corallo@arm.com>
20086
20087         PR target/96372
20088         * doc/sourcebuild.texi (arm_thumb2_no_arm_v8_1_lob): Document.
20089
20090 2021-01-21  liuhongt  <hongtao.liu@intel.com>
20091
20092         PR rtl-optimization/98694
20093         * regcprop.c (copy_value): If SRC had been assigned a mode
20094         narrower than the copy, we can't link DEST into the chain even
20095         they have same hard_regno_nregs(i.e. HImode/SImode in i386
20096         backend).
20097
20098 2021-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20099
20100         * config/aarch64/aarch64-simd.md (aarch64_get_lane<mode>):
20101         Convert to define_insn_and_split.  Split into simple move when moving
20102         bottom element.
20103
20104 2021-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
20105
20106         * config/rs6000/rs6000.c (rs6000_emit_le_vsx_store): Change assert.
20107         Adjust comment.  Simplify code.
20108
20109 2021-01-20  Jakub Jelinek  <jakub@redhat.com>
20110
20111         PR debug/98765
20112         * dwarf2out.c (reset_indirect_string): Also reset indirect strings
20113         with DW_FORM_line_strp form.
20114         (prune_unused_types_update_strings): Don't add into debug_str_hash
20115         indirect strings with DW_FORM_line_strp form.
20116         (adjust_name_comp_dir): New function.
20117         (dwarf2out_finish): Call it on CU DIEs after resetting
20118         debug_line_str_hash.
20119
20120 2021-01-20  Vladimir N. Makarov  <vmakarov@redhat.com>
20121
20122         PR rtl-optimization/98722
20123         * lra-eliminations.c (eliminate_regs_in_insn): Check that target
20124         has no 3-op add insn to transform insns containing two pluses.
20125
20126 2021-01-20  Richard Biener  <rguenther@suse.de>
20127
20128         * hwint.h (add_hwi): New function.
20129         (mul_hwi): Likewise.
20130         * tree-data-ref.c (initialize_matrix_A): Properly translate
20131         tree constants and avoid HOST_WIDE_INT_MIN.
20132         (lambda_matrix_row_add): Avoid undefined integer overflow
20133         and return true on such overflow.
20134         (lambda_matrix_right_hermite): Handle overflow from
20135         lambda_matrix_row_add gracefully.  Simplify previous fix.
20136         (analyze_subscript_affine_affine): Likewise.
20137
20138 2021-01-20  Eugene Rozenfeld  <erozen@microsoft.com>
20139
20140         PR tree-optimization/96674
20141         * match.pd: New patterns: x < y || y == XXX_MIN --> x <= y - 1
20142         x >= y && y != XXX_MIN --> x > y - 1
20143
20144 2021-01-20  Richard Sandiford  <richard.sandiford@arm.com>
20145
20146         PR tree-optimization/98535
20147         * tree-vect-slp.c (duplicate_and_interleave): Use quick_grow_cleared.
20148         If the high and low permutes are the same, remove the high permutes
20149         from the working set and only continue with the low ones.
20150
20151 2021-01-20  Jakub Jelinek  <jakub@redhat.com>
20152
20153         PR tree-optimization/98721
20154         * builtins.c (access_ref::inform_access): Don't assume
20155         SSA_NAME_IDENTIFIER must be non-NULL.  Print messages about
20156         object whenever allocfn is NULL, rather than only when DECL_P
20157         is true.  Use %qE instead of %qD for that.  Formatting fixes.
20158
20159 2021-01-20  Richard Biener  <rguenther@suse.de>
20160
20161         PR tree-optimization/98758
20162         * tree-data-ref.c (int_divides_p): Use lambda_int arguments.
20163         (lambda_matrix_right_hermite): Avoid undefinedness with
20164         signed integer abs and multiplication.
20165         (analyze_subscript_affine_affine): Use lambda_int.
20166
20167 2021-01-20  David Malcolm  <dmalcolm@redhat.com>
20168
20169         PR debug/98751
20170         * dwarf2out.c (output_line_info): Rename static variable
20171         "generation", moving it out of the function to...
20172         (output_line_info_generation): New.
20173         (init_sections_and_labels): Likewise, renaming the variable to...
20174         (init_sections_and_labels_generation): New.
20175         (dwarf2out_c_finalize): Reset the new variables.
20176
20177 2021-01-19  Martin Sebor  <msebor@redhat.com>
20178
20179         PR middle-end/98664
20180         * tree-ssa-live.c (remove_unused_scope_block_p): Keep scopes for
20181         all functions, even if they're not declared artificial or inline.
20182         * tree.c (tree_inlined_location): Use macro expansion location
20183         only if scope traversal fails to expose one.
20184
20185 2021-01-19  Richard Sandiford  <richard.sandiford@arm.com>
20186
20187         PR rtl-optimization/92294
20188         * alias.c (compare_base_symbol_refs): Take an extra parameter
20189         and add the distance between two symbols to it.  Enshrine in
20190         comments that -1 means "either 0 or 1, but we can't tell
20191         which at compile time".
20192         (memrefs_conflict_p): Update call accordingly.
20193         (rtx_equal_for_memref_p): Likewise.  Take the distance between symbols
20194         into account.
20195
20196 2021-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20197
20198         * config/aarch64/aarch64-simd-builtins.def (sqshl, uqshl,
20199         sqrshl, uqrshl, sqadd, uqadd, sqsub, uqsub, suqadd, usqadd, sqmovn,
20200         uqmovn, sqxtn2, uqxtn2, sqabs, sqneg, sqdmlal, sqdmlsl, sqdmlal_lane,
20201         sqdmlsl_lane, sqdmlal_laneq, sqdmlsl_laneq, sqdmlal_n, sqdmlsl_n,
20202         sqdmlal2, sqdmlsl2, sqdmlal2_lane, sqdmlsl2_lane, sqdmlal2_laneq,
20203         sqdmlsl2_laneq, sqdmlal2_n, sqdmlsl2_n, sqdmull, sqdmull_lane,
20204         sqdmull_laneq, sqdmull_n, sqdmull2, sqdmull2_lane, sqdmull2_laneq,
20205         sqdmull2_n, sqdmulh, sqrdmulh, sqdmulh_lane, sqdmulh_laneq,
20206         sqrdmulh_lane, sqrdmulh_laneq, sqshrun_n, sqrshrun_n, sqshrn_n,
20207         uqshrn_n, sqrshrn_n, uqrshrn_n, sqshlu_n, sqshl_n, uqshl_n, sqrdmlah,
20208         sqrdmlsh, sqrdmlah_lane, sqrdmlsh_lane, sqrdmlah_laneq, sqrdmlsh_laneq,
20209         sqmovun): Use NONE flags.
20210
20211 2021-01-19  Richard Biener  <rguenther@suse.de>
20212
20213         PR ipa/98330
20214         * ipa-modref.c (analyze_stmt): Only record a summary for a
20215         direct call.
20216
20217 2021-01-19  Richard Biener  <rguenther@suse.de>
20218
20219         PR middle-end/98638
20220         * tree-ssanames.c (fini_ssanames): Zero SSA_NAME_DEF_STMT.
20221
20222 2021-01-19  Daniel Hellstrom  <daniel@gaisler.com>
20223
20224         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
20225         built-in define __FIX_LEON3FT_TN0018.
20226
20227 2021-01-19  Richard Biener  <rguenther@suse.de>
20228
20229         PR ipa/97673
20230         * tree-inline.c (tree_function_versioning): Set input_location
20231         to UNKNOWN_LOCATION throughout the function.
20232
20233 2021-01-19  Tobias Burnus  <tobias@codesourcery.com>
20234
20235         PR fortran/98476
20236         * omp-low.c (lower_omp_target): Handle nonpointer is_device_ptr.
20237
20238 2021-01-19  Martin Jambor  <mjambor@suse.cz>
20239
20240         PR ipa/98690
20241         * ipa-sra.c (ssa_name_only_returned_p): New parameter fun.  Check
20242         whether non-call exceptions allow removal of a statement.
20243         (isra_analyze_call): Pass the appropriate function to
20244         ssa_name_only_returned_p.
20245
20246 2021-01-19  Geng Qi  <gengqi@linux.alibaba.com>
20247
20248         * config/riscv/arch-canonicalize (longext_sort): New function for
20249          sorting 'multi-letter'.
20250         * config/riscv/multilib-generator: Adjusting the loop of 'alt' in
20251         'alts'. The 'arch' may not be the first of 'alts'.
20252         (_expand_combination): Add underline for the 'ext' without '*'.
20253         This is because, a single-letter extension can always be treated well
20254         with a '_' prefix, but it cannot be separated out if it is appended
20255         to a multi-letter.
20256
20257 2021-01-18  Vladimir N. Makarov  <vmakarov@redhat.com>
20258
20259         PR target/97847
20260         * ira.c (ira): Skip abnormal critical edge splitting.
20261
20262 2021-01-18  Jakub Jelinek  <jakub@redhat.com>
20263
20264         PR tree-optimization/98727
20265         * tree-ssa-math-opts.c (match_arith_overflow): Fix up computation of
20266         second .MUL_OVERFLOW operand for signed multiplication with overflow
20267         checking if the second operand of multiplication is not constant.
20268
20269 2021-01-18  David Edelsohn  <dje.gcc@gmail.com>
20270
20271         * doc/invoke.texi (-gdwarf): TPF defaults to version 2 and AIX
20272         defaults to version 4.
20273
20274 2021-01-18  David Malcolm  <dmalcolm@redhat.com>
20275
20276         * attribs.h (fndecl_dealloc_argno): New decl.
20277         * builtins.c (call_dealloc_argno): Split out second half of
20278         function into...
20279         (fndecl_dealloc_argno): New.
20280         * doc/extend.texi (Common Function Attributes): Document the
20281         interaction between the analyzer and the malloc attribute.
20282         * doc/invoke.texi (Static Analyzer Options): Likewise.
20283
20284 2021-01-17  David Edelsohn  <dje.gcc@gmail.com>
20285
20286         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Override
20287         dwarf_version to 4.
20288         * config/rs6000/aix72.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
20289
20290 2021-01-17  Martin Jambor  <mjambor@suse.cz>
20291
20292         PR ipa/98222
20293         * cgraph.c (clone_of_p): Check also former_clone_of as we climb
20294         the clone tree.
20295
20296 2021-01-17  Mark Wielaard  <mark@klomp.org>
20297
20298         * common.opt (gdwarf-): Init(5).
20299         * doc/invoke.texi (-gdwarf): Document default to 5.
20300
20301 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
20302
20303         * builtin-types.def
20304         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
20305         to...
20306         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
20307         ...this.  Add extra argument.
20308         * gimplify.c (omp_default_clause): Ensure that event handle is
20309         firstprivate in a task region.
20310         (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_DETACH.
20311         (gimplify_adjust_omp_clauses): Likewise.
20312         * omp-builtins.def (BUILT_IN_GOMP_TASK): Change function type to
20313         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR.
20314         * omp-expand.c (expand_task_call): Add GOMP_TASK_FLAG_DETACH to flags
20315         if detach clause specified.  Add detach argument when generating
20316         call to GOMP_task.
20317         * omp-low.c (scan_sharing_clauses): Setup data environment for detach
20318         clause.
20319         (finish_taskreg_scan): Move field for variable containing the event
20320         handle to the front of the struct.
20321         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_DETACH.  Fix
20322         ordering.
20323         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
20324         OMP_CLAUSE_DETACH clause.
20325         (convert_local_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
20326         * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_DETACH.
20327         * tree.c (omp_clause_num_ops): Add entry for OMP_CLAUSE_DETACH.
20328         Fix ordering.
20329         (omp_clause_code_name): Add entry for OMP_CLAUSE_DETACH.  Fix
20330         ordering.
20331         (walk_tree_1): Handle OMP_CLAUSE_DETACH.
20332
20333 2021-01-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20334
20335         * config/nios2/t-rtems: Reset all MULTILIB_* variables.  Shorten
20336         multilib directory names.  Use MULTILIB_REQUIRED instead of
20337         MULTILIB_EXCEPTIONS.  Add -mhw-mul -mhw-mulx -mhw-div
20338         -mcustom-fpu-cfg=fph2 multilib.
20339
20340 2021-01-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20341
20342         * config/nios2/nios2.c (NIOS2_FPU_CONFIG_NUM): Adjust value.
20343         (nios2_init_fpu_configs): Provide register values for new
20344         -mcustom-fpu-cfg=fph2 option variant.
20345         * doc/invoke.texi (-mcustom-fpu-cfg=fph2): Document new option
20346         variant.
20347
20348 2021-01-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20349
20350         * config/nios2/nios2.c (nios2_custom_check_insns): Remove
20351         custom instruction warnings.
20352
20353 2021-01-16  Jakub Jelinek  <jakub@redhat.com>
20354
20355         PR tree-optimization/96669
20356         * match.pd ((CST << x) & 1 -> x == 0): New simplification.
20357
20358 2021-01-16  Jakub Jelinek  <jakub@redhat.com>
20359
20360         PR tree-optimization/96271
20361         * passes.def: Pass false argument to first two pass_cd_dce
20362         instances and true to last instance.  Add comment that
20363         last instance rewrites no longer addressed locals.
20364         * tree-ssa-dce.c (pass_cd_dce): Add update_address_taken_p member and
20365         initialize it.
20366         (pass_cd_dce::set_pass_param): New method.
20367         (pass_cd_dce::execute): Return TODO_update_address_taken from
20368         last cd_dce instance.
20369
20370 2021-01-15  Carl Love  <cel@us.ibm.com>
20371
20372         * config/rs6000/altivec.h (vec_mulh, vec_div, vec_dive, vec_mod):
20373         New defines.
20374         * config/rs6000/altivec.md (VIlong): Move define to file vsx.md.
20375         * config/rs6000/rs6000-builtin.def (DIVES_V4SI, DIVES_V2DI,
20376         DIVEU_V4SI, DIVEU_V2DI, DIVS_V4SI, DIVS_V2DI, DIVU_V4SI,
20377         DIVU_V2DI, MODS_V2DI, MODS_V4SI, MODU_V2DI, MODU_V4SI,
20378         MULHS_V2DI, MULHS_V4SI, MULHU_V2DI, MULHU_V4SI, MULLD_V2DI):
20379         Add builtin define.
20380         (MULH, DIVE, MOD):  Add new BU_P10_OVERLOAD_2 definitions.
20381         * config/rs6000/rs6000-call.c (VSX_BUILTIN_VEC_DIV,
20382         VSX_BUILTIN_VEC_DIVE, P10_BUILTIN_VEC_MOD, P10_BUILTIN_VEC_MULH):
20383         New overloaded definitions.
20384         (builtin_function_type) [P10V_BUILTIN_DIVEU_V4SI,
20385         P10V_BUILTIN_DIVEU_V2DI, P10V_BUILTIN_DIVU_V4SI,
20386         P10V_BUILTIN_DIVU_V2DI, P10V_BUILTIN_MODU_V2DI,
20387         P10V_BUILTIN_MODU_V4SI, P10V_BUILTIN_MULHU_V2DI,
20388         P10V_BUILTIN_MULHU_V4SI]: Add case
20389         statement for builtins.
20390         * config/rs6000/rs6000.md (bits): Add new attribute sizes V4SI, V2DI.
20391         * config/rs6000/vsx.md (VIlong): Moved from config/rs6000/altivec.md.
20392         (UNSPEC_VDIVES, UNSPEC_VDIVEU): New unspec definitions.
20393         (vsx_mul_v2di): Add if TARGET_POWER10 statement.
20394         (vsx_udiv_v2di): Add if TARGET_POWER10 statement.
20395         (dives_<mode>, diveu_<mode>, div<mode>3, uvdiv<mode>3,
20396         mods_<mode>, modu_<mode>, mulhs_<mode>, mulhu_<mode>, mulv2di3):
20397         Add define_insn, mode is VIlong.
20398         * doc/extend.texi (vec_mulh, vec_mul, vec_div, vec_dive, vec_mod):
20399         Add builtin descriptions.
20400
20401 2021-01-15  Eric Botcazou  <ebotcazou@adacore.com>
20402
20403         * final.c (final_start_function_1): Reset force_source_line.
20404
20405 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
20406
20407         PR tree-optimization/96669
20408         * match.pd (((1 << A) & 1) != 0 -> A == 0,
20409         ((1 << A) & 1) == 0 -> A != 0): Generalize for 1s replaced by
20410         possibly different power of two constants and to right shift too.
20411
20412 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
20413
20414         PR tree-optimization/96681
20415         * match.pd ((x < 0) ^ (y < 0) to (x ^ y) < 0): New simplification.
20416         ((x >= 0) ^ (y >= 0) to (x ^ y) < 0): Likewise.
20417         ((x < 0) ^ (y >= 0) to (x ^ y) >= 0): Likewise.
20418         ((x >= 0) ^ (y < 0) to (x ^ y) >= 0): Likewise.
20419
20420 2021-01-15  Alexandre Oliva  <oliva@adacore.com>
20421
20422         * opts.c (gen_command_line_string): Exclude -dumpbase-ext.
20423
20424 2021-01-15  Tamar Christina  <tamar.christina@arm.com>
20425
20426         * config/aarch64/aarch64-simd.md (cml<fcmac1><conj_op><mode>4,
20427         cmul<conj_op><mode>3): New.
20428         * config/aarch64/iterators.md (UNSPEC_FCMUL,
20429         UNSPEC_FCMUL180, UNSPEC_FCMLA_CONJ, UNSPEC_FCMLA180_CONJ,
20430         UNSPEC_CMLA_CONJ, UNSPEC_CMLA180_CONJ, UNSPEC_CMUL, UNSPEC_CMUL180,
20431         FCMLA_OP, FCMUL_OP, conj_op, rotsplit1, rotsplit2, fcmac1, sve_rot1,
20432         sve_rot2, SVE2_INT_CMLA_OP, SVE2_INT_CMUL_OP, SVE2_INT_CADD_OP): New.
20433         (rot): Add UNSPEC_FCMUL, UNSPEC_FCMUL180.
20434         (rot_op): Renamed to conj_op.
20435         * config/aarch64/aarch64-sve.md (cml<fcmac1><conj_op><mode>4,
20436         cmul<conj_op><mode>3): New.
20437         * config/aarch64/aarch64-sve2.md (cml<fcmac1><conj_op><mode>4,
20438         cmul<conj_op><mode>3): New.
20439
20440 2021-01-15  David Malcolm  <dmalcolm@redhat.com>
20441
20442         PR bootstrap/98696
20443         * diagnostic.c
20444         (selftest::test_print_parseable_fixits_bytes_vs_display_columns):
20445         Escape the tempfile name when constructing the expected output.
20446
20447 2021-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20448
20449         * config/aarch64/aarch64-simd.md (*aarch64_<su>mlsl_hi<mode>):
20450         Rename to...
20451         (aarch64_<su>mlsl_hi<mode>): ... This.
20452         (aarch64_<su>mlsl_hi<mode>): Define.
20453         (*aarch64_<su>mlsl<mode): Rename to...
20454         (aarch64_<su>mlsl<mode): ... This.
20455         * config/aarch64/aarch64-simd-builtins.def (smlsl, umlsl,
20456         smlsl_hi, umlsl_hi): Define builtins.
20457         * config/aarch64/arm_neon.h (vmlsl_high_s8, vmlsl_high_s16,
20458         vmlsl_high_s32, vmlsl_high_u8, vmlsl_high_u16, vmlsl_high_u32,
20459         vmlsl_s8, vmlsl_s16, vmlsl_s32, vmlsl_u8,
20460         vmlsl_u16, vmlsl_u32): Reimplement with builtins.
20461
20462 2021-01-15  Uroš Bizjak  <ubizjak@gmail.com>
20463
20464         * config/i386/i386-c.c (ix86_target_macros):
20465         Use cpp_define_formatted for __SIZEOF_FLOAT80__ definition.
20466
20467 2021-01-15  Richard Sandiford  <richard.sandiford@arm.com>
20468
20469         PR target/88836
20470         * config.gcc (aarch64*-*-*): Add aarch64-cc-fusion.o to extra_objs.
20471         * Makefile.in (RTL_SSA_H): New variable.
20472         * config/aarch64/t-aarch64 (aarch64-cc-fusion.o): New rule.
20473         * config/aarch64/aarch64-protos.h (make_pass_cc_fusion): Declare.
20474         * config/aarch64/aarch64-passes.def: Add pass_cc_fusion after
20475         pass_combine.
20476         * config/aarch64/aarch64-cc-fusion.cc: New file.
20477
20478 2021-01-15  Richard Sandiford  <richard.sandiford@arm.com>
20479
20480         * recog.h (insn_change_watermark::~insn_change_watermark): Avoid
20481         calling cancel_changes for changes that no longer exist.
20482
20483 2021-01-15  Richard Sandiford  <richard.sandiford@arm.com>
20484
20485         * rtl-ssa/functions.h (function_info::ref_defs): Rename to...
20486         (function_info::reg_defs): ...this.
20487         * rtl-ssa/member-fns.inl (function_info::ref_defs): Rename to...
20488         (function_info::reg_defs): ...this.
20489
20490 2021-01-15  Christophe Lyon  <christophe.lyon@linaro.org>
20491
20492         PR target/71233
20493         * config/arm/arm_neon.h (vceqz_p64, vceqq_p64, vceqzq_p64): New.
20494
20495 2021-01-15  Christophe Lyon  <christophe.lyon@linaro.org>
20496
20497         Revert:
20498         2021-01-15  Christophe Lyon  <christophe.lyon@linaro.org>
20499
20500         PR target/71233
20501         * config/arm/arm_neon.h (vceqz_p64, vceqq_p64, vceqzq_p64): New.
20502
20503 2021-01-15  Richard Biener  <rguenther@suse.de>
20504
20505         PR tree-optimization/96376
20506         * tree-vect-stmts.c (get_load_store_type): Disregard alignment
20507         for VMAT_INVARIANT.
20508
20509 2021-01-15  Martin Liska  <mliska@suse.cz>
20510
20511         * doc/install.texi: Document that some tests need pytest module.
20512         * doc/sourcebuild.texi: Likewise.
20513
20514 2021-01-15  Christophe Lyon  <christophe.lyon@linaro.org>
20515
20516         PR target/71233
20517         * config/arm/arm_neon.h (vceqz_p64, vceqq_p64, vceqzq_p64): New.
20518
20519 2021-01-15  Christophe Lyon  <christophe.lyon@linaro.org>
20520
20521         * config/arm/mve.md (mve_vshrq_n_s<mode>_imm): New entry.
20522         (mve_vshrq_n_u<mode>_imm): Likewise.
20523         * config/arm/neon.md (vashr<mode>3, vlshr<mode>3): Move to ...
20524         * config/arm/vec-common.md: ... here.
20525
20526 2021-01-15  Christophe Lyon  <christophe.lyon@linaro.org>
20527
20528         * config/arm/mve.md (mve_vshlq_<supf><mode>): Move to
20529         vec-commond.md.
20530         * config/arm/neon.md (vashl<mode>3): Delete.
20531         * config/arm/vec-common.md (mve_vshlq_<supf><mode>): New.
20532         (vasl<mode>3): New expander.
20533
20534 2021-01-15  Richard Biener  <rguenther@suse.de>
20535
20536         PR tree-optimization/98685
20537         * tree-vect-slp.c (vect_schedule_slp_node): Refactor handling
20538         of vector extern defs.
20539
20540 2021-01-14  David Malcolm  <dmalcolm@redhat.com>
20541
20542         PR jit/98586
20543         * diagnostic.c (diagnostic_kind_text): Break out this array
20544         from...
20545         (diagnostic_build_prefix): ...here.
20546         (fancy_abort): Detect when diagnostic_initialize has not yet been
20547         called and fall back to a minimal implementation of printing the
20548         ICE, rather than segfaulting in internal_error.
20549
20550 2021-01-14  David Malcolm  <dmalcolm@redhat.com>
20551
20552         * diagnostic.c (diagnostic_initialize): Eliminate
20553         parseable_fixits_p in favor of initializing extra_output_kind from
20554         GCC_EXTRA_DIAGNOSTIC_OUTPUT.
20555         (convert_column_unit): New function, split out from...
20556         (diagnostic_converted_column): ...this.
20557         (print_parseable_fixits): Add "column_unit" and "tabstop" params.
20558         Use them to call convert_column_unit on the column values.
20559         (diagnostic_report_diagnostic): Eliminate conditional on
20560         parseable_fixits_p in favor of a switch statement on
20561         extra_output_kind, passing the appropriate values to the new
20562         params of print_parseable_fixits.
20563         (selftest::test_print_parseable_fixits_none): Update for new
20564         params of print_parseable_fixits.
20565         (selftest::test_print_parseable_fixits_insert): Likewise.
20566         (selftest::test_print_parseable_fixits_remove): Likewise.
20567         (selftest::test_print_parseable_fixits_replace): Likewise.
20568         (selftest::test_print_parseable_fixits_bytes_vs_display_columns):
20569         New.
20570         (selftest::diagnostic_c_tests): Call it.
20571         * diagnostic.h (enum diagnostics_extra_output_kind): New.
20572         (diagnostic_context::parseable_fixits_p): Delete field in favor
20573         of...
20574         (diagnostic_context::extra_output_kind): ...this new field.
20575         * doc/invoke.texi (Environment Variables): Add
20576         GCC_EXTRA_DIAGNOSTIC_OUTPUT.
20577         * opts.c (common_handle_option): Update handling of
20578         OPT_fdiagnostics_parseable_fixits for change to diagnostic_context
20579         fields.
20580
20581 2021-01-14  Tamar Christina  <tamar.christina@arm.com>
20582
20583         * tree-vect-slp-patterns.c (class complex_operations_pattern,
20584         complex_operations_pattern::matches,
20585         complex_operations_pattern::recognize,
20586         complex_operations_pattern::build): New.
20587         (slp_patterns): Use it.
20588
20589 2021-01-14  Tamar Christina  <tamar.christina@arm.com>
20590
20591         * internal-fn.def (COMPLEX_FMS, COMPLEX_FMS_CONJ): New.
20592         * optabs.def (cmls_optab, cmls_conj_optab): New.
20593         * doc/md.texi: Document them.
20594         * tree-vect-slp-patterns.c (class complex_fms_pattern,
20595         complex_fms_pattern::matches, complex_fms_pattern::recognize,
20596         complex_fms_pattern::build): New.
20597
20598 2021-01-14  Tamar Christina  <tamar.christina@arm.com>
20599
20600         * internal-fn.def (COMPLEX_FMA, COMPLEX_FMA_CONJ): New.
20601         * optabs.def (cmla_optab, cmla_conj_optab): New.
20602         * doc/md.texi: Document them.
20603         * tree-vect-slp-patterns.c (vect_match_call_p,
20604         class complex_fma_pattern, vect_slp_reset_pattern,
20605         complex_fma_pattern::matches, complex_fma_pattern::recognize,
20606         complex_fma_pattern::build): New.
20607
20608 2021-01-14  Tamar Christina  <tamar.christina@arm.com>
20609
20610         * internal-fn.def (COMPLEX_MUL, COMPLEX_MUL_CONJ): New.
20611         * optabs.def (cmul_optab, cmul_conj_optab): New.
20612         * doc/md.texi: Document them.
20613         * tree-vect-slp-patterns.c (vect_match_call_complex_mla,
20614         vect_normalize_conj_loc, is_eq_or_top, vect_validate_multiplication,
20615         vect_build_combine_node, class complex_mul_pattern,
20616         complex_mul_pattern::matches, complex_mul_pattern::recognize,
20617         complex_mul_pattern::build): New.
20618
20619 2021-01-14  Tamar Christina  <tamar.christina@arm.com>
20620
20621         * tree-vect-slp.c (optimize_load_redistribution_1): New.
20622         (optimize_load_redistribution, vect_is_slp_load_node): New.
20623         (vect_match_slp_patterns): Use it.
20624
20625 2021-01-14  Tamar Christina  <tamar.christina@arm.com>
20626
20627         * tree-vect-slp-patterns.c (complex_add_pattern::build):
20628         Elide nodes.
20629
20630 2021-01-14  Thomas Schwinge  <thomas@codesourcery.com>
20631
20632         * config/gcn/mkoffload.c (main): Create an offload image only in
20633         64-bit configurations.
20634
20635 2021-01-14  H.J. Lu  <hjl.tools@gmail.com>
20636
20637         PR target/98667
20638         * config/i386/i386-options.c (ix86_option_override_internal):
20639         Issue an error for -fcf-protection with CF_BRANCH when compiling
20640         for 32-bit non-TARGET_CMOV targets.
20641
20642 2021-01-14  Uroš Bizjak  <ubizjak@gmail.com>
20643
20644         PR target/98671
20645         * config/i386/i386-options.c (ix86_valid_target_attribute_inner_p):
20646         Remove declaration and initialization of shadow variable "ret".
20647         (ix86_option_override_internal): Remove delcaration of
20648         shadow variable "i".  Redeclare shadowed variable to unsigned.
20649         * common/config/i386/i386-common.c (pta_size): Redeclare to unsigned.
20650         * config/i386/i386-builtins.c (get_builtin_code_for_version):
20651         Update for redeclaration.
20652         * config/i386/i386.h (pta_size): Ditto.
20653
20654 2021-01-14  Richard Biener  <rguenther@suse.de>
20655
20656         PR tree-optimization/98674
20657         * tree-data-ref.c (base_supports_access_fn_components_p): New.
20658         (initialize_data_dependence_relation): For two bases without
20659         possible access fns resort to type size equality when determining
20660         shape compatibility.
20661
20662 2021-01-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20663
20664         PR target/66791
20665         * config/arm/arm_neon.h: Replace calls to __builtin_vcge* by
20666         <=, >= operators in vcle and vcge intrinsics respectively.
20667         * config/arm/arm_neon_builtins.def: Remove entry for
20668         vcge and vcgeu.
20669
20670 2021-01-14  Uroš Bizjak  <ubizjak@gmail.com>
20671
20672         PR target/98671
20673         * config/i386/i386-options.c (ix86_function_specific_save):
20674         Remove redundant assignment to opts->x_ix86_branch_cost.
20675         * config/i386/i386.c (ix86_prefetch_sse):
20676         Rename from x86_prefetch_sse.  Update all uses.
20677         * config/i386/i386.h: Update for rename.
20678         * config/i386/i386-options.h: Ditto.
20679
20680 2021-01-14  Jakub Jelinek  <jakub@redhat.com>
20681
20682         PR target/98670
20683         * config/i386/sse.md (*sse4_1_zero_extendv8qiv8hi2_3,
20684         *sse4_1_zero_extendv4hiv4si2_3, *sse4_1_zero_extendv2siv2di2_3):
20685         Use Bm instead of m for non-avx.  Add isa attribute.
20686
20687 2021-01-14  Jakub Jelinek  <jakub@redhat.com>
20688
20689         PR tree-optimization/96688
20690         * match.pd (~(X >> Y) -> ~X >> Y): New simplification if
20691         ~X can be simplified.
20692
20693 2021-01-14  Richard Sandiford  <richard.sandiford@arm.com>
20694
20695         * tree-vect-stmts.c (vect_model_load_cost): Account for unused
20696         IFN_LOAD_LANES results.
20697
20698 2021-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20699
20700         * config/aarch64/aarch64-simd.md (aarch64_<su>xtl<mode>):
20701         Define.
20702         (aarch64_xtn<mode>): Likewise.
20703         * config/aarch64/aarch64-simd-builtins.def (sxtl, uxtl, xtn):
20704         Define
20705         builtins.
20706         * config/aarch64/arm_neon.h (vmovl_s8): Reimplement using
20707         builtin.
20708         (vmovl_s16): Likewise.
20709         (vmovl_s32): Likewise.
20710         (vmovl_u8): Likewise.
20711         (vmovl_u16): Likewise.
20712         (vmovl_u32): Likewise.
20713         (vmovn_s16): Likewise.
20714         (vmovn_s32): Likewise.
20715         (vmovn_s64): Likewise.
20716         (vmovn_u16): Likewise.
20717         (vmovn_u32): Likewise.
20718         (vmovn_u64): Likewise.
20719
20720 2021-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20721
20722         * config/aarch64/aarch64-simd.md (aarch64_<su>qxtn2<mode>_le):
20723         Define.
20724         (aarch64_<su>qxtn2<mode>_be): Likewise.
20725         (aarch64_<su>qxtn2<mode>): Likewise.
20726         * config/aarch64/aarch64-simd-builtins.def (sqxtn2, uqxtn2):
20727         Define builtins.
20728         * config/aarch64/iterators.md (SAT_TRUNC): Define code_iterator.
20729         (su): Handle ss_truncate and us_truncate.
20730         * config/aarch64/arm_neon.h (vqmovn_high_s16): Reimplement using
20731         builtin.
20732         (vqmovn_high_s32): Likewise.
20733         (vqmovn_high_s64): Likewise.
20734         (vqmovn_high_u16): Likewise.
20735         (vqmovn_high_u32): Likewise.
20736         (vqmovn_high_u64): Likewise.
20737
20738 2021-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20739
20740         * config/aarch64/aarch64-simd.md (aarch64_xtn2<mode>_le):
20741         Define.
20742         (aarch64_xtn2<mode>_be): Likewise.
20743         (aarch64_xtn2<mode>): Likewise.
20744         * config/aarch64/aarch64-simd-builtins.def (xtn2): Define
20745         builtins.
20746         * config/aarch64/arm_neon.h (vmovn_high_s16): Reimplement using
20747         builtins.
20748         (vmovn_high_s32): Likewise.
20749         (vmovn_high_s64): Likewise.
20750         (vmovn_high_u16): Likewise.
20751         (vmovn_high_u32): Likewise.
20752         (vmovn_high_u64): Likewise.
20753
20754 2021-01-13  Stafford Horne  <shorne@gmail.com>
20755
20756         * config/or1k/or1k.h (ASM_PREFERRED_EH_DATA_FORMAT): New macro.
20757
20758 2021-01-13  Stafford Horne  <shorne@gmail.com>
20759
20760         * config/or1k/linux.h (TARGET_ASM_FILE_END): Define macro.
20761
20762 2021-01-13  Stafford Horne  <shorne@gmail.com>
20763
20764         * config/or1k/or1k.h (TARGET_CPU_CPP_BUILTINS): Add builtin
20765           define for __or1k_hard_float__.
20766
20767 2021-01-13  Stafford Horne  <shorne@gmail.com>
20768
20769         * config/or1k/or1k.h (NO_PROFILE_COUNTERS): Define as 1.
20770         (PROFILE_HOOK): Define to call _mcount.
20771         (FUNCTION_PROFILER): Change from abort to no-op.
20772
20773 2021-01-13  Jakub Jelinek  <jakub@redhat.com>
20774
20775         PR tree-optimization/96691
20776         * match.pd ((~X | C) ^ D -> (X | C) ^ (~D ^ C),
20777         (~X & C) ^ D -> (X & C) ^ (D ^ C)): New simplifications if
20778         (~D ^ C) or (D ^ C) can be simplified.
20779
20780 2021-01-13  Richard Biener  <rguenther@suse.de>
20781
20782         PR tree-optimization/92645
20783         * match.pd (BIT_FIELD_REF to conversion): Delay canonicalization
20784         until after vector lowering.
20785
20786 2021-01-13  Richard Sandiford  <richard.sandiford@arm.com>
20787
20788         * config/aarch64/aarch64-sve.md (fnma<mode>4): Extend from SVE_FULL_I
20789         to SVE_I.
20790         (@aarch64_pred_fnma<mode>, cond_fnma<mode>, *cond_fnma<mode>_2)
20791         (*cond_fnma<mode>_4, *cond_fnma<mode>_any): Likewise.
20792
20793 2021-01-13  Richard Sandiford  <richard.sandiford@arm.com>
20794
20795         * config/aarch64/aarch64-sve.md (fma<mode>4): Extend from SVE_FULL_I
20796         to SVE_I.
20797         (@aarch64_pred_fma<mode>, cond_fma<mode>, *cond_fma<mode>_2)
20798         (*cond_fma<mode>_4, *cond_fma<mode>_any): Likewise.
20799
20800 2021-01-13  Richard Biener  <rguenther@suse.de>
20801
20802         PR tree-optimization/92645
20803         * tree-vect-slp.c (vect_build_slp_tree_1): Relax supported
20804         BIT_FIELD_REF argument.
20805         (vect_build_slp_tree_2): Record the desired vector type
20806         on the external vector def.
20807         (vectorizable_slp_permutation): Handle required punning
20808         of existing vector defs.
20809
20810 2021-01-13  Richard Sandiford  <richard.sandiford@arm.com>
20811
20812         * rtl-ssa/accesses.h (def_lookup): Fix order of comparison results.
20813
20814 2021-01-13  Richard Sandiford  <richard.sandiford@arm.com>
20815
20816         * config/sh/sh.md (movsf_ie): Remove operands[2] test.
20817
20818 2021-01-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>
20819
20820         * config.gcc [$target == *-*-gnu*]: Enable
20821         'default_gnu_indirect_function'.
20822
20823 2021-01-13  Jakub Jelinek  <jakub@redhat.com>
20824
20825         PR target/95905
20826         * optabs.c (expand_vec_perm_const): Don't force v0 and v1 into
20827         registers before calling targetm.vectorize.vec_perm_const, only after
20828         that.
20829         * config/i386/i386-expand.c (ix86_vectorize_vec_perm_const): Handle
20830         two argument permutation when one operand is zero vector and only
20831         after that force operands into registers.
20832         * config/i386/sse.md (*avx2_zero_extendv16qiv16hi2_1): New
20833         define_insn_and_split pattern.
20834         (*avx512bw_zero_extendv32qiv32hi2_1): Likewise.
20835         (*avx512f_zero_extendv16hiv16si2_1): Likewise.
20836         (*avx2_zero_extendv8hiv8si2_1): Likewise.
20837         (*avx512f_zero_extendv8siv8di2_1): Likewise.
20838         (*avx2_zero_extendv4siv4di2_1): Likewise.
20839         * config/mips/mips.c (mips_vectorize_vec_perm_const): Force operands
20840         into registers.
20841         * config/arm/arm.c (arm_vectorize_vec_perm_const): Likewise.
20842         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Likewise.
20843         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const): Likewise.
20844         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const): Likewise.
20845         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const): Likewise.
20846         * config/gcn/gcn.c (gcn_vectorize_vec_perm_const): Likewise.  Use std::swap.
20847
20848 2021-01-13  Martin Liska  <mliska@suse.cz>
20849
20850         PR tree-optimization/98455
20851         * gimple-if-to-switch.cc (condition_info::record_phi_mapping):
20852         Record also virtual PHIs.
20853         (pass_if_to_switch::execute): Return TODO_cleanup_cfg only
20854         conditionally.
20855
20856 2021-01-13  Jonathan Wakely  <jwakely@redhat.com>
20857
20858         * doc/invoke.texi (C++ Modules): Fix typos.
20859
20860 2021-01-13  Richard Biener  <rguenther@suse.de>
20861
20862         PR tree-optimization/98640
20863         * tree-ssa-sccvn.c (visit_nary_op): Do not try to
20864         handle plus or minus from a truncated operand to be
20865         sign-extended.
20866
20867 2021-01-13  Jakub Jelinek  <jakub@redhat.com>
20868
20869         PR target/96938
20870         * config/i386/i386.md (*btr<mode>_1, *btr<mode>_2): New
20871         define_insn_and_split patterns.
20872         (splitter after *btr<mode>_2): New splitter.
20873
20874 2021-01-13  Martin Liska  <mliska@suse.cz>
20875
20876         PR ipa/98652
20877         * cgraphunit.c (analyze_functions): Remove dead code.
20878
20879 2021-01-13  Qian Jianhua  <qianjh@cn.fujitsu.com>
20880
20881         * config/aarch64/aarch64-cost-tables.h (a64fx_extra_costs): New.
20882         * config/aarch64/aarch64.c (a64fx_addrcost_table): New.
20883         (a64fx_regmove_cost, a64fx_vector_cost): New.
20884         (a64fx_tunings): Use the new added cost tables.
20885
20886 2021-01-13  Jakub Jelinek  <jakub@redhat.com>
20887
20888         PR target/95905
20889         * config/i386/predicates.md (pmovzx_parallel): New predicate.
20890         * config/i386/sse.md (*sse4_1_zero_extendv8qiv8hi2_3): New
20891         define_insn_and_split pattern.
20892         (*sse4_1_zero_extendv4hiv4si2_3): Likewise.
20893         (*sse4_1_zero_extendv2siv2di2_3): Likewise.
20894
20895 2021-01-13  Julian Brown  <julian@codesourcery.com>
20896
20897         * config/gcn/gcn.c (gcn_conditional_register_usage): Remove dead code
20898         to fix v0 register.
20899
20900 2021-01-13  Julian Brown  <julian@codesourcery.com>
20901
20902         * config/gcn/gcn.c (gcn_md_reorg): Fix case where EXEC reg is live
20903         on entry to a BB.
20904
20905 2021-01-13  Julian Brown  <julian@codesourcery.com>
20906
20907         * config/gcn/gcn-valu.md (recip<mode>2<exec>, recip<mode>2): Use unspec
20908         for reciprocal-approximation instructions.
20909         (div<mode>3): Use fused multiply-accumulate operations for reciprocal
20910         refinement and division result.
20911         * config/gcn/gcn.md (UNSPEC_RCP): New unspec constant.
20912
20913 2021-01-13  Julian Brown  <julian@codesourcery.com>
20914
20915         * config/gcn/gcn-valu.md (subdf): Rename to...
20916         (subdf3): This.
20917
20918 2021-01-12  Martin Liska  <mliska@suse.cz>
20919
20920         * gcov.c (source_info::debug): Fix printf format for 32-bit hosts.
20921
20922 2021-01-12  Andrea Corallo  <andrea.corallo@arm.com>
20923
20924         * function-abi.h: Fix typo.
20925
20926 2021-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20927
20928         PR target/97875
20929         PR target/97875
20930         * config/arm/arm.h (ARM_HAVE_NEON_V8QI_LDST): New macro.
20931         (ARM_HAVE_NEON_V16QI_LDST, ARM_HAVE_NEON_V4HI_LDST): Likewise.
20932         (ARM_HAVE_NEON_V8HI_LDST, ARM_HAVE_NEON_V2SI_LDST): Likewise.
20933         (ARM_HAVE_NEON_V4SI_LDST, ARM_HAVE_NEON_V4HF_LDST): Likewise.
20934         (ARM_HAVE_NEON_V8HF_LDST, ARM_HAVE_NEON_V4BF_LDST): Likewise.
20935         (ARM_HAVE_NEON_V8BF_LDST, ARM_HAVE_NEON_V2SF_LDST): Likewise.
20936         (ARM_HAVE_NEON_V4SF_LDST, ARM_HAVE_NEON_DI_LDST): Likewise.
20937         (ARM_HAVE_NEON_V2DI_LDST): Likewise.
20938         (ARM_HAVE_V8QI_LDST, ARM_HAVE_V16QI_LDST): Likewise.
20939         (ARM_HAVE_V4HI_LDST, ARM_HAVE_V8HI_LDST): Likewise.
20940         (ARM_HAVE_V2SI_LDST, ARM_HAVE_V4SI_LDST, ARM_HAVE_V4HF_LDST): Likewise.
20941         (ARM_HAVE_V8HF_LDST, ARM_HAVE_V4BF_LDST, ARM_HAVE_V8BF_LDST): Likewise.
20942         (ARM_HAVE_V2SF_LDST, ARM_HAVE_V4SF_LDST, ARM_HAVE_DI_LDST): Likewise.
20943         (ARM_HAVE_V2DI_LDST): Likewise.
20944         * config/arm/mve.md (*movmisalign<mode>_mve_store): New pattern.
20945         (*movmisalign<mode>_mve_load): New pattern.
20946         * config/arm/neon.md (movmisalign<mode>): Move to ...
20947         * config/arm/vec-common.md: ... here.
20948
20949 2021-01-12  Vladimir N. Makarov  <vmakarov@redhat.com>
20950
20951         PR target/97969
20952         * lra-eliminations.c (eliminate_regs_in_insn): Add transformation
20953         of pattern 'plus (plus (hard reg, const), pseudo)'.
20954
20955 2021-01-12  Richard Biener  <rguenther@suse.de>
20956
20957         PR tree-optimization/98550
20958         * tree-vect-slp.c (vect_record_max_nunits): Check whether
20959         the group size is a multiple of the vector element count.
20960         (vect_build_slp_tree_1): When we need to fail because
20961         the vector type choosen causes unrolling do so lazily
20962         without affecting matches only at the end to guide group splitting.
20963
20964 2021-01-12  Martin Liska  <mliska@suse.cz>
20965
20966         PR c++/97284
20967         * optc-save-gen.awk: Compare also n_target_save vars with
20968         strcmp.
20969
20970 2021-01-12  Martin Liska  <mliska@suse.cz>
20971
20972         * gcov.c (source_info::debug): New.
20973         (print_usage): Add --debug (-D) option.
20974         (process_args): Likewise.
20975         (generate_results): Call src->debug after
20976         accumulate_line_counts.
20977         (read_graph_file): Properly assign id for EXIT_BLOCK.
20978         * profile.c (branch_prob): Dump function body before it is
20979         instrumented.
20980
20981 2021-01-12  Jakub Jelinek  <jakub@redhat.com>
20982
20983         PR tree-optimization/98629
20984         * tree-ssa-math-opts.c (arith_overflow_check_p): Don't update use_stmt
20985         unless returning non-zero.
20986
20987 2021-01-12  Jakub Jelinek  <jakub@redhat.com>
20988
20989         PR tree-optimization/95731
20990         * tree-ssa-reassoc.c (optimize_range_tests_cmp_bitwise): Also optimize
20991         x < 0 && y < 0 && z < 0 into (x | y | z) < 0 for signed x, y, z.
20992         (optimize_range_tests): Call optimize_range_tests_cmp_bitwise
20993         only after optimize_range_tests_var_bound.
20994
20995 2021-01-12  Jakub Jelinek  <jakub@redhat.com>
20996
20997         * configure.ac: Ensure c/Make-lang.in comes first in @all_lang_makefrags@.
20998         * configure: Regenerated.
20999
21000 2021-01-12  liuhongt  <hongtao.liu@intel.com>
21001
21002         PR target/98612
21003         * config/i386/i386-builtins.h (BUILTIN_DESC_SWAP_OPERANDS):
21004         Deleted.
21005         * config/i386/i386-expand.c (ix86_expand_sse_comi): Delete
21006         dead code.
21007
21008 2021-01-12  Alexandre Oliva  <oliva@adacore.com>
21009
21010         * ssa-iterators.h (end_imm_use_stmt_traverse): Forward
21011         declare.
21012         (auto_end_imm_use_stmt_traverse): New struct.
21013         (FOR_EACH_IMM_USE_STMT): Use it.
21014         (BREAK_FROM_IMM_USE_STMT, RETURN_FROM_IMM_USE_STMT): Remove,
21015         along with uses...
21016         * gimple-ssa-strength-reduction.c: ... here, ...
21017         * graphite-scop-detection.c: ... here, ...
21018         * ipa-modref.c, ipa-pure-const.c, ipa-sra.c: ... here, ...
21019         * tree-predcom.c, tree-ssa-ccp.c: ... here, ...
21020         * tree-ssa-dce.c, tree-ssa-dse.c: ... here, ...
21021         * tree-ssa-loop-ivopts.c, tree-ssa-math-opts.c: ... here, ...
21022         * tree-ssa-phiprop.c, tree-ssa.c: ... here, ...
21023         * tree-vect-slp.c: ... and here, ...
21024         * doc/tree-ssa.texi: ... and the example here.
21025
21026 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21027
21028         * config/aarch64/aarch64-sve.md (sdiv_pow2<mode>3): Extend from
21029         SVE_FULL_I to SVE_I.  Generate an UNSPEC_PRED_X.
21030         (*sdiv_pow2<mode>3): New pattern.
21031         (@cond_<sve_int_op><mode>): Extend from SVE_FULL_I to SVE_I.
21032         Wrap the ASRD in an UNSPEC_PRED_X.
21033         (*cond_<sve_int_op><mode>_2): Likewise.  Replace the UNSPEC_PRED_X
21034         predicate with a constant PTRUE, if it isn't already.
21035         (*cond_<sve_int_op><mode>_z): Replace with...
21036         (*cond_<sve_int_op><mode>_any): ...this new pattern.
21037
21038 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21039
21040         * config/aarch64/aarch64-sve.md (*cond_bic<mode>_2): Extend from
21041         SVE_FULL_I to SVE_I.
21042         (*cond_bic<mode>_any): Likewise.
21043
21044 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21045
21046         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart)
21047         (@aarch64_pred_<MUL_HIGHPART:optab><mode>): Extend from SVE_FULL_I
21048         to SVE_I.
21049
21050 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21051
21052         * config/aarch64/aarch64-sve.md (<su>abd<mode>_3): Extend from
21053         SVE_FULL_I to SVE_I.
21054         (*aarch64_cond_<su>abd<mode>_2): Likewise.
21055         (*aarch64_cond_<su>abd<mode>_any): Likewise.
21056         (@aarch64_pred_<su>abd<mode>): Likewise.  Use UNSPEC_PRED_X
21057         for the max and min but not for the minus.
21058         (*aarch64_cond_<su>abd<mode>_3): New pattern.
21059
21060 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21061
21062         * config/aarch64/iterators.md (SVE_24I): New iterator.
21063         * config/aarch64/aarch64-sve.md (*aarch64_adr<mode>_shift): Extend from
21064         SVE_FULL_SDI to SVE_24I.  Use containers rather than elements.
21065
21066 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21067
21068         * config/aarch64/aarch64-sve.md (@cond_<SVE_INT_BINARY:optab><mode>)
21069         (*cond_<SVE_INT_BINARY:optab><mode>_2): Extend from SVE_FULL_I
21070         to SVE_I.
21071         (*cond_<SVE_INT_BINARY:optab><mode>_3): Likewise.
21072         (*cond_<SVE_INT_BINARY:optab><mode>_any): Likewise.
21073         (*cond_<SVE_INT_BINARY:optab><mode>_2_const): Likewise.
21074         (*cond_<SVE_INT_BINARY:optab><mode>_any_const): Likewise.
21075
21076 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21077
21078         * config/aarch64/aarch64-sve.md (<SVE_INT_BINARY_IMM:optab><mode>3)
21079         (@aarch64_pred_<SVE_INT_BINARY_IMM:optab><mode>)
21080         (*post_ra_<SVE_INT_BINARY_IMM:optab><mode>3): Extend from SVE_FULL_I
21081         to SVE_I.
21082
21083 2021-01-11  Richard Sandiford  <richard.sandiford@arm.com>
21084
21085         * config/aarch64/aarch64-sve.md (<ASHIFT:optab><mode>3)
21086         (v<ASHIFT:optab><mode>3, @aarch64_pred_<optab><mode>)
21087         (*post_ra_v<ASHIFT:optab><mode>3): Extend from SVE_FULL_I to SVE_I.
21088
21089 2021-01-11  Martin Liska  <mliska@suse.cz>
21090
21091         PR jit/98615
21092         * symtab-clones.h (clone_info::release): Release
21093         symtab::m_clones with ggc_delete as it's a GGC memory.
21094
21095 2021-01-11  Matthias Klose  <doko@ubuntu.com>
21096
21097         * Makefile.in (LINK_PROGRESS): Show the link target.
21098
21099 2021-01-11  Richard Biener  <rguenther@suse.de>
21100
21101         PR tree-optimization/91403
21102         * tree-vect-data-refs.c (vect_analyze_group_access_1): Cap
21103         single-element interleaving group size at 4096 elements.
21104
21105 2021-01-11  Richard Biener  <rguenther@suse.de>
21106
21107         PR tree-optimization/98526
21108         * tree-vect-loop.c (vect_model_reduction_cost): Remove costing
21109         of the actual reduction op for the regular case.
21110         (vectorizable_reduction): Cost the stmts
21111         vect_transform_reduction produces here.
21112
21113 2021-01-11  Andreas Krebbel  <krebbel@linux.ibm.com>
21114
21115         * tree-ssa-forwprop.c (simplify_vector_constructor): For
21116         big-endian, use UNPACK[_FLOAT]_HI.
21117
21118 2021-01-11  Tamar Christina  <tamar.christina@arm.com>
21119
21120         * tree-vect-slp-patterns.c (class complex_pattern,
21121         class complex_add_pattern): Add parameters to matches.
21122         (complex_add_pattern::build): Free memory.
21123         (complex_add_pattern::matches): Move validation end of match.
21124         (complex_add_pattern::recognize): Likewise.
21125
21126 2021-01-11  Tamar Christina  <tamar.christina@arm.com>
21127
21128         * tree-vect-slp-patterns.c (linear_loads_p): Fix externals.
21129
21130 2021-01-11  Tamar Christina  <tamar.christina@arm.com>
21131
21132         * tree-vect-slp-patterns.c (is_linear_load_p): Fix ambiguity.
21133
21134 2021-01-11  Jakub Jelinek  <jakub@redhat.com>
21135
21136         PR tree-optimization/95867
21137         * tree-ssa-math-opts.h: New header.
21138         * tree-ssa-math-opts.c: Include tree-ssa-math-opts.h.
21139         (powi_as_mults): No longer static.  Use build_one_cst instead of
21140         build_real.  Formatting fix.
21141         * tree-ssa-reassoc.c: Include tree-ssa-math-opts.h.
21142         (attempt_builtin_powi): Handle multiplication reassociation without
21143         powi_fndecl using powi_as_mults.
21144         (reassociate_bb): For integral types don't require
21145         -funsafe-math-optimizations to call attempt_builtin_powi.
21146
21147 2021-01-11  Jakub Jelinek  <jakub@redhat.com>
21148
21149         PR tree-optimization/95852
21150         * tree-ssa-math-opts.c (maybe_optimize_guarding_check): Change
21151         mul_stmts parameter type to vec<gimple *> &.  Before cond_stmt
21152         allow in the bb any of the stmts in that vector, div_stmt and
21153         up to 3 cast stmts.
21154         (arith_cast_equal_p): New function.
21155         (arith_overflow_check_p): Add cast_stmt argument, handle signed
21156         multiply overflow checks.
21157         (match_arith_overflow): Adjust caller.  Handle signed multiply
21158         overflow checks.
21159
21160 2021-01-11  Jakub Jelinek  <jakub@redhat.com>
21161
21162         PR tree-optimization/95852
21163         * tree-ssa-math-opts.c (maybe_optimize_guarding_check): New function.
21164         (uaddsub_overflow_check_p): Renamed to ...
21165         (arith_overflow_check_p): ... this.  Handle also multiplication
21166         with overflow check.
21167         (match_uaddsub_overflow): Renamed to ...
21168         (match_arith_overflow): ... this.  Add cfg_changed argument.  Handle
21169         also multiplication with overflow check.  Adjust function comment.
21170         (math_opts_dom_walker::after_dom_children): Adjust callers.  Call
21171         match_arith_overflow also for MULT_EXPR.
21172
21173 2021-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21174
21175         * config/aarch64/arm_neon.h (vmovl_s8): Reimplement using
21176         __builtin_convertvector.
21177         (vmovl_s16): Likewise.
21178         (vmovl_s32): Likewise.
21179         (vmovl_u8): Likewise.
21180         (vmovl_u16): Likewise.
21181         (vmovl_u32): Likewise.
21182         (vmovn_s16): Likewise.
21183         (vmovn_s32): Likewise.
21184         (vmovn_s64): Likewise.
21185         (vmovn_u16): Likewise.
21186         (vmovn_u32): Likewise.
21187         (vmovn_u64): Likewise.
21188
21189 2021-01-11  Martin Liska  <mliska@suse.cz>
21190
21191         * gimple-if-to-switch.cc (struct condition_info): Use auto_var.
21192         (if_chain::is_beneficial): Delete clusters
21193         (find_conditions): Make second argument of conditions_in_bbs a
21194         pointer so that we control over it's lifetime.
21195         (pass_if_to_switch::execute): Delete them.
21196
21197 2021-01-11  Kewen Lin  <linkw@linux.ibm.com>
21198
21199         * ira.c (move_unallocated_pseudos): Check other_reg and skip if
21200         it isn't set.
21201
21202 2021-01-09  Maciej W. Rozycki  <macro@linux-mips.org>
21203
21204         * config/vax/vax.md (cc): Remove mode attribute.
21205         (subst_<cc>, subst_f<cc>): Rename to...
21206         (subst_<mode>, subst_f<VAXccnz:mode>): ... these respectively.
21207         (*cbranch<VAXint:mode>4_<VAXcc:mode>): Update for `cc' removal.
21208         (*cbranch<VAXfp:mode>4_<VAXccnz:mode>): Likewise.
21209         (*branch_<mode>, *branch_<mode>_reversed): Likewise.
21210
21211 2021-01-09  Maciej W. Rozycki  <macro@linux-mips.org>
21212
21213         * config/vax/vax.md (subst_f<cc>): Add mode to operands and
21214         `const_double_zero'.
21215
21216 2021-01-09  Maciej W. Rozycki  <macro@linux-mips.org>
21217
21218         * config/pdp11/pdp11.md (PDPfp): New mode iterator.
21219         (fcc_cc, fcc_ccnz): Use it.  Add mode to `const_double_zero' and
21220         operands.
21221
21222 2021-01-09  Maciej W. Rozycki  <macro@linux-mips.org>
21223
21224         * genemit.c (gen_exp) <CONST_DOUBLE>: Handle `const_double_zero'
21225         rtx.
21226         * read-rtl.c (rtx_reader::read_rtx_code): Handle machine mode
21227         with `const_double_zero'.
21228         * doc/rtl.texi (Constant Expression Types): Document it.
21229
21230 2021-01-09  Jakub Jelinek  <jakub@redhat.com>
21231
21232         PR c++/98556
21233         * tree-cfg.c (verify_gimple_assign_binary): Allow lhs of
21234         POINTER_DIFF_EXPR to be any integral type.
21235
21236 2021-01-09  Jakub Jelinek  <jakub@redhat.com>
21237
21238         PR rtl-optimization/98603
21239         * function.c (instantiate_virtual_regs_in_insn): For asm goto
21240         with impossible constraints, drop all SETs, CLOBBERs, drop PARALLEL
21241         if any, set ASM_OPERANDS mode to VOIDmode and change
21242         ASM_OPERANDS_OUTPUT_CONSTRAINT and ASM_OPERANDS_OUTPUT_IDX.
21243
21244 2021-01-09  Alexandre Oliva  <oliva@gnu.org>
21245
21246         PR debug/97714
21247         * final.c (notice_source_line): Narrow down the condition to
21248         skip a line-0 marker.
21249
21250 2021-01-08  Sergei Trofimovich  <siarheit@google.com>
21251
21252         * ipa-modref.c (merge_call_side_effects): Fix
21253         linebreak split by reordering two print calls.
21254
21255 2021-01-08  Ilya Leoshkevich  <iii@linux.ibm.com>
21256
21257         * config/s390/vector.md (*tf_to_fprx2_0): Rename from
21258         "*mov_tf_to_fprx2_0" for consistency, fix constraint.
21259         (*tf_to_fprx2_1): Rename from "*mov_tf_to_fprx2_1" for
21260         consistency, fix constraint.
21261
21262 2021-01-08  Ilya Leoshkevich  <iii@linux.ibm.com>
21263
21264         * config/s390/s390-c.c (s390_def_or_undef_macro): Accept
21265         callables instead of mask values.
21266         (struct target_flag_set_p): New predicate.
21267         (s390_cpu_cpp_builtins_internal): Define or undefine
21268         __LONG_DOUBLE_VX__ macro.
21269
21270 2021-01-08  H.J. Lu  <hjl.tools@gmail.com>
21271
21272         PR target/98482
21273         * config/i386/i386.c (x86_function_profiler): Use R10 and R11
21274         to call mcount in large model with PIC for NO_PROFILE_COUNTERS
21275         targets.
21276
21277 2021-01-08  Richard Biener  <rguenther@suse.de>
21278
21279         * tree-ssa-sccvn.c (pass_fre::execute): Reset the SCEV hash table.
21280
21281 2021-01-08  Richard Biener  <rguenther@suse.de>
21282
21283         * tree-vect-slp.c (scalar_stmts_to_slp_tree_map_t): Fix.
21284         (vect_build_slp_tree): On cache hit release the matched
21285         scalar stmts vector.
21286         * tree-vect-stmts.c (vectorizable_store): Properly free
21287         vec_oprnds before possibly gathering them again.
21288
21289 2021-01-08  Richard Biener  <rguenther@suse.de>
21290
21291         PR tree-optimization/98544
21292         * tree-vect-slp.c (vect_optimize_slp): Always materialize
21293         permutes at a permute node.
21294
21295 2021-01-08  H.J. Lu  <hjl.tools@gmail.com>
21296
21297         PR target/98482
21298         * config/i386/i386.c (x86_function_profiler): Use R10 to call
21299         mcount in large model.  Sorry for large model with PIC.
21300
21301 2021-01-08  Jakub Jelinek  <jakub@redhat.com>
21302
21303         PR target/98585
21304         * config/i386/i386.opt (ix86_cmodel, ix86_incoming_stack_boundary_arg,
21305         ix86_pmode, ix86_preferred_stack_boundary_arg, ix86_regparm,
21306         ix86_veclibabi_type): Remove x_ prefix, use TargetVariable instead of
21307         TargetSave and initialize for variables with enum types.
21308         (mfentry, mstack-protector-guard-reg=, mstack-protector-guard-offset=,
21309         mstack-protector-guard-symbol=): Add Save.
21310         * config/i386/i386-options.c (ix86_function_specific_save,
21311         ix86_function_specific_restore): Don't save or restore x_ix86_cmodel,
21312         x_ix86_incoming_stack_boundary_arg, x_ix86_pmode,
21313         x_ix86_preferred_stack_boundary_arg, x_ix86_regparm,
21314         x_ix86_veclibabi_type.
21315
21316 2021-01-08  Richard Sandiford  <richard.sandiford@arm.com>
21317
21318         * config/aarch64/aarch64-sve.md (*cnot<mode>): Extend from
21319         SVE_FULL_I to SVE_I.
21320         (*cond_cnot<mode>_2, *cond_cnot<mode>_any): Likewise.
21321
21322 2021-01-08  Richard Sandiford  <richard.sandiford@arm.com>
21323
21324         * config/aarch64/aarch64-sve.md (*cond_uxt<mode>_2): Extend from
21325         SVE_FULL_I to SVE_I.
21326         (*cond_uxt<mode>_any): Likewise.
21327
21328 2021-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21329
21330         * config/aarch64/iterators.md (Vwhalf): New iterator.
21331         * config/aarch64/aarch64-simd.md (aarch64_<sur>adalp<mode>_3):
21332         Rename to...
21333         (aarch64_<sur>adalp<mode>): ... This.  Make more
21334         builtin-friendly.
21335         (<sur>sadv16qi): Adjust callsite of the above.
21336         * config/aarch64/aarch64-simd-builtins.def (sadalp, uadalp): New
21337         builtins.
21338         * config/aarch64/arm_neon.h (vpadal_s8): Reimplement using
21339         builtins.
21340         (vpadal_s16): Likewise.
21341         (vpadal_u8): Likewise.
21342         (vpadal_u16): Likewise.
21343         (vpadalq_s8): Likewise.
21344         (vpadalq_s16): Likewise.
21345         (vpadalq_s32): Likewise.
21346         (vpadalq_u8): Likewise.
21347         (vpadalq_u16): Likewise.
21348         (vpadalq_u32): Likewise.
21349
21350 2021-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21351
21352         * config/aarch64/aarch64-simd.md (aarch64_<su>abd<mode>_3):
21353         Rename to...
21354         (aarch64_<su>abd<mode>): ... This.
21355         (<sur>sadv16qi): Adjust callsite of the above.
21356         * config/aarch64/aarch64-simd-builtins.def (sabd, uabd): Define
21357         builtins.
21358         * config/aarch64/arm_neon.h (vabd_s8): Reimplement using
21359         builtin.
21360         (vabd_s16): Likewise.
21361         (vabd_s32): Likewise.
21362         (vabd_u8): Likewise.
21363         (vabd_u16): Likewise.
21364         (vabd_u32): Likewise.
21365         (vabdq_s8): Likewise.
21366         (vabdq_s16): Likewise.
21367         (vabdq_s32): Likewise.
21368         (vabdq_u8): Likewise.
21369         (vabdq_u16): Likewise.
21370         (vabdq_u32): Likewise.
21371
21372 2021-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21373
21374         * config/aarch64/aarch64-simd-builtins.def (saba, uaba): Define
21375         builtins.
21376         * config/aarch64/arm_neon.h (vaba_s8): Implement using builtin.
21377         (vaba_s16): Likewise.
21378         (vaba_s32): Likewise.
21379         (vaba_u8): Likewise.
21380         (vaba_u16): Likewise.
21381         (vaba_u32): Likewise.
21382         (vabaq_s8): Likewise.
21383         (vabaq_s16): Likewise.
21384         (vabaq_s32): Likewise.
21385         (vabaq_u8): Likewise.
21386         (vabaq_u16): Likewise.
21387         (vabaq_u32): Likewise.
21388
21389 2021-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21390
21391         * config/aarch64/aarch64-simd.md (aba<mode>_3): Rename to...
21392         (aarch64_<su>aba<mode>): ... This.  Handle uaba as well.
21393         Change RTL pattern to match.
21394
21395 2021-01-08  Kito Cheng  <kito.cheng@sifive.com>
21396
21397         * common/config/riscv/riscv-common.c (riscv_current_subset_list): New.
21398         * config/riscv/riscv-c.c (riscv-subset.h): New.
21399         (INCLUDE_STRING): Define.
21400         (riscv_cpu_cpp_builtins): Add new style architecture extension
21401         test macros.
21402         * config/riscv/riscv-subset.h (riscv_subset_list::begin): New.
21403         (riscv_subset_list::end): New.
21404         (riscv_current_subset_list): New.
21405
21406 2021-01-08  Kito Cheng  <kito.cheng@sifive.com>
21407
21408         * common/config/riscv/riscv-common.c (RISCV_DONT_CARE_VERSION):
21409         Move to riscv-subset.h.
21410         (struct riscv_subset_t): Ditto.
21411         (class riscv_subset_list): Ditto.
21412         * config/riscv/riscv-subset.h (RISCV_DONT_CARE_VERSION): Move
21413         from riscv-common.c.
21414         (struct riscv_subset_t): Ditto.
21415         (class riscv_subset_list): Ditto.
21416         * config/riscv/t-riscv ($(common_out_file)): Add file
21417         dependency.
21418
21419 2021-01-07  Jakub Jelinek  <jakub@redhat.com>
21420
21421         PR target/98567
21422         * config/i386/i386.md (*bmi_blsi_<mode>_cmp, *bmi_blsi_<mode>_ccno):
21423         New define_insn patterns.
21424
21425 2021-01-07  Richard Sandiford  <richard.sandiford@arm.com>
21426
21427         * config/aarch64/aarch64-sve.md (@cond_<SVE_INT_UNARY:optab><mode>)
21428         (*cond_<SVE_INT_UNARY:optab><mode>_2): Extend from SVE_FULL_I to SVE_I.
21429         (*cond_<SVE_INT_UNARY:optab><mode>_any): Likewise.
21430
21431 2021-01-07  Richard Sandiford  <richard.sandiford@arm.com>
21432
21433         PR tree-optimization/98560
21434         * internal-fn.def (IFN_VCONDU, IFN_VCONDEQ): Use type vec_cond.
21435         * internal-fn.c (vec_cond_mask_direct): Get the data mode from
21436         argument 1.
21437         (vec_cond_direct): Likewise argument 2.
21438         (vec_condu_direct, vec_condeq_direct): Delete.
21439         (expand_vect_cond_optab_fn): Rename to...
21440         (expand_vec_cond_optab_fn): ...this, replacing old macro.
21441         (expand_vec_condu_optab_fn, expand_vec_condeq_optab_fn): Delete.
21442         (expand_vect_cond_mask_optab_fn): Rename to...
21443         (expand_vec_cond_mask_optab_fn): ...this, replacing old macro.
21444         (direct_vec_cond_mask_optab_supported_p): Treat the optab as a
21445         convert optab.
21446         (direct_vec_cond_optab_supported_p): Likewise.
21447         (direct_vec_condu_optab_supported_p): Delete.
21448         (direct_vec_condeq_optab_supported_p): Delete.
21449         * gimple-isel.cc: Include internal-fn.h.
21450         (gimple_expand_vec_cond_expr): Check that IFN_VCONDEQ is supported
21451         before using it.
21452
21453 2021-01-07  Richard Sandiford  <richard.sandiford@arm.com>
21454
21455         PR tree-optimization/98560
21456         * gimple-isel.cc (gimple_expand_vec_cond_expr): If we fail to use
21457         IFN_VCOND{,U,EQ}, fall back on IFN_VCOND_MASK.
21458
21459 2021-01-07  Uroš Bizjak  <ubizjak@gmail.com>
21460
21461         * config/i386/i386.md (insn): Merge from plusminus_insn, shift_insn,
21462         rotate_insn and optab code attributes.
21463         Update all uses to merged code attribute.
21464         * config/i386/sse.md: Update all uses to merged code attribute.
21465         * config/i386/mmx.md: Update all uses to merged code attribute.
21466
21467 2021-01-07  Jakub Jelinek  <jakub@redhat.com>
21468
21469         PR tree-optimization/98568
21470         * gimple-ssa-store-merging.c (bswap_view_convert): New function.
21471         (bswap_replace): Use it.
21472
21473 2021-01-06  Vladimir N. Makarov  <vmakarov@redhat.com>
21474
21475         PR rtl-optimization/97978
21476         * lra-int.h (lra_hard_reg_split_p): New external.
21477         * lra.c (lra_hard_reg_split_p): New global.
21478         (lra): Set up lra_hard_reg_split_p after splitting a hard reg.
21479         * lra-assigns.c (lra_assign): Don't check allocation correctness
21480         after hard reg splitting.
21481
21482 2021-01-06  Martin Sebor  <msebor@redhat.com>
21483
21484         PR c++/98305
21485         * builtins.c (new_delete_mismatch_p): New overload.
21486         (new_delete_mismatch_p (tree, tree)): Call it.
21487
21488 2021-01-06  Alexandre Oliva  <oliva@adacore.com>
21489
21490         * Makefile.in (T_GLIMITS_H): New.
21491         (stmp-int-hdrs): Depend on it, use it.
21492         * config/t-vxworks (T_GLIMITS_H): Override it.
21493         (vxw-glimits.h): New.
21494
21495 2021-01-06  Richard Biener  <rguenther@suse.de>
21496
21497         PR tree-optimization/98513
21498         * value-range.cc (intersect_ranges): Compare the upper bounds
21499         for the expected relation.
21500
21501 2021-01-06  Gerald Pfeifer  <gerald@pfeifer.com>
21502
21503         Revert:
21504         2020-12-28  Gerald Pfeifer  <gerald@pfeifer.com>
21505
21506         * doc/standards.texi (HSAIL): Remove section.
21507
21508 2021-01-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>
21509
21510         * configure: Re-generate.
21511
21512 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
21513
21514         * doc/invoke.texi (-std=c++20): Adjust for the publication of
21515         ISO 14882:2020 standard.
21516         * doc/standards.texi: Likewise.
21517
21518 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
21519
21520         PR tree-optimization/94802
21521         * expr.h (maybe_optimize_sub_cmp_0): Declare.
21522         * expr.c: Include tree-pretty-print.h and flags.h.
21523         (maybe_optimize_sub_cmp_0): New function.
21524         (do_store_flag): Use it.
21525         * cfgexpand.c (expand_gimple_cond): Likewise.
21526
21527 2021-01-05  Richard Sandiford  <richard.sandiford@arm.com>
21528
21529         * mux-utils.h (pointer_mux::m_ptr): Tweak description of contents.
21530         * rtlanal.c (simple_regno_set): Tweak description to clarify the
21531         RMW condition.
21532
21533 2021-01-05  Richard Biener  <rguenther@suse.de>
21534
21535         PR tree-optimization/98516
21536         * tree-vect-slp.c (vect_optimize_slp): Permute the incoming
21537         lanes when materializing on a VEC_PERM node.
21538         (vectorizable_slp_permutation): Dump the permute properly.
21539
21540 2021-01-05  Richard Biener  <rguenther@suse.de>
21541
21542         * tree-vect-slp.c (vect_slp_region): Move debug counter
21543         to cover individual subgraphs.
21544
21545 2021-01-05  Richard Biener  <rguenther@suse.de>
21546
21547         PR tree-optimization/98428
21548         * tree-vect-slp.c (vect_build_slp_tree_1): Properly reject
21549         vector lane extracts for loop vectorization.
21550
21551 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
21552
21553         PR tree-optimization/98514
21554         * tree-ssa-reassoc.c (bb_rank): Change type from long * to
21555         int64_t *.
21556         (operand_rank): Change type from hash_map<tree, long> to
21557         hash_map<tree, int64_t>.
21558         (phi_rank): Change return type from long to int64_t.
21559         (loop_carried_phi): Change block_rank variable type from long to
21560         int64_t.
21561         (propagate_rank): Change return type, rank parameter type and
21562         op_rank variable type from long to int64_t.
21563         (find_operand_rank): Change return type from long to int64_t
21564         and change slot variable type from long * to int64_t *.
21565         (insert_operand_rank): Change rank parameter type from long to
21566         int64_t.
21567         (get_rank): Change return type and rank variable type from long to
21568         int64_t.  Use PRId64 instead of ld to print the rank.
21569         (init_reassoc): Change rank variable type from long to int64_t
21570         and adjust correspondingly bb_rank and operand_rank initialization.
21571
21572 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
21573
21574         PR tree-optimization/96928
21575         * tree-ssa-phiopt.c (xor_replacement): New function.
21576         (tree_ssa_phiopt_worker): Call it.
21577
21578 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
21579
21580         PR tree-optimization/96930
21581         * match.pd ((A / (1 << B)) -> (A >> B)): If A is extended
21582         from narrower value which has the same type as 1 << B, perform
21583         the right shift on the narrower value followed by extension.
21584
21585 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
21586
21587         PR tree-optimization/96239
21588         * gimple-ssa-store-merging.c (maybe_optimize_vector_constructor): New
21589         function.
21590         (get_status_for_store_merging): Don't return BB_INVALID for blocks
21591         with potential bswap optimizable CONSTRUCTORs.
21592         (pass_store_merging::execute): Optimize vector CONSTRUCTORs with bswap
21593         if possible.
21594
21595 2021-01-05  Richard Biener  <rguenther@suse.de>
21596
21597         PR tree-optimization/98381
21598         * tree.c (vector_element_bits): Properly compute bool vector
21599         element size.
21600         * tree-vect-loop.c (vectorizable_live_operation): Properly
21601         compute the last lane bit offset.
21602
21603 2021-01-05  Uroš Bizjak  <ubizjak@gmail.com>
21604
21605         PR target/98522
21606         * config/i386/sse.md (sse_cvtps2pi): Redefine as define_insn_and_split.
21607         Clear the top 64 bytes of the input XMM register.
21608         (sse_cvttps2pi): Ditto.
21609
21610 2021-01-05  Uroš Bizjak  <ubizjak@gmail.com>
21611
21612         PR target/98521
21613         * config/i386/xopintrin.h (_mm256_cmov_si256): New.
21614
21615 2021-01-05  H.J. Lu  <hjl.tools@gmail.com>
21616
21617         PR target/98495
21618         * config/i386/xmmintrin.h (_mm_extract_pi16): Cast to unsigned
21619         short first.
21620
21621 2021-01-05  Claudiu Zissulescu  <claziss@synopsys.com>
21622
21623         * config/arc/arc.md (maddsidi4_split): Use ACC_REG_FIRST.
21624         (umaddsidi4_split): Likewise.
21625
21626 2021-01-05  liuhongt  <hongtao.liu@intel.com>
21627
21628         PR target/98461
21629         * config/i386/sse.md (*sse2_pmovskb_zexthisi): New
21630         define_insn_and_split for zero_extend of subreg HI of pmovskb
21631         result.
21632         (*sse2_pmovskb_zexthisi): Add new combine splitters for
21633         zero_extend of not of subreg HI of pmovskb result.
21634
21635 2021-01-05  Richard Sandiford  <richard.sandiford@arm.com>
21636
21637         PR target/97269
21638         * explow.c (convert_memory_address_addr_space_1): Handle UNSPECs
21639         nested in CONSTs.
21640         * config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Use
21641         convert_memory_address to convert symbolic immediates to ptr_mode
21642         before forcing them to memory.
21643
21644 2021-01-05  Richard Sandiford  <richard.sandiford@arm.com>
21645
21646         PR rtl-optimization/97144
21647         * recog.c (constrain_operands): Initialize matching_operand
21648         for each alternative, rather than only doing it once.
21649
21650 2021-01-05  Richard Sandiford  <richard.sandiford@arm.com>
21651
21652         PR rtl-optimization/98403
21653         * rtl-ssa/changes.cc (function_info::finalize_new_accesses): Explain
21654         why we don't remove call clobbers.
21655         (function_info::apply_changes_to_insn): Don't attempt to add
21656         call clobbers here.
21657
21658 2021-01-05  Richard Sandiford  <richard.sandiford@arm.com>
21659
21660         PR tree-optimization/98371
21661         * tree-vect-loop.c (vect_reanalyze_as_main_loop): New function.
21662         (vect_analyze_loop): If an epilogue loop appears to be cheaper
21663         than the main loop, re-analyze it as a main loop before adopting
21664         it as a main loop.
21665
21666 2021-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21667
21668         PR c++/98316
21669         * configure.ac (NETLIBS): Determine using AX_LIB_SOCKET_NSL.
21670         * aclocal.m4, configure: Regenerate.
21671         * Makefile.in (NETLIBS): Define.
21672         (BACKEND): Remove $(CODYLIB).
21673
21674 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
21675
21676         PR rtl-optimization/98334
21677         * simplify-rtx.c (simplify_context::simplify_binary_operation_1):
21678         Optimize (X - 1) * Y + Y to X * Y or (X + 1) * Y - Y to X * Y.
21679
21680 2021-01-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
21681
21682         * tree-inline.c (expand_call_inline): Restore input_location.
21683         Return result from recursive call.
21684
21685 2021-01-04  Richard Sandiford  <richard.sandiford@arm.com>
21686
21687         PR tree-optimization/95401
21688         * config/aarch64/aarch64-sve-builtins.cc
21689         (gimple_folder::load_store_cookie): Use bits rather than bytes
21690         for the alignment argument to IFN_MASK_LOAD and IFN_MASK_STORE.
21691         * gimple-fold.c (gimple_fold_mask_load_store_mem_ref): Likewise.
21692         * tree-vect-stmts.c (vectorizable_store): Likewise.
21693         (vectorizable_load): Likewise.
21694
21695 2021-01-04  Richard Biener  <rguenther@suse.de>
21696
21697         PR tree-optimization/98308
21698         * tree-vect-stmts.c (vectorizable_load): Set invariant mask
21699         SLP vectype.
21700
21701 2021-01-04  Jakub Jelinek  <jakub@redhat.com>
21702
21703         PR tree-optimization/95771
21704         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Handle types
21705         with precision smaller than int's precision and types with precision
21706         twice as large as long long.  Formatting fixes.
21707
21708 2021-01-04  Richard Biener  <rguenther@suse.de>
21709
21710         PR tree-optimization/98464
21711         * tree-ssa-sccvn.c (vn_valueize_for_srt): Rename from ...
21712         (vn_valueize_wrapper): ... this.  Temporarily adjust vn_context_bb.
21713         (process_bb): Adjust.
21714
21715 2021-01-04  Matthew Malcomson  <matthew.malcomson@arm.com>
21716
21717         PR other/98437
21718         * doc/invoke.texi (-fsanitize=address): Fix wording describing
21719         clash with -fsanitize=hwaddress.
21720
21721 2021-01-04  Richard Biener  <rguenther@suse.de>
21722
21723         PR tree-optimization/98282
21724         * tree-ssa-sccvn.c (vn_get_stmt_kind): Classify tcc_reference on
21725         invariants as VN_NARY.
21726
21727 2021-01-04  Richard Sandiford  <richard.sandiford@arm.com>
21728
21729         PR target/89057
21730         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Accept
21731         aarch64_simd_reg_or_zero for operand 2.  Use the combinez patterns
21732         to handle zero operands.
21733
21734 2021-01-04  Richard Sandiford  <richard.sandiford@arm.com>
21735
21736         * config/aarch64/aarch64.c (offset_6bit_signed_scaled_p): New function.
21737         (offset_6bit_unsigned_scaled_p): Fix typo in comment.
21738         (aarch64_sve_prefetch_operand_p): Accept MUL VLs in the range
21739         [-32, 31].
21740
21741 2021-01-04  Richard Biener  <rguenther@suse.de>
21742
21743         PR tree-optimization/98393
21744         * tree-vect-slp.c (vect_build_slp_tree): Properly zero matches
21745         when hitting the limit.
21746
21747 2021-01-04  Richard Biener  <rguenther@suse.de>
21748
21749         PR tree-optimization/98291
21750         * tree-vect-loop.c (vectorizable_reduction): Bypass
21751         associativity check for SLP reductions with VF 1.
21752
21753 2021-01-04  Jakub Jelinek  <jakub@redhat.com>
21754
21755         PR tree-optimization/96782
21756         * match.pd (x == ~x -> false, x != ~x -> true): New simplifications.
21757
21758 2021-01-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
21759
21760         * collect-utils.c (collect_execute): Check dumppfx.
21761         * collect2.c (maybe_run_lto_and_relink, do_link): Pass atsuffix
21762         to collect_execute.
21763         (do_link): Add new parameter atsuffix.
21764         (main): Handle -dumpdir option.  Skip one argument for
21765         -o, -isystem and -B options.
21766         * gcc.c (make_at_file): New helper function.
21767         (close_at_file): Use it.
21768
21769 2021-01-02  Iain Sandoe  <iain@sandoe.co.uk>
21770
21771         * config/darwin.h (MIN_LD64_NO_COAL_SECTS): Adjust.
21772         Amend handling for LD64_VERSION fallback defaults.
21773
21774 2021-01-02  Iain Sandoe  <iain@sandoe.co.uk>
21775
21776         * config.gcc: Compute default version information
21777         from the configured target.  Likewise defaults for
21778         ld64.
21779         * config/darwin10.h: Removed.
21780         * config/darwin12.h: Removed.
21781         * config/darwin9.h: Removed.
21782         * config/rs6000/darwin8.h: Removed.
21783
21784 2021-01-02  Iain Sandoe  <iain@sandoe.co.uk>
21785
21786         * config/darwin9.h (ASM_OUTPUT_ALIGNED_COMMON): Delete.
21787
21788 2021-01-02  Iain Sandoe  <iain@sandoe.co.uk>
21789
21790         * config/darwin9.h (STACK_CHECK_STATIC_BUILTIN): Move from here..
21791         * config/darwin.h (STACK_CHECK_STATIC_BUILTIN): .. to here.
21792
21793 2021-01-02  Iain Sandoe  <iain@sandoe.co.uk>
21794
21795         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move from
21796         here...
21797         * config/darwin.h (LINK_GCC_C_SEQUENCE_SPEC): ... to here.
21798
21799 2021-01-02  Iain Sandoe  <iain@sandoe.co.uk>
21800
21801         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move the spec
21802         for the Darwin10 unwinder stub from here ...
21803         * config/darwin.h (LINK_COMMAND_SPEC_A): ... to here.
21804
21805 2021-01-02  Iain Sandoe  <iain@sandoe.co.uk>
21806
21807         * config/darwin.h (DSYMUTIL_SPEC): Default to DWARF
21808         (ASM_DEBUG_SPEC):Only define if the assembler supports
21809         stabs.
21810         (PREFERRED_DEBUGGING_TYPE): Default to DWARF.
21811         (DARWIN_PREFER_DWARF): Define.
21812         * config/darwin9.h (PREFERRED_DEBUGGING_TYPE): Remove.
21813         (DARWIN_PREFER_DWARF): Likewise
21814         (DSYMUTIL_SPEC): Likewise.
21815         (COLLECT_RUN_DSYMUTIL): Likewise.
21816         (ASM_DEBUG_SPEC): Likewise.
21817         (ASM_DEBUG_OPTION_SPEC): Likewise.
21818
21819 2021-01-02  Jan Hubicka  <jh@suse.cz>
21820
21821         * cfg.c (free_block): ggc_free bb.
21822
21823 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
21824
21825         * gcc.c (process_command): Update copyright notice dates.
21826         * gcov-dump.c (print_version): Ditto.
21827         * gcov.c (print_version): Ditto.
21828         * gcov-tool.c (print_version): Ditto.
21829         * gengtype.c (create_file): Ditto.
21830         * doc/cpp.texi: Bump @copying's copyright year.
21831         * doc/cppinternals.texi: Ditto.
21832         * doc/gcc.texi: Ditto.
21833         * doc/gccint.texi: Ditto.
21834         * doc/gcov.texi: Ditto.
21835         * doc/install.texi: Ditto.
21836         * doc/invoke.texi: Ditto.
21837
21838 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
21839
21840         * ChangeLog-2020: Rotate ChangeLog.  New file.
21841
21842 \f
21843 Copyright (C) 2021 Free Software Foundation, Inc.
21844
21845 Copying and distribution of this file, with or without modification,
21846 are permitted in any medium without royalty provided the copyright
21847 notice and this notice are preserved.