1 2020-01-13 Jason Merrill <jason@redhat.com>
3 PR c++/33799 - destroy return value if local cleanup throws.
4 * gimplify.c (gimplify_return_expr): Handle COMPOUND_EXPR.
6 2020-01-13 Martin Liska <mliska@suse.cz>
8 * ipa-cp.c (get_max_overall_size): Use newly
9 renamed param param_ipa_cp_unit_growth.
10 * params.opt: Remove legacy param name.
12 2020-01-13 Martin Sebor <msebor@redhat.com>
14 PR tree-optimization/93213
15 * tree-ssa-strlen.c (handle_store): Only allow single-byte nul-over-nul
16 stores to be eliminated.
18 2020-01-13 Martin Liska <mliska@suse.cz>
20 * opts.c (print_help): Do not print CL_PARAM
21 and CL_WARNING for CL_OPTIMIZATION.
23 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
26 * doc/invoke.texi (Warning Options): Add caveat about some warnings
27 depending on optimization settings.
29 2020-01-13 Jakub Jelinek <jakub@redhat.com>
31 PR tree-optimization/90838
32 * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
33 SCALAR_INT_TYPE_MODE directly in CTZ_DEFINED_VALUE_AT_ZERO macro
34 argument rather than to initialize temporary for targets that
35 don't use the mode argument at all. Initialize ctzval to avoid
38 2020-01-10 Thomas Schwinge <thomas@codesourcery.com>
40 * tree.h (OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT): New definition.
41 * tree-core.h: Document it.
42 * gimplify.c (gimplify_omp_workshare): Set it.
43 * omp-low.c (lower_omp_target): Use it.
44 * tree-pretty-print.c (dump_omp_clause): Print it.
46 * omp-low.c (lower_omp_target) <OMP_CLAUSE_USE_DEVICE_PTR etc.>:
47 Assert that for OpenACC we always have 'GOMP_MAP_USE_DEVICE_PTR'.
49 2020-01-10 David Malcolm <dmalcolm@redhat.com>
51 * Makefile.in (OBJS): Add tree-diagnostic-path.o.
52 * common.opt (fdiagnostics-path-format=): New option.
53 (diagnostic_path_format): New enum.
54 (fdiagnostics-show-path-depths): New option.
55 * coretypes.h (diagnostic_event_id_t): New forward decl.
56 * diagnostic-color.c (color_dict): Add "path".
57 * diagnostic-event-id.h: New file.
58 * diagnostic-format-json.cc (json_from_expanded_location): Make
60 (json_end_diagnostic): Call context->make_json_for_path if it
61 exists and the diagnostic has a path.
62 (diagnostic_output_format_init): Clear context->print_path.
63 * diagnostic-path.h: New file.
64 * diagnostic-show-locus.c (colorizer::set_range): Special-case
65 when printing a run of events in a diagnostic_path so that they
66 all get the same color.
67 (layout::m_diagnostic_path_p): New field.
68 (layout::layout): Initialize it.
69 (layout::print_any_labels): Don't colorize the label text for an
70 event in a diagnostic_path.
71 (gcc_rich_location::add_location_if_nearby): Add
72 "restrict_to_current_line_spans" and "label" params. Pass the
73 former to layout.maybe_add_location_range; pass the latter
74 when calling add_range.
75 * diagnostic.c: Include "diagnostic-path.h".
76 (diagnostic_initialize): Initialize context->path_format and
77 context->show_path_depths.
78 (diagnostic_show_any_path): New function.
79 (diagnostic_path::interprocedural_p): New function.
80 (diagnostic_report_diagnostic): Call diagnostic_show_any_path.
81 (simple_diagnostic_path::num_events): New function.
82 (simple_diagnostic_path::get_event): New function.
83 (simple_diagnostic_path::add_event): New function.
84 (simple_diagnostic_event::simple_diagnostic_event): New ctor.
85 (simple_diagnostic_event::~simple_diagnostic_event): New dtor.
86 (debug): New overload taking a diagnostic_path *.
87 * diagnostic.def (DK_DIAGNOSTIC_PATH): New.
88 * diagnostic.h (enum diagnostic_path_format): New enum.
89 (json::value): New forward decl.
90 (diagnostic_context::path_format): New field.
91 (diagnostic_context::show_path_depths): New field.
92 (diagnostic_context::print_path): New callback field.
93 (diagnostic_context::make_json_for_path): New callback field.
94 (diagnostic_show_any_path): New decl.
95 (json_from_expanded_location): New decl.
96 * doc/invoke.texi (-fdiagnostics-path-format=): New option.
97 (-fdiagnostics-show-path-depths): New option.
98 (-fdiagnostics-color): Add "path" to description of default
99 GCC_COLORS; describe it.
100 (-fdiagnostics-format=json): Document how diagnostic paths are
101 represented in the JSON output format.
102 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
103 Add optional params "restrict_to_current_line_spans" and "label".
104 * opts.c (common_handle_option): Handle
105 OPT_fdiagnostics_path_format_ and
106 OPT_fdiagnostics_show_path_depths.
107 * pretty-print.c: Include "diagnostic-event-id.h".
108 (pp_format): Implement "%@" format code for printing
109 diagnostic_event_id_t *.
110 (selftest::test_pp_format): Add tests for "%@".
111 * selftest-run-tests.c (selftest::run_tests): Call
112 selftest::tree_diagnostic_path_cc_tests.
113 * selftest.h (selftest::tree_diagnostic_path_cc_tests): New decl.
114 * toplev.c (general_init): Initialize global_dc->path_format and
115 global_dc->show_path_depths.
116 * tree-diagnostic-path.cc: New file.
117 * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Make
118 non-static. Drop "diagnostic" param in favor of storing the
119 original value of "where" and re-using it.
120 (virt_loc_aware_diagnostic_finalizer): Update for dropped param of
121 maybe_unwind_expanded_macro_loc.
122 (tree_diagnostics_defaults): Initialize context->print_path and
123 context->make_json_for_path.
124 * tree-diagnostic.h (default_tree_diagnostic_path_printer): New
126 (default_tree_make_json_for_path): New decl.
127 (maybe_unwind_expanded_macro_loc): New decl.
129 2020-01-10 Jakub Jelinek <jakub@redhat.com>
131 PR tree-optimization/93210
132 * fold-const.h (native_encode_initializer,
133 can_native_interpret_type_p): Declare.
134 * fold-const.c (native_encode_string): Fix up handling with off != -1,
136 (native_encode_initializer): New function, moved from dwarf2out.c.
137 Adjust to native_encode_expr compatible arguments, including dry-run
138 and partial extraction modes. Don't handle STRING_CST.
139 (can_native_interpret_type_p): No longer static.
140 * gimple-fold.c (fold_ctor_reference): For native_encode_expr, verify
141 offset / BITS_PER_UNIT fits into int and don't call it if
142 can_native_interpret_type_p fails. If suboff is NULL and for
143 CONSTRUCTOR fold_{,non}array_ctor_reference returns NULL, retry with
144 native_encode_initializer.
145 (fold_const_aggregate_ref_1): Formatting fix.
146 * dwarf2out.c (native_encode_initializer): Moved to fold-const.c.
147 (tree_add_const_value_attribute): Adjust caller.
149 PR tree-optimization/90838
150 * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
151 SCALAR_INT_TYPE_MODE instead of TYPE_MODE as operand of
152 CTZ_DEFINED_VALUE_AT_ZERO.
154 2020-01-10 Vladimir Makarov <vmakarov@redhat.com>
157 * lra-constraints.c (match_reload): Permit input operands have the
158 same mode as output while other input operands have a different
161 2020-01-10 Wilco Dijkstra <wdijkstr@arm.com>
163 PR tree-optimization/90838
164 * tree-ssa-forwprop.c (check_ctz_array): Add new function.
165 (check_ctz_string): Likewise.
166 (optimize_count_trailing_zeroes): Likewise.
167 (simplify_count_trailing_zeroes): Likewise.
168 (pass_forwprop::execute): Try ctz simplification.
169 * match.pd: Add matching for ctz idioms.
171 2020-01-10 Stam Markianos-Wright <stam.markianos-wright@arm.com>
173 * config/aarch64/aarch64.c (aarch64_invalid_conversion): New function
175 (aarch64_invalid_unary_op): New function for target hook.
176 (aarch64_invalid_binary_op): New function for target hook.
178 2020-01-10 Stam Markianos-Wright <stam.markianos-wright@arm.com>
180 * config.gcc: Add arm_bf16.h.
181 * config/aarch64/aarch64-builtins.c
182 (aarch64_simd_builtin_std_type): Add BFmode.
183 (aarch64_init_simd_builtin_types): Define element types for vector
185 (aarch64_init_bf16_types): New function.
186 (aarch64_general_init_builtins): Add arm_init_bf16_types function call.
187 * config/aarch64/aarch64-modes.def: Add BFmode and V4BF, V8BF vector
189 * config/aarch64/aarch64-simd-builtin-types.def: Add BF SIMD types.
190 * config/aarch64/aarch64-simd.md: Add BF vector types to NEON move
192 * config/aarch64/aarch64.h (AARCH64_VALID_SIMD_DREG_MODE): Add V4BF.
193 (AARCH64_VALID_SIMD_QREG_MODE): Add V8BF.
194 * config/aarch64/aarch64.c
195 (aarch64_classify_vector_mode): Add support for BF types.
196 (aarch64_gimplify_va_arg_expr): Add support for BF types.
197 (aarch64_vq_mode): Add support for BF types.
198 (aarch64_simd_container_mode): Add support for BF types.
199 (aarch64_mangle_type): Add support for BF scalar type.
200 * config/aarch64/aarch64.md: Add BFmode to movhf pattern.
201 * config/aarch64/arm_bf16.h: New file.
202 * config/aarch64/arm_neon.h: Add arm_bf16.h and Bfloat vector types.
203 * config/aarch64/iterators.md: Add BF types to mode attributes.
204 (HFBF, GPF_TF_F16_MOV, VDMOV, VQMOV, VQMOV_NO2Em VALL_F16MOV): New.
206 2020-01-10 Jason Merrill <jason@redhat.com>
208 PR c++/93173 - incorrect tree sharing.
209 * gimplify.c (copy_if_shared): No longer static.
210 * gimplify.h: Declare it.
212 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
214 * doc/invoke.texi (-msve-vector-bits=): Document that
215 -msve-vector-bits=128 now generates VL-specific code for
216 little-endian targets.
217 * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Use
218 build_vector_type_for_mode to construct the data vector types.
219 * config/aarch64/aarch64.c (aarch64_convert_sve_vector_bits): Generate
220 VL-specific code for -msve-vector-bits=128 on little-endian targets.
221 (aarch64_simd_container_mode): Always prefer Advanced SIMD modes
224 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
226 * config/aarch64/aarch64.c (aarch64_evpc_sel): Fix gen_vcond_mask
229 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
231 * config/aarch64/aarch64-builtins.c
232 (aarch64_builtin_vectorized_function): Check for specific vector modes,
233 rather than checking the number of elements and the element mode.
235 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
237 * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
238 get_related_vectype_for_scalar_type rather than build_vector_type
239 to create the index type for a conditional reduction.
241 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
243 * tree-vect-loop.c (update_epilogue_loop_vinfo): Update DR_REF
244 for any type of gather or scatter, including strided accesses.
246 2020-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
248 * tree-vectorizer.h (get_dr_vinfo_offset): Add missing function
251 2020-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
253 * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Use
255 * tree-vect-loop.c (update_epilogue_loop_vinfo): Remove orig_drs_init
256 parameter and its use to reset DR_OFFSET's.
257 (vect_transform_loop): Remove orig_drs_init argument.
258 * tree-vect-loop-manip.c (vect_update_init_of_dr): Update the offset
259 member of dr_vec_info rather than the offset of the associated
260 data_reference's innermost_loop_behavior.
261 (vect_update_init_of_dr): Pass dr_vec_info instead of data_reference.
262 (vect_do_peeling): Remove orig_drs_init parameter and its construction.
263 * tree-vect-stmts.c (check_scan_store): Replace use of DR_OFFSET with
265 (vectorizable_store): Likewise.
266 (vectorizable_load): Likewise.
268 2020-01-10 Richard Biener <rguenther@suse.de>
270 * gimple-ssa-store-merging
271 (pass_store_merging::terminate_all_aliasing_chains): Cache alias info.
273 2020-01-10 Martin Liska <mliska@suse.cz>
276 * ipa-inline-analysis.c (offline_size): Make proper parenthesis
277 encapsulation that was there before r280040.
279 2020-01-10 Richard Biener <rguenther@suse.de>
282 * tree-eh.c (sink_clobbers): Move clobbers to out-of-IL
283 sequences to avoid walking them again for secondary opportunities.
284 (pass_lower_eh_dispatch::execute): Instead actually insert
287 2020-01-10 Richard Biener <rguenther@suse.de>
290 * tree-eh.c (redirect_eh_edge_1): Avoid some work if possible.
291 (cleanup_all_empty_eh): Walk landing pads in reverse order to
294 2020-01-10 Martin Jambor <mjambor@suse.cz>
296 * params.opt (param_ipa_sra_max_replacements): Mark as Optimization.
297 * ipa-sra.c (pull_accesses_from_callee): New parameter caller, use it
298 to get param_ipa_sra_max_replacements.
299 (param_splitting_across_edge): Pass the caller to
300 pull_accesses_from_callee.
302 2020-01-10 Martin Jambor <mjambor@suse.cz>
304 * params.opt (param_ipcp_unit_growth): Mark as Optimization.
305 * ipa-cp.c (max_new_size): Removed.
306 (orig_overall_size): New variable.
307 (get_max_overall_size): New function.
308 (estimate_local_effects): Use it. Adjust dump.
309 (decide_about_value): Likewise.
310 (ipcp_propagate_stage): Do not calculate max_new_size, just store
311 orig_overall_size. Adjust dump.
312 (ipa_cp_c_finalize): Clear orig_overall_size instead of max_new_size.
314 2020-01-10 Martin Jambor <mjambor@suse.cz>
316 * params.opt (param_ipa_max_agg_items): Mark as Optimization
317 * ipa-cp.c (merge_agg_lats_step): New parameter max_agg_items, use
318 instead of param_ipa_max_agg_items.
319 (merge_aggregate_lattices): Extract param_ipa_max_agg_items from
320 optimization info for the callee.
322 2020-01-09 Kwok Cheung Yeung <kcy@codesourcery.com>
324 * lto-streamer-in.c (input_function): Remove streamed-in inline debug
325 markers if debug_inline_points is false.
327 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
329 * config.gcc (aarch64*-*-*): Add aarch64-sve-builtins-sve2.o to
331 * config/aarch64/t-aarch64 (aarch64-sve-builtins.o): Depend on
332 aarch64-sve-builtins-base.def, aarch64-sve-builtins-sve2.def and
333 aarch64-sve-builtins-sve2.h.
334 (aarch64-sve-builtins-sve2.o): New rule.
335 * config/aarch64/aarch64.h (AARCH64_ISA_SVE2_AES): New macro.
336 (AARCH64_ISA_SVE2_BITPERM, AARCH64_ISA_SVE2_SHA3): Likewise.
337 (AARCH64_ISA_SVE2_SM4, TARGET_SVE2_AES, TARGET_SVE2_BITPERM): Likewise.
338 (TARGET_SVE2_SHA, TARGET_SVE2_SM4): Likewise.
339 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
340 TARGET_SVE2_AES, TARGET_SVE2_BITPERM, TARGET_SVE2_SHA3 and
342 * config/aarch64/aarch64-sve.md: Update comments with SVE2
343 instructions that are handled here.
344 (@cond_asrd<mode>): Generalize to...
345 (@cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>): ...this.
346 (*cond_asrd<mode>_2): Generalize to...
347 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_2): ...this.
348 (*cond_asrd<mode>_z): Generalize to...
349 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_z): ...this.
350 * config/aarch64/aarch64.md (UNSPEC_LDNT1_GATHER): New unspec.
351 (UNSPEC_STNT1_SCATTER, UNSPEC_WHILEGE, UNSPEC_WHILEGT): Likewise.
352 (UNSPEC_WHILEHI, UNSPEC_WHILEHS): Likewise.
353 * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt<mode>): New
355 (@aarch64_gather_ldnt_<ANY_EXTEND:optab><SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
356 (@aarch64_scatter_stnt<mode>): Likewise.
357 (@aarch64_scatter_stnt_<SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
358 (@aarch64_mul_lane_<mode>): Likewise.
359 (@aarch64_sve_suqadd<mode>_const): Likewise.
360 (*<sur>h<addsub><mode>): Generalize to...
361 (@aarch64_pred_<SVE2_COND_INT_BINARY_REV:sve_int_op><mode>): ...this
363 (@cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>): New expander.
364 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_2): New pattern.
365 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_3): Likewise.
366 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_any): Likewise.
367 (*cond_<SVE2_COND_INT_BINARY_NOREV:sve_int_op><mode>_z): Likewise.
368 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op><mode>):: Likewise.
369 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op>_lane_<mode>): Likewise.
370 (@aarch64_pred_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): Likewise.
371 (@cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): New expander.
372 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_2): New pattern.
373 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_3): Likewise.
374 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_any): Likewise.
375 (@aarch64_sve_<SVE2_INT_TERNARY:sve_int_op><mode>): Likewise.
376 (@aarch64_sve_<SVE2_INT_TERNARY_LANE:sve_int_op>_lane_<mode>)
377 (@aarch64_sve_add_mul_lane_<mode>): Likewise.
378 (@aarch64_sve_sub_mul_lane_<mode>): Likewise.
379 (@aarch64_sve2_xar<mode>): Likewise.
380 (@aarch64_sve2_bcax<mode>): Likewise.
381 (*aarch64_sve2_eor3<mode>): Rename to...
382 (@aarch64_sve2_eor3<mode>): ...this.
383 (@aarch64_sve2_bsl<mode>): New expander.
384 (@aarch64_sve2_nbsl<mode>): Likewise.
385 (@aarch64_sve2_bsl1n<mode>): Likewise.
386 (@aarch64_sve2_bsl2n<mode>): Likewise.
387 (@aarch64_sve_add_<SHIFTRT:sve_int_op><mode>): Likewise.
388 (*aarch64_sve2_sra<mode>): Add MOVPRFX support.
389 (@aarch64_sve_add_<VRSHR_N:sve_int_op><mode>): New pattern.
390 (@aarch64_sve_<SVE2_INT_SHIFT_INSERT:sve_int_op><mode>): Likewise.
391 (@aarch64_sve2_<USMAX:su>aba<mode>): New expander.
392 (*aarch64_sve2_<USMAX:su>aba<mode>): New pattern.
393 (@aarch64_sve_<SVE2_INT_BINARY_WIDE:sve_int_op><mode>): Likewise.
394 (<su>mull<bt><Vwide>): Generalize to...
395 (@aarch64_sve_<SVE2_INT_BINARY_LONG:sve_int_op><mode>): ...this new
397 (@aarch64_sve_<SVE2_INT_BINARY_LONG_lANE:sve_int_op>_lane_<mode>)
398 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_LONG:sve_int_op><mode>)
399 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG:sve_int_op><mode>)
400 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
401 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG:sve_int_op><mode>)
402 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
403 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG:sve_int_op><mode>)
404 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
405 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG:sve_int_op><mode>)
406 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
407 (@aarch64_sve_<SVE2_FP_TERNARY_LONG:sve_fp_op><mode>): New patterns.
408 (@aarch64_<SVE2_FP_TERNARY_LONG_LANE:sve_fp_op>_lane_<mode>)
409 (@aarch64_sve_<SVE2_INT_UNARY_NARROWB:sve_int_op><mode>): Likewise.
410 (@aarch64_sve_<SVE2_INT_UNARY_NARROWT:sve_int_op><mode>): Likewise.
411 (@aarch64_sve_<SVE2_INT_BINARY_NARROWB:sve_int_op><mode>): Likewise.
412 (@aarch64_sve_<SVE2_INT_BINARY_NARROWT:sve_int_op><mode>): Likewise.
413 (<SHRNB:r>shrnb<mode>): Generalize to...
414 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWB:sve_int_op><mode>): ...this
416 (<SHRNT:r>shrnt<mode>): Generalize to...
417 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWT:sve_int_op><mode>): ...this
419 (@aarch64_pred_<SVE2_INT_BINARY_PAIR:sve_int_op><mode>): New pattern.
420 (@aarch64_pred_<SVE2_FP_BINARY_PAIR:sve_fp_op><mode>): Likewise.
421 (@cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>): New expander.
422 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_2): New pattern.
423 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_z): Likewise.
424 (@aarch64_sve_<SVE2_INT_CADD:optab><mode>): Likewise.
425 (@aarch64_sve_<SVE2_INT_CMLA:optab><mode>): Likewise.
426 (@aarch64_<SVE2_INT_CMLA:optab>_lane_<mode>): Likewise.
427 (@aarch64_sve_<SVE2_INT_CDOT:optab><mode>): Likewise.
428 (@aarch64_<SVE2_INT_CDOT:optab>_lane_<mode>): Likewise.
429 (@aarch64_pred_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): Likewise.
430 (@cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New expander.
431 (*cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New pattern.
432 (@aarch64_sve2_cvtnt<mode>): Likewise.
433 (@aarch64_pred_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): Likewise.
434 (@cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): New expander.
435 (*cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>_any): New pattern.
436 (@aarch64_sve2_cvtxnt<mode>): Likewise.
437 (@aarch64_pred_<SVE2_U32_UNARY:sve_int_op><mode>): Likewise.
438 (@cond_<SVE2_U32_UNARY:sve_int_op><mode>): New expander.
439 (*cond_<SVE2_U32_UNARY:sve_int_op><mode>): New pattern.
440 (@aarch64_pred_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): Likewise.
441 (@cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New expander.
442 (*cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New pattern.
443 (@aarch64_sve2_pmul<mode>): Likewise.
444 (@aarch64_sve_<SVE2_PMULL:optab><mode>): Likewise.
445 (@aarch64_sve_<SVE2_PMULL_PAIR:optab><mode>): Likewise.
446 (@aarch64_sve2_tbl2<mode>): Likewise.
447 (@aarch64_sve2_tbx<mode>): Likewise.
448 (@aarch64_sve_<SVE2_INT_BITPERM:sve_int_op><mode>): Likewise.
449 (@aarch64_sve2_histcnt<mode>): Likewise.
450 (@aarch64_sve2_histseg<mode>): Likewise.
451 (@aarch64_pred_<SVE2_MATCH:sve_int_op><mode>): Likewise.
452 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_cc): Likewise.
453 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_ptest): Likewise.
454 (aarch64_sve2_aes<CRYPTO_AES:aes_op>): Likewise.
455 (aarch64_sve2_aes<CRYPTO_AESMC:aesmc_op>): Likewise.
456 (*aarch64_sve2_aese_fused, *aarch64_sve2_aesd_fused): Likewise.
457 (aarch64_sve2_rax1, aarch64_sve2_sm4e, aarch64_sve2_sm4ekey): Likewise.
458 (<su>mulh<r>s<mode>3): Update after above pattern name changes.
459 * config/aarch64/iterators.md (VNx16QI_ONLY, VNx4SF_ONLY)
460 (SVE_STRUCT2, SVE_FULL_BHI, SVE_FULL_HSI, SVE_FULL_HDI)
461 (SVE2_PMULL_PAIR_I): New mode iterators.
462 (UNSPEC_ADCLB, UNSPEC_ADCLT, UNSPEC_ADDHNB, UNSPEC_ADDHNT, UNSPEC_BDEP)
463 (UNSPEC_BEXT, UNSPEC_BGRP, UNSPEC_CADD90, UNSPEC_CADD270, UNSPEC_CDOT)
464 (UNSPEC_CDOT90, UNSPEC_CDOT180, UNSPEC_CDOT270, UNSPEC_CMLA)
465 (UNSPEC_CMLA90, UNSPEC_CMLA180, UNSPEC_CMLA270, UNSPEC_COND_FCVTLT)
466 (UNSPEC_COND_FCVTNT, UNSPEC_COND_FCVTX, UNSPEC_COND_FCVTXNT)
467 (UNSPEC_COND_FLOGB, UNSPEC_EORBT, UNSPEC_EORTB, UNSPEC_FADDP)
468 (UNSPEC_FMAXP, UNSPEC_FMAXNMP, UNSPEC_FMLALB, UNSPEC_FMLALT)
469 (UNSPEC_FMLSLB, UNSPEC_FMLSLT, UNSPEC_FMINP, UNSPEC_FMINNMP)
470 (UNSPEC_HISTCNT, UNSPEC_HISTSEG, UNSPEC_MATCH, UNSPEC_NMATCH)
471 (UNSPEC_PMULLB, UNSPEC_PMULLB_PAIR, UNSPEC_PMULLT, UNSPEC_PMULLT_PAIR)
472 (UNSPEC_RADDHNB, UNSPEC_RADDHNT, UNSPEC_RSUBHNB, UNSPEC_RSUBHNT)
473 (UNSPEC_SLI, UNSPEC_SRI, UNSPEC_SABDLB, UNSPEC_SABDLT, UNSPEC_SADDLB)
474 (UNSPEC_SADDLBT, UNSPEC_SADDLT, UNSPEC_SADDWB, UNSPEC_SADDWT)
475 (UNSPEC_SBCLB, UNSPEC_SBCLT, UNSPEC_SMAXP, UNSPEC_SMINP)
476 (UNSPEC_SQCADD90, UNSPEC_SQCADD270, UNSPEC_SQDMULLB, UNSPEC_SQDMULLBT)
477 (UNSPEC_SQDMULLT, UNSPEC_SQRDCMLAH, UNSPEC_SQRDCMLAH90)
478 (UNSPEC_SQRDCMLAH180, UNSPEC_SQRDCMLAH270, UNSPEC_SQRSHRNB)
479 (UNSPEC_SQRSHRNT, UNSPEC_SQRSHRUNB, UNSPEC_SQRSHRUNT, UNSPEC_SQSHRNB)
480 (UNSPEC_SQSHRNT, UNSPEC_SQSHRUNB, UNSPEC_SQSHRUNT, UNSPEC_SQXTNB)
481 (UNSPEC_SQXTNT, UNSPEC_SQXTUNB, UNSPEC_SQXTUNT, UNSPEC_SSHLLB)
482 (UNSPEC_SSHLLT, UNSPEC_SSUBLB, UNSPEC_SSUBLBT, UNSPEC_SSUBLT)
483 (UNSPEC_SSUBLTB, UNSPEC_SSUBWB, UNSPEC_SSUBWT, UNSPEC_SUBHNB)
484 (UNSPEC_SUBHNT, UNSPEC_TBL2, UNSPEC_UABDLB, UNSPEC_UABDLT)
485 (UNSPEC_UADDLB, UNSPEC_UADDLT, UNSPEC_UADDWB, UNSPEC_UADDWT)
486 (UNSPEC_UMAXP, UNSPEC_UMINP, UNSPEC_UQRSHRNB, UNSPEC_UQRSHRNT)
487 (UNSPEC_UQSHRNB, UNSPEC_UQSHRNT, UNSPEC_UQXTNB, UNSPEC_UQXTNT)
488 (UNSPEC_USHLLB, UNSPEC_USHLLT, UNSPEC_USUBLB, UNSPEC_USUBLT)
489 (UNSPEC_USUBWB, UNSPEC_USUBWT): New unspecs.
490 (UNSPEC_SMULLB, UNSPEC_SMULLT, UNSPEC_UMULLB, UNSPEC_UMULLT)
491 (UNSPEC_SMULHS, UNSPEC_SMULHRS, UNSPEC_UMULHS, UNSPEC_UMULHRS)
492 (UNSPEC_RSHRNB, UNSPEC_RSHRNT, UNSPEC_SHRNB, UNSPEC_SHRNT): Move
494 (VNARROW, Ventype): New mode attributes.
495 (Vewtype): Handle VNx2DI. Fix typo in comment.
496 (VDOUBLE): New mode attribute.
497 (sve_lane_con): Handle VNx8HI.
498 (SVE_INT_UNARY): Include ss_abs and ss_neg for TARGET_SVE2.
499 (SVE_INT_BINARY): Likewise ss_plus, us_plus, ss_minus and us_minus.
500 (sve_int_op, sve_int_op_rev): Handle the above codes.
501 (sve_pred_int_rhs2_operand): Likewise.
502 (MULLBT, SHRNB, SHRNT): Delete.
503 (SVE_INT_SHIFT_IMM): New int iterator.
504 (SVE_WHILE): Add UNSPEC_WHILEGE, UNSPEC_WHILEGT, UNSPEC_WHILEHI
505 and UNSPEC_WHILEHS for TARGET_SVE2.
506 (SVE2_U32_UNARY, SVE2_INT_UNARY_NARROWB, SVE2_INT_UNARY_NARROWT)
507 (SVE2_INT_BINARY, SVE2_INT_BINARY_LANE, SVE2_INT_BINARY_LONG)
508 (SVE2_INT_BINARY_LONG_LANE, SVE2_INT_BINARY_NARROWB)
509 (SVE2_INT_BINARY_NARROWT, SVE2_INT_BINARY_PAIR, SVE2_FP_BINARY_PAIR)
510 (SVE2_INT_BINARY_PAIR_LONG, SVE2_INT_BINARY_WIDE): New int iterators.
511 (SVE2_INT_SHIFT_IMM_LONG, SVE2_INT_SHIFT_IMM_NARROWB): Likewise.
512 (SVE2_INT_SHIFT_IMM_NARROWT, SVE2_INT_SHIFT_INSERT, SVE2_INT_CADD)
513 (SVE2_INT_BITPERM, SVE2_INT_TERNARY, SVE2_INT_TERNARY_LANE): Likewise.
514 (SVE2_FP_TERNARY_LONG, SVE2_FP_TERNARY_LONG_LANE, SVE2_INT_CMLA)
515 (SVE2_INT_CDOT, SVE2_INT_ADD_BINARY_LONG, SVE2_INT_QADD_BINARY_LONG)
516 (SVE2_INT_SUB_BINARY_LONG, SVE2_INT_QSUB_BINARY_LONG): Likewise.
517 (SVE2_INT_ADD_BINARY_LONG_LANE, SVE2_INT_QADD_BINARY_LONG_LANE)
518 (SVE2_INT_SUB_BINARY_LONG_LANE, SVE2_INT_QSUB_BINARY_LONG_LANE)
519 (SVE2_COND_INT_UNARY_FP, SVE2_COND_FP_UNARY_LONG): Likewise.
520 (SVE2_COND_FP_UNARY_NARROWB, SVE2_COND_INT_BINARY): Likewise.
521 (SVE2_COND_INT_BINARY_NOREV, SVE2_COND_INT_BINARY_REV): Likewise.
522 (SVE2_COND_INT_SHIFT, SVE2_MATCH, SVE2_PMULL): Likewise.
523 (optab): Handle the new unspecs.
524 (su, r): Remove entries for UNSPEC_SHRNB, UNSPEC_SHRNT, UNSPEC_RSHRNB
526 (lr): Handle the new unspecs.
528 (cmp_op, while_optab_cmp, sve_int_op): Handle the new unspecs.
529 (sve_int_op_rev, sve_int_add_op, sve_int_qadd_op, sve_int_sub_op)
530 (sve_int_qsub_op): New int attributes.
531 (sve_fp_op, rot): Handle the new unspecs.
532 * config/aarch64/aarch64-sve-builtins.h
533 (function_resolver::require_matching_pointer_type): Declare.
534 (function_resolver::resolve_unary): Add an optional boolean argument.
535 (function_resolver::finish_opt_n_resolution): Add an optional
536 type_suffix_index argument.
537 (gimple_folder::redirect_call): Declare.
538 (gimple_expander::prepare_gather_address_operands): Add an optional
540 * config/aarch64/aarch64-sve-builtins.cc: Include
541 aarch64-sve-builtins-sve2.h.
542 (TYPES_b_unsigned, TYPES_b_integer, TYPES_bh_integer): New macros.
543 (TYPES_bs_unsigned, TYPES_hs_signed, TYPES_hs_integer): Likewise.
544 (TYPES_hd_unsigned, TYPES_hsd_signed): Likewise.
545 (TYPES_hsd_integer): Use TYPES_hsd_signed.
546 (TYPES_s_float_hsd_integer, TYPES_s_float_sd_integer): New macros.
547 (TYPES_s_unsigned): Likewise.
548 (TYPES_s_integer): Use TYPES_s_unsigned.
549 (TYPES_sd_signed, TYPES_sd_unsigned): New macros.
550 (TYPES_sd_integer): Use them.
551 (TYPES_d_unsigned): New macro.
552 (TYPES_d_integer): Use it.
553 (TYPES_d_data, TYPES_cvt_long, TYPES_cvt_narrow_s): New macros.
554 (TYPES_cvt_narrow): Likewise.
555 (DEF_SVE_TYPES_ARRAY): Include the new types macros above.
556 (preds_mx): New variable.
557 (function_builder::add_overloaded_function): Allow the new feature
558 set to be more restrictive than the original one.
559 (function_resolver::infer_pointer_type): Remove qualifiers from
560 the pointer type before printing it.
561 (function_resolver::require_matching_pointer_type): New function.
562 (function_resolver::resolve_sv_displacement): Handle functions
563 that don't support 32-bit vector indices or svint32_t vector offsets.
564 (function_resolver::finish_opt_n_resolution): Take the inferred type
565 as a separate argument.
566 (function_resolver::resolve_unary): Optionally treat all forms in
567 the same way as normal merging functions.
568 (gimple_folder::redirect_call): New function.
569 (function_expander::prepare_gather_address_operands): Add an argument
570 that says whether scaled forms are available. If they aren't,
571 handle scaling of vector indices and don't add the extension and
573 (function_expander::map_to_unspecs): If aarch64_sve isn't available,
574 fall back to using cond_* instead.
575 * config/aarch64/aarch64-sve-builtins-functions.h (rtx_code_function):
576 Split out the member variables into...
577 (rtx_code_function_base): ...this new base class.
578 (rtx_code_function_rotated): Inherit rtx_code_function_base.
579 (unspec_based_function): Split out the member variables into...
580 (unspec_based_function_base): ...this new base class.
581 (unspec_based_function_rotated): Inherit unspec_based_function_base.
582 (unspec_based_function_exact_insn): New class.
583 (unspec_based_add_function, unspec_based_add_lane_function)
584 (unspec_based_lane_function, unspec_based_pred_function)
585 (unspec_based_qadd_function, unspec_based_qadd_lane_function)
586 (unspec_based_qsub_function, unspec_based_qsub_lane_function)
587 (unspec_based_sub_function, unspec_based_sub_lane_function): New
589 (unspec_based_fused_function): New class.
590 (unspec_based_mla_function, unspec_based_mls_function): New typedefs.
591 (unspec_based_fused_lane_function): New class.
592 (unspec_based_mla_lane_function, unspec_based_mls_lane_function): New
594 (CODE_FOR_MODE1): New macro.
595 (fixed_insn_function): New class.
596 (while_comparison): Likewise.
597 * config/aarch64/aarch64-sve-builtins-shapes.h (binary_long_lane)
598 (binary_long_opt_n, binary_narrowb_opt_n, binary_narrowt_opt_n)
599 (binary_to_uint, binary_wide, binary_wide_opt_n, compare, compare_ptr)
600 (load_ext_gather_index_restricted, load_ext_gather_offset_restricted)
601 (load_gather_sv_restricted, shift_left_imm_long): Declare.
602 (shift_left_imm_to_uint, shift_right_imm_narrowb): Likewise.
603 (shift_right_imm_narrowt, shift_right_imm_narrowb_to_uint): Likewise.
604 (shift_right_imm_narrowt_to_uint, store_scatter_index_restricted)
605 (store_scatter_offset_restricted, tbl_tuple, ternary_long_lane)
606 (ternary_long_opt_n, ternary_qq_lane_rotate, ternary_qq_rotate)
607 (ternary_shift_left_imm, ternary_shift_right_imm, ternary_uint)
608 (unary_convert_narrowt, unary_long, unary_narrowb, unary_narrowt)
609 (unary_narrowb_to_uint, unary_narrowt_to_uint, unary_to_int): Likewise.
610 * config/aarch64/aarch64-sve-builtins-shapes.cc (apply_predication):
611 Also add an initial argument for unary_convert_narrowt, regardless
612 of the predication type.
613 (build_32_64): Allow loads and stores to specify MODE_none.
614 (build_sv_index64, build_sv_uint_offset): New functions.
615 (long_type_suffix): New function.
616 (binary_imm_narrowb_base, binary_imm_narrowt_base): New classes.
617 (binary_imm_long_base, load_gather_sv_base): Likewise.
618 (shift_right_imm_narrow_wrapper, ternary_shift_imm_base): Likewise.
619 (ternary_resize2_opt_n_base, ternary_resize2_lane_base): Likewise.
620 (unary_narrowb_base, unary_narrowt_base): Likewise.
621 (binary_long_lane_def, binary_long_lane): New shape.
622 (binary_long_opt_n_def, binary_long_opt_n): Likewise.
623 (binary_narrowb_opt_n_def, binary_narrowb_opt_n): Likewise.
624 (binary_narrowt_opt_n_def, binary_narrowt_opt_n): Likewise.
625 (binary_to_uint_def, binary_to_uint): Likewise.
626 (binary_wide_def, binary_wide): Likewise.
627 (binary_wide_opt_n_def, binary_wide_opt_n): Likewise.
628 (compare_def, compare): Likewise.
629 (compare_ptr_def, compare_ptr): Likewise.
630 (load_ext_gather_index_restricted_def,
631 load_ext_gather_index_restricted): Likewise.
632 (load_ext_gather_offset_restricted_def,
633 load_ext_gather_offset_restricted): Likewise.
634 (load_gather_sv_def): Inherit from load_gather_sv_base.
635 (load_gather_sv_restricted_def, load_gather_sv_restricted): New shape.
636 (shift_left_imm_def, shift_left_imm): Likewise.
637 (shift_left_imm_long_def, shift_left_imm_long): Likewise.
638 (shift_left_imm_to_uint_def, shift_left_imm_to_uint): Likewise.
639 (store_scatter_index_restricted_def,
640 store_scatter_index_restricted): Likewise.
641 (store_scatter_offset_restricted_def,
642 store_scatter_offset_restricted): Likewise.
643 (tbl_tuple_def, tbl_tuple): Likewise.
644 (ternary_long_lane_def, ternary_long_lane): Likewise.
645 (ternary_long_opt_n_def, ternary_long_opt_n): Likewise.
646 (ternary_qq_lane_def): Inherit from ternary_resize2_lane_base.
647 (ternary_qq_lane_rotate_def, ternary_qq_lane_rotate): New shape
648 (ternary_qq_opt_n_def): Inherit from ternary_resize2_opt_n_base.
649 (ternary_qq_rotate_def, ternary_qq_rotate): New shape.
650 (ternary_shift_left_imm_def, ternary_shift_left_imm): Likewise.
651 (ternary_shift_right_imm_def, ternary_shift_right_imm): Likewise.
652 (ternary_uint_def, ternary_uint): Likewise.
653 (unary_convert): Fix typo in comment.
654 (unary_convert_narrowt_def, unary_convert_narrowt): New shape.
655 (unary_long_def, unary_long): Likewise.
656 (unary_narrowb_def, unary_narrowb): Likewise.
657 (unary_narrowt_def, unary_narrowt): Likewise.
658 (unary_narrowb_to_uint_def, unary_narrowb_to_uint): Likewise.
659 (unary_narrowt_to_uint_def, unary_narrowt_to_uint): Likewise.
660 (unary_to_int_def, unary_to_int): Likewise.
661 * config/aarch64/aarch64-sve-builtins-base.cc (unspec_cmla)
662 (unspec_fcmla, unspec_cond_fcmla, expand_mla_mls_lane): New functions.
663 (svasrd_impl): Delete.
664 (svcadd_impl::expand): Handle integer operations too.
665 (svcmla_impl::expand, svcmla_lane::expand): Likewise, using the
666 new functions to derive the unspec numbers.
667 (svmla_svmls_lane_impl): Replace with...
668 (svmla_lane_impl, svmls_lane_impl): ...these new classes. Handle
669 integer operations too.
670 (svwhile_impl): Rename to...
671 (svwhilelx_impl): ...this and inherit from while_comparison.
672 (svasrd): Use unspec_based_function.
673 (svmla_lane): Use svmla_lane_impl.
674 (svmls_lane): Use svmls_lane_impl.
675 (svrecpe, svrsqrte): Handle unsigned integer operations too.
676 (svwhilele, svwhilelt): Use svwhilelx_impl.
677 * config/aarch64/aarch64-sve-builtins-sve2.h: New file.
678 * config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise.
679 * config/aarch64/aarch64-sve-builtins-sve2.def: Likewise.
680 * config/aarch64/aarch64-sve-builtins.def: Include
681 aarch64-sve-builtins-sve2.def.
683 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
685 * config/aarch64/aarch64-protos.h (aarch64_sve_arith_immediate_p)
686 (aarch64_sve_sqadd_sqsub_immediate_p): Add a machine_mode argument.
687 * config/aarch64/aarch64.c (aarch64_sve_arith_immediate_p)
688 (aarch64_sve_sqadd_sqsub_immediate_p): Likewise. Handle scalar
689 immediates as well as vector ones.
690 * config/aarch64/predicates.md (aarch64_sve_arith_immediate)
691 (aarch64_sve_sub_arith_immediate, aarch64_sve_qadd_immediate)
692 (aarch64_sve_qsub_immediate): Update calls accordingly.
694 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
696 * config/aarch64/aarch64-sve2.md: Add banner comments.
697 (<su>mulh<r>s<mode>3): Move further up file.
698 (<su>mull<bt><Vwide>, <r>shrnb<mode>, <r>shrnt<mode>)
699 (*aarch64_sve2_sra<mode>): Move further down file.
700 * config/aarch64/t-aarch64 (s-check-sve-md): Check aarch64-sve2.md too.
702 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
704 * config/aarch64/iterators.md (SVE_WHILE): Add UNSPEC_WHILERW
706 (while_optab_cmp): Handle them.
707 * config/aarch64/aarch64-sve.md
708 (*while_<while_optab_cmp><GPI:mode><PRED_ALL:mode>_ptest): Make public
709 and add a "@" marker.
710 * config/aarch64/aarch64-sve2.md (check_<raw_war>_ptrs<mode>): Use it
711 instead of gen_aarch64_sve2_while_ptest.
712 (@aarch64_sve2_while<cmp_op><GPI:mode><PRED_ALL:mode>_ptest): Delete.
714 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
716 * config/aarch64/aarch64.md (UNSPEC_WHILE_LE): Rename to...
717 (UNSPEC_WHILELE): ...this.
718 (UNSPEC_WHILE_LO): Rename to...
719 (UNSPEC_WHILELO): ...this.
720 (UNSPEC_WHILE_LS): Rename to...
721 (UNSPEC_WHILELS): ...this.
722 (UNSPEC_WHILE_LT): Rename to...
723 (UNSPEC_WHILELT): ...this.
724 * config/aarch64/iterators.md (SVE_WHILE): Update accordingly.
725 (cmp_op, while_optab_cmp): Likewise.
726 * config/aarch64/aarch64.c (aarch64_sve_move_pred_via_while): Likewise.
727 * config/aarch64/aarch64-sve-builtins-base.cc (svwhilele): Likewise.
728 (svwhilelt): Likewise.
730 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
732 * config/aarch64/aarch64-sve-builtins-shapes.h (unary_count): Delete.
733 (unary_to_uint): Define.
734 * config/aarch64/aarch64-sve-builtins-shapes.cc (unary_count_def)
735 (unary_count): Rename to...
736 (unary_to_uint_def, unary_to_uint): ...this.
737 * config/aarch64/aarch64-sve-builtins-base.def: Update accordingly.
739 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
741 * config/aarch64/aarch64-sve-builtins-functions.h
742 (code_for_mode_function): New class.
743 (CODE_FOR_MODE0, QUIET_CODE_FOR_MODE0): New macros.
744 * config/aarch64/aarch64-sve-builtins-base.cc (svcompact_impl)
745 (svext_impl, svmul_lane_impl, svsplice_impl, svtmad_impl): Delete.
746 (svcompact, svext, svsplice): Use QUIET_CODE_FOR_MODE0.
747 (svmul_lane, svtmad): Use CODE_FOR_MODE0.
749 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
751 * config/aarch64/iterators.md (addsub): New code attribute.
752 * config/aarch64/aarch64-simd.md (aarch64_<su_optab><optab><mode>):
754 (aarch64_<su_optab>q<addsub><mode>): ...this, making the same change
755 in the asm string and attributes. Fix indentation.
756 * config/aarch64/aarch64-sve.md (@aarch64_<su_optab><optab><mode>):
758 (@aarch64_sve_<optab><mode>): ...this.
759 * config/aarch64/aarch64-sve-builtins.h
760 (function_expander::expand_signed_unpred_op): Delete.
761 * config/aarch64/aarch64-sve-builtins.cc
762 (function_expander::expand_signed_unpred_op): Likewise.
763 (function_expander::map_to_rtx_codes): If the optab isn't defined,
764 try using code_for_aarch64_sve instead.
765 * config/aarch64/aarch64-sve-builtins-base.cc (svqadd_impl): Delete.
766 (svqsub_impl): Likewise.
767 (svqadd, svqsub): Use rtx_code_function instead.
769 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
771 * config/aarch64/iterators.md (SRHSUB, URHSUB): Delete.
772 (HADDSUB, sur, addsub): Remove them.
774 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
776 * tree-nrv.c (pass_return_slot::execute): Handle all internal
777 functions the same way, rather than singling out those that
778 aren't mapped directly to optabs.
780 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
782 * target.def (compatible_vector_types_p): New target hook.
783 * hooks.h (hook_bool_const_tree_const_tree_true): Declare.
784 * hooks.c (hook_bool_const_tree_const_tree_true): New function.
785 * doc/tm.texi.in (TARGET_COMPATIBLE_VECTOR_TYPES_P): New hook.
786 * doc/tm.texi: Regenerate.
787 * gimple-expr.c: Include target.h.
788 (useless_type_conversion_p): Use targetm.compatible_vector_types_p.
789 * config/aarch64/aarch64.c (aarch64_compatible_vector_types_p): New
791 (TARGET_COMPATIBLE_VECTOR_TYPES_P): Define.
792 * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::convert_pred):
793 Use the original predicate if it already has a suitable type.
795 2020-01-09 Martin Jambor <mjambor@suse.cz>
797 * cgraph.h (cgraph_edge): Make remove, set_call_stmt, make_direct,
798 resolve_speculation and redirect_call_stmt_to_callee static. Change
799 return type of set_call_stmt to cgraph_edge *.
800 * auto-profile.c (afdo_indirect_call): Adjust call to
801 redirect_call_stmt_to_callee.
802 * cgraph.c (cgraph_edge::set_call_stmt): Make return cgraph-edge *,
803 make the this pointer explicit, adjust self-recursive calls and the
804 call top make_direct. Return the resulting edge.
805 (cgraph_edge::remove): Make this pointer explicit.
806 (cgraph_edge::resolve_speculation): Likewise, adjust call to remove.
807 (cgraph_edge::make_direct): Likewise, adjust call to
809 (cgraph_edge::redirect_call_stmt_to_callee): Likewise, also adjust
810 call to set_call_stmt.
811 (cgraph_update_edges_for_call_stmt_node): Update call to
812 set_call_stmt and remove.
813 * cgraphclones.c (cgraph_node::set_call_stmt_including_clones):
814 Renamed edge to master_edge. Adjusted calls to set_call_stmt.
815 (cgraph_node::create_edge_including_clones): Moved "first" definition
816 of edge to the block where it was used. Adjusted calls to
818 (cgraph_node::remove_symbol_and_inline_clones): Adjust call to
820 * cgraphunit.c (walk_polymorphic_call_targets): Adjusted calls to
821 make_direct and redirect_call_stmt_to_callee.
822 * ipa-fnsummary.c (redirect_to_unreachable): Adjust calls to
823 resolve_speculation and make_direct.
824 * ipa-inline-transform.c (inline_transform): Adjust call to
825 redirect_call_stmt_to_callee.
826 (check_speculations_1):: Adjust call to resolve_speculation.
827 * ipa-inline.c (resolve_noninline_speculation): Adjust call to
829 (inline_small_functions): Adjust call to resolve_speculation.
830 (ipa_inline): Likewise.
831 * ipa-prop.c (ipa_make_edge_direct_to_target): Adjust call to
833 * ipa-visibility.c (function_and_variable_visibility): Make iteration
834 safe with regards to edge removal, adjust calls to
835 redirect_call_stmt_to_callee.
836 * ipa.c (walk_polymorphic_call_targets): Adjust calls to make_direct
837 and redirect_call_stmt_to_callee.
838 * multiple_target.c (create_dispatcher_calls): Adjust call to
839 redirect_call_stmt_to_callee
840 (redirect_to_specific_clone): Likewise.
841 * tree-cfgcleanup.c (delete_unreachable_blocks_update_callgraph):
842 Adjust calls to cgraph_edge::remove.
843 * tree-inline.c (copy_bb): Adjust call to set_call_stmt.
844 (redirect_all_calls): Adjust call to redirect_call_stmt_to_callee.
845 (expand_call_inline): Adjust call to cgraph_edge::remove.
847 2020-01-09 Martin Liska <mliska@suse.cz>
849 * params.opt: Set Optimization for
850 param_max_speculative_devirt_maydefs.
852 2020-01-09 Martin Sebor <msebor@redhat.com>
856 * builtins.c (compute_objsize): Avoid handling MEM_REFs of vector type.
858 2020-01-09 Martin Liska <mliska@suse.cz>
860 * auto-profile.c (auto_profile): Use opt_for_fn
862 * ipa-cp.c (ipcp_lattice::add_value): Likewise.
863 (propagate_vals_across_arith_jfunc): Likewise.
864 (hint_time_bonus): Likewise.
865 (incorporate_penalties): Likewise.
866 (good_cloning_opportunity_p): Likewise.
867 (perform_estimation_of_a_value): Likewise.
868 (estimate_local_effects): Likewise.
869 (ipcp_propagate_stage): Likewise.
870 * ipa-fnsummary.c (decompose_param_expr): Likewise.
871 (set_switch_stmt_execution_predicate): Likewise.
872 (analyze_function_body): Likewise.
873 * ipa-inline-analysis.c (offline_size): Likewise.
874 * ipa-inline.c (early_inliner): Likewise.
875 * ipa-prop.c (ipa_analyze_node): Likewise.
876 (ipcp_transform_function): Likewise.
877 * ipa-sra.c (process_scan_results): Likewise.
878 (ipa_sra_summarize_function): Likewise.
879 * params.opt: Rename ipcp-unit-growth to
880 ipa-cp-unit-growth. Add Optimization for various
881 IPA-related parameters.
883 2020-01-09 Richard Biener <rguenther@suse.de>
886 * gimplify.c (gimplify_expr): Deal with NOP definitions.
888 2020-01-09 Richard Biener <rguenther@suse.de>
890 PR tree-optimization/93040
891 * gimple-ssa-store-merging.c (find_bswap_or_nop): Raise search limit.
893 2020-01-09 Georg-Johann Lay <avr@gjlay.de>
895 * common/config/avr/avr-common.c (avr_option_optimization_table)
896 [OPT_LEVELS_1_PLUS]: Set -fsplit-wide-types-early.
898 2020-01-09 Martin Liska <mliska@suse.cz>
900 * cgraphclones.c (symbol_table::materialize_all_clones):
901 Use cgraph_node::dump_name.
903 2020-01-09 Jakub Jelinek <jakub@redhat.com>
906 * config/riscv/riscv.c (riscv_print_operand_reloc): Use
907 output_operand_lossage instead of gcc_unreachable.
908 * doc/md.texi (riscv f constraint): Fix typo.
911 * config/i386/i386.md (subv<mode>4): Use SWIDWI iterator instead of
912 SWI. Use <general_hilo_operand> instead of <general_operand>. Use
913 CONST_SCALAR_INT_P instead of CONST_INT_P.
914 (*subv<mode>4_1): Rename to ...
915 (subv<mode>4_1): ... this.
916 (*subv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
917 define_insn_and_split patterns.
918 (*subv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
921 2020-01-08 David Malcolm <dmalcolm@redhat.com>
923 * vec.c (class selftest::count_dtor): New class.
924 (selftest::test_auto_delete_vec): New test.
925 (selftest::vec_c_tests): Call it.
926 * vec.h (class auto_delete_vec): New class template.
927 (auto_delete_vec<T>::~auto_delete_vec): New dtor.
929 2020-01-08 David Malcolm <dmalcolm@redhat.com>
931 * sbitmap.h (auto_sbitmap): Add operator const_sbitmap.
933 2020-01-08 Jim Wilson <jimw@sifive.com>
935 * config/riscv/riscv.c (riscv_legitimize_tls_address): Ifdef out
936 use of TLS_MODEL_LOCAL_EXEC when not pic.
938 2020-01-08 David Malcolm <dmalcolm@redhat.com>
940 * hash-map-tests.c (selftest::test_map_of_strings_to_int): Fix
943 2020-01-08 Jakub Jelinek <jakub@redhat.com>
946 * config/i386/i386.md (*stack_protect_set_2_<mode> peephole2,
947 *stack_protect_set_3 peephole2): Also check that the second
948 insns source is general_operand.
951 * config/i386/i386.md (addcarry<mode>_0): Use nonimmediate_operand
952 predicate for output operand instead of register_operand.
953 (addcarry<mode>, addcarry<mode>_1): Likewise. Add alternative with
954 memory destination and non-memory operands[2].
956 2020-01-08 Martin Liska <mliska@suse.cz>
958 * cgraph.c (cgraph_node::dump): Use ::dump_name or
959 ::dump_asm_name instead of (::name or ::asm_name).
960 * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
961 * cgraphunit.c (walk_polymorphic_call_targets): Likewise.
962 (analyze_functions): Likewise.
963 (expand_all_functions): Likewise.
964 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
965 (propagate_bits_across_jump_function): Likewise.
966 (dump_profile_updates): Likewise.
967 (ipcp_store_bits_results): Likewise.
968 (ipcp_store_vr_results): Likewise.
969 * ipa-devirt.c (dump_targets): Likewise.
970 * ipa-fnsummary.c (analyze_function_body): Likewise.
971 * ipa-hsa.c (check_warn_node_versionable): Likewise.
972 (process_hsa_functions): Likewise.
973 * ipa-icf.c (sem_item_optimizer::merge_classes): Likewise.
974 (set_alias_uids): Likewise.
975 * ipa-inline-transform.c (save_inline_function_body): Likewise.
976 * ipa-inline.c (recursive_inlining): Likewise.
977 (inline_to_all_callers_1): Likewise.
978 (ipa_inline): Likewise.
979 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
980 (ipa_propagate_frequency): Likewise.
981 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
982 (remove_described_reference): Likewise.
983 * ipa-pure-const.c (worse_state): Likewise.
984 (check_retval_uses): Likewise.
985 (analyze_function): Likewise.
986 (propagate_pure_const): Likewise.
987 (propagate_nothrow): Likewise.
988 (dump_malloc_lattice): Likewise.
989 (propagate_malloc): Likewise.
990 (pass_local_pure_const::execute): Likewise.
991 * ipa-visibility.c (optimize_weakref): Likewise.
992 (function_and_variable_visibility): Likewise.
993 * ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
994 (ipa_discover_variable_flags): Likewise.
995 * lto-streamer-out.c (output_function): Likewise.
996 (output_constructor): Likewise.
997 * tree-inline.c (copy_bb): Likewise.
998 * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
999 * varpool.c (symbol_table::remove_unreferenced_decls): Likewise.
1001 2020-01-08 Richard Biener <rguenther@suse.de>
1004 * tree-eh.c (sink_clobbers): Update virtual operands for
1005 the first and last stmt only. Add a dry-run capability.
1006 (pass_lower_eh_dispatch::execute): Perform clobber sinking
1007 after CFG manipulations and in RPO order to catch all
1008 secondary opportunities reliably.
1010 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
1013 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
1015 2019-01-08 Richard Biener <rguenther@suse.de>
1018 * gimple-fold.c (rewrite_to_defined_overflow): Mark stmt modified.
1019 * tree-ssa-loop-im.c (move_computations_worker): Properly adjust
1020 virtual operand, also updating SSA use.
1021 * gimple-loop-interchange.cc (loop_cand::undo_simple_reduction):
1022 Update stmt after resetting virtual operand.
1023 (tree_loop_interchange::move_code_to_inner_loop): Likewise.
1024 * gimple-iterator.c (gsi_remove): When not removing the stmt
1025 permanently do not delink immediate uses or mark the stmt modified.
1027 2020-01-08 Martin Liska <mliska@suse.cz>
1029 * ipa-fnsummary.c (dump_ipa_call_summary): Use symtab_node::dump_name.
1030 (ipa_call_context::estimate_size_and_time): Likewise.
1031 (inline_analyze_function): Likewise.
1033 2020-01-08 Martin Liska <mliska@suse.cz>
1035 * cgraph.c (cgraph_node::dump): Use systematically
1038 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
1040 Add -nodevicespecs option for avr.
1043 * config/avr/avr.opt (-nodevicespecs): New driver option.
1044 * config/avr/driver-avr.c (avr_devicespecs_file): Only issue
1045 "-specs=device-specs/..." if that option is not set.
1046 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
1048 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
1050 Implement 64-bit double functions for avr.
1053 * config.gcc (tm_defines) [target=avr]: Support --with-libf7,
1054 --with-double-comparison.
1055 * doc/install.texi: Document them.
1056 * config/avr/avr-c.c (avr_cpu_cpp_builtins)
1057 <WITH_LIBF7_LIBGCC, WITH_LIBF7_MATH, WITH_LIBF7_MATH_SYMBOLS>
1058 <WITH_DOUBLE_COMPARISON>: New built-in defines.
1059 * doc/invoke.texi (AVR Built-in Macros): Document them.
1060 * config/avr/avr-protos.h (avr_float_lib_compare_returns_bool): New.
1061 * config/avr/avr.c (avr_float_lib_compare_returns_bool): New function.
1062 * config/avr/avr.h (FLOAT_LIB_COMPARE_RETURNS_BOOL): New macro.
1064 2020-01-08 Richard Earnshaw <rearnsha@arm.com>
1067 * config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
1068 armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
1069 when only building rm-profile multilibs.
1071 2020-01-08 Feng Xue <fxue@os.amperecomputing.com>
1074 * ipa-cp.c (self_recursively_generated_p): Find matched aggregate
1075 lattice for a value to check.
1076 (propagate_vals_across_arith_jfunc): Add an assertion to ensure
1077 finite propagation in self-recursive scc.
1079 2020-01-08 Luo Xiong Hu <luoxhu@linux.ibm.com>
1081 * ipa-inline.c (caller_growth_limits): Restore the AND.
1083 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
1085 * config/gcn/gcn-valu.md (VEC_1REG_INT_ALT): Delete iterator.
1086 (VEC_ALLREG_ALT): New iterator.
1087 (VEC_ALLREG_INT_MODE): New iterator.
1088 (VCMP_MODE): New iterator.
1089 (VCMP_MODE_INT): New iterator.
1090 (vec_cmpu<mode>di): Use VCMP_MODE_INT.
1091 (vec_cmp<u>v64qidi): New define_expand.
1092 (vec_cmp<mode>di_exec): Use VCMP_MODE.
1093 (vec_cmpu<mode>di_exec): New define_expand.
1094 (vec_cmp<u>v64qidi_exec): New define_expand.
1095 (vec_cmp<mode>di_dup): Use VCMP_MODE.
1096 (vec_cmp<mode>di_dup_exec): Use VCMP_MODE.
1097 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>): Rename ...
1098 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>): ... to this.
1099 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>_exec): Rename ...
1100 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>_exec): ... to this.
1101 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>): Rename ...
1102 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>): ... to this.
1103 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>_exec): Rename ...
1104 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>_exec): ... to
1106 * config/gcn/gcn.c (print_operand): Fix 8 and 16 bit suffixes.
1107 * config/gcn/gcn.md (expander): Add sign_extend and zero_extend.
1109 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
1111 * config/gcn/constraints.md (DA): Update description and match.
1113 (Db): New constraint.
1114 * config/gcn/gcn-protos.h (gcn_inline_constant64_p): Add second
1116 * config/gcn/gcn.c (gcn_inline_constant64_p): Add 'mixed' parameter.
1117 Implement 'Db' mixed immediate type.
1118 * config/gcn/gcn-valu.md (addcv64si3<exec_vcc>): Rework constraints.
1119 (addcv64si3_dup<exec_vcc>): Delete.
1120 (subcv64si3<exec_vcc>): Rework constraints.
1121 (addv64di3): Rework constraints.
1122 (addv64di3_exec): Rework constraints.
1123 (subv64di3): Rework constraints.
1124 (addv64di3_dup): Delete.
1125 (addv64di3_dup_exec): Delete.
1126 (addv64di3_zext): Rework constraints.
1127 (addv64di3_zext_exec): Rework constraints.
1128 (addv64di3_zext_dup): Rework constraints.
1129 (addv64di3_zext_dup_exec): Rework constraints.
1130 (addv64di3_zext_dup2): Rework constraints.
1131 (addv64di3_zext_dup2_exec): Rework constraints.
1132 (addv64di3_sext_dup2): Rework constraints.
1133 (addv64di3_sext_dup2_exec): Rework constraints.
1135 2020-01-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
1137 * doc/sourcebuild.texi (arm_little_endian, arm_nothumb): Documented
1138 existing target checks.
1140 2020-01-07 Richard Biener <rguenther@suse.de>
1142 * doc/install.texi: Bump minimal supported MPC version.
1144 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
1146 * langhooks-def.h (lhd_simulate_enum_decl): Declare.
1147 (LANG_HOOKS_SIMULATE_ENUM_DECL): Use it.
1148 * langhooks.c: Include stor-layout.h.
1149 (lhd_simulate_enum_decl): New function.
1150 * config/aarch64/aarch64-sve-builtins.cc (init_builtins): Call
1151 handle_arm_sve_h for the LTO frontend.
1152 (register_vector_type): Cope with null returns from pushdecl.
1154 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
1156 * config/aarch64/aarch64-protos.h (aarch64_sve::svbool_type_p)
1157 (aarch64_sve::nvectors_if_data_type): Replace with...
1158 (aarch64_sve::builtin_type_p): ...this.
1159 * config/aarch64/aarch64-sve-builtins.cc: Include attribs.h.
1160 (find_vector_type): Delete.
1161 (add_sve_type_attribute): New function.
1162 (lookup_sve_type_attribute): Likewise.
1163 (register_builtin_types): Add an "SVE type" attribute to each type.
1164 (register_tuple_type): Likewise.
1165 (svbool_type_p, nvectors_if_data_type): Delete.
1166 (mangle_builtin_type): Use lookup_sve_type_attribute.
1167 (builtin_type_p): Likewise. Add an overload that returns the
1168 number of constituent vector and predicate registers.
1169 * config/aarch64/aarch64.c (aarch64_sve_argument_p): Delete.
1170 (aarch64_returns_value_in_sve_regs_p): Use aarch64_sve::builtin_type_p
1171 instead of aarch64_sve_argument_p.
1172 (aarch64_takes_arguments_in_sve_regs_p): Likewise.
1173 (aarch64_pass_by_reference): Likewise.
1174 (aarch64_function_value_1): Likewise.
1175 (aarch64_return_in_memory): Likewise.
1176 (aarch64_layout_arg): Likewise.
1178 2020-01-07 Jakub Jelinek <jakub@redhat.com>
1180 PR tree-optimization/93156
1181 * tree-ssa-ccp.c (bit_value_binop): For x * x note that the second
1182 least significant bit is always clear.
1184 PR tree-optimization/93118
1185 * match.pd ((x >> c) << c -> x & (-1<<c)): Add nop_convert?. Add new
1186 simplifier with two intermediate conversions.
1188 2020-01-07 Martin Liska <mliska@suse.cz>
1190 * params.opt: Add Optimization for various parameters.
1192 2020-01-07 Martin Liska <mliska@suse.cz>
1195 * doc/extend.texi: Explain cloning for target_clone
1198 2020-01-07 Martin Liska <mliska@suse.cz>
1200 PR tree-optimization/92860
1201 * common.opt: Make in Optimization option
1202 as it is affected by -O0, which is an Optimization
1204 * tree-inline.c (tree_inlinable_function_p):
1205 Use opt_for_fn for warn_inline.
1206 (expand_call_inline): Likewise.
1208 2020-01-07 Martin Liska <mliska@suse.cz>
1210 PR tree-optimization/92860
1211 * common.opt: Make flag_ree as optimization
1214 2020-01-07 Martin Liska <mliska@suse.cz>
1216 PR optimization/92860
1217 * params.opt: Mark param_min_crossjump_insns with Optimization
1220 2020-01-07 Luo Xiong Hu <luoxhu@linux.ibm.com>
1222 * ipa-inline-analysis.c (estimate_growth): Fix typo.
1223 * ipa-inline.c (caller_growth_limits): Use OR instead of AND.
1225 2020-01-06 Michael Meissner <meissner@linux.ibm.com>
1227 * config/rs6000/rs6000.c (hard_reg_and_mode_to_addr_mask): New
1228 helper function to return the valid addressing formats for a given
1229 hard register and mode.
1230 (rs6000_adjust_vec_address): Call hard_reg_and_mode_to_addr_mask.
1232 * config/rs6000/constraints.md (Q constraint): Update
1234 * doc/md.texi (RS/6000 constraints): Update 'Q' cosntraint
1237 * config/rs6000/vsx.md (vsx_extract_<mode>_var, VSX_D iterator):
1238 Use 'Q' for doing vector extract from memory.
1239 (vsx_extract_v4sf_var): Use 'Q' for doing vector extract from
1241 (vsx_extract_<mode>_var, VSX_EXTRACT_I iterator): Use 'Q' for
1242 doing vector extract from memory.
1243 (vsx_extract_<mode>_<VS_scalar>mode_var): Use 'Q' for doing vector
1244 extract from memory.
1246 * config/rs6000/rs6000.c (rs6000_adjust_vec_address): Add support
1247 for the offset being 34-bits when -mcpu=future is used.
1249 2020-01-06 John David Anglin <danglin@gcc.gnu.org>
1251 * config/pa/pa.md: Revert change to use ordered_comparison_operator
1252 instead of cmpib_comparison_operator in cmpib patterns.
1253 * config/pa/predicates.md (cmpib_comparison_operator): Revert removal
1254 of cmpib_comparison_operator. Revise comment.
1256 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1258 * tree-vect-slp.c (vect_build_slp_tree_1): Require all shifts
1259 in an IFN_DIV_POW2 node to be equal.
1261 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1263 * tree-vect-stmts.c (vect_check_load_store_mask): Rename to...
1264 (vect_check_scalar_mask): ...this.
1265 (vectorizable_store, vectorizable_load): Update call accordingly.
1266 (vectorizable_call): Use vect_check_scalar_mask to check the mask
1267 argument in calls to conditional internal functions.
1269 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
1271 * config/gcn/gcn-valu.md (subv64di3): Use separate alternatives for
1272 '0' matching inputs.
1273 (subv64di3_exec): Likewise.
1275 2020-01-06 Bryan Stenson <bryan@siliconvortex.com>
1277 * config/mips/mips.c (vr4130_align_insns): Fix typo.
1278 * doc/md.texi (movstr): Likewise.
1280 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
1282 * config/gcn/gcn-valu.md (vec_extract<mode><scalar_mode>): Add early
1285 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1287 * config/aarch64/t-aarch64 ($(srcdir)/config/aarch64/aarch64-tune.md):
1289 (s-aarch64-tune-md): ...this new stamp file. Pipe the new contents
1290 to a temporary file and use move-if-change to update the real
1291 file where necessary.
1293 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1295 * config/aarch64/aarch64-sve.md (@aarch64_sel_dup<mode>): Use Upl
1296 rather than Upa for CPY /M.
1298 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
1300 * config/gcn/gcn.c (gcn_inline_constant_p): Allow 64 as an inline
1303 2020-01-06 Martin Liska <mliska@suse.cz>
1305 PR tree-optimization/92860
1306 * params.opt: Mark param_max_combine_insns with Optimization
1309 2020-01-05 Jakub Jelinek <jakub@redhat.com>
1312 * config/i386/i386.md (SWIDWI): New mode iterator.
1313 (DWI, dwi): Add TImode variants.
1314 (addv<mode>4): Use SWIDWI iterator instead of SWI. Use
1315 <general_hilo_operand> instead of <general_operand>. Use
1316 CONST_SCALAR_INT_P instead of CONST_INT_P.
1317 (*addv<mode>4_1): Rename to ...
1318 (addv<mode>4_1): ... this.
1319 (QWI): New mode attribute.
1320 (*addv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
1321 define_insn_and_split patterns.
1322 (*addv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
1324 (uaddv<mode>4): Use SWIDWI iterator instead of SWI. Use
1325 <general_hilo_operand> instead of <general_operand>.
1326 (*addcarry<mode>_1): New define_insn.
1327 (*add<dwi>3_doubleword_cc_overflow_1): New define_insn_and_split.
1329 2020-01-03 Konstantin Kharlamov <Hi-Angel@yandex.ru>
1331 * gdbinit.in (pr, prl, pt, pct, pgg, pgq, pgs, pge, pmz, pdd, pbs, pbm):
1332 Use "call" instead of "set".
1334 2020-01-03 Martin Jambor <mjambor@suse.cz>
1337 * ipa-cp.c (print_all_lattices): Skip functions without info.
1339 2020-01-03 Jakub Jelinek <jakub@redhat.com>
1342 * config/i386/i386-options.c (ix86_simd_clone_adjust): If
1343 TARGET_PREFER_AVX128, use prefer-vector-width=256 for 'c' and 'd'
1344 simd clones. If TARGET_PREFER_AVX256, use prefer-vector-width=512
1345 for 'e' simd clones.
1348 * config/i386/i386.opt (x_prefer_vector_width_type): Remove TargetSave
1350 (mprefer-vector-width=): Add Save.
1351 * config/i386/i386-options.c (ix86_target_string): Add PVW argument, print
1352 -mprefer-vector-width= if non-zero. Fix up -mfpmath= comment.
1353 (ix86_debug_options, ix86_function_specific_print): Adjust
1354 ix86_target_string callers.
1355 (ix86_valid_target_attribute_inner_p): Handle prefer-vector-width=.
1356 (ix86_valid_target_attribute_tree): Likewise.
1357 * config/i386/i386-options.h (ix86_target_string): Add PVW argument.
1358 * config/i386/i386-expand.c (ix86_expand_builtin): Adjust
1359 ix86_target_string caller.
1362 * config/i386/i386.md (abs<mode>2): Use expand_simple_binop instead of
1363 emitting ASHIFTRT, XOR and MINUS by hand. Use gen_int_mode with QImode
1364 instead of gen_int_shift_amount + convert_modes.
1366 PR rtl-optimization/93088
1367 * loop-iv.c (find_single_def_src): Punt after looking through
1368 128 reg copies for regs with single definitions. Move definitions
1371 2020-01-02 Dennis Zhang <dennis.zhang@arm.com>
1373 * config/arm/arm-c.c (arm_cpu_builtins): Define
1374 __ARM_FEATURE_MATMUL_INT8, __ARM_FEATURE_BF16_VECTOR_ARITHMETIC,
1375 __ARM_FEATURE_BF16_SCALAR_ARITHMETIC, and
1376 __ARM_BF16_FORMAT_ALTERNATIVE when enabled.
1377 * config/arm/arm-cpus.in (armv8_6, i8mm, bf16): New features.
1378 * config/arm/arm-tables.opt: Regenerated.
1379 * config/arm/arm.c (arm_option_reconfigure_globals): Initialize
1380 arm_arch_i8mm and arm_arch_bf16 when enabled.
1381 * config/arm/arm.h (TARGET_I8MM): New macro.
1382 (TARGET_BF16_FP, TARGET_BF16_SIMD): Likewise.
1383 * config/arm/t-aprofile: Add matching rules for -march=armv8.6-a.
1384 * config/arm/t-arm-elf (all_v8_archs): Add armv8.6-a.
1385 * config/arm/t-multilib: Add matching rules for -march=armv8.6-a.
1386 (v8_6_a_simd_variants): New.
1387 (v8_*_a_simd_variants): Add i8mm and bf16.
1388 * doc/invoke.texi (armv8.6-a, i8mm, bf16): Document new options.
1390 2020-01-02 Jakub Jelinek <jakub@redhat.com>
1393 * predict.c (compute_function_frequency): Don't call
1394 warn_function_cold on functions that already have cold attribute.
1396 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
1399 * config/pa/pa.c (pa_elf_select_rtx_section): New. Put references to
1400 COMDAT group function labels in .data.rel.ro.local section.
1401 * config/pa/pa32-linux.h (TARGET_ASM_SELECT_RTX_SECTION): Define.
1404 * config/pa/pa.md (scc): Use ordered_comparison_operator instead of
1405 comparison_operator in B and S integer comparisons. Likewise, use
1406 ordered_comparison_operator instead of cmpib_comparison_operator in
1408 * config/pa/predicates.md (cmpib_comparison_operator): Remove.
1410 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1412 Update copyright years.
1414 * gcc.c (process_command): Update copyright notice dates.
1415 * gcov-dump.c (print_version): Ditto.
1416 * gcov.c (print_version): Ditto.
1417 * gcov-tool.c (print_version): Ditto.
1418 * gengtype.c (create_file): Ditto.
1419 * doc/cpp.texi: Bump @copying's copyright year.
1420 * doc/cppinternals.texi: Ditto.
1421 * doc/gcc.texi: Ditto.
1422 * doc/gccint.texi: Ditto.
1423 * doc/gcov.texi: Ditto.
1424 * doc/install.texi: Ditto.
1425 * doc/invoke.texi: Ditto.
1427 2020-01-01 Jan Hubicka <hubicka@ucw.cz>
1429 * ipa.c (walk_polymorphic_call_targets): Fix updating of overall
1432 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1434 PR tree-optimization/93098
1435 * match.pd (popcount): For shift amounts, use integer_onep
1436 or wi::to_widest () == cst instead of tree_to_uhwi () == cst
1437 tests. Make sure that precision is power of two larger than or equal
1438 to 16. Ensure shift is never negative. Use HOST_WIDE_INT_UC macro
1439 instead of ULL suffixed constants. Formatting fixes.
1441 Copyright (C) 2020 Free Software Foundation, Inc.
1443 Copying and distribution of this file, with or without modification,
1444 are permitted in any medium without royalty provided the copyright
1445 notice and this notice are preserved.