1 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
3 * config.gcc (aarch64*-*-*): Add aarch64-sve-builtins-sve2.o to
5 * config/aarch64/t-aarch64 (aarch64-sve-builtins.o): Depend on
6 aarch64-sve-builtins-base.def, aarch64-sve-builtins-sve2.def and
7 aarch64-sve-builtins-sve2.h.
8 (aarch64-sve-builtins-sve2.o): New rule.
9 * config/aarch64/aarch64.h (AARCH64_ISA_SVE2_AES): New macro.
10 (AARCH64_ISA_SVE2_BITPERM, AARCH64_ISA_SVE2_SHA3): Likewise.
11 (AARCH64_ISA_SVE2_SM4, TARGET_SVE2_AES, TARGET_SVE2_BITPERM): Likewise.
12 (TARGET_SVE2_SHA, TARGET_SVE2_SM4): Likewise.
13 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14 TARGET_SVE2_AES, TARGET_SVE2_BITPERM, TARGET_SVE2_SHA3 and
16 * config/aarch64/aarch64-sve.md: Update comments with SVE2
17 instructions that are handled here.
18 (@cond_asrd<mode>): Generalize to...
19 (@cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>): ...this.
20 (*cond_asrd<mode>_2): Generalize to...
21 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_2): ...this.
22 (*cond_asrd<mode>_z): Generalize to...
23 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_z): ...this.
24 * config/aarch64/aarch64.md (UNSPEC_LDNT1_GATHER): New unspec.
25 (UNSPEC_STNT1_SCATTER, UNSPEC_WHILEGE, UNSPEC_WHILEGT): Likewise.
26 (UNSPEC_WHILEHI, UNSPEC_WHILEHS): Likewise.
27 * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt<mode>): New
29 (@aarch64_gather_ldnt_<ANY_EXTEND:optab><SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
30 (@aarch64_scatter_stnt<mode>): Likewise.
31 (@aarch64_scatter_stnt_<SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
32 (@aarch64_mul_lane_<mode>): Likewise.
33 (@aarch64_sve_suqadd<mode>_const): Likewise.
34 (*<sur>h<addsub><mode>): Generalize to...
35 (@aarch64_pred_<SVE2_COND_INT_BINARY_REV:sve_int_op><mode>): ...this
37 (@cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>): New expander.
38 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_2): New pattern.
39 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_3): Likewise.
40 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_any): Likewise.
41 (*cond_<SVE2_COND_INT_BINARY_NOREV:sve_int_op><mode>_z): Likewise.
42 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op><mode>):: Likewise.
43 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op>_lane_<mode>): Likewise.
44 (@aarch64_pred_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): Likewise.
45 (@cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): New expander.
46 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_2): New pattern.
47 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_3): Likewise.
48 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_any): Likewise.
49 (@aarch64_sve_<SVE2_INT_TERNARY:sve_int_op><mode>): Likewise.
50 (@aarch64_sve_<SVE2_INT_TERNARY_LANE:sve_int_op>_lane_<mode>)
51 (@aarch64_sve_add_mul_lane_<mode>): Likewise.
52 (@aarch64_sve_sub_mul_lane_<mode>): Likewise.
53 (@aarch64_sve2_xar<mode>): Likewise.
54 (@aarch64_sve2_bcax<mode>): Likewise.
55 (*aarch64_sve2_eor3<mode>): Rename to...
56 (@aarch64_sve2_eor3<mode>): ...this.
57 (@aarch64_sve2_bsl<mode>): New expander.
58 (@aarch64_sve2_nbsl<mode>): Likewise.
59 (@aarch64_sve2_bsl1n<mode>): Likewise.
60 (@aarch64_sve2_bsl2n<mode>): Likewise.
61 (@aarch64_sve_add_<SHIFTRT:sve_int_op><mode>): Likewise.
62 (*aarch64_sve2_sra<mode>): Add MOVPRFX support.
63 (@aarch64_sve_add_<VRSHR_N:sve_int_op><mode>): New pattern.
64 (@aarch64_sve_<SVE2_INT_SHIFT_INSERT:sve_int_op><mode>): Likewise.
65 (@aarch64_sve2_<USMAX:su>aba<mode>): New expander.
66 (*aarch64_sve2_<USMAX:su>aba<mode>): New pattern.
67 (@aarch64_sve_<SVE2_INT_BINARY_WIDE:sve_int_op><mode>): Likewise.
68 (<su>mull<bt><Vwide>): Generalize to...
69 (@aarch64_sve_<SVE2_INT_BINARY_LONG:sve_int_op><mode>): ...this new
71 (@aarch64_sve_<SVE2_INT_BINARY_LONG_lANE:sve_int_op>_lane_<mode>)
72 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_LONG:sve_int_op><mode>)
73 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG:sve_int_op><mode>)
74 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
75 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG:sve_int_op><mode>)
76 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
77 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG:sve_int_op><mode>)
78 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
79 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG:sve_int_op><mode>)
80 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
81 (@aarch64_sve_<SVE2_FP_TERNARY_LONG:sve_fp_op><mode>): New patterns.
82 (@aarch64_<SVE2_FP_TERNARY_LONG_LANE:sve_fp_op>_lane_<mode>)
83 (@aarch64_sve_<SVE2_INT_UNARY_NARROWB:sve_int_op><mode>): Likewise.
84 (@aarch64_sve_<SVE2_INT_UNARY_NARROWT:sve_int_op><mode>): Likewise.
85 (@aarch64_sve_<SVE2_INT_BINARY_NARROWB:sve_int_op><mode>): Likewise.
86 (@aarch64_sve_<SVE2_INT_BINARY_NARROWT:sve_int_op><mode>): Likewise.
87 (<SHRNB:r>shrnb<mode>): Generalize to...
88 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWB:sve_int_op><mode>): ...this
90 (<SHRNT:r>shrnt<mode>): Generalize to...
91 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWT:sve_int_op><mode>): ...this
93 (@aarch64_pred_<SVE2_INT_BINARY_PAIR:sve_int_op><mode>): New pattern.
94 (@aarch64_pred_<SVE2_FP_BINARY_PAIR:sve_fp_op><mode>): Likewise.
95 (@cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>): New expander.
96 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_2): New pattern.
97 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_z): Likewise.
98 (@aarch64_sve_<SVE2_INT_CADD:optab><mode>): Likewise.
99 (@aarch64_sve_<SVE2_INT_CMLA:optab><mode>): Likewise.
100 (@aarch64_<SVE2_INT_CMLA:optab>_lane_<mode>): Likewise.
101 (@aarch64_sve_<SVE2_INT_CDOT:optab><mode>): Likewise.
102 (@aarch64_<SVE2_INT_CDOT:optab>_lane_<mode>): Likewise.
103 (@aarch64_pred_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): Likewise.
104 (@cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New expander.
105 (*cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New pattern.
106 (@aarch64_sve2_cvtnt<mode>): Likewise.
107 (@aarch64_pred_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): Likewise.
108 (@cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): New expander.
109 (*cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>_any): New pattern.
110 (@aarch64_sve2_cvtxnt<mode>): Likewise.
111 (@aarch64_pred_<SVE2_U32_UNARY:sve_int_op><mode>): Likewise.
112 (@cond_<SVE2_U32_UNARY:sve_int_op><mode>): New expander.
113 (*cond_<SVE2_U32_UNARY:sve_int_op><mode>): New pattern.
114 (@aarch64_pred_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): Likewise.
115 (@cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New expander.
116 (*cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New pattern.
117 (@aarch64_sve2_pmul<mode>): Likewise.
118 (@aarch64_sve_<SVE2_PMULL:optab><mode>): Likewise.
119 (@aarch64_sve_<SVE2_PMULL_PAIR:optab><mode>): Likewise.
120 (@aarch64_sve2_tbl2<mode>): Likewise.
121 (@aarch64_sve2_tbx<mode>): Likewise.
122 (@aarch64_sve_<SVE2_INT_BITPERM:sve_int_op><mode>): Likewise.
123 (@aarch64_sve2_histcnt<mode>): Likewise.
124 (@aarch64_sve2_histseg<mode>): Likewise.
125 (@aarch64_pred_<SVE2_MATCH:sve_int_op><mode>): Likewise.
126 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_cc): Likewise.
127 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_ptest): Likewise.
128 (aarch64_sve2_aes<CRYPTO_AES:aes_op>): Likewise.
129 (aarch64_sve2_aes<CRYPTO_AESMC:aesmc_op>): Likewise.
130 (*aarch64_sve2_aese_fused, *aarch64_sve2_aesd_fused): Likewise.
131 (aarch64_sve2_rax1, aarch64_sve2_sm4e, aarch64_sve2_sm4ekey): Likewise.
132 (<su>mulh<r>s<mode>3): Update after above pattern name changes.
133 * config/aarch64/iterators.md (VNx16QI_ONLY, VNx4SF_ONLY)
134 (SVE_STRUCT2, SVE_FULL_BHI, SVE_FULL_HSI, SVE_FULL_HDI)
135 (SVE2_PMULL_PAIR_I): New mode iterators.
136 (UNSPEC_ADCLB, UNSPEC_ADCLT, UNSPEC_ADDHNB, UNSPEC_ADDHNT, UNSPEC_BDEP)
137 (UNSPEC_BEXT, UNSPEC_BGRP, UNSPEC_CADD90, UNSPEC_CADD270, UNSPEC_CDOT)
138 (UNSPEC_CDOT90, UNSPEC_CDOT180, UNSPEC_CDOT270, UNSPEC_CMLA)
139 (UNSPEC_CMLA90, UNSPEC_CMLA180, UNSPEC_CMLA270, UNSPEC_COND_FCVTLT)
140 (UNSPEC_COND_FCVTNT, UNSPEC_COND_FCVTX, UNSPEC_COND_FCVTXNT)
141 (UNSPEC_COND_FLOGB, UNSPEC_EORBT, UNSPEC_EORTB, UNSPEC_FADDP)
142 (UNSPEC_FMAXP, UNSPEC_FMAXNMP, UNSPEC_FMLALB, UNSPEC_FMLALT)
143 (UNSPEC_FMLSLB, UNSPEC_FMLSLT, UNSPEC_FMINP, UNSPEC_FMINNMP)
144 (UNSPEC_HISTCNT, UNSPEC_HISTSEG, UNSPEC_MATCH, UNSPEC_NMATCH)
145 (UNSPEC_PMULLB, UNSPEC_PMULLB_PAIR, UNSPEC_PMULLT, UNSPEC_PMULLT_PAIR)
146 (UNSPEC_RADDHNB, UNSPEC_RADDHNT, UNSPEC_RSUBHNB, UNSPEC_RSUBHNT)
147 (UNSPEC_SLI, UNSPEC_SRI, UNSPEC_SABDLB, UNSPEC_SABDLT, UNSPEC_SADDLB)
148 (UNSPEC_SADDLBT, UNSPEC_SADDLT, UNSPEC_SADDWB, UNSPEC_SADDWT)
149 (UNSPEC_SBCLB, UNSPEC_SBCLT, UNSPEC_SMAXP, UNSPEC_SMINP)
150 (UNSPEC_SQCADD90, UNSPEC_SQCADD270, UNSPEC_SQDMULLB, UNSPEC_SQDMULLBT)
151 (UNSPEC_SQDMULLT, UNSPEC_SQRDCMLAH, UNSPEC_SQRDCMLAH90)
152 (UNSPEC_SQRDCMLAH180, UNSPEC_SQRDCMLAH270, UNSPEC_SQRSHRNB)
153 (UNSPEC_SQRSHRNT, UNSPEC_SQRSHRUNB, UNSPEC_SQRSHRUNT, UNSPEC_SQSHRNB)
154 (UNSPEC_SQSHRNT, UNSPEC_SQSHRUNB, UNSPEC_SQSHRUNT, UNSPEC_SQXTNB)
155 (UNSPEC_SQXTNT, UNSPEC_SQXTUNB, UNSPEC_SQXTUNT, UNSPEC_SSHLLB)
156 (UNSPEC_SSHLLT, UNSPEC_SSUBLB, UNSPEC_SSUBLBT, UNSPEC_SSUBLT)
157 (UNSPEC_SSUBLTB, UNSPEC_SSUBWB, UNSPEC_SSUBWT, UNSPEC_SUBHNB)
158 (UNSPEC_SUBHNT, UNSPEC_TBL2, UNSPEC_UABDLB, UNSPEC_UABDLT)
159 (UNSPEC_UADDLB, UNSPEC_UADDLT, UNSPEC_UADDWB, UNSPEC_UADDWT)
160 (UNSPEC_UMAXP, UNSPEC_UMINP, UNSPEC_UQRSHRNB, UNSPEC_UQRSHRNT)
161 (UNSPEC_UQSHRNB, UNSPEC_UQSHRNT, UNSPEC_UQXTNB, UNSPEC_UQXTNT)
162 (UNSPEC_USHLLB, UNSPEC_USHLLT, UNSPEC_USUBLB, UNSPEC_USUBLT)
163 (UNSPEC_USUBWB, UNSPEC_USUBWT): New unspecs.
164 (UNSPEC_SMULLB, UNSPEC_SMULLT, UNSPEC_UMULLB, UNSPEC_UMULLT)
165 (UNSPEC_SMULHS, UNSPEC_SMULHRS, UNSPEC_UMULHS, UNSPEC_UMULHRS)
166 (UNSPEC_RSHRNB, UNSPEC_RSHRNT, UNSPEC_SHRNB, UNSPEC_SHRNT): Move
168 (VNARROW, Ventype): New mode attributes.
169 (Vewtype): Handle VNx2DI. Fix typo in comment.
170 (VDOUBLE): New mode attribute.
171 (sve_lane_con): Handle VNx8HI.
172 (SVE_INT_UNARY): Include ss_abs and ss_neg for TARGET_SVE2.
173 (SVE_INT_BINARY): Likewise ss_plus, us_plus, ss_minus and us_minus.
174 (sve_int_op, sve_int_op_rev): Handle the above codes.
175 (sve_pred_int_rhs2_operand): Likewise.
176 (MULLBT, SHRNB, SHRNT): Delete.
177 (SVE_INT_SHIFT_IMM): New int iterator.
178 (SVE_WHILE): Add UNSPEC_WHILEGE, UNSPEC_WHILEGT, UNSPEC_WHILEHI
179 and UNSPEC_WHILEHS for TARGET_SVE2.
180 (SVE2_U32_UNARY, SVE2_INT_UNARY_NARROWB, SVE2_INT_UNARY_NARROWT)
181 (SVE2_INT_BINARY, SVE2_INT_BINARY_LANE, SVE2_INT_BINARY_LONG)
182 (SVE2_INT_BINARY_LONG_LANE, SVE2_INT_BINARY_NARROWB)
183 (SVE2_INT_BINARY_NARROWT, SVE2_INT_BINARY_PAIR, SVE2_FP_BINARY_PAIR)
184 (SVE2_INT_BINARY_PAIR_LONG, SVE2_INT_BINARY_WIDE): New int iterators.
185 (SVE2_INT_SHIFT_IMM_LONG, SVE2_INT_SHIFT_IMM_NARROWB): Likewise.
186 (SVE2_INT_SHIFT_IMM_NARROWT, SVE2_INT_SHIFT_INSERT, SVE2_INT_CADD)
187 (SVE2_INT_BITPERM, SVE2_INT_TERNARY, SVE2_INT_TERNARY_LANE): Likewise.
188 (SVE2_FP_TERNARY_LONG, SVE2_FP_TERNARY_LONG_LANE, SVE2_INT_CMLA)
189 (SVE2_INT_CDOT, SVE2_INT_ADD_BINARY_LONG, SVE2_INT_QADD_BINARY_LONG)
190 (SVE2_INT_SUB_BINARY_LONG, SVE2_INT_QSUB_BINARY_LONG): Likewise.
191 (SVE2_INT_ADD_BINARY_LONG_LANE, SVE2_INT_QADD_BINARY_LONG_LANE)
192 (SVE2_INT_SUB_BINARY_LONG_LANE, SVE2_INT_QSUB_BINARY_LONG_LANE)
193 (SVE2_COND_INT_UNARY_FP, SVE2_COND_FP_UNARY_LONG): Likewise.
194 (SVE2_COND_FP_UNARY_NARROWB, SVE2_COND_INT_BINARY): Likewise.
195 (SVE2_COND_INT_BINARY_NOREV, SVE2_COND_INT_BINARY_REV): Likewise.
196 (SVE2_COND_INT_SHIFT, SVE2_MATCH, SVE2_PMULL): Likewise.
197 (optab): Handle the new unspecs.
198 (su, r): Remove entries for UNSPEC_SHRNB, UNSPEC_SHRNT, UNSPEC_RSHRNB
200 (lr): Handle the new unspecs.
202 (cmp_op, while_optab_cmp, sve_int_op): Handle the new unspecs.
203 (sve_int_op_rev, sve_int_add_op, sve_int_qadd_op, sve_int_sub_op)
204 (sve_int_qsub_op): New int attributes.
205 (sve_fp_op, rot): Handle the new unspecs.
206 * config/aarch64/aarch64-sve-builtins.h
207 (function_resolver::require_matching_pointer_type): Declare.
208 (function_resolver::resolve_unary): Add an optional boolean argument.
209 (function_resolver::finish_opt_n_resolution): Add an optional
210 type_suffix_index argument.
211 (gimple_folder::redirect_call): Declare.
212 (gimple_expander::prepare_gather_address_operands): Add an optional
214 * config/aarch64/aarch64-sve-builtins.cc: Include
215 aarch64-sve-builtins-sve2.h.
216 (TYPES_b_unsigned, TYPES_b_integer, TYPES_bh_integer): New macros.
217 (TYPES_bs_unsigned, TYPES_hs_signed, TYPES_hs_integer): Likewise.
218 (TYPES_hd_unsigned, TYPES_hsd_signed): Likewise.
219 (TYPES_hsd_integer): Use TYPES_hsd_signed.
220 (TYPES_s_float_hsd_integer, TYPES_s_float_sd_integer): New macros.
221 (TYPES_s_unsigned): Likewise.
222 (TYPES_s_integer): Use TYPES_s_unsigned.
223 (TYPES_sd_signed, TYPES_sd_unsigned): New macros.
224 (TYPES_sd_integer): Use them.
225 (TYPES_d_unsigned): New macro.
226 (TYPES_d_integer): Use it.
227 (TYPES_d_data, TYPES_cvt_long, TYPES_cvt_narrow_s): New macros.
228 (TYPES_cvt_narrow): Likewise.
229 (DEF_SVE_TYPES_ARRAY): Include the new types macros above.
230 (preds_mx): New variable.
231 (function_builder::add_overloaded_function): Allow the new feature
232 set to be more restrictive than the original one.
233 (function_resolver::infer_pointer_type): Remove qualifiers from
234 the pointer type before printing it.
235 (function_resolver::require_matching_pointer_type): New function.
236 (function_resolver::resolve_sv_displacement): Handle functions
237 that don't support 32-bit vector indices or svint32_t vector offsets.
238 (function_resolver::finish_opt_n_resolution): Take the inferred type
239 as a separate argument.
240 (function_resolver::resolve_unary): Optionally treat all forms in
241 the same way as normal merging functions.
242 (gimple_folder::redirect_call): New function.
243 (function_expander::prepare_gather_address_operands): Add an argument
244 that says whether scaled forms are available. If they aren't,
245 handle scaling of vector indices and don't add the extension and
247 (function_expander::map_to_unspecs): If aarch64_sve isn't available,
248 fall back to using cond_* instead.
249 * config/aarch64/aarch64-sve-builtins-functions.h (rtx_code_function):
250 Split out the member variables into...
251 (rtx_code_function_base): ...this new base class.
252 (rtx_code_function_rotated): Inherit rtx_code_function_base.
253 (unspec_based_function): Split out the member variables into...
254 (unspec_based_function_base): ...this new base class.
255 (unspec_based_function_rotated): Inherit unspec_based_function_base.
256 (unspec_based_function_exact_insn): New class.
257 (unspec_based_add_function, unspec_based_add_lane_function)
258 (unspec_based_lane_function, unspec_based_pred_function)
259 (unspec_based_qadd_function, unspec_based_qadd_lane_function)
260 (unspec_based_qsub_function, unspec_based_qsub_lane_function)
261 (unspec_based_sub_function, unspec_based_sub_lane_function): New
263 (unspec_based_fused_function): New class.
264 (unspec_based_mla_function, unspec_based_mls_function): New typedefs.
265 (unspec_based_fused_lane_function): New class.
266 (unspec_based_mla_lane_function, unspec_based_mls_lane_function): New
268 (CODE_FOR_MODE1): New macro.
269 (fixed_insn_function): New class.
270 (while_comparison): Likewise.
271 * config/aarch64/aarch64-sve-builtins-shapes.h (binary_long_lane)
272 (binary_long_opt_n, binary_narrowb_opt_n, binary_narrowt_opt_n)
273 (binary_to_uint, binary_wide, binary_wide_opt_n, compare, compare_ptr)
274 (load_ext_gather_index_restricted, load_ext_gather_offset_restricted)
275 (load_gather_sv_restricted, shift_left_imm_long): Declare.
276 (shift_left_imm_to_uint, shift_right_imm_narrowb): Likewise.
277 (shift_right_imm_narrowt, shift_right_imm_narrowb_to_uint): Likewise.
278 (shift_right_imm_narrowt_to_uint, store_scatter_index_restricted)
279 (store_scatter_offset_restricted, tbl_tuple, ternary_long_lane)
280 (ternary_long_opt_n, ternary_qq_lane_rotate, ternary_qq_rotate)
281 (ternary_shift_left_imm, ternary_shift_right_imm, ternary_uint)
282 (unary_convert_narrowt, unary_long, unary_narrowb, unary_narrowt)
283 (unary_narrowb_to_uint, unary_narrowt_to_uint, unary_to_int): Likewise.
284 * config/aarch64/aarch64-sve-builtins-shapes.cc (apply_predication):
285 Also add an initial argument for unary_convert_narrowt, regardless
286 of the predication type.
287 (build_32_64): Allow loads and stores to specify MODE_none.
288 (build_sv_index64, build_sv_uint_offset): New functions.
289 (long_type_suffix): New function.
290 (binary_imm_narrowb_base, binary_imm_narrowt_base): New classes.
291 (binary_imm_long_base, load_gather_sv_base): Likewise.
292 (shift_right_imm_narrow_wrapper, ternary_shift_imm_base): Likewise.
293 (ternary_resize2_opt_n_base, ternary_resize2_lane_base): Likewise.
294 (unary_narrowb_base, unary_narrowt_base): Likewise.
295 (binary_long_lane_def, binary_long_lane): New shape.
296 (binary_long_opt_n_def, binary_long_opt_n): Likewise.
297 (binary_narrowb_opt_n_def, binary_narrowb_opt_n): Likewise.
298 (binary_narrowt_opt_n_def, binary_narrowt_opt_n): Likewise.
299 (binary_to_uint_def, binary_to_uint): Likewise.
300 (binary_wide_def, binary_wide): Likewise.
301 (binary_wide_opt_n_def, binary_wide_opt_n): Likewise.
302 (compare_def, compare): Likewise.
303 (compare_ptr_def, compare_ptr): Likewise.
304 (load_ext_gather_index_restricted_def,
305 load_ext_gather_index_restricted): Likewise.
306 (load_ext_gather_offset_restricted_def,
307 load_ext_gather_offset_restricted): Likewise.
308 (load_gather_sv_def): Inherit from load_gather_sv_base.
309 (load_gather_sv_restricted_def, load_gather_sv_restricted): New shape.
310 (shift_left_imm_def, shift_left_imm): Likewise.
311 (shift_left_imm_long_def, shift_left_imm_long): Likewise.
312 (shift_left_imm_to_uint_def, shift_left_imm_to_uint): Likewise.
313 (store_scatter_index_restricted_def,
314 store_scatter_index_restricted): Likewise.
315 (store_scatter_offset_restricted_def,
316 store_scatter_offset_restricted): Likewise.
317 (tbl_tuple_def, tbl_tuple): Likewise.
318 (ternary_long_lane_def, ternary_long_lane): Likewise.
319 (ternary_long_opt_n_def, ternary_long_opt_n): Likewise.
320 (ternary_qq_lane_def): Inherit from ternary_resize2_lane_base.
321 (ternary_qq_lane_rotate_def, ternary_qq_lane_rotate): New shape
322 (ternary_qq_opt_n_def): Inherit from ternary_resize2_opt_n_base.
323 (ternary_qq_rotate_def, ternary_qq_rotate): New shape.
324 (ternary_shift_left_imm_def, ternary_shift_left_imm): Likewise.
325 (ternary_shift_right_imm_def, ternary_shift_right_imm): Likewise.
326 (ternary_uint_def, ternary_uint): Likewise.
327 (unary_convert): Fix typo in comment.
328 (unary_convert_narrowt_def, unary_convert_narrowt): New shape.
329 (unary_long_def, unary_long): Likewise.
330 (unary_narrowb_def, unary_narrowb): Likewise.
331 (unary_narrowt_def, unary_narrowt): Likewise.
332 (unary_narrowb_to_uint_def, unary_narrowb_to_uint): Likewise.
333 (unary_narrowt_to_uint_def, unary_narrowt_to_uint): Likewise.
334 (unary_to_int_def, unary_to_int): Likewise.
335 * config/aarch64/aarch64-sve-builtins-base.cc (unspec_cmla)
336 (unspec_fcmla, unspec_cond_fcmla, expand_mla_mls_lane): New functions.
337 (svasrd_impl): Delete.
338 (svcadd_impl::expand): Handle integer operations too.
339 (svcmla_impl::expand, svcmla_lane::expand): Likewise, using the
340 new functions to derive the unspec numbers.
341 (svmla_svmls_lane_impl): Replace with...
342 (svmla_lane_impl, svmls_lane_impl): ...these new classes. Handle
343 integer operations too.
344 (svwhile_impl): Rename to...
345 (svwhilelx_impl): ...this and inherit from while_comparison.
346 (svasrd): Use unspec_based_function.
347 (svmla_lane): Use svmla_lane_impl.
348 (svmls_lane): Use svmls_lane_impl.
349 (svrecpe, svrsqrte): Handle unsigned integer operations too.
350 (svwhilele, svwhilelt): Use svwhilelx_impl.
351 * config/aarch64/aarch64-sve-builtins-sve2.h: New file.
352 * config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise.
353 * config/aarch64/aarch64-sve-builtins-sve2.def: Likewise.
354 * config/aarch64/aarch64-sve-builtins.def: Include
355 aarch64-sve-builtins-sve2.def.
357 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
359 * config/aarch64/aarch64-protos.h (aarch64_sve_arith_immediate_p)
360 (aarch64_sve_sqadd_sqsub_immediate_p): Add a machine_mode argument.
361 * config/aarch64/aarch64.c (aarch64_sve_arith_immediate_p)
362 (aarch64_sve_sqadd_sqsub_immediate_p): Likewise. Handle scalar
363 immediates as well as vector ones.
364 * config/aarch64/predicates.md (aarch64_sve_arith_immediate)
365 (aarch64_sve_sub_arith_immediate, aarch64_sve_qadd_immediate)
366 (aarch64_sve_qsub_immediate): Update calls accordingly.
368 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
370 * config/aarch64/aarch64-sve2.md: Add banner comments.
371 (<su>mulh<r>s<mode>3): Move further up file.
372 (<su>mull<bt><Vwide>, <r>shrnb<mode>, <r>shrnt<mode>)
373 (*aarch64_sve2_sra<mode>): Move further down file.
374 * config/aarch64/t-aarch64 (s-check-sve-md): Check aarch64-sve2.md too.
376 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
378 * config/aarch64/iterators.md (SVE_WHILE): Add UNSPEC_WHILERW
380 (while_optab_cmp): Handle them.
381 * config/aarch64/aarch64-sve.md
382 (*while_<while_optab_cmp><GPI:mode><PRED_ALL:mode>_ptest): Make public
383 and add a "@" marker.
384 * config/aarch64/aarch64-sve2.md (check_<raw_war>_ptrs<mode>): Use it
385 instead of gen_aarch64_sve2_while_ptest.
386 (@aarch64_sve2_while<cmp_op><GPI:mode><PRED_ALL:mode>_ptest): Delete.
388 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
390 * config/aarch64/aarch64.md (UNSPEC_WHILE_LE): Rename to...
391 (UNSPEC_WHILELE): ...this.
392 (UNSPEC_WHILE_LO): Rename to...
393 (UNSPEC_WHILELO): ...this.
394 (UNSPEC_WHILE_LS): Rename to...
395 (UNSPEC_WHILELS): ...this.
396 (UNSPEC_WHILE_LT): Rename to...
397 (UNSPEC_WHILELT): ...this.
398 * config/aarch64/iterators.md (SVE_WHILE): Update accordingly.
399 (cmp_op, while_optab_cmp): Likewise.
400 * config/aarch64/aarch64.c (aarch64_sve_move_pred_via_while): Likewise.
401 * config/aarch64/aarch64-sve-builtins-base.cc (svwhilele): Likewise.
402 (svwhilelt): Likewise.
404 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
406 * config/aarch64/aarch64-sve-builtins-shapes.h (unary_count): Delete.
407 (unary_to_uint): Define.
408 * config/aarch64/aarch64-sve-builtins-shapes.cc (unary_count_def)
409 (unary_count): Rename to...
410 (unary_to_uint_def, unary_to_uint): ...this.
411 * config/aarch64/aarch64-sve-builtins-base.def: Update accordingly.
413 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
415 * config/aarch64/aarch64-sve-builtins-functions.h
416 (code_for_mode_function): New class.
417 (CODE_FOR_MODE0, QUIET_CODE_FOR_MODE0): New macros.
418 * config/aarch64/aarch64-sve-builtins-base.cc (svcompact_impl)
419 (svext_impl, svmul_lane_impl, svsplice_impl, svtmad_impl): Delete.
420 (svcompact, svext, svsplice): Use QUIET_CODE_FOR_MODE0.
421 (svmul_lane, svtmad): Use CODE_FOR_MODE0.
423 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
425 * config/aarch64/iterators.md (addsub): New code attribute.
426 * config/aarch64/aarch64-simd.md (aarch64_<su_optab><optab><mode>):
428 (aarch64_<su_optab>q<addsub><mode>): ...this, making the same change
429 in the asm string and attributes. Fix indentation.
430 * config/aarch64/aarch64-sve.md (@aarch64_<su_optab><optab><mode>):
432 (@aarch64_sve_<optab><mode>): ...this.
433 * config/aarch64/aarch64-sve-builtins.h
434 (function_expander::expand_signed_unpred_op): Delete.
435 * config/aarch64/aarch64-sve-builtins.cc
436 (function_expander::expand_signed_unpred_op): Likewise.
437 (function_expander::map_to_rtx_codes): If the optab isn't defined,
438 try using code_for_aarch64_sve instead.
439 * config/aarch64/aarch64-sve-builtins-base.cc (svqadd_impl): Delete.
440 (svqsub_impl): Likewise.
441 (svqadd, svqsub): Use rtx_code_function instead.
443 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
445 * config/aarch64/iterators.md (SRHSUB, URHSUB): Delete.
446 (HADDSUB, sur, addsub): Remove them.
448 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
450 * tree-nrv.c (pass_return_slot::execute): Handle all internal
451 functions the same way, rather than singling out those that
452 aren't mapped directly to optabs.
454 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
456 * target.def (compatible_vector_types_p): New target hook.
457 * hooks.h (hook_bool_const_tree_const_tree_true): Declare.
458 * hooks.c (hook_bool_const_tree_const_tree_true): New function.
459 * doc/tm.texi.in (TARGET_COMPATIBLE_VECTOR_TYPES_P): New hook.
460 * doc/tm.texi: Regenerate.
461 * gimple-expr.c: Include target.h.
462 (useless_type_conversion_p): Use targetm.compatible_vector_types_p.
463 * config/aarch64/aarch64.c (aarch64_compatible_vector_types_p): New
465 (TARGET_COMPATIBLE_VECTOR_TYPES_P): Define.
466 * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::convert_pred):
467 Use the original predicate if it already has a suitable type.
469 2020-01-09 Martin Jambor <mjambor@suse.cz>
471 * cgraph.h (cgraph_edge): Make remove, set_call_stmt, make_direct,
472 resolve_speculation and redirect_call_stmt_to_callee static. Change
473 return type of set_call_stmt to cgraph_edge *.
474 * auto-profile.c (afdo_indirect_call): Adjust call to
475 redirect_call_stmt_to_callee.
476 * cgraph.c (cgraph_edge::set_call_stmt): Make return cgraph-edge *,
477 make the this pointer explicit, adjust self-recursive calls and the
478 call top make_direct. Return the resulting edge.
479 (cgraph_edge::remove): Make this pointer explicit.
480 (cgraph_edge::resolve_speculation): Likewise, adjust call to remove.
481 (cgraph_edge::make_direct): Likewise, adjust call to
483 (cgraph_edge::redirect_call_stmt_to_callee): Likewise, also adjust
484 call to set_call_stmt.
485 (cgraph_update_edges_for_call_stmt_node): Update call to
486 set_call_stmt and remove.
487 * cgraphclones.c (cgraph_node::set_call_stmt_including_clones):
488 Renamed edge to master_edge. Adjusted calls to set_call_stmt.
489 (cgraph_node::create_edge_including_clones): Moved "first" definition
490 of edge to the block where it was used. Adjusted calls to
492 (cgraph_node::remove_symbol_and_inline_clones): Adjust call to
494 * cgraphunit.c (walk_polymorphic_call_targets): Adjusted calls to
495 make_direct and redirect_call_stmt_to_callee.
496 * ipa-fnsummary.c (redirect_to_unreachable): Adjust calls to
497 resolve_speculation and make_direct.
498 * ipa-inline-transform.c (inline_transform): Adjust call to
499 redirect_call_stmt_to_callee.
500 (check_speculations_1):: Adjust call to resolve_speculation.
501 * ipa-inline.c (resolve_noninline_speculation): Adjust call to
503 (inline_small_functions): Adjust call to resolve_speculation.
504 (ipa_inline): Likewise.
505 * ipa-prop.c (ipa_make_edge_direct_to_target): Adjust call to
507 * ipa-visibility.c (function_and_variable_visibility): Make iteration
508 safe with regards to edge removal, adjust calls to
509 redirect_call_stmt_to_callee.
510 * ipa.c (walk_polymorphic_call_targets): Adjust calls to make_direct
511 and redirect_call_stmt_to_callee.
512 * multiple_target.c (create_dispatcher_calls): Adjust call to
513 redirect_call_stmt_to_callee
514 (redirect_to_specific_clone): Likewise.
515 * tree-cfgcleanup.c (delete_unreachable_blocks_update_callgraph):
516 Adjust calls to cgraph_edge::remove.
517 * tree-inline.c (copy_bb): Adjust call to set_call_stmt.
518 (redirect_all_calls): Adjust call to redirect_call_stmt_to_callee.
519 (expand_call_inline): Adjust call to cgraph_edge::remove.
521 2020-01-09 Martin Liska <mliska@suse.cz>
523 * params.opt: Set Optimization for
524 param_max_speculative_devirt_maydefs.
526 2020-01-09 Martin Sebor <msebor@redhat.com>
530 * builtins.c (compute_objsize): Avoid handling MEM_REFs of vector type.
532 2020-01-09 Martin Liska <mliska@suse.cz>
534 * auto-profile.c (auto_profile): Use opt_for_fn
536 * ipa-cp.c (ipcp_lattice::add_value): Likewise.
537 (propagate_vals_across_arith_jfunc): Likewise.
538 (hint_time_bonus): Likewise.
539 (incorporate_penalties): Likewise.
540 (good_cloning_opportunity_p): Likewise.
541 (perform_estimation_of_a_value): Likewise.
542 (estimate_local_effects): Likewise.
543 (ipcp_propagate_stage): Likewise.
544 * ipa-fnsummary.c (decompose_param_expr): Likewise.
545 (set_switch_stmt_execution_predicate): Likewise.
546 (analyze_function_body): Likewise.
547 * ipa-inline-analysis.c (offline_size): Likewise.
548 * ipa-inline.c (early_inliner): Likewise.
549 * ipa-prop.c (ipa_analyze_node): Likewise.
550 (ipcp_transform_function): Likewise.
551 * ipa-sra.c (process_scan_results): Likewise.
552 (ipa_sra_summarize_function): Likewise.
553 * params.opt: Rename ipcp-unit-growth to
554 ipa-cp-unit-growth. Add Optimization for various
555 IPA-related parameters.
557 2020-01-09 Richard Biener <rguenther@suse.de>
560 * gimplify.c (gimplify_expr): Deal with NOP definitions.
562 2020-01-09 Richard Biener <rguenther@suse.de>
564 PR tree-optimization/93040
565 * gimple-ssa-store-merging.c (find_bswap_or_nop): Raise search limit.
567 2020-01-09 Georg-Johann Lay <avr@gjlay.de>
569 * common/config/avr/avr-common.c (avr_option_optimization_table)
570 [OPT_LEVELS_1_PLUS]: Set -fsplit-wide-types-early.
572 2020-01-09 Martin Liska <mliska@suse.cz>
574 * cgraphclones.c (symbol_table::materialize_all_clones):
575 Use cgraph_node::dump_name.
577 2020-01-09 Jakub Jelinek <jakub@redhat.com>
580 * config/riscv/riscv.c (riscv_print_operand_reloc): Use
581 output_operand_lossage instead of gcc_unreachable.
582 * doc/md.texi (riscv f constraint): Fix typo.
585 * config/i386/i386.md (subv<mode>4): Use SWIDWI iterator instead of
586 SWI. Use <general_hilo_operand> instead of <general_operand>. Use
587 CONST_SCALAR_INT_P instead of CONST_INT_P.
588 (*subv<mode>4_1): Rename to ...
589 (subv<mode>4_1): ... this.
590 (*subv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
591 define_insn_and_split patterns.
592 (*subv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
595 2020-01-08 David Malcolm <dmalcolm@redhat.com>
597 * vec.c (class selftest::count_dtor): New class.
598 (selftest::test_auto_delete_vec): New test.
599 (selftest::vec_c_tests): Call it.
600 * vec.h (class auto_delete_vec): New class template.
601 (auto_delete_vec<T>::~auto_delete_vec): New dtor.
603 2020-01-08 David Malcolm <dmalcolm@redhat.com>
605 * sbitmap.h (auto_sbitmap): Add operator const_sbitmap.
607 2020-01-08 Jim Wilson <jimw@sifive.com>
609 * config/riscv/riscv.c (riscv_legitimize_tls_address): Ifdef out
610 use of TLS_MODEL_LOCAL_EXEC when not pic.
612 2020-01-08 David Malcolm <dmalcolm@redhat.com>
614 * hash-map-tests.c (selftest::test_map_of_strings_to_int): Fix
617 2020-01-08 Jakub Jelinek <jakub@redhat.com>
620 * config/i386/i386.md (*stack_protect_set_2_<mode> peephole2,
621 *stack_protect_set_3 peephole2): Also check that the second
622 insns source is general_operand.
625 * config/i386/i386.md (addcarry<mode>_0): Use nonimmediate_operand
626 predicate for output operand instead of register_operand.
627 (addcarry<mode>, addcarry<mode>_1): Likewise. Add alternative with
628 memory destination and non-memory operands[2].
630 2020-01-08 Martin Liska <mliska@suse.cz>
632 * cgraph.c (cgraph_node::dump): Use ::dump_name or
633 ::dump_asm_name instead of (::name or ::asm_name).
634 * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
635 * cgraphunit.c (walk_polymorphic_call_targets): Likewise.
636 (analyze_functions): Likewise.
637 (expand_all_functions): Likewise.
638 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
639 (propagate_bits_across_jump_function): Likewise.
640 (dump_profile_updates): Likewise.
641 (ipcp_store_bits_results): Likewise.
642 (ipcp_store_vr_results): Likewise.
643 * ipa-devirt.c (dump_targets): Likewise.
644 * ipa-fnsummary.c (analyze_function_body): Likewise.
645 * ipa-hsa.c (check_warn_node_versionable): Likewise.
646 (process_hsa_functions): Likewise.
647 * ipa-icf.c (sem_item_optimizer::merge_classes): Likewise.
648 (set_alias_uids): Likewise.
649 * ipa-inline-transform.c (save_inline_function_body): Likewise.
650 * ipa-inline.c (recursive_inlining): Likewise.
651 (inline_to_all_callers_1): Likewise.
652 (ipa_inline): Likewise.
653 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
654 (ipa_propagate_frequency): Likewise.
655 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
656 (remove_described_reference): Likewise.
657 * ipa-pure-const.c (worse_state): Likewise.
658 (check_retval_uses): Likewise.
659 (analyze_function): Likewise.
660 (propagate_pure_const): Likewise.
661 (propagate_nothrow): Likewise.
662 (dump_malloc_lattice): Likewise.
663 (propagate_malloc): Likewise.
664 (pass_local_pure_const::execute): Likewise.
665 * ipa-visibility.c (optimize_weakref): Likewise.
666 (function_and_variable_visibility): Likewise.
667 * ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
668 (ipa_discover_variable_flags): Likewise.
669 * lto-streamer-out.c (output_function): Likewise.
670 (output_constructor): Likewise.
671 * tree-inline.c (copy_bb): Likewise.
672 * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
673 * varpool.c (symbol_table::remove_unreferenced_decls): Likewise.
675 2020-01-08 Richard Biener <rguenther@suse.de>
678 * tree-eh.c (sink_clobbers): Update virtual operands for
679 the first and last stmt only. Add a dry-run capability.
680 (pass_lower_eh_dispatch::execute): Perform clobber sinking
681 after CFG manipulations and in RPO order to catch all
682 secondary opportunities reliably.
684 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
687 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
689 2019-01-08 Richard Biener <rguenther@suse.de>
692 * gimple-fold.c (rewrite_to_defined_overflow): Mark stmt modified.
693 * tree-ssa-loop-im.c (move_computations_worker): Properly adjust
694 virtual operand, also updating SSA use.
695 * gimple-loop-interchange.cc (loop_cand::undo_simple_reduction):
696 Update stmt after resetting virtual operand.
697 (tree_loop_interchange::move_code_to_inner_loop): Likewise.
698 * gimple-iterator.c (gsi_remove): When not removing the stmt
699 permanently do not delink immediate uses or mark the stmt modified.
701 2020-01-08 Martin Liska <mliska@suse.cz>
703 * ipa-fnsummary.c (dump_ipa_call_summary): Use symtab_node::dump_name.
704 (ipa_call_context::estimate_size_and_time): Likewise.
705 (inline_analyze_function): Likewise.
707 2020-01-08 Martin Liska <mliska@suse.cz>
709 * cgraph.c (cgraph_node::dump): Use systematically
712 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
714 Add -nodevicespecs option for avr.
717 * config/avr/avr.opt (-nodevicespecs): New driver option.
718 * config/avr/driver-avr.c (avr_devicespecs_file): Only issue
719 "-specs=device-specs/..." if that option is not set.
720 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
722 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
724 Implement 64-bit double functions for avr.
727 * config.gcc (tm_defines) [target=avr]: Support --with-libf7,
728 --with-double-comparison.
729 * doc/install.texi: Document them.
730 * config/avr/avr-c.c (avr_cpu_cpp_builtins)
731 <WITH_LIBF7_LIBGCC, WITH_LIBF7_MATH, WITH_LIBF7_MATH_SYMBOLS>
732 <WITH_DOUBLE_COMPARISON>: New built-in defines.
733 * doc/invoke.texi (AVR Built-in Macros): Document them.
734 * config/avr/avr-protos.h (avr_float_lib_compare_returns_bool): New.
735 * config/avr/avr.c (avr_float_lib_compare_returns_bool): New function.
736 * config/avr/avr.h (FLOAT_LIB_COMPARE_RETURNS_BOOL): New macro.
738 2020-01-08 Richard Earnshaw <rearnsha@arm.com>
741 * config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
742 armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
743 when only building rm-profile multilibs.
745 2020-01-08 Feng Xue <fxue@os.amperecomputing.com>
748 * ipa-cp.c (self_recursively_generated_p): Find matched aggregate
749 lattice for a value to check.
750 (propagate_vals_across_arith_jfunc): Add an assertion to ensure
751 finite propagation in self-recursive scc.
753 2020-01-08 Luo Xiong Hu <luoxhu@linux.ibm.com>
755 * ipa-inline.c (caller_growth_limits): Restore the AND.
757 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
759 * config/gcn/gcn-valu.md (VEC_1REG_INT_ALT): Delete iterator.
760 (VEC_ALLREG_ALT): New iterator.
761 (VEC_ALLREG_INT_MODE): New iterator.
762 (VCMP_MODE): New iterator.
763 (VCMP_MODE_INT): New iterator.
764 (vec_cmpu<mode>di): Use VCMP_MODE_INT.
765 (vec_cmp<u>v64qidi): New define_expand.
766 (vec_cmp<mode>di_exec): Use VCMP_MODE.
767 (vec_cmpu<mode>di_exec): New define_expand.
768 (vec_cmp<u>v64qidi_exec): New define_expand.
769 (vec_cmp<mode>di_dup): Use VCMP_MODE.
770 (vec_cmp<mode>di_dup_exec): Use VCMP_MODE.
771 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>): Rename ...
772 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>): ... to this.
773 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>_exec): Rename ...
774 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>_exec): ... to this.
775 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>): Rename ...
776 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>): ... to this.
777 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>_exec): Rename ...
778 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>_exec): ... to
780 * config/gcn/gcn.c (print_operand): Fix 8 and 16 bit suffixes.
781 * config/gcn/gcn.md (expander): Add sign_extend and zero_extend.
783 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
785 * config/gcn/constraints.md (DA): Update description and match.
787 (Db): New constraint.
788 * config/gcn/gcn-protos.h (gcn_inline_constant64_p): Add second
790 * config/gcn/gcn.c (gcn_inline_constant64_p): Add 'mixed' parameter.
791 Implement 'Db' mixed immediate type.
792 * config/gcn/gcn-valu.md (addcv64si3<exec_vcc>): Rework constraints.
793 (addcv64si3_dup<exec_vcc>): Delete.
794 (subcv64si3<exec_vcc>): Rework constraints.
795 (addv64di3): Rework constraints.
796 (addv64di3_exec): Rework constraints.
797 (subv64di3): Rework constraints.
798 (addv64di3_dup): Delete.
799 (addv64di3_dup_exec): Delete.
800 (addv64di3_zext): Rework constraints.
801 (addv64di3_zext_exec): Rework constraints.
802 (addv64di3_zext_dup): Rework constraints.
803 (addv64di3_zext_dup_exec): Rework constraints.
804 (addv64di3_zext_dup2): Rework constraints.
805 (addv64di3_zext_dup2_exec): Rework constraints.
806 (addv64di3_sext_dup2): Rework constraints.
807 (addv64di3_sext_dup2_exec): Rework constraints.
809 2020-01-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
811 * doc/sourcebuild.texi (arm_little_endian, arm_nothumb): Documented
812 existing target checks.
814 2020-01-07 Richard Biener <rguenther@suse.de>
816 * doc/install.texi: Bump minimal supported MPC version.
818 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
820 * langhooks-def.h (lhd_simulate_enum_decl): Declare.
821 (LANG_HOOKS_SIMULATE_ENUM_DECL): Use it.
822 * langhooks.c: Include stor-layout.h.
823 (lhd_simulate_enum_decl): New function.
824 * config/aarch64/aarch64-sve-builtins.cc (init_builtins): Call
825 handle_arm_sve_h for the LTO frontend.
826 (register_vector_type): Cope with null returns from pushdecl.
828 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
830 * config/aarch64/aarch64-protos.h (aarch64_sve::svbool_type_p)
831 (aarch64_sve::nvectors_if_data_type): Replace with...
832 (aarch64_sve::builtin_type_p): ...this.
833 * config/aarch64/aarch64-sve-builtins.cc: Include attribs.h.
834 (find_vector_type): Delete.
835 (add_sve_type_attribute): New function.
836 (lookup_sve_type_attribute): Likewise.
837 (register_builtin_types): Add an "SVE type" attribute to each type.
838 (register_tuple_type): Likewise.
839 (svbool_type_p, nvectors_if_data_type): Delete.
840 (mangle_builtin_type): Use lookup_sve_type_attribute.
841 (builtin_type_p): Likewise. Add an overload that returns the
842 number of constituent vector and predicate registers.
843 * config/aarch64/aarch64.c (aarch64_sve_argument_p): Delete.
844 (aarch64_returns_value_in_sve_regs_p): Use aarch64_sve::builtin_type_p
845 instead of aarch64_sve_argument_p.
846 (aarch64_takes_arguments_in_sve_regs_p): Likewise.
847 (aarch64_pass_by_reference): Likewise.
848 (aarch64_function_value_1): Likewise.
849 (aarch64_return_in_memory): Likewise.
850 (aarch64_layout_arg): Likewise.
852 2020-01-07 Jakub Jelinek <jakub@redhat.com>
854 PR tree-optimization/93156
855 * tree-ssa-ccp.c (bit_value_binop): For x * x note that the second
856 least significant bit is always clear.
858 PR tree-optimization/93118
859 * match.pd ((x >> c) << c -> x & (-1<<c)): Add nop_convert?. Add new
860 simplifier with two intermediate conversions.
862 2020-01-07 Martin Liska <mliska@suse.cz>
864 * params.opt: Add Optimization for various parameters.
866 2020-01-07 Martin Liska <mliska@suse.cz>
869 * doc/extend.texi: Explain cloning for target_clone
872 2020-01-07 Martin Liska <mliska@suse.cz>
874 PR tree-optimization/92860
875 * common.opt: Make in Optimization option
876 as it is affected by -O0, which is an Optimization
878 * tree-inline.c (tree_inlinable_function_p):
879 Use opt_for_fn for warn_inline.
880 (expand_call_inline): Likewise.
882 2020-01-07 Martin Liska <mliska@suse.cz>
884 PR tree-optimization/92860
885 * common.opt: Make flag_ree as optimization
888 2020-01-07 Martin Liska <mliska@suse.cz>
890 PR optimization/92860
891 * params.opt: Mark param_min_crossjump_insns with Optimization
894 2020-01-07 Luo Xiong Hu <luoxhu@linux.ibm.com>
896 * ipa-inline-analysis.c (estimate_growth): Fix typo.
897 * ipa-inline.c (caller_growth_limits): Use OR instead of AND.
899 2020-01-06 Michael Meissner <meissner@linux.ibm.com>
901 * config/rs6000/rs6000.c (hard_reg_and_mode_to_addr_mask): New
902 helper function to return the valid addressing formats for a given
903 hard register and mode.
904 (rs6000_adjust_vec_address): Call hard_reg_and_mode_to_addr_mask.
906 * config/rs6000/constraints.md (Q constraint): Update
908 * doc/md.texi (RS/6000 constraints): Update 'Q' cosntraint
911 * config/rs6000/vsx.md (vsx_extract_<mode>_var, VSX_D iterator):
912 Use 'Q' for doing vector extract from memory.
913 (vsx_extract_v4sf_var): Use 'Q' for doing vector extract from
915 (vsx_extract_<mode>_var, VSX_EXTRACT_I iterator): Use 'Q' for
916 doing vector extract from memory.
917 (vsx_extract_<mode>_<VS_scalar>mode_var): Use 'Q' for doing vector
920 * config/rs6000/rs6000.c (rs6000_adjust_vec_address): Add support
921 for the offset being 34-bits when -mcpu=future is used.
923 2020-01-06 John David Anglin <danglin@gcc.gnu.org>
925 * config/pa/pa.md: Revert change to use ordered_comparison_operator
926 instead of cmpib_comparison_operator in cmpib patterns.
927 * config/pa/predicates.md (cmpib_comparison_operator): Revert removal
928 of cmpib_comparison_operator. Revise comment.
930 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
932 * tree-vect-slp.c (vect_build_slp_tree_1): Require all shifts
933 in an IFN_DIV_POW2 node to be equal.
935 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
937 * tree-vect-stmts.c (vect_check_load_store_mask): Rename to...
938 (vect_check_scalar_mask): ...this.
939 (vectorizable_store, vectorizable_load): Update call accordingly.
940 (vectorizable_call): Use vect_check_scalar_mask to check the mask
941 argument in calls to conditional internal functions.
943 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
945 * config/gcn/gcn-valu.md (subv64di3): Use separate alternatives for
947 (subv64di3_exec): Likewise.
949 2020-01-06 Bryan Stenson <bryan@siliconvortex.com>
951 * config/mips/mips.c (vr4130_align_insns): Fix typo.
952 * doc/md.texi (movstr): Likewise.
954 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
956 * config/gcn/gcn-valu.md (vec_extract<mode><scalar_mode>): Add early
959 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
961 * config/aarch64/t-aarch64 ($(srcdir)/config/aarch64/aarch64-tune.md):
963 (s-aarch64-tune-md): ...this new stamp file. Pipe the new contents
964 to a temporary file and use move-if-change to update the real
965 file where necessary.
967 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
969 * config/aarch64/aarch64-sve.md (@aarch64_sel_dup<mode>): Use Upl
970 rather than Upa for CPY /M.
972 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
974 * config/gcn/gcn.c (gcn_inline_constant_p): Allow 64 as an inline
977 2020-01-06 Martin Liska <mliska@suse.cz>
979 PR tree-optimization/92860
980 * params.opt: Mark param_max_combine_insns with Optimization
983 2020-01-05 Jakub Jelinek <jakub@redhat.com>
986 * config/i386/i386.md (SWIDWI): New mode iterator.
987 (DWI, dwi): Add TImode variants.
988 (addv<mode>4): Use SWIDWI iterator instead of SWI. Use
989 <general_hilo_operand> instead of <general_operand>. Use
990 CONST_SCALAR_INT_P instead of CONST_INT_P.
991 (*addv<mode>4_1): Rename to ...
992 (addv<mode>4_1): ... this.
993 (QWI): New mode attribute.
994 (*addv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
995 define_insn_and_split patterns.
996 (*addv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
998 (uaddv<mode>4): Use SWIDWI iterator instead of SWI. Use
999 <general_hilo_operand> instead of <general_operand>.
1000 (*addcarry<mode>_1): New define_insn.
1001 (*add<dwi>3_doubleword_cc_overflow_1): New define_insn_and_split.
1003 2020-01-03 Konstantin Kharlamov <Hi-Angel@yandex.ru>
1005 * gdbinit.in (pr, prl, pt, pct, pgg, pgq, pgs, pge, pmz, pdd, pbs, pbm):
1006 Use "call" instead of "set".
1008 2020-01-03 Martin Jambor <mjambor@suse.cz>
1011 * ipa-cp.c (print_all_lattices): Skip functions without info.
1013 2020-01-03 Jakub Jelinek <jakub@redhat.com>
1016 * config/i386/i386-options.c (ix86_simd_clone_adjust): If
1017 TARGET_PREFER_AVX128, use prefer-vector-width=256 for 'c' and 'd'
1018 simd clones. If TARGET_PREFER_AVX256, use prefer-vector-width=512
1019 for 'e' simd clones.
1022 * config/i386/i386.opt (x_prefer_vector_width_type): Remove TargetSave
1024 (mprefer-vector-width=): Add Save.
1025 * config/i386/i386-options.c (ix86_target_string): Add PVW argument, print
1026 -mprefer-vector-width= if non-zero. Fix up -mfpmath= comment.
1027 (ix86_debug_options, ix86_function_specific_print): Adjust
1028 ix86_target_string callers.
1029 (ix86_valid_target_attribute_inner_p): Handle prefer-vector-width=.
1030 (ix86_valid_target_attribute_tree): Likewise.
1031 * config/i386/i386-options.h (ix86_target_string): Add PVW argument.
1032 * config/i386/i386-expand.c (ix86_expand_builtin): Adjust
1033 ix86_target_string caller.
1036 * config/i386/i386.md (abs<mode>2): Use expand_simple_binop instead of
1037 emitting ASHIFTRT, XOR and MINUS by hand. Use gen_int_mode with QImode
1038 instead of gen_int_shift_amount + convert_modes.
1040 PR rtl-optimization/93088
1041 * loop-iv.c (find_single_def_src): Punt after looking through
1042 128 reg copies for regs with single definitions. Move definitions
1045 2020-01-02 Dennis Zhang <dennis.zhang@arm.com>
1047 * config/arm/arm-c.c (arm_cpu_builtins): Define
1048 __ARM_FEATURE_MATMUL_INT8, __ARM_FEATURE_BF16_VECTOR_ARITHMETIC,
1049 __ARM_FEATURE_BF16_SCALAR_ARITHMETIC, and
1050 __ARM_BF16_FORMAT_ALTERNATIVE when enabled.
1051 * config/arm/arm-cpus.in (armv8_6, i8mm, bf16): New features.
1052 * config/arm/arm-tables.opt: Regenerated.
1053 * config/arm/arm.c (arm_option_reconfigure_globals): Initialize
1054 arm_arch_i8mm and arm_arch_bf16 when enabled.
1055 * config/arm/arm.h (TARGET_I8MM): New macro.
1056 (TARGET_BF16_FP, TARGET_BF16_SIMD): Likewise.
1057 * config/arm/t-aprofile: Add matching rules for -march=armv8.6-a.
1058 * config/arm/t-arm-elf (all_v8_archs): Add armv8.6-a.
1059 * config/arm/t-multilib: Add matching rules for -march=armv8.6-a.
1060 (v8_6_a_simd_variants): New.
1061 (v8_*_a_simd_variants): Add i8mm and bf16.
1062 * doc/invoke.texi (armv8.6-a, i8mm, bf16): Document new options.
1064 2020-01-02 Jakub Jelinek <jakub@redhat.com>
1067 * predict.c (compute_function_frequency): Don't call
1068 warn_function_cold on functions that already have cold attribute.
1070 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
1073 * config/pa/pa.c (pa_elf_select_rtx_section): New. Put references to
1074 COMDAT group function labels in .data.rel.ro.local section.
1075 * config/pa/pa32-linux.h (TARGET_ASM_SELECT_RTX_SECTION): Define.
1078 * config/pa/pa.md (scc): Use ordered_comparison_operator instead of
1079 comparison_operator in B and S integer comparisons. Likewise, use
1080 ordered_comparison_operator instead of cmpib_comparison_operator in
1082 * config/pa/predicates.md (cmpib_comparison_operator): Remove.
1084 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1086 Update copyright years.
1088 * gcc.c (process_command): Update copyright notice dates.
1089 * gcov-dump.c (print_version): Ditto.
1090 * gcov.c (print_version): Ditto.
1091 * gcov-tool.c (print_version): Ditto.
1092 * gengtype.c (create_file): Ditto.
1093 * doc/cpp.texi: Bump @copying's copyright year.
1094 * doc/cppinternals.texi: Ditto.
1095 * doc/gcc.texi: Ditto.
1096 * doc/gccint.texi: Ditto.
1097 * doc/gcov.texi: Ditto.
1098 * doc/install.texi: Ditto.
1099 * doc/invoke.texi: Ditto.
1101 2020-01-01 Jan Hubicka <hubicka@ucw.cz>
1103 * ipa.c (walk_polymorphic_call_targets): Fix updating of overall
1106 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1108 PR tree-optimization/93098
1109 * match.pd (popcount): For shift amounts, use integer_onep
1110 or wi::to_widest () == cst instead of tree_to_uhwi () == cst
1111 tests. Make sure that precision is power of two larger than or equal
1112 to 16. Ensure shift is never negative. Use HOST_WIDE_INT_UC macro
1113 instead of ULL suffixed constants. Formatting fixes.
1115 Copyright (C) 2020 Free Software Foundation, Inc.
1117 Copying and distribution of this file, with or without modification,
1118 are permitted in any medium without royalty provided the copyright
1119 notice and this notice are preserved.