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