[ARC] Add support for HS4x cpus.
[gcc.git] / gcc / ChangeLog
1 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2
3 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4 for ARCHS4x.
5 * config/arc/arc-cpus.def (hs4x): New cpu.
6 (hs4xd): Likewise.
7 * config/arc/arc-tables.opt: Regenerate.
8 * config/arc/arc.c (arc_sched_issue_rate): New function.
9 (TARGET_SCHED_ISSUE_RATE): Define.
10 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
11 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12 fpu_cvt.
13 (attr tune): Add ARCHS4x tune values.
14 (attr tune_dspmpy): Define.
15 (*tst): Correct instruction type.
16 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
17 * config/arc/arcHS4x.md: New file.
18 * config/arc/fpu.md: Update instruction type attributes.
19 * config/arc/t-multilib: Regenerate.
20
21 2018-07-16 Tom de Vries <tdevries@suse.de>
22
23 PR debug/86455
24 * var-tracking.c (vt_initialize): Fix pre_dec handling.
25
26 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
27
28 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
29 early clobber.
30
31 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
32
33 PR tree-optimization/86514
34 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
35 conversion to a boolean type from a type with greater precision.
36
37 2018-07-16 Tom de Vries <tdevries@suse.de>
38
39 * var-tracking.c (vt_initialize): Print adjusted insn slim if
40 dump_flags request TDF_SLIM.
41
42 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
43
44 * fold-const.c (int_const_binop_1): Abstract...
45 (wide_int_binop): ...wide int code here.
46 (poly_int_binop): ...poly int code here.
47 Abstract the rest of int_const_binop_1 into int_const_binop.
48 * fold-const.h (wide_int_binop): New.
49 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
50 Remove useless PLUS/MINUS_EXPR case.
51 (zero_nonzero_bits_from_vr): Move wide int code...
52 (zero_nonzero_bits_from_bounds): ...here.
53 (extract_range_from_binary_expr_1): Move mask optimization code...
54 (range_easy_mask_min_max): ...here.
55 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
56 (range_easy_mask_min_max): New.
57
58 2018-07-15 Jeff Law <law@redhat.com>
59
60 PR target/85993
61 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
62 block.
63
64 2018-07-14 Jim Wilson <jimw@sifive.com>
65
66 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
67
68 2018-07-14 Paul Koning <ni1d@arrl.net>
69
70 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
71
72 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
73
74 * lto-streamer-out.c (copy_function_or_variable): Dump info about
75 copying section.
76
77 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
78 Steve Munroe <munroesj52@gmail.com>
79
80 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
81 (_mm_andnot_si128): Likewise.
82 (_mm_or_si128): Likewise.
83 (_mm_xor_si128): Likewise.
84
85 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
86
87 PR middle-end/78809
88 * builtins.c (expand_builtin_memcmp): Inline the calls first
89 when result_eq is false.
90 (expand_builtin_strcmp): Inline the calls first.
91 (expand_builtin_strncmp): Likewise.
92 (inline_string_cmp): New routine. Expand a string compare
93 call by using a sequence of char comparison.
94 (inline_expand_builtin_string_cmp): New routine. Inline expansion
95 a call to str(n)cmp/memcmp.
96 * doc/invoke.texi (--param builtin-string-cmp-inline-length): New option.
97 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
98
99 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
100
101 * config/arm/driver-arm.c: Include arm-native.h.
102 (host_detect_local_cpu): Use auto-generated data tables.
103 (vendors, arm_cpu_table): Delete. Move part information to ...
104 * config/arm/arm-cpus.in: ... here.
105 * config/arm/parsecpu.awk (gen_native): New function.
106 (vendor, part): New CPU fields.
107 (END): Add support for building the native CPU detection tables.
108 * config/arm/t-arm (arm-native.h): Add build rule.
109 (driver-arm.o): Add dependency on arm-native.h.
110
111 2018-07-13 Richard Biener <rguenther@suse.de>
112
113 PR middle-end/85974
114 * match.pd (addr1 - addr2): Allow either of the operand to
115 have a conversion.
116
117 2018-07-13 Tom de Vries <tdevries@suse.de>
118
119 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
120 in remap_ssa_name.
121
122 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
123
124 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
125 arrays instead of numbered variables.
126
127 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
128
129 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
130 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
131
132 2018-07-13 Richard Biener <rguenther@suse.de>
133
134 PR debug/86452
135 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
136 instead of get_context_die.
137
138 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
139 Richard Biener <rguenther@suse.de>
140
141 PR middle-end/86489
142 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
143 that the loop latch destination where phi is defined.
144
145 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
146
147 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
148 (riscv_expand_epilogue): Add assertion to check interrupt mode.
149 (riscv_set_current_function): Extract getting interrupt type to new
150 function.
151 (riscv_get_interrupt_type): New function.
152 (riscv_merge_decl_attributes): New function, checking interrupt type is
153 same.
154 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
155
156 2018-07-12 Paul Koning <ni1d@arrl.net>
157
158 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
159 directive.
160
161 2018-07-12 Paul Koning <ni1d@arrl.net>
162
163 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
164 zero reference, add doloop_end instead.
165 * doc/md.texi (decrement_and_branch_until_zero): Remove.
166 (Looping patterns): Remove decrement_and_branch_until_zero. Add
167 detail for doloop_end.
168
169 2018-07-12 Martin Sebor <msebor@redhat.com>
170
171 PR c/86453
172 * attribs.c (decl_attributes): Reject conflicting attributes before
173 calling attribute handlers.
174
175 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
176
177 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
178 parameter.
179 (gcc::dump_manager::get_dump_file_name): likewise.
180 (dump_begin): Likewise.
181 * dumpfile.h (dump_begin): Update prototype.
182 (gcc::dump_manager::get_dump_file_name,
183 gcc::dump_manager::get_dump_file_name): Update prototype.
184
185 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
186
187 * internal-fn.h (vectorizable_internal_fn_p): New function.
188 * tree-vect-slp.c (compatible_calls_p): Likewise.
189 (vect_build_slp_tree_1): Remove nops argument. Handle calls
190 to internal functions.
191 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
192
193 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
194
195 * fold-const.h (inverse_conditions_p): Declare.
196 * fold-const.c (inverse_conditions_p): New function.
197 * match.pd: Use inverse_conditions_p. Add folds of view_converts
198 that test the inverse condition of a conditional internal function.
199 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
200 * internal-fn.c (internal_fn_mask_index): Handle conditional
201 internal functions.
202 (vectorized_internal_fn_supported_p): New function.
203 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
204 (any_pred_load_store): Replace with...
205 (need_to_predicate): ...this new variable.
206 (redundant_ssa_names): New variable.
207 (ifcvt_can_use_mask_load_store): Move initial checks to...
208 (ifcvt_can_predicate): ...this new function. Handle tree codes
209 for which a conditional internal function exists.
210 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
211 instead of ifcvt_can_use_mask_load_store. Update after variable
212 name change.
213 (predicate_load_or_store): New function, split out from
214 predicate_mem_writes.
215 (check_redundant_cond_expr): New function.
216 (value_available_p): Likewise.
217 (predicate_rhs_code): Likewise.
218 (predicate_mem_writes): Rename to...
219 (predicate_statements): ...this. Use predicate_load_or_store
220 and predicate_rhs_code.
221 (combine_blocks, tree_if_conversion): Update after above name changes.
222 (ifcvt_local_dce): Handle redundant_ssa_names.
223 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
224 general conditional functions.
225 * tree-vect-stmts.c (vectorizable_call): Likewise.
226
227 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
228 Alan Hayward <alan.hayward@arm.com>
229 David Sherwood <david.sherwood@arm.com>
230
231 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
232 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
233 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
234 plus and minus and convert them into IFN_COND_FMA-based sequences.
235 (convert_mult_to_fma): Handle conditional plus and minus.
236
237 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
238
239 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
240 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
241 (cond_fnms_optab): New optabs.
242 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
243 internal functions.
244 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
245 * internal-fn.h (get_conditional_internal_fn): Declare.
246 (get_unconditional_internal_fn): Likewise.
247 * internal-fn.c (cond_ternary_direct): New macro.
248 (expand_cond_ternary_optab_fn): Likewise.
249 (direct_cond_ternary_optab_supported_p): Likewise.
250 (FOR_EACH_COND_FN_PAIR): Likewise.
251 (get_conditional_internal_fn): New function.
252 (get_unconditional_internal_fn): Likewise.
253 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
254 (gimple_match_op::gimple_match_op): Add a new overload for 5
255 operands.
256 (gimple_match_op::set_op): Likewise.
257 (gimple_resimplify5): Declare.
258 * genmatch.c (decision_tree::gen): Generate simplifications for
259 5 operands.
260 * gimple-match-head.c (gimple_simplify): Define an overload for
261 5 operands. Handle calls with 5 arguments in the top-level overload.
262 (convert_conditional_op): Handle conversions from unconditional
263 internal functions to conditional ones.
264 (gimple_resimplify5): New function.
265 (build_call_internal): Pass a fifth operand.
266 (maybe_push_res_to_seq): Likewise.
267 (try_conditional_simplification): Try converting conditional
268 internal functions to unconditional internal functions.
269 Handle 3-operand unconditional forms.
270 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
271 Define ternary equivalents of the current rules for binary conditional
272 internal functions.
273 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
274 ternary operations.
275 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
276 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
277 (optab): Handle them.
278 (SVE_COND_FP_TERNARY): New int iterator.
279 (sve_fmla_op, sve_fmad_op): New int attributes.
280 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
281 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
282 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
283
284 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
285
286 * target.def (preferred_else_value): New target hook.
287 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
288 * doc/tm.texi: Regenerate.
289 * targhooks.h (default_preferred_else_value): Declare.
290 * targhooks.c (default_preferred_else_value): New function.
291 * internal-fn.h (conditional_internal_fn_code): Declare.
292 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
293 (get_conditional_internal_fn): Use it.
294 (conditional_internal_fn_code): New function.
295 * gimple-match.h (gimple_match_cond): New struct.
296 (gimple_match_op): Add a cond member function.
297 (gimple_match_op::gimple_match_op): Update all forms to take a
298 gimple_match_cond.
299 * genmatch.c (expr::gen_transform): Use the same condition as res_op
300 for the suboperation, but don't specify a particular else_value.
301 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
302 (visit_nary_op, visit_reference_op_load): Pass
303 gimple_match_cond::UNCOND to the gimple_match_op constructor.
304 * gimple-match-head.c: Include tree-eh.h
305 (convert_conditional_op): New function.
306 (maybe_resimplify_conditional_op): Likewise.
307 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
308 (gimple_resimplify2): Likewise.
309 (gimple_resimplify3): Likewise.
310 (gimple_resimplify4): Likewise.
311 (maybe_push_res_to_seq): Return null for conditional operations.
312 (try_conditional_simplification): New function.
313 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
314 constructor.
315 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
316 IFN_COND_* call.
317 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
318 function.
319 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
320
321 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
322
323 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
324 DECL_FCONTEXT
325 (hash_tree): Do not hash DECL_FCONTEXT
326 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
327 Do not stream DECL_FCONTEXT.
328 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
329 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
330
331 2018-07-12 Richard Biener <rguenther@suse.de>
332
333 PR debug/86462
334 * dwarf2out.c (gen_block_die): Only output blocks when they have
335 at least one !DECL_IGNORED_P variable.
336
337 2018-07-12 Richard Biener <rguenther@suse.de>
338
339 PR target/84829
340 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
341 Remove -mieee-fp handling.
342
343 2018-07-12 Richard Biener <rguenther@suse.de>
344
345 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
346 left-over from last patch.
347
348 2018-07-12 Jakub Jelinek <jakub@redhat.com>
349
350 PR tree-optimization/86492
351 * gimple-ssa-store-merging.c
352 (imm_store_chain_info::coalesce_immediate_stores): Call
353 check_no_overlap even for the merge_overlapping case. Formatting fix.
354
355 2018-07-12 Richard Biener <rguenther@suse.de>
356
357 PR middle-end/86479
358 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
359 move possibly trapping operations into the conditional.
360
361 2018-07-12 Richard Biener <rguenther@suse.de>
362
363 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
364 (vn_lookup_simplify_result): Remove recursion limit applied
365 here.
366 (vn_nary_build_or_lookup_1): Adjust.
367 (try_to_simplify): Likewise.
368 * gimple-match-head.c (gimple_resimplify1): Instead apply one
369 here.
370 (gimple_resimplify2): Likewise.
371 (gimple_resimplify3): Likewise.
372 (gimple_resimplify4): Likewise.
373
374 2018-07-11 Jakub Jelinek <jakub@redhat.com>
375
376 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
377 Use __mmask64 type instead of __mmask8 for __M argument.
378 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
379 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
380 __U argument.
381 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
382 __mmask16 for __M argument.
383 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
384 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
385 to __mmask16 instead of __mmask8.
386 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
387 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
388 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
389 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
390 instead of __mmask16 for __U argument.
391 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
392 __mmask16 instead of __mmask8 for __U argument.
393 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
394 __U argument.
395 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
396 __mmask16.
397 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
398 argument.
399 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
400 __U argument.
401 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
402 __mmask16.
403 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
404 of __mmask16.
405 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
406 __U argument.
407 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
408 __U argument.
409 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
410 __U argument.
411 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
412 __U argument.
413 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
414 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
415 return type as well as __M argument type and all casts from __mmask8
416 to __mmask32.
417 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
418 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
419 return type as well as __M argument type and all casts from __mmask8
420 to __mmask16.
421 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
422 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
423 return type as well as __M argument type and all casts from __mmask8
424 to __mmask32.
425 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
426 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
427 return type as well as __M argument type and all casts from __mmask8
428 to __mmask16.
429 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
430 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
431 __mmask16.
432
433 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
434
435 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
436 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
437 for __U argument.
438
439 2018-07-11 Paul Koning <ni1d@arrl.net>
440
441 * doc/md.texi (define_subst): Document how multiple occurrences of
442 the same argument in the replacement pattern are handled.
443
444 2018-07-11 Paul Koning <ni1d@arrl.net>
445
446 * doc/extend.texi (Common Variable Attributes): Move "mode" into
447 alphabetical order.
448 (Common Type Attributes): Add "mode" attribute.
449
450 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
451
452 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
453 stream DECL_ORIGINAL_TYPE.
454 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
455 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
456 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
457 Do not walk original type.
458 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
459 external decls.
460 (write_ts_decl_non_common_tree_pointers): Do not stream
461 DECL_ORIGINAL_TYPE
462 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
463 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
464
465 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
466
467 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
468 thread twice from the same starting edge.
469
470 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
471
472 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
473 * gimple.c (gimple_call_nonnull_result_p): ...here...
474 (gimple_call_nonnull_arg): ...and here.
475 * gimple.h (gimple_call_nonnull_result_p): New.
476 (gimple_call_nonnull_arg): New.
477
478 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
479
480 * config/arm/arm-cpus.in: Move information from fpu field of each
481 cpu definition to the isa field.
482 * config/arm/parsecpu.awk (fpu): Delete match rule.
483 (gen_comm_data): Don't add bits from the CPU's FPU entry.
484
485 2018-07-11 Richard Biener <rguenther@suse.de>
486
487 PR debug/86457
488 * dwarf2out.c (init_sections_and_labels): Use
489 output_asm_line_debug_info consistently.
490 (dwarf2out_early_finish): Likewise.
491 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
492 type units.
493
494 2018-07-11 Richard Biener <rguenther@suse.de>
495
496 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
497 Rework father_bb setting in a way to avoid propagating constants
498 multiple times on a loop body.
499
500 2018-07-10 Mark Wielaard <mark@klomp.org>
501
502 PR debug/86459
503 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
504
505 2018-07-10 Richard Biener <rguenther@suse.de>
506
507 * hash-map.h (hash_map::iterator::operator*): Return
508 references to key and value.
509
510 2018-07-10 Jakub Jelinek <jakub@redhat.com>
511
512 PR c++/86443
513 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
514 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
515 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
516 (gimplify_omp_for): For composite loops, move outer
517 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
518 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
519 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
520 TREE_LIST for both the original class iterator and the "last" helper
521 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
522 loop, remember has_decl_expr from outer composite loops for the
523 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
524
525 2018-07-09 Martin Sebor <msebor@redhat.com>
526
527 PR middle-end/77357
528 PR middle-end/86428
529 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
530 accessing implicitly initialized array elements.
531 * expr.c (string_constant): Handle string initializers of
532 character arrays within aggregates.
533 * gimple-fold.c (fold_array_ctor_reference): Add argument.
534 Store element offset. As a special case, handle zero size.
535 (fold_nonarray_ctor_reference): Same.
536 (fold_ctor_reference): Add argument. Store subobject offset.
537 * gimple-fold.h (fold_ctor_reference): Add argument.
538
539 2018-07-09 Paul Koning <ni1d@arrl.net>
540
541 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
542 (pdp11_insn_cost): New function.
543 (pdp11_md_asm_adjust): New function.
544 (TARGET_INVALID_WITHIN_DOLOOP): Define.
545 (pdp11_rtx_costs): Update to match machine better.
546 (output_addr_const_pdp11): Correct format mismatch warnings.
547 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
548 * config/pdp11/pdp11.md: General change to add base_cost and/or
549 length attributes for use by new pdp11_insn_cost function.
550 (MIN_BRANCH): Correct definition.
551 (MIN_SOB): Ditto.
552 (doloop_end): Use standard pattern name for looping pattern.
553 (doloop_end_nocc): New.
554 (movsf): Add another constraint alternative.
555 (zero_extendqihi2): Add constraint alternatives for not in place
556 extend.
557 (zero_extendhisi2): Remove.
558 (shift patterns): Add CC handling variants.
559 (bswaphi2): New.
560 (bswapsi2): New.
561 (rothi3): New.
562 (define_peephole2): New peephole to recognize mov that sets CC for
563 subsequent test.
564
565 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
566
567 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
568 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
569 wi::add.
570
571 2018-07-09 Jakub Jelinek <jakub@redhat.com>
572
573 PR c/86420
574 * real.c (real_nextafter): Return true if result is denormal.
575
576 2018-07-09 Martin Liska <mliska@suse.cz>
577
578 * common.opt: Add back wrongly removed attribute.
579
580 2018-07-09 Richard Biener <rguenther@suse.de>
581
582 PR debug/86413
583 * dwarf2out.c (gen_block_die): For an early generated DIE
584 always output high/low PC attributes.
585
586 2018-07-09 Tom de Vries <tdevries@suse.de>
587
588 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
589 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
590 onto VAR_DECL with abstract origin.
591
592 2018-07-07 Jim Wilson <jimw@sifive.com>
593
594 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
595
596 2018-07-07 Tom de Vries <tdevries@suse.de>
597
598 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
599
600 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
601
602 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
603 overflow_type.
604 (combine_bound): Use wide-int overflow calculation instead of
605 rolling our own.
606 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
607 overflow_type.
608 * fold-const.c (int_const_binop_2): Same.
609 (extract_muldiv_1): Same.
610 (fold_div_compare): Same.
611 (fold_abs_const): Same.
612 * match.pd: Same.
613 * poly-int.h (add): Same.
614 (sub): Same.
615 (neg): Same.
616 (mul): Same.
617 * predict.c (predict_iv_comparison): Same.
618 * profile-count.c (slow_safe_scale_64bit): Same.
619 * simplify-rtx.c (simplify_const_binary_operation): Same.
620 * tree-chrec.c (tree_fold_binomial): Same.
621 * tree-data-ref.c (split_constant_offset_1): Same.
622 * tree-if-conv.c (idx_within_array_bound): Same.
623 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
624 * tree-ssa-phiopt.c (minmax_replacement): Same.
625 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
626 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
627 * vr-values.c (vr_values::adjust_range_with_scev): Same.
628 * wide-int.cc (wi::add_large): Same.
629 (wi::mul_internal): Same.
630 (wi::sub_large): Same.
631 (wi::divmod_internal): Same.
632 * wide-int.h: Change overflow type to overflow_type for neg, add,
633 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
634 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
635 mul_internal, divmod_internal.
636 (overflow_type): New enum.
637 (accumulate_overflow): New.
638
639 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
640
641 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
642 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
643
644 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
645
646 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
647 argument is checked for zero before entering loop, avoid checking again.
648
649 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
650
651 * gimplify.h (generic_expr_could_trap_p): Set as global function.
652 * gimplify.h (generic_expr_could_trap_p): Likwise.
653 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
654
655 2018-07-06 Jakub Jelinek <jakub@redhat.com>
656
657 PR tree-optimization/86401
658 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
659 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
660 (fold_bit_and_mask): ... here. New helper function for match.pd.
661 * fold-const.h (fold_bit_and_mask): Declare.
662 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
663
664 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
665
666 PR target/86324
667 * target.def (translate_mode_attribute): New hook.
668 * targhooks.h (default_translate_mode_attribute): Declare.
669 * targhooks.c (default_translate_mode_attribute): New function.
670 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
671 * doc/tm.texi: Regenerate.
672 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
673 (rs6000_translate_mode_attribute): New function.
674
675 2018-07-06 Paul Koning <ni1d@arrl.net>
676
677 * doc/md.texi (define_split): Document DONE and FAIL.
678 (define_peephole2): Ditto.
679
680 2018-07-05 Jeff Law <law@redhat.com>
681
682 PR tree-optimization/86010
683 * tree-ssa-dse.c (compute_trims): More aggressively trim at
684 both the head and tail of mem* and str* calls.
685
686 2018-07-05 Jim Wilson <jimw@sifive.com>
687
688 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
689
690 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
691
692 * config/aarch64/aarch64-simd.md: correct flags text for
693 MIN_EXPR replacement.
694
695 2018-07-05 James Clarke <jrtc27@jrtc27.com>
696
697 * configure: Regenerated.
698
699 2018-07-05 Carl Love <cel@us.ibm.com>
700
701 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
702 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
703 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
704 VSX_BUILTIN_DOUBLEL_V4SF.
705
706 2018-07-05 Martin Sebor <msebor@redhat.com>
707
708 PR c++/86400
709 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
710 than its domain to compute its the upper bound of a char array.
711
712 2018-07-05 Nathan Sidwell <nathan@acm.org>
713
714 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
715 * doc/cpp.texi: Update comment.
716 * doc/tm.texi: Rebuilt.
717 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
718 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
719 * doc/extend.texi (Backwards Compatibility): Clarify it is system
720 headers affected by extern "C".
721 * system.h: Poison NO_IMPLICIT_EXTERN_C.
722 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
723 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
724 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
725 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
726 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
727 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
728 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
729 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
730 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
731 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
732 config/sparc/sp64-elf.h, config/spu/spu.h,
733 config/stormy16/stormy16.h, config/v850/v850.h,
734 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
735 define NO_IMPLICIT_EXTERN_C.
736 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
737
738 2018-07-05 Tamar Christina <tamar.christina@arm.com>
739
740 PR target/84711
741 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
742 instead of GET_MODE_SIZE when comparing Units.
743
744 2018-07-05 Tamar Christina <tamar.christina@arm.com>
745
746 PR target/84711
747 * rtlanal.c (set_noop_p): Constrain on mode change,
748 include hard-reg-set.h
749
750 2018-07-05 Tamar Christina <tamar.christina@arm.com>
751
752 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
753
754 2018-07-05 Jakub Jelinek <jakub@redhat.com>
755
756 Revert
757 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
758
759 PR sanitizer/84250
760 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
761 libasan.
762 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
763
764 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
765
766 PR sanitizer/84250
767 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
768 libasan.
769 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
770
771 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
772
773 PR middle-end/86380
774 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
775
776 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
777
778 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
779 neg_*_op* variables.
780
781 2018-07-04 Martin Liska <mliska@suse.cz>
782
783 * tree-switch-conversion.c: Define
784 max_ratio_for_speed and max_ratio_for_size constants.
785
786 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
787 Martin Liska <mliska@suse.cz>
788
789 PR middle-end/66240
790 PR target/45996
791 PR c/84100
792 * common.opt: Rename align options with 'str_' prefix.
793 * common/config/i386/i386-common.c (set_malign_value): New
794 function.
795 (ix86_handle_option): Use it to set -falign-* options/
796 * config/aarch64/aarch64-protos.h (struct tune_params): Change
797 type from int to string.
798 * config/aarch64/aarch64.c: Update default values from int
799 to string.
800 * config/alpha/alpha.c (alpha_override_options_after_change):
801 Likewise.
802 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
803 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
804 max skip conditionally.
805 * config/i386/freebsd.h (SUBALIGN_LOG): New.
806 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
807 max skip conditionally.
808 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
809 max skip conditionally.
810 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
811 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
812 max skip conditionally.
813 * config/i386/i386.c (struct ptt): Change type from int to
814 string.
815 (ix86_default_align): Set default values.
816 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
817 max skip conditionally.
818 * config/i386/iamcu.h (SUBALIGN_LOG): New.
819 (ASM_OUTPUT_MAX_SKIP_ALIGN):
820 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
821 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
822 max skip conditionally.
823 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
824 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
825 * config/i386/x86-64.h (SUBALIGN_LOG): New.
826 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
827 max skip conditionally.
828 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
829 * config/ia64/ia64.c (ia64_option_override): Set default values
830 for alignment options.
831 * config/m68k/m68k.c: Handle new str_align_* options.
832 * config/mips/mips.c (mips_set_compression_mode): Change
833 type of constants.
834 (mips_option_override): Set default values for options.
835 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
836 Likewise.
837 * config/rs6000/rs6000.c (rs6000_option_override_internal):
838 Likewise.
839 * config/rx/rx.c (rx_option_override): Likewise.
840 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
841 (LABEL_ALIGN): Use align_labels_log.
842 (LOOP_ALIGN): Use align_loops_align.
843 * config/s390/s390.c (s390_asm_output_function_label): Use new
844 macros.
845 * config/sh/sh.c (sh_override_options_after_change):
846 Change type of constants.
847 * config/spu/spu.c (spu_sched_init): Likewise.
848 * config/sparc/sparc.c (sparc_option_override): Set default
849 values for options.
850 * config/visium/visium.c (visium_option_override): Likewise.
851 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
852 emit p2align format with last argument if it's not needed.
853 * doc/invoke.texi: Document extended format of -falign-*.
854 * final.c: Use align_labels alignment.
855 * flags.h (struct target_flag_state): Change type to use
856 align_flags.
857 (struct align_flags_tuple): New.
858 (struct align_flags): Likewise.
859 (align_loops_log): Redefine macro to use new types.
860 (align_loops_max_skip): Redefine macro to use new types.
861 (align_jumps_log): Redefine macro to use new types.
862 (align_jumps_max_skip): Redefine macro to use new types.
863 (align_labels_log): Redefine macro to use new types.
864 (align_labels_max_skip): Redefine macro to use new types.
865 (align_functions_log): Redefine macro to use new types.
866 (align_loops): Redefine macro to use new types.
867 (align_jumps): Redefine macro to use new types.
868 (align_labels): Redefine macro to use new types.
869 (align_functions): Redefine macro to use new types.
870 (align_functions_max_skip): Redefine macro to use new types.
871 (align_loops_value): New macro.
872 (align_jumps_value): New macro.
873 (align_labels_value): New macro.
874 (align_functions_value): New macro.
875 * function.c (invoke_set_current_function_hook): Propagate
876 alignment values from flags to global variables default in
877 topleev.h.
878 * ipa-icf.c (sem_function::equals_wpa): Use
879 cl_optimization_option_eq instead of memcmp.
880 * lto-streamer.h (cl_optimization_stream_out): Support streaming
881 of string types.
882 (cl_optimization_stream_in): Likewise.
883 * optc-save-gen.awk: Support strings in cl_optimization.
884 * opth-gen.awk: Likewise.
885 * opts.c (finish_options): Remove error checking of invalid
886 value ranges.
887 (MAX_CODE_ALIGN): Remove.
888 (MAX_CODE_ALIGN_VALUE): Likewise.
889 (parse_and_check_align_values): New function.
890 (check_alignment_argument): Likewise.
891 (common_handle_option): Use check_alignment_argument.
892 * opts.h (parse_and_check_align_values): Declare.
893 * toplev.c (init_alignments): Remove.
894 (read_log_maxskip): New.
895 (parse_N_M): Likewise.
896 (parse_alignment_opts): Likewise.
897 (backend_init_target): Remove usage of init_alignments.
898 * toplev.h (parse_alignment_opts): Declare.
899 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
900 argument.
901 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
902 * tree.c (cl_option_hasher::equal): New.
903 * varasm.c: Use new global macros.
904
905 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
906
907 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
908 Use a simpler align directive also if MAXSKIP = ALIGN-1.
909 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
910 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
911 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
912 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
913 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
914 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
915 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
916 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
917 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
918 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
919 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
920
921 2018-07-04 Martin Liska <mliska@suse.cz>
922 Jonathan Wakely <jwakely@redhat.com>
923
924 * coverage.c: Use correct type.
925 * doc/invoke.texi: Language correction.
926
927 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
928
929 PR target/85620
930 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
931 ENDBRANCH for non-tail call which may return via indirect branch.
932 * doc/extend.texi: Document indirect_return attribute.
933
934 2018-07-03 Martin Sebor <msebor@redhat.com>
935
936 PR tree-optimization/86274
937 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
938 precondition.
939 (format_floating): Correct handling of infinities and NaNs.
940
941 2018-07-03 Martin Sebor <msebor@redhat.com>
942
943 * print-tree.c (print_real_cst): New function.
944 (print_node_brief): Call it.
945 (print_node): Ditto.
946
947 2018-07-03 Jeff Law <law@redhat.com>
948
949 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
950 into a single pattern.
951
952 * config/h8300/h8300.md (ors code_iterator): New.
953 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
954 a single pattern and single splitter.
955 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
956 (iorqi3_1, xorqi3_1): Likewise.
957 (iorqi3, xorqi3 expanders): Similarly.
958
959 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
960 (movmd_internal) into a single pattern using the P mode iterator.
961 (movmd splitters): Similarly.
962 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
963 (movsd splitters): Similarly.
964
965 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
966 ADDB, ADDW and ADDL into a single ADD attribute which selects the
967 right table based on the size of the operand.
968 * config/h8300/h8300.md (length_table): Corresponding changes. All
969 references to "addb", "addw" and "addl" changed to "add".
970 (btst patterns): Merge two variants into a single pattern.
971 (tstqi, tsthi): Likewise.
972 (addhi3_incdec, addsi3_incdec): Likewise.
973 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
974 (mulhi3, mulsi3): Likewise.
975 (udivhi3, udivsi3): Likewise.
976 (divhi3, divsi3): Likewise.
977 (andorqi3, andorhi3, andorsi3): Likewise.
978
979 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
980
981 PR target/85694
982 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
983 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
984
985 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
986
987 PR tree-optimization/85694
988 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
989 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
990 UNSPEC_URHADD.
991 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
992 (<u>avg<mode>3_ceil): New patterns.
993
994 2018-07-03 David Malcolm <dmalcolm@redhat.com>
995
996 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
997 scan-tree-dump directive.
998 * gcc.dg/vect/slp-perm-2.c: Likewise.
999 * gcc.dg/vect/slp-perm-3.c: Likewise.
1000 * gcc.dg/vect/slp-perm-5.c: Likewise.
1001 * gcc.dg/vect/slp-perm-6.c: Likewise.
1002 * gcc.dg/vect/slp-perm-7.c: Likewise.
1003 * gcc.dg/vect/slp-perm-8.c: Likewise.
1004
1005 2018-07-03 Marek Polacek <polacek@redhat.com>
1006
1007 PR middle-end/86202
1008 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1009
1010 2018-07-03 Richard Biener <rguenther@suse.de>
1011
1012 PR ipa/86389
1013 * tree-ssa-structalias.c (find_func_clobbers): Properly
1014 handle indirect calls.
1015
1016 2018-07-03 Jeff Law <law@redhat.com>
1017
1018 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1019 (shifts): New code iterator.
1020 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1021 expander. Fix HImode handling on H8/SX.
1022 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1023 (subqi3, subhi3, subsi3 expanders): Likewise.
1024 (andqi3, andhi3, andsi3 expanders): Likewise.
1025 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1026 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1027 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1028 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1029 (zero_extendqihi2, zero_extendqisi2): Likewise.
1030 (extendqihi2, extendqisi2): Likewise.
1031 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1032 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1033 (rotlqi3_1, rotlhi3_1): Likewise.
1034 (logicalhi3_sn, logicalsi3_sn): Likewise.
1035 (logicalhi3, logicalsi3): Likewise.
1036
1037 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1038
1039 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1040 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1041 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1042 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1043 type to append_pattern_def_seq instead of creating a stmt_vec_info
1044 directly.
1045 (build_mask_conversion): Likewise. Remove vinfo argument.
1046 (vect_add_conversion_to_patterm): Likewise, renaming to...
1047 (vect_add_conversion_to_pattern): ...this.
1048 (vect_recog_mask_conversion_pattern): Update call to
1049 build_mask_conversion. Pass the vector type to
1050 append_pattern_def_seq here too.
1051 (vect_recog_gather_scatter_pattern): Update call to
1052 vect_add_conversion_to_pattern.
1053
1054 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1055
1056 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1057 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1058 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1059 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1060 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1061 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1062 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1063 append_pattern_def_seq instead of new_pattern_def_seq.
1064 (vect_recog_divmod_pattern): Do both of the above.
1065 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1066 is null.
1067
1068 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1069
1070 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1071 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1072 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1073 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1074 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1075 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1076 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1077 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1078 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1079 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1080 parameter with a single stmt_vec_info.
1081 (vect_recog_func_ptr): Likewise.
1082 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1083 (vect_try_gather_scatter_pattern): ...this.
1084 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1085 the stmt_vec_info of the statement to be matched. Don't clear
1086 STMT_VINFO_RELATED_STMT.
1087 (vect_pattern_recog): Update call accordingly.
1088
1089 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1090
1091 PR tree-optimization/85694
1092 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1093 (uavgM3_ceil): Document new optabs.
1094 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1095 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1096 functions.
1097 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1098 (savg_ceil_optab): New optabs.
1099 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1100 (vect_vect_recog_func_ptrs): Add it.
1101 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1102 constant directly from the associated lhs.
1103
1104 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1105
1106 * tree-vect-patterns.c (vect_split_statement): New function.
1107 (vect_convert_input): Use it to try to split an existing cast.
1108
1109 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1110
1111 * poly-int.h (print_hex): New function.
1112 * dumpfile.h (dump_dec, dump_hex): Declare.
1113 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1114 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1115 min_input_precision, operation_precision and operation_sign.
1116 * tree-vect-patterns.c (vect_get_range_info): New function.
1117 (vect_same_loop_or_bb_p, vect_single_imm_use)
1118 (vect_operation_fits_smaller_type): Delete.
1119 (vect_look_through_possible_promotion): Add an optional
1120 single_use_p parameter.
1121 (vect_recog_over_widening_pattern): Rewrite to use new
1122 stmt_vec_info infomration. Handle one operation at a time.
1123 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1124 (vect_truncatable_operation_p, vect_set_operation_type)
1125 (vect_set_min_input_precision): New functions.
1126 (vect_determine_min_output_precision_1): Likewise.
1127 (vect_determine_min_output_precision): Likewise.
1128 (vect_determine_precisions_from_range): Likewise.
1129 (vect_determine_precisions_from_users): Likewise.
1130 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1131 (vect_vect_recog_func_ptrs): Put over_widening first.
1132 Add cast_forwprop.
1133 (vect_pattern_recog): Call vect_determine_precisions.
1134
1135 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1136
1137 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1138 statements that have been replaced by further pattern statements.
1139 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1140
1141 2018-07-03 Richard Biener <rguenther@suse.de>
1142
1143 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1144 always set *dt. Dump vectype in vectype overload.
1145 * dumpfile.h (dump_gimple_expr): New function.
1146 (dump_gimple_expr_loc): Likewise.
1147 * dumpfile.c (dump_gimple_expr): New function.
1148 (dump_gimple_expr_loc): Likewise.
1149
1150 2018-07-02 Jeff Law <law@redhat.com>
1151
1152 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1153 the H8/300, H8/300H and H8/S variants into a single pattern.
1154 (movhi_h8300, movqi_h8300hs): Similarly.
1155 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1156 (QHI mode iterator): New.
1157
1158 * config/h8300/h8300.md: Remove trailing whitespace.
1159
1160 2018-07-02 Jim Wilson <jimw@sifive.com>
1161
1162 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1163 instead of emit_insn for interrupt returns.
1164 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1165 (riscv_sret, riscv_uret): Likewise.
1166
1167 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1168
1169 * pretty-print.c (selftest::test_pp_format): Move save and restore
1170 of quotes to class auto_fix_quotes, and add an instance.
1171 * selftest.c: Include "intl.h".
1172 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1173 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1174 * selftest.h (selftest::auto_fix_quotes): New class.
1175
1176 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1177
1178 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1179 (aarch64_sve_prepare_conditional_op): Remove.
1180 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1181 Allow aarch64_simd_reg_or_zero as select operand; remove
1182 the aarch64_sve_prepare_conditional_op call.
1183 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1184 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1185 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1186 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1187 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1188 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1189 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1190 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1191 and a splitters to match all of the *_any patterns.
1192 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1193
1194 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1195 (SVE_COND_FP_BINARY_REV): Remove.
1196 (sve_int_op_rev, sve_fp_op_rev): New.
1197 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1198 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1199 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1200 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1201 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1202 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1203 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1204 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1205 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1206
1207 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1208 Remove match_dup 1 from the inner unspec.
1209 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1210
1211 * config/aarch64/aarch64.md (movprfx): New attr.
1212 (length): Default movprfx to 8.
1213 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1214 (*madd<SVE_I>, *msub<SVE_I): Likewise.
1215 (*<su>mul<SVE_I>3_highpart): Likewise.
1216 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1217 (*v<ASHIFT><SVE_I>3): Likewise.
1218 (*<su><MAXMIN><SVE_I>3): Likewise.
1219 (*<su><MAXMIN><SVE_F>3): Likewise.
1220 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1221 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1222 (*div<SVE_F>4): Likewise.
1223
1224 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
1225
1226 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1227 in dump string.
1228
1229 2018-07-02 Richard Biener <rguenther@suse.de>
1230
1231 PR tree-optimization/86363
1232 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1233 memset argument refers to a non-variable address.
1234
1235 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1236
1237 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1238 {PLUS,MINUS}_EXPR code to...
1239 (adjust_symbolic_bound): ...here,
1240 (combine_bound): ...here,
1241 (set_value_range_with_overflow): ...and here.
1242
1243 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1244
1245 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1246 code...
1247 (extract_range_from_abs_expr): ...here.
1248
1249 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
1250
1251 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1252 -fno-omit-frame-pointer when not optimizing.
1253
1254 2018-07-02 Martin Liska <mliska@suse.cz>
1255
1256 PR ipa/86279
1257 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1258 (propagate_nothrow): Likewise.
1259
1260 2018-07-02 Martin Liska <mliska@suse.cz>
1261
1262 PR ipa/86323
1263 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1264
1265 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1266
1267 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1268 function in r262149, changing "loc" param from source_location to
1269 const dump_location_t &.
1270 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1271 declaration, as above.
1272
1273 2018-07-01 Paul Koning <ni1d@arrl.net>
1274
1275 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1276 -munit-asm, -mgnu-asm, -mdec-asm.
1277 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1278 (pdp11_output_labelref): New.
1279 (pdp11_output_def): New.
1280 (pdp11_output_addr_vec_elt): New.
1281 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
1282 %# and %@ format codes.
1283 (pdp11_option_override): New.
1284 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1285 (pdp11_output_ident): New.
1286 (pdp11_asm_named_section): New.
1287 (pdp11_asm_init_sections): New.
1288 (pdp11_file_start): New.
1289 (pdp11_file_end): New.
1290 (output_ascii): Use .ascii/.asciz for -mdec-asm.
1291 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
1292 %o, like %c but octal.
1293 (pdp11_option_override): New.
1294 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1295 -mdec-asm.
1296 (DATA_SECTION_ASM_OP): Ditto.
1297 (READONLY_DATA_SECTION_ASM_OP): New.
1298 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1299 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1300 (ASM_OUTPUT_LABELREF): Ditto.
1301 (ASM_OUTPUT_DEF): Ditto.
1302 (ASM_OUTPUT_EXTERNAL): New.
1303 (ASM_OUTPUT_SOURCE_FILENAME): New.
1304 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1305 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1306 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
1307 %# and %@ format codes.
1308 * config/pdp11/pdp11.opt (mgnu-asm): New.
1309 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1310 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1311 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1312
1313 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
1314
1315 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1316 dereferencing path[] beyond its length.
1317 (debug_path): New.
1318 (debug_all_paths): New.
1319 (rewire_first_differing_edge): New.
1320 (adjust_paths_after_duplication): New.
1321 (duplicate_thread_path): Call adjust_paths_after_duplication.
1322 Add new argument.
1323 (thread_through_all_blocks): Add new argument to
1324 duplicate_thread_path.
1325
1326 2018-06-30 Jim Wilson <jimw@sifive.com>
1327
1328 * config/riscv/predicates.md (p2m1_shift_operand): New.
1329 (high_mask_shift_operand): New.
1330 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1331 pattern using p2m1_shift_operand.
1332 (lshsi3_zero_extend_3+2): New combiner pattern using
1333 high_mask_shift_operand.
1334
1335 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1336
1337 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1338 split out from...
1339 (vect_recog_rotate_pattern): ...here.
1340 (vect_convert_input): Try to insert casts of invariants in the
1341 preheader.
1342 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1343 preheader to be empty.
1344
1345 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1346
1347 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1348 vector type. If given, install it in the new statement's
1349 STMT_VINFO_VECTYPE.
1350 (vect_element_precision): New function.
1351 (vect_unpromoted_value): New struct.
1352 (vect_unpromoted_value::vect_unpromoted_value): New function.
1353 (vect_unpromoted_value::set_op): Likewise.
1354 (vect_look_through_possible_promotion): Likewise.
1355 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1356 (vect_widened_op_tree, vect_convert_input): Likewise.
1357 (vect_convert_inputs, vect_convert_output): Likewise.
1358 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1359 to handle the optional cast of the multiplication result and
1360 vect_widened_op_tree to detect the widened multiplication itself.
1361 Do not require the input and output of promotion casts to have
1362 the same sign, but base the signedness of the operation on the
1363 input rather than the result. If the pattern includes two
1364 promotions, check that those promotions have the same sign.
1365 Do not restrict the MULT_EXPR handling to a double-width result;
1366 handle quadruple-width results and wider. Use vect_convert_inputs
1367 to convert the inputs to the common type.
1368 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
1369 to handle the optional cast of the ABS result. Also allow a sign
1370 change or a sign extension between the ABS and MINUS.
1371 Use vect_widened_op_tree to detect the widened subtraction and use
1372 vect_convert_inputs to convert the inputs to the common type.
1373 (vect_handle_widen_op_by_const): Delete.
1374 (vect_recog_widen_op_pattern): New function.
1375 (vect_recog_widen_mult_pattern): Use it.
1376 (vect_recog_widen_shift_pattern): Likewise.
1377 (vect_recog_widen_sum_pattern): Use
1378 vect_look_through_possible_promotion to handle the promoted
1379 PLUS_EXPR operand.
1380
1381 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1382
1383 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1384 the containing gimple_seq *.
1385 * gimple-iterator.h (gsi_for_stmt): Declare it.
1386 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1387 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1388 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1389 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1390 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1391 checks.
1392 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1393 split out from...
1394 (vect_mark_pattern_stmts): ...here. Handle cases in which the
1395 statement being replaced is part of an existing pattern
1396 definition sequence, inserting the new pattern statements before
1397 the original one.
1398 (vect_pattern_recog_1): Don't return a bool. If the statement
1399 is already part of a pattern, instead apply pattern matching
1400 to the pattern definition statements. Don't clear the
1401 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1402 (vect_pattern_recog): Don't break after the first match;
1403 continue processing the pattern definition statements instead.
1404 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1405
1406 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1407
1408 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1409 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1410 (vect_recog_widen_sum_pattern): Use it.
1411
1412 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1413
1414 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1415 phi is not a pattern statement and has not been replaced by
1416 a pattern statement.
1417 * tree-vect-patterns.c (type_conversion_p): Don't check
1418 STMT_VINFO_IN_PATTERN_P.
1419 (vect_recog_vector_vector_shift_pattern): Likewise.
1420 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1421 the pattern statement rather than the original statement; check
1422 directly for a WIDEN_MULT_EXPR here.
1423 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1424 vect_is_simple_use to return the pattern statement rather
1425 than the original statement; use is_pattern_stmt_p to check
1426 for such a pattern statement.
1427 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1428 to return the pattern statement rather than the original statement;
1429 don't do the same transformation here.
1430 (vect_is_simple_use): If the defining statement has been replaced
1431 by a pattern statement, return the pattern statement instead.
1432 Remove the corresponding (local) transformation from the vectype
1433 overload.
1434
1435 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1436
1437 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1438 end and default to null.
1439 * tree-vect-loop.c (vect_create_epilog_for_reduction)
1440 (vectorizable_reduction): Update calls accordingly, dropping the
1441 gimple ** argument if the passed-back statement isn't needed.
1442 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1443 (vect_recog_rotate_pattern): Likewise.
1444 (vect_recog_mask_conversion_pattern): Likewise.
1445 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1446 (vect_mask_constant_operand_p): Likewise.
1447 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1448 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1449 (get_group_load_store_type, get_load_store_type): Likewise.
1450 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1451 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1452 (vectorizable_conversion, vectorizable_assignment): Likewise.
1453 (vectorizable_shift, vectorizable_operation): Likewise.
1454 (vectorizable_store, vect_is_simple_cond): Likewise.
1455 (vectorizable_condition, vectorizable_comparison): Likewise.
1456 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
1457 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
1458 and move it to the end. Cope with null def_stmt_outs.
1459
1460 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1461
1462 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
1463
1464 2018-06-29 Jeff Law <law@redhat.com>
1465
1466 * config/v850/v850.c (v850_legitimate_address_p): Handle large
1467 displacements for TARGET_V850E2V3 and newer.
1468 (TARGET_LRA_P): Remove. Defaults to LRA now.
1469 * config/v850/v850.md (sign23byte_load): Remove.
1470 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
1471 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
1472
1473 2018-06-29 Martin Liska <mliska@suse.cz>
1474
1475 PR lto/85759
1476 * coverage.c (coverage_init): Mangle full path name.
1477 * doc/invoke.texi: Document the change.
1478 * gcov-io.c (mangle_path): New.
1479 * gcov-io.h (mangle_path): Likewise.
1480 * gcov.c (mangle_name): Use mangle_path for path mangling.
1481
1482 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1483
1484 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
1485 if starting source register is not even.
1486
1487 2018-06-29 Martin Liska <mliska@suse.cz>
1488
1489 PR tree-optimization/86263
1490 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
1491 Make edge redirection.
1492
1493 2018-06-29 David Malcolm <dmalcolm@redhat.com>
1494
1495 * dumpfile.c (dump_loc): Add indentation based on scope depth.
1496 (dump_scope_depth): New variable.
1497 (get_dump_scope_depth): New function.
1498 (dump_begin_scope): New function.
1499 (dump_end_scope): New function.
1500 * dumpfile.h (get_dump_scope_depth): New declaration.
1501 (dump_begin_scope): New declaration.
1502 (dump_end_scope): New declaration.
1503 (class auto_dump_scope): New class.
1504 (AUTO_DUMP_SCOPE): New macro.
1505 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1506 AUTO_DUMP_SCOPE.
1507
1508 2018-06-29 Richard Biener <rguenther@suse.de>
1509
1510 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1511 compute_all_dependences succeeds.
1512 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1513 exceed --param loop-max-datarefs-for-datadeps.
1514
1515 2018-06-29 Jakub Jelinek <jakub@redhat.com>
1516
1517 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1518
1519 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
1520
1521 PR target/86348
1522 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1523 alternative 0 in preferred_for_speed attribute.
1524
1525 2018-06-28 Paul Koning <ni1d@arrl.net>
1526
1527 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1528 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1529 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1530 * config/pdp11/pdp11.md: Correct "length" attribute calculation
1531 for shift insn patterns.
1532
1533 2018-06-28 David Malcolm <dmalcolm@redhat.com>
1534
1535 * cgraph.c (cgraph_node::get_body): Replace assignments to
1536 "dump_file" with calls to set_dump_file.
1537 * dumpfile.c (alt_dump_file): Make static, and group with...
1538 (alt_flags): ...this definition.
1539 (dumps_are_enabled): New variable.
1540 (refresh_dumps_are_enabled): New function.
1541 (set_dump_file): New function.
1542 (set_alt_dump_file): New function.
1543 (gcc::dump_manager::dump_start): Replace assignments to
1544 "dump_file" and "alt_dump_file" with calls to set_dump_file and
1545 set_alt_dump_file.
1546 (gcc::dump_manager::dump_finish): Likewise.
1547 * dumpfile.h (alt_dump_file): Delete decl.
1548 (dumps_are_enabled): New variable decl.
1549 (set_dump_file): New function decl.
1550 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1551 global.
1552 * tree-nested.c (lower_nested_functions): Replace assignments to
1553 "dump_file" with calls to set_dump_file.
1554
1555 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1556
1557 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1558 goto_locus of each outgoing edge of each basic block.
1559
1560 2018-06-28 Richard Biener <rguenther@suse.de>
1561
1562 * dwarf2out.c (decl_scope_table): Remove.
1563 (push_decl_scope): Likewise.
1564 (pop_decl_scope): Likewise.
1565 (gen_type_die_for_member): Do not call push/pop_decl_scope.
1566 (gen_struct_or_union_type_die): Likewise.
1567 (gen_tagged_type_die): Likewise.
1568 (dwarf2out_init): Do not initialize decl_scope_table.
1569 (dwarf2out_c_finalize): Do not free it.
1570
1571 2018-06-28 Richard Biener <rguenther@suse.de>
1572
1573 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1574 deciding whether to not re-use a DIE.
1575
1576 2018-06-28 Richard Biener <rguenther@suse.de>
1577
1578 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1579 DW_AT_abstract_origin attribute.
1580
1581 2018-06-28 Martin Liska <mliska@suse.cz>
1582
1583 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1584 Use newly introduced constants.
1585 * tree-switch-conversion.h (struct jump_table_cluster):
1586 Define max_ratio_for_size and max_ratio_for_speed.
1587
1588 2018-06-28 Martin Liska <mliska@suse.cz>
1589
1590 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1591 Add new checking assert to catch invalid state.
1592 (jump_table_cluster::can_be_handled): Handle single case
1593 clusters.
1594 (jump_table_cluster::is_beneficial): Bail out for such case.
1595 (bit_test_cluster::find_bit_tests):
1596 Add new checking assert to catch invalid state.
1597 (bit_test_cluster::can_be_handled): Handle single case
1598 clusters.
1599 (bit_test_cluster::is_beneficial): Bail out for such case.
1600 (switch_decision_tree::analyze_switch_statement):
1601 Fix comment.
1602
1603 2018-06-28 Martin Liska <mliska@suse.cz>
1604
1605 * common.opt: Introduce -completion option.
1606 * gcc.c (driver_handle_option): Handle it.
1607 (driver::main): Print completions if completion
1608 is set.
1609 * opt-suggestions.c (option_proposer::get_completions):
1610 New function.
1611 (option_proposer::suggest_completion): Likewise.
1612 (option_proposer::find_param_completions): Likewise.
1613 (verify_autocompletions): Likewise.
1614 (test_completion_valid_options): Likewise.
1615 (test_completion_valid_params): Likewise.
1616 (in_completion_p): Likewise.
1617 (empty_completion_p): Likewise.
1618 (test_completion_partial_match): Likewise.
1619 (test_completion_garbage): Likewise.
1620 (opt_proposer_c_tests): Likewise.
1621 * opt-suggestions.h: Declare new functions.
1622 * opts.c (common_handle_option): Handle OPT__completion_.
1623 * selftest-run-tests.c (selftest::run_tests): Add
1624 opt_proposer_c_tests.
1625 * selftest.c (assert_str_startswith): New.
1626 * selftest.h (assert_str_startswith): Likewise.
1627 (opt_proposer_c_tests): New.
1628 (ASSERT_STR_STARTSWITH): Likewise.
1629
1630 2018-06-28 Martin Liska <mliska@suse.cz>
1631
1632 * Makefile.in: Add opt-suggestions.o.
1633 * gcc-main.c: Include opt-suggestions.h.
1634 * gcc.c (driver::driver): Likewise.
1635 (driver::~driver): Remove m_option_suggestions.
1636 (driver::build_option_suggestions): Moved to option_proposer.
1637 (driver::suggest_option): Likewise.
1638 (driver::handle_unrecognized_options): Use option_proposer.
1639 * gcc.h (class driver): Add new memver m_option_proposer.
1640 * opt-suggestions.c: New file.
1641 * opt-suggestions.h: New file.
1642
1643 2018-06-28 Martin Liska <mliska@suse.cz>
1644
1645 * vec.h (class auto_string_vec): New (moved from auto_argvec).
1646 (auto_string_vec::~auto_string_vec): Likewise.
1647
1648 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1649
1650 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1651 prevent_decl_creation_for_types fields up and add reset_location field.
1652 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1653 statement if id->reset_location is true.
1654 (copy_edges_for_bb): Do not set goto_locus on the new edges if
1655 id->reset_location is true.
1656 (copy_phis_for_bb): Force input_location on the arguments if
1657 id->reset_location is true.
1658 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1659 is set on the function to be inlined.
1660
1661 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
1662
1663 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1664
1665 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
1666
1667 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1668 registers for Pmode.
1669 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1670 hard registers for the clobbered pseudo.
1671
1672 2018-06-27 Paul Koning <ni1d@arrl.net>
1673
1674 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1675 mutually exclusive options.
1676 * config/pdp11/constraints.md (h): New constraint.
1677 (O): Update definition to match shift code generation.
1678 (D): New constraint.
1679 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1680 (CCFP): Remove.
1681 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1682 function.
1683 (output_jump): Change arguments.
1684 (pdp11_fixed_cc_regs): New function.
1685 (pdp11_cc_mode): Ditto.
1686 (pdp11_expand_shift): Ditto.
1687 (pdp11_assemble_shift): Ditto.
1688 (pdp11_small_shift): Ditto.
1689 (pdp11_branch_cost): Remove.
1690 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1691 from output.
1692 (pdp11_register_move_cost): Update for CC registers.
1693 (pdp11_rtx_costs): Add case for LSHIFTRT.
1694 (pdp11_output_jump): Add CCNZ mode conditional branches.
1695 (notice_update_cc_on_set): Remove.
1696 (pdp11_cc_mode): New function.
1697 (simple_memory_operand): Correct pre/post decrement case.
1698 (no_side_effect_operand): New function.
1699 (pdp11_regno_reg_class): Add CC_REGS class.
1700 (pdp11_fixed_cc_regs): New function.
1701 (pdp11_small_shift): New function.
1702 (pdp11_expand_shift): New function to expand shift insns.
1703 (pdp11_assemble_shift): New function to output shifts.
1704 (pdp11_branch_cost): Remove.
1705 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1706 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1707 (WCHAR_TYPE): Ditto.
1708 (PTRDIFF_TYPE): Ditto.
1709 (ADJUST_INSN_LENGTH): New macro.
1710 (FIXED_REGISTERS): Add CC registers.
1711 (CALL_USED_REGISTERS): Ditto.
1712 (reg_class): Ditto.
1713 (REG_CLASS_NAMES): Ditto.
1714 (REG_CLASS_CONTENTS): Ditto.
1715 (SELECT_CC_MODE): Use new function.
1716 (TARGET_FLAGS_REGNUM): New macro.
1717 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1718 (cc0_reg_rtx): Remove.
1719 (CC_STATUS_MDEP): Remove.
1720 (CC_STATUS_MDEFP_INIT): Remove.
1721 (CC_IN_FPU): Remove.
1722 (NOTICE_UPDATE_CC): Remove.
1723 (REGISTER_NAMES): Add CC registers.
1724 (BRANCH_COST): Change to constant 1.
1725 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1726 handling.
1727 * config/pdp11/pdp11.opt (mbcopy): Remove.
1728 (mbcopy-builtin): Remove.
1729 (mbranch-cheap): Remove.
1730 (mbranch-expensive): Remove.
1731 * config/pdp11/predicates.md (expand_shift_operand): Update to
1732 match shift code generation.
1733 (ccnz_operator): New predicate.
1734 * doc/invoke.texi (PDP-11 Options): Remove deleted options
1735 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1736 Remove non-existent option -mabshi, -mno-abshi. Document mutually
1737 exclusive options.
1738 * doc/md.texi (PDP-11): Document new D and h constraints. Update
1739 description of O constraint.
1740
1741 2018-06-27 Jeff Law <law@redhat.com>
1742 Austin Law <austinklaw@gmail.com>
1743
1744 * config/v850/v850.md (addsi3_set_flags): New pattern.
1745 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1746 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1747 (zero_extendhisi2_v850_set_flags): Likewise.
1748 (zero_extendqisi2_v850_set_flags): Likewise.
1749 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1750 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1751 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1752
1753 * config/v850/v850-protos.h (notice_update_cc): Remove.
1754 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1755 (v850_print_operand): Handle 'D' and "d".
1756 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1757 Add handling of arithmetic/logical operations compared against zero.
1758 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1759 Do not look at v850_compare_op, instead get mode from last argument.
1760 (v850_gen_compare): Remove
1761 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1762 after reload for prologue insns.
1763 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1764 patterns.
1765 (construct_save_jarl): Likewise.
1766 (TARGET_FLAGS_REGNUM): Define.
1767 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1768 (NOTICE_UPDATE_CC): Remove.
1769 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1770 than cc0. Conditionalize on reload_completed.
1771 (cmpsi_insn, setfcc_insn): Likewise.
1772 (tst1 splitter): Turn into define_and_split which sets the flags
1773 after reload.
1774 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1775 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1776 (cstoresf4, cstoredf4): Clobber the flags.
1777 (cmpsi, cmpsf, cmpdf): Remove expanders.
1778 (setf_insn): Remove pattern.
1779 (addsi3): Turn into define_and_split which clobbers the flags after
1780 reload and a suitable pattern (addsi3_clobber_flags) for use after
1781 reload.
1782 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1783 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1784 (ashrsi3, ashrsi3_v850e2): Likewise.
1785 (bins): Clobber the flags.
1786 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1787 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1788 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1789 (call_value_internal_short, call_value_internal_long): Likewise.
1790 (callt_save_interrupt, callt_return_interrupt): Likewise.
1791 (save_interrupt, return_interrupt): Likewise.
1792 (callt_save_all_interrupt, save_all_interrupt): Likewise.
1793 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1794 (restore_all_interrupt, _restore_all_interrupt): Likewise.
1795 (All FP comparisons): Only allow after reload has completed.
1796 (trfsr): Likewise.
1797 (divh, divhu): Tweak output template.
1798 (branch_z_normal, branch_z_invert): Remove
1799 (branch_nz_normal, branch_nz_invert): Likewise.
1800 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1801
1802 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1803 * config/v850/v850.c (notice_update_cc): Remove.
1804 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
1805 (CC_NO_CARRY): Likewise.
1806 (NOTICE_UPDATE_CC): Define to nothing.
1807 * config/v850/v850.md: Remove block comment on cc0 handling
1808 Remove "cc" attribute from all patterns. Remove cc_status handling
1809 from all patterns. Minor formatting fixes.
1810
1811 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1812
1813 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1814 (cortex-a76.cortex-a55): Likewise.
1815 * config/aarch64/aarch64-tune.md: Regenerate.
1816 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1817 cortex-a76.cortex-a55.
1818
1819 2018-06-27 Jeff Law <law@redhat.com>
1820
1821 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1822 (MULTILIB_DIRNAMES): Similarly.
1823
1824 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
1825
1826 * gimple.h (gimple_return_retbnd): Delete.
1827 (gimple_return_set_retbnd): Likewise.
1828 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1829 gimple_return_set_retbnd.
1830 * gimple-pretty-print.c (dump_gimple_return): Remove call to
1831 gimple_return_retbnd and adjust.
1832 * tree-inline.h (struct copy_body_data): Remove retbnd field.
1833 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1834 Explicitly return NULL in a couple more cases. Move assertion
1835 on debug statements and remove unreachable code.
1836 (reset_debug_binding): Do not test id->retbnd.
1837 (expand_call_inline): Do not set it.
1838
1839 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1840
1841 * configure.ac: Add --disable-gcov option.
1842 * configure: Regenerate.
1843 * Makefile.in: Honour @enable_gcov@.
1844 * doc/install.texi: Document --disable-gcov.
1845
1846 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1847
1848 * config/arm/arm-cpus.in (cortex-a76): New entry.
1849 (cortex-a76.cortex-a55): Likewise.
1850 * config/arm/arm-tables.opt: Regenerate.
1851 * config/arm/arm-tune.md: Likewise.
1852 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1853 * doc/invoke.texi (ARM Options): Document cortex-a76 and
1854 cortex-a76.cortex-a55.
1855
1856 2018-06-27 Tamar Christina <tamar.christina@arm.com>
1857
1858 PR target/85769
1859 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1860
1861 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
1862
1863 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1864 comment.
1865 (EPILOGUE_USES): Likewise.
1866
1867 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
1868
1869 * tree-inline.c (remap_location): New function extracted from...
1870 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
1871 (copy_phis_for_bb): ...here. Call remap_location.
1872 (copy_cfg_body): Adjust call to copy_edges_for_bb.
1873
1874 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1875
1876 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1877 unaligned vsx for 16B memset.
1878
1879 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
1880
1881 PR target/86285
1882 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1883 ieee128_float_type_node to long_double_type_node unless
1884 TARGET_LONG_DOUBLE_128 is set.
1885
1886 2018-06-26 David Malcolm <dmalcolm@redhat.com>
1887
1888 * cfgloop.c (get_loop_location): Convert return type from
1889 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1890 by implicit construction from rtx_insn *, and using
1891 dump_user_location_t::from_function_decl for the fallback case.
1892 * cfgloop.h (get_loop_location): Convert return type from
1893 location_t to dump_user_location_t.
1894 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1895 dump_printf_loc to pass in a dump_location_t rather than a
1896 location_t, via the gimple stmt.
1897 * coverage.c (get_coverage_counts): Update calls to
1898 dump_printf_loc to pass in dump_location_t rather than a
1899 location_t.
1900 * doc/optinfo.texi (Dump types): Convert example of
1901 dump_printf_loc from taking "locus" to taking "insn". Update
1902 description of the "_loc" calls to cover dump_location_t.
1903 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1904 "selftest.h".
1905 (dump_user_location_t::dump_user_location_t): New constructors,
1906 from gimple *stmt and rtx_insn *.
1907 (dump_user_location_t::from_function_decl): New function.
1908 (dump_loc): Make static.
1909 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1910 const dump_location_t &.
1911 (dump_generic_expr_loc): Delete.
1912 (dump_printf_loc): Convert param "loc" from location_t to
1913 const dump_location_t &.
1914 (selftest::test_impl_location): New function.
1915 (selftest::dumpfile_c_tests): New function.
1916 * dumpfile.h: Include "profile-count.h".
1917 (class dump_user_location_t): New class.
1918 (struct dump_impl_location_t): New struct.
1919 (class dump_location_t): New class.
1920 (dump_printf_loc): Convert 2nd param from source_location to
1921 const dump_location_t &.
1922 (dump_generic_expr_loc): Delete.
1923 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1924 const dump_location_t &.
1925 * gimple-fold.c (fold_gimple_assign): Update call to
1926 dump_printf_loc to pass in a dump_location_t rather than a
1927 location_t, via the gimple stmt.
1928 (gimple_fold_call): Likewise.
1929 * gimple-loop-interchange.cc
1930 (loop_cand::analyze_iloop_reduction_var): Update for change to
1931 check_reduction_path.
1932 (tree_loop_interchange::interchange): Update for change to
1933 find_loop_location.
1934 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1935 change in return-type of find_loop_location.
1936 (graphite_regenerate_ast_isl): Likewise.
1937 * graphite-optimize-isl.c (optimize_isl): Likewise.
1938 * graphite.c (graphite_transform_loops): Likewise.
1939 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1940 pass in a dump_location_t rather than a location_t, via the
1941 gimple stmt.
1942 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1943 * ipa.c (walk_polymorphic_call_targets): Likewise.
1944 * loop-unroll.c (report_unroll): Convert "locus" param from
1945 location_t to dump_location_t.
1946 (decide_unrolling): Update for change to get_loop_location's
1947 return type.
1948 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1949 location_t to dump_user_location_t.
1950 (grid_find_single_omp_among_assignments_1): Updates calls to
1951 dump_printf_loc to pass in a dump_location_t rather than a
1952 location_t, via the gimple stmt.
1953 (grid_parallel_clauses_gridifiable): Convert "tloc" from
1954 location_t to dump_location_t. Updates calls to dump_printf_loc
1955 to pass in a dump_location_t rather than a location_t, via the
1956 gimple stmt.
1957 (grid_inner_loop_gridifiable_p): Likewise.
1958 (grid_dist_follows_simple_pattern): Likewise.
1959 (grid_gfor_follows_tiling_pattern): Likewise.
1960 (grid_target_follows_gridifiable_pattern): Likewise.
1961 (grid_attempt_target_gridification): Convert initialization
1962 of local "grid" from memset to zero-initialization; FIXME: does
1963 this require C++11? Update call to dump_printf_loc to pass in a
1964 optinfo_location rather than a location_t, via the gimple stmt.
1965 * profile.c (read_profile_edge_counts): Updates call to
1966 dump_printf_loc to pass in a dump_location_t rather than a
1967 location_t
1968 (compute_branch_probabilities): Likewise.
1969 * selftest-run-tests.c (selftest::run_tests): Call
1970 dumpfile_c_tests.
1971 * selftest.h (dumpfile_c_tests): New decl.
1972 * tree-loop-distribution.c (pass_loop_distribution::execute):
1973 Update for change in return type of find_loop_location.
1974 * tree-parloops.c (parallelize_loops): Likewise.
1975 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1976 "locus" from location_t to dump_user_location_t.
1977 (canonicalize_loop_induction_variables): Likewise.
1978 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1979 for change in return type of find_loop_location.
1980 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1981 to dump_printf_loc to pass in a dump_location_t rather than a
1982 location_t, via the stmt.
1983 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1984 Likewise.
1985 * tree-vect-loop-manip.c (find_loop_location): Convert return
1986 type from source_location to dump_user_location_t.
1987 (vect_do_peeling): Update for above change.
1988 (vect_loop_versioning): Update for change in type of
1989 vect_location.
1990 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1991 from location_t to dump_user_location_t.
1992 (vect_estimate_min_profitable_iters): Update for change in type
1993 of vect_location.
1994 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1995 location_t to dump_location_t.
1996 (vect_slp_bb): Update for change in type of vect_location.
1997 * tree-vectorizer.c (vect_location): Convert from source_location
1998 to dump_user_location_t.
1999 (try_vectorize_loop_1): Update for change in vect_location's type.
2000 (vectorize_loops): Likewise.
2001 (increase_alignment): Likewise.
2002 * tree-vectorizer.h (vect_location): Convert from source_location
2003 to dump_user_location_t.
2004 (find_loop_location): Convert return type from source_location to
2005 dump_user_location_t.
2006 (check_reduction_path): Convert 1st param from location_t to
2007 dump_user_location_t.
2008 * value-prof.c (check_counter): Update call to dump_printf_loc to
2009 pass in a dump_user_location_t rather than a location_t; update
2010 call to error_at for change in type of "locus".
2011 (check_ic_target): Update call to dump_printf_loc to
2012 pass in a dump_user_location_t rather than a location_t, via the
2013 call_stmt.
2014
2015 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2016
2017 * config/s390/s390.h (enum processor_flags): Do not use
2018 default tune parameter when -march was specified.
2019
2020 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2021
2022 PR target/86314
2023 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2024 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2025 operands.
2026
2027 2018-06-26 Richard Biener <rguenther@suse.de>
2028
2029 PR tree-optimization/86287
2030 PR bootstrap/86316
2031 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2032 (vect_analyze_loop): Initialize n_stmts.
2033
2034 2018-06-26 Richard Biener <rguenther@suse.de>
2035
2036 PR middle-end/86271
2037 * fold-const.c (fold_convertible_p): Pointer extension
2038 isn't valid.
2039
2040 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2041
2042 PR debug/86064
2043 * dwarf2out.c (loc_list_has_views): Adjust comments.
2044 (dw_loc_list): Split single cross-partition range with
2045 nonzero locview.
2046
2047 2018-06-25 Jeff Law <law@redhat.com>
2048
2049 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2050 on -mbig-switch by default.
2051
2052 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2053 test.
2054 (const_float_0_operand): Remove unused predicate.
2055 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2056 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2057 (recipsf2): New expander. Original pattern now called
2058 (recipsf2_insn).
2059 (recipdf2, recipdf2_insn): Similarly.
2060 (rsqrtsf2, rsqrtsf2_insn): Similarly
2061 (rsqrtdf2, rsqrtdf2_insn): Similarly
2062
2063 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2064
2065 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2066 Simplify logic for FreeBSD (twice).
2067
2068 2018-06-25 Martin Sebor <msebor@redhat.com>
2069
2070 PR tree-optimization/86204
2071 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2072 a strnlen result if it's less than the length of the string.
2073
2074 2018-06-25 Martin Sebor <msebor@redhat.com>
2075
2076 PR tree-optimization/85700
2077 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2078 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2079 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2080
2081 2018-06-25 Martin Sebor <msebor@redhat.com>
2082
2083 * doc/extend.texi (Zero-length arrays): Update and clarify.
2084
2085 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2086
2087 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2088 added IEEE/IBM long double multilib support on PowerPC little
2089 endian Linux systems.
2090 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2091 (MULTILIB_DEFAULTS): Likewise.
2092 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2093 Likewise.
2094 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2095 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2096 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2097
2098 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2099
2100 PR middle-end/86311
2101 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2102 (REORDER_45): Likewise.
2103
2104 2018-06-25 Jeff Law <law@redhat.com>
2105
2106 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2107 dividend to 32 bits. Adjust length.
2108 (udivmodhi4): Cleanup output template. Fix length.
2109
2110 2018-06-25 Carl Love <cel@us.ibm.com>
2111
2112 * config/rs6000/vsx.md: Change word selector to prefered location.
2113
2114 2018-06-25 Richard Biener <rguenther@suse.de>
2115
2116 PR tree-optimization/86304
2117 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2118 epilogue-if-converted loops as well.
2119
2120 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2121
2122 * lto-section-out.c (lto_begin_section): Do not print section
2123 name for noaddr and unnumbered dumps.
2124
2125 2018-06-25 Richard Biener <rguenther@suse.de>
2126
2127 * tree-vectorizer.h (struct vec_info_shared): New structure
2128 with parts split out from struct vec_info and loop_nest from
2129 struct _loop_vec_info.
2130 (struct vec_info): Adjust accordingly.
2131 (struct _loop_vec_info): Likewise.
2132 (LOOP_VINFO_LOOP_NEST): Adjust.
2133 (LOOP_VINFO_DATAREFS): Likewise.
2134 (LOOP_VINFO_DDRS): Likewise.
2135 (struct _bb_vec_info): Likewise.
2136 (BB_VINFO_DATAREFS): Likewise.
2137 (BB_VINFO_DDRS): Likewise.
2138 (struct _stmt_vec_info): Add dr_aux member.
2139 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2140 (DR_MISALIGNMENT_UNINITIALIZED): New.
2141 (set_dr_misalignment): Adjust.
2142 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2143 (vect_analyze_loop): Adjust prototype.
2144 (vect_analyze_loop_form): Likewise.
2145 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2146 Compute dependences lazily.
2147 (vect_record_base_alignments): Use shared datarefs/ddrs.
2148 (vect_verify_datarefs_alignment): Likewise.
2149 (vect_analyze_data_refs_alignment): Likewise.
2150 (vect_analyze_data_ref_accesses): Likewise.
2151 (vect_analyze_data_refs): Likewise.
2152 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2153 constructor parameter for shared part.
2154 (vect_analyze_loop_form): Pass in shared part and adjust.
2155 (vect_analyze_loop_2): Pass in storage for the number of
2156 stmts. Move loop nest finding to the caller. Compute
2157 datarefs lazily.
2158 (vect_analyze_loop): Pass in shared part.
2159 (vect_transform_loop): Verify shared datarefs are unchanged.
2160 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2161 constructor parameter for shared part.
2162 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2163 (vect_slp_bb): Verify shared datarefs are unchanged before
2164 transform.
2165 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2166 change.
2167 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2168 DR_MISALIGNMENT_UNINITIALIZED.
2169 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2170 parameter for shared part.
2171 (vec_info::~vec_info): Adjust.
2172 (vec_info_shared::vec_info_shared): New.
2173 (vec_info_shared::~vec_info_shared): Likewise.
2174 (vec_info_shared::save_datarefs): Likewise.
2175 (vec_info_shared::check_datarefs): Likewise.
2176 (try_vectorize_loop_1): Construct shared part live for analyses
2177 of a single loop for multiple vector sizes.
2178 * tree-parloops.c (gather_scalar_reductions): Adjust.
2179
2180 2018-06-25 Richard Biener <rguenther@suse.de>
2181
2182 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2183 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2184 (vect_analyze_data_refs): Remove similar code from here and
2185 simplify accordingly.
2186
2187 2018-06-25 Richard Biener <rguenther@suse.de>
2188
2189 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2190 for reverse storage order accesses rather than asserting
2191 they cannot happen here.
2192
2193 2018-06-25 Tom de Vries <tdevries@suse.de>
2194
2195 PR debug/86257
2196 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2197 Use data16 instead of .byte for insn prefix.
2198
2199 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
2200
2201 PR C++/86082
2202 * parser.c (make_char_string_pack): Pass this literal chars
2203 through cpp_interpret_string.
2204 (cp_parser_userdef_numeric_literal): Check the result of
2205 make_char_string_pack.
2206
2207 2018-06-24 Maya Rashish <coypu@sdf.org>
2208
2209 * ginclude/stddef.h: Simplify conditions around avoiding
2210 re-definition of __size_t.
2211
2212 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2213
2214 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2215 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2216
2217 2018-06-22 Maya Rashish <coypu@sdf.org>
2218
2219 * doc/invoke.texi (mno-fancy-math-387): Update for changes
2220 made to OpenBSD and NetBSD through the years.
2221
2222 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
2223
2224 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2225 behavior of vec_pack (vector double, vector double) to match
2226 behavior of vec_float2 (vector double, vector double).
2227
2228 2018-06-22 Olivier Hainque <hainque@adacore.com>
2229
2230 * gimplify.c (gimplify_function_tree): Prevent creation
2231 of a trampoline for the address of the current function
2232 passed to entry/exit instrumentation hooks.
2233
2234 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
2235
2236 PR target/86222
2237 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2238 correctly.
2239
2240 2018-06-22 Martin Liska <mliska@suse.cz>
2241
2242 PR tree-optimization/86263
2243 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2244 Bail out if is_enabled is false.
2245 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2246 New declaration.
2247 (jump_table_cluster::is_enabled): New function.
2248
2249 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2250
2251 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2252 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2253 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2254 (lto_input_ts_binfo_tree_pointers): Likewise.
2255 * tree-streamer-out.c (streamer_write_tree_bitfields,
2256 write_ts_binfo_tree_pointers): Likewise.
2257 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2258
2259 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2260
2261 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2262
2263 2018-06-22 Martin Liska <mliska@suse.cz>
2264
2265 * symbol-summary.h (get): Make it pure and inline move
2266 functionality from ::get function.
2267 (get): Remove and inline into ::get and ::get_create.
2268 (get_create): Move code from ::get function.
2269
2270 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2271
2272 PR target/85994
2273 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2274 -x assembler-with-cpp.
2275
2276 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2277
2278 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2279 _FILE_OFFSET_BITS=64 for C++.
2280
2281 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
2282
2283 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2284 conversion insn that shows up when pr85657-3.c is compiled using
2285 IEEE 128-bit long double.
2286 (neg<mode>2_internal): Use the correct mode to check whether the
2287 mode is IBM extended.
2288 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2289 multiply and divide external functions from being created more
2290 than once.
2291
2292 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2293
2294 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2295 functions.
2296 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
2297 the edge can be forwarded.
2298 (cfg_layout_merge_blocks): Likewise.
2299
2300 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2301
2302 * except.c (finish_eh_generation): Commit edge insertions only after
2303 the EH edges have been redirected from post-landing to landing pads.
2304
2305 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2306
2307 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2308 create_tmp_var_for to create the FRAME decl.
2309 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2310
2311 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2312
2313 * tree-inline.c (copy_edges_for_bb): Minor tweak.
2314 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2315 debug statement when resetting its value.
2316 (expand_call_inline): Copy the locus of the call onto the assignment
2317 of the return value, if any. Use local variable in more cases.
2318
2319 2018-06-21 Martin Liska <mliska@suse.cz>
2320
2321 * ipa-pure-const.c (propagate_nothrow): Use
2322 funct_state_summaries->get.
2323 (dump_malloc_lattice): Likewise.
2324 (propagate_malloc): Likewise.
2325
2326 2018-06-21 Richard Biener <rguenther@suse.de>
2327
2328 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2329 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2330 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2331 comment.
2332 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2333 BLOCK_ABSTRACT_ORIGIN unconditionally.
2334
2335 2018-06-21 David Malcolm <dmalcolm@redhat.com>
2336
2337 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2338 deleting it.
2339 * ipa-reference.c (ipa_reference_c_finalize): Delete
2340 ipa_ref_opt_sum_summaries and set it to NULL.
2341
2342 2018-06-21 Tom de Vries <tdevries@suse.de>
2343
2344 PR tree-optimization/85859
2345 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2346 test with comment from bb_no_side_effects_p.
2347
2348 2018-06-21 Richard Biener <rguenther@suse.de>
2349
2350 PR tree-optimization/86232
2351 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2352 max for constant niter.
2353
2354 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2355
2356 * config/aarch64/aarch64-simd.md
2357 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2358
2359 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2360
2361 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2362 Make opernads of the unspec commutative.
2363
2364 2018-06-21 Richard Biener <rguenther@suse.de>
2365
2366 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2367 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2368 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2369 (vect_analyze_data_ref_dependence): Re-order checks to deal with
2370 NULL DR_STEP.
2371 (vect_record_base_alignments): Do not record base alignment
2372 for gathers or scatters.
2373 (vect_compute_data_ref_alignment): Drop return value that is always
2374 true. Bail out early for gathers or scatters.
2375 (vect_enhance_data_refs_alignment): Bail out early for gathers
2376 or scatters.
2377 (vect_find_same_alignment_drs): Likewise.
2378 (vect_analyze_data_refs_alignment): Remove dead code.
2379 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2380 (vect_analyze_data_refs): For possible gathers or scatters do
2381 not create an alternate DR, just check their possible validity
2382 and mark them. Adjust DECL_NONALIASED handling to not rely
2383 on DR_BASE_ADDRESS.
2384 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2385 update inits of gathers or scatters.
2386 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2387 Also copy gather/scatter flag to pattern vinfo.
2388
2389 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
2390
2391 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2392 behavior of vec_packsu (vector unsigned long long, vector unsigned
2393 long long) to match behavior of vec_packs with same signature.
2394
2395 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2396 Thomas Schwinge <thomas@codesourcery.com>
2397 Cesar Philippidis <cesar@codesourcery.com>
2398
2399 * gimplify.c (gimplify_scan_omp_clauses): Add support for
2400 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2401 (gimplify_adjust_omp_clauses): Likewise.
2402 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2403 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2404 (gimplify_omp_target_update): Update handling of acc update and
2405 enter/exit data.
2406 * omp-low.c (install_var_field): Remove unused parameter
2407 base_pointers_restrict.
2408 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2409 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2410 FINALIZE}
2411 (omp_target_base_pointers_restrict_p): Delete.
2412 (scan_omp_target): Update call to scan_sharing_clauses.
2413 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2414 FINALIZE}.
2415 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2416 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2417 (convert_local_omp_clauses): Likewise.
2418 * tree-pretty-print.c (dump_omp_clause): Likewise.
2419 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
2420 FINALIZE}.
2421 (omp_clause_code_name): Likewise.
2422
2423 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2424
2425 PR debug/86194
2426 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2427 be narrowed.
2428
2429 PR tree-optimization/86231
2430 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
2431 anti-range don't overwrite *vr0min before using it to compute *vr0max.
2432
2433 2018-06-20 Tom de Vries <tdevries@suse.de>
2434
2435 PR tree-optimization/86097
2436 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2437 iv type if signedness of iv type is not the same as that of *nit.
2438
2439 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2440
2441 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
2442 EDGE_EH edges, verify they are all EDGE_EH.
2443
2444 2018-06-20 Maya Rashish <coypu@sdf.org>
2445
2446 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2447
2448 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2449
2450 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2451 * config/aarch64/aarch64.c (xgene1_tunings): Add
2452 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
2453 (aarch64_mode_valid_for_sched_fusion_p):
2454 Allow 16-byte modes.
2455 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
2456 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
2457 128-bit modes.
2458 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
2459 New pattern.
2460 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
2461 * config/aarch64/iterators.md (VQ2): New mode iterator.
2462
2463 2018-06-20 Martin Liska <mliska@suse.cz>
2464
2465 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2466 Change default ratio from 10 to 8.
2467
2468 2018-06-20 Martin Liska <mliska@suse.cz>
2469
2470 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2471 New.
2472 (bit_test_cluster::find_bit_tests): Likewise.
2473 (switch_decision_tree::analyze_switch_statement): Find clusters.
2474 * tree-switch-conversion.h (struct jump_table_cluster): Document
2475 hierarchy.
2476
2477 2018-06-20 Martin Liska <mliska@suse.cz>
2478
2479 * tree-switch-conversion.c (switch_conversion::collect):
2480 Record m_uniq property.
2481 (switch_conversion::expand): Bail out for special conditions.
2482 (group_cluster::~group_cluster): New.
2483 (group_cluster::group_cluster): Likewise.
2484 (group_cluster::dump): Likewise.
2485 (jump_table_cluster::emit): New.
2486 (switch_decision_tree::fix_phi_operands_for_edges): New.
2487 (struct case_node): Remove struct.
2488 (jump_table_cluster::can_be_handled): New.
2489 (case_values_threshold): Moved to header.
2490 (reset_out_edges_aux): Likewise.
2491 (jump_table_cluster::is_beneficial): New.
2492 (bit_test_cluster::can_be_handled): Likewise.
2493 (add_case_node): Remove.
2494 (bit_test_cluster::is_beneficial): New.
2495 (case_bit_test::cmp): New.
2496 (bit_test_cluster::emit): New.
2497 (expand_switch_as_decision_tree_p): Remove.
2498 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2499 (fix_phi_operands_for_edge): Likewise.
2500 (switch_decision_tree::analyze_switch_statement): New.
2501 (compute_cases_per_edge): Move ...
2502 (switch_decision_tree::compute_cases_per_edge): ... here.
2503 (try_switch_expansion): Likewise.
2504 (switch_decision_tree::try_switch_expansion): Likewise.
2505 (record_phi_operand_mapping): Likewise.
2506 (switch_decision_tree::record_phi_operand_mapping): Likewise.
2507 (emit_case_decision_tree): Likewise.
2508 (switch_decision_tree::emit): Likewise.
2509 (balance_case_nodes): Likewise.
2510 (switch_decision_tree::balance_case_nodes): Likewise.
2511 (dump_case_nodes): Likewise.
2512 (switch_decision_tree::dump_case_nodes): Likewise.
2513 (emit_jump): Likewise.
2514 (switch_decision_tree::emit_jump): Likewise.
2515 (emit_cmp_and_jump_insns): Likewise.
2516 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2517 (emit_case_nodes): Likewise.
2518 (switch_decision_tree::emit_case_nodes): Likewise.
2519 (conditional_probability): Remove.
2520 * tree-switch-conversion.h (enum cluster_type): New.
2521 (PRINT_CASE): New.
2522 (struct cluster): Likewise.
2523 (cluster::cluster): Likewise.
2524 (struct simple_cluster): Likewise.
2525 (simple_cluster::simple_cluster): Likewise.
2526 (struct group_cluster): Likewise.
2527 (struct jump_table_cluster): Likewise.
2528 (struct bit_test_cluster): Likewise.
2529 (struct min_cluster_item): Likewise.
2530 (struct case_tree_node): Likewise.
2531 (case_tree_node::case_tree_node): Likewise.
2532 (jump_table_cluster::case_values_threshold): Likewise.
2533 (struct case_bit_test): Likewise.
2534 (struct switch_decision_tree): Likewise.
2535 (struct switch_conversion): Likewise.
2536 (switch_decision_tree::reset_out_edges_aux): Likewise.
2537
2538 2018-06-20 Martin Liska <mliska@suse.cz>
2539
2540 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2541 (hoist_edge_and_branch_if_true): Likewise.
2542 (expand_switch_using_bit_tests_p): Likewise.
2543 (struct case_bit_test): Likewise.
2544 (case_bit_test_cmp): Likewise.
2545 (emit_case_bit_tests): Likewise.
2546 (switch_conversion::switch_conversion): New class.
2547 (struct switch_conv_info): Remove old struct.
2548 (collect_switch_conv_info): More to ...
2549 (switch_conversion::collect): ... this.
2550 (check_range): Likewise.
2551 (switch_conversion::check_range): Likewise.
2552 (check_all_empty_except_final): Likewise.
2553 (switch_conversion::check_all_empty_except_final): Likewise.
2554 (check_final_bb): Likewise.
2555 (switch_conversion::check_final_bb): Likewise.
2556 (create_temp_arrays): Likewise.
2557 (switch_conversion::create_temp_arrays): Likewise.
2558 (free_temp_arrays): Likewise.
2559 (gather_default_values): Likewise.
2560 (switch_conversion::gather_default_values): Likewise.
2561 (build_constructors): Likewise.
2562 (switch_conversion::build_constructors): Likewise.
2563 (constructor_contains_same_values_p): Likewise.
2564 (switch_conversion::contains_same_values_p): Likewise.
2565 (array_value_type): Likewise.
2566 (switch_conversion::array_value_type): Likewise.
2567 (build_one_array): Likewise.
2568 (switch_conversion::build_one_array): Likewise.
2569 (build_arrays): Likewise.
2570 (switch_conversion::build_arrays): Likewise.
2571 (gen_def_assigns): Likewise.
2572 (switch_conversion::gen_def_assigns): Likewise.
2573 (prune_bbs): Likewise.
2574 (switch_conversion::prune_bbs): Likewise.
2575 (fix_phi_nodes): Likewise.
2576 (switch_conversion::fix_phi_nodes): Likewise.
2577 (gen_inbound_check): Likewise.
2578 (switch_conversion::gen_inbound_check): Likewise.
2579 (process_switch): Use the newly created class.
2580 (switch_conversion::expand): New.
2581 (switch_conversion::~switch_conversion): New.
2582 * tree-switch-conversion.h: New file.
2583
2584 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2585
2586 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2587 tree-vect-patterns.c.
2588 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2589 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
2590 (vect_recog_sad_pattern): Likewise.
2591 (vect_recog_widen_sum_pattern): Likewise.
2592 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
2593 (vect_recog_widen_shift_pattern): Remove the type_in argument.
2594 (vect_recog_rotate_pattern): Likewise.
2595 (vect_recog_mult_pattern): Likewise.
2596 (vect_recog_vector_vector_shift_pattern): Likewise.
2597 (vect_recog_divmod_pattern): Likewise.
2598 (vect_recog_mixed_size_cond_pattern): Likewise.
2599 (vect_recog_bool_pattern): Likewise.
2600 (vect_recog_mask_conversion_pattern): Likewise.
2601 (vect_try_gather_scatter_pattern): Likewise.
2602 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
2603 (vect_recog_over_widening_pattern): Likewise.
2604 (vect_recog_gather_scatter_pattern): Likewise.
2605 (vect_recog_func_ptr): Move from tree-vectorizer.h
2606 (vect_vect_recog_func_ptrs): Move further down the file.
2607 (vect_recog_func): Likewise. Remove the third argument.
2608 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2609 (vect_pattern_recog_1): Expect the pattern function to do any
2610 necessary target tests. Also expect it to provide a vector type.
2611 Remove the type_in handling.
2612
2613 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2614
2615 * tree-vect-patterns.c (vect_pattern_detected): New function.
2616 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2617 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2618 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2619 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2620 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2621 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2622 (vect_recog_mask_conversion_pattern)
2623 (vect_try_gather_scatter_pattern): Likewise.
2624
2625 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2626
2627 * tree-vect-patterns.c (vect_get_internal_def): New function.
2628 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2629 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2630 (search_type_for_mask_1): Use it.
2631
2632 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2633
2634 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2635 redundant WIDEN_SUM_EXPR handling.
2636 (vect_recog_sad_pattern): Likewise.
2637
2638 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2639
2640 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2641 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2642 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2643 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2644 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2645
2646 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2647
2648 * tree-vect-stmts.c (vectorizable_call): Make sure that we
2649 use the stmt_vec_info of the original bb statement for the
2650 new zero assignment, even if the call is part of a pattern.
2651
2652 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2653
2654 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2655 that the sequence is attached to the original statement rather
2656 than the pattern statement.
2657 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2658 PATTERN_DEF_SEQ from the original statement rather than
2659 the main pattern statement.
2660 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2661 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2662 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2663
2664 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2665
2666 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2667 definition statements before the early exit for statements that aren't
2668 live or relevant.
2669 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2670 split out from...
2671 (vect_transform_loop): ...here. Process pattern definition
2672 statements without first checking whether the main pattern
2673 statement is live or relevant.
2674
2675 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2676
2677 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2678 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2679
2680 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
2681
2682 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2683 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2684 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2685 (expand_block_compare): Change select_block_compare_mode call.
2686 (expand_strncmp_align_check): Use new functions, fix comment.
2687 (emit_final_str_compare_gpr): New function.
2688 (expand_strn_compare): Refactor and clean up code.
2689 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2690
2691 2018-06-19 Tony Reix <tony.reix@atos.com>
2692 Damien Bergamini <damien.bergamini@atos.com>
2693 David Edelsohn <dje.gcc@gmail.com>
2694
2695 * collect2.c (static_obj): New variable.
2696 (static_libs): New variable.
2697 (is_in_list): Uncomment declaration.
2698 (main): Track AIX libraries linked statically.
2699 (is_in_list): Uncomment definition.
2700 (scan_prog_file): Don't add AIX shared libraries initializer
2701 to constructor list if linking statically.
2702
2703 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
2704
2705 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2706 constant.
2707 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2708
2709 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
2710
2711 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2712 blocks.
2713
2714 2018-06-19 Martin Liska <mliska@suse.cz>
2715
2716 * config/i386/i386.c (ix86_can_inline_p): Do not use
2717 ipa_fn_summaries::get_create.
2718 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2719 get.
2720 (devirtualization_time_bonus): Likewise.
2721 (ipcp_propagate_stage): Likewise.
2722 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2723 (edge_set_predicate): Likewise.
2724 (evaluate_conditions_for_known_args): Likewise.
2725 (evaluate_properties_for_edge): Likewise.
2726 (ipa_call_summary::reset): Tranform to ...
2727 (ipa_call_summary::~ipa_call_summary): ... this.
2728 (ipa_fn_summary::reset): Transform to ...
2729 (ipa_fn_summary::~ipa_fn_summary): ... this.
2730 (ipa_fn_summary_t::remove): Rename to ...
2731 (ipa_fn_summary_t::remove_callees): ... this.
2732 (ipa_fn_summary_t::duplicate): Use placement new
2733 instead of memory copy.
2734 (ipa_call_summary_t::duplicate): Likewise.
2735 (ipa_call_summary_t::remove): Remove.
2736 (dump_ipa_call_summary): Change get_create to get.
2737 (ipa_dump_fn_summary): Dump only when summary exists.
2738 (analyze_function_body): Use symbol_summary::get instead
2739 of get_create.
2740 (compute_fn_summary): Likewise.
2741 (estimate_edge_devirt_benefit): Likewise.
2742 (estimate_edge_size_and_time): Likewise.
2743 (inline_update_callee_summaries): Likewise.
2744 (remap_edge_change_prob): Likewise.
2745 (remap_edge_summaries): Likewise.
2746 (ipa_merge_fn_summary_after_inlining): Likewise.
2747 (write_ipa_call_summary): Likewise.
2748 (ipa_fn_summary_write): Likewise.
2749 (ipa_free_fn_summary): Likewise.
2750 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2751 (struct ipa_call_summary): Likewise.
2752 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2753 of get_create.
2754 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2755 (estimate_size_after_inlining): Likewise.
2756 (estimate_growth): Likewise.
2757 (growth_likely_positive): Likewise.
2758 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2759 (inline_call): Likewise.
2760 * ipa-inline.c (caller_growth_limits): Likewise.
2761 (can_inline_edge_p): Likewise.
2762 (can_inline_edge_by_limits_p): Likewise.
2763 (compute_uninlined_call_time): Likewise.
2764 (compute_inlined_call_time): Likewise.
2765 (want_inline_small_function_p): Likewise.
2766 (edge_badness): Likewise.
2767 (update_caller_keys): Likewise.
2768 (update_callee_keys): Likewise.
2769 (inline_small_functions): Likewise.
2770 (inline_to_all_callers_1): Likewise.
2771 (dump_overall_stats): Likewise.
2772 (early_inline_small_functions): Likewise.
2773 (early_inliner): Likewise.
2774 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2775 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2776 * ipa-pure-const.c (malloc_candidate_p): Likewise.
2777 * ipa-split.c (execute_split_functions): Likewise.
2778 * symbol-summary.h: Likewise.
2779 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2780
2781 2018-06-19 Richard Biener <rguenther@suse.de>
2782
2783 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2784 (vectorize_loops): ... here. Fix dbgcnt handling.
2785 (try_vectorize_loop): Wrap try_vectorize_loop_1.
2786
2787 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
2788
2789 PR target/86197
2790 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2791 ieee128 argument takes up only one (vector) register, not two (floating
2792 point) registers.
2793
2794 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2795
2796 * gimplify.c (gimplify_init_constructor): Really never clear for an
2797 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2798
2799 2018-06-19 Richard Biener <rguenther@suse.de>
2800
2801 PR tree-optimization/86179
2802 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2803 after failed recognition.
2804
2805 2018-06-18 Martin Sebor <msebor@redhat.com>
2806
2807 PR middle-end/85602
2808 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2809 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2810 Handle integer subtraction.
2811 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2812 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2813
2814 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2815
2816 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2817 param from rtx to rtx_insn *.
2818 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2819 param.
2820 (frv_ifcvt_modify_insn): Likwise.
2821 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2822 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
2823 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2824 as_a <rtx_insn *> cast to local "unprotected_region" once
2825 it's been established that it's not NULL or pc_rtx.
2826 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2827 param "sethi" from rtx to rtx_insn *.
2828 (nds32_group_float_insns): Likewise for param "insn".
2829 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2830 param.
2831 (vax_output_int_subtract): Likewise.
2832 * config/vax/vax.c (vax_output_int_add): Likewise for param
2833 "insn".
2834 (vax_output_int_subtract): Likewise.
2835 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2836 (emit_pattern_after): Likewise for param "after".
2837 (emit_insn_after): Likewise.
2838 (emit_jump_insn_after): Likewise.
2839 (emit_call_insn_after): Likewise.
2840 (emit_debug_insn_after): Likewise.
2841 (emit_pattern_before): Likewise for param "before".
2842 (emit_insn_before): Likewise.
2843 (emit_jump_insn_before): Likewise.
2844 * final.c (get_insn_template): Likewise for param "insn", removing
2845 a cast.
2846 * output.h (get_insn_template): Likewise for 2nd param.
2847 * rtl.h (emit_insn_before): Likewise.
2848 (emit_jump_insn_before): Likewise.
2849 (emit_debug_insn_before_noloc): Likewise.
2850 (emit_insn_after): Likewise.
2851 (emit_jump_insn_after): Likewise.
2852 (emit_call_insn_after): Likewise.
2853 (emit_debug_insn_after): Likewise.
2854 (set_insn_deleted): Likewise for param.
2855
2856 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
2857
2858 PR target/85358
2859 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2860 floating point modes, so that IFmode is numerically greater than
2861 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2862 to declare the ordering. This prevents IFmode from being
2863 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2864 machine. Include rs6000-modes.h to share the fractional values
2865 between genmodes* and the rest of the compiler.
2866 (IFmode): Likewise.
2867 (KFmode): Likewise.
2868 (TFmode): Likewise.
2869 * config/rs6000/rs6000-modes.h: New file.
2870 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2871 meaning of rs6000_long_double_size so that 126..128 selects an
2872 appropriate 128-bit floating point type.
2873 (rs6000_option_override_internal): Likewise.
2874 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2875 (TARGET_LONG_DOUBLE_128): Change the meaning of
2876 rs6000_long_double_size so that 126..128 selects an appropriate
2877 128-bit floating point type.
2878 (LONG_DOUBLE_TYPE_SIZE): Update comment.
2879 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2880 source and destination to match the standard usage.
2881 (truncifkf2): Likewise.
2882 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2883 ISA 2.07 to use an explicit clobber, instead of passing in a
2884 temporary.
2885 (copysign<mode>3_soft): Likewise.
2886
2887 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2888
2889 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2890 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2891 (vect_slp_analyze_instance_dependence): Likewise.
2892 (vect_enhance_data_refs_alignment): Likewise.
2893 (vect_analyze_data_refs_alignment): Likewise.
2894 (vect_slp_analyze_and_verify_instance_alignment
2895 (vect_analyze_data_ref_accesses): Likewise.
2896 (vect_prune_runtime_alias_test_list): Likewise.
2897 (vect_analyze_data_refs): Likewise.
2898 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2899 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2900 (vect_analyze_scalar_cycles_1): Likewise.
2901 (vect_get_loop_niters): Likewise.
2902 (vect_analyze_loop_form_1): Likewise.
2903 (vect_update_vf_for_slp): Likewise.
2904 (vect_analyze_loop_operations): Likewise.
2905 (vect_analyze_loop): Likewise.
2906 (vectorizable_induction): Likewise.
2907 (vect_transform_loop): Likewise.
2908 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2909 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2910 (vect_make_slp_decision): Likewise.
2911 (vect_detect_hybrid_slp): Likewise.
2912 (vect_slp_analyze_operations): Likewise.
2913 (vect_slp_bb): Likewise.
2914 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2915 (vectorizable_bswap): Likewise.
2916 (vectorizable_call): Likewise.
2917 (vectorizable_simd_clone_call): Likewise.
2918 (vectorizable_conversion): Likewise.
2919 (vectorizable_assignment): Likewise.
2920 (vectorizable_shift): Likewise.
2921 (vectorizable_operation): Likewise.
2922 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2923
2924 2018-06-18 Martin Sebor <msebor@redhat.com>
2925
2926 PR tree-optimization/81384
2927 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2928 * builtins.c (expand_builtin_strnlen): New function.
2929 (expand_builtin): Call it.
2930 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2931 * builtins.def (BUILT_IN_STRNLEN): New.
2932 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2933 Warn for bounds in excess of maximum object size.
2934 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2935 single-value ranges. Handle strnlen.
2936 (handle_builtin_strlen): Handle strnlen.
2937 (strlen_check_and_optimize_stmt): Same.
2938 * doc/extend.texi (Other Builtins): Document strnlen.
2939
2940 2018-06-18 Maya Rashish <coypu@sdf.org>
2941
2942 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2943 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2944 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2945
2946 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2947 here to ...
2948 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2949
2950 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2951
2952 * tree.c (escaped_string::escape): Replace cast to char * by
2953 const_cast<char *> (unescaped).
2954
2955 2018-06-18 Nick Clifton <nickc@redhat.com>
2956
2957 PR 84195
2958 * tree.c (escaped_string): New class. Converts an unescaped
2959 string into its escaped equivalent.
2960 (warn_deprecated_use): Use the new class to convert the
2961 deprecation message, if present.
2962 (test_escaped_strings): New self test.
2963 (test_c_tests): Add test_escaped_strings.
2964 * doc/extend.texi (deprecated): Add a note that the
2965 deprecation message is affected by the -fmessage-length
2966 option, and that control characters will be escaped.
2967 (#pragma GCC error): Document this pragma.
2968 (#pragma GCC warning): Likewise.
2969 * doc/invoke.texi (-fmessage-length): Document this option's
2970 effect on the #warning and #error preprocessor directives and
2971 the deprecated attribute.
2972
2973 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
2974
2975 * tree.c (decl_value_expr_lookup): Revert latest change.
2976 (decl_value_expr_insert): Likewise.
2977
2978 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
2979
2980 * gimplify.c (nonlocal_vlas): Delete.
2981 (nonlocal_vla_vars): Likewise.
2982 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2983 referenced VLAs.
2984 (gimplify_body): Do not create and destroy nonlocal_vlas.
2985 * tree-nested.c: Include diagnostic.h.
2986 (use_pointer_in_frame): Tweak.
2987 (lookup_field_for_decl): Add assertion and declare the transformation.
2988 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2989 internal error when the reference is in a wrong context. Do not
2990 create a debug decl by default.
2991 (note_nonlocal_block_vlas): Delete.
2992 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2993 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
2994 create a debug decl by default.
2995 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2996 call is in a wrong context.
2997 (fixup_vla_decls): New function.
2998 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
2999 debug variables were created.
3000 * tree.c (decl_value_expr_lookup): Add checking assertion.
3001 (decl_value_expr_insert): Likewise.
3002
3003 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3004
3005 PR middle-end/82479
3006 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3007 * tree-scalar-evolution.c (interpret_expr): Likewise.
3008 (expression_expensive_p): Likewise.
3009 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3010 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3011 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3012 (ssa_defined_by_minus_one_stmt_p): New.
3013
3014 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3015
3016 PR middle-end/64946
3017 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3018 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3019 * dojump.c (do_jump): Likewise.
3020 * expr.c (expand_expr_real_2): Check operand type's sign.
3021 * fold-const.c (const_unop): Handle ABSU_EXPR.
3022 (fold_abs_const): Likewise.
3023 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3024 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3025 (strip_sign_op_1): Likesise.
3026 * match.pd: Add new pattern to generate ABSU_EXPR.
3027 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3028 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3029 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3030 * tree-inline.c (estimate_operator_cost): Likewise.
3031 * tree-pretty-print.c (dump_generic_node): Likewise.
3032 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3033 * tree.def (ABSU_EXPR): New.
3034
3035 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3036
3037 PR middle-end/86095
3038 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3039 documented as preserved for backward compatibility only.
3040 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3041
3042 PR rtl-optimization/86108
3043 * bb-reorder.c (create_forwarder_block): Renamed to ...
3044 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3045 jump from new landing pad to the second part.
3046 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3047 Adjust callers.
3048
3049 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3050
3051 PR middle-end/85878
3052 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3053 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3054 Only call store_expr for halves if the mode is the same.
3055
3056 PR middle-end/86123
3057 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3058 Fix up comment formatting.
3059
3060 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3061
3062 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3063 (typed_splay_tree::closure,
3064 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3065 (typed_splay_tree::typed_splay_tree,
3066 typed_splay_tree::operator =): Declared private.
3067 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3068 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3069 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3070 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3071 typed_splay_tree::splay_tree_splay,
3072 typed_splay_tree::splay_tree_foreach_helper,
3073 typed_splay_tree::splay_tree_insert,
3074 typed_splay_tree::splay_tree_remove,
3075 typed_splay_tree::splay_tree_lookup,
3076 typed_splay_tree::splay_tree_predecessor,
3077 typed_splay_tree::splay_tree_successor,
3078 typed_splay_tree::splay_tree_min,
3079 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3080 (typed_splay_tree::root, typed_splay_tree::comp,
3081 typed_splay_tree::delete_key,
3082 typed_splay_tree::delete_value): New data members.
3083 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3084 typed_splay_tree::remove.
3085
3086 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3087
3088 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3089 -mginv and -mno-ginv to the assembler.
3090 * config/mips/mips.opt (-mcrc): New option.
3091 (-mginv): Likewise.
3092 * doc/invoke.text (-mcrc): Document.
3093 (-mginv): Likewise.
3094
3095 2018-06-15 Nick Clifton <nickc@redhat.com>
3096
3097 PR 84195
3098 * tree.c (escaped_string): New class. Converts an unescaped
3099 string into its escaped equivalent.
3100 (warn_deprecated_use): Use the new class to convert the
3101 deprecation message, if present.
3102 (test_escaped_strings): New self test.
3103 (test_c_tests): Add test_escaped_strings.
3104 * doc/extend.texi (deprecated): Add a note that the
3105 deprecation message is affected by the -fmessage-length
3106 option, and that control characters will be escaped.
3107 (#pragma GCC error): Document this pragma.
3108 (#pragma GCC warning): Likewise.
3109 * doc/invoke.texi (-fmessage-length): Document this option's
3110 effect on the #warning and #error preprocessor directives and
3111 the deprecated attribute.
3112
3113 2018-06-15 Richard Biener <rguenther@suse.de>
3114
3115 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3116 here, also noting vector size used.
3117 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3118 size used in MSG_OPTIMIZED_LOCATIONS dump.
3119 (pass_slp_vectorize::execute): Adjust.
3120
3121 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3122
3123 PR target/85968
3124 * config/arc/arc.c (arc_return_address_register): Fix
3125 if-condition.
3126
3127 2018-06-15 Richard Biener <rguenther@suse.de>
3128
3129 PR middle-end/86159
3130 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3131 leave useless conversion stripping to force_gimple_operand_gsi.
3132 (gimplify_build2): Likewise.
3133 (gimplify_build1): Likewise.
3134
3135 2018-06-15 Richard Biener <rguenther@suse.de>
3136
3137 PR middle-end/86076
3138 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3139 before adjusting their block.
3140
3141 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3142
3143 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3144 multilibs for *-*-rtems*.
3145 * config/riscv/t-rtems: New file.
3146
3147 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3148
3149 PR middle-end/86122
3150 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3151 unsigned_type_for returns NULL.
3152
3153 PR target/85945
3154 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3155 subregs of multi-word pseudos unless the float mode has word size.
3156
3157 2018-06-14 Richard Biener <rguenther@suse.de>
3158
3159 PR middle-end/86139
3160 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3161 duplicate and harmful type_hash_canon.
3162 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3163
3164 2018-06-14 Richard Biener <rguenther@suse.de>
3165
3166 PR ipa/86124
3167 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3168 NULL cgraph_node.
3169
3170 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3171
3172 * config/rtems.h (STDINT_LONG32): Define.
3173
3174 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3175 Prachi Godbole <prachi.godbole@imgtec.com>
3176
3177 * config/mips/mips-cpus.def: Define P6600.
3178 * config/mips/mips-tables.opt: Regenerate.
3179 * config/mips/mips.c (mips_ucbranch_type): New enum.
3180 (mips_rtx_cost_data): Add support for P6600.
3181 (mips_issue_rate): Likewise.
3182 (mips_multipass_dfa_lookahead): Likewise.
3183 (mips_avoid_hazard): Likewise.
3184 (mips_reorg_process_insns): Likewise.
3185 (mips_classify_branch_p6600): New function.
3186 * config/mips/mips.h (TUNE_P6600): New define.
3187 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3188 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3189 * config/mips/mips.md: Include p6600.md.
3190 (processor): Add p6600.
3191 * config/mips/p6600.md: New file.
3192 * doc/invoke.texi: Add p6600 to supported architectures.
3193
3194 2018-06-13 Martin Sebor <msebor@redhat.com>
3195
3196 PR tree-optimization/86114
3197 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3198 of integer types.
3199 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3200
3201 2018-06-13 Richard Biener <rguenther@suse.de>
3202
3203 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3204 Properly set vector type of the intermediate stmt.
3205 * tree-vect-stmts.c (vectorizable_operation): The destination
3206 var always has vectype_out type.
3207
3208 2018-06-13 Jeff Law <law@redhat.com>
3209
3210 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3211 integer 0 for argument to print_rtl_with_bb.
3212 (rl78_reorg): Likewise.
3213
3214 2018-06-13 David Malcolm <dmalcolm@redhat.com>
3215
3216 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3217 from rtx to rtx_insn *.
3218 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3219 "label".
3220 (add_sched_insns_for_speculation): Likewise for local "target",
3221 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3222 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3223 from rtx_insn ** to rtx_code_label **.
3224 (reorg_emit_nops): Likewise.
3225 (c6x_reorg): Likewise for local "call_labels".
3226 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3227 rtx to rtx_insn *.
3228 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3229 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3230 the loops over LABEL_REFS.
3231 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3232 braf_label.
3233 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3234 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3235 (split_branches): Strengthen local "olabel" from rtx to
3236 rtx_insn *, adding a safe_as_a cast.
3237 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3238 to "rtx_insn *".
3239 (add_insn_after): Likewise for first two params.
3240 (add_insn_before): Likewise.
3241 (remove_insn): Likewise for param.
3242 (emit_pattern_before_noloc): Likewise for second and third params.
3243 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3244 (emit_call_insn_before_noloc): Likewise.
3245 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3246 to "rtx_insn *".
3247 (emit_barrier_before): Likewise.
3248 (emit_label_before): Strengthen "label" param from "rtx" to
3249 "rtx_code_label *". Strengthen "before" param from "rtx" to
3250 "rtx_insn *".
3251 (emit_insn_after_1): Strengthen "after" param from "rtx" to
3252 "rtx_insn *".
3253 (emit_pattern_after_noloc): Likewise.
3254 (emit_insn_after_noloc): Likewise.
3255 (emit_jump_insn_after_noloc): Likewise.
3256 (emit_call_insn_after_noloc): Likewise.
3257 (emit_debug_insn_after_noloc): Likewise.
3258 (emit_barrier_after): Likewise.
3259 (emit_label_after): Likewise for both params.
3260 (emit_pattern_after_setloc): Likewise for "after" param. Convert
3261 "loc" param from "int" to "location_t".
3262 (emit_insn_after_setloc): Likewise.
3263 (emit_jump_insn_after_setloc): Likewise.
3264 (emit_call_insn_after_setloc): Likewise.
3265 (emit_debug_insn_after_setloc): Likewise.
3266 (emit_pattern_before_setloc): Likewise for "before" param. Convert
3267 "loc" param from "int" to "location_t".
3268 (emit_pattern_before): Convert NULL_RTX to NULL.
3269 (emit_insn_before_setloc): Convert "loc" param from "int" to
3270 "location_t".
3271 (emit_jump_insn_before_setloc): Likewise.
3272 (emit_call_insn_before_setloc): Likewise.
3273 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3274 rtx_insn *. Convert "loc" param from "int" to "location_t".
3275 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3276 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3277 Convert 3rd param from "int" to "location_t".
3278 (emit_barrier_before, emit_barrier_after, next_real_insn):
3279 Strengthen param from rtx to rtx_insn *.
3280 (emit_label_before): Strengthen 1st param from "rtx" to
3281 "rtx_code_label *". Strengthen 2nd param from "rtx" to
3282 "rtx_insn *".
3283 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3284 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3285 Strengthen 2nd param from "rtx" to "rtx_insn *".
3286 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3287 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3288 Likewise. Convert 3rd param from "int" to "location_t".
3289 (emit_label_after): Strengthen 1st param from "rtx" to
3290 "rtx_code_label *".
3291 (next_real_insn, remove_insn): Strengthen param from "rtx" to
3292 "rtx_insn *".
3293 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3294 from "rtx" to "rtx_insn *".
3295
3296 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
3297
3298 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3299 bodies streamed in with -Q.
3300 * dumpfile.c (dump_files): Add lto-stream-out dump file.
3301 * dumpfile.h (tree_dump_index): Add lto_stream_out.
3302 * gimple-streamer-out.c: Include gimple-pretty-print.h
3303 (output_bb): Dump stmts streamed.
3304 * lto-section-out.c: Include print-tree.h
3305 (lto_begin_section): Dump sections created.
3306 (lto_output_decl_index): Dump decl encoded.
3307 * lto-streamer-out.c: Include print-tree.h
3308 (create_output_block): Dump output block created.
3309 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3310 (output_function): Dump function output.
3311 (output_constructor): Dump constructor streamed.
3312 (write_global_stream): Output indexes encoded.
3313 (produce_asm_for_decls): Dump streams encoded.
3314 * lto-streamer.c (streamer_dump_file): New global var.
3315 * lto-streamer.h (streamer_dump_file): Declare.
3316 * passes.c (ipa_write_summaries): Initialize streamer dump.
3317 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3318 in.
3319
3320 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
3321
3322 PR target/86048
3323 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3324 offsets for register save directives. Emit a second batch of save
3325 directives, if need be, when the function accesses prior frames.
3326
3327 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3328
3329 * config/arc/fpu.md (fmasf4): Force operand to register.
3330 (fnmasf4): Likewise.
3331
3332 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3333
3334 * config/arc/arc-protos.h (arc_pad_return): Remove.
3335 * config/arc/arc.c (machine_function): Remove force_short_suffix
3336 and size_reason.
3337 (arc_print_operand): Adjust printing of '&'.
3338 (arc_verify_short): Remove conditional printing of short suffix.
3339 (arc_final_prescan_insn): Remove reference to size_reason.
3340 (pad_return): New function.
3341 (arc_reorg): Call pad_return.
3342 (arc_pad_return): Remove.
3343 (arc_init_machine_status): Remove reference to force_short_suffix.
3344 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3345 (attr length): When attribute iscompact is true force to 2
3346 regardless; in the case of maybe check if we want to force the
3347 instruction to have 4 bytes length.
3348 (nopv): Change it to generate 4 byte long nop as well.
3349 (blockage): New pattern.
3350 (simple_return): Remove call to arc_pad_return.
3351 (p_return_i): Likewise.
3352
3353 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3354
3355 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3356
3357 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3358
3359 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3360 ARC cores.
3361
3362 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3363
3364 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3365 for ARC700 and ARCv2.
3366
3367 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
3368
3369 PR target/86076
3370 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3371 operands[2] instead of operands[1].
3372
3373
3374 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3375
3376 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3377 case, check whether the outer register overlaps an unallocatable
3378 register, not just whether it fits the required class.
3379
3380 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3381
3382 * poly-int.h (can_div_trunc_p): Add new overload in which all values
3383 are poly_ints.
3384 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3385 (memrefs_conflict_p): Likewise.
3386 (init_alias_analysis): Likewise.
3387 * cfgexpand.c (expand_debug_expr): Likewise.
3388 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3389 * cse.c (fold_rtx): Likewise.
3390 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3391 * expr.c (emit_block_move_hints): Likewise.
3392 (clear_storage_hints, push_block, emit_push_insn): Likewise.
3393 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3394 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3395 (emit_group_store): Likewise.
3396 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
3397 to read the PRE/POST_MODIFY increment.
3398 * calls.c (store_one_arg): Use strip_offset.
3399 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3400 poly_int_rtx_p.
3401 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3402 by a VEC_SELECT.
3403 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3404 (simplify_binary_operation_1): Extend CONST_INT handling to
3405 poly_int_rtx_p.
3406 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3407 than a HOST_WIDE_INT.
3408 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3409 poly_int64.
3410 (adjust_mems, add_stores): Update accodingly.
3411 (vt_canonicalize_addr): Track polynomial offsets.
3412 (emit_note_insn_var_location): Likewise.
3413 (vt_add_function_parameter): Likewise.
3414 (vt_initialize): Likewise.
3415
3416 2018-06-12 Jeff Law <law@redhat.com>
3417
3418 * config.gcc (alpha*-*-freebsd*): Remove.
3419 * config/alpha/freebsd.h: Remove.
3420
3421 2018-06-12 David Malcolm <dmalcolm@redhat.com>
3422
3423 PR other/69968
3424 * spellcheck-tree.c (levenshtein_distance): Rename to...
3425 (get_edit_distance): ...this, and update for underlying renaming.
3426 * spellcheck-tree.h (levenshtein_distance): Rename to...
3427 (get_edit_distance): ...this.
3428 * spellcheck.c (levenshtein_distance): Rename to...
3429 (get_edit_distance): ...this. Convert from Levenshtein distance
3430 to Damerau-Levenshtein distance by supporting transpositions of
3431 adjacent characters. Rename "v1" to "v_next" and "v0" to
3432 "v_one_ago".
3433 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3434 (selftest::test_edit_distance_unit_test_oneway): ...this, and
3435 update for underlying renaming.
3436 (selftest::levenshtein_distance_unit_test): Rename to...
3437 (selftest::test_get_edit_distance_unit): ...this, and update for
3438 underlying renaming.
3439 (selftest::test_find_closest_string): Add example from PR 69968
3440 where transposition helps
3441 (selftest::test_metric_conditions): Update for renaming.
3442 (selftest::test_metric_conditions): Likewise.
3443 (selftest::spellcheck_c_tests): Likewise.
3444 * spellcheck.h (levenshtein_distance): Rename both overloads to...
3445 (get_edit_distance): ...this.
3446 (best_match::consider): Update for renaming.
3447
3448 2018-06-12 Martin Sebor <msebor@redhat.com>
3449
3450 PR tree-optimization/85259
3451 * builtins.c (compute_objsize): Handle constant offsets.
3452 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
3453 true iff a warning has been issued.
3454 * gimple.h (gimple_nonartificial_location): New function.
3455 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
3456 gimple_nonartificial_location and handle -Wno-system-headers.
3457 (handle_builtin_stxncpy): Same.
3458
3459 2018-06-12 Martin Sebor <msebor@redhat.com>
3460
3461 PR c/85931
3462 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
3463
3464 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
3465
3466 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3467 BUILTIN_VEC_XST entries for pointer to double and long long.
3468
3469 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
3470
3471 PR target/85990
3472 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3473 Update comments.
3474 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3475 Likewise.
3476
3477 2018-06-12 Martin Liska <mliska@suse.cz>
3478
3479 * doc/options.texi: Document IntegerRange.
3480
3481 2018-06-12 Martin Liska <mliska@suse.cz>
3482
3483 * config/i386/i386.opt: Make MPX-related options as Deprecated.
3484 * opt-functions.awk: Handle Deprecated flag.
3485 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
3486 and report error.
3487 (read_cmdline_option): Report warning for a deprecated option.
3488 * opts.h (struct cl_option): Add new field cl_deprecated.
3489 (CL_ERR_DEPRECATED): New.
3490
3491 2018-06-12 Martin Liska <mliska@suse.cz>
3492
3493 * doc/options.texi: Document Deprecated option flag.
3494
3495 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3496
3497 * config/arc/arc-arch.h (arc_extras): New enum.
3498 (arc_cpu_t):Add field extra.
3499 (arc_cpu_types): Consider the extras.
3500 * config/arc/arc-cpus.def: Add extras info.
3501 * config/arc/arc-opts.h (processor_type): Consider extra field.
3502 * config/arc/arc.c (arc_override_options): Handle extra field.
3503
3504 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3505
3506 * config/arc/arc-arch.h: Update ARC_OPTX macro.
3507 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3508 field.
3509 * config/arc/arc.c (arc_init): Update pic warning.
3510 (irq_range): Update irq range parsing warnings.
3511 (arc_override_options): Update various warning messages.
3512 (arc_handle_aux_attribute): Likewise.
3513
3514 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
3515
3516 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3517
3518 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3519
3520 * doc/sourcebuild.texi: Document usage of line number 0 in verify
3521 compiler messages directives.
3522
3523 2018-06-12 Matthew Fortune <mfortune@gmail.com>
3524
3525 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3526 * config/mips/mips-tables.opt: Regenerate.
3527 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3528 mips64r6.
3529 * doc/invoke.texi: Document -march=i6500.
3530
3531 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
3532
3533 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3534 (i6400_gpmul): Add cpu_unit.
3535 (i6400_gpdiv): Likewise.
3536 (i6400_msa_add_d): Update reservations.
3537 (i6400_msa_int_add) Likewise.
3538 (i6400_msa_short_logic3) Likewise.
3539 (i6400_msa_short_logic2) Likewise.
3540 (i6400_msa_short_logic) Likewise.
3541 (i6400_msa_move) Likewise.
3542 (i6400_msa_cmp) Likewise.
3543 (i6400_msa_short_float2) Likewise.
3544 (i6400_msa_div_d) Likewise.
3545 (i6400_msa_long_logic1) Likewise.
3546 (i6400_msa_long_logic2) Likewise.
3547 (i6400_msa_mult) Likewise.
3548 (i6400_msa_long_float2) Likewise.
3549 (i6400_msa_long_float4) Likewise.
3550 (i6400_msa_long_float5) Likewise.
3551 (i6400_msa_long_float8) Likewise.
3552 (i6400_fpu_fadd): Include frint type.
3553 (i6400_fpu_store): New define_insn_reservation.
3554 (i6400_fpu_load): Likewise.
3555 (i6400_fpu_move): Likewise.
3556 (i6400_fpu_fcmp): Likewise.
3557 (i6400_fpu_fmadd): Likewise.
3558 (i6400_int_mult): Include imul3nc type and update reservation.
3559 (i6400_int_div): Include idiv3 type and update reservation.
3560 (i6400_int_load): Update to check type not move_type.
3561 (i6400_int_store): Likewise.
3562 (i6400_int_prefetch): Set zero latency.
3563
3564 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
3565
3566 * gcc.c: Document new %@{...} sequence.
3567 (LINK_COMMAND_SPEC): Use it for the -L switches.
3568 (cpp_unique_options): Use it for the -I switches.
3569 (at_file_argbuf): New global variable.
3570 (in_at_file): Likewise.
3571 (alloc_args): Create at_file_argbuf.
3572 (clear_args): Truncate at_file_argbuf.
3573 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3574 (open_at_file): New function.
3575 (close_at_file): Likewise.
3576 (create_at_file): Delete.
3577 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3578 <'o'>: Likewise.
3579 <'@'>: New case.
3580 (validate_switches_from_spec): Deal with %@{...} sequence.
3581 (validate_switches): Likewise.
3582 (driver::finalize): Call clear_args.
3583
3584 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3585
3586 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3587
3588 2018-06-11 Martin Sebor <msebor@redhat.com>
3589
3590 * doc/invoke.texi (-Wall): List -Wc++17-compat.
3591 (Wno-class-memaccess): Add @opindex.
3592 (Wno-templates, Wno-multiple-inheritance): Same.
3593 (Wno-virtual-inheritance, Wno-namespaces): Same.
3594 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3595 (Wno-format-overflow, Wno-format-truncation): Same.
3596 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3597 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3598 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3599 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3600 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3601 (Wno-misspelled-isr): Same.
3602
3603 2018-06-11 Martin Sebor <msebor@redhat.com>
3604
3605 * PR tree-optimization/86083
3606 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3607
3608 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3609
3610 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3611
3612 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
3613
3614 PR target/85755
3615 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3616 on the correct operand.
3617 (*movdi_internal64): Ditto.
3618
3619 2018-06-11 Martin Liska <mliska@suse.cz>
3620
3621 PR tree-optimization/86089
3622 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3623
3624 2018-06-11 Julia Koval <julia.koval@intel.com>
3625
3626 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3627 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3628 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3629
3630 2018-06-11 Olivier Hainque <hainque@adacore.com>
3631
3632 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3633 for Ada with strict dwarf2.
3634
3635 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
3636
3637 PR target/85755
3638 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3639 addresses.
3640
3641 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
3642
3643 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3644
3645 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3646
3647 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3648 TARGET_ELF.
3649
3650 2018-06-08 Martin Liska <mliska@suse.cz>
3651
3652 * tree-cfg.h (debug_function): Fix argument type to match
3653 implementation.
3654
3655 2018-06-08 Martin Liska <mliska@suse.cz>
3656
3657 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3658 Remove usage of MPX-related (and removed) fields.
3659 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3660
3661 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3662
3663 * cfg.c (debug): Use TDF_NONE rather than 0.
3664 * cfghooks.c (debug): Likewise.
3665 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3666 (struct dump_option_value_info): Convert to...
3667 (struct kv_pair): ...this template type.
3668 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3669 rather than 0.
3670 (optinfo_verbosity_options): Likewise.
3671 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3672 OPTGROUP_NONE.
3673 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3674 than int for "optgroup_flags" param.
3675 (dump_generic_expr_loc): Use dump_flags_t rather than int for
3676 "dump_kind" param.
3677 (dump_dec): Likewise.
3678 (dump_finish): Use TDF_NONE rather than 0.
3679 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3680 rather than int for "optgroup_flags" param. Use TDF_NONE rather
3681 than 0. Update for change to option_ptr.
3682 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3683 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
3684 0. Update for changes to optinfo_verbosity_options and
3685 optgroup_options.
3686 (opt_info_switch_p): Convert optgroup_flags from int to
3687 optgroup_flags_t.
3688 (dump_basic_block): Use dump_flags_t rather than int
3689 for "dump_kind" param.
3690 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3691 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3692 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3693 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3694 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3695 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3696 TDF_NONE): Convert from macros to...
3697 (enum dump_flag): ...this new enum.
3698 (dump_flags_t): Update to use enum.
3699 (operator|, operator&, operator~, operator|=, operator&=):
3700 Implement for dump_flags_t.
3701 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3702 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3703 Convert from macros to...
3704 (enum optgroup_flag): ...this new enum.
3705 (optgroup_flags_t): New typedef.
3706 (operator|, operator|=): Implement for optgroup_flags_t.
3707 (struct dump_file_info): Convert field "alt_flags" to
3708 dump_flags_t. Convert field "optgroup_flags" to
3709 optgroup_flags_t.
3710 (dump_basic_block): Use dump_flags_t rather than int for param.
3711 (dump_generic_expr_loc): Likewise.
3712 (dump_dec): Likewise.
3713 (dump_register): Convert param "optgroup_flags" to
3714 optgroup_flags_t.
3715 (opt_info_enable_passes): Likewise.
3716 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3717 than 0.
3718 * gimple-pretty-print.c (debug): Likewise.
3719 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3720 (merged_store_group::apply_stores): Likewise.
3721 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3722 * gimple.c (verify_gimple_pp): Likewise.
3723 * graphite-poly.c (print_pbb_body): Likewise.
3724 * passes.c (pass_manager::register_one_dump_file): Convert
3725 local "optgroup_flags" to optgroup_flags_t.
3726 * print-tree.c (print_node): Use TDF_NONE rather than 0.
3727 (debug): Likewise.
3728 (debug_body): Likewise.
3729 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3730 to optgroup_flags_t.
3731 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3732 than 0.
3733 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3734 (convert_mult_to_fma): Likewise.
3735 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3736 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3737 * tree-vect-data-refs.c (dump_lower_bound): Convert param
3738 "dump_kind" to dump_flags_t.
3739
3740 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3741
3742 * config/rs6000/rs6000.c (min, max): Delete.
3743
3744 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3745
3746 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3747 -mabi=spe and -mabi=no-spe.
3748
3749 2018-06-08 Martin Liska <mliska@suse.cz>
3750
3751 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3752 where we expect an existing summary.
3753
3754 2018-06-08 Martin Liska <mliska@suse.cz>
3755
3756 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3757 * ipa-inline.h (estimate_edge_growth): Likewise.
3758
3759 2018-06-08 Martin Liska <mliska@suse.cz>
3760
3761 * cgraph.c (function_version_hasher::hash): Use
3762 cgraph_node::get_uid ().
3763 (function_version_hasher::equal):
3764 * cgraph.h (cgraph_node::get_uid): New method.
3765 * ipa-inline.c (update_caller_keys): Use
3766 cgraph_node::get_uid ().
3767 (update_callee_keys): Likewise.
3768 * ipa-utils.c (searchc): Likewise.
3769 (ipa_reduced_postorder): Likewise.
3770 * lto-cgraph.c (input_node): Likewise.
3771 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3772 * symbol-summary.h (symtab_insertion): Likewise.
3773 (symtab_removal): Likewise.
3774 (symtab_duplication): Likewise.
3775 * tree-pretty-print.c (dump_function_header): Likewise.
3776 * tree-sra.c (convert_callers_for_node): Likewise.
3777
3778 2018-06-08 Martin Liska <mliska@suse.cz>
3779
3780 * cgraph.c (symbol_table::create_edge): Always assign a new
3781 unique number.
3782 (symbol_table::free_edge): Do not recycle numbers.
3783 * cgraph.h (cgraph_edge::get): New method.
3784 * symbol-summary.h (symtab_removal): Use it.
3785 (symtab_duplication): Likewise.
3786 (call_summary::hashable_uid): Remove.
3787
3788 2018-06-08 Martin Liska <mliska@suse.cz>
3789
3790 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3791 (initialize_growth_caches): Remove.
3792 (free_growth_caches): Likewise.
3793 (do_estimate_edge_time): Use edge_growth_cache.
3794 (do_estimate_edge_size): Likewise.
3795 (do_estimate_edge_hints): Likewise.
3796 * ipa-inline.c (reset_edge_caches): Likewise.
3797 (recursive_inlining): Likewise.
3798 (inline_small_functions): Likewise.
3799 * ipa-inline.h (initialize_growth_caches): Remove.
3800 (estimate_edge_size): Likewise.
3801 (estimate_edge_time): Likewise.
3802 (estimate_edge_hints): Likewise.
3803 (reset_edge_growth_cache): Likewise.
3804 * symbol-summary.h (call_summary::remove): New method.
3805
3806 2018-06-08 Martin Liska <mliska@suse.cz>
3807
3808 * ipa-cp.c (class edge_clone_summary): New summary.
3809 (grow_edge_clone_vectors): Remove.
3810 (ipcp_edge_duplication_hook): Remove.
3811 (class edge_clone_summary_t): New call_summary class.
3812 (ipcp_edge_removal_hook): Remove.
3813 (edge_clone_summary_t::duplicate): New function.
3814 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3815 (create_specialized_node): Likewise.
3816 (ipcp_driver): Initialize edge_clone_summaries and do not
3817 register hooks.
3818
3819 2018-06-08 Martin Liska <mliska@suse.cz>
3820
3821 * symbol-summary.h (get): New function.
3822 (call_summary::m_initialize_when_cloning): New class member.
3823
3824 2018-06-08 Martin Liska <mliska@suse.cz>
3825
3826 * cgraph.c (cgraph_node::remove): Do not recycle uid.
3827 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3828 (symbol_table::allocate_cgraph_symbol): Do not set uid.
3829 * passes.c (uid_hash_t): Record removed_nodes by their uids.
3830 (remove_cgraph_node_from_order): Use the removed_nodes set.
3831 (do_per_function_toporder): Likwise.
3832 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3833 instead of summary_uid.
3834 (symtab_removal): Likewise.
3835 (symtab_duplication): Likewise.
3836
3837 2018-06-08 Martin Liska <mliska@suse.cz>
3838
3839 * ipa-cp.c (ipcp_store_bits_results): Use
3840 ipcp_transformation_sum.
3841 (ipcp_store_vr_results): Likewise.
3842 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3843 to ...
3844 (ipcp_transformation_initialize): ... this.
3845 (ipa_set_node_agg_value_chain):
3846 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3847 (write_ipcp_transformation_info): Likewise.
3848 (read_ipcp_transformation_info): Likewise.
3849 (ipcp_update_bits): Likewise.
3850 (ipcp_update_vr): Likewise.
3851 (ipcp_transform_function): Likewise.
3852 * ipa-prop.h: Rename ipcp_transformation_summary to
3853 ipcp_transformation.
3854 (class ipcp_transformation_t): New function summary.
3855 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3856 (ipa_get_agg_replacements_for_node): Likewise.
3857
3858 2018-06-08 Martin Liska <mliska@suse.cz>
3859
3860 * ipa-pure-const.c (struct funct_state_d): Do it class instead
3861 of struct.
3862 (class funct_state_summary_t): New function_summary class.
3863 (has_function_state): Remove.
3864 (get_function_state): Likewise.
3865 (set_function_state): Likewise.
3866 (add_new_function): Likewise.
3867 (funct_state_summary_t::insert): New function.
3868 (duplicate_node_data): Remove.
3869 (remove_node_data): Remove.
3870 (funct_state_summary_t::duplicate): New function.
3871 (register_hooks): Create new funct_state_summaries.
3872 (pure_const_generate_summary): Use it.
3873 (pure_const_write_summary): Likewise.
3874 (pure_const_read_summary): Likewise.
3875 (propagate_pure_const): Likewise.
3876 (propagate_nothrow): Likewise.
3877 (dump_malloc_lattice): Likewise.
3878 (propagate_malloc): Likewise.
3879 (execute): Do not register hooks, just remove summary
3880 instead.
3881 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3882 constructor.
3883
3884 2018-06-08 Martin Liska <mliska@suse.cz>
3885
3886 * ipa-reference.c (remove_node_data): Remove.
3887 (duplicate_node_data): Likewise.
3888 (class ipa_ref_var_info_summary_t): New class.
3889 (class ipa_ref_opt_summary_t): Likewise.
3890 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3891 (get_reference_optimization_summary): Use
3892 ipa_ref_opt_sum_summaries.
3893 (set_reference_vars_info): Remove.
3894 (set_reference_optimization_summary): Likewise.
3895 (ipa_init): Create summaries.
3896 (init_function_info): Use function summary.
3897 (ipa_ref_opt_summary_t::duplicate): New function.
3898 (ipa_ref_opt_summary_t::remove): New function.
3899 (get_read_write_all_from_node): Fix GNU coding style.
3900 (propagate): Use function summary.
3901 (write_node_summary_p): Fix GNU coding style.
3902 (stream_out_bitmap): Likewise.
3903 (ipa_reference_read_optimization_summary): Use function summary.
3904 (ipa_reference_c_finalize): Do not release hooks.
3905
3906 2018-06-08 Martin Liska <mliska@suse.cz>
3907
3908 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3909 (analyze_function_body): Extract multiple calls of get_create.
3910 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3911 * ipa-inline.c (recursive_inlining): Use ::get method.
3912 * ipa-inline.h (estimate_edge_growth): Likewise.
3913
3914 2018-06-08 Martin Liska <mliska@suse.cz>
3915
3916 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3917 HSA_INVALID.
3918 (hsa_function_summary::hsa_function_summary): Use the new enum
3919 value.
3920 (hsa_gpu_implementation_p): Use hsa_summaries::get.
3921 * hsa-gen.c (hsa_get_host_function): Likewise.
3922 (get_brig_function_name): Likewise.
3923 * ipa-hsa.c (process_hsa_functions): Likewise.
3924 (ipa_hsa_write_summary): Likewise.
3925 * symbol-summary.h (symtab_duplication): Use ::get function/
3926 (get): New function.
3927
3928 2018-06-08 Martin Liska <mliska@suse.cz>
3929
3930 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3931 of get.
3932 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3933 (hsa_register_kernel): Likewise.
3934 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3935 * hsa-gen.c (hsa_get_host_function): Likewise.
3936 (get_brig_function_name): Likewise.
3937 (generate_hsa): Likewise.
3938 (pass_gen_hsail::execute): Likewise.
3939 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3940 (devirtualization_time_bonus): Likewise.
3941 (ipcp_propagate_stage): Likewise.
3942 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3943 (edge_set_predicate): Likewise.
3944 (evaluate_conditions_for_known_args): Likewise.
3945 (evaluate_properties_for_edge): Likewise.
3946 (ipa_fn_summary::reset): Likewise.
3947 (ipa_fn_summary_t::duplicate): Likewise.
3948 (dump_ipa_call_summary): Likewise.
3949 (ipa_dump_fn_summary): Likewise.
3950 (analyze_function_body): Likewise.
3951 (compute_fn_summary): Likewise.
3952 (estimate_edge_devirt_benefit): Likewise.
3953 (estimate_edge_size_and_time): Likewise.
3954 (estimate_calls_size_and_time): Likewise.
3955 (estimate_node_size_and_time): Likewise.
3956 (inline_update_callee_summaries): Likewise.
3957 (remap_edge_change_prob): Likewise.
3958 (remap_edge_summaries): Likewise.
3959 (ipa_merge_fn_summary_after_inlining): Likewise.
3960 (ipa_update_overall_fn_summary): Likewise.
3961 (read_ipa_call_summary): Likewise.
3962 (inline_read_section): Likewise.
3963 (write_ipa_call_summary): Likewise.
3964 (ipa_fn_summary_write): Likewise.
3965 (ipa_free_fn_summary): Likewise.
3966 * ipa-hsa.c (process_hsa_functions): Likewise.
3967 (ipa_hsa_write_summary): Likewise.
3968 (ipa_hsa_read_section): Likewise.
3969 * ipa-icf.c (sem_function::merge): Likewise.
3970 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3971 (do_estimate_edge_time): Likewise.
3972 (estimate_size_after_inlining): Likewise.
3973 (estimate_growth): Likewise.
3974 (growth_likely_positive): Likewise.
3975 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3976 (inline_call): Likewise.
3977 * ipa-inline.c (caller_growth_limits): Likewise.
3978 (can_inline_edge_p): Likewise.
3979 (can_inline_edge_by_limits_p): Likewise.
3980 (compute_uninlined_call_time): Likewise.
3981 (compute_inlined_call_time): Likewise.
3982 (want_inline_small_function_p): Likewise.
3983 (edge_badness): Likewise.
3984 (update_caller_keys): Likewise.
3985 (update_callee_keys): Likewise.
3986 (recursive_inlining): Likewise.
3987 (inline_small_functions): Likewise.
3988 (inline_to_all_callers_1): Likewise.
3989 (dump_overall_stats): Likewise.
3990 (early_inline_small_functions): Likewise.
3991 (early_inliner): Likewise.
3992 * ipa-inline.h (estimate_edge_growth): Likewise.
3993 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3994 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3995 * ipa-prop.h (IPA_NODE_REF): Likewise.
3996 (IPA_EDGE_REF): Likewise.
3997 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3998 (propagate_malloc): Likewise.
3999 * ipa-split.c (execute_split_functions): Likewise.
4000 * symbol-summary.h: Rename get to get_create.
4001 (get): Likewise.
4002 (get_create): Likewise.
4003 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4004
4005 2018-06-08 Martin Liska <mliska@suse.cz>
4006
4007 * symbol-summary.h (release): Move definition out of class
4008 declaration.
4009 (symtab_removal): Likewise.
4010 (symtab_duplication): Likewise.
4011
4012 2018-06-08 Martin Liska <mliska@suse.cz>
4013
4014 * symbol-summary.h (function_summary): Move constructor
4015 implementation out of class declaration.
4016 (release): Likewise.
4017 (symtab_insertion): Likewise.
4018 (symtab_removal): Likewise.
4019 (symtab_duplication): Likewise.
4020 (get): Likewise.
4021
4022 2018-06-08 Martin Liska <mliska@suse.cz>
4023
4024 * Makefile.in: Remove support for MPX (macros, related functions,
4025 fields in cgraph_node, ...).
4026 * builtin-types.def (BT_BND): Likewise.
4027 (BT_FN_BND_CONST_PTR): Likewise.
4028 (BT_FN_CONST_PTR_BND): Likewise.
4029 (BT_FN_VOID_PTR_BND): Likewise.
4030 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4031 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4032 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4033 (expand_builtin_mempcpy_with_bounds): Likewise.
4034 (expand_builtin_memset_with_bounds): Likewise.
4035 (expand_builtin_memset_args): Likewise.
4036 (std_expand_builtin_va_start): Likewise.
4037 (expand_builtin): Likewise.
4038 (expand_builtin_with_bounds): Likewise.
4039 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4040 (DEF_LIB_BUILTIN_CHKP): Likewise.
4041 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4042 (DEF_CHKP_BUILTIN): Likewise.
4043 (BUILT_IN_MEMCPY): Likewise.
4044 (BUILT_IN_MEMMOVE): Likewise.
4045 (BUILT_IN_MEMPCPY): Likewise.
4046 (BUILT_IN_MEMSET): Likewise.
4047 (BUILT_IN_STPCPY): Likewise.
4048 (BUILT_IN_STRCAT): Likewise.
4049 (BUILT_IN_STRCHR): Likewise.
4050 (BUILT_IN_STRCPY): Likewise.
4051 (BUILT_IN_STRLEN): Likewise.
4052 (BUILT_IN_MEMCPY_CHK): Likewise.
4053 (BUILT_IN_MEMMOVE_CHK): Likewise.
4054 (BUILT_IN_MEMPCPY_CHK): Likewise.
4055 (BUILT_IN_MEMSET_CHK): Likewise.
4056 (BUILT_IN_STPCPY_CHK): Likewise.
4057 (BUILT_IN_STRCAT_CHK): Likewise.
4058 (BUILT_IN_STRCPY_CHK): Likewise.
4059 * calls.c (store_bounds): Likewise.
4060 (emit_call_1): Likewise.
4061 (special_function_p): Likewise.
4062 (maybe_warn_nonstring_arg): Likewise.
4063 (initialize_argument_information): Likewise.
4064 (finalize_must_preallocate): Likewise.
4065 (compute_argument_addresses): Likewise.
4066 (expand_call): Likewise.
4067 * cfgexpand.c (expand_call_stmt): Likewise.
4068 (expand_return): Likewise.
4069 (expand_gimple_stmt_1): Likewise.
4070 (pass_expand::execute): Likewise.
4071 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4072 (cgraph_node::remove): Likewise.
4073 (cgraph_node::dump): Likewise.
4074 (cgraph_node::verify_node): Likewise.
4075 * cgraph.h (chkp_function_instrumented_p): Likewise.
4076 (symtab_node::get_alias_target): Likewise.
4077 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4078 (cgraph_local_p): Likewise.
4079 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4080 (cgraph_edge::rebuild_references): Likewise.
4081 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4082 (walk_polymorphic_call_targets): Likewise.
4083 (cgraph_node::expand_thunk): Likewise.
4084 (symbol_table::output_weakrefs): Likewise.
4085 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4086 (ix86_handle_option): Likewise.
4087 * config/i386/constraints.md: Likewise.
4088 * config/i386/i386-builtin-types.def (BND): Likewise.
4089 (VOID): Likewise.
4090 (PVOID): Likewise.
4091 (ULONG): Likewise.
4092 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4093 (BDESC_FIRST): Likewise.
4094 (BDESC): Likewise.
4095 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4096 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4097 * config/i386/i386.c (enum reg_class): Likewise.
4098 (ix86_target_string): Likewise.
4099 (ix86_option_override_internal): Likewise.
4100 (ix86_conditional_register_usage): Likewise.
4101 (ix86_valid_target_attribute_inner_p): Likewise.
4102 (ix86_set_indirect_branch_type): Likewise.
4103 (ix86_set_current_function): Likewise.
4104 (ix86_function_arg_regno_p): Likewise.
4105 (init_cumulative_args): Likewise.
4106 (ix86_function_arg_advance): Likewise.
4107 (ix86_function_arg): Likewise.
4108 (ix86_pass_by_reference): Likewise.
4109 (ix86_function_value_regno_p): Likewise.
4110 (ix86_function_value_1): Likewise.
4111 (ix86_function_value_bounds): Likewise.
4112 (ix86_return_in_memory): Likewise.
4113 (ix86_setup_incoming_vararg_bounds): Likewise.
4114 (ix86_va_start): Likewise.
4115 (indirect_thunk_need_prefix): Likewise.
4116 (print_reg): Likewise.
4117 (ix86_print_operand): Likewise.
4118 (ix86_expand_call): Likewise.
4119 (ix86_output_function_return): Likewise.
4120 (reg_encoded_number): Likewise.
4121 (BDESC_VERIFYS): Likewise.
4122 (ix86_init_mpx_builtins): Likewise.
4123 (ix86_init_builtins): Likewise.
4124 (ix86_emit_cmove): Likewise.
4125 (ix86_emit_move_max): Likewise.
4126 (ix86_expand_builtin): Likewise.
4127 (ix86_builtin_mpx_function): Likewise.
4128 (ix86_get_arg_address_for_bt): Likewise.
4129 (ix86_load_bounds): Likewise.
4130 (ix86_store_bounds): Likewise.
4131 (ix86_load_returned_bounds): Likewise.
4132 (ix86_store_returned_bounds): Likewise.
4133 (ix86_class_likely_spilled_p): Likewise.
4134 (ix86_hard_regno_mode_ok): Likewise.
4135 (x86_order_regs_for_local_alloc): Likewise.
4136 (ix86_mitigate_rop): Likewise.
4137 (ix86_bnd_prefixed_insn_p): Likewise.
4138 (ix86_mpx_bound_mode): Likewise.
4139 (ix86_make_bounds_constant): Likewise.
4140 (ix86_initialize_bounds): Likewise.
4141 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4142 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4143 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4144 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4145 (TARGET_CHKP_BOUND_MODE): Likewise.
4146 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4147 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4148 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4149 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4150 * config/i386/i386.h (TARGET_MPX): Likewise.
4151 (TARGET_MPX_P): Likewise.
4152 (VALID_BND_REG_MODE): Likewise.
4153 (FIRST_BND_REG): Likewise.
4154 (LAST_BND_REG): Likewise.
4155 (enum reg_class): Likewise.
4156 (BND_REG_P): Likewise.
4157 (BND_REGNO_P): Likewise.
4158 (BNDmode): Likewise.
4159 (ADJUST_INSN_LENGTH): Likewise.
4160 * config/i386/i386.md: Likewise.
4161 * config/i386/i386.opt: Likewise.
4162 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4163 (defined): Likewise.
4164 (LINK_MPX): Likewise.
4165 (MPX_SPEC): Likewise.
4166 (LIBMPX_SPEC): Likewise.
4167 (LIBMPXWRAPPERS_SPEC): Likewise.
4168 (CHKP_SPEC): Likewise.
4169 * config/i386/predicates.md: Likewise.
4170 * dbxout.c (dbxout_type): Likewise.
4171 * doc/extend.texi: Likewise.
4172 * doc/invoke.texi: Likewise.
4173 * doc/md.texi: Likewise.
4174 * doc/tm.texi: Likewise.
4175 * doc/tm.texi.in: Likewise.
4176 * dwarf2out.c (is_base_type): Likewise.
4177 (gen_formal_types_die): Likewise.
4178 (gen_subprogram_die): Likewise.
4179 (gen_type_die_with_usage): Likewise.
4180 (gen_decl_die): Likewise.
4181 (dwarf2out_late_global_decl): Likewise.
4182 * expr.c (expand_assignment): Likewise.
4183 (emit_storent_insn): Likewise.
4184 (store_expr_with_bounds): Likewise.
4185 (store_expr): Likewise.
4186 (expand_expr_real_1): Likewise.
4187 * expr.h (store_expr_with_bounds): Likewise.
4188 * function.c (use_register_for_decl): Likewise.
4189 (struct bounds_parm_data): Likewise.
4190 (assign_parms_augmented_arg_list): Likewise.
4191 (assign_parm_find_entry_rtl): Likewise.
4192 (assign_parm_is_stack_parm): Likewise.
4193 (assign_parm_load_bounds): Likewise.
4194 (assign_bounds): Likewise.
4195 (assign_parms): Likewise.
4196 (expand_function_start): Likewise.
4197 * gcc.c (CHKP_SPEC): Likewise.
4198 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4199 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4200 (wrestrict_dom_walker::check_call): Likewise.
4201 * gimple.c (gimple_build_call_from_tree): Likewise.
4202 * gimple.h (enum gf_mask): Likewise.
4203 (gimple_call_with_bounds_p): Likewise.
4204 (gimple_call_set_with_bounds): Likewise.
4205 * gimplify.c (gimplify_init_constructor): Likewise.
4206 * ipa-cp.c (initialize_node_lattices): Likewise.
4207 (propagate_constants_across_call): Likewise.
4208 (find_more_scalar_values_for_callers_subset): Likewise.
4209 * ipa-hsa.c (process_hsa_functions): Likewise.
4210 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4211 * ipa-icf.c (sem_function::merge): Likewise.
4212 * ipa-inline.c (early_inliner): Likewise.
4213 * ipa-pure-const.c (warn_function_noreturn): Likewise.
4214 (warn_function_cold): Likewise.
4215 (propagate_pure_const): Likewise.
4216 * ipa-ref.h (enum GTY): Likewise.
4217 * ipa-split.c (find_retbnd): Likewise.
4218 (consider_split): Likewise.
4219 (split_function): Likewise.
4220 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4221 * ipa.c (walk_polymorphic_call_targets): Likewise.
4222 (symbol_table::remove_unreachable_nodes): Likewise.
4223 (process_references): Likewise.
4224 (cgraph_build_static_cdtor_1): Likewise.
4225 * lto-cgraph.c (lto_output_node): Likewise.
4226 (output_refs): Likewise.
4227 (compute_ltrans_boundary): Likewise.
4228 (input_overwrite_node): Likewise.
4229 (input_node): Likewise.
4230 (input_cgraph_1): Likewise.
4231 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4232 * passes.c (pass_manager::execute_early_local_passes): Likewise.
4233 (class pass_chkp_instrumentation_passes): Likewise.
4234 (make_pass_chkp_instrumentation_passes): Likewise.
4235 * passes.def: Likewise.
4236 * rtl.h (struct GTY): Likewise.
4237 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4238 * stor-layout.c (layout_type): Likewise.
4239 * symtab.c: Likewise.
4240 * target.def: Likewise.
4241 * targhooks.c (default_chkp_bound_type): Likewise.
4242 (default_chkp_bound_mode): Likewise.
4243 (default_builtin_chkp_function): Likewise.
4244 (default_chkp_function_value_bounds): Likewise.
4245 (default_chkp_make_bounds_constant): Likewise.
4246 (default_chkp_initialize_bounds): Likewise.
4247 * targhooks.h (default_chkp_bound_type): Likewise.
4248 (default_chkp_bound_mode): Likewise.
4249 (default_builtin_chkp_function): Likewise.
4250 (default_chkp_function_value_bounds): Likewise.
4251 (default_chkp_make_bounds_constant): Likewise.
4252 (default_chkp_initialize_bounds): Likewise.
4253 * toplev.c (compile_file): Likewise.
4254 (process_options): Likewise.
4255 * tree-core.h (DEF_BUILTIN): Likewise.
4256 (DEF_BUILTIN_CHKP): Likewise.
4257 * tree-inline.c (declare_return_variable): Likewise.
4258 (remap_gimple_stmt): Likewise.
4259 (copy_bb): Likewise.
4260 (initialize_inlined_parameters): Likewise.
4261 (expand_call_inline): Likewise.
4262 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4263 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4264 (make_pass_ipa_chkp_produce_thunks): Likewise.
4265 (make_pass_chkp): Likewise.
4266 (make_pass_chkp_opt): Likewise.
4267 (make_pass_chkp_instrumentation_passes): Likewise.
4268 * tree-pretty-print.c (dump_generic_node): Likewise.
4269 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4270 * tree-ssa-dce.c (propagate_necessity): Likewise.
4271 (eliminate_unnecessary_stmts): Likewise.
4272 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4273 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4274 * tree-ssa-sccvn.h: Likewise.
4275 * tree-ssa-strlen.c (get_string_length): Likewise.
4276 (valid_builtin_call): Likewise.
4277 (adjust_last_stmt): Likewise.
4278 (handle_builtin_strchr): Likewise.
4279 (handle_builtin_strcpy): Likewise.
4280 (handle_builtin_stxncpy): Likewise.
4281 (handle_builtin_memcpy): Likewise.
4282 (handle_builtin_strcat): Likewise.
4283 (strlen_check_and_optimize_stmt): Likewise.
4284 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4285 * tree-streamer-in.c: Likewise.
4286 * tree-streamer.c (record_common_node): Likewise.
4287 * tree.c (tree_code_size): Likewise.
4288 (wide_int_to_tree_1): Likewise.
4289 (type_contains_placeholder_1): Likewise.
4290 (build_common_tree_nodes): Likewise.
4291 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4292 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4293 (POINTER_BOUNDS_P): Likewise.
4294 (BOUNDED_TYPE_P): Likewise.
4295 (BOUNDED_P): Likewise.
4296 (CALL_WITH_BOUNDS_P): Likewise.
4297 (pointer_bounds_type_node): Likewise.
4298 * value-prof.c (gimple_ic): Likewise.
4299 * var-tracking.c (vt_add_function_parameters): Likewise.
4300 * varasm.c (make_decl_rtl): Likewise.
4301 (assemble_start_function): Likewise.
4302 (output_constant): Likewise.
4303 (maybe_assemble_visibility): Likewise.
4304 * varpool.c (ctor_for_folding): Likewise.
4305 * chkp-builtins.def: Remove.
4306 * ipa-chkp.c: Remove.
4307 * ipa-chkp.h: Remove.
4308 * rtl-chkp.c: Remove.
4309 * rtl-chkp.h: Remove.
4310 * tree-chkp-opt.c: Remove.
4311 * tree-chkp.c: Remove.
4312 * tree-chkp.h: Remove.
4313
4314 2018-06-07 Carl Love <cel@us.ibm.com>
4315
4316 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4317 vextract_fp_from_shortl): Add BE support.
4318
4319 2018-06-07 Paul Koning <ni1d@arrl.net>
4320
4321 * compare-elim.c (try_merge_compare): Don't merge compare if
4322 address contains a side effect.
4323 (try_eliminate_compare): Likewise.
4324
4325 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
4326
4327 * config.gcc: Support "tremont".
4328 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4329 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4330 PROCESSOR_TREMONT.
4331 * config/i386/i386.c (m_TREMONT): Define.
4332 (processor_target_table): Add "tremont".
4333 (PTA_TREMONT): Define.
4334 (ix86_lea_outperforms): Add TARGET_TREMONT.
4335 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4336 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4337 and M_INTEL_GOLDMONT_PLUS.
4338 (fold_builtin_cpu): Add "tremont".
4339 (ix86_add_stmt_cost): Add TARGET_TREMONT.
4340 (ix86_option_override_internal): Add "tremont".
4341 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4342 (processor_type): Add PROCESSOR_TREMONT.
4343 * config/i386/x86-tune.def: Add m_TREMONT.
4344 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4345
4346 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4347
4348 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4349 symbol defined for msp430i* devices to be lower case.
4350
4351 gcc/testsuite/gcc.target/msp430/
4352 * msp430i-device-symbol.c: New test.
4353 * msp430f-device-symbol.c: New test.
4354 * msp430.h: New test header file.
4355
4356 2018-06-07 Richard Biener <rguenther@suse.de>
4357
4358 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4359 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
4360 Properly wrap signed arithmetic if overflow wraps.
4361
4362 2018-06-07 Jakub Jelinek <jakub@redhat.com>
4363
4364 PR tree-optimization/69615
4365 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4366 of a cast from a same precision integral SSA_NAME in a bb dominated
4367 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
4368 cast to utype if rhs2 has already a compatible type.
4369
4370 2018-06-07 Richard Biener <rguenther@suse.de>
4371
4372 PR tree-optimization/85935
4373 * graphite-scop-detection.c (find_params_in_bb): Analyze
4374 condition operands with respect to the correct loop. Assert
4375 the analysis doesn't fail.
4376
4377 2018-06-04 Carl Love <cel@us.ibm.com>
4378
4379 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4380 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
4381 as it is slightly cheaper.
4382 (first_match_or_eos_index_<mode>):
4383 Calculate index using natural element order.
4384 (first_match_index_<mode>):
4385 Calculate index using natural element order.
4386 (first_match_or_eos_index_<mode>):
4387 Calculate index using natural order.
4388 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4389 for BE and LE modes.
4390 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4391 P9V_BUILTIN_VCLZLSBB_V16QI.
4392 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4393 specific.
4394
4395 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4396
4397 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4398 indentation and line wrap for many prototypes. Add missing
4399 @smallexample directives around block of prototypes for vec_xl and
4400 vec_xst.
4401
4402 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
4403
4404 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4405 track if we pass or return IEEE 128-bit floating point.
4406 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4407 C++ mangling that is compatible with GCC 8.1.
4408 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4409 (init_cumulative_args): Note if we pass or return IEEE 128-bit
4410 floating point types.
4411 (rs6000_function_arg_advance_1): Likewise.
4412 (rs6000_mangle_type): Optionally generate mangled names that match
4413 what GCC 8.1 generated for IEEE 128-bit floating point types.
4414 (rs6000_globalize_decl_name): If we have an external function that
4415 passes or returns IEEE 128-bit types, generate a weak reference
4416 from the mangled name used in GCC 8.1 to the current mangled
4417 name.
4418 (rs6000_init_builtins): Make __ibm128 use the long double type if
4419 long double is IBM extended double. Make __float128 use the long
4420 double type if long double is IEEE 128-bit.
4421
4422 PR target/85657
4423 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4424 macro for __ibm128 built-in functions.
4425 (PACK_IF): Add __ibm128 pack/unpack functions.
4426 (UNPACK_IF): Likewise.
4427 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4428 enable long double built-in functions if long double is IEEE
4429 128-bit floating point.
4430 (rs6000_invalid_builtin): Update long double built-in function
4431 error message.
4432 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4433 functions, adjust the built-in function to use the long double
4434 built-in function if __ibm128 and long double are the same type.
4435 * doc/extend.texi (PowerPC builtins): Update documention for
4436 __builtin_{,un}pack_longdouble. Add documentation for
4437 __builtin_{,un}pack_ibm128.
4438
4439 2018-06-06 Jim Wilson <jimw@sifive.com>
4440
4441 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4442 (struct machine_function): New field interrupt_mode.
4443 (riscv_handle_type_attribute): New function. Add forward declaration.
4444 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4445 (riscv_expand_epilogue): Check interrupt_mode field.
4446 (riscv_set_current_function): Check interrupt attribute args and
4447 set interrupt_mode field.
4448 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4449 (riscv_sret, riscv_uret): New.
4450 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4451 new arguments to interrupt attribute.
4452
4453 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
4454
4455 PR target/63177
4456 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4457 Don't handle -mcpu=power8 if -mpower9-vector is also used.
4458
4459 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4460
4461 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4462 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
4463 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4464 several redundant entries.
4465
4466 2018-06-06 David Malcolm <dmalcolm@redhat.com>
4467
4468 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
4469 type from "rtx" to "rtx_insn *".
4470 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
4471 for local "call_insn", removing cast.
4472 (ix86_expand_call): Likewise, introducing a "call_insn" local.
4473
4474 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
4475
4476 PR tree-optimization/86066
4477 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
4478 for BIT_INSERT_EXPR stores.
4479
4480 2018-06-06 Richard Biener <rguenther@suse.de>
4481
4482 PR tree-optimization/86062
4483 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4484 component refs ontop
4485 of to be offsetted base.
4486
4487 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4488
4489 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
4490 to be static and remove check on interrupt attribute name.
4491
4492 gcc/testsuite/gcc.target/msp430/
4493 * function-attributes-4.c: New test.
4494 * static-interrupts.c: New test.
4495
4496 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
4497
4498 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4499 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4500
4501 2018-06-05 Steve Ellcey <sellcey@cavium.com>
4502
4503 PR target/79924
4504 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4505 second argument.
4506 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4507 Remove second argument, change how error is called.
4508 (aarch64_layout_arg): Remove second argument from
4509 aarch64_err_no_fpadvsimd call.
4510 (aarch64_init_cumulative_args): Ditto.
4511 (aarch64_gimplify_va_arg_expr): Ditto.
4512 * config/aarch64/aarch64.md (mov<mode>): Ditto.
4513
4514 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
4515
4516 * config/i386/i386.md (simple_return_indirect_internal): New expander.
4517 (*simple_return_indirect_internal<mode>): Rename from
4518 simple_return_indirect_internal. Use W mode iterator.
4519 (rstorssp): New expander.
4520 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
4521 (clrssbsy): New expander.
4522 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
4523
4524 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
4525
4526 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4527 __typeof__.
4528 (cmse_check_pointed_object): Likewise.
4529
4530 2018-06-05 Martin Liska <mliska@suse.cz>
4531
4532 PR gcov-profile/47618
4533 * doc/invoke.texi: Document how -fprofile-dir format
4534 is extended.
4535
4536 2018-06-05 Richard Biener <rguenther@suse.de>
4537
4538 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4539 removal pretend DOM info isn't available so we do not update
4540 it and only remove edges, not dominated blocks. Actually free
4541 DOM info in case we removed something. Remove unreachable blocks.
4542 (mfb_keep_latches): Work with either DOM info or marked backedges.
4543 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4544 first. Mark backedges if DOM info isn't available.
4545 (Re-)compute DOM info after cleanup_control_flow_pre.
4546
4547 2018-06-05 Richard Biener <rguenther@suse.de>
4548
4549 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4550 (locus_discrim_hasher::hash): Adjust.
4551 (locus_discrim_hasher::equal): Likewise.
4552 (next_discriminator_for_locus): Work on line directly.
4553 (same_line_p): Pass in expanded locus1 as well.
4554 (assign_discriminators): Avoid redundant location expansions.
4555
4556 2018-06-05 Richard Biener <rguenther@suse.de>
4557
4558 PR tree-optimization/86046
4559 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4560 if required after clearing TREE_ADDRESSABLE.
4561
4562 2018-06-05 Richard Biener <rguenther@suse.de>
4563
4564 PR tree-optimization/86047
4565 * tree-ssa-loop.c (for_each_index): Glob handling of all
4566 decls and constants and really handle all of them.
4567
4568 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4569
4570 PR target/81497
4571 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4572 qualifier_void_pointer and qualifier_const_void_pointer.
4573 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4574 (arm_init_builtins): Handle the above.
4575 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4576 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4577 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4578 void intrinsics.
4579
4580 2018-06-05 Martin Liska <mliska@suse.cz>
4581
4582 * auto-profile.c (read_autofdo_file): Do not use
4583 gcov_ctr_summary struct.
4584 (afdo_callsite_hot_enough_for_early_inline): Likewise.
4585 * coverage.c (struct counts_entry): Likewise.
4586 (read_counts_file): Read just single summary entry.
4587 (get_coverage_counts): Use gcov_summary struct.
4588 * coverage.h (get_coverage_counts): Likewise.
4589 * gcov-dump.c (dump_working_sets): Likewise.
4590 (tag_summary): Dump just single summary.
4591 * gcov-io.c (gcov_write_summary): Write just histogram
4592 summary.
4593 (gcov_read_summary): Read just single summary.
4594 (compute_working_sets): Use gcov_summary struct.
4595 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4596 of GCOV_COUNTERS_SUMMABLE.
4597 (GCOV_COUNTERS_SUMMABLE): Remove.
4598 (GCOV_FIRST_VALUE_COUNTER): Replace with
4599 GCOV_COUNTER_V_INTERVAL.
4600 (struct gcov_ctr_summary): Remove.
4601 (struct gcov_summary): Directly use fields of former
4602 gcov_ctr_summary.
4603 (compute_working_sets): Use gcov_summary struct.
4604 * gcov.c (read_count_file): Do not use ctrs fields.
4605 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4606 struct.
4607 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4608 struct.
4609 * profile.c: Likewise.
4610 * profile.h: Likewise.
4611
4612 2018-06-05 Martin Liska <mliska@suse.cz>
4613
4614 PR gcov-profile/84846
4615 * gcov.c (output_lines): Print working directory only
4616 in intermediate format.
4617
4618 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4619
4620 * config/s390/s390-builtin-types.def: Add void function type.
4621 * config/s390/s390-builtins.def: Use the function type for the
4622 tbeginc builtin.
4623
4624 2018-06-04 Jim Wilson <jimw@sifive.com>
4625
4626 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4627 to int.
4628 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4629 and maybe_eh_return. Change regno to unsigned int. Use new args to
4630 handle EH_RETURN_DATA_REGNO registers properly.
4631 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4632 (riscv_expand_epilogue): Update comment. Change argument name and
4633 type. Update code to use new name and type. Pass new args to
4634 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
4635 EXCEPTION_RETURN.
4636 * config/riscv/riscv.md (NORMAL_RETURN): New.
4637 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4638 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4639 (eh_return): Call gen_eh_return_internal and emit barrier.
4640 (eh_return_internal): Call riscv_expand_epilogue.
4641
4642 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
4643
4644 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4645 bit_insertion field and declare can_be_merged_into method.
4646 (merged_store_group::can_be_merged_into): New method.
4647 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4648 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
4649 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4650
4651 2018-06-04 Richard Biener <rguenther@suse.de>
4652
4653 PR tree-optimization/85955
4654 * builtins.c (fold_builtin_sincos): Convert pointers to
4655 destination to appropriate type before dereferencing.
4656
4657 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
4658
4659 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4660
4661 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
4662
4663 * expr.c (expand_expr_real_1): Force the operand into memory if
4664 its TYPE_MODE is BLKmode and if there is no integer mode for
4665 the number of bits being extracted.
4666
4667 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4668
4669 PR target/85832
4670 PR target/86036
4671 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4672 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4673
4674 2018-06-04 Richard Biener <rguenther@suse.de>
4675
4676 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4677 (cleanup_tree_cfg_noloop): ... single caller. Do
4678 start_recording_case_labels later.
4679
4680 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
4681
4682 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4683 to _IMMINTRIN_H_INCLUDED.
4684 * config/i386/pconfigintrin.h: Ditto.
4685 * config/i386/waitpkgintrin.h: Ditto.
4686 * config/i386/immintrin.h: Add includes for sgxintrin.h,
4687 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4688 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4689 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4690 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4691 waitpkgintrin.h and cldemoteintrin.h.
4692
4693 2018-06-04 Richard Biener <rguenther@suse.de>
4694
4695 PR tree-optimization/86038
4696 * tracer.c (find_best_successor): Check probability for
4697 being initialized, bail out if not.
4698
4699 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4700
4701 PR target/86003
4702 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4703 of bits to ignore when comparing architectures.
4704
4705 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4706
4707 PR tree-optimization/69615
4708 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4709 maximum or minimum of the type, try to merge it also as if
4710 range1 is + [-, x - 1] or + [x + 1, -].
4711
4712 PR c++/86025
4713 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4714
4715 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
4716
4717 PR tree-optimization/86034
4718 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4719 the unsigned bitfield type in a bit insertion sequence if it does not
4720 have a larger precision than the bitfield size.
4721 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4722
4723 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
4724
4725 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4726
4727 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4728
4729 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4730 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4731 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4732 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4733
4734 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4735
4736 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4737 Disable -fdelete-null-pointer-checks for ELF toolchain.
4738
4739 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4740 Kito Cheng <kito.cheng@gmail.com>
4741
4742 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4743 (nds32le-*-*, nds32be-*-*): Integrate checking process.
4744 (nds32*-*-*): Add glibc and uclibc conditions.
4745 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4746 (TARGET_EXCEPT_UNWIND_INFO): Define.
4747 * config/nds32/elf.h: New file.
4748 * config/nds32/linux.h: New file.
4749 * config/nds32/nds32-elf.opt: New file.
4750 * config/nds32/nds32-linux.opt: New file.
4751 * config/nds32/nds32-fp-as-gp.c
4752 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4753 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4754 TARGET_LINUX_ABI.
4755 (nds32_asm_file_end): Ditto.
4756 (nds32_print_operand): Ditto.
4757 (nds32_insert_attributes): Ditto.
4758 (nds32_init_libfuncs): New function.
4759 (TARGET_HAVE_TLS): Define.
4760 (TARGET_INIT_LIBFUNCS): Define.
4761 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4762 spec content.
4763 (TARGET_ELF): Apply different mcmodel setting.
4764 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4765 been migrated into elf.h and linux.h files.
4766 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4767 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4768 (mcmodel): The content has been migrated into nds32-elf.opt and
4769 nds32-linux.opt files.
4770 * config/nds32/t-elf: New file.
4771 * config/nds32/t-linux: New file.
4772
4773 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4774 Shiva Chen <shiva0217@gmail.com>
4775
4776 * config/nds32/constants.md (unspec_volatile_element): Add
4777 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4778 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4779 optimization.
4780 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4781 (make_pass_nds32_fp_as_gp): Declare.
4782 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4783 optmization pass.
4784 (nds32_asm_function_end_prologue): Remove unused asm output.
4785 (nds32_asm_function_begin_epilogue): Remove unused asm output.
4786 (nds32_asm_file_start): Output necessary fp_as_gp information.
4787 (nds32_option_override): Adjust register usage.
4788 (nds32_expand_prologue): Consider fp_as_gp situation.
4789 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4790 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4791 (epilogue): Ditto.
4792 (return): Ditto.
4793 (simple_return): Ditto.
4794 (omit_fp_begin): Output special directive for fp_as_gp.
4795 (omit_fp_end): Output special directive for fp_as_gp.
4796 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4797 mforbid-fp-as-gp): New options.
4798
4799 2018-06-01 Mark Wielaard <mark@klomp.org>
4800
4801 * dwarf2out.c (dwarf2out_finish): Remove generation of
4802 DW_AT_loclists_base.
4803
4804 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4805
4806 * gimple-ssa-store-merging.c: Include gimple-fold.h.
4807 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4808 (struct merged_store_group): Add bit_insertion field.
4809 (dump_char_array): Use standard hexadecimal format.
4810 (merged_store_group::merged_store_group): Set bit_insertion to false.
4811 (merged_store_group::apply_stores): Use optimal buffer size. Deal
4812 with BIT_INSERT_EXPR stores. Move up code updating the mask and
4813 also print the mask in the dump file.
4814 (pass_store_merging::gate): Minor tweak.
4815 (imm_store_chain_info::coalesce_immediate): Fix wrong association
4816 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
4817 stores with INTEGER_CST stores.
4818 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4819 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4820 and use it throughout. Generate bit insertion sequences if need be.
4821 (pass_store_merging::process_store): Remove redundant condition.
4822 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4823
4824 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
4825
4826 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4827 the 128-bit floating point types. Fix function comment.
4828
4829 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4830
4831 * config/aarch64/aarch64-simd.md
4832 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4833 mnemonics.
4834 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4835 mnemonics.
4836
4837 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4838
4839 PR tree-optimization/85989
4840 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4841 variable.
4842 (backprop::intersect_uses): Check it when deciding whether this
4843 is a backedge reference.
4844 (backprop::process_block): Add each phi to m_visited_phis
4845 after visiting it, then clear it at the end.
4846
4847 2018-06-01 Richard Biener <rguenther@suse.de>
4848
4849 * tree-vectorizer.h (vect_dr_stmt): New function.
4850 (vect_get_load_cost): Adjust.
4851 (vect_get_store_cost): Likewise.
4852 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4853 Use vect_dr_stmt instead of DR_SMTT.
4854 (vect_record_base_alignments): Likewise.
4855 (vect_calculate_target_alignment): Likewise.
4856 (vect_compute_data_ref_alignment): Likewise and make static.
4857 (vect_update_misalignment_for_peel): Likewise.
4858 (vect_verify_datarefs_alignment): Likewise.
4859 (vector_alignment_reachable_p): Likewise.
4860 (vect_get_data_access_cost): Likewise. Pass down
4861 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4862 (vect_get_peeling_costs_all_drs): Likewise.
4863 (vect_peeling_hash_get_lowest_cost): Likewise.
4864 (vect_enhance_data_refs_alignment): Likewise.
4865 (vect_find_same_alignment_drs): Likewise.
4866 (vect_analyze_data_refs_alignment): Likewise.
4867 (vect_analyze_group_access_1): Likewise.
4868 (vect_analyze_group_access): Likewise.
4869 (vect_analyze_data_ref_access): Likewise.
4870 (vect_analyze_data_ref_accesses): Likewise.
4871 (vect_vfa_segment_size): Likewise.
4872 (vect_small_gap_p): Likewise.
4873 (vectorizable_with_step_bound_p): Likewise.
4874 (vect_prune_runtime_alias_test_list): Likewise.
4875 (vect_analyze_data_refs): Likewise.
4876 (vect_supportable_dr_alignment): Likewise.
4877 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4878 (vect_gen_prolog_loop_niters): Likewise.
4879 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4880 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4881 modify DR_STMT.
4882 (vect_recog_mask_conversion_pattern): Likewise.
4883 (vect_try_gather_scatter_pattern): Likewise.
4884 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4885 to vect_get_store_cost.
4886 (vect_get_store_cost): Get stmt_info instead of DR.
4887 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4888 (vect_get_load_cost): Get stmt_info instead of DR.
4889
4890 2018-06-01 Richard Biener <rguenther@suse.de>
4891
4892 PR middle-end/86017
4893 * gimple-fold.c (var_decl_component_p): Also allow offsetted
4894 vars wrapped in MEM_REFs.
4895
4896 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4897
4898 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4899 Fix subreg tests so that we only return a choice between
4900 GENERAL_REGS and FP_REGS if the original classes included both.
4901
4902 2018-06-01 Richard Biener <rguenther@suse.de>
4903
4904 PR ipa/85960
4905 * tree-ssa-structalias.c (get_function_part_constraint):
4906 Handle NULL fi->decl.
4907 (find_func_aliases_for_call): Properly handle indirect
4908 fi from direct call.
4909 (find_func_clobbers): Likewise.
4910 (ipa_pta_execute): Likewise.
4911 (create_variable_info_for): For functions that are ifunc_resolver
4912 resolve to a varinfo that contains the result of the resolver call.
4913 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4914 aliases.
4915
4916 2018-05-31 Michael Collison <michael.collison@arm.com>
4917
4918 * config/aarch64/aarch64.md:
4919 (*fix_to_zero_extenddfdi2): New pattern.
4920 * gcc.target/aarch64/fix_extend1.c: New testcase.
4921
4922 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
4923
4924 PR middle-end/78809
4925 PR middle-end/83026
4926 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4927 and BUILT_IN_STRNCMP_EQ.
4928 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4929 BUILT_IN_STRNCMP_EQ.
4930 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4931 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4932 (gimple_fold_builtin): Likewise.
4933 * tree-ssa-strlen.c (compute_string_length): New function.
4934 (determine_min_obsize): New function.
4935 (handle_builtin_string_cmp): New function to handle calls to
4936 string compare functions.
4937 (strlen_optimize_stmt): Add handling to builtin string compare
4938 calls.
4939 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4940 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4941 * tree.c (build_common_builtin_nodes): Add new defines of
4942 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4943
4944 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4945
4946 PR target/85984
4947 * bb-reorder.c (pass_partition_blocks::gate): Return false for
4948 functions with naked attribute.
4949
4950 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4951
4952 * config/i386/sse.md (avx_vec_concat<mode>):
4953 Substitute concat_tg_mode mode attribute with xtg_mode.
4954 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4955 (concat_tg_mode): Remove mode attribute.
4956
4957 2018-05-31 Martin Sebor <msebor@redhat.com>
4958
4959 PR c/82063
4960 * calls.c (alloc_max_size): Correct a logic error/typo.
4961 Treat excessive arguments as infinite. Warn for invalid arguments.
4962 * doc/invoke.texi (-Walloc-size-larger-than): Update.
4963
4964 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
4965
4966 PR target/85829
4967 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4968 and movx for Haswell.
4969
4970 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
4971 Cesar Philippidis <cesar@codesourcery.com>
4972
4973 PR middle-end/85879
4974 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4975 when emitting error on private/firstprivate reductions.
4976 * omp-low.c (lower_omp_target): Avoid reference-type processing
4977 on pointers for firstprivate clause.
4978
4979 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4980
4981 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4982 (st1x2): Likewise.
4983 (st1x3): Likewise.
4984 * config/aarch64/aarch64-simd.md
4985 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4986 (aarch64_ld1_x3_<mode>): Likewise
4987 (aarch64_st1x2<VALLDIF:mode>): Likewise
4988 (aarch64_st1_x2_<mode>): Likewise
4989 (aarch64_st1x3<VALLDIF:mode>): Likewise
4990 (aarch64_st1_x3_<mode>): Likewise
4991 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4992 (vld1_s8_x3): Likewise.
4993 (vld1_u16_x3): Likewise.
4994 (vld1_s16_x3): Likewise.
4995 (vld1_u32_x3): Likewise.
4996 (vld1_s32_x3): Likewise.
4997 (vld1_u64_x3): Likewise.
4998 (vld1_s64_x3): Likewise.
4999 (vld1_f16_x3): Likewise.
5000 (vld1_f32_x3): Likewise.
5001 (vld1_f64_x3): Likewise.
5002 (vld1_p8_x3): Likewise.
5003 (vld1_p16_x3): Likewise.
5004 (vld1_p64_x3): Likewise.
5005 (vld1q_u8_x3): Likewise.
5006 (vld1q_s8_x3): Likewise.
5007 (vld1q_u16_x3): Likewise.
5008 (vld1q_s16_x3): Likewise.
5009 (vld1q_u32_x3): Likewise.
5010 (vld1q_s32_x3): Likewise.
5011 (vld1q_u64_x3): Likewise.
5012 (vld1q_s64_x3): Likewise.
5013 (vld1q_f16_x3): Likewise.
5014 (vld1q_f32_x3): Likewise.
5015 (vld1q_f64_x3): Likewise.
5016 (vld1q_p8_x3): Likewise.
5017 (vld1q_p16_x3): Likewise.
5018 (vld1q_p64_x3): Likewise.
5019 (vst1_s64_x2): Likewise.
5020 (vst1_u64_x2): Likewise.
5021 (vst1_f64_x2): Likewise.
5022 (vst1_s8_x2): Likewise.
5023 (vst1_p8_x2): Likewise.
5024 (vst1_s16_x2): Likewise.
5025 (vst1_p16_x2): Likewise.
5026 (vst1_s32_x2): Likewise.
5027 (vst1_u8_x2): Likewise.
5028 (vst1_u16_x2): Likewise.
5029 (vst1_u32_x2): Likewise.
5030 (vst1_f16_x2): Likewise.
5031 (vst1_f32_x2): Likewise.
5032 (vst1_p64_x2): Likewise.
5033 (vst1q_s8_x2): Likewise.
5034 (vst1q_p8_x2): Likewise.
5035 (vst1q_s16_x2): Likewise.
5036 (vst1q_p16_x2): Likewise.
5037 (vst1q_s32_x2): Likewise.
5038 (vst1q_s64_x2): Likewise.
5039 (vst1q_u8_x2): Likewise.
5040 (vst1q_u16_x2): Likewise.
5041 (vst1q_u32_x2): Likewise.
5042 (vst1q_u64_x2): Likewise.
5043 (vst1q_f16_x2): Likewise.
5044 (vst1q_f32_x2): Likewise.
5045 (vst1q_f64_x2): Likewise.
5046 (vst1q_p64_x2): Likewise.
5047 (vst1_s64_x3): Likewise.
5048 (vst1_u64_x3): Likewise.
5049 (vst1_f64_x3): Likewise.
5050 (vst1_s8_x3): Likewise.
5051 (vst1_p8_x3): Likewise.
5052 (vst1_s16_x3): Likewise.
5053 (vst1_p16_x3): Likewise.
5054 (vst1_s32_x3): Likewise.
5055 (vst1_u8_x3): Likewise.
5056 (vst1_u16_x3): Likewise.
5057 (vst1_u32_x3): Likewise.
5058 (vst1_f16_x3): Likewise.
5059 (vst1_f32_x3): Likewise.
5060 (vst1_p64_x3): Likewise.
5061 (vst1q_s8_x3): Likewise.
5062 (vst1q_p8_x3): Likewise.
5063 (vst1q_s16_x3): Likewise.
5064 (vst1q_p16_x3): Likewise.
5065 (vst1q_s32_x3): Likewise.
5066 (vst1q_s64_x3): Likewise.
5067 (vst1q_u8_x3): Likewise.
5068 (vst1q_u16_x3): Likewise.
5069 (vst1q_u32_x3): Likewise.
5070 (vst1q_u64_x3): Likewise.
5071 (vst1q_f16_x3): Likewise.
5072 (vst1q_f32_x3): Likewise.
5073 (vst1q_f64_x3): Likewise.
5074 (vst1q_p64_x3): Likewise.
5075
5076 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5077
5078 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5079 user_label_prefix to name.
5080
5081 * tree-core.h: Update comment about the format of NAME string
5082 passed to handler in attribute_spec.
5083
5084 * config/msp430/msp430.md: Remove erroneous subreg expression from
5085 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5086 zero_extend{q,h}isi2.
5087
5088 2018-05-30 Borislav Petkov <bp@suse.de>
5089
5090 * doc/extend.texi: Document some architecture specific
5091 constraints and sort entries.
5092
5093 2018-05-30 Martin Sebor <msebor@redhat.com>
5094
5095 PR middle-end/85369
5096 * builtins.c (expand_builtin_stpcpy_1): New function.
5097 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5098 only if the former succeeds.
5099
5100 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5101
5102 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5103 in saphira.
5104
5105 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5106
5107 * doc/invoke.texi (-flinker-output): Document
5108
5109 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5110
5111 * passes.c (ipa_write_summaries): Only modify statements if body
5112 is in memory.
5113 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5114 incrementally linking.
5115 (ipa_passes): Likewise.
5116 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5117 pass down resolution info.
5118 * common.opt (flag_incremental_link): Update info.
5119 * gcc.c (plugin specs): Turn flinker-output=* to
5120 -plugin-opt=-linker-output-known
5121 * toplev.c (compile_file): Also cut compilation when doing incremental
5122 link.
5123 * flag-types. (enum lto_partition_model): Add
5124 LTO_LINKER_OUTPUT_NOLTOREL.
5125 (invoke.texi): Add -flinker-output docs.
5126 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5127 link same way as WPA; do not stream in dead initializers.
5128
5129 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5130 darf2out_register_external_decl): Support incremental link.
5131
5132 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5133
5134 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5135
5136 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5137
5138 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5139 it down to simple_object_copy_lto_debug_sections.
5140 (run_gcc): Determine incremental LTO link time and configure
5141 lto1 into non-wpa mode, disable renaming of debug sections.
5142
5143 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5144
5145 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5146 descriptions of various incorrectly documented functions.
5147
5148 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5149
5150 Revert:
5151 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5152 address check not strict.
5153
5154 2018-05-30 Richard Biener <rguenther@suse.de>
5155
5156 PR tree-optimization/85964
5157 * tracer.c (better_p): Drop initialized count check, we only
5158 call the function with initialized counts now.
5159 (find_best_successor): Do find a best edge if one
5160 has uninitialized count.
5161 (find_best_predecessor): Likewise. Do BB frequency check only
5162 if count is initialized.
5163
5164 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5165
5166 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5167 (aarch64_ldrstr_offset_compare): New.
5168 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5169 load/store orderings.
5170 (aarch64_gen_adjusted_ldpstp): Likewise.
5171
5172 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5173
5174 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5175 Check for subset of GENERAL_REGS and FP_REGS.
5176 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5177 r=w alternative.
5178
5179 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5180
5181 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5182 and wi::to_poly_offset. Add the current offset and then check
5183 whether the sum fits, rather than using an unchecked addition of
5184 a checked term. Check for a shwi rather than a uhwi.
5185 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5186 (store_constructor): Use poly_int_tree_p.
5187 (expand_expr_real_1): Likewise.
5188 * function.c (assign_temp): Likewise.
5189 * fold-const.c (const_binop): Use poly_int_tree_p and
5190 wi::to_poly_offset.
5191 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5192 division.
5193 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5194 to_poly_offset for MEM offsets.
5195 * ipa-icf.c (sem_variable::equals): Likewise.
5196 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5197 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5198 wi::to_poly_offset for BIT_FIELD_REF offsets.
5199 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5200 wi::to_poly_offset.
5201 * var-tracking.c (emit_note_insn_var_location): Use
5202 tree_to_poly_uint64.
5203
5204 2018-05-29 Jim Wilson <jimw@sifive.com>
5205
5206 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5207
5208 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
5209
5210 PR target/85950
5211 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5212 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5213 sequence.
5214 (sse4_1_round<mode>2): Use nonimmediate_operand
5215 for operand 1 predicate.
5216
5217 2018-05-29 Martin Sebor <msebor@redhat.com>
5218 Richard Biener <rguenther@suse.de>
5219
5220 PR testsuite/85888
5221 * calls.c (get_size_range): Call determine_value_range instead
5222 of get_value_range..
5223 * tree-vrp.h (determine_value_range): Declared new function.
5224 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5225
5226 2018-05-29 Richard Biener <rguenther@suse.de>
5227
5228 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5229 sure to use non-pattern stmts for get_earlier_stmt arguments.
5230 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5231 called on pattern stmts.
5232 (get_later_stmt): Likewise.
5233
5234 2018-05-29 Martin Liska <mliska@suse.cz>
5235
5236 PR gcov-profile/85759
5237 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5238 env variables.
5239
5240 2018-05-29 Jakub Jelinek <jakub@redhat.com>
5241
5242 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5243 VEC_UNPACK_*_EXPR.
5244 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5245 VEC_PACK_*_EXPR.
5246
5247 PR target/85918
5248 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5249 VEC_PACK_FLOAT_EXPR): New tree codes.
5250 * tree-pretty-print.c (op_code_prio): Handle
5251 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5252 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5253 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5254 * tree-inline.c (estimate_operator_cost): Likewise.
5255 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5256 * fold-const.c (const_binop): Likewise.
5257 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5258 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5259 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5260 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5261 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5262 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5263 * expr.c (expand_expr_real_2): Likewise.
5264 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5265 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5266 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5267 optabs.
5268 * optabs.c (expand_widen_pattern_expr): For
5269 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5270 sign from result type rather than operand's type.
5271 (expand_binop_directly): For vec_packu_float_optab and
5272 vec_packs_float_optab allow result type to be different from operand's
5273 type.
5274 * optabs-tree.c (optab_for_tree_code): Handle
5275 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5276 VEC_PACK_FLOAT_EXPR. Formatting fixes.
5277 * tree-vect-generic.c (expand_vector_operations_1): Handle
5278 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5279 VEC_PACK_FLOAT_EXPR.
5280 * tree-vect-stmts.c (supportable_widening_operation): Handle
5281 FIX_TRUNC_EXPR.
5282 (supportable_narrowing_operation): Handle FLOAT_EXPR.
5283 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5284 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5285 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
5286 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5287 mode attributes.
5288 (vec_pack<floatprefix>_float_<mode>): New expander.
5289 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5290 attributes.
5291 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5292 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5293 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5294 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5295 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5296 Document.
5297 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5298 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5299 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5300 VEC_PACK_FLOAT_EXPR): Document.
5301
5302 2018-05-29 Richard Biener <rguenther@suse.de>
5303
5304 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5305 member.
5306 (stmt_vec_info_vec): Make pointer.
5307 (init_stmt_vec_info_vec): Remove.
5308 (free_stmt_vec_info_vec): Likewise.
5309 (set_stmt_vec_info_vec): New function.
5310 (free_stmt_vec_infos): Likewise.
5311 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5312 (set_vinfo_for_stmt): Likewise.
5313 (get_earlier_stmt): Likewise.
5314 (get_later_stmt): Likewise.
5315 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5316 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5317 (vec_info::~vec_info): Free stmt_vec_infos.
5318 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5319 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5320 (pass_slp_vectorize::execute): Likewise.
5321 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5322 (free_stmt_vec_info_vec): Likewise.
5323 (set_stmt_vec_info_vec): New function.
5324 (free_stmt_vec_infos): Likewise.
5325 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5326 the global stmt_vec_info_vec.
5327 * tree-parloops.c (gather_scalar_reductions): Use
5328 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5329 vector.
5330
5331 2018-05-29 Richard Biener <rguenther@suse.de>
5332
5333 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5334
5335 2018-05-29 Martin Liska <mliska@suse.cz>
5336 David Malcolm <dmalcolm@redhat.com>
5337
5338 * vec.c (test_reverse): New.
5339 (vec_c_tests): Add new test.
5340 * vec.h (vl_ptr>::reverse): New function.
5341
5342 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
5343
5344 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5345
5346 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5347 and later.
5348
5349 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5350
5351 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5352
5353 2018-05-28 Richard Biener <rguenther@suse.de>
5354
5355 PR tree-optimization/85933
5356 * tree-vect-data-refs.c (vect_record_base_alignments): Only
5357 look at stmts marked as vectorizable.
5358
5359 2018-05-28 Richard Biener <rguenther@suse.de>
5360
5361 PR tree-optimization/85934
5362 * tree-vect-generic.c (expand_vector_operations_1): Hoist
5363 vector boolean check before scalar optimization.
5364
5365 2018-05-28 Jakub Jelinek <jakub@redhat.com>
5366
5367 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5368 for armv5te.
5369
5370 2018-05-28 Mark Wielaard <mark@klomp.org>
5371
5372 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5373 if it is an expression containing a minus sign.
5374
5375 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
5376
5377 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5378
5379 2018-05-27 Paul Koning <ni1d@arrl.net>
5380
5381 * config/pdp11/pdp11.md (truncsihi2): Remove.
5382
5383 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
5384 Chung-Ju Wu <jasonwucj@gmail.com>
5385
5386 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5387 implementation.
5388 (unaligned_store_dw): Ditto.
5389 * config/nds32/nds32-memory-manipulation.c
5390 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5391 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5392 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5393 (emit_setmem_word_loop): Rename to ...
5394 (emit_setmem_doubleword_loop): ... this.
5395 (nds32_gen_dup_4_byte_to_word_value): New function.
5396 (nds32_gen_dup_8_byte_to_double_word_value): New function.
5397 (nds32_expand_setmem_loop): Refine implementation.
5398 (nds32_expand_setmem_loop_v3m): Ditto.
5399 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5400 pattern.
5401
5402 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5403
5404 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5405
5406 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5407
5408 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5409 (nds32_init_machine_status): Initialize machine->attr_naked_p and
5410 machine->attr_no_prologue_p.
5411 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5412 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5413 (nds32_expand_epilogue): Consider attr_naked_p.
5414 (nds32_expand_epilogue_v3pop): Likewise.
5415 (nds32_can_use_return_insn): Likewise.
5416 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5417 attr_no_prologue_p fields.
5418 * config/nds32/nds32.opt (mret-in-naked-func): New option.
5419
5420 2018-05-27 Jakub Jelinek <jakub@redhat.com>
5421
5422 PR target/85918
5423 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5424 attributes.
5425 * config/i386/sse.md
5426 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5427 Rename to ...
5428 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5429 ... this.
5430 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5431 Rename to ...
5432 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5433 ... this.
5434 (*<floatsuffix>floatv2div2sf2): Rename to ...
5435 (*float<floatunssuffix>v2div2sf2): ... this.
5436 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5437 (float<floatunssuffix>v2div2sf2_mask): ... this.
5438 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5439 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5440 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5441 to ...
5442 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5443 ... this.
5444 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5445 Rename to ...
5446 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5447 ... this.
5448 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5449 Rename to ...
5450 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5451 ... this.
5452 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
5453 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
5454 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
5455 gen_ufix_truncv8dfv8si2.
5456 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
5457 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
5458 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
5459 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
5460 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
5461 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
5462 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
5463 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
5464
5465 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5466
5467 PR target/85900
5468 PR target/85345
5469 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
5470
5471 2018-05-25 Jim Wilson <jimw@sifive.com>
5472
5473 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
5474 * config/riscv/riscv.c (struct machine_function): Add
5475 interrupt_handler_p and attribute_checked_p fields.
5476 (riscv_attribute_table): Add interrupt.
5477 (riscv_interrupt_type_p): New.
5478 (riscv_save_reg_p): Save extra regs for interrupt handler.
5479 (riscv_use_save_libcall): Return false for interrupt handler.
5480 (riscv_first_stack_step): Add forward declaration.
5481 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
5482 for interrupt handler with large frame. Use it for saved reg list.
5483 (riscv_expand_prologue): Move flag_stack_usage_info support to
5484 eliminate duplication.
5485 (riscv_expand_epilogue): Generate mret for interrupt handler.
5486 (riscv_epilogue_uses): New.
5487 (riscv_can_use_return_insn): Return false for interrupt handler.
5488 (riscv_function_ok_for_sibcall): Likewise.
5489 (riscv_set_current_function): Add interrupt handler support.
5490 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
5491 * config/riscv/riscv.md (UNSPECV_MRET): New.
5492 (GP_REGNUM): New.
5493 (riscv_frflags, riscv_fsflags): Use tab after opcode.
5494 (riscv_mret): New.
5495 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5496
5497 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
5498
5499 PR tree-optimization/85712
5500 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5501 this candidate has already been replaced in-situ by a copy.
5502
5503 2018-05-25 Jason Merrill <jason@redhat.com>
5504
5505 PR c++/80485 - inline function non-zero address.
5506 * symtab.c (nonzero_address): Check DECL_COMDAT.
5507
5508 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
5509
5510 PR target/83628
5511 * config/alpha/alpha.md (ashlsi3): New insn pattern.
5512 (*ashlsi_se): Rename from *ashldi_se. Define as sign
5513 extension of SImode operation. Use const123_operand predicate.
5514 (*saddsi_1): Remove.
5515 (*saddl_se_1): Ditto.
5516 (*ssubsi_1): Ditto.
5517 (*ssubl_se_1): Ditto.
5518 * config/alpha/predicates.md (const123_operand): New predicate.
5519 * config/alpha/constraints.md (P): Use IN_RANGE.
5520
5521 2018-05-25 Richard Biener <rguenther@suse.de>
5522
5523 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5524 defaulted to true.
5525 (ref_maybe_used_by_stmt_p): Likewise.
5526 (stmt_may_clobber_ref_p): Likewise.
5527 (stmt_may_clobber_ref_p_1): Likewise.
5528 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5529 and pass it along.
5530 (ref_maybe_used_by_stmt_p): Likewise.
5531 (stmt_may_clobber_ref_p): Likewise.
5532 (stmt_may_clobber_ref_p_1): Likewise.
5533 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5534 the alias oracle to disambiguate DRs with stmts DR analysis
5535 couldn't handle.
5536 (vect_analyze_data_refs): Do not give up on not analyzable
5537 DRs for BB vectorization. Remove code truncating the dataref
5538 vector.
5539
5540 2018-05-25 Jakub Jelinek <jakub@redhat.com>
5541
5542 PR target/85832
5543 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5544 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
5545 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5546
5547 2018-05-25 Richard Biener <rguenther@suse.de>
5548
5549 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5550 function, combining stmt data ref gathering and fatal analysis
5551 parts.
5552 (vect_analyze_data_refs): Remove now redudnant code and simplify.
5553 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5554 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5555 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5556 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5557
5558 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5559
5560 PR tree-optimization/85720
5561 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5562 SCC if all partitions are builtins.
5563 (version_loop_by_alias_check): New parameter. Generate cancelable
5564 runtime alias check if all partitions are builtins.
5565 (distribute_loop): Update call to above function.
5566
5567 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5568
5569 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5570 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5571 (parm_default_def_partition_arg): Ditto.
5572 (set_parm_default_def_partition): Ditto.
5573 (get_parm_default_def_partitions): Ditto and make it static.
5574 (get_undefined_value_partitions): Ditto and make it static.
5575 (remove_ssa_form): Refactor call to init_var_map here.
5576 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5577 computation for loop region.
5578 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5579 (register_default_def): Delete.
5580 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5581 (parm_default_def_partition_arg): Ditto.
5582 (set_parm_default_def_partition): Ditto.
5583 (get_parm_default_def_partitions): Ditto and make it static.
5584 (get_undefined_value_partitions): Ditto and make it static.
5585 (coalesce_with_default, coalesce_with_default): Update comment.
5586 (create_coalesce_list_for_region): New func factored out from
5587 create_outofssa_var_map.
5588 (populate_coalesce_list_for_outofssa): New func factored out from
5589 create_outofssa_var_map and coalesce_ssa_name.
5590 (create_outofssa_var_map): Delete.
5591 (coalesce_ssa_name): Refactor to support live range computation.
5592 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5593 (get_parm_default_def_partitions): Delete.
5594 (get_undefined_value_partitions): Ditto.
5595 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5596 computation for loop region.
5597 (new_tree_live_info, loe_visit_block): Ditto.
5598 (live_worklist, set_var_live_on_entry): Ditto.
5599 (calculate_live_on_exit, verify_live_on_entry): Ditto.
5600 * tree-ssa-live.h (struct _var_map): New fields.
5601 (init_var_map): Change decl.
5602 (region_contains_p): New.
5603
5604 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5605
5606 * tree-ssa-live.h (live_merge_and_clear): Delete.
5607
5608 2018-05-25 Richard Biener <rguenther@suse.de>
5609
5610 PR c++/85912
5611 * tree-dump.c (dequeue_and_dump): Remove access to removed
5612 operand 2 of a SWITCH_EXPR.
5613
5614 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5615
5616 * doc/sourcebuild.texi (vect_double_cond_arith): Include
5617 multiplication and division.
5618 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5619 (cond_udiv@var{m}, cond_umod@var{m}): Document.
5620 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5621 (cond_udiv_optab, cond_umod_optab): New optabs.
5622 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5623 (IFN_COND_RDIV): New internal functions.
5624 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5625 TRUNC_MOD_EXPR and RDIV_EXPR.
5626 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5627 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5628 New unspecs.
5629 (SVE_INT_BINARY): Include mult.
5630 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5631 (optab, sve_int_op): Handle mult.
5632 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5633 UNSPEC_COND_DIV.
5634 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5635 for SVE_INT_BINARY_SD.
5636
5637 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5638
5639 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5640 (optab, sve_int_op): Handle div and udiv.
5641 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5642 for SVE_INT_BINARY_SD.
5643 (*<optab><mode>3): New insn for the same.
5644
5645 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5646
5647 * tree-vect-patterns.c: Include predict.h.
5648 (vect_recog_divmod_pattern): Restrict check for division support
5649 to when optimizing for size.
5650
5651 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5652
5653 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5654 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5655 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5656 (gimple_match_op::set_op): Likewise.
5657 (gimple_resimplify4): Declare.
5658 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5659 (expr::gen_transform): Likewise.
5660 (decision_tree::gen): Generate a simplification routine for 4 operands.
5661 * gimple-match-head.c (gimple_simplify): Add an overload for
5662 4 operands. In the top-level function, handle up to 4 call
5663 arguments and call gimple_resimplify4.
5664 (gimple_resimplify4): New function.
5665 (build_call_internal): Pass a fourth operand.
5666 (maybe_push_to_seq): Likewise.
5667 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5668 Fold VEC_COND_EXPRs of an operation and a default value into
5669 an IFN_COND_* function if possible.
5670 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5671 New unspecs.
5672 (SVE_COND_FP_BINARY): Include them.
5673 (optab, sve_fp_op): Handle them.
5674 (SVE_INT_BINARY_REV): New code iterator.
5675 (SVE_COND_FP_BINARY_REV): New int iterator.
5676 (commutative): New int attribute.
5677 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5678 Declare.
5679 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5680 function.
5681 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5682 (*cond_<optab><mode>): New patterns for reversed operands.
5683
5684 2018-05-25 Richard Biener <rguenther@suse.de>
5685
5686 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5687 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5688 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5689 (STMT_VINFO_GROUPED_ACCESS): Adjust.
5690 * tree-vect-data-refs.c (everywhere): Adjust users.
5691 * tree-vect-loop.c (everywhere): Likewise.
5692 * tree-vect-slp.c (everywhere): Likewise.
5693 * tree-vect-stmts.c (everywhere): Likewise.
5694 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5695
5696 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5697
5698 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5699 Rename to...
5700 (gcc_cv_as_section_exclude): ... this.
5701 Try Solaris as #exclude syntax.
5702 * configure: Regenerate.
5703 * config.in: Regenerate.
5704 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5705 SECTION_EXCLUDE.
5706 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5707 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5708
5709 * varasm.c (default_elf_asm_named_section): Don't check if
5710 HAVE_GAS_SECTION_EXCLUDE is defined.
5711
5712 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5713
5714 * doc/md.texi: Update the documentation of the cond_* optabs
5715 to mention the new final operand. Fix GET_MODE_NUNITS call.
5716 Describe the scalar case too.
5717 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5718 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5719 instead of 2.
5720 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5721 (get_conditional_internal_fn): Update comment.
5722 * tree-vect-loop.c (vectorizable_reduction): Pass the original
5723 accumulator value as a final argument to conditional functions.
5724 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5725 a define_expand and add an "else" operand. Assert for now that
5726 the else operand is equal to operand 2. Use SVE_INT_BINARY and
5727 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5728 (*cond_<optab><mode>): New patterns.
5729 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5730 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5731 (UNSPEC_COND_EOR): Delete.
5732 (optab): Remove associated mappings.
5733 (SVE_INT_BINARY): New code iterator.
5734 (sve_int_op): Remove int attribute and add "minus" to the code
5735 attribute.
5736 (SVE_COND_INT_OP): Delete.
5737 (SVE_COND_FP_OP): Rename to...
5738 (SVE_COND_FP_BINARY): ...this.
5739
5740 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5741
5742 * optabs.c (can_reuse_operands_p): New function.
5743 (maybe_legitimize_operands): Try to reuse the results for
5744 earlier operands.
5745
5746 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5747
5748 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5749 Add {q} suffix to insn mnemonic.
5750
5751 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5752
5753 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5754 (msp430_warn_func_return): New.
5755
5756 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
5757
5758 * fold-const.c (tree_nonzero_bits): New function.
5759 * fold-const.h (tree_nonzero_bits): Likewise.
5760 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5761 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5762
5763 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5764
5765 PR target/85900
5766 PR target/85345
5767 * varasm.c (assemble_alias): Check ifunc_resolver only on
5768 FUNCTION_DECL.
5769
5770 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5771
5772 PR target/85903
5773 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5774 when memory input operand is handled.
5775
5776 2018-05-24 Luis Machado <luis.machado@linaro.org>
5777
5778 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5779 global.
5780 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5781
5782 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5783
5784 * match.pd: Delay FMA folds until after vectorization.
5785
5786 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
5787
5788 PR target/83009
5789 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5790 address check not strict.
5791
5792 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5793
5794 * gimple-match.h (gimple_match_op): New class.
5795 (mprts_hook): Replace parameters with a gimple_match_op *.
5796 (maybe_build_generic_op): Likewise.
5797 (gimple_simplified_result_is_gimple_val): Replace parameters with
5798 a const gimple_match_op *.
5799 (gimple_simplify): Replace code_helper * and tree * parameters with
5800 a gimple_match_op * parameter.
5801 (gimple_resimplify1): Replace code_helper *, tree and tree *
5802 parameters with a gimple_match_op * parameter.
5803 (gimple_resimplify2): Likewise.
5804 (gimple_resimplify3): Likewise.
5805 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5806 parameters with a gimple_match_op * parameter.
5807 * gimple-match-head.c (gimple_simplify): Change prototypes of
5808 auto-generated functions to take a gimple_match_op * instead of
5809 separate code_helper * and tree * parameters. Make the same
5810 change in the top-level overload and update calls to the
5811 gimple_resimplify routines. Update calls to the auto-generated
5812 functions and to maybe_push_res_to_seq in the publicly-facing
5813 operation-specific gimple_simplify overloads.
5814 (gimple_match_op::MAX_NUM_OPS): Define.
5815 (gimple_resimplify1): Replace rcode and ops with a single res_op
5816 parameter. Update call to gimple_simplify.
5817 (gimple_resimplify2): Likewise.
5818 (gimple_resimplify3): Likewise.
5819 (mprts_hook): Replace parameters with a gimple_match_op *.
5820 (maybe_build_generic_op): Likewise.
5821 (build_call_internal): Replace type, nargs and ops with
5822 a gimple_match_op *.
5823 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5824 with a single gimple_match_op *. Update calls to mprts_hook,
5825 build_call_internal and gimple_simplified_result_is_gimple_val.
5826 Factor out code that is common to the tree_code and combined_fn cases.
5827 * genmatch.c (expr::gen_transform): Replace tem_code and
5828 tem_ops with a gimple_match_op called tem_op. Update calls
5829 to the gimple_resimplify functions and maybe_push_res_to_seq.
5830 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5831 res_ops. Update call to the gimple_resimplify functions.
5832 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5833 (decision_tree::gen): Make the functions take a gimple_match_op *
5834 called res_op instead of separate res_code and res_ops parameters.
5835 Update call accordingly.
5836 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5837 and ops with a single res_op parameter. Update calls to
5838 maybe_build_generic_op and maybe_push_res_to_seq.
5839 (fold_stmt_1): Update calls to gimple_simplify and
5840 replace_stmt_with_simplification.
5841 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5842 and gimple_simplified_result_is_gimple_val.
5843 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5844 gimple_simplify.
5845 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5846 with a gimple_match_op *.
5847 (vn_nary_build_or_lookup): Likewise. Update call to
5848 vn_nary_build_or_lookup_1.
5849 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5850 gimple_match_op *. Update calls to the gimple_resimplify routines
5851 and to gimple_simplified_result_is_gimple_val.
5852 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5853 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5854 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5855 (visit_nary_op): Likewise.
5856 (visit_reference_op_load): Likewise.
5857
5858 2018-05-23 Luis Machado <luis.machado@linaro.org>
5859
5860 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5861 modifier for printing the step amount.
5862
5863 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
5864
5865 PR target/78849
5866 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5867 types.
5868
5869 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
5870
5871 * doc/sourcebuild.texi (Endianness): New subsubsection.
5872
5873 2018-05-23 Luis Machado <luis.machado@linaro.org>
5874
5875 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5876 <prefetch_dynamic_strides>: New const bool field.
5877 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5878 prefetch_dynamic_strides.
5879 (exynosm1_prefetch_tune): Likewise.
5880 (thunderxt88_prefetch_tune): Likewise.
5881 (thunderx_prefetch_tune): Likewise.
5882 (thunderx2t99_prefetch_tune): Likewise.
5883 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5884 false.
5885 (aarch64_override_options_internal): Update to set
5886 PARAM_PREFETCH_DYNAMIC_STRIDES.
5887 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5888 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5889 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5890 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5891 prefetch-dynamic-strides setting.
5892
5893 2018-05-23 Luis Machado <luis.machado@linaro.org>
5894
5895 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5896 <minimum_stride>: New const int field.
5897 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5898 minimum_stride field defaulting to -1.
5899 (exynosm1_prefetch_tune): Likewise.
5900 (thunderxt88_prefetch_tune): Likewise.
5901 (thunderx_prefetch_tune): Likewise.
5902 (thunderx2t99_prefetch_tune): Likewise.
5903 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5904 <default_opt_level>: Set to 3.
5905 (aarch64_override_options_internal): Update to set
5906 PARAM_PREFETCH_MINIMUM_STRIDE.
5907 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5908 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5909 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5910 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5911 stride is constant and is below the minimum stride threshold.
5912
5913 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5914
5915 * config/arm/arm-cpus.in (mode26): Delete.
5916 (armv4): Delete mode26 reference.
5917 * config/arm/arm.c (arm_configure_build_target): Delete use of
5918 isa_bit_mode26.
5919
5920 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5921
5922 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5923 New insn pattern.
5924 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5925 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
5926 for non-SSE modes.
5927 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
5928 (floatunsdidf2): Ditto.
5929
5930 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5931
5932 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5933 (fixuns_trunc<mode>si2_avx512f): Ditto.
5934 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5935 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5936 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5937
5938 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5939
5940 PR rtl-optimization/79985
5941 * df-scan.c (df_insn_refs_collect): Remove special case for
5942 global registers and asm statements.
5943
5944 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5945
5946 * extend.texi (Global Register Variables): Rewrite the bullet list.
5947 Note that the register is available for allocation. Note that access
5948 via inline asm must use constraints. Add note about async-signal
5949 handlers. Remove paragraph about automagic register selection.
5950
5951 2018-05-23 Richard Biener <rguenther@suse.de>
5952
5953 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5954 of fixed offset from memset VN.
5955
5956 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
5957
5958 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5959 first_interp field.
5960 (alloc_cand_and_find_basis): Initialize first_interp field.
5961 (slsr_process_mul): Modify first_interp field.
5962 (slsr_process_add): Likewise.
5963 (slsr_process_cast): Modify first_interp field for each new
5964 interpretation.
5965 (slsr_process_copy): Likewise.
5966 (dump_candidate): Dump first_interp field.
5967 (replace_mult_candidate): Process all interpretations, not just
5968 subsequent ones.
5969 (replace_rhs_if_not_dup): Likewise.
5970 (replace_one_candidate): Likewise.
5971
5972 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
5973
5974 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5975 Add new boolean.
5976 (aarch64_needs_frame_chain): New function.
5977 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5978
5979 2018-05-23 Sudakshina Das <sudi.das@arm.com>
5980
5981 PR target/84882
5982 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5983 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5984 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5985 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5986 as true for strict-align.
5987 (aarch64_can_inline_p): Perform checks even when callee has no
5988 attributes to check for strict alignment.
5989 * doc/extend.texi (AArch64 Function Attributes): Document
5990 no-strict-align.
5991 * doc/invoke.texi: (AArch64 Options): Likewise.
5992
5993 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
5994
5995 PR tree-optimization/85853
5996 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5997 the handling of the root of the node to...
5998 (vect_slp_analyze_node_operations_1): ...this new function,
5999 and run the whole thing with the child nodes' def types
6000 set according to their SLP node's def type.
6001
6002 2018-05-23 Richard Biener <rguenther@suse.de>
6003
6004 PR middle-end/85874
6005 * tree-data-ref.c (create_runtime_alias_checks): Defer
6006 and ignore overflow warnings.
6007
6008 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6009
6010 PR tree-optimization/85822
6011 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6012 constants.
6013
6014 2018-05-23 Richard Biener <rguenther@suse.de>
6015
6016 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6017 memset constants via native_interpret_expr.
6018
6019 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6020
6021 PR target/85345
6022 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6023 attribute.
6024 (cgraph_node::create_alias): Likewise.
6025 (cgraph_node::get_availability): Check ifunc_resolver instead
6026 of looking up ifunc attribute.
6027 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6028 * varasm.c (do_assemble_alias): Likewise.
6029 (assemble_alias): Likewise.
6030 (default_binds_local_p_3): Likewise.
6031 * cgraph.h (cgraph_node): Add ifunc_resolver.
6032 (cgraph_node::only_called_directly_or_aliased_p): Return false
6033 for IFUNC resolver.
6034 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6035 attribute.
6036 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6037 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6038 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6039 instead of looking up ifunc attribute.
6040
6041 2018-05-22 Luis Machado <luis.machado@linaro.org>
6042
6043 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6044
6045 2018-05-22 Martin Sebor <msebor@redhat.com>
6046
6047 PR middle-end/85359
6048 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6049 only when expasion succeeds.
6050 (expand_builtin_strcmp): Same.
6051 (expand_builtin_strncmp): Same.
6052
6053 2018-05-22 Martin Sebor <msebor@redhat.com>
6054
6055 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6056
6057 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6058 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6059
6060 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6061 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6062 code.
6063 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6064 Add check for legitimate_address.
6065 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6066 (aarch64_swap_ldrstr_operands): New.
6067 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6068 Define prototype.
6069
6070 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6071 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6072
6073 * config/aarch64/aarch64.md: New patterns to generate stp
6074 and ldp.
6075 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6076 single words and double words.
6077 (load_pair_sw, load_pair_dw): Likewise.
6078 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6079 Delete.
6080 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6081 Delete.
6082 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6083 for different mode ldpstp and add peephole for merged zero stores.
6084 Likewise for loads.
6085 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6086 Add size check.
6087 (aarch64_gen_store_pair): Rename calls to match new patterns.
6088 (aarch64_gen_load_pair): Rename calls to match new patterns.
6089 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6090 (load_pair<DREG:mode><DREG2:mode>): ... This.
6091 (store_pair<mode>): Rename to...
6092 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6093 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6094 New mode iterators.
6095 (V_INT_EQUIV): Handle SImode.
6096 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6097 New predicate.
6098
6099 2018-05-22 Martin Sebor <msebor@redhat.com>
6100
6101 PR c/85623
6102 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6103 or ajust the presumed bound on an operation to avoid unnecessary
6104 warnings.
6105
6106 2018-05-22 Martin Sebor <msebor@redhat.com>
6107
6108 PR tree-optimization/85826
6109 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6110 assuming that a DECL necesarily has a constant size.
6111
6112 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6113
6114 PR middle-end/85862
6115 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6116
6117 2018-05-22 Richard Biener <rguenther@suse.de>
6118
6119 PR tree-optimization/85834
6120 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6121 non-constant and non-zero memset arguments.
6122
6123 2018-05-22 Martin Liska <mliska@suse.cz>
6124
6125 PR ipa/85607
6126 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6127
6128 2018-05-22 Richard Biener <rguenther@suse.de>
6129
6130 PR tree-optimization/85863
6131 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6132 comparisons when vectype is specified.
6133 (vectorizable_condition): Do not specify vectype for
6134 vect_is_simple_cond when SLP vectorizing.
6135
6136 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6137
6138 PR target/85657
6139 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6140 define __ibm128 as long double.
6141 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6142 as a distinct type when IEEE 128-bit support is enabled.
6143 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6144 128-bit types to use the correct functions.
6145 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6146 convert between 128-bit floating point types that have different
6147 modes but the same representation, instead of using gen_lowpart to
6148 makean alias.
6149 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6150 KFmode.
6151 (IFKF_reg): New attributes to give the register constraints for
6152 IFmode and KFmode.
6153 (extend<mode>tf2_internal): New insns to mark an explicit
6154 conversion between 128-bit floating point types that have a
6155 different mode but share the same representation.
6156
6157 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6158
6159 PR tree-optimization/85814
6160 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6161 a null return from get_strinfo when unsharing the next
6162 strinfo in the chain.
6163
6164 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6165
6166 PR gcc/84923
6167 * varasm.c (weak_finish): Clean up weak_decls.
6168
6169 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6170
6171 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6172 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6173 UNSPEC_UADALP values.
6174 * config/aarch64/iterators.md (ABAL): New int iterator.
6175 (ABDL2): Likewise.
6176 (ADALP): Likewise.
6177 (sur): Add mappings for the above.
6178 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6179 New define_insn.
6180 (aarch64_<sur>abal<mode>_4): Likewise.
6181 (aarch64_<sur>adalp<mode>_3): Likewise.
6182 (<sur>sadv16qi): New define_expand.
6183
6184 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6185
6186 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6187 (*movdf_internal): Ditto.
6188 (*rcpsf2_sse): Ditto.
6189 (*rsqrtsf2_sse): Ditto.
6190 (*sqrt<mode>2_sse): Ditto.
6191
6192 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6193
6194 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6195 eor3q<mode>4.
6196 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6197 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6198 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6199 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6200 vbcaxq_s64): New.
6201 * config/aarch64/arm_neon.h: Likewise.
6202 * config/aarch64/iterators.md (VQ_I): New.
6203
6204 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
6205
6206 * config.gcc: Add arc/t-multilib-linux to tmake_file for
6207 arc*-*-linux*.
6208 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6209 MULTILIB_DIRNAMES
6210
6211 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6212
6213 * config/nds32/constraints.md (S): New constraint.
6214 * config/nds32/nds32.md (call_internal): Use constraint S.
6215 (call_value_internal): Likewise.
6216 (sibcall_internal): Likewise.
6217 (sibcall_value_internal): Likewise.
6218
6219 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6220 Chung-Ju Wu <jasonwucj@gmail.com>
6221
6222 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6223 into consideration.
6224
6225 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6226 Chung-Ju Wu <jasonwucj@gmail.com>
6227
6228 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6229 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6230 (nds32_rtx_costs_impl): Simplify.
6231 (nds32_address_cost_impl): Simplify.
6232 (nds32_init_rtx_costs): New function.
6233 (nds32_rtx_costs_speed_prefer): Likewise.
6234 (nds32_rtx_costs_size_prefer): Likewise.
6235 (nds32_address_cost_speed_prefer): Likewise.
6236 (nds32_address_cost_speed_fwprop): Likewise.
6237 (nds32_address_cost_size_prefer): Likewise.
6238 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6239 * config/nds32/nds32.c (nds32_option_override): Use
6240 nds32_init_rtx_costs function.
6241
6242 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6243
6244 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6245 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6246 (TARGET_PIPELINE_N8): Likewise.
6247 (TARGET_PIPELINE_N10): Likewise.
6248 (TARGET_PIPELINE_N13): Likewise.
6249 (TARGET_PIPELINE_GRAYWOLF): Likewise.
6250
6251 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
6252
6253 * config/nds32/nds32-fpu.md: Update copyright year.
6254
6255 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6256
6257 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6258
6259 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6260
6261 * config/nds32/nds32.c
6262 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6263 * config/nds32/nds32.opt (minline-asm-r15): New option.
6264
6265 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6266
6267 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6268 MASK_HW_ABS.
6269 * config/nds32/nds32.md (abssi2): New pattern.
6270
6271 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
6272
6273 * config/i386/i386.md (rex64namesuffix): New mode attribute.
6274 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6275 Merge insn pattern from sse_cvtsi2ss<round_name> and
6276 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6277 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6278 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6279 using SWI48 mode iterator.
6280 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6281 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6282 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6283 pattern from sse_cvttss2si<round_saeonly_name>
6284 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6285 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6286 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6287 using SWI48 mode iterator.
6288 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6289 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6290 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6291 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6292 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6293 using SWI48 mode iterator.
6294 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6295 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6296 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6297 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6298 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6299 SWI48 mode iterator.
6300 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6301 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6302 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6303 pattern from sse_cvttsd2si<round_saeonly_name>
6304 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6305
6306 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6307
6308 * config/nds32/nds32-md-auxiliary.c
6309 (nds32_valid_smw_lwm_base_p): Refine.
6310 (nds32_output_smw_single_word): Refine.
6311 (nds32_output_smw_double_word): New.
6312 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6313
6314 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6315
6316 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6317 (nds32_output_stack_pop): Refine.
6318 (nds32_expand_unaligned_load): Refine.
6319 (nds32_expand_unaligned_store): Refine.
6320
6321 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6322 Chung-Ju Wu <jasonwucj@gmail.com>
6323
6324 * config/nds32/constants.md: Add TP_REGNUM constant.
6325 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6326 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6327 UNSPEC_ADD32.
6328 * config/nds32/nds32-doubleword.md: Consider flag_pic.
6329 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6330 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6331 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6332 and PIC code generation.
6333 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6334 code generation.
6335 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6336 optimization.
6337 * config/nds32/nds32.md: Support TLS and PIC.
6338 * config/nds32/nds32.c: Support TLS and PIC.
6339 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6340 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6341 predicate.
6342
6343 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6344
6345 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6346 mode with E_ prefix.
6347
6348 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6349 Chung-Ju Wu <jasonwucj@gmail.com>
6350
6351 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6352 * config/nds32/nds32-md-auxiliary.c
6353 (symbolic_reference_mentioned_p): New.
6354 (nds32_legitimize_ict_address): New.
6355 (nds32_expand_ict_move): New.
6356 (nds32_indirect_call_referenced_p): New.
6357 (nds32_symbol_binds_local_p): Delete.
6358 (nds32_long_call_p): Modify.
6359 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6360 * config/nds32/nds32-protos.h
6361 (symbolic_reference_mentioned_p): Declare.
6362 (nds32_legitimize_ict_address): Declare.
6363 (nds32_expand_ict_move): Declare.
6364 (nds32_indirect_call_referenced_p): Declare.
6365 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6366 (nds32_relax_group): Use nds32_ict_const_p as condition.
6367 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6368 (nds32_asm_file_start): Output ict_model directive in asm code.
6369 (nds32_legitimate_address_p): Consider indirect call.
6370 (nds32_print_operand): Consider indirect call.
6371 (nds32_print_operand_address): Consider indirect call.
6372 (nds32_insert_attributes): Handle "indirect_call" attribute.
6373 (TARGET_LEGITIMATE_ADDRESS_P): Define.
6374 (TARGET_LEGITIMATE_CONSTANT_P): Define.
6375 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6376 (TARGET_DELEGITIMIZE_ADDRESS): Define.
6377 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6378 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6379 (TARGET_ICT_MODEL_SMALL): Define.
6380 (TARGET_ICT_MODEL_LARGE): Define.
6381 * config/nds32/nds32.md (movsi): Consider ict model.
6382 (call, call_value): Consider ict model.
6383 (sibcall, sibcall_value): Consider ict model.
6384 * config/nds32/nds32.opt (mict-model): New option.
6385 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6386 model.
6387
6388 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
6389 Monk Chiang <sh.chiang04@gmail.com>
6390 Jim Wilson <jimw@sifive.com>
6391
6392 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6393 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
6394 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6395 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6396 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
6397 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6398 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6399 compute save_libcall_adjustment properly.
6400 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6401 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6402 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6403 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6404 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6405 (ABI_SPEC): Handle mabi=ilp32e.
6406 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6407 (RVE): Add RVE mask.
6408 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6409 <-march>: Add rv32e as an example.
6410
6411 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
6412
6413 PR c++/82899
6414 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6415 (intra_create_variable_infos): Handle C++ constructors.
6416
6417 2018-05-18 Martin Liska <mliska@suse.cz>
6418
6419 * passes.def: Remove a redundant pass.
6420
6421 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
6422
6423 PR bootstrap/85838
6424 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6425
6426 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6427
6428 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6429 (ARMv4): Update.
6430 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6431 (ARMv6m): Update.
6432 (armv2, armv2a, armv3, armv3m): Delete architectures.
6433 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6434 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6435 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6436 Delete cpus.
6437 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6438 (*mulsidi3adddi): Likewise.
6439 (mulsidi3): Likewise.
6440 (*mulsidi3_nov6): Likewise.
6441 (umulsidi3): Likewise.
6442 (umulsidi3_nov6): Likewise.
6443 (umaddsidi4): Likewise.
6444 (*umulsidi3adddi): Likewise.
6445 (smulsi3_highpart): Likewise.
6446 (*smulsi3_highpart_nov6): Likewise.
6447 (umulsi3_highpart): Likewise.
6448 (*umulsi3_highpart_nov6): Likewise.
6449 * config/arm/arm.h (arm_arch3m): Delete.
6450 * config/arm/arm.c (arm_arch3m): Delete.
6451 (arm_option_override_internal): Update armv3-related comment.
6452 (arm_configure_build_target): Delete use of isa_bit_mode32.
6453 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
6454 (arm_rtx_costs_internal): Delete check of arm_arch3m.
6455 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
6456 (mulsa3): Likewise.
6457 (mulusa3): Likewise.
6458 * config/arm/arm-protos.h (arm_arch3m): Delete.
6459 * config/arm/arm-tables.opt: Regenerate.
6460 * config/arm/arm-tune.md: Likewise.
6461 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
6462 deleted architectures.
6463
6464 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6465
6466 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
6467 (armv5t, armv5te): New features.
6468 (ARMv5, ARMv5e): Delete fgroups.
6469 (ARMv5t, ARMv5te): Adjust for above changes.
6470 (ARMv6m): Likewise.
6471 (armv5, armv5e): Delete arches.
6472 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
6473 arm_arch5.
6474 (*call_reg_arm): Likewise.
6475 (*call_value_reg_armv5): Likewise.
6476 (*call_value_reg_arm): Likewise.
6477 (*call_symbol): Likewise.
6478 (*call_value_symbol): Likewise.
6479 (*sibcall_insn): Likewise.
6480 (*sibcall_value_insn): Likewise.
6481 (clzsi2): Likewise.
6482 (prefetch): Likewise.
6483 (define_split and define_peephole2 dependent on arm_arch5):
6484 Likewise.
6485 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
6486 arm_arch5e.
6487 (TARGET_ARM_QBIT): Likewise.
6488 (TARGET_DSP_MULTIPLY): Likewise.
6489 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
6490 (arm_arch5, arm_arch5e): Delete.
6491 (arm_arch5t, arm_arch5te): Declare.
6492 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6493 (arm_arch5t): Declare.
6494 (arm_option_reconfigure_globals): Update for the above.
6495 (arm_options_perform_arch_sanity_checks): Update comment, replace
6496 use of arm_arch5 with arm_arch5t.
6497 (use_return_insn): Likewise.
6498 (arm_emit_call_insn): Likewise.
6499 (output_return_instruction): Likewise.
6500 (arm_final_prescan_insn): Likewise.
6501 (arm_coproc_builtin_available): Likewise.
6502 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6503 arm_arch5e with arm_arch5t and arm_arch5te.
6504 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6505 (arm_arch5t, arm_arch5te): Declare.
6506 * config/arm/arm-tables.opt: Regenerate.
6507 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6508 * config/arm/t-multilib: Likewise.
6509 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6510 instead of arm_arch5.
6511 (*call_reg_thumb1): Likewise.
6512 (*call_value_reg_thumb1_v5): Likewise.
6513 (*call_value_reg_thumb1): Likewise.
6514 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6515 unreachable path.
6516 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6517
6518 2018-05-18 Martin Liska <mliska@suse.cz>
6519
6520 PR gcov-profile/84846
6521 * doc/gcov.texi: Document -t option of gcov tool.
6522
6523 2018-05-18 Martin Liska <mliska@suse.cz>
6524
6525 PR gcov-profile/84846
6526 * gcov.c (print_usage): Add new -t option.
6527 (process_args): Handle the option.
6528 (generate_results): Use stdout as output when requested by
6529 the option.
6530
6531 2018-05-18 Martin Liska <mliska@suse.cz>
6532
6533 PR gcov-profile/84846
6534 * coverage.c (coverage_init): Write PWD to .gcno file.
6535 * doc/gcov.texi: Document how working directory is printed.
6536 * gcov-dump.c (dump_gcov_file): Print PWD.
6537 * gcov.c (output_intermediate_file): Likewise.
6538 (read_graph_file): Read PWD string.
6539 (output_lines): Print PWD.
6540
6541 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6542
6543 PR middle-end/85817
6544 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6545 for retval and return false if all args to phi are zero.
6546
6547 2018-05-18 Richard Biener <rguenther@suse.de>
6548
6549 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6550 method.
6551 (evrp_dom_walker::before_dom_children): Call it.
6552
6553 2018-05-18 Richard Biener <rguenther@suse.de>
6554
6555 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6556 results when processing array refs with variable index.
6557
6558 2018-05-18 Toon Moene <toon@moene.org>
6559
6560 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6561 directly after that of -floop-interchange. Indicate that both
6562 options are enabled by default when specifying -O3.
6563
6564 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6565
6566 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6567 iterator. Delete separate integer-mode vec_set<mode> expander.
6568 (aarch64_simd_vec_setv2di): Delete.
6569 (vec_setv2di): Delete.
6570 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6571 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
6572 the "w, r" alternative.
6573
6574 2018-05-18 Martin Liska <mliska@suse.cz>
6575
6576 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6577 * tree-pass.h (make_pass_lower_switch_O0): New function.
6578 * tree-switch-conversion.c (node_has_low_bound): Remove.
6579 (node_has_high_bound): Likewise.
6580 (node_is_bounded): Likewise.
6581 (class pass_lower_switch): Make it a template type and create
6582 two instances.
6583 (pass_lower_switch::execute): Add template argument.
6584 (make_pass_lower_switch): New function.
6585 (make_pass_lower_switch_O0): New function.
6586 (do_jump_if_equal): Remove.
6587 (emit_case_nodes): Simplify to just handle all 3 cases and leave
6588 all the hard work to tree optimization passes.
6589
6590 2018-05-18 Martin Liska <mliska@suse.cz>
6591
6592 * dbgcnt.c (limit_low): Renamed from limit.
6593 (limit_high): New variable.
6594 (dbg_cnt_is_enabled): Check for upper limit.
6595 (dbg_cnt): Adjust dumping.
6596 (dbg_cnt_set_limit_by_index): Add new argument for high
6597 value.
6598 (dbg_cnt_set_limit_by_name): Likewise.
6599 (dbg_cnt_process_single_pair): Parse new format.
6600 (dbg_cnt_process_opt): Use strtok.
6601 (dbg_cnt_list_all_counters): Remove 'value' and add
6602 'limit_high'.
6603 * doc/invoke.texi: Document changes.
6604
6605 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
6606
6607 * doc/sourcebuild.texi (scalar_all_fma): Document.
6608 * tree.def (FMA_EXPR): Delete.
6609 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6610 * internal-fn.c (ternary_direct): New macro.
6611 (expand_ternary_optab_fn): Likewise.
6612 (direct_ternary_optab_supported_p): Likewise.
6613 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6614 * builtins.c (fold_builtin_fma): Delete.
6615 (fold_builtin_3): Don't call it.
6616 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6617 * expr.c (expand_expr_real_2): Likewise.
6618 * fold-const.c (operand_equal_p): Likewise.
6619 (fold_ternary_loc): Likewise.
6620 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6621 * gimple.c (DEFTREECODE): Likewise.
6622 * gimplify.c (gimplify_expr): Likewise.
6623 * optabs-tree.c (optab_for_tree_code): Likewise.
6624 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6625 * tree-eh.c (operation_could_trap_p): Likewise.
6626 (stmt_could_throw_1_p): Likewise.
6627 * tree-inline.c (estimate_operator_cost): Likewise.
6628 * tree-pretty-print.c (dump_generic_node): Likewise.
6629 (op_code_prio): Likewise.
6630 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6631 * tree-ssa-operands.c (get_expr_operands): Likewise.
6632 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6633 * fold-const-call.h (fold_fma): Delete.
6634 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6635 CFN_FNMA and CFN_FNMS.
6636 (fold_fma): Delete.
6637 * genmatch.c (combined_fn): New enum.
6638 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6639 (commutative_op): New function.
6640 (commutate): Use it. Handle more than 2 operands.
6641 (dt_operand::gen_gimple_expr): Use commutative_op.
6642 (parser::parse_expr): Allow :c to be used with non-binary
6643 operators if the commutative operand is known.
6644 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6645 CFN_FMS, CFN_FNMA and CFN_FNMS.
6646 (backprop::process_assign_use): Remove FMA_EXPR handling.
6647 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6648 (gen_hsa_fma): New function.
6649 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6650 IFN_FNMA and IFN_FNMS.
6651 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6652 * gimple-fold.h (follow_all_ssa_edges): Declare.
6653 * gimple-fold.c (follow_all_ssa_edges): New function.
6654 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6655 gimple_build interface and use follow_all_ssa_edges to fold the result.
6656 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6657 instead of checking for optabs directly.
6658 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6659 rather than FMA_EXPRs.
6660 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6661 call to IFN_FMA instead of an FMA_EXPR.
6662
6663 2018-05-17 Jim Wilson <jimw@sifive.com>
6664
6665 * expr.c (do_tablejump): When converting index to Pmode, if we have a
6666 sign extended promoted subreg, and the range does not have the sign bit
6667 set, then do a sign extend.
6668
6669 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6670 test, check for sign extended subreg and/or constant operands, and
6671 do a sign extend in that case.
6672
6673 2018-05-17 Steve Ellcey <sellcey@cavium.com>
6674
6675 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6676 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6677 Add untyped.
6678 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6679 Change logics_shift_reg to logics_shift_imm.
6680 (thunderx2t99_fp_loadpair_basic): Delete.
6681 (thunderx2t99_fp_storepair_basic): Delete.
6682 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6683 (thunderx2t99_asimd_polynomial): Delete.
6684 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6685 and neon_fp_mul_d_scalar_q.
6686 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6687 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6688 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6689 (thunderx2t99_asimd_lut): Add missing tbl types.
6690 (thunderx2t99_asimd_ext): Delete.
6691 (thunderx2t99_asimd_load1_1_mult): Delete.
6692 (thunderx2t99_asimd_load1_2_mult): Delete.
6693 (thunderx2t99_asimd_load1_ldp): New.
6694 (thunderx2t99_asimd_load1): New.
6695 (thunderx2t99_asimd_load2): Add missing *load2* types.
6696 (thunderx2t99_asimd_load3): New.
6697 (thunderx2t99_asimd_load4): New.
6698 (thunderx2t99_asimd_store1_1_mult): Delete.
6699 (thunderx2t99_asimd_store1_2_mult): Delete.
6700 (thunderx2t99_asimd_store2_mult): Delete.
6701 (thunderx2t99_asimd_store2_onelane): Delete.
6702 (thunderx2t99_asimd_store_stp): New.
6703 (thunderx2t99_asimd_store1): New.
6704 (thunderx2t99_asimd_store2): New.
6705 (thunderx2t99_asimd_store3): New.
6706 (thunderx2t99_asimd_store4): New.
6707
6708 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
6709
6710 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6711 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
6712
6713 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
6714 Segher Boessenkool <segher@kernel.crashing.org>
6715
6716 PR target/85698
6717 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6718 operand.
6719
6720 2018-05-17 Richard Biener <rguenther@suse.de>
6721
6722 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6723 for pruning loop and prune defs feeding only already visited PHIs.
6724
6725 2018-05-17 Richard Biener <rguenther@suse.de>
6726
6727 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6728
6729 2018-05-17 Bin Cheng <bin.cheng@arm.com>
6730 Richard Biener <rguenther@suse.de>
6731
6732 PR tree-optimization/85793
6733 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6734 for VMAT_ELEMENTWISE.
6735
6736 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6737
6738 * internal-fn.h (lookup_internal_fn): Declare
6739 * internal-fn.c (lookup_internal_fn): New function.
6740 * gimple.c (gimple_build_call_from_tree): Handle calls to
6741 internal functions.
6742 * gimple-pretty-print.c (dump_gimple_call): Print "." before
6743 internal function names.
6744 * tree-pretty-print.c (dump_generic_node): Likewise.
6745 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6746
6747 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6748
6749 * gimple-fold.h (gimple_build): Make the function forms take
6750 combined_fn rather than built_in_function.
6751 (gimple_simplify): Likewise.
6752 * gimple-match-head.c (gimple_simplify): Likewise.
6753 * gimple-fold.c (gimple_build): Likewise.
6754 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6755 rather than gimple_build_call_internal.
6756 (get_initial_defs_for_reduction): Likewise.
6757 (vect_create_epilog_for_reduction): Likewise.
6758 (vectorizable_live_operation): Likewise.
6759
6760 2018-05-17 Martin Liska <mliska@suse.cz>
6761
6762 * gimple-ssa-sprintf.c (format_directive): Do not use
6763 space in between 'G_' and '('.
6764
6765 2018-05-17 Jakub Jelinek <jakub@redhat.com>
6766
6767 PR target/85323
6768 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6769 even if the mask is not all ones.
6770
6771 PR target/85323
6772 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6773 vector.
6774 (ix86_gimple_fold_builtin): Likewise.
6775
6776 PR target/85323
6777 * config/i386/i386.c: Include tree-vector-builder.h.
6778 (ix86_vector_shift_count): New function.
6779 (ix86_fold_builtin): Fold shift builtins by scalar count.
6780 (ix86_gimple_fold_builtin): Likewise.
6781
6782 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6783 _mm512_setzero): New intrinsics.
6784
6785 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6786 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6787
6788 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6789 code generation for cases where splatting a value is not useful.
6790 * simplify-rtx.c (simplify_ternary_operation): Simplify
6791 vec_merge across a vec_duplicate and a paradoxical subreg forming
6792 a vector mode to a vec_concat.
6793
6794 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
6795
6796 * config.gcc: Support "goldmont-plus".
6797 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6798 "goldmont-plus".
6799 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6800 PROCESSOR_GOLDMONT_PLUS.
6801 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6802 (processor_target_table): Add "goldmont-plus".
6803 (PTA_GOLDMONT_PLUS): Define.
6804 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6805 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6806 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6807 (fold_builtin_cpu): Add "goldmont-plus".
6808 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6809 (ix86_option_override_internal): Add "goldmont-plus".
6810 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6811 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6812 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6813 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6814
6815 2018-05-17 Richard Biener <rguenther@suse.de>
6816
6817 PR tree-optimization/85757
6818 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6819 remove defs that only feed that PHI from further processing.
6820
6821 2018-05-16 Jim Wilson <jimw@sifive.com>
6822
6823 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6824 asterisk to name.
6825 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6826
6827 2018-05-16 Mark Wielaard <mark@klomp.org>
6828
6829 * dwarf2out.c (count_index_strings): New function.
6830 (output_indirect_strings): Call count_index_strings and generate
6831 header for dwarf_version >= 5.
6832
6833 2018-05-16 Mark Wielaard <mark@klomp.org>
6834
6835 * dwarf2out.c (dwarf_FORM): New function.
6836 (set_indirect_string): Use dwarf_FORM.
6837 (reset_indirect_string): Likewise.
6838 (size_of_die): Likewise.
6839 (value_format): Likewise.
6840 (output_die): Likewise.
6841 (add_skeleton_AT_string): Likewise.
6842 (output_macinfo_op): Likewise.
6843 (index_string): Likewise.
6844 (output_index_string_offset): Likewise.
6845 (output_index_string): Likewise.
6846 (count_index_strings): Likewise.
6847
6848 2018-05-16 Carl Love <cel@us.ibm.com>
6849
6850 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6851 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6852
6853 2018-05-16 Martin Jambor <mjambor@suse.cz>
6854
6855 * ipa-prop.c (ipa_free_all_edge_args): Remove.
6856 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6857
6858 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
6859
6860 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6861 (fnma<mode>4): Likewise.
6862 (fms<mode>4): Likewise.
6863 (fnms<mode>4): Likewise.
6864 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6865 (aarch64_fnma<mode>4): Likewise.
6866 (aarch64_fms<mode>4): Likewise.
6867 (aarch64_fnms<mode>4): Likewise.
6868 (aarch64_fnmadd<mode>4): Likewise.
6869
6870 2018-05-16 Jason Merrill <jason@redhat.com>
6871
6872 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
6873
6874 2018-05-16 Richard Biener <rguenther@suse.de>
6875
6876 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6877 (dump_stmt_cost): Declare.
6878 (add_stmt_cost): Dump cost we add.
6879 (add_stmt_costs): New function.
6880 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6881 No longer exported.
6882 (vect_analyze_stmt): Adjust prototype.
6883 (vectorizable_condition): Likewise.
6884 (vectorizable_live_operation): Likewise.
6885 (vectorizable_reduction): Likewise.
6886 (vectorizable_induction): Likewise.
6887 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6888 cost vector to pass to vectorizable_ and record afterwards.
6889 (vect_model_reduction_cost): Take cost vector argument and adjust.
6890 (vect_model_induction_cost): Likewise.
6891 (vectorizable_reduction): Likewise.
6892 (vectorizable_induction): Likewise.
6893 (vectorizable_live_operation): Likewise.
6894 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6895 SLP_TREE_NUMBER_OF_VEC_STMTS.
6896 (vect_analyze_slp_cost_1): Remove.
6897 (vect_analyze_slp_cost): Likewise.
6898 (vect_slp_analyze_node_operations): Take visited args and
6899 a target cost vector. Avoid processing already visited stmt sets.
6900 (vect_slp_analyze_operations): Use a local cost vector to gather
6901 costs and register those of non-discarded instances.
6902 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6903 (vect_schedule_slp_instance): Remove copying of
6904 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
6905 zero.
6906 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6907 adding cost. Record cost entry location.
6908 (vect_prologue_cost_for_slp_op): Function to compute cost of
6909 a constant or invariant generated for SLP vect in the prologue,
6910 split out from vect_analyze_slp_cost_1.
6911 (vect_model_simple_cost): Make static. Adjust for SLP costing.
6912 (vect_model_promotion_demotion_cost): Likewise.
6913 (vect_model_store_cost): Likewise, make static.
6914 (vect_model_load_cost): Likewise.
6915 (vectorizable_bswap): Add cost vector arg and adjust.
6916 (vectorizable_call): Likewise.
6917 (vectorizable_simd_clone_call): Likewise.
6918 (vectorizable_conversion): Likewise.
6919 (vectorizable_assignment): Likewise.
6920 (vectorizable_shift): Likewise.
6921 (vectorizable_operation): Likewise.
6922 (vectorizable_store): Likewise.
6923 (vectorizable_load): Likewise.
6924 (vectorizable_condition): Likewise.
6925 (vectorizable_comparison): Likewise.
6926 (can_vectorize_live_stmts): Likewise.
6927 (vect_analyze_stmt): Likewise.
6928 (vect_transform_stmt): Adjust calls to vectorizable_*.
6929 * tree-vectorizer.c: Include gimple-pretty-print.h.
6930 (dump_stmt_cost): New function.
6931
6932 2018-05-16 Richard Biener <rguenther@suse.de>
6933
6934 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6935 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6936 * tree-ssa-dse.c: Include tree-ssa-loop.h.
6937 (check_name): New callback.
6938 (dse_classify_store): Track cycles via a visited bitmap of PHI
6939 defs and simplify handling of in-loop and across loop dead stores
6940 and properly fail for loop-variant refs. Handle byte-tracking with
6941 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6942 limiting the walk.
6943
6944 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
6945
6946 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6947 (vect_get_mask_type_for_stmt): Likewise.
6948 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6949 split out from...
6950 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
6951 to determine the statement's vector type and the vector type that
6952 should be used for calculating nunits. Deal with cases in which
6953 the type has to be deferred.
6954 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6955 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6956 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6957 (vect_determine_vf_for_stmt): New functions, split out from...
6958 (vect_determine_vectorization_factor): ...here.
6959 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6960 (vect_get_mask_type_for_stmt): New functions, split out from
6961 vect_determine_vectorization_factor.
6962
6963 2018-05-16 Richard Biener <rguenther@suse.de>
6964
6965 * tree-cfg.c (verify_gimple_assign_ternary): Properly
6966 verify the [VEC_]COND_EXPR embedded comparison.
6967
6968 2018-05-15 Martin Sebor <msebor@redhat.com>
6969
6970 PR tree-optimization/85753
6971 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6972 RECORD_TYPE in addition to ARRAY_TYPE.
6973
6974 2018-05-15 Martin Sebor <msebor@redhat.com>
6975
6976 PR middle-end/85643
6977 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6978
6979 2018-05-15 Richard Biener <rguenther@suse.de>
6980
6981 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6982 add by_clobber_p one. Change algorithm to collect all defs
6983 representing uses we need to walk and try reducing them to
6984 a single one before failing.
6985 (dse_dom_walker::dse_optimize_stmt): Adjust.
6986
6987 2018-05-13 Mark Wielaard <mark@klomp.org>
6988
6989 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6990 (size_of_loc_descr): Likewise.
6991 (output_loc_operands): Likewise.
6992 (output_loc_operands_raw): Likewise.
6993 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6994 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6995 (hash_loc_operands): Likewise.
6996 (compare_loc_operands): Likewise.
6997
6998 2018-05-14 Mark Wielaard <mark@klomp.org>
6999
7000 * dwarf2out.c (count_index_addrs): New function.
7001 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7002
7003 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7004
7005 PR tree-optimization/83648
7006 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7007 return value as malloc candidate.
7008
7009 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7010
7011 PR ipa/85734
7012 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7013 param as true in call to suggest_attribute.
7014
7015 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7016
7017 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7018 -mreadonly-in-sdata.
7019
7020 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7021
7022 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7023 New pattern.
7024 (aarch64_crypto_aesd_fused): Likewise.
7025
7026 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7027
7028 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7029 (movsi_aarch64): Likewise.
7030 (load_pairsi): Likewise.
7031 (load_pairdi): Likewise.
7032 (store_pairsi): Likewise.
7033 (store_pairdi): Likewise.
7034 (load_pairsf): Likewise.
7035 (load_pairdf): Likewise.
7036 (store_pairsf): Likewise.
7037 (store_pairdf): Likewise.
7038 (zero_extend): Likewise.
7039 (trunc): Swap alternatives.
7040 (fcvt_target): Add '?' to prefer w over r.
7041
7042 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7043
7044 PR target/85756
7045 * config/i386/i386.md: Disallow non-commutative arithmetics in
7046 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7047 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7048 in the peephole2 before it.
7049
7050 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7051
7052 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7053 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7054 (ix86_handle_option): Handle -mcldemote.
7055 * config.gcc: New header.
7056 * config/i386/cldemoteintrin.h: New file.
7057 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7058 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7059 -mcldemote.
7060 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7061 OPTION_MASK_ISA_CLDEMOTE.
7062 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7063 (ix86_valid_target_attribute_inner_p): Ditto.
7064 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7065 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7066 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7067 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7068 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7069 (cldemote): New.
7070 * config/i386/i386.opt: Add -mcldemote.
7071 * config/i386/x86intrin.h: New header.
7072 * doc/invoke.texi: Add -mcldemote.
7073
7074 2018-05-14 Richard Biener <rguenther@suse.de>
7075
7076 * doc/match-and-simplify.texi: Adjust :s documentation.
7077
7078 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7079
7080 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7081 intended memcpy size.
7082 (REORDER_45): Likewise.
7083
7084 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7085
7086 * sort.cc: New file.
7087 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7088 * vec.c (qsort_chk): Use gcc_qsort.
7089 * Makefile.in (OBJS-libcommon): Add sort.o.
7090 (build/sort.o): New target. Use it...
7091 (BUILD_RTL): ... here, and...
7092 (build/gencfn-macros): ... here, and...
7093 (build/genmatch): ... here.
7094
7095 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7096 Chung-Ju Wu <jasonwucj@gmail.com>
7097
7098 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7099 * config/nds32/nds32-graywolf.md: New file.
7100 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7101 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7102 pipeline.
7103 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7104 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7105 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7106 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7107 * config/nds32/pipelines.md: Include n15 settings.
7108
7109 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7110 Chung-Ju Wu <jasonwucj@gmail.com>
7111
7112 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7113 * config/nds32/nds32-n13.md: New file.
7114 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7115 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7116 pipeline.
7117 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7118 * config/nds32/nds32.md (pipeline_model): Add n13.
7119 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7120 * config/nds32/pipelines.md: Include n13 settings.
7121
7122 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7123 Chung-Ju Wu <jasonwucj@gmail.com>
7124
7125 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7126 * config/nds32/nds32-n10.md: New file.
7127 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7128 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7129 pipeline.
7130 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7131 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7132 * config/nds32/nds32.md (pipeline_model): Add n10.
7133 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7134 * config/nds32/pipelines.md: Include n10 settings.
7135
7136 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7137 Kito Cheng <kito.cheng@gmail.com>
7138 Chung-Ju Wu <jasonwucj@gmail.com>
7139
7140 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7141 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7142 Add enum values for DSP extension instructions.
7143 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7144 New constraints.
7145 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7146 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7147 New code iterators.
7148 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7149 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7150 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7151 * config/nds32/nds32-intrinsic.md: Likewise.
7152 * config/nds32/nds32_intrinsic.h: Likewise.
7153 * config/nds32/nds32-md-auxiliary.c: Likewise.
7154 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7155 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7156 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7157 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7158 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7159 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7160 TYPE_DMAC in switch statement.
7161 * config/nds32/nds32.c: New checking and implementation for DSP
7162 extension instructions.
7163 * config/nds32/nds32.h: Likewise.
7164 * config/nds32/nds32.md: Likewise.
7165 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7166 * config/nds32/predicates.md: Implement new predicates for DSP
7167 extension.
7168
7169 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7170
7171 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7172 Reformat alternatives and attributes so it is easier to identify
7173 which constraints/attributes go with which instruction.
7174 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7175 (mov<mode>_softfloat32, FMOVE64): Likewise.
7176 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7177 (mov<mode>_softfloat64, FMOVE64): Likewise.
7178
7179 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7180
7181 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7182 subsection.
7183 (Basic PowerPC Built-in Functions): The new name of the
7184 subsection previously known as "PowerPC Built-in Functions".
7185 (Basic PowerPC Built-in Functions Available on all Configurations):
7186 New subsubsection.
7187 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7188 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7189 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7190 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7191
7192 2018-05-11 Martin Jambor <mjambor@suse.cz>
7193
7194 PR ipa/85655
7195 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7196 single const.
7197
7198 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7199
7200 PR target/85733
7201 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7202
7203 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7204
7205 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7206 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7207 (ix86_handle_option): Handle -mwaitpkg.
7208 * config.gcc: New header.
7209 * config/i386/cpuid.h (bit_WAITPKG): New bit.
7210 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7211 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7212 function type.
7213 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7214 OPTION_MASK_ISA_WAITPKG.
7215 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7216 (ix86_option_override_internal): Add PTA_WAITPKG.
7217 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7218 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7219 IX86_BUILTIN_TPAUSE.
7220 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7221 __builtin_ia32_umwait and __builtin_ia32_tpause.
7222 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7223 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7224 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7225 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7226 UNSPECV_TPAUSE): New.
7227 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7228 * config/i386/i386.opt: Add -mwaitpkg.
7229 * config/i386/waitpkgintrin.h: New file.
7230 * config/i386/x86intrin.h: New header.
7231 * doc/invoke.texi: Add -mwaitpkg.
7232
7233 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7234
7235 PR target/85606
7236 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7237 equivalent.
7238 (cortex-m0): Use armv6s-m isa.
7239 (cortex-m0plus): Likewise.
7240 (cortex-m1): Likewise.
7241 (cortex-m0.small-multiply): Likewise.
7242 (cortex-m0plus.small-multiply): Likewise.
7243 (cortex-m1.small-multiply): Likewise.
7244
7245 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
7246 Jakub Jelinek <jakub@redhat.com>
7247
7248 PR tree-optimization/85692
7249 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7250 source permute as well.
7251
7252 2018-05-11 Martin Liska <mliska@suse.cz>
7253
7254 PR sanitizer/85556
7255 * doc/extend.texi: Document LLVM style format for no_sanitize
7256 attribute.
7257
7258 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7259
7260 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7261 mode_supports_vsx_dform_quad to mode_supports_dq_form.
7262 (mode_supports_vsx_dform_quad): Likewise.
7263 (mode_supports_vmx_dform): Move these functions to be next to the
7264 other mode_supports functions.
7265 (mode_supports_dq_form): Likewise.
7266 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7267 mode_supports_dq_form.
7268 (reg_offset_addressing_ok_p): Likewise.
7269 (offsettable_ok_by_alignment): Likewise.
7270 (rs6000_legitimate_offset_address_p): Likewise.
7271 (legitimate_lo_sum_address_p): Likewise.
7272 (rs6000_legitimize_address): Likewise.
7273 (rs6000_legitimize_reload_address): Likewise.
7274 (rs6000_secondary_reload_inner): Likewise.
7275 (rs6000_preferred_reload_class): Likewise.
7276 (rs6000_output_move_128bit): Likewise.
7277
7278 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7279
7280 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7281 Generate SImode target register for null target.
7282 <case IX86_BUILTIN_XGETBV>: Ditto.
7283 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7284 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7285
7286 2018-05-10 Carl Love <cel@us.ibm.com>
7287
7288 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7289 dcbtt and dcbtstt if operands[2] is 0.
7290
7291 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7292
7293 PR target/85693
7294 * config/i386/sse.md (usadv64qi): New expander.
7295
7296 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
7297
7298 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7299 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7300 -maltivec=be support.
7301 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7302 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7303 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7304 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7305 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7306 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7307 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7308 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7309 altivec_vsumsws): Adjust.
7310 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7311 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7312 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7313 support.
7314 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7315 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7316 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7317 (altivec_lve<VI_char>x): Delete expand.
7318 (*altivec_lve<VI_char>x_internal): Rename to...
7319 (altivec_lve<VI_char>x): ... this.
7320 (altivec_lvxl_<mode>): Delete expand.
7321 (*altivec_lvxl_<mode>_internal): Rename to ...
7322 (altivec_lvxl_<mode>): ... this.
7323 (altivec_stvxl_<mode>): Delete expand.
7324 (*altivec_stvxl_<mode>_internal): Rename to ...
7325 (altivec_stvxl_<mode>): ... this.
7326 (altivec_stve<VI_char>x): Delete expand.
7327 (*altivec_stve<VI_char>x_internal): Rename to ...
7328 (altivec_stve<VI_char>x): ... this.
7329 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7330 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7331 reduc_plus_scal_<mode>): Adjust.
7332 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7333 comment.
7334 (rs6000_cpu_cpp_builtins): Adjust.
7335 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7336 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7337 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7338 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7339 -maltivec=be support.
7340 (rs6000_split_vec_extract_var): Adjust.
7341 (rs6000_split_v4si_init): Adjust.
7342 (swap_selector_for_mode): Delete.
7343 (altivec_expand_lvx_be, altivec_expand_stvx_be,
7344 altivec_expand_stvex_be): Delete.
7345 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7346 -maltivec=be support.
7347 (rs6000_gimple_fold_builtin): Ditto.
7348 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7349 Adjust.
7350 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7351 (TARGET_DIRECT_MOVE_64BIT): Adjust.
7352 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7353 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7354 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7355 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7356 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7357 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7358 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7359 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7360 anonymous split): Adjust.
7361 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7362 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7363
7364 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
7365
7366 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7367 when --with-gxx-include-dir is also specified.
7368 * configure: Regenerate.
7369
7370 2018-05-09 Jim Wilson <jimw@sifive.com>
7371
7372 PR target/84797
7373 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7374 * config/riscv/t-withmultilib: New.
7375 * config/riscv/withmultilib.h: New.
7376 * doc/install.texi: Document RISC-V --with-multilib-list support.
7377
7378 2018-05-09 Richard Biener <rguenther@suse.de>
7379
7380 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7381 vector.
7382 (vect_bb_vectorization_profitable_p): Adjust. Compute
7383 actual scalar cost using the cost vector and the add_stmt_cost
7384 machinery.
7385
7386 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7387
7388 PR rtl-optimization/85645
7389 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7390 in the REG_CFA_REGISTER note for LR, don't leave it empty.
7391
7392 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7393
7394 PR rtl-optimization/85645
7395 * shrink-wrap.c (spread_components): Return a boolean saying if
7396 anything was changed.
7397 (try_shrink_wrapping_separate): Iterate spread_components until
7398 nothing changes anymore.
7399
7400 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7401
7402 PR rtl-optimization/85645
7403 * regrename.c (build_def_use): Also kill the chains that include the
7404 destination of a REG_CFA_REGISTER note.
7405
7406 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7407
7408 PR rtl-optimization/85645
7409 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7410 insn that has a REG_CFA_REGISTER note.
7411
7412 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
7413
7414 * cfgexpand.c (expand_clobber): New function.
7415 (expand_gimple_stmt_1): Use it.
7416 * tree-vect-stmts.c (vect_clobber_variable): New function,
7417 split out from...
7418 (vectorizable_simd_clone_call): ...here.
7419 (vectorizable_store): Emit a clobber either side of an
7420 IFN_STORE_LANES sequence.
7421 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7422
7423 2018-05-09 Tom de Vries <tom@codesourcery.com>
7424
7425 PR target/85626
7426 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7427 (define_insn "trap_if_false"): Add exit after trap.
7428
7429 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
7430
7431 PR rtl-optimization/85638
7432 * bb-reorder.c: Include common/common-target.h.
7433 (create_forwarder_block): New function extracted from...
7434 (fix_up_crossing_landing_pad): ...here. Rename into...
7435 (dw2_fix_up_crossing_landing_pad): ...this.
7436 (sjlj_fix_up_crossing_landing_pad): New function.
7437 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7438 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7439 from both partitions and exit the loop after one iteration.
7440
7441 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
7442
7443 Revert:
7444 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7445 subsection.
7446 (Basic PowerPC Built-in Functions): The new name of the
7447 subsection previously known as "PowerPC Built-in Functions".
7448 (Basic PowerPC Built-in Functions Available on all Configurations):
7449 New subsubsection.
7450 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7451 subsubsection.
7452 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7453 subsubsection.
7454 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7455 subsubsection.
7456 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7457 subsubsection.
7458
7459 2018-05-08 Jim Wilson <jimw@sifive.com>
7460
7461 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
7462 (LD_EMUL_SUFFIX): New.
7463 (LINK_SPEC): Use it.
7464
7465 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
7466
7467 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7468 subsection.
7469 (Basic PowerPC Built-in Functions): The new name of the
7470 subsection previously known as "PowerPC Built-in Functions".
7471 (Basic PowerPC Built-in Functions Available on all Configurations):
7472 New subsubsection.
7473 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7474 subsubsection.
7475 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7476 subsubsection.
7477 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7478 subsubsection.
7479 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7480 subsubsection.
7481
7482 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7483
7484 PR target/85683
7485 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
7486 after cmpelim optimization.
7487
7488 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
7489
7490 * config.gcc: Support "goldmont".
7491 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
7492 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7493 PROCESSOR_GOLDMONT.
7494 * config/i386/i386.c (m_GOLDMONT): Define.
7495 (processor_target_table): Add "goldmont".
7496 (PTA_GOLDMONT): Define.
7497 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7498 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7499 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7500 (fold_builtin_cpu): Add "goldmont".
7501 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7502 (ix86_option_override_internal): Add "goldmont".
7503 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7504 (processor_type): Add PROCESSOR_GOLDMONT.
7505 * config/i386/i386.md: Add CPU "glm".
7506 * config/i386/glm.md: New file.
7507 * config/i386/x86-tune.def: Add m_GOLDMONT.
7508 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7509
7510 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7511
7512 PR target/85572
7513 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7514 E_V4DImode.
7515 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7516 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
7517 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
7518
7519 PR target/85317
7520 * config/i386/i386.c (ix86_fold_builtin): Handle
7521 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7522
7523 PR target/85480
7524 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7525 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7526
7527 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
7528
7529 PR target/85658
7530 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7531 (check_arch): Likewise.
7532 (check_fpu): Return the result rather than printing it.
7533 (end arch): Fix operator precedence.
7534 (end cpu): Likewise.
7535 (END): Print the result from check_fpu.
7536
7537 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7538 Alan Hayward <alan.hayward@arm.com>
7539 David Sherwood <david.sherwood@arm.com>
7540
7541 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7542 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7543 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7544 (*fcmuo<mode>_and): New patterns.
7545
7546 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7547
7548 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7549 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7550 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7551 (cmp_op, sve_imm_con): New code attributes.
7552 (SVE_COND_INT_CMP, imm_con): Delete.
7553 (cmp_op): Remove above unspecs from int attribute.
7554 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7555 to...
7556 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
7557 comparison-specific unspecs.
7558 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7559 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7560 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7561 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7562 (*vec_fcm<cmp_op><mode>): Rename to...
7563 (*fcm<cmp_op><mode>): ...this and adjust likewise.
7564 (*vec_fcmuo<mode>): Rename to...
7565 (*fcmuo<mode>): ...this and adjust likewise.
7566 (*pred_fcm<cmp_op><mode>): New pattern.
7567 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7568 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7569 functions.
7570 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7571 and UNORDERED.
7572 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7573 (aarch64_emit_sve_predicated_cond): New function.
7574 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7575 (aarch64_emit_unspec_cond_or): Replace with...
7576 (aarch64_emit_sve_or_conds): ...this new function. Use
7577 aarch64_emit_sve_ptrue_op for the individual comparisons and
7578 aarch64_emit_binop to OR them together.
7579 (aarch64_emit_inverted_unspec_cond): Replace with...
7580 (aarch64_emit_sve_inverted_cond): ...this new function. Use
7581 aarch64_emit_sve_ptrue_op for the comparison and
7582 aarch64_emit_unop to invert the result.
7583 (aarch64_expand_sve_vec_cmp_float): Update after the above
7584 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
7585
7586 2018-05-07 Nathan Sidwell <nathan@acm.org>
7587
7588 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7589 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7590 (Backwards Compatibility): Likewise.
7591
7592 2018-05-07 Luis Machado <luis.machado@linaro.org>
7593
7594 PR bootstrap/85681
7595 Revert:
7596 2018-05-07 Luis Machado <luis.machado@linaro.org>
7597
7598 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7599 <prefetch_dynamic_strides>: New const bool field.
7600 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7601 prefetch_dynamic_strides.
7602 (exynosm1_prefetch_tune): Likewise.
7603 (thunderxt88_prefetch_tune): Likewise.
7604 (thunderx_prefetch_tune): Likewise.
7605 (thunderx2t99_prefetch_tune): Likewise.
7606 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7607 to false.
7608 (aarch64_override_options_internal): Update to set
7609 PARAM_PREFETCH_DYNAMIC_STRIDES.
7610 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7611 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7612 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7613 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7614 prefetch-dynamic-strides setting.
7615
7616 2018-05-07 Luis Machado <luis.machado@linaro.org>
7617
7618 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7619 <minimum_stride>: New const int field.
7620 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7621 minimum_stride field.
7622 (exynosm1_prefetch_tune): Likewise.
7623 (thunderxt88_prefetch_tune): Likewise.
7624 (thunderx_prefetch_tune): Likewise.
7625 (thunderx2t99_prefetch_tune): Likewise.
7626 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7627 (aarch64_override_options_internal): Update to set
7628 PARAM_PREFETCH_MINIMUM_STRIDE.
7629 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7630 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7631 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7632 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7633 stride is constant and is below the minimum stride threshold.
7634
7635 2018-05-07 Luis Machado <luis.machado@linaro.org>
7636
7637 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7638 to 512.
7639
7640 2018-05-07 Luis Machado <luis.machado@linaro.org>
7641
7642 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7643 <prefetch_dynamic_strides>: New const bool field.
7644 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7645 prefetch_dynamic_strides.
7646 (exynosm1_prefetch_tune): Likewise.
7647 (thunderxt88_prefetch_tune): Likewise.
7648 (thunderx_prefetch_tune): Likewise.
7649 (thunderx2t99_prefetch_tune): Likewise.
7650 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7651 to false.
7652 (aarch64_override_options_internal): Update to set
7653 PARAM_PREFETCH_DYNAMIC_STRIDES.
7654 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7655 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7656 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7657 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7658 prefetch-dynamic-strides setting.
7659
7660 2018-05-07 Luis Machado <luis.machado@linaro.org>
7661
7662 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7663 <minimum_stride>: New const int field.
7664 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7665 minimum_stride field.
7666 (exynosm1_prefetch_tune): Likewise.
7667 (thunderxt88_prefetch_tune): Likewise.
7668 (thunderx_prefetch_tune): Likewise.
7669 (thunderx2t99_prefetch_tune): Likewise.
7670 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7671 (aarch64_override_options_internal): Update to set
7672 PARAM_PREFETCH_MINIMUM_STRIDE.
7673 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7674 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7675 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7676 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7677 stride is constant and is below the minimum stride threshold.
7678
7679 2018-05-06 Jakub Jelinek <jakub@redhat.com>
7680
7681 PR c++/85659
7682 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7683 the type is addressable. Don't force op into register if it has
7684 BLKmode.
7685
7686 2018-05-05 Roland McGrath <mcgrathr@google.com>
7687
7688 PR other/77609
7689 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7690 any section for which we don't know a specific type it should have,
7691 regardless of name. Previously this was done only for the exact
7692 names ".init_array", ".fini_array", and ".preinit_array".
7693 (default_elf_asm_named_section): Add comment about
7694 relationship with default_section_type_flags and SECTION_NOTYPE.
7695 (get_section): Don't consider it a type conflict if one side has
7696 SECTION_NOTYPE and the other doesn't, as long as neither has the
7697 SECTION_BSS et al used in the default_section_type_flags logic.
7698
7699 2018-05-05 Tom de Vries <tom@codesourcery.com>
7700
7701 PR target/85653
7702 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7703 (workaround_barsyncs): New function.
7704 (nvptx_reorg): Use workaround_barsyncs.
7705 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7706 (define_expand "nvptx_membar_cta"): New define_expand.
7707 (define_insn "*nvptx_membar_cta"): New insn.
7708
7709 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
7710
7711 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7712 To improve optimization opportunities.
7713 * builtin-types.def: The new needed builtin types for the above.
7714
7715 2018-05-04 Richard Biener <rguenther@suse.de>
7716
7717 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7718 * gimple-ssa-store-merging.c
7719 (imm_store_chain_info::output_merged_store): Remove redundant create,
7720 release split_store vector contents on failure.
7721 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7722 scalar stmt vector on cache hit.
7723
7724 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
7725
7726 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7727 Xilinx FP support.
7728 * config.gcc (powerpc-xilinx-eabi*): Remove.
7729 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7730 support.
7731 (fusion_addis_mem_combo_load): Ditto.
7732 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7733 FP support.
7734 (rs6000_cpu_cpp_builtins): Ditto.
7735 * config/rs6000/rs6000-linux.c
7736 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7737 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7738 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7739 support.
7740 (rs6000_setup_reg_addr_masks): Ditto.
7741 (rs6000_init_hard_regno_mode_ok): Ditto.
7742 (rs6000_option_override_internal): Ditto.
7743 (legitimate_lo_sum_address_p): Ditto.
7744 (rs6000_legitimize_address): Ditto.
7745 (rs6000_legitimize_reload_address): Ditto.
7746 (rs6000_legitimate_address_p): Ditto.
7747 (abi_v4_pass_in_fpr): Ditto.
7748 (setup_incoming_varargs): Ditto.
7749 (rs6000_gimplify_va_arg): Ditto.
7750 (rs6000_split_multireg_move): Ditto.
7751 (rs6000_savres_strategy): Ditto.
7752 (rs6000_emit_prologue_components): Ditto.
7753 (rs6000_emit_epilogue_components): Ditto.
7754 (rs6000_emit_prologue): Ditto.
7755 (rs6000_emit_epilogue): Ditto.
7756 (rs6000_elf_file_end): Ditto.
7757 (rs6000_function_value): Ditto.
7758 (rs6000_libcall_value): Ditto.
7759 * config/rs6000/rs6000.h: Ditto.
7760 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7761 (TARGET_MINMAX): ... this. New.
7762 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7763 * config/rs6000/rs6000.md: Remove Xilinx FP support.
7764 (*movsi_internal1_single): Delete.
7765 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7766 mfpu=, mxilinx-fpu): Delete.
7767 * config/rs6000/singlefp.h: Delete.
7768 * config/rs6000/sysv4.h: Remove Xilinx FP support.
7769 * config/rs6000/t-rs6000: Ditto.
7770 * config/rs6000/t-xilinx: Delete.
7771 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7772 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7773 (VStype_simple): Delete.
7774 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7775 * config/rs6000/xfpu.h: Delete.
7776 * config/rs6000/xfpu.md: Delete.
7777 * config/rs6000/xilinx.h: Delete.
7778 * config/rs6000/xilinx.opt: Delete.
7779 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7780 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7781
7782 2018-05-04 Tom de Vries <tom@codesourcery.com>
7783
7784 PR libgomp/85639
7785 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7786 if ignore == 0.
7787
7788 2018-05-04 Richard Biener <rguenther@suse.de>
7789
7790 PR middle-end/85627
7791 * tree-complex.c (update_complex_assignment): We are always in SSA form.
7792 (expand_complex_div_wide): Likewise.
7793 (expand_complex_operations_1): Likewise.
7794 (expand_complex_libcall): Preserve EH info of the original stmt.
7795 (tree_lower_complex): Handle removed blocks.
7796 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7797 on complex multiplication and division libcall builtins.
7798
7799 2018-05-04 Richard Biener <rguenther@suse.de>
7800
7801 PR middle-end/85574
7802 * fold-const.c (negate_expr_p): Restrict negation of operand
7803 zero of a division to when we know that can happen without
7804 overflow.
7805 (fold_negate_expr_1): Likewise.
7806
7807 2018-05-04 Jakub Jelinek <jakub@redhat.com>
7808
7809 PR libstdc++/85466
7810 * real.h (real_nextafter): Declare.
7811 * real.c (real_nextafter): New function.
7812 * fold-const-call.c (fold_const_nextafter): New function.
7813 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7814 CASE_CFN_NEXTTOWARD.
7815 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7816 even when arg1_mode is different from arg0_mode.
7817
7818 2018-05-03 Nathan Sidwell <nathan@acm.org>
7819
7820 * doc/extend.texi (Deprecated Features): Remove
7821 -ffriend-injection.
7822 (Backwards Compatibility): Likewise.
7823 * doc/invoke.texi (C++ Language Options): Likewise.
7824 (C++ Dialect Options): Likewise.
7825
7826 2018-05-03 Jakub Jelinek <jakub@redhat.com>
7827
7828 PR target/85530
7829 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7830 _mm512_mask_mullox_epi64): New intrinsics.
7831
7832 2018-05-03 Tom de Vries <tom@codesourcery.com>
7833
7834 PR testsuite/85106
7835 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7836 dump files): Add offload-tree.
7837
7838 2018-05-03 Richard Biener <rguenther@suse.de>
7839
7840 PR tree-optimization/85615
7841 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7842 to loops not nested in BBs loop father to avoid creating multi-entry
7843 loops.
7844
7845 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7846
7847 PR tree-optimization/70291
7848 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7849 arguments. Change return type to tree. Emit libcall as a new
7850 statement rather than replacing existing one when inplace_p is true.
7851 (expand_complex_multiplication_components): New function.
7852 (expand_complex_multiplication): Expand floating-point complex
7853 multiplication using the above.
7854 (expand_complex_division): Rename inner_type parameter to type.
7855 Update expand_complex_libcall call-site.
7856 (expand_complex_operations_1): Update expand_complex_multiplication
7857 and expand_complex_division call-sites.
7858
7859 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7860
7861 PR target/85582
7862 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7863 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7864 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7865 the highest significant bit of the shift count mask is clear. In
7866 check whether and[sq]i3 is needed verify that all significant bits
7867 of the shift count other than the highest are set.
7868
7869 2018-05-02 Tom de Vries <tom@codesourcery.com>
7870
7871 PR libgomp/82428
7872 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7873 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7874 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7875 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7876 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7877 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7878 __builtin_goacc_parlevel_size.
7879
7880 2018-05-02 Richard Biener <rguenther@suse.de>
7881
7882 PR tree-optimization/85597
7883 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7884 do not use split vect_get_vec_defs call but call vect_get_slp_defs
7885 directly.
7886
7887 2018-05-02 Tom de Vries <tom@codesourcery.com>
7888
7889 PR testsuite/85106
7890 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7891 dump files): Add ltrans-tree.
7892
7893 2018-05-02 Tom de Vries <tom@codesourcery.com>
7894
7895 PR testsuite/85106
7896 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7897 dump files): Add wpa-ipa.
7898
7899 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
7900
7901 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
7902 powerpc*-*-linux*paired* target.
7903 * config/rs6000/750cl.h: Delete.
7904 * config/rs6000/paired.h: Delete.
7905 * config/rs6000/paired.md: Delete.
7906 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7907 float support.
7908 * config/rs6000/rs6000-builtin.def: Remove paired float support.
7909 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7910 comment. Remove paired float support.
7911 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7912 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7913 VECTOR_PAIRED.
7914 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7915 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7916 declarations.
7917 * config/rs6000/rs6000.c: Remove paired float support.
7918 (paired_expand_vector_init, paired_expand_vector_move,
7919 paired_emit_vector_compare, paired_emit_vector_cond_expr,
7920 (paired_expand_lv_builtin, paired_expand_stv_builtin,
7921 paired_expand_builtin, paired_expand_predicate_builtin,
7922 paired_init_builtins): Delete.
7923 * config/rs6000/rs6000.h: Remove paired float support.
7924 * config/rs6000/rs6000.md: Remove paired float support.
7925 (move_from_CR_ov_bit): Delete.
7926 * config/rs6000/rs6000.opt (mpaired): Delete.
7927 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7928 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7929
7930 2018-05-02 Richard Biener <rguenther@suse.de>
7931
7932 PR middle-end/85567
7933 * gimplify.c (gimplify_save_expr): When in SSA form allow
7934 SAVE_EXPRs to compute to SSA vars.
7935
7936 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7937
7938 PR target/85582
7939 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7940 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7941 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7942 clobber operands[2], instead use a new pseudo. Formatting fixes.
7943
7944 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
7945
7946 PR tree-optimization/85586
7947 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7948 exit early for statements in the same group if the accesses are
7949 not strided.
7950
7951 2018-05-02 Tom de Vries <tom@codesourcery.com>
7952
7953 PR lto/85451
7954 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7955 error message.
7956
7957 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
7958
7959 PR tree-optimization/85143
7960 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7961
7962 2018-05-01 Tom de Vries <tom@codesourcery.com>
7963
7964 PR lto/85451
7965 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7966 not found" error message.
7967
7968 2018-05-01 Tom de Vries <tom@codesourcery.com>
7969
7970 PR other/83786
7971 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7972 * vec.c (test_ordered_remove_if): New function.
7973 (vec_c_tests): Call test_ordered_remove_if.
7974 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7975 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7976 * tree-vect-patterns.c (vect_pattern_recog_1): Use
7977 VEC_ORDERED_REMOVE_IF.
7978
7979 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7980
7981 PR tree-optimization/82665
7982 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7983 pointer subtraction where arguments come from a memchr call.
7984
7985 2018-05-01 Jakub Jelinek <jakub@redhat.com>
7986
7987 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7988 --push-state --as-needed and --pop-state instead of --as-needed and
7989 --no-as-needed if ld supports it.
7990 * configure: Regenerated.
7991
7992 PR web/85578
7993 * doc/install.texi2html: Replace _002d with - and _002a with * in
7994 generated html files using sed.
7995
7996 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7997
7998 PR c++/85523
7999 * gcc-rich-location.c (blank_line_before_p): New function.
8000 (use_new_line): New function.
8001 (gcc_rich_location::add_fixit_insert_formatted): New function.
8002 * gcc-rich-location.h
8003 (gcc_rich_location::add_fixit_insert_formatted): New function.
8004
8005 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8006
8007 * selftest.c (assert_streq): Rename "expected" and "actual" to
8008 "val1" and "val2". Extend NULL-handling to cover both inputs
8009 symmetrically, while still requiring both to be non-NULL for a pass.
8010 * selftest.h (assert_streq): Rename "expected" and "actual" to
8011 "val1" and "val2".
8012 (ASSERT_EQ): Likewise.
8013 (ASSERT_EQ_AT): Likewise.
8014 (ASSERT_KNOWN_EQ): Likewise.
8015 (ASSERT_KNOWN_EQ_AT): Likewise.
8016 (ASSERT_NE): Likewise.
8017 (ASSERT_MAYBE_NE): Likewise.
8018 (ASSERT_MAYBE_NE_AT): Likewise.
8019 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8020 the assertion to pass.
8021 (ASSERT_STREQ_AT): Likewise.
8022
8023 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8024
8025 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8026 interaction with -pie.
8027
8028 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8029
8030 * selftest.h: Fix alphabetization of per-source-file selftest
8031 declarations.
8032
8033 2018-04-30 Jason Merrill <jason@redhat.com>
8034
8035 PR c++/61982 - dead stores to destroyed objects.
8036 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8037 of clobber.
8038
8039 2018-04-30 Jason Merrill <jason@redhat.com>
8040
8041 * tree.c (build_clobber): New.
8042 * tree.h: Declare it.
8043 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8044
8045 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8046
8047 * diagnostic-show-locus.c (layout::layout): Update for
8048 location_get_source_line returning a char_span.
8049 (struct char_span): Move to input.h.
8050 (struct correction): Update for fields in char_span becoming
8051 private.
8052 (struct source_line): Update for location_get_source_line
8053 returning a char_span.
8054 (layout::print_line): Likewise.
8055 * edit-context.c (edited_file::print_content): Likewise.
8056 (edited_file::print_diff_hunk): Likewise.
8057 (edited_file::print_run_of_changed_lines): Likewise.
8058 (edited_file::get_num_lines): Likewise.
8059 (edited_line::edited_line): Likewise.
8060 * final.c (asm_show_source): Likewise.
8061 * input.c (location_get_source_line): Convert return type
8062 from const char * to char_span, losing the final "line_len"
8063 param.
8064 (dump_location_info): Update for the above.
8065 (get_substring_ranges_for_loc): Likewise. Use a char_span
8066 when handling the literal within the line.
8067 (test_reading_source_line): Update for location_get_source_line
8068 returning a char_span.
8069 * input.h (class char_span): Move here from
8070 diagnostic-show-locus.c, converting from a struct to a class.
8071 Make data members private.
8072 (char_span::operator bool): New.
8073 (char_span::length): New.
8074 (char_span::get_buffer): New.
8075 (char_span::operator[]): New.
8076 (char_span::subspan): Make const.
8077 (char_span::xstrdup): New.
8078 (location_get_source_line): Convert return type from const char *
8079 to char_span, losing the final "line_size" param.
8080
8081 2018-04-30 Jan Hubicka <jh@suse.cz>
8082
8083 * lto-wrapper.c (ltrans_priorities): New static var.
8084 (cmp_priority): New.
8085 (run_gcc): Read priorities and if doing parallel build order
8086 the Makefile by them.
8087
8088 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8089
8090 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8091
8092 2018-04-30 Richard Biener <rguenther@suse.de>
8093
8094 * tree-cfg.c (verify_address): Remove base argument, add
8095 flag whether to check TREE_ADDRESSABLE and do that.
8096 (verify_expr): Remove.
8097 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8098 (verify_gimple_assign_single): Likewise.
8099 (verify_gimple_switch): Likewise.
8100 (verify_expr_location_1): Dereference tp once. Add (disabled)
8101 piece from verify_expr.
8102 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8103
8104 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8105
8106 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8107
8108 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8109
8110 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8111 (small_data_pattern): Likewise.
8112 (arc_rewrite_small_data): Likewise.
8113 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8114 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8115 (get_symbol_alignment): New function.
8116 (legitimate_small_data_address_p): Likewise.
8117 (legitimate_scaled_address): Update, call
8118 legitimate_small_data_address_p.
8119 (output_sdata): New static variable.
8120 (arc_print_operand): Update how we handle small data operands.
8121 (arc_print_operand_address): Likewise.
8122 (arc_legitimate_address_p): Update, use
8123 legitimate_small_data_address_p.
8124 (arc_rewrite_small_data_p): Remove.
8125 (arc_rewrite_small_data_1): Likewise.
8126 (arc_rewrite_small_data): Likewise.
8127 (small_data_pattern): Likewise.
8128 (compact_sda_memory_operand): Update to use
8129 legitimate_small_data_address_p and get_symbol_alignment.
8130 (prepare_move_operands): Don't rewite sdata pattern.
8131 (prepare_extend_operands): Remove.
8132 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8133 pattern.
8134 (zero_extendqisi2): Likewise.
8135 (zero_extendhisi2): Likewise.
8136 (extendqihi2): Likewise.
8137 (extendqisi2): Likewise.
8138 (extendhisi2): Likewise.
8139 (addsi3): Likewise.
8140 (subsi3): Likewise.
8141 (andsi3): Likewise.
8142 * config/arc/constraints.md (Usd): Change it to memory constraint.
8143
8144 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8145
8146 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8147 as source of std instructions.
8148 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8149 allow 6-bit constants as source for store instructions.
8150 (movdi_insn): Update instruction pattern to allow 6-bit constants
8151 as source for store instructions.
8152
8153 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8154
8155 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8156
8157 2018-04-30 Nathan Sidwell <nathan@acm.org>
8158 Sandra Loosemore <sandra@codesourcery.com>
8159
8160 * dumpfile.c (dump_open): Allow '-' for stdout.
8161 * doc/invoke.texi (Developer Options): Document dump filename
8162 determination early. Document stdin/stdout selection.
8163
8164 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8165
8166 Microblaze Target: PIC data text relative
8167
8168 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8169 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8170 Add declaration.
8171 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8172 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8173 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8174 New addressing mode for data-text relative position indepenedent code.
8175 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8176 'ADDRESS_SYMBOLIC_TXT_REL'.
8177 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8178 (microblaze_legitimate_pic_operand): Exclude function calls from
8179 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8180 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8181 addresses cases.
8182 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8183 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8184 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8185 for 'address + offset'.
8186 (microblaze_expand_prologue): Add new function prologue call for
8187 'r20' assignation.
8188 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8189 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8190 table in case of TARGET_PIC_DATA_TEXT_REL.
8191 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8192 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8193 Add new macros 'UNSPEC_TEXT',
8194 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8195 + exclude function calls from 'UNSPEC_PLT' in case of data text
8196 relative mode.
8197 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8198 new target hook for generating address diff vector tables in case of
8199 flag_pic.
8200 * doc/tm.texi : Regenerate.
8201 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8202 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8203 of addr diff vector generation.
8204 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8205 target hook definition.
8206 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8207 Add default function for generate_pic_addr_diff_vec -> flag_pic.
8208 * doc/invoke.texi (Add new pic option): Add new microblaze pic
8209 option for data text relative.
8210
8211 2018-04-30 Richard Biener <rguenther@suse.de>
8212
8213 * tree-chrec.h (evolution_function_is_constant_p): Remove
8214 redundant check.
8215 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8216
8217 2018-04-30 Richard Biener <rguenther@suse.de>
8218
8219 PR bootstrap/85571
8220 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8221
8222 2018-04-30 Richard Biener <rguenther@suse.de>
8223
8224 PR tree-optimization/28364
8225 PR tree-optimization/85275
8226 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8227 copying first exit test.
8228
8229 2018-04-28 Mark Wielaard <mark@klomp.org>
8230
8231 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8232 dwarf_version >= 5.
8233 (dwarf_AT): Handle DW_AT_addr_base.
8234 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8235
8236 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
8237
8238 PR target/84431
8239 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8240 (*ashl<dwi>3_doubleword_mask_1): Ditto.
8241 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8242 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8243
8244 2018-04-28 Richard Biener <rguenther@suse.de>
8245
8246 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8247 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8248 to reflect use. Only add interesting stmts.
8249
8250 2018-04-27 Martin Jambor <mjambor@suse.cz>
8251
8252 PR ipa/85549
8253 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8254 the jump function allows for passing through aggregate values.
8255
8256 2018-04-27 David Malcolm <dmalcolm@redhat.com>
8257
8258 * input.h (in_system_header_at): Convert from macro to inline
8259 function.
8260 (from_macro_expansion_at): Likewise.
8261 (from_macro_definition_at): Likewise.
8262
8263 2018-04-27 Jeff Law <law@redhat.com>
8264
8265 * config.gcc: Mark tile* targets as deprecated/obsolete.
8266
8267 2018-04-27 Richard Biener <rguenther@suse.de>
8268
8269 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8270 fix for ILP32.
8271
8272 2018-04-27 Richard Biener <rguenther@suse.de>
8273
8274 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8275
8276 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
8277
8278 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8279 with Yd constraint. Set "preferred_for_speed" attribute from
8280 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8281 with Yd constraint.
8282 (*movdi_internal): Ditto.
8283 (movti_interunit splitters): Remove
8284 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8285 (movdi_interunit splitters): Ditto.
8286 * config/i386/constraints.md (Ye): Remove.
8287 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8288
8289 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8290
8291 PR target/85512
8292 * config/aarch64/constraints.md (Usg): Limit to 31.
8293 (Usj): Limit to 63.
8294
8295 2018-04-27 Jakub Jelinek <jakub@redhat.com>
8296
8297 PR tree-optimization/85529
8298 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8299 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8300 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8301 zero extension or masking of the MSB bit.
8302 (optimize_range_tests): Add FIRST_BB argument, pass it through
8303 to optimize_range_tests_var_bound.
8304 (maybe_optimize_range_tests, reassociate_bb): Adjust
8305 optimize_range_tests callers.
8306
8307 2018-04-26 Richard Biener <rguenther@suse.de>
8308 Jakub Jelinek <jakub@redhat.com>
8309
8310 * cgraph.h (symbol_table): Just declare debug method here.
8311 * symtab.c (symbol_table::debug): Define.
8312
8313 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
8314
8315 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8316
8317 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
8318
8319 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8320 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8321 (*movdi_internal): Substitute Yi and Yj constraint with x
8322 and Ym and Yn constraint with y constraint. Update "isa"
8323 attribute and set "preferred_for_speed" attribute from
8324 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8325 (*movsi_internal): Ditto.
8326 (*movdf_internal): Ditto.
8327 (*movsf_internal): Ditto.
8328 (*zero_extendsidi2): Ditto.
8329 * config/i386/sse.md (vec_set<mode>_0): Ditto.
8330 (sse2_loadld): Ditto.
8331 (*vec_extract<ssevecmodelower>_0): Ditto.
8332 (*vec_extractv4si_0_zext_sse4): Ditto.
8333 (vec_concatv2di): Ditto.
8334 (*vec_dup<mode>): Ditto.
8335 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8336 * config/i386/constraints.md (Yi): Remove.
8337 (Yj): Remove.
8338 (Ym): Remove.
8339 (Yn): Remove.
8340
8341 2018-04-26 Nathan Sidwell <nathan@acm.org>
8342
8343 * dumpfile.c (dump_open): New.
8344 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8345 (dump_finish): Detect stdio/stderr by value not name.
8346
8347 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
8348
8349 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8350
8351 2018-04-26 Tom de Vries <tom@codesourcery.com>
8352
8353 PR target/84952
8354 * config/nvptx/nvptx.c (verify_neutering_jumps)
8355 (verify_neutering_labels): New function
8356 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8357
8358 2018-04-26 Tom de Vries <tom@codesourcery.com>
8359
8360 PR target/84025
8361 * config/nvptx/nvptx.c (needs_neutering_p): New function.
8362 (nvptx_single): Use needs_neutering_p to skip over insns that do not
8363 need neutering.
8364
8365 2018-04-26 Richard Biener <rguenther@suse.de>
8366 Tom de Vries <tom@codesourcery.com>
8367
8368 PR lto/85422
8369 * lto-streamer-out.c (output_function): Fixup loops if required to match
8370 discovery done in the reader.
8371
8372 2018-04-26 Richard Biener <rguenther@suse.de>
8373
8374 PR tree-optimization/85116
8375 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8376 have a loop exit from the single latch predecessor. Remove
8377 case of header with just condition.
8378 (ch_base::copy_headers): Exclude infinite loops from any
8379 processing.
8380 (pass_ch::execute): Record exits.
8381
8382 2018-04-26 Richard Biener <rguenther@suse.de>
8383
8384 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8385 prologue cost vector and pass it to vect_get_load_cost.
8386 (vect_get_peeling_costs_all_drs): Likewise.
8387 (vect_peeling_hash_get_lowest_cost): Likewise.
8388 (vect_enhance_data_refs_alignment): Likewise.
8389
8390 2018-04-26 Richard Biener <rguenther@suse.de>
8391
8392 PR middle-end/85450
8393 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8394 checking of integer<->pointer conversions.
8395 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8396 sign-/zero-extending pointer types.
8397 (expand_omp_for_static_chunk): Likewise.
8398
8399 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
8400 Jean Lee <xiaoyur347@gmail.com>
8401
8402 * config/mips/mips.c (mips_asan_shadow_offset): New function.
8403 (TARGET_ASAN_SHADOW_OFFSET): Define.
8404 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8405 true for -fsanitize=address.
8406
8407 2018-04-25 Mark Wielaard <mark@klomp.org>
8408
8409 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8410 shorter ones.
8411
8412 2018-04-25 Jakub Jelinek <jakub@redhat.com>
8413
8414 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8415 than "alu", remove explicit "memory" and "imm_disp" attributes.
8416 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8417
8418 PR middle-end/85414
8419 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8420 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8421 gen_lowpart_no_emit.
8422
8423 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
8424
8425 PR target/85473
8426 * config/i386/i386.c (ix86_expand_builtin): Change memory
8427 operand to XI, extend p0 to Pmode.
8428 * config/i386/i386.md: Change unspec volatile and operand
8429 1 mode to XI, change operand 0 mode to P.
8430
8431 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8432
8433 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8434 GET_MODE_MASK before any checking.
8435 (nds32_can_use_bset_p): Likewise.
8436 (nds32_can_use_btgl_p): Likewise.
8437
8438 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8439
8440 * config/nds32/nds32-doubleword.md: New define_split pattern for
8441 illegal register number.
8442
8443 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8444
8445 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8446
8447 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8448
8449 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8450
8451 2018-04-25 Richard Biener <rguenther@suse.de>
8452
8453 * lto-streamer.h (LTO_major_version): Bump to 8.
8454
8455 2018-04-25 Jakub Jelinek <jakub@redhat.com>
8456
8457 * BASE-VER: Set to 9.0.0.
8458
8459 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
8460
8461 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
8462 in __abskf2 and __powikf2.
8463
8464 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8465
8466 PR target/85512
8467 * config/aarch64/constraints.md (Usg, Usj): New constraints.
8468 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
8469 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
8470 Use the above on operand 2. Reindent.
8471 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
8472
8473 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
8474
8475 PR target/85485
8476 * common/config/i386/i386-common.c (ix86_handle_option): Don't
8477 handle OPT_mcet.
8478 * config/i386/i386.opt (mcet): Removed.
8479 * doc/install.texi: Remove -mcet documentation.
8480 * doc/invoke.texi: Likewise.
8481
8482 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
8483
8484 PR target/85485
8485 * doc/install.texi: Remove -mcet from bootstrap-cet.
8486
8487 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8488
8489 PR target/85511
8490 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
8491 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8492 if TARGET_64BIT.
8493
8494 PR target/85503
8495 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8496 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8497 containing a CONST_VECTOR.
8498
8499 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
8500
8501 * doc/install.texi: Update newlib dependency for nvptx.
8502
8503 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8504
8505 PR target/85508
8506 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8507 instead of INTVAL when shifting x left.
8508
8509 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
8510
8511 PR tree-optimization/85478
8512 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8513 vect_grouped_store_supported for single element vectors.
8514
8515 2018-04-24 Richard Biener <rguenther@suse.de>
8516
8517 PR target/85491
8518 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8519 load cost increase to the case of non-constant step.
8520
8521 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8522
8523 PR target/84828
8524 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8525 destination if any_malformed_asm.
8526
8527 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
8528
8529 PR middle-end/85496
8530 * expr.c (store_field): In the bitfield case, if the value comes from
8531 a function call and is returned in registers by means of a PARALLEL,
8532 do not change the mode of the temporary unless BLKmode and VOIDmode.
8533
8534 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
8535
8536 PR rtl-optimization/85423
8537 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8538 dependencies to debug insns when the previous insn is non-debug.
8539
8540 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8541
8542 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8543 enums into a single definition.
8544 (fls): Fix predicates and printing.
8545 (seti): Likewise.
8546
8547 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8548
8549 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8550 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8551 and short u6 immediate.
8552 (check_if_valid_sleep_operand): Remove.
8553 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8554
8555 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8556
8557 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8558 flag_always_save_lp condition.
8559 * config/nds32/nds32.opt (malways-save-lp): New option.
8560
8561 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8562
8563 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8564 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8565 * config/nds32/nds32.h
8566 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8567 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8568
8569 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8570
8571 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8572 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8573
8574 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8575 Chung-Ju Wu <jasonwucj@gmail.com>
8576
8577 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8578 Declare.
8579 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8580 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8581
8582 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8583
8584 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8585
8586 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8587
8588 * config/nds32/nds32-protos.h (nds32_data_alignment,
8589 nds32_local_alignment): Declare.
8590 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8591 nds32_local_alignment): New functions.
8592 (TARGET_CONSTANT_ALIGNMENT): Define.
8593 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8594
8595 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8596
8597 * config/nds32/nds32.c
8598 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8599 (TARGET_MODES_TIEABLE_P): Likewise.
8600
8601 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8602
8603 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8604 level Ofast and Og.
8605
8606 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
8607 Chung-Ju Wu <jasonwucj@gmail.com>
8608
8609 * config/nds32/constants.md (unspec_volatile_element): Add enum values
8610 for unaligned access.
8611 * config/nds32/nds32-intrinsic.c: Implementation of expanding
8612 unaligned access.
8613 * config/nds32/nds32-intrinsic.md: Likewise.
8614 * config/nds32/nds32_intrinsic.h: Likewise.
8615 * config/nds32/nds32.h (nds32_builtins): Likewise.
8616 * config/nds32/nds32.opt (munaligned-access): New option.
8617 * config/nds32/nds32.c (nds32_asm_file_start): Display
8618 flag_unaligned_access status.
8619
8620 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8621
8622 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8623 -mno-relax is present.
8624 * config/riscv/linux.h (LINK_SPEC): Ditto.
8625
8626 2018-04-20 Martin Sebor <msebor@redhat.com>
8627
8628 PR c/85365
8629 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8630 for null pointers.
8631 (gimple_fold_builtin_stxcpy_chk): Same.
8632 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8633
8634 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
8635
8636 PR target/85456
8637 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8638 __powikf2 when long double is IEEE 128-bit.
8639
8640 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8641
8642 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8643 step to make sure stack always aligned.
8644
8645 2018-04-20 Carl Love <cel@us.ibm.com>
8646
8647 PR target/83402
8648 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8649 size check for arg0.
8650
8651 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
8652 Tom de Vries <tom@codesourcery.com>
8653
8654 PR target/85445
8655 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8656 Emit insns for calls too.
8657 (nvptx_find_par): Always look for worker-level predecessor insn.
8658 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
8659 calls.
8660 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8661 (nvptx_process_pars): Propagate frames for calls.
8662
8663 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
8664
8665 PR target/85469
8666 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8667 Removed.
8668 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8669 (ix86_handle_option): Don't handle OPT_mibt.
8670 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8671 __SHSTK__.
8672 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8673 has_ibt and ibt.
8674 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8675 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8676 (ix86_target_macros): Define __CET__ with flag_cf_protection
8677 for -fcf-protection.
8678 * config/i386/i386.c (isa2_opts): Remove -mibt.
8679 * config/i386/i386.h (TARGET_IBT): Removed.
8680 (TARGET_IBT_P): Likewise.
8681 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8682 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8683 * config/i386/i386.opt (mcet): Update help message.
8684 (mshstk): Likewise.
8685 (mibt): Removed.
8686 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
8687 -mcet as an alias for -mshstk.
8688
8689 2018-04-20 Richard Biener <rguenther@suse.de>
8690
8691 PR middle-end/85475
8692 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8693 complexity by forcing a single use of the multiply operand.
8694
8695 2018-04-20 Martin Jambor <mjambor@suse.cz>
8696
8697 ipa/85449
8698 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8699 recursion dependency to only apply to non-clones.
8700
8701 2018-04-20 Martin Jambor <mjambor@suse.cz>
8702
8703 ipa/85447
8704 * ipa-cp.c (create_specialized_node): Check that clones of
8705 self-recursive edges exist during IPA-CP.
8706
8707 2018-04-19 Toon Moene <toon@moene.org>
8708
8709 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8710 by -O3.
8711
8712 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8713
8714 PR tree-optimization/85467
8715 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8716 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
8717 VECTOR_CST element to type.
8718
8719 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8720
8721 PR target/85397
8722 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8723 * config/i386/i386.md (builtin_setjmp_setup): Removed.
8724 (builtin_longjmp): Likewise.
8725 (save_stack_nonlocal): New pattern.
8726 (restore_stack_nonlocal): Likewise.
8727
8728 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8729
8730 PR target/85404
8731 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8732 Replace ASM_OUTPUT_LABEL with fprintf.
8733
8734 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8735
8736 PR target/85417
8737 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8738 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8739 * config/i386/i386-c.c (ix86_target_macros_internal): Also
8740 define __IBT__ and __SHSTK__ for -fcf-protection.
8741 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8742 TARGET_IBT.
8743 (ix86_trampoline_init): Likewise.
8744 (x86_output_mi_thunk): Likewise.
8745 (ix86_notrack_prefixed_insn_p): Likewise.
8746 (ix86_option_override_internal): Don't disallow -fcf-protection.
8747 * config/i386/i386.md (rdssp<mode>): Also enable for
8748 -fcf-protection.
8749 (incssp<mode>): Likewise.
8750 (nop_endbr): Likewise.
8751 * config/i386/i386.opt (mcet): Change help message to built-in
8752 functions only.
8753 (mibt): Likewise.
8754 (mshstk): Likewise.
8755 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8756 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
8757 enable CET built-in functions.
8758
8759 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
8760
8761 * common/config/i386/i386-common.c
8762 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8763 OPTION_MASK_ISA_MOVDIRI_UNSET,
8764 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8765 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8766 * config.gcc (movdirintrin.h): New header.
8767 * config/i386/cpuid.h (bit_MOVDIRI,
8768 bit_MOVDIR64B): New bits.
8769 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8770 and -mmvodir64b.
8771 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8772 (VOID, PVOID, PCVOID)): New function types.
8773 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8774 __builtin_ia32_directstoreu_u64,
8775 __builtin_ia32_movdir64b): New builtins.
8776 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8777 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8778 and -mmovdiri.
8779 (ix86_valid_target_attribute_inner_p): Ditto.
8780 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8781 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8782 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8783 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8784 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8785 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8786 (movdiri<mode>, movdir64b_<mode>): New.
8787 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8788 * config/i386/immintrin.h: Include movdirintrin.h.
8789 * config/i386/movdirintrin.h: New file.
8790 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8791
8792 2018-04-19 Richard Biener <rguenther@suse.de>
8793
8794 PR middle-end/85455
8795 * cfg.c (clear_bb_flags): When loop state says we have
8796 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8797
8798 2018-04-19 Richard Biener <rguenther@suse.de>
8799
8800 PR tree-optimization/84737
8801 * tree-vect-data-refs.c (vect_copy_ref_info): New function
8802 copying restrict info.
8803 (vect_setup_realignment): Use it.
8804 * tree-vectorizer.h (vect_copy_ref_info): Declare.
8805 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8806 the first DR to all generated stores.
8807 (vectorizable_load): Likewise for loads.
8808
8809 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8810
8811 PR tree-optimization/85446
8812 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8813 the integral and pointer types to have the same precision.
8814
8815 * doc/install.texi: Document --disable-cet being the default and
8816 --enable-cet=auto.
8817
8818 2018-04-18 Martin Liska <mliska@suse.cz>
8819
8820 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8821 style.
8822
8823 2018-04-18 Martin Liska <mliska@suse.cz>
8824
8825 Revert
8826 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8827
8828 PR ipa/83983
8829 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8830 arguments if they are comparable.
8831
8832 2018-04-18 Martin Liska <mliska@suse.cz>
8833
8834 Revert
8835 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
8836
8837 PR lto/84805
8838 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8839 incomplete types.
8840
8841 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
8842
8843 PR target/85388
8844 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8845 ENDBR after calling __morestack.
8846
8847 2018-04-18 David Malcolm <dmalcolm@redhat.com>
8848
8849 PR jit/85384
8850 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8851 by using gcc_base_ver to generate a gcc_driver_version, and use
8852 it when generating GCC_DRIVER_NAME.
8853 * configure: Regenerate.
8854
8855 2018-04-18 Jakub Jelinek <jakub@redhat.com>
8856
8857 PR target/81084
8858 * config.gcc: Obsolete powerpc*-*-*spe*.
8859
8860 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8861
8862 PR debug/84637
8863 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8864 (stabstr_D): Change type of unum from unsigned int to
8865 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
8866 type.
8867
8868 2018-04-17 Jim Wilson <jimw@sifive.com>
8869
8870 PR 84856
8871 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8872 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8873 Set arg_pointer_offset after using pretend_args_size.
8874
8875 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8876
8877 PR rtl-optimization/85431
8878 * dse.c (record_store): Ignore zero width stores.
8879
8880 PR sanitizer/85230
8881 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
8882 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8883 __builtin_stack_restore rather than after it.
8884 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8885 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8886 argument instead of virtual_dynamic_stack_rtx.
8887
8888 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
8889
8890 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8891 New prototype.
8892 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8893 Add note to error message to explain internal mapping of overloaded
8894 built-in function name to non-overloaded built-in function name.
8895 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8896 function.
8897
8898 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8899
8900 PR target/85424
8901 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8902 where the inputs overlap with the output.
8903
8904 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8905
8906 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8907 (=v, v) alternative and explicit "memory" attribute.
8908 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
8909 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8910 attributes.
8911 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8912 "sselog1" type instead of "sselog".
8913 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8914 "sselog". Remove explicit "memory" attribute.
8915 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8916 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8917 attributes.
8918 (vec_extract_hi_v32hi): Merge all alternatives into one, use
8919 "sselog1" type instead of "sselog". Remove explicit "memory"
8920 attribute.
8921 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8922 use "sselog1" type instead of "sselog". Remove explicit "memory"
8923 attribute.
8924 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8925 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8926 attributes.
8927 (vec_extract_hi_v64qi): Merge all alternatives into one, use
8928 "sselog1" type instead of "sselog". Remove explicit "memory"
8929 attribute.
8930 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8931 use "sselog1" type instead of "sselog". Remove explicit "memory"
8932 attribute.
8933
8934 PR target/85430
8935 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8936
8937 PR middle-end/85414
8938 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8939 on a SUBREG.
8940
8941 2018-04-17 Martin Jambor <mjambor@suse.cz>
8942
8943 PR ipa/85421
8944 * ipa-cp.c (create_specialized_node): Call
8945 expand_all_artificial_thunks if necessary.
8946
8947 2018-04-17 Martin Liska <mliska@suse.cz>
8948
8949 PR lto/85405
8950 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8951 in message, remote space in between '_G' and '('.
8952
8953 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8954
8955 PR target/85281
8956 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8957 avx512f_vmcmp<mode>3<round_saeonly_name>,
8958 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8959 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8960 avx512f_rndscale<mode><round_saeonly_name>,
8961 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8962 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8963 Use %<iptr>2 instead of %2 for -masm=intel.
8964 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8965 avx512f_vcvttss2usi<round_saeonly_name>,
8966 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8967 -masm=intel.
8968 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8969 avx512f_vcvttsd2usi<round_saeonly_name>,
8970 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8971 Use %q1 instead of %1 for -masm=intel.
8972 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8973 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8974 of %3 for -masm=intel.
8975 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8976 -masm=intel.
8977 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8978 -masm=intel.
8979 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8980 -masm=intel.
8981 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8982 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8983 %g1.
8984 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8985 -masm=intel.
8986 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8987 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8988 %g1 and one with %0 and %1.
8989 (avx512er_vmrcp28<mode><round_saeonly_name>,
8990 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8991 %1 for -masm=intel.
8992 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8993 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8994 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8995 of %0 and %{%4%} for -masm=intel.
8996 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8997 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8998 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8999 order of %0 and %{%5%}%{z%} for -masm=intel.
9000
9001 2018-04-17 Jan Hubicka <jh@suse.cz>
9002
9003 PR lto/85405
9004 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9005
9006 2018-04-17 Martin Liska <mliska@suse.cz>
9007
9008 PR ipa/85329
9009 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9010 for target_clone error message. Make default implementation
9011 clone to be a local declaration.
9012 (separate_attrs): Add new argument and check for an empty
9013 string.
9014 (expand_target_clones): Handle it.
9015 (ipa_target_clone): Make redirection just for target_clones
9016 functions.
9017
9018 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9019 Tom de Vries <tom@codesourcery.com>
9020
9021 PR middle-end/84955
9022 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9023 tiled basic blocks without omp continue statements.
9024
9025 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9026
9027 PR target/83660
9028 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9029 vec_extract expression as having side effects to make sure it gets
9030 a cleanup point.
9031
9032 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9033
9034 PR target/85403
9035 * config/i386/i386.c (get_builtin_code_for_version): Check
9036 error_mark_node.
9037
9038 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9039
9040 PR target/84331
9041 * gcc/config.gcc: Support "skylake".
9042 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9043 PROCESSOR_SKYLAKE.
9044 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9045 (processor_target_table): Add "skylake".
9046 (ix86_option_override_internal): Add "skylake".
9047 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9048 PROCESSOR_CANNONLAKE.
9049 (get_builtin_code_for_version): Fix priority for
9050 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9051 PROCESSOR_SKYLAKE-AVX512.
9052 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9053 (processor_type): Add PROCESSOR_SKYLAKE.
9054
9055 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9056 Jason Merrill <jason@redhat.com>
9057
9058 PR c++/85112
9059 * convert.c (convert_to_integer_1): Use direct recursion for
9060 enumeral types and types with a precision less than the number
9061 of bits in their mode.
9062
9063 2018-04-16 Julia Koval <julia.koval@intel.com>
9064
9065 PR target/84413
9066 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9067 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9068
9069 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9070
9071 PR target/85293
9072 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9073 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9074 and -mno-direct-move.
9075
9076 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9077
9078 PR target/83402
9079 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9080 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9081 Ensure negative shifts result in {0}.
9082
9083 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9084
9085 PR rtl-optimization/79916
9086 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9087 regs (if any) to define how to gnerate SD moves when LRA is in
9088 progress.
9089
9090 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9091
9092 PR rtl-optimization/85393
9093 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9094 * except.c (expand_dw2_landing_pad_for_region): Make static.
9095 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9096 a label and unconditional jump to old_bb, rather than
9097 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9098 basic block.
9099
9100 PR rtl-optimization/85376
9101 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9102 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9103 instead of a specific value.
9104
9105 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9106 Bin Cheng <bin.cheng@arm.com>
9107
9108 PR tree-optimization/82965
9109 PR tree-optimization/83991
9110 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9111 by_profile_only parameter.
9112 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9113 information if the loop was predicted to iterate too many times.
9114 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9115
9116 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9117
9118 PR lto/71991
9119 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9120 always inline.
9121
9122 2018-04-13 Martin Liska <mliska@suse.cz>
9123 Jakub Jelinek <jakub@redhat.com>
9124
9125 PR middle-end/81657
9126 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9127 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9128 * builtins.c (expand_builtin_memory_copy_args): Use
9129 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9130 handle dest_addr == pc_rtx.
9131
9132 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9133
9134 PR target/85291
9135 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9136 asked to not generate direct moves.
9137 (fix_trunc<mode>si2_stfiwx): Similar.
9138 (fix_trunc<mode>si2_internal): Similar.
9139
9140 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9141
9142 PR debug/83157
9143 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9144 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9145 lookup if dest in some wider mode is known to be const0_rtx and
9146 if so, record permanent equivalence for it to be ZERO_EXTEND of
9147 the narrower mode destination.
9148
9149 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9150
9151 * lto-streamer-out.c (output_function): Revert 259346.
9152 * omp-expand.c (expand_oacc_for): Likewise.
9153
9154 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9155
9156 PR rtl-optimization/85354
9157 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9158 * sel-sched.c (sel_global_init): ... here.
9159
9160 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9161
9162 PR target/85238
9163 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9164 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9165 mode for PE-COFF targets.
9166 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9167 (i386_pe_asm_lto_end): Likewise.
9168 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9169 (TARGET_ASM_LTO_END): Likewise.
9170 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9171 (i386_pe_asm_lto_start): New function.
9172 (i386_pe_asm_lto_end): Likewise.
9173
9174 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9175 Richard Biener <rguenther@suse.de>
9176
9177 PR middle-end/84955
9178 * lto-streamer-out.c (output_function): Fix CFG loop state before
9179 streaming out.
9180 * omp-expand.c (expand_oacc_for): Handle calls to internal
9181 functions like regular functions.
9182
9183 2018-04-12 Richard Biener <rguenther@suse.de>
9184
9185 PR lto/85371
9186 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9187 for the early LTO debug to properly generate references to it
9188 during DIE emission. Do not re-use that for the skeleton for
9189 split-dwarf.
9190 (dwarf2out_early_finish): Likewise.
9191
9192 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9193
9194 PR target/85328
9195 * config/i386/sse.md
9196 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9197 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9198 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9199 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9200 and output is a reg, avoid creating invalid lowpart subreg, but
9201 instead split into a 512-bit move. Don't split if not AVX512VL,
9202 input is xmm16+ reg and output is a mem.
9203 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9204 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9205 xmm16+ reg and output is a mem.
9206
9207 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9208
9209 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9210 also for flag_dwarf2_cfi_asm.
9211
9212 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9213
9214 PR rtl-optimization/85342
9215 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9216 a bool scalar var inside of the loop instead. Don't try to update
9217 recog_data.operand after failed apply_change_group.
9218
9219 2018-04-12 Tom de Vries <tom@codesourcery.com>
9220
9221 PR target/85296
9222 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9223 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
9224 array with flexible array member as array without given dimension.
9225 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9226 argument for undefined param to true.
9227
9228 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
9229
9230 PR target/85321
9231 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9232 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9233 from PowerPC section.
9234 * config/rs6000/sysv4.opt (mcall-): Improve help text.
9235 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9236 help text that is too long.
9237 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9238 help text that is too long.
9239 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9240 help text that is too long.
9241
9242 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
9243
9244 * config/alpha/alpha.md (stack_probe_internal): Rename
9245 from "probe_stack". Update all callers.
9246
9247 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9248
9249 PR rtl-optimization/84566
9250 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9251 sched_macro_fuse_insns.
9252
9253 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9254
9255 PR target/84301
9256 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9257 (compute_block_dependences): ... from here.
9258
9259 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9260
9261 PR tree-optimization/85331
9262 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9263 from int to HOST_WIDE_INT.
9264
9265 2018-04-11 Martin Jambor <mjambor@suse.cz>
9266
9267 PR ipa/84149
9268 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9269 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9270 not the same as the source val.
9271 (cgraph_edge_brings_value_p): New parameter.
9272 (gather_edges_for_value): Pass destination value to
9273 cgraph_edge_brings_value_p.
9274 (perhaps_add_new_callers): Likewise.
9275 (get_info_about_necessary_edges): Likewise and exclude values brought
9276 only by self-recursive edges.
9277 (create_specialized_node): Redirect only clones of self-calling edges.
9278 (+self_recursive_pass_through_p): New function.
9279 (find_more_scalar_values_for_callers_subset): Use it.
9280 (find_aggregate_values_for_callers_subset): Likewise.
9281 (known_aggs_to_agg_replacement_list): Removed.
9282 (decide_whether_version_node): Re-calculate known constants for all
9283 remaining context clones.
9284
9285 2018-04-11 Richard Biener <rguenther@suse.de>
9286
9287 PR lto/85339
9288 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9289 from early DWARF output.
9290 (dwarf2out_early_finish): Output line info unconditionally into
9291 early DWARF and add reference to it.
9292
9293 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9294
9295 PR target/85281
9296 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9297 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9298 other than V2DFmode using iptr mode attribute.
9299 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9300
9301 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9302
9303 PR rtl-optimization/84659
9304 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9305
9306 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9307
9308 PR debug/85302
9309 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9310 SIZEP is NULL.
9311 (output_loc_list): Pass address of a dummy size variable even in the
9312 locview handling loop.
9313 (index_location_lists): Add comment on why skip_loc_list_entry can't
9314 call size_of_locs.
9315
9316 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
9317
9318 PR target/85261
9319 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9320 into register.
9321
9322 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
9323
9324 PR target/85321
9325 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9326 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9327 and -mstring-compare-inline-limit.
9328
9329 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9330
9331 PR target/85287
9332 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9333 for stack clash protection in a register whenever we need it to be in
9334 a register.
9335
9336 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9337
9338 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9339 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9340
9341 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9342
9343 PR target/85321
9344 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9345 the help text.
9346 (mlong-double-): Ditto.
9347 * config/rs6000/sysv4.opt (msdata=): Ditto.
9348 (mtls-size=): Ditto.
9349
9350 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9351
9352 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9353 erroneous entries for
9354 "vector int vec_ldl (int, long int *)", and
9355 "vector unsigned int vec_ldl (int, unsigned long int *)".
9356 Add comments and entries for
9357 "vector bool char vec_ldl (int, bool char *)",
9358 "vector bool short vec_ldl (int, bool short *)",
9359 "vector bool int vec_ldl (int, bool int *)",
9360 "vector bool long long vec_ldl (int, bool long long *)",
9361 "vector pixel vec_ldl (int, pixel *)",
9362 "vector long long vec_ldl (int, long long *)",
9363 "vector unsigned long long vec_ldl (int, unsigned long long *)".
9364 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9365 type tree bool_long_long_type_node and correct definition of
9366 bool_V2DI_type_node to make reference to this new type tree.
9367 (rs6000_mangle_type): Replace erroneous reference to
9368 bool_long_type_node with bool_long_long_type_node.
9369 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9370 comments to emphasize sign distinctions for char and int types and
9371 replace RS6000_BTI_bool_long constant with
9372 RS6000_BTI_bool_long_long constant. Also add comment to restrict
9373 use of RS6000_BTI_pixel.
9374 (bool_long_type_node): Remove this macro definition.
9375 (bool_long_long_type_node): New macro definition
9376
9377 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9378
9379 PR rtl-optimization/85300
9380 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9381 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9382 simplify_unary_operation fails.
9383
9384 2018-04-10 Martin Liska <mliska@suse.cz>
9385
9386 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9387 cgraph_edge and ipa_ref.
9388
9389 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9390
9391 PR target/85177
9392 PR target/85255
9393 * config/i386/sse.md
9394 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9395 computation of the VEC_MERGE selector from mask.
9396 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9397 Fix decoding of the VEC_MERGE selector into mask.
9398
9399 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9400
9401 PR tree-optimization/85286
9402 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9403
9404 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9405
9406 * final.c (final_1): Set insn_last_address as well as
9407 insn_current_address.
9408
9409 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9410
9411 PR target/85173
9412 * explow.c (emit_stack_probe): Call validize_mem on memory location
9413 before passing it to gen_probe_stack. Create address operand and
9414 legitimize it for the probe_stack_address case.
9415
9416 2018-04-09 Jan Hubicka <jh@suse.cz>
9417
9418 PR lto/85078
9419 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9420 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9421 * tree.c (free_lang_data_in_type): Fix handling of binfos;
9422 walk basetypes.
9423 (free_lang_data): Rebuild type inheritance graph.
9424
9425 2018-04-09 Martin Sebor <msebor@redhat.com>
9426
9427 * invoke.texi (-finline-small-functions): Mention other optimization
9428 options.
9429 (-findirect-inlining, -fpartial-inlining): Same.
9430 (-finline-functions-called-once): Same.
9431 (-freorder-blocks-and-partition): Same.
9432
9433 2018-04-09 Jan Hubicka <jh@suse.cz>
9434
9435 PR rtl/84058
9436 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9437 jumps; choose last target that matches the criteria (i.e.
9438 no partition changes for non-crossing jumps).
9439 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9440 support for redirecting crossing jumps to non-crossing.
9441
9442 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
9443
9444 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9445 also for naked functions.
9446
9447 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
9448
9449 * config/arc/arc.md (add_shift): New pattern.
9450 (add_shift2): Likewise.
9451 (sub_shift): Likewise.
9452 (sub_shift_cmp0_noout): Likewise.
9453 (compare_si_ashiftsi): Likewise.
9454 (xbfu_cmp0_noout): New combine pattern.
9455 (xbfu_cmp0"): Likewise.
9456 (movsi_set_cc_insn): Place the predicable variant first.
9457 (commutative_binary_cmp0_noout): Remove clobber.
9458 (commutative_binary_cmp0): New pattern.
9459 (noncommutative_binary_cmp0): Likewise.
9460 (noncommutative_binary_cmp0_noout): Likewise.
9461 (noncommutative_binary_comparison_result_used): Removed.
9462 (rsub_cmp0): New pattern.
9463 (rsub_cmp0_noout): Likewise.
9464 (extzvsi): Changed, keep only meaningful variants.
9465 (SQH, SEZ): New iterators.
9466 (SQH_postfix): New mode attribute.
9467 (SEZ_prefix): New code attribute.
9468 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
9469 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
9470 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
9471 of numerical value.
9472 (noncommutative_operator): Check the availability of barrel
9473 shifter option.
9474
9475 2018-04-09 Richard Biener <rguenther@suse.de>
9476
9477 PR tree-optimization/85284
9478 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
9479 Only use the niter constraining form of simple_iv when the exit
9480 is always executed.
9481
9482 2018-04-09 Tom de Vries <tom@codesourcery.com>
9483
9484 PR target/84041
9485 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9486 (define_expand "*memory_barrier"): New define_expand.
9487 (define_insn "memory_barrier"): New insn.
9488
9489 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9490
9491 PR rtl-optimization/80463
9492 PR rtl-optimization/83972
9493 PR rtl-optimization/83480
9494
9495 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9496 correct producer for the insn.
9497 (tidy_control_flow): Fixup seqnos in case of debug insns.
9498
9499 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9500
9501 PR rtl-optimization/83913
9502
9503 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9504 different sched-times when merging exprs.
9505
9506 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9507
9508 PR rtl-optimization/83962
9509
9510 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9511 tidy_fallthru_edge and tidy_control_flow.
9512
9513 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9514
9515 PR rtl-optimization/83530
9516
9517 * sel-sched.c (force_next_insn): New global variable.
9518 (remove_insn_for_debug): When force_next_insn is true, also leave only
9519 next insn in the ready list.
9520 (sel_sched_region): When the region wasn't scheduled, make another pass
9521 over it with force_next_insn set to 1.
9522
9523 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9524
9525 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9526 into tm_file.
9527 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9528 for interrupt control.
9529 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9530 functions for interrupt control.
9531 * config/nds32/nds32-intrinsic.md: Likewise.
9532 * config/nds32/nds32_intrinsic.h: Likewise.
9533 * config/nds32/nds32.h (nds32_builtins): Likewise.
9534
9535 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9536
9537 * config/nds32/nds32.c (nds32_init_machine_status,
9538 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9539 strict_aligned_p field.
9540 (nds32_expand_to_rtl_hook): New function.
9541 (TARGET_EXPAND_TO_RTL_HOOK): Define.
9542 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9543
9544 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9545 Chung-Ju Wu <jasonwucj@gmail.com>
9546
9547 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9548 * config/nds32/nds32-n7.md: New file.
9549 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9550 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9551 pipeline.
9552 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9553 * config/nds32/nds32.md (pipeline_model): Add n7.
9554 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9555 * config/nds32/pipelines.md: Include n7 settings.
9556
9557 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9558 Chung-Ju Wu <jasonwucj@gmail.com>
9559
9560 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9561 * config/nds32/nds32-e8.md: New file.
9562 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9563 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9564 pipeline.
9565 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9566 * config/nds32/nds32.md (pipeline_model): Add e8.
9567 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9568 * config/nds32/pipelines.md: Include e8 settings.
9569
9570 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9571 Chung-Ju Wu <jasonwucj@gmail.com>
9572
9573 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9574 * config/nds32/nds32-n8.md: New file.
9575 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9576 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9577 pipeline.
9578 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9579 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9580 * config/nds32/nds32.md (pipeline_model): Add n8.
9581 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9582 * config/nds32/pipelines.md: Include n8 settings.
9583
9584 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9585 Chung-Ju Wu <jasonwucj@gmail.com>
9586
9587 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9588 * config/nds32/nds32-n9-2r1w.md: New file.
9589 * config/nds32/nds32-n9-3r2w.md: New file.
9590 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9591 nds32_register_ports): New or modify for cpu n9.
9592 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9593 pipeline.
9594 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9595 * config/nds32/nds32-utils.c: New file.
9596 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9597 TARGET_MUL_SLOW): Define.
9598 * config/nds32/nds32.md (pipeline_model): New attribute.
9599 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9600 New options that support cpu n9.
9601 * config/nds32/pipelines.md: Include n9 settings.
9602 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9603
9604 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9605
9606 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9607 information if necessary.
9608 (output_cond_branch_compare_zero): Likewise.
9609 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9610 (nds32_target_alignment): Refine for alignment.
9611 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9612 (FUNCTION_BOUNDARY): Modify.
9613 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9614 align case.
9615 * config/nds32/nds32.opt (malways-align, malign-functions): New.
9616
9617 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9618
9619 * config/nds32/constants.md (unspec_volatile_element): Add values for
9620 TLB operation and data prefetch.
9621 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9622 functions for TLB operation and data prefetch.
9623 * config/nds32/nds32-intrinsic.md: Likewise.
9624 * config/nds32/nds32_intrinsic.h: Likewise.
9625 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9626 (nds32_print_operand): Likewise.
9627 * config/nds32/nds32.h (nds32_builtins): Likewise.
9628
9629 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
9630 Andrew Pinski <pinsika@gcc.gnu.org>
9631
9632 PR middle-end/82976
9633 * match.pd: Use constant_boolean_node of correct type instead of
9634 boolean_true_node or boolean_false_node for simplifying
9635 pointer comparisons to zero.
9636
9637 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9638
9639 PR tree-optimization/80021
9640 * tree.c (verify_type_variant): Make error call in verify_variant_match
9641 translatable and remove final full stop.
9642
9643 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9644
9645 * config/nds32/constants.md (unspec_volatile_element): Add
9646 UNSPEC_VOLATILE_EH_RETURN.
9647 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9648 nds32_output_stack_pop): Support dwarf exception handling process.
9649 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9650 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9651 exception handling process.
9652 (nds32_compute_stack_frame): Likewise.
9653 (nds32_return_addr_rtx): Likewise.
9654 (nds32_initial_elimination_offset): Likewise.
9655 (nds32_expand_prologue): Likewise.
9656 (nds32_expand_epilogue): Likewise.
9657 (nds32_dynamic_chain_address): New function.
9658 * config/nds32/nds32.h (machine_function): Add fields for dwarf
9659 exception handling.
9660 (DYNAMIC_CHAIN_ADDRESS): Define.
9661 (EH_RETURN_DATA_REGNO): Define.
9662 (EH_RETURN_STACKADJ_RTX): Define.
9663 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9664 patterns for dwarf exception handling.
9665
9666 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9667
9668 * config/nds32/nds32.h: Clean up obsolete macros.
9669
9670 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9671
9672 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9673 Add enum values for particular instructions.
9674 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9675 particular intrinsic functions.
9676 * config/nds32/nds32-intrinsic.md: Likewise.
9677 * config/nds32/nds32_intrinsic.h: Likewise.
9678 * config/nds32/nds32.h (nds32_builtins): Likewise.
9679 * config/nds32/nds32.md (type): Add pbsad and pbsada.
9680 (btst, ave): New patterns for particular instructions.
9681
9682 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9683
9684 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9685 Add enum values for atomic load/store and memory sync.
9686 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9687 and memory sync.
9688 * config/nds32/nds32-intrinsic.md: Likewise.
9689 * config/nds32/nds32_intrinsic.h: Likewise.
9690 * config/nds32/nds32.h (nds32_builtins): Likewise.
9691
9692 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9693
9694 PR tree-optimization/85257
9695 * fold-const.c (native_encode_vector): If not all elts could fit
9696 and off is -1, return 0 rather than offset.
9697 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9698 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9699 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
9700 adjust buffer in native_interpret_expr call.
9701
9702 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9703
9704 * config/nds32/constants.md (unspec_volatile_element): Add cache
9705 control enum values.
9706 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9707 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9708 * config/nds32/nds32.c (nds32_cctl_names): New.
9709 (nds32_print_operand): Handle cache control register names.
9710 * config/nds32/nds32.h (nds32_builtins): New enum values.
9711 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9712 macros.
9713 * config/nds32/nds32.md (type): Add mmu.
9714 * config/nds32/pipelines.md (simple_insn): Add mmu.
9715
9716 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9717
9718 * config/nds32/nds32.md (type): Remove call.
9719 * config/nds32/pipelines.md (simple_insn): Likewise.
9720
9721 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9722
9723 * config/nds32/constants.md (unspec_volatile_element): Add
9724 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9725 UNSPEC_VOLATILE_FMFCFG.
9726 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9727 description for fmfcfg and fmfcsr.
9728 (bdesc_1arg): Add fmtcsr.
9729 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9730 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9731 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9732 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9733 unspec_fmfcfg): New patterns.
9734 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9735 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9736 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9737 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9738 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9739 __nds32__fmfcfg): Define.
9740
9741 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9742
9743 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9744 intrinsic register names.
9745 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9746 intrinsic register enum values and macros.
9747
9748 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9749
9750 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9751 for load/store addressing form.
9752 (nds32_print_operand_address): Likewise.
9753
9754 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
9755
9756 PR target/85196
9757 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9758 based on LABEL_REF. Remove useless assertion.
9759 (pic_address_needs_scratch): Fix formatting.
9760 (sparc_legitimize_pic_address): Minor tweaks.
9761 (sparc_delegitimize_address): Adjust assertion accordingly.
9762 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9763 into symbolic_operand.
9764 (movsi_high_pic_label_ref): Likewise.
9765 (movsi_lo_sum_pic_label_ref): Likewise.
9766 (movdi_pic_label_ref): Likewise.
9767 (movdi_high_pic_label_ref): Likewise.
9768 (movdi_lo_sum_pic_label_ref): Likewise.
9769
9770 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
9771
9772 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9773 custom LIB_SPEC setup.
9774
9775 2018-04-06 Ruslan Bukin <br@bsdpad.com>
9776 Kito Cheng <kito.cheng@gmail.com>
9777
9778 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9779 * config/riscv/freebsd.h: New.
9780
9781 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9782
9783 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9784 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9785 file.
9786
9787 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9788 Kito Cheng <kito.cheng@gmail.com>
9789
9790 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9791 nds32_output_call, nds32_symbol_binds_local_p): New functions.
9792 * config/nds32/nds32-protos.h (nds32_output_call,
9793 nds32_output_return): Declare.
9794 * config/nds32/nds32.md: Refine all the call and return patterns.
9795
9796 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9797
9798 PR debug/85252
9799 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9800 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9801
9802 PR rtl-optimization/84872
9803 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9804 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9805 EDGE_CROSSING edge.
9806
9807 2018-04-06 Tamar Christina <tamar.christina@arm.com>
9808
9809 * expr.c (copy_blkmode_to_reg): Revert 254862.
9810 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9811
9812 2018-04-06 Richard Biener <rguenther@suse.de>
9813
9814 PR middle-end/85244
9815 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9816 after seeing a component reference with an adjacent field. Treat
9817 refs to arrays at struct end of external decls similar to
9818 refs to unconstrained commons.
9819
9820 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9821
9822 PR sanitizer/85213
9823 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9824 look through SAVE_EXPRs with non-side-effects argument. Adjust
9825 recursive calls.
9826 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9827 save_p here.
9828
9829 2018-04-06 Richard Biener <rguenther@suse.de>
9830
9831 PR middle-end/85180
9832 * alias.c (find_base_term): New wrapper around find_base_term
9833 unwinding CSELIB_VAL_PTR changes.
9834 (find_base_term): Do not restore CSELIB_VAL_PTR during the
9835 recursion.
9836
9837 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9838
9839 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9840 instructions.
9841 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9842 constant definitions.
9843 ("nop"): lr 0,0 -> nopr r0
9844 ("nop_lr0", "nop_lr1"): New insn definitions.
9845
9846 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9847
9848 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9849 NDS32_V3PUSH_AVAILABLE_P macro.
9850
9851 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
9852 Chung-Ju Wu <jasonwucj@gmail.com>
9853
9854 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9855 (nds32*-*-*): Add float and fpu_config into supported_defaults.
9856 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9857 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9858 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9859 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9860 * config/nds32/constraints.md: New constraints and checking for hard
9861 float configuration.
9862 * config/nds32/iterators.md: New mode iterator and attribute for hard
9863 float configuration.
9864 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9865 patterns.
9866 * config/nds32/nds32-fpu.md: New file.
9867 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9868 deal with hard float code generation.
9869 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9870 ARCH_V3S.
9871 (abi_type, float_reg_number): New enum type.
9872 * config/nds32/nds32-predicates.c: New predicates for hard float.
9873 * config/nds32/nds32-protos.h: Declare functions for hard float.
9874 * config/nds32/nds32.c: Implementation for hard float configuration.
9875 * config/nds32/nds32.h: Definitions for hard float configuration.
9876 * config/nds32/nds32.md: Include hard float machine description and
9877 modify patterns for hard float configuration.
9878 * config/nds32/nds32.opt: New options for hard float configuration.
9879 * config/nds32/predicates.md: New predicates for hard float
9880 configuration.
9881
9882 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9883
9884 * common/config/nds32/nds32-common.c
9885 (nds32_option_optimization_table): Enable -mreleax-hint by default.
9886
9887 2018-04-05 Jakub Jelinek <jakub@redhat.com>
9888
9889 PR middle-end/85195
9890 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9891 CONSTRUCTOR_ELT (ctor, ...)->value.
9892
9893 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
9894
9895 PR target/85193
9896 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9897
9898 2018-04-05 Tom de Vries <tom@codesourcery.com>
9899
9900 PR target/85204
9901 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9902 cond jump.
9903
9904 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9905 Kito Cheng <kito.cheng@gmail.com>
9906
9907 * config/nds32/constraints.md (U33): Fine-tune checking condition.
9908 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9909 * config/nds32/nds32.h (nds32_16bit_address_type): Add
9910 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9911
9912 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9913 Kito Cheng <kito.cheng@gmail.com>
9914
9915 * config/nds32/constraints.md (Ufe): New memory constraint.
9916 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9917 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9918 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9919 operands.
9920 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9921 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9922
9923 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9924
9925 * config/nds32/nds32.md: Use optimize_size in the condition for
9926 alu-shift instructions.
9927
9928 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9929
9930 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9931
9932 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9933
9934 * config/nds32/nds32.md (negsi2): Refine pattern.
9935
9936 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9937 Chung-Ju Wu <jasonwucj@gmail.com>
9938
9939 * config/nds32/iterators.md (shift_rotate): New code iterator.
9940 (shift): New code attribute.
9941 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9942 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9943 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9944 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9945 bit-wise operations.
9946 (andsi3, *andsi3): Ditto.
9947 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9948 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9949 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9950 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9951 nds32_ior_operand, nds32_xor_operand): New predicates.
9952
9953 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9954
9955 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9956 (addsi3, subsi3): ... this.
9957
9958 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9959
9960 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9961
9962 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9963
9964 * config/nds32/nds32.md: Adjust indention.
9965
9966 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9967
9968 * config/nds32/nds32.md (feature): New attribute.
9969
9970 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9971
9972 * config/nds32/nds32.md (subtype): New attribute.
9973
9974 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
9975
9976 PR target/85203
9977 * config/arm/arm-builtins.c (arm_expand_builtin): Change
9978 expansion to perform a bitwise AND of the argument followed by a
9979 boolean negation of the result.
9980
9981 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
9982
9983 PR rtl-optimization/84878
9984 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9985 the basic block. Assert the use reference is not artificial and that
9986 it has an associated insn.
9987
9988 2018-04-04 Michael Matz <matz@suse.de>
9989
9990 * builtins.c (compute_objsize): Pass correct operand
9991 to array_at_struct_end_p.
9992
9993 2018-04-04 Richard Biener <rguenther@suse.de>
9994
9995 PR lto/85176
9996 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9997 from contexts for DINFO_LEVEL_TERSE and below.
9998
9999 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10000
10001 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10002 resiter_operand condition.
10003 * config/nds32/nds32.md (*move<mode>): Ditto.
10004
10005 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10006 Monk Chiang <sh.chiang04@gmail.com>
10007
10008 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10009
10010 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10011
10012 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10013
10014 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10015 Kito Cheng <kito.cheng@gmail.com>
10016
10017 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10018 nds32_cond_code_str, output_cond_branch,
10019 output_cond_branch_compare_zero, nds32_expand_cbranch,
10020 nds32_expand_cstore, nds32_expand_movcc,
10021 nds32_output_cbranchsi4_equality_zero,
10022 nds32_output_cbranchsi4_equality_reg,
10023 nds32_output_cbranchsi4_equality_reg_or_const_int,
10024 nds32_output_cbranchsi4_greater_less_zero: New functions.
10025 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10026 nds32_expand_cstore, nds32_expand_movcc,
10027 nds32_output_cbranchsi4_equality_zero,
10028 nds32_output_cbranchsi4_equality_reg,
10029 nds32_output_cbranchsi4_equality_reg_or_const_int,
10030 nds32_output_cbranchsi4_greater_less_zero): Declare.
10031 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10032 nds32_rimm11s_operand): New predicates.
10033 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10034 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10035 patterns.
10036
10037 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10038
10039 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10040 * config/nds32/nds32.md: Ditto.
10041 * config/nds32/pipelines.md: Ditto.
10042
10043 2018-04-04 Richard Biener <rguenther@suse.de>
10044
10045 PR tree-optimization/85168
10046 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10047 propagating abnormals.
10048
10049 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10050
10051 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10052
10053 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10054 Kito Cheng <kito.cheng@gmail.com>
10055
10056 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10057 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10058 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10059 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10060 * config/nds32/nds32.md (sibcall_internal): New.
10061 (sibcall_register): Remove.
10062 (sibcall_immediate): Remove.
10063 (sibcall_value_internal): New.
10064 (sibcall_value_register): Remove.
10065 (sibcall_value_immediate): Remove.
10066 * config/nds32/predicates.md (nds32_general_register_operand): New.
10067 (nds32_call_address_operand): New.
10068
10069 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10070
10071 PR rtl-optimization/85167
10072 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10073 bb_defs if *split_p, instead preinitialize it to NULL.
10074
10075 PR tree-optimization/85156
10076 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10077 evaluating the argument multiple times.
10078
10079 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10080
10081 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10082 than vector.
10083 (_mm_cvtpd_ps): Likewise.
10084 (_mm_cvttpd_epi32): Likewise.
10085 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10086 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10087 vector, pixel, and bool following altivec.h include.
10088
10089 2018-04-03 Martin Sebor <msebor@redhat.com>
10090
10091 * doc/extend.texi (Common Function Attributes): Clarify.
10092 (const attribute): Likewise.
10093 (pure attribute): Likewise.
10094
10095 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10096
10097 PR target/85169
10098 * config/i386/i386.c (ix86_expand_vector_set): Use
10099 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10100
10101 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10102
10103 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10104 instructions when changing rounding bits to preserve precision bits
10105 in the x87 control word.
10106
10107 2018-04-03 Martin Liska <mliska@suse.cz>
10108
10109 PR tree-optimization/82491
10110 * rtl.h (strip_offset_and_add): Replace += suboffset with
10111 poly_uint64 () + suboffset.
10112
10113 2018-03-29 Martin Liska <mliska@suse.cz>
10114 Martin Jambor <mjambor@suse.cz>
10115
10116 PR ipa/84947
10117 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10118 param_type is not an integral or pointer type.
10119
10120 2018-04-03 Richard Biener <rguenther@suse.de>
10121
10122 * sese.h (recompute_all_dominators): Remove.
10123
10124 2018-04-02 Martin Sebor <msebor@redhat.com>
10125
10126 * doc/invoke.texi (-Wrestrict): Fix typos.
10127
10128 2018-04-02 Jim Wilson <jimw@sifive.com>
10129
10130 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10131 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10132 (<optab>di3, <optab>si3_extend): Likewise.
10133 (<optab>si3_mask, <optab>si3_mask_1): New.
10134 (<optab>di3_mask, <optab>di3_mask_1): New.
10135 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10136 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10137 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10138
10139 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10140
10141 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10142 example.
10143
10144 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10145
10146 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10147 (nds32_canonicalize_comparison): New function.
10148
10149 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10150 Kito Cheng <kito.cheng@gmail.com>
10151 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10152
10153 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10154 * config/nds32/constants.md (unspec_volatile_element): Add
10155 UNSPEC_VOLATILE_RELAX_GROUP.
10156 * config/nds32/nds32-relax-opt.c: New file.
10157 * config/nds32/nds32-predicates.c
10158 (nds32_symbol_load_store_p): New function.
10159 * config/nds32/nds32-protos.h
10160 (nds32_symbol_load_store_p): Declare function.
10161 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10162 * config/nds32/nds32.c
10163 (nds32_register_pass): New function to register pass.
10164 (nds32_register_passes): New function to register passes.
10165 * config/nds32/nds32.md (relax_group): New pattern.
10166 * config/nds32/nds32.opt (mrelax-hint): New option.
10167 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10168
10169 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10170
10171 * config/nds32/t-nds32: Modify files dependency.
10172
10173 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10174
10175 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10176 (PROFILE_HOOK): Define its implementation.
10177
10178 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10179
10180 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10181 type and 32-bit size.
10182
10183 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10184
10185 PR middle-end/85090
10186 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10187 (V_128_256): New mode iterator.
10188 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10189 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10190 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10191 of V.
10192 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10193 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10194
10195 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10196
10197 PR target/83315
10198 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10199 NaN inputs correctly.
10200
10201 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10202
10203 PR target/80546
10204 * config/rs6000/vsx.md (??r): New mode attribute.
10205 (*vsx_mov<mode>_64bit): Use it.
10206 (*vsx_mov<mode>_32bit): Likewise.
10207
10208 2018-03-30 Martin Sebor <msebor@redhat.com>
10209
10210 PR tree-optimization/84818
10211 * builtins.c (check_access): Use warning_n.
10212
10213 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10214
10215 PR target/83822
10216 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10217 condition.
10218 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10219 condition.
10220
10221 2018-03-30 Julia Koval <julia.koval@intel.com>
10222
10223 PR target/84413
10224 * x86-tune.def (movx, partial_reg_dependency): Enable for
10225 m_SKYLAKE_AVX512.
10226
10227 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
10228
10229 PR inline-asm/84985
10230 * lra-constraints.c (process_alt_operands): Move setting
10231 this_alternative_matches below.
10232
10233 2018-03-29 Martin Liska <mliska@suse.cz>
10234
10235 PR lto/84995.
10236 * doc/invoke.texi: Document how LTO works with debug info.
10237 Describe auto-load support of binutils. Mention 'x86-64'
10238 as valid option value of -march option.
10239
10240 2018-03-29 Jakub Jelinek <jakub@redhat.com>
10241
10242 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10243
10244 PR c/85094
10245 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10246 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10247 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10248 checking.
10249
10250 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10251
10252 PR target/84912
10253 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10254 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10255 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10256 for RS6000_BTM_POWERPC64.
10257 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10258 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10259 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10260 definition.
10261 (DIVDE): Use it.
10262 (DIVDEU): Likewise.
10263
10264 2018-03-28 Carl Love <cel@us.ibm.com>
10265
10266 Revert
10267 2017-09-27 Carl Love <cel@us.ibm.com>
10268
10269 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10270 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10271 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10272 fctiw instruction.
10273
10274 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10275
10276 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10277 instead of __vector bool.
10278 (_mm_max_pu8): Likewise.
10279 (_mm_min_pi16): Likewise.
10280
10281 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10282
10283 PR target/84912
10284 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10285 (DIVWEUO): Likewise.
10286 (DIVDEO): Likewise.
10287 (DIVDEUO): Likewise.
10288 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10289 DIVWEUO and DIVDEUO.
10290 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10291 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10292 (div_extend): Likewise.
10293 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10294 builtin function.
10295 (__builtin_divweuo): Likewise.
10296 (__builtin_divdeo): Likewise.
10297 (__builtin_divdeuo): Likewise.
10298
10299 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10300
10301 PR target/85095
10302 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10303 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10304
10305 PR tree-optimization/82004
10306 * gimple-match-head.c (optimize_pow_to_exp): New function.
10307 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10308 Don't fold to exp if optimize_pow_to_exp is false.
10309
10310 2018-03-28 Martin Liska <mliska@suse.cz>
10311
10312 PR other/84819
10313 * calls.c (initialize_argument_information): Fix trailing space.
10314 * common.opt: Fix typo and provide better explanation for
10315 -fsanitize-coverage option.
10316 * config/i386/i386.opt: Fix typo.
10317
10318 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10319 Martin Liska <mliska@suse.cz>
10320
10321 PR sanitizer/85081
10322 * gimplify.c (asan_poison_variable): Don't do the check for
10323 gimplify_omp_ctxp here.
10324 (gimplify_decl_expr): Do it here.
10325 (gimplify_target_expr): Likewise.
10326
10327 2018-03-28 Martin Liska <mliska@suse.cz>
10328
10329 PR target/84988
10330 * config/i386/i386.c (ix86_function_arg_advance): Do not call
10331 chkp_type_bounds_count if MPX is not enabled.
10332
10333 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
10334
10335 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10336
10337 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
10338
10339 PR target/84914
10340 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10341 function to create the function decl for complex long double
10342 multiply and divide for -mabi=ieeelongdouble.
10343 (init_float128_ieee): Call it.
10344
10345 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
10346
10347 PR target/85044
10348 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10349 -fcf-protection=branch -mibt.
10350 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10351
10352 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10353
10354 PR target/81863
10355 * config/arm/arm.c (arm_valid_symbolic_address): Handle
10356 arm_word_relocations.
10357
10358 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
10359
10360 PR target/85056
10361 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10362 extern array declarations.
10363
10364 2018-03-27 Richard Biener <rguenther@suse.de>
10365
10366 PR middle-end/84067
10367 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10368 explicit single_use checks.
10369
10370 2018-03-27 Richard Biener <rguenther@suse.de>
10371
10372 PR tree-optimization/85082
10373 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10374 Valueize the VUSE.
10375
10376 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10377
10378 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10379 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10380 Turn on fasynchronous-unwind-tables and funwind-tables.
10381
10382 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
10383
10384 PR target/85073
10385 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10386 (*bmi_blsr_<mode>_ccz): Ditto.
10387
10388 2018-03-26 Tom de Vries <tom@codesourcery.com>
10389
10390 PR tree-optimization/85063
10391 * omp-general.c (offloading_function_p): New function. Factor out
10392 of ...
10393 * omp-offload.c (pass_omp_target_link::gate): ... here.
10394 * omp-general.h (offloading_function_p): Declare.
10395 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10396 with attribute omp declare target for offloading functions.
10397
10398 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
10399
10400 PR tree-optimization/84005
10401 * tree-data-ref.h (get_base_for_alignment): Declare.
10402 * tree-data-ref.c (get_base_for_alignment_1): New function.
10403 (get_base_for_alignment): Likewise.
10404 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10405 get_base_for_alignment to find a suitable base object, instead
10406 of always using drb->base_address.
10407
10408 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10409
10410 PR inline-asm/85022
10411 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10412 known size by default.
10413
10414 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
10415
10416 PR inline-asm/85030
10417 * lra-constraints.c (process_alt_operands): Don't match BLKmode
10418 and non BLKmode operands.
10419
10420 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10421
10422 PR target/85026
10423 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10424 Clean up attributes.
10425
10426 2018-03-23 Richard Biener <rguenther@suse.de>
10427
10428 PR debug/85020
10429 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10430 we are going to emit early debug for LTO.
10431
10432 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10433
10434 PR inline-asm/85034
10435 * function.c (match_asm_constraints_1): Don't optimize if input
10436 doesn't satisfy general_operand predicate for output's mode.
10437
10438 PR inline-asm/85022
10439 * alias.c (write_dependence_p): Don't require for x_canonicalized
10440 non-VOIDmode if x has VOIDmode.
10441
10442 PR sanitizer/85029
10443 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10444 just don't try to optimize it rather than assert it never happens.
10445
10446 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10447
10448 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10449 macro expansions for definition of ST_INTERNAL_<mode> and
10450 LD_INTERNAL_<mode> builtins.
10451 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
10452 Remove prototype.
10453 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
10454 function.
10455 (altivec_expand_st_builtin): Likewise.
10456 (altivec_expand_builtin): Remove calls to deleted functions.
10457 (rs6000_address_for_altivec): Delete this function.
10458 * config/rs6000/vector.md: Remove expands for
10459 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
10460
10461 2018-03-22 Sudakshina Das <sudi.das@arm.com>
10462
10463 PR target/84826
10464 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
10465 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
10466 re-computing once computed.
10467 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
10468 (arm_init_machine_status): Initialize
10469 machine->static_chain_stack_bytes.
10470
10471 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10472
10473 PR target/84760
10474 * doc/extend.texi: Add four new prototypes for vec_ld.
10475 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
10476 definitions for more logical presentation.
10477 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
10478 entries for V1TI variants of __builtin_altivec_ld builtin.
10479 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
10480 handling of V1TI variant of LVX icode pattern.
10481 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
10482 (rs6000_gimple_fold_builtin): Likewise.
10483 (altivec_init_builtins): Add code to define
10484 __builtin_altivec_lvx_v1ti function.
10485
10486 2018-03-22 Jakub Jelinek <jakub@redhat.com>
10487
10488 PR inline-asm/84941
10489 * function.c (match_asm_constraints_1): Don't do the optimization
10490 if input isn't a REG, SUBREG, MEM or constant.
10491
10492 2018-03-22 Tom de Vries <tom@codesourcery.com>
10493
10494 PR tree-optimization/84956
10495 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10496 bb_has_abnormal_pred.
10497
10498 2018-03-22 Jakub Jelinek <jakub@redhat.com>
10499
10500 PR sanitizer/85018
10501 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10502 DECL_INITIAL (decl) to decl at the end.
10503 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10504 adjust the comment.
10505
10506 2018-03-21 Joseph Myers <joseph@codesourcery.com>
10507
10508 * doc/extend.texi (__builtin_tgmath): Document when complex
10509 integer types are treated as _Complex _Float64.
10510
10511 2018-03-21 Tom de Vries <tom@codesourcery.com>
10512
10513 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10514
10515 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10516
10517 PR tree-optimization/84960
10518 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10519 if it is ENTRY block, move them into single succ of ENTRY in that case.
10520
10521 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
10522
10523 PR tree-optimization/84811
10524 * poly-int.h (poly_span_traits): Remove the T3 parameter and
10525 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10526 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10527 (known_subrange_p): Update accordingly. Cast each value involved
10528 in the size comparison, rather than casting the result of the
10529 subtraction.
10530
10531 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10532
10533 PR tree-optimization/84982
10534 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10535 by flipping the least significant bit rather than all bits from
10536 bitpos to bitpos + bitsize - 1.
10537
10538 2018-03-21 Nathan Sidwell <nathan@acm.org>
10539
10540 * doc/extend.texi (Deprecated Features): Remove mention of
10541 long-deleted deprecations.
10542
10543 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10544
10545 PR jit/84288
10546 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10547 * configure: Regenerate.
10548
10549 2018-03-21 Tom de Vries <tom@codesourcery.com>
10550
10551 PR tree-optimization/83126
10552 * tree-parloops.c (num_phis): New function.
10553 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10554
10555 2018-03-21 Nathan Sidwell <nathan@acm.org>
10556
10557 * doc/extend.texi (Deprecated Features): Update deprecated flags,
10558 mention anon-struct/union members and trailing attributes.
10559
10560 2018-03-21 Bin Cheng <bin.cheng@arm.com>
10561
10562 PR tree-optimization/84969
10563 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10564 builtin memset partitions if they set different rhs values.
10565
10566 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10567
10568 PR rtl-optimization/84989
10569 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10570 VEC_DUPLICATE with scalar result mode.
10571
10572 2018-03-21 Martin Liska <mliska@suse.cz>
10573
10574 PR ipa/84963
10575 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10576 not intended return statement.
10577
10578 2018-03-21 Martin Liska <mliska@suse.cz>
10579
10580 PR target/84988
10581 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10582 (chkp_find_bound_slots_1): Limit number of iterations.
10583
10584 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
10585
10586 PR target/84838
10587 * Minor grammar fixes for x86 options.
10588
10589 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10590
10591 PR debug/84875
10592 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10593 holding REG_CFA_RESTORE notes, instead turn them into a USE.
10594
10595 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
10596
10597 PR target/83789
10598 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10599 (altivec_lvx_<mode>_1op): Likewise.
10600 (altivec_stvx_<mode>_2op): Likewise.
10601 (altivec_stvx_<mode>_1op): Likewise.
10602 (altivec_lvx_<VM2:mode>): New define_expand.
10603 (altivec_stvx_<VM2:mode>): Likewise.
10604 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10605 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10606 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10607 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10608 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10609 (rs6000_gen_lvx): Likewise.
10610 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10611 (altivec_expand_stv_builtin): Likewise.
10612 (altivec_expand_builtin): Likewise.
10613 * config/rs6000/vector.md: Likewise.
10614
10615 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10616
10617 PR target/82518
10618 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10619 BYTES_BIG_ENDIAN.
10620
10621 2018-03-20 Richard Biener <rguenther@suse.de>
10622
10623 PR target/84986
10624 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10625 sign-conversions as zero, fall back to standard scalar_stmt
10626 cost for the rest.
10627
10628 2018-03-20 Martin Liska <mliska@suse.cz>
10629
10630 PR ipa/84825
10631 * predict.c (rebuild_frequencies): Handle case when we have
10632 PROFILE_ABSENT, but flag_guess_branch_prob is false.
10633
10634 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10635
10636 PR target/84990
10637 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10638 flag_section_anchors.
10639 * varasm.c (use_blocks_for_decl_p): Remove hack for
10640 dw2_force_const_mem.
10641
10642 PR target/84845
10643 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10644 to ...
10645 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
10646 be created, use lowpart_subreg of operands[0] rather than operands[0]
10647 itself.
10648 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10649 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10650 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10651 and n constraint instead of aarch64_shift_imm_di and Usd.
10652 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10653 (*aarch64_<optab>_reg_minus<mode>3): ... this.
10654
10655 2018-03-20 Sudakshina Das <sudi.das@arm.com>
10656
10657 PR target/82989
10658 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10659 to favor GPR over NEON registers.
10660 (<shift>di3_neon): Likewise.
10661
10662 2018-03-20 Tom de Vries <tom@codesourcery.com>
10663
10664 PR target/84952
10665 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10666 (nvptx_process_pars): Emit bar.sync asap and alap.
10667
10668 2018-03-20 Tom de Vries <tom@codesourcery.com>
10669
10670 PR target/84954
10671 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10672 seen_label if seen_label is already set.
10673
10674 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10675
10676 PR target/84945
10677 * config/i386/i386.c (fold_builtin_cpu): For features above 31
10678 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10679 Use 1U instead of 1. Formatting fixes.
10680
10681 PR c/84953
10682 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10683 instead of TREE_TYPE (s1) for the return value.
10684
10685 2018-03-19 Jakub Jelinek <jakub@redhat.com>
10686
10687 PR tree-optimization/84946
10688 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10689 bitsize + bitsize in poly_uint64 rather than poly_int64.
10690
10691 PR sanitizer/78651
10692 * dwarf2asm.c: Include fold-const.c.
10693 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10694 of decl rather than decl itself.
10695
10696 PR rtl-optimization/84643
10697 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10698
10699 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
10700
10701 PR sanitizer/78651
10702 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10703 calling assemble_variable.
10704
10705 2018-03-19 Sudakshina Das <sudi.das@arm.com>
10706
10707 PR target/81647
10708 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10709 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10710
10711 2018-03-19 Jim Wilson <jimw@sifive.com>
10712
10713 PR bootstrap/84856
10714 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10715 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10716 (riscv_first_stack_step): Likewise.
10717 (riscv_option_override): Use STACK_BOUNDARY instead of
10718 MIN_STACK_BOUNDARY.
10719 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10720 MIN_STACK_BOUNDARY.
10721 (BIGGEST_ALIGNMENT): Set to 128.
10722 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10723 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10724 STACK_BOUNDARY.
10725
10726 2018-03-19 Richard Biener <rguenther@suse.de>
10727
10728 PR tree-optimization/84933
10729 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10730 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10731
10732 2018-03-19 Richard Biener <rguenther@suse.de>
10733
10734 PR tree-optimization/84859
10735 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10736 (cond_if_else_store_replacement): Perform sinking operation on
10737 single-store BBs regardless of MAX_STORES_TO_SINK setting.
10738 Generalize what a BB with a single eligible store is.
10739
10740 2018-03-19 Richard Biener <rguenther@suse.de>
10741
10742 PR tree-optimization/84929
10743 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10744 chrec_is_positive against non-chrec arg.
10745
10746 2018-03-19 Tamar Christina <tamar.christina@arm.com>
10747
10748 PR target/84711
10749 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10750
10751 2018-03-18 Martin Liska <mliska@suse.cz>
10752
10753 PR rtl-optimization/84635
10754 * regrename.c (build_def_use): Use matches_mode only when
10755 matches >= 0.
10756
10757 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
10758
10759 PR tree-optimization/84913
10760 * tree-vect-loop.c (vectorizable_reduction): Don't try to
10761 vectorize chains of COND_EXPRs.
10762
10763 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10764
10765 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10766
10767 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10768
10769 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10770
10771 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10772
10773 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10774
10775 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10776 Kito Cheng <kito.cheng@gmail.com>
10777
10778 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10779 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10780 (nds32_adjust_reg_alloc_order): New function.
10781 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10782
10783 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
10784
10785 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10786 nds32_print_operand, nds32_print_operand_address): Use
10787 HOST_WIDE_INT_PRINT_DEC instead.
10788
10789 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10790
10791 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10792
10793 2018-03-17 Jakub Jelinek <jakub@redhat.com>
10794
10795 PR target/84902
10796 * config/i386/i386.c (initial_ix86_tune_features,
10797 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10798 unsigned long long.
10799 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10800 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10801 rather than 1u << ix86_tune. Formatting fix.
10802 (ix86_option_override_internal): Change ix86_arch_mask from
10803 unsigned int to unsigned HOST_WIDE_INT, initialize to
10804 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10805 (ix86_function_specific_restore): Likewise.
10806
10807 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10808
10809 PR target/84899
10810 * postreload.c (reload_combine_recognize_pattern): Perform
10811 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10812 truncate_int_for_mode the result for the destination's mode.
10813
10814 PR c/84909
10815 * hsa-gen.c (mem_type_for_type): Fix comment typo.
10816 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10817 Likewise.
10818 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10819 Likewise.
10820
10821 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
10822
10823 PR target/84876
10824 * lra-assigns.c (lra_split_hard_reg_for): Don't use
10825 regno_allocno_class_array and sorted_pseudos.
10826 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10827 insns where regno is used.
10828
10829 2018-03-16 Martin Liska <mliska@suse.cz>
10830
10831 PR ipa/84833
10832 * multiple_target.c (create_dispatcher_calls): Redirect
10833 reference in the symbol table.
10834
10835 2018-03-16 Martin Liska <mliska@suse.cz>
10836
10837 PR ipa/84722
10838 * multiple_target.c (create_dispatcher_calls): Redirect also
10839 an alias.
10840
10841 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10842
10843 PR c++/79937
10844 PR c++/82410
10845 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10846 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10847 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10848
10849 2018-03-16 Julia Koval <julia.koval@intel.com>
10850
10851 * doc/invoke.texi (Skylake Server): Add CLWB.
10852 Cannonlake): Remove CLWB.
10853
10854 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10855
10856 PR tree-optimization/84841
10857 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10858 1 << 3.
10859 (FLOAT_ONE_CONST_TYPE): Define.
10860 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10861 (sort_by_operand_rank): Put entries with higher constant_type last
10862 rather than first to match comments.
10863
10864 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
10865
10866 * config/nios2/nios2.md (movsi_internal): Fix thinko in
10867 split predicate.
10868
10869 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10870
10871 PR c++/79085
10872 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10873 check and use address of target always.
10874
10875 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
10876
10877 PR target/84574
10878 * config/i386/i386.c (indirect_thunk_needed): Update comments.
10879 (indirect_thunk_bnd_needed): Likewise.
10880 (indirect_thunks_used): Likewise.
10881 (indirect_thunks_bnd_used): Likewise.
10882 (indirect_return_needed): New.
10883 (indirect_return_bnd_needed): Likewise.
10884 (output_indirect_thunk_function): Add a bool argument for
10885 function return.
10886 (output_indirect_thunk_function): Don't generate alias for
10887 function return thunk.
10888 (ix86_code_end): Call output_indirect_thunk_function to generate
10889 function return thunks.
10890 (ix86_output_function_return): Set indirect_return_bnd_needed
10891 and indirect_return_needed instead of indirect_thunk_bnd_needed
10892 and indirect_thunk_needed.
10893
10894 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
10895
10896 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10897 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10898 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10899
10900 2018-03-15 David Malcolm <dmalcolm@redhat.com>
10901 Paul Hua <paul.hua.gm@gmail.com>
10902
10903 PR c/84852
10904 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10905
10906 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
10907
10908 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10909 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10910 resp. SFmode cases.
10911
10912 2018-03-15 Tamar Christina <tamar.christina@arm.com>
10913
10914 PR target/84711
10915 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10916 instead of GET_MODE_SIZE when comparing Units.
10917
10918 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10919
10920 PR target/68256
10921 * varasm.c (hash_section): Return an unchangeble hash value
10922 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10923 Return !aarch64_can_use_per_function_literal_pools_p ().
10924
10925 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10926
10927 PR target/84860
10928 * optabs.c (emit_conditional_move): Pass address of cmode's copy
10929 rather than address of cmode as last argument to prepare_cmp_insn.
10930
10931 2018-03-15 Julia Koval <julia.koval@intel.com>
10932
10933 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10934 F_AVX512VNNI, F_AVX512BITALG): New.
10935
10936 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
10937
10938 PR target/83451
10939 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
10940 insn for floating-point loads and stores.
10941
10942 2018-03-14 Carl Love <cel@us.ibm.com>
10943
10944 * config/rs6000/rs6000-c.c: Add macro definitions for
10945 ALTIVEC_BUILTIN_VEC_PERMXOR.
10946 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10947 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10948 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10949 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10950 UNSPEC_VPERMXOR.
10951 * config/doc/extend.texi: Add prototypes for vec_permxor.
10952
10953 2018-03-14 David Malcolm <dmalcolm@redhat.com>
10954
10955 PR c/84852
10956 * diagnostic-show-locus.c (class layout_point): Convert m_line
10957 from int to linenum_type.
10958 (line_span::comparator): Use linenum "compare" function when
10959 comparing line numbers.
10960 (test_line_span): New function.
10961 (layout_range::contains_point): Convert param "row" from int to
10962 linenum_type.
10963 (layout_range::intersects_line_p): Likewise.
10964 (layout::will_show_line_p): Likewise.
10965 (layout::print_source_line): Likewise.
10966 (layout::should_print_annotation_line_p): Likewise.
10967 (layout::print_annotation_line): Likewise.
10968 (layout::print_leading_fixits): Likewise.
10969 (layout::annotation_line_showed_range_p): Likewise.
10970 (struct line_corrections): Likewise for field m_row.
10971 (line_corrections::line_corrections): Likewise for param "row".
10972 (layout::print_trailing_fixits): Likewise.
10973 (layout::get_state_at_point): Likewise.
10974 (layout::get_x_bound_for_row): Likewise.
10975 (layout::print_line): Likewise.
10976 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10977 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10978 * input.c (selftest::test_linenum_comparisons): New function.
10979 (selftest::input_c_tests): Call it.
10980 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10981 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10982 * selftest.h (ASSERT_GT): New macro.
10983 (ASSERT_GT_AT): New macro.
10984 (ASSERT_LT): New macro.
10985 (ASSERT_LT_AT): New macro.
10986
10987 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
10988
10989 PR rtl-optimization/84780
10990 * combine.c (distribute_links): Don't make a link based on pc_rtx.
10991
10992 2018-03-14 Martin Liska <mliska@suse.cz>
10993
10994 * tree.c (record_node_allocation_statistics): Use
10995 get_stats_node_kind.
10996 (get_stats_node_kind): New function extracted from
10997 record_node_allocation_statistics.
10998 (free_node): Use get_stats_node_kind.
10999
11000 2018-03-14 Richard Biener <rguenther@suse.de>
11001
11002 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11003 that the value-set of ANTIC_IN doesn't grow.
11004
11005 Revert
11006 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11007 member.
11008 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11009 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11010
11011 2018-03-14 Julia Koval <julia.koval@intel.com>
11012
11013 * config.gcc (icelake-client, icelake-server): New.
11014 (icelake): Remove.
11015 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11016 (initial_ix86_arch_features): Ditto.
11017 (PTA_SKYLAKE): Add SGX.
11018 (PTA_ICELAKE): Remove.
11019 (PTA_ICELAKE_CLIENT): New.
11020 (PTA_ICELAKE_SERVER): New.
11021 (ix86_option_override_internal): Split up icelake on icelake client and
11022 icelake server.
11023 (get_builtin_code_for_version): Ditto.
11024 (fold_builtin_cpu): Ditto.
11025 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11026 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11027 * config/i386/i386.h (processor_type): Ditto.
11028 * doc/invoke.texi: Ditto.
11029
11030 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11031
11032 PR sanitizer/83392
11033 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11034 INTEGER_CST offset, add it together with bitpos / 8 and
11035 sign extend based on POINTER_SIZE.
11036
11037 PR target/84844
11038 Revert
11039 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11040
11041 PR target/78090
11042 * config/i386/constraints.md (Yc): New register constraint.
11043 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11044 Use Yc constraint for alternative 2 of operand 0. Remove
11045 preferred_for_speed attribute.
11046
11047 2018-03-14 Richard Biener <rguenther@suse.de>
11048
11049 PR tree-optimization/84830
11050 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11051 with the old one to avoid oscillations.
11052
11053 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11054
11055 PR target/83712
11056 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11057 pseudos.
11058 (assign_by_spills): Return a flag of reload assignment failure.
11059 Do not process the reload assignment failures. Do not spill other
11060 reload pseudos if they has the same reg class. Update n if
11061 necessary.
11062 (lra_assign): Add a return arg. Set up from the result of
11063 assign_by_spills call.
11064 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11065 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11066 usage_insns if it is not NULL.
11067 (spill_hard_reg_in_range): New function.
11068 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11069 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11070 function prototypes.
11071 (lra_assign): Change prototype.
11072 * lra.c (lra): Add code to deal with fails by splitting hard reg
11073 live ranges.
11074
11075 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11076
11077 * config/riscv/riscv.opt (mrelax): New option.
11078 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11079 "norelax" when riscv_mrelax is disabled.
11080 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11081
11082 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11083
11084 PR target/84743
11085 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11086 reassociation for int modes.
11087
11088 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11089
11090 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11091 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11092 for big-endian.
11093 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11094 * config/aarch64/aarch64-sve.md
11095 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11096 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11097 (*extend<mode><Vwide>2): Rename to...
11098 (aarch64_sve_extend<mode><Vwide>2): ...this.
11099 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11100 renaming the old pattern to...
11101 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11102 unsigned packs.
11103 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11104 define_expand, renaming the old pattern to...
11105 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11106 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11107 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11108 account when deciding which SVE instruction the optab should use.
11109 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11110
11111 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11112
11113 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11114 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11115 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11116 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11117 (tlsdesc_small_<mode>): Turn a define_expand and use
11118 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11119 (tlsdesc_small_advsimd_<mode>): ...this.
11120 (tlsdesc_small_sve_<mode>): New pattern.
11121
11122 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11123
11124 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11125 (UNSPEC_UMUL_HIGHPART): New constants.
11126 (MUL_HIGHPART): New int iteraor.
11127 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11128 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11129 define_expand.
11130 (*<su>mul<mode>3_highpart): New define_insn.
11131
11132 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11133
11134 PR lto/84805
11135 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11136 incomplete types.
11137
11138 2018-03-13 Martin Liska <mliska@suse.cz>
11139
11140 PR ipa/84658.
11141 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11142 vector.
11143 (sem_item_optimizer::~sem_item_optimizer): Release it.
11144 (sem_item_optimizer::merge_classes): Register variable aliases.
11145 (sem_item_optimizer::fixup_pt_set): New function.
11146 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11147 * ipa-icf.h: Declare new variables and functions.
11148
11149 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11150
11151 PR middle-end/84834
11152 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11153 integer_pow2p@2 and test integer_pow2p in condition.
11154 (A < 0 ? C : 0): Similarly for @1.
11155
11156 PR middle-end/84831
11157 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11158 characters starting at p contain '\0' character, don't look beyond
11159 that.
11160
11161 PR target/84827
11162 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11163 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11164
11165 PR target/84828
11166 * reg-stack.c (change_stack): Change update_end var from int to
11167 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11168 also call set_block_for_insn on the newly added insns and rescan.
11169
11170 PR target/84786
11171 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11172 on the last operand.
11173
11174 PR c++/84704
11175 * tree.c (stabilize_reference_1): Return save_expr (e) for
11176 STATEMENT_LIST even if it doesn't have side-effects.
11177
11178 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11179
11180 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11181
11182 2018-03-12 Renlin Li <renlin.li@arm.com>
11183
11184 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11185 aarch64_output_scalar_simd_mov_immediate.
11186
11187 2018-03-12 Martin Sebor <msebor@redhat.com>
11188
11189 PR tree-optimization/83456
11190 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11191 for perfectly overlapping calls to memcpy.
11192 (gimple_fold_builtin_memory_chk): Same.
11193 (gimple_fold_builtin_strcpy): Handle no-warning.
11194 (gimple_fold_builtin_stxcpy_chk): Same.
11195 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11196
11197 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11198
11199 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11200 parameter. Use it for SFmode.
11201 (rs6000_function_arg_advance_1): Adjust.
11202 (rs6000_function_arg): Adjust.
11203 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11204
11205 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11206
11207 PR rtl-optimization/84169
11208 PR rtl-optimization/84780
11209 * combine.c (can_combine_p): Check for a 2-insn combination whether
11210 the destination register is used between the two insns, too.
11211
11212 2018-03-12 Richard Biener <rguenther@suse.de>
11213
11214 PR tree-optimization/84803
11215 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11216 for refs DR analysis didn't process.
11217
11218 2018-03-12 Richard Biener <rguenther@suse.de>
11219
11220 PR tree-optimization/84777
11221 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11222 force-vectorize loops ignore whether we are optimizing for size.
11223
11224 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
11225
11226 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11227 (TARGET_MD_ASM_ADJUST): Define.
11228
11229 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
11230 Kito Cheng <kito.cheng@gmail.com>
11231 Chung-Ju Wu <jasonwucj@gmail.com>
11232
11233 * config/nds32/nds32.c (nds32_compute_stack_frame,
11234 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11235 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11236 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11237 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11238 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11239 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11240 * config/nds32/nds32.md (prologue, epilogue): Use macro
11241 NDS32_V3PUSH_AVAILABLE_P to do checking.
11242
11243 2018-03-11 Jakub Jelinek <jakub@redhat.com>
11244
11245 PR debug/58150
11246 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11247 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11248 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
11249 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
11250 addition of most attributes on !orig_type_die or the attribute not
11251 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11252
11253 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11254 Chung-Ju Wu <jasonwucj@gmail.com>
11255
11256 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11257 __NDS32_VH__ macro.
11258 * config/nds32/nds32.opt (mvh): New option.
11259
11260 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11261 Chung-Ju Wu <jasonwucj@gmail.com>
11262
11263 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11264 function.
11265 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11266 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11267 definition.
11268
11269 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11270 Chung-Ju Wu <jasonwucj@gmail.com>
11271
11272 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11273 function.
11274 * config/nds32/nds32-multiple.md (strlensi): New pattern.
11275 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11276
11277 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
11278 Kito Cheng <kito.cheng@gmail.com>
11279 Chung-Ju Wu <jasonwucj@gmail.com>
11280
11281 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11282 UNSPEC_FFMISM and UNSPEC_FLMISM.
11283 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11284 for ffb, ffmism and flmism.
11285 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11286 (unspec_ffmism): Ditto.
11287 (unspec_flmism): Ditto.
11288 (nds32_expand_builtin_impl): Check if string extension is available.
11289 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11290 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11291
11292 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
11293
11294 Reverting patch:
11295 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11296
11297 PR target/83712
11298 * lra-assigns.c (assign_by_spills): Return a flag of reload
11299 assignment failure. Do not process the reload assignment
11300 failures. Do not spill other reload pseudos if they has the same
11301 reg class.
11302 (lra_assign): Add a return arg. Set up from the result of
11303 assign_by_spills call.
11304 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11305 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11306 usage_insns if it is not NULL.
11307 (spill_hard_reg_in_range): New function.
11308 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11309 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11310 function prototypes.
11311 (lra_assign): Change prototype.
11312 * lra.c (lra): Add code to deal with fails by splitting hard reg
11313 live ranges.
11314
11315 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
11316
11317 PR target/84807
11318 * config/i386/i386.opt: Replace Enforcment with Enforcement.
11319
11320 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
11321
11322 PR debug/84620
11323 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11324 (dw_val_node): Add val_symbolic_view.
11325 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11326 (symview_upper_bound): New.
11327 (new_line_info_table): Initialize symviews_since_reset.
11328 (dwarf2out_source_line): Count symviews_since_reset and set
11329 symview_upper_bound.
11330 (dw_val_equal_p): Handle symview.
11331 (add_AT_symview): New.
11332 (print_dw_val): Handle symview.
11333 (attr_checksum, attr_checksum_ordered): Likewise.
11334 (same_dw_val_p, size_of_die): Likewise.
11335 (value_format, output_die): Likewise.
11336 (add_high_low_attributes): Use add_AT_symview for entry_view.
11337 (dwarf2out_finish): Reset symview_upper_bound, clear
11338 zero_view_p.
11339
11340 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
11341
11342 PR target/83969
11343 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11344 Add strict argument and use it.
11345 (rs6000_split_multireg_move): Update for new strict argument.
11346 (mem_operand_gpr): Disallow all non-offsettable addresses.
11347 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11348
11349 2018-03-09 Jakub Jelinek <jakub@redhat.com>
11350
11351 PR target/84772
11352 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11353 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11354 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11355
11356 PR c++/84767
11357 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11358 decl, use remap_type if we want to use the type.
11359
11360 2018-03-09 Martin Sebor <msebor@redhat.com>
11361
11362 PR tree-optimization/84526
11363 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11364 Remove dead code.
11365 (builtin_access::generic_overlap): Be prepared to handle non-array
11366 base objects.
11367
11368 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
11369
11370 PR rtl-optimization/84682
11371 * lra-constraints.c (process_address_1): Check is_address flag
11372 for address constraints.
11373 (process_alt_operands): Likewise.
11374 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11375 preprocess_constraints.
11376 * recog.h (preprocess_constraints): Add oploc parameter.
11377 Adjust callers.
11378 * recog.c (preprocess_constraints): Test address_operand for
11379 CT_ADDRESS constraints.
11380
11381 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11382
11383 PR target/83712
11384 * lra-assigns.c (assign_by_spills): Return a flag of reload
11385 assignment failure. Do not process the reload assignment
11386 failures. Do not spill other reload pseudos if they has the same
11387 reg class.
11388 (lra_assign): Add a return arg. Set up from the result of
11389 assign_by_spills call.
11390 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11391 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11392 usage_insns if it is not NULL.
11393 (spill_hard_reg_in_range): New function.
11394 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11395 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11396 function prototypes.
11397 (lra_assign): Change prototype.
11398 * lra.c (lra): Add code to deal with fails by splitting hard reg
11399 live ranges.
11400
11401 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11402
11403 PR target/83193
11404 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11405 Accept complain bool parameter. Only emit errors if it is true.
11406 (arm_parse_cpu_option_name): Likewise.
11407 (arm_target_thumb_only): Adjust callers of the above.
11408 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11409 prototype to take a default true bool parameter.
11410 (arm_parse_arch_option_name): Likewise.
11411
11412 2018-03-09 David Malcolm <dmalcolm@redhat.com>
11413 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11414
11415 PR jit/64089
11416 PR jit/84288
11417 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11418 * configure: Regenerate.
11419 * configure.ac ("linker --version-script option"): New.
11420 ("linker soname option"): New.
11421
11422 2018-03-09 Richard Biener <rguenther@suse.de>
11423
11424 PR tree-optimization/84775
11425 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11426 immediate uses of predicate stmts and mark them modified.
11427
11428 Revert
11429 PR tree-optimization/84178
11430 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11431 to caller.
11432 (version_loop_for_if_conversion): Delay update_ssa call.
11433 (tree_if_conversion): Delay update_ssa until after predicate
11434 insertion.
11435
11436 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
11437
11438 PR target/84763
11439 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11440 when the function accesses prior frames.
11441
11442 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11443
11444 PR debug/84456
11445 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11446 gen_llsym, otherwise call maybe_gen_llsym.
11447
11448 PR inline-asm/84742
11449 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11450 has ',' character inside of it.
11451
11452 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11453
11454 PR target/84748
11455 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
11456 as clobbering CC_REGNUM.
11457
11458 2018-03-08 Richard Biener <rguenther@suse.de>
11459
11460 PR middle-end/84552
11461 * tree-scalar-evolution.c: Include tree-into-ssa.h.
11462 (follow_copies_to_constant): Do not follow SSA names registered
11463 for update.
11464
11465 2018-03-08 Richard Biener <rguenther@suse.de>
11466
11467 PR tree-optimization/84178
11468 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11469 to caller.
11470 (version_loop_for_if_conversion): Delay update_ssa call.
11471 (tree_if_conversion): Delay update_ssa until after predicate
11472 insertion.
11473
11474 2018-03-08 David Malcolm <dmalcolm@redhat.com>
11475
11476 PR tree-optimization/84178
11477 * tree-if-conv.c (release_bb_predicate): Remove the
11478 the assertion that the stmts have NULL use_ops.
11479 Discard the statements, asserting that they haven't
11480 yet been added to a BB.
11481
11482 2018-03-08 Richard Biener <rguenther@suse.de>
11483
11484 PR tree-optimization/84746
11485 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
11486 (phi_translate): Pass in destination ANTIC_OUT set.
11487 (phi_translate_1): Likewise. For a simplified result lookup
11488 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
11489 (phi_translate_set): Adjust.
11490 (do_pre_regular_insertion): Likewise.
11491 (do_pre_partial_partial_insertion): Likewise.
11492
11493 2018-03-08 Martin Liska <mliska@suse.cz>
11494
11495 PR gcov-profile/84735
11496 * doc/gcov.texi: Document usage of profile files.
11497 * gcov-io.h: Document changes in the format.
11498
11499 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
11500
11501 PR debug/84404
11502 PR debug/84408
11503 * dwarf2out.c (struct dw_line_info_table): Update comments for
11504 view == -1.
11505 (FORCE_RESET_NEXT_VIEW): New.
11506 (FORCE_RESETTING_VIEW_P): New.
11507 (RESETTING_VIEW_P): Check for -1 too.
11508 (ZERO_VIEW_P): Likewise.
11509 (new_line_info_table): Force-reset next view.
11510 (dwarf2out_begin_function): Likewise.
11511 (dwarf2out_source_line): Simplify zero_view_p initialization.
11512 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11513 view directly. Omit view when omitting .loc at line 0.
11514
11515 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11516
11517 PR tree-optimization/84740
11518 * tree-switch-conversion.c (process_switch): Call build_constructors
11519 only if info.phi_count is non-zero.
11520
11521 PR tree-optimization/84739
11522 * tree-tailcall.c (find_tail_calls): Check call arguments against
11523 DECL_ARGUMENTS (current_function_decl) rather than
11524 DECL_ARGUMENTS (func) when checking for tail recursion.
11525
11526 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11527
11528 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11529 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11530 Volker Reichelt's entry and add entries for people that perform
11531 GCC fuzzy testing and report numerous bugs.
11532
11533 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
11534
11535 PR target/82411
11536 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11537 readonly data in sdata, if that is disabled.
11538 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11539 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11540 -mreadonly-in-sdata option.
11541
11542 2018-03-07 Martin Sebor <msebor@redhat.com>
11543
11544 PR tree-optimization/84468
11545 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11546 basic block when looking for nul assignment.
11547
11548 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
11549
11550 PR target/84277
11551 * except.h (output_function_exception_table): Adjust prototype.
11552 * except.c (output_function_exception_table): Remove FNNAME parameter
11553 and add SECTION parameter. Ouput one part of the table at a time.
11554 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11555 the first part of the exception table and emit unwind directives.
11556 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11557 (i386_pe_seh_cold_init): Likewise.
11558 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11559 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11560 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11561 (ix86_output_call_insn): Emit a nop in one more case for SEH.
11562 * config/i386/winnt.c: Include except.h.
11563 (struct seh_frame_state): Add reg_offset, after_prologue and
11564 in_cold_section fields.
11565 (i386_pe_seh_end_prologue): Set seh->after_prologue.
11566 (i386_pe_seh_cold_init): New function.
11567 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11568 to seh->in_cold_section.
11569 (seh_emit_push): Record the offset of the push.
11570 (seh_emit_save): Record the offet of the save.
11571 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11572 Test seh->after_prologue to disregard the epilogue.
11573 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11574 (i386_pe_end_cold_function): New function.
11575
11576 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11577
11578 PR fortran/84565
11579 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11580 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11581
11582 PR c++/84704
11583 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11584 on tmp_var.
11585 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11586 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11587
11588 PR middle-end/84723
11589 * multiple_target.c: Include tree-inline.h and intl.h.
11590 (expand_target_clones): Diagnose and fail if node->definition and
11591 !tree_versionable_function_p (node->decl).
11592
11593 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
11594
11595 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11596 sprint_ul.
11597 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11598 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11599 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11600
11601 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11602
11603 PR target/84710
11604 * combine.c (try_combine): Use reg_or_subregno instead of handling
11605 just paradoxical SUBREGs and REGs.
11606
11607 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
11608
11609 * config/arc/arc.c (arc_finalize_pic): Remove function.
11610 (arc_must_save_register): We use single base PIC register, remove
11611 checks to save/restore the PIC register.
11612 (arc_expand_prologue): Likewise.
11613 * config/arc/arc-protos.h (arc_set_default_type_attributes):
11614 Remove.
11615 (arc_verify_short): Likewise.
11616 (arc_attr_type): Likewise.
11617 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11618 (walk_stores): Likewise.
11619 (arc_address_cost): Make it static.
11620 (arc_verify_short): Likewise.
11621 (branch_dest): Likewise.
11622 (arc_attr_type): Likewise.
11623 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11624 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11625 (arc_final_prescan_insn): Remove inserting the nops due to
11626 hardware hazards. It is done in reorg step.
11627 (insn_length_variant_t): Remove.
11628 (insn_length_parameters_t): Likewise.
11629 (arc_insn_length_parameters): Likewise.
11630 (arc_get_insn_variants): Likewise.
11631 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11632
11633 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11634
11635 PR inline-asm/84683
11636 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11637 assertion failure.
11638
11639 PR tree-optimization/84687
11640 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11641 on new_node->decl.
11642 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11643
11644 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11645
11646 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11647 Rename to ppc_speculation_barrier.
11648 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11649 __builtin_ppc_speculation_barrier.
11650
11651 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11652
11653 PR target/84700
11654 * combine.c (combine_simplify_rtx): Don't try to simplify if
11655 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11656 are equal to x.
11657
11658 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
11659
11660 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11661 to 32 bytes when compiling for POWER9.
11662
11663 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11664
11665 PR target/84564
11666 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11667 regparm >= 3 with no arg reg available also for calls with
11668 flag_force_indirect_call. Pass decl to ix86_function_regparm.
11669
11670 PR target/84524
11671 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11672 orig,vex.
11673 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
11674
11675 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
11676
11677 PR target/84264
11678 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11679
11680 2018-03-05 Richard Biener <rguenther@suse.de>
11681
11682 PR tree-optimization/84486
11683 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11684 When inserting a __builtin_assume_aligned call set the LHS
11685 SSA name alignment info accordingly.
11686
11687 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
11688
11689 PR tree-optimization/84114
11690 * config/aarch64/aarch64.c (aarch64_reassociation_width)
11691 Avoid reassociation of FLOAT_MODE addition.
11692
11693 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
11694
11695 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11696 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11697 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11698 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11699 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11700 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11701 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11702 and -mwbnoinvd.
11703 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11704 __builtin_ia32_wbinvd): New builtins.
11705 (SPECIAL_ARGS2): New.
11706 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11707 (SPECIAL_ARGS2): New.
11708 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11709 (ix86_valid_target_attribute_inner_p): Ditto.
11710 (ix86_init_mmx_sse_builtins): Add special_args2.
11711 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11712 TARGET_WBNOINVD_P): New.
11713 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11714 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11715 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11716 * config/i386/immintrin.h (_wbinvd): New intrinsic.
11717 * config/i386/pconfigintrin.h: New file.
11718 * config/i386/wbnoinvdintrin.h: Ditto.
11719 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11720 wbnoinvdintrin.h.
11721 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11722
11723 2018-03-05 Richard Biener <rguenther@suse.de>
11724
11725 PR tree-optimization/84670
11726 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11727 member.
11728 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11729 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11730 (compute_antic_aux): Only assert the number of values in ANTIC_IN
11731 doesn't grow if all successors (recursively) were visited at least
11732 once.
11733
11734 2018-03-05 Richard Biener <rguenther@suse.de>
11735
11736 PR tree-optimization/84650
11737 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11738 if executed in the loop pipeline.
11739
11740 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
11741
11742 * doc/configfiles.texi (Configuration Files): Move info about
11743 conditionalizing $target-protos.h to...
11744 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
11745 differs from $target-protos.h.
11746
11747 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
11748 Chung-Ju Wu <jasonwucj@gmail.com>
11749
11750 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11751 * config/nds32/nds32-multiple.md (setmemsi): Define.
11752 * config/nds32/nds32-memory-manipulation.c
11753 (nds32_gen_dup_4_byte_to_word_value): New.
11754 (emit_setmem_word_loop): New.
11755 (emit_setmem_byte_loop): New.
11756 (nds32_expand_setmem_loop): New.
11757 (nds32_expand_setmem_loop_v3m): New.
11758 (nds32_expand_setmem_unroll): New.
11759 (nds32_expand_setmem): New.
11760
11761 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11762 Chung-Ju Wu <jasonwucj@gmail.com>
11763
11764 * config/nds32/nds32-memory-manipulation.c
11765 (nds32_emit_load_store): New.
11766 (nds32_emit_post_inc_load_store): New.
11767 (nds32_emit_mem_move): New.
11768 (nds32_emit_mem_move_block): New.
11769 (nds32_expand_movmemsi_loop_unknown_size): New.
11770 (nds32_expand_movmemsi_loop_known_size): New.
11771 (nds32_expand_movmemsi_loop): New.
11772 (nds32_expand_movmemsi_unroll): New.
11773 (nds32_expand_movmemqi): Rename ...
11774 (nds32_expand_movmemsi): ... to this.
11775 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11776 (movmemsi): ... to this.
11777 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11778 (nds32_expand_movmemsi): ... to this.
11779
11780 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11781 Monk Chiang <sh.chiang04@gmail.com>
11782 Chung-Ju Wu <jasonwucj@gmail.com>
11783
11784 * config/nds32/nds32-protos.h
11785 (nds32_expand_load_multiple): New arguments.
11786 (nds32_expand_store_multiple): Ditto.
11787 (nds32_valid_multiple_load_store): Rename ...
11788 (nds32_valid_multiple_load_store_p): ... to this.
11789 * config/nds32/nds32-memory-manipulation.c
11790 (nds32_expand_load_multiple): Refine implementation.
11791 (nds32_expand_store_multiple): Ditto.
11792 * config/nds32/nds32-multiple.md
11793 (load_multiple): Update nds32_expand_load_multiple interface.
11794 (store_multiple): Update nds32_expand_store_multiple interface.
11795 * config/nds32/nds32-predicates.c
11796 (nds32_valid_multiple_load_store): Rename ...
11797 (nds32_valid_multiple_load_store_p): ... to this and refine
11798 implementation.
11799 * config/nds32/predicates.md
11800 (nds32_load_multiple_and_update_address_operation): New predicate.
11801 (nds32_store_multiple_and_update_address_operation): New predicate.
11802
11803 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11804 Chung-Ju Wu <jasonwucj@gmail.com>
11805
11806 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11807 (combo): New attribute.
11808 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11809
11810 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
11811
11812 * config/nds32/nds32.opt: Change -mcmodel= default value.
11813
11814 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
11815 Monk Chiang <sh.chiang04@gmail.com>
11816 Chung-Ju Wu <jasonwucj@gmail.com>
11817
11818 * config/nds32/constants.md (unspec_element): New enum.
11819 * config/nds32/constraints.md (Umw): New constraint.
11820 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11821 * config/nds32/nds32-intrinsic.md: Likewise.
11822 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11823 (nds32_valid_smw_lwm_base_p): New.
11824 (nds32_output_smw_single_word): New.
11825 (nds32_output_lmw_single_word): New.
11826 (nds32_expand_unaligned_load): New.
11827 (nds32_expand_unaligned_store): New.
11828 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11829 (nds32_output_smw_single_word): Declare.
11830 (nds32_output_lmw_single_word): Declare.
11831 (nds32_expand_unaligned_load): Declare.
11832 (nds32_expand_unaligned_store): Declare.
11833 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11834 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11835 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11836 NDS32_BUILTIN_UASTORE_DW.
11837 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11838 predicate.
11839
11840 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
11841 Kito Cheng <kito.cheng@gmail.com>
11842 Chung-Ju Wu <jasonwucj@gmail.com>
11843
11844 * config/nds32/nds32-intrinsic.c
11845 (nds32_expand_builtin_null_ftype_reg): Delete.
11846 (nds32_expand_builtin_reg_ftype_imm): Ditto.
11847 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11848 (nds32_read_argument): New.
11849 (nds32_legitimize_target): Ditto.
11850 (nds32_legitimize_argument): Ditto.
11851 (nds32_check_constant_argument): Ditto.
11852 (nds32_expand_unop_builtin): Ditto.
11853 (nds32_expand_unopimm_builtin): Ditto.
11854 (nds32_expand_binop_builtin): Ditto.
11855 (nds32_builtin_decl_impl): Ditto.
11856 (builtin_description): Ditto.
11857 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11858 (nds32_init_builtins_impl): Ditto.
11859 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11860 (nds32_builtin_decl): New.
11861 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11862 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11863
11864 2018-03-02 Jeff Law <law@redhat.com>
11865
11866 * reorg.c (stop_search_p): Handle DEBUG_INSN.
11867 (redundant_insn, fill_simple_delay_slots): Likewise.
11868 (fill_slots_from_thread): Likewise.
11869 * resource.c (mark_referenced_resources): Likewise.
11870 (mark_set_resources, find_dead_or_set_registers): Likewise.
11871
11872 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11873
11874 * substring-locations.h (format_warning_va): Formatting fix for
11875 ATTRIBUTE_GCC_DIAG.
11876 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11877 argument.
11878 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11879 * substring-locations.c: Include intl.h.
11880 (format_warning_va): Turned into small wrapper around
11881 format_warning_n_va, renamed to ...
11882 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11883 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11884 use ngettext.
11885 (format_warning_at_substring_n): New function.
11886 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11887 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
11888 format_warning_at_substring with just a shorter name instead of
11889 const function pointer.
11890 (fmtwarn_n): New function.
11891 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11892 appropriate, get rid of all the fmtstr temporaries, move conditionals
11893 with G_() wrapped string literals directly into fmtwarn arguments,
11894 cast dir.len to (int), formatting fixes.
11895
11896 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
11897
11898 * doc/invoke.texi: Remove "Cilk Plus" references.
11899
11900 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11901 Richard Biener <rguenther@suse.de>
11902
11903 PR ipa/84628
11904 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11905 for error or warning attributes if CALL_FROM_THUNK_P is set.
11906 Formatting fixes.
11907
11908 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11909
11910 PR target/56540
11911 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11912 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11913
11914 PR target/56540
11915 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11916 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11917
11918 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11919 instead of -1U in last predictors element's probability member.
11920
11921 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11922
11923 PR ipa/83983
11924 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11925 arguments if they are comparable.
11926
11927 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11928
11929 PR tree-optimization/84634
11930 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11931 masks and masked_loop_p with a single loop_masks, making sure it's
11932 null for bb vectorization.
11933
11934 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11935
11936 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11937 (vect_analyze_data_ref_access): Use loop->safe_len rather than
11938 loop->force_vectorize to check whether there is no alias.
11939
11940 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11941
11942 PR target/84614
11943 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11944 prototypes.
11945 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11946 comments.
11947 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11948 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11949 instead of a loop around prev_real_insn.
11950 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11951 prev_real_insn.
11952
11953 PR inline-asm/84625
11954 * config/i386/i386.c (ix86_print_operand): Use conditional
11955 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11956 zero vector.
11957
11958 2018-03-02 Richard Biener <rguenther@suse.de>
11959
11960 PR tree-optimization/84427
11961 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11962 (bitmap_set_subtract_values): Rewrite to handle multiple
11963 exprs per value.
11964 (clean): Likewise.
11965 (prune_clobbered_mems): Likewise.
11966 (phi_translate): Take edge instead of pred/phiblock.
11967 (phi_translate_1): Likewise.
11968 (phi_translate_set): Likewise. Insert all translated
11969 exprs for a value into the set, keeping possibly multiple
11970 expressions per value.
11971 (compute_antic_aux): Adjust for phi_translate changes.
11972 When intersecting union the expressions and prune those
11973 not in the final value set, keeping possibly multiple
11974 expressions per value. Do not use value-insertion
11975 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11976 all expressions. Add verification that the value-sets
11977 only shrink during iteration.
11978 (compute_partial_antic_aux): Adjust for the phi_translate changes.
11979 (do_pre_regular_insertion): Likewise.
11980 (do_pre_partial_partial_insertion): Likewise.
11981
11982 2018-03-02 Richard Biener <rguenther@suse.de>
11983
11984 PR target/82005
11985 * config/darwin.c (saved_debug_info_level): New static global.
11986 (darwin_asm_lto_start): Disable debug info generation for LTO out.
11987 (darwin_asm_lto_end): Restore debug info generation settings.
11988
11989 2018-03-01 Martin Liska <mliska@suse.cz>
11990
11991 PR sanitizer/82484
11992 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11993 volatile arguments.
11994
11995 2018-03-01 Richard Biener <rguenther@suse.de>
11996
11997 PR debug/84645
11998 * dwarf2out.c (gen_variable_die): Properly handle late VLA
11999 type annotation with LTO when debug was disabled at compile-time.
12000
12001 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12002
12003 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12004 XINT with INTVAL.
12005 (mips_final_postscan_insn): Likewise.
12006
12007 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12008
12009 PR rtl-optimization/84528
12010 * alias.c (init_alias_target): Add commentary.
12011 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12012 a unique base value if the frame pointer is not eliminated
12013 to the stack pointer.
12014
12015 2018-03-01 Tom de Vries <tom@codesourcery.com>
12016
12017 PR rtl-optimization/83327
12018 * lra-int.h (hard_regs_spilled_into): Declare.
12019 * lra.c (hard_regs_spilled_into): Define.
12020 (init_reg_info): Init hard_regs_spilled_into.
12021 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12022 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12023 (process_bb_lives): Handle hard_regs_spilled_into.
12024 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12025 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12026
12027 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12028
12029 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12030 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12031 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12032 * config/rs6000/aix72.h: New file.
12033
12034 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12035
12036 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12037 instead of warning_at with conditional singular and plural messages
12038 where possible.
12039
12040 PR target/52991
12041 * stor-layout.c (update_alignment_for_field): For
12042 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12043 && !DECL_PACKED (field), do the alignment update, just use
12044 only desired_align instead of MAX (type_align, desired_align)
12045 as the alignment.
12046 (place_field): Don't do known_align < desired_align handling
12047 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12048 is non-NULL, instead do it after rli->prev_field handling and
12049 only if not within a bitfield word. For DECL_PACKED (field)
12050 use type_align of BITS_PER_UNIT.
12051
12052 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12053
12054 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12055 superfluous parentheses and trailing spaces.
12056
12057 2018-02-28 Richard Biener <rguenther@suse.de>
12058
12059 PR tree-optimization/84584
12060 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12061 SCoPs with fake exit edge.
12062
12063 2018-02-28 Martin Liska <mliska@suse.cz>
12064
12065 PR testsuite/84597
12066 * timevar.c (timer::print): Fix format to properly print 100%
12067 values.
12068
12069 2018-02-28 Richard Biener <rguenther@suse.de>
12070
12071 PR middle-end/84607
12072 * genmatch.c (capture_info::walk_match): Do not mark
12073 captured expressions without operands as expr_p given
12074 they act more like predicates and should be subject to
12075 "lost tail" side-effect preserving.
12076
12077 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12078
12079 PR rtl-optimization/81611
12080 * auto-inc-dec.c (attempt_change): Move dead note from
12081 mem_insn if it's the next use of regno
12082 (find_address): Take address use of reg holding
12083 non-incremented value. Add parm to limit search to the named
12084 reg only.
12085 (merge_in_block): Attempt to use a mem insn that is the next
12086 use of the original regno.
12087
12088 2018-02-27 Martin Sebor <msebor@redhat.com>
12089
12090 PR c++/83871
12091 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12092 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12093
12094 2018-02-27 Martin Sebor <msebor@redhat.com>
12095
12096 PR translation/84207
12097 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12098 n argument to unsigned HOST_WIDE_INT.
12099 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12100 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12101 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12102 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12103
12104 2018-02-27 Richard Biener <rguenther@suse.de>
12105
12106 PR tree-optimization/84512
12107 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12108 Do not use the estimate returned from record_stmt_cost for
12109 the scalar iteration cost but sum properly using add_stmt_cost.
12110
12111 2018-02-27 Richard Biener <rguenther@suse.de>
12112
12113 PR tree-optimization/84466
12114 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12115 Adjust last change to less strictly validate use operands.
12116
12117 2018-02-27 Martin Liska <mliska@suse.cz>
12118
12119 PR gcov-profile/84548
12120 * gcov.c (process_file): Allow partial overlap and consider it
12121 also as group functions.
12122 (output_lines): Properly calculate range of lines for a group.
12123
12124 2018-02-27 Martin Liska <mliska@suse.cz>
12125
12126 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12127 'ggc' suffixes. Change first column width.
12128 (timer::print): Fix formatting of the column.
12129
12130 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12131
12132 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12133 preserve inline entry blocks for the sake of debug inline
12134 entry point markers alone.
12135 (remove_unused_locals): Suggest in comments a better place to
12136 force the preservation of inline entry blocks that are
12137 otherwise unused, but do not preserve them.
12138
12139 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12140
12141 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12142
12143 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12144
12145 PR target/84039
12146 * config/i386/constraints.md (Bs): Replace
12147 ix86_indirect_branch_register with
12148 TARGET_INDIRECT_BRANCH_REGISTER.
12149 (Bw): Likewise.
12150 * config/i386/i386.md (indirect_jump): Likewise.
12151 (tablejump): Likewise.
12152 (*sibcall_memory): Likewise.
12153 (*sibcall_value_memory): Likewise.
12154 Peepholes of indirect call and jump via memory: Likewise.
12155 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12156 (*sibcall_value_GOT_32): Likewise.
12157 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12158 (GOT_memory_operand): Likewise.
12159 (call_insn_operand): Likewise.
12160 (sibcall_insn_operand): Likewise.
12161 (GOT32_symbol_operand): Likewise.
12162 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12163
12164 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12165
12166 PR rtl-optimization/83496
12167 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12168 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12169 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12170 redundant insn, if any.
12171 (relax_delay_slots): Likewise.
12172 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12173
12174 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12175
12176 PR tree-optimization/83965
12177 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12178 that grouped statements are part of a reduction chain. Return
12179 true if the statement is not marked as a reduction itself but
12180 is part of a group.
12181 (vect_recog_dot_prod_pattern): Don't check whether the statement
12182 is part of a group here.
12183 (vect_recog_sad_pattern): Likewise.
12184 (vect_recog_widen_sum_pattern): Likewise.
12185
12186 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12187
12188 PR debug/84545
12189 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12190
12191 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12192
12193 PR target/84530
12194 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12195 the bool argument.
12196 (ix86_output_indirect_function_return): New prototype.
12197 (ix86_split_simple_return_pop_internal): Likewise.
12198 * config/i386/i386.c (indirect_return_via_cx): New.
12199 (indirect_return_via_cx_bnd): Likewise.
12200 (indirect_thunk_name): Handle return va CX_REG.
12201 (output_indirect_thunk_function): Create alias for
12202 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12203 (ix86_output_indirect_jmp): Remove the bool argument.
12204 (ix86_output_indirect_function_return): New function.
12205 (ix86_split_simple_return_pop_internal): Likewise.
12206 * config/i386/i386.md (*indirect_jump): Don't pass false
12207 to ix86_output_indirect_jmp.
12208 (*tablejump_1): Likewise.
12209 (simple_return_pop_internal): Change it to define_insn_and_split.
12210 Call ix86_split_simple_return_pop_internal to split it for
12211 -mfunction-return=.
12212 (simple_return_indirect_internal): Call
12213 ix86_output_indirect_function_return instead of
12214 ix86_output_indirect_jmp.
12215
12216 2018-02-26 Jakub Jelinek <jakub@redhat.com>
12217
12218 PR bootstrap/84405
12219 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12220 memset and value initialization afterwards.
12221
12222 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
12223
12224 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12225
12226 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12227
12228 PR target/84521
12229 * common/config/aarch64/aarch64-common.c
12230 (aarch_option_optimization_table[]): Switch
12231 off fomit-frame-pointer
12232
12233 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12234 Chung-Ju Wu <jasonwucj@gmail.com>
12235
12236 * config/nds32/nds32-multiple.md (load_multiple): Disallow
12237 volatile memory.
12238 (store_multiple): Ditto.
12239
12240 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12241
12242 * config.gcc: Add --with-cpu support for nds32 target.
12243 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12244 * config/nds32/nds32.opt: Add -mcpu= option.
12245
12246 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
12247
12248 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12249 isel=yes): Warn for these deprecated options.
12250
12251 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
12252
12253 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12254 ISA_2_5_MASKS_EMBEDDED.
12255
12256 2018-02-23 Jakub Jelinek <jakub@redhat.com>
12257
12258 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12259 p->max as pointers rather than using iterative_hash_expr.
12260
12261 2018-02-23 Carl Love <cel@us.ibm.com>
12262
12263 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12264 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12265 BU_P8V_OVERLOAD_2.
12266 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12267 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12268 P8V_BUILTIN_VEC_VUNSIGNED2.
12269
12270 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
12271
12272 PR target/81572
12273 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12274 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12275 LRA_UNKNOWN_ALT.
12276 * lra-constraints.c (curr_insn_transform): Set up
12277 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
12278 LRA_UNKNOWN_ALT.
12279 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12280 * lra-eliminations.c (spill_pseudos): Ditto.
12281 (process_insn_for_elimination): Ditto.
12282 * lra-lives.c (reg_early_clobber_p): Use the new macros.
12283 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12284 LRA_NON_CLOBBERED_ALT.
12285
12286 2018-02-22 Martin Sebor <msebor@redhat.com>
12287
12288 PR tree-optimization/84480
12289 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12290 to maybe_diag_stxncpy_trunc. Call it.
12291 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12292 from gimple_fold_builtin_strcpy. Print inlining stack.
12293 (handle_builtin_stxncpy): Print inlining stack.
12294 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12295
12296 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
12297
12298 PR target/84176
12299 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12300 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12301 and -fcheck-pointer-bounds are used together.
12302 (indirect_thunk_prefix): New enum.
12303 (indirect_thunk_need_prefix): New function.
12304 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
12305 "_nt" instead of "_bnd" for NOTRACK prefix.
12306 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12307 (output_indirect_thunk_function): Likewise.
12308 (): Likewise.
12309 (ix86_code_end): Update output_indirect_thunk_function calls.
12310 (ix86_output_indirect_branch_via_reg): Replace
12311 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12312 (ix86_output_indirect_branch_via_push): Likewise.
12313 (ix86_output_function_return): Likewise.
12314 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12315 incompatible with -fcf-protection=branch and
12316 -fcheck-pointer-bounds.
12317
12318 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12319
12320 PR target/83335
12321 * config/aarch64/aarch64.c (aarch64_print_address_internal):
12322 Change gcc_assert call to output_operand_lossage.
12323
12324 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12325
12326 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12327
12328 2018-02-22 DJ Delorie <dj@redhat.com>
12329 Sebastian Perta <sebastian.perta@renesas.com>
12330 Oleg Endo <olegendo@gcc.gnu.org>
12331
12332 * config/rx/rx.c (rx_rtx_costs): New function.
12333 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12334
12335 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
12336
12337 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12338
12339 2018-02-22 Martin Liska <mliska@suse.cz>
12340
12341 PR driver/83193
12342 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12343 Add "native" as a possible value.
12344
12345 2018-02-22 Martin Liska <mliska@suse.cz>
12346
12347 PR driver/83193
12348 * config/i386/i386.c (ix86_option_override_internal):
12349 Add "native" as a possible value for -march and -mtune.
12350
12351 2018-02-22 Jakub Jelinek <jakub@redhat.com>
12352
12353 PR target/84502
12354 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12355 to all type variants.
12356
12357 PR tree-optimization/84503
12358 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12359 width as info->bitpos + info->bitsize - start.
12360 (merged_store_group::merge_overlapping): Simplify width computation.
12361 (check_no_overlap): New function.
12362 (imm_store_chain_info::try_coalesce_bswap): Compute expected
12363 start + width and last_order of the group, fail if check_no_overlap
12364 fails.
12365 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12366 to group if check_no_overlap fails.
12367
12368 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12369
12370 * config/rs6000/altivec.md: Delete contraint arguments to
12371 define_expand, define_split, and define_peephole2, and in
12372 define_insn_and_split if always unused.
12373 * config/rs6000/darwin.md: Ditto.
12374 * config/rs6000/dfp.md: Ditto.
12375 * config/rs6000/rs6000.md: Ditto.
12376 * config/rs6000/sync.md: Ditto.
12377 * config/rs6000/vector.md: Ditto.
12378 * config/rs6000/vsx.md: Ditto.
12379
12380 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12381
12382 * config/rs6000/altivec.md: Write output control strings as braced
12383 blocks instead of double-quoted strings.
12384 * config/rs6000/darwin.md: Ditto.
12385 * config/rs6000/rs6000.md: Ditto.
12386 * config/rs6000/vector.md: Ditto.
12387 * config/rs6000/vsx.md: Ditto.
12388
12389 2018-02-21 Jason Merrill <jason@redhat.com>
12390
12391 PR c++/84314 - ICE with templates and fastcall attribute.
12392 * attribs.c (build_type_attribute_qual_variant): Remove assert.
12393
12394 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12395
12396 * ipa-cp.c (determine_versionability): Fix comment typos.
12397
12398 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12399
12400 PR c/84229
12401 * ipa-cp.c (determine_versionability): Do not version functions caling
12402 va_arg_pack.
12403
12404 2018-02-21 Martin Liska <mliska@suse.cz>
12405
12406 PR driver/83193
12407 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12408 Add "native" as a possible value.
12409 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
12410 the macro when native cpu detection is available.
12411
12412 2018-02-21 Martin Liska <mliska@suse.cz>
12413
12414 PR driver/83193
12415 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12416 Add "native" as a possible value.
12417 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12418 when native cpu detection is available.
12419
12420 2018-02-21 Jakub Jelinek <jakub@redhat.com>
12421 Martin Sebor <msebor@redhat.com>
12422
12423 PR tree-optimization/84478
12424 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12425 false.
12426 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12427 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12428 support which is conservatively correct, for 2 only stay conservative
12429 for maxlen. Formatting and comment capitalization fixes. Add STRICT
12430 argument to the 2 argument get_range_strlen, adjust 6 arg
12431 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12432 false.
12433 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12434 (gimple_fold_builtin_strlen): Pass true as last argument to
12435 get_range_strlen.
12436
12437 2018-02-20 Martin Sebor <msebor@redhat.com>
12438
12439 PR middle-end/84095
12440 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12441 (builtin_memref::set_base_and_offset): Same. Handle inner references.
12442 (builtin_memref::builtin_memref): Factor out parts into
12443 set_base_and_offset and call it.
12444
12445 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
12446
12447 PR middle-end/84406
12448 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12449 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12450 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
12451 search at the associated MODE_INT.
12452
12453 2018-02-20 Jeff Law <law@redhat.com>
12454
12455 PR middle-end/82123
12456 PR tree-optimization/81592
12457 PR middle-end/79257
12458 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
12459 for range data rather than using global data.
12460 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
12461 range data rather than using global data.
12462 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
12463 pass it to children as needed.
12464 (struct directive::fmtresult): Similarly.
12465 (struct directive::set_width): Similarly.
12466 (struct directive::set_precision): Similarly.
12467 (format_integer, format_directive, parse_directive): Similarly.
12468 (format_none): Accept unnamed vr_values parameter.
12469 (format_percent, format_floating, format_character): Similarly.
12470 (format_string, format_plain): Similarly.
12471 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
12472 the EVRP range analyzer for range data rather than using global data.
12473 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
12474 gimple-ssa-evrp-analyze.h
12475 (class sprintf_dom_walker): Add after_dom_children member function.
12476 Add evrp_range_analyzer member.
12477 (sprintf_dom_walker::before_dom_children): Call into the EVRP
12478 range analyzer as needed.
12479 (sprintf_dom_walker::after_dom_children): New member function.
12480 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
12481 if not optimizing.
12482 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
12483 (evrp_range_analyzer::pop_to_marker): Likewise.
12484
12485 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
12486
12487 PR tree-optimization/84419
12488 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
12489 with the required type if its current type is compatible but
12490 different.
12491
12492 2018-02-20 Jakub Jelinek <jakub@redhat.com>
12493
12494 PR middle-end/82004
12495 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12496 after vectorization.
12497
12498 2018-02-20 Martin Liska <mliska@suse.cz>
12499
12500 PR driver/83193
12501 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12502 possible values if we don't have a hint.
12503
12504 2018-02-20 Martin Liska <mliska@suse.cz>
12505
12506 PR c/84310
12507 PR target/79747
12508 * final.c (shorten_branches): Build align_tab array with one
12509 more element.
12510 * opts.c (finish_options): Add alignment option limit check.
12511 (MAX_CODE_ALIGN): Likewise.
12512 (MAX_CODE_ALIGN_VALUE): Likewise.
12513 * doc/invoke.texi: Document maximum allowed option value for
12514 all -falign-* options.
12515
12516 2018-02-19 Jakub Jelinek <jakub@redhat.com>
12517
12518 PR target/84146
12519 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12520 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12521 * var-tracking.c (emit_note_insn_var_location): Remove all references
12522 to NOTE_INSN_CALL_ARG_LOCATION.
12523 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12524 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12525 Use copy_rtx_if_shared.
12526 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12527 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12528 (dwarf2out_var_location): Remove handling of
12529 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12530 on call_insn.
12531 * final.c (final_scan_insn): Remove all references to
12532 NOTE_INSN_CALL_ARG_LOCATION.
12533 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
12534 before dumping final insns.
12535 * except.c (emit_note_eh_region_end): Remove all references to
12536 NOTE_INSN_CALL_ARG_LOCATION.
12537 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12538 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12539 * config/arc/arc.c (hwloop_optimize): Likewise.
12540 * config/arm/arm.c (create_fix_barrier): Likewise.
12541 * config/s390/s390.c (s390_chunkify_start): Likewise.
12542 * config/sh/sh.c (find_barrier): Likewise.
12543 * config/i386/i386.c (rest_of_insert_endbranch,
12544 ix86_seh_fixup_eh_fallthru): Likewise.
12545 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12546 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12547 * config/frv/frv.c (frv_function_prologue): Likewise.
12548 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
12549 reg note.
12550 (note_outside_basic_block_p): Remove all references to
12551 NOTE_INSN_CALL_ARG_LOCATION.
12552 * gengtype.c (adjust_field_rtx_def): Likewise.
12553 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12554 Likewise.
12555 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12556 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12557
12558 PR c++/84444
12559 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12560 is ADDR_EXPR.
12561
12562 PR tree-optimization/84452
12563 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12564 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12565 is NULL.
12566
12567 2018-02-19 Martin Liska <mliska@suse.cz>
12568
12569 PR sanitizer/82183
12570 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12571
12572 2018-02-19 Martin Liska <mliska@suse.cz>
12573 Richard Sandiford <richard.sandiford@linaro.org>
12574
12575 PR tree-optimization/82491
12576 * gimple-fold.c (get_base_constructor): Make earlier bail out
12577 to prevent ubsan.
12578
12579 2018-02-19 Carl Love <cel@us.ibm.com>
12580
12581 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12582 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12583 BU_P8V_OVERLOAD_1.
12584 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12585 P8V_BUILTIN_VEC_NEG.
12586
12587 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
12588
12589 * config/rl78/rl78.md (movdf): New define expand.
12590
12591 2018-02-19 Martin Liska <mliska@suse.cz>
12592
12593 PR other/80589
12594 * doc/invoke.texi: Fix typo.
12595 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12596
12597 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
12598
12599 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12600 handle rs6000_single_float and rs6000_double_float specially for
12601 e500 family CPUs.
12602
12603 2018-02-16 Jeff Law <law@redhat.com>
12604
12605 * config/rx/rx.c (add_pop_cfi_notes): New function.;
12606 (pop_regs): Use it.
12607
12608 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12609
12610 PR ipa/84425
12611 * ipa-inline.c (inline_small_functions): Fix a typo.
12612
12613 2018-02-16 Nathan Sidwell <nathan@acm.org>
12614
12615 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12616
12617 2018-02-16 Carl Love <cel@us.ibm.com>
12618
12619 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12620 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12621 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12622 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12623 expansion to P8V_BUILTIN_VEC_FLOAT2.
12624
12625 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
12626
12627 PR rtl-optimization/70023
12628 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12629 src_regno into account.
12630
12631 2018-02-16 Carl Love <cel@us.ibm.com>
12632
12633 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12634 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12635 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12636 * config/rs6000/rs6000.c: Remove case statements for
12637 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12638 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12639 and P9V_BUILTIN_VEC_VINSERT4B.
12640 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12641 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12642 * config/rs6000/vsx.md:
12643 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12644 vec_insert4b.
12645
12646 2018-02-16 Carl Love <cel@us.ibm.com>
12647
12648 * config/rs6000/altivec.h: Add builtin names vec_extract4b
12649 vec_insert4b.
12650 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12651 definitions.
12652 * config/rs6000/rs6000-c.c: Add the definitions for
12653 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12654 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12655 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12656 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
12657 definition for insert4b and define insn *insert3b_internal.
12658 * doc/extend.texi: Add documentation for vec_extract4b.
12659
12660 2018-02-16 Nathan Sidwell <nathan@acm.org>
12661
12662 * doc/extend.texi (Backwards Compatibility): Mention friend
12663 injection. Note for-scope is deprecated.
12664 * doc/invoke.texi (-ffriend-injection): Deprecate.
12665
12666 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
12667
12668 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12669 that moved to I2, also allow destinations that are a paradoxical
12670 subreg (instead of a normal reg).
12671
12672 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
12673
12674 PR target/83831
12675 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12676 to QImode.
12677
12678 2018-02-16 Richard Biener <rguenther@suse.de>
12679
12680 PR tree-optimization/84037
12681 PR tree-optimization/84016
12682 PR target/82862
12683 * config/i386/i386.c (ix86_builtin_vectorization_cost):
12684 Adjust vec_construct for the fact we need additional higher latency
12685 128bit inserts for AVX256 and AVX512 vector builds.
12686 (ix86_add_stmt_cost): Scale vector construction cost for
12687 elementwise loads.
12688
12689 2018-02-16 Richard Biener <rguenther@suse.de>
12690
12691 PR tree-optimization/84417
12692 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12693 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12694 (non_rewritable_lvalue_p): Likewise, use poly-ints.
12695
12696 2018-02-16 Martin Liska <mliska@suse.cz>
12697
12698 PR sanitizer/84307
12699 * internal-fn.def (ASAN_CHECK): Set proper flags.
12700 (ASAN_MARK): Likewise.
12701
12702 2018-02-16 Julia Koval <julia.koval@intel.com>
12703
12704 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12705 from PTA_CANNONLAKE.
12706
12707 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12708
12709 PR target/84272
12710 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12711 Use ++iter rather than iter++ for std::list iterators.
12712 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
12713 defer deleting them until all nodes in the forest are processed. Do
12714 free even leaf nodes. Change to_process into auto_vec.
12715
12716 PR bootstrap/84405
12717 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12718 * vec.h (vec_default_construct): Use memset instead of placement new
12719 if BROKEN_VALUE_INITIALIZATION is defined.
12720 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12721 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12722 is defined.
12723
12724 PR rtl-optimization/83723
12725 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12726 * lra.c (lra_substitute_pseudo): Likewise. If true, use
12727 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
12728 recursive calls.
12729 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12730 callers.
12731 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12732
12733 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
12734
12735 PR rtl-optimization/81443
12736 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12737 from inner REGs to paradoxical SUBREGs.
12738
12739 2018-02-16 Richard Biener <rguenther@suse.de>
12740
12741 PR tree-optimization/84399
12742 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12743 For operands we can analyze at their definition make sure we can
12744 analyze them at each use as well.
12745
12746 2018-02-16 Richard Biener <rguenther@suse.de>
12747
12748 PR tree-optimization/84190
12749 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12750 volatile accesses if the decl isn't volatile.
12751
12752 2018-02-15 Jason Merrill <jason@redhat.com>
12753
12754 PR c++/84314 - ICE with templates and fastcall attribute.
12755 * attribs.c (build_type_attribute_qual_variant): Don't clobber
12756 TYPE_CANONICAL on an existing type.
12757
12758 2018-02-15 Jakub Jelinek <jakub@redhat.com>
12759
12760 PR tree-optimization/84383
12761 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12762 dstoff nor call operand_equal_p if dstbase is NULL.
12763
12764 PR tree-optimization/84334
12765 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12766 also a CONSTANT_CLASS_P, punt.
12767
12768 2018-02-14 Jim Wilson <jimw@sifive.com>
12769
12770 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12771 first SMALL_OPERAND check. New local min_second_step. Move assert
12772 to where locals are set. Add TARGET_RVC support.
12773 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12774
12775 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
12776
12777 * doc/invoke.texi: Correct -Wformat-overflow code sample.
12778
12779 2018-02-14 Martin Sebor <msebor@redhat.com>
12780
12781 PR tree-optimization/83698
12782 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12783 arrays constrain the offset range to their bounds.
12784 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12785 (builtin_access::overlap): Avoid setting the size of overlap if it's
12786 already been set.
12787 (maybe_diag_overlap): Also consider arrays when deciding what values
12788 of offsets to include in diagnostics.
12789
12790 2018-02-14 Martin Sebor <msebor@redhat.com>
12791
12792 PR c/84108
12793 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12794 that correspond to the kind of a declaration.
12795
12796 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
12797
12798 PR target/83984
12799 * config/pa/pa.md: Load address of PIC label using the linkage table
12800 if the label is nonlocal.
12801
12802 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
12803
12804 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12805 warning message if user requests -maltivec=be.
12806 * doc/invoke.texi: Document deprecation of -maltivec=be.
12807
12808 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
12809
12810 PR target/84220
12811 * config/rs6000/rs6000-c.c: Update definitions for
12812 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12813 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12814
12815 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12816
12817 PR target/84239
12818 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12819 add _get_ssp intrinsics. Remove argument from
12820 __builtin_ia32_rdssp[d|q].
12821 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12822 * config/i386/i386-builtin.def: Remove argument from
12823 __builtin_ia32_rdssp[d|q].
12824 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12825 ix86_expand_special_args_builtin for _rdssp[d|q].
12826 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12827 Clear register before usage.
12828 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12829 Add documentation for new _get_ssp and _inc_ssp intrinsics.
12830
12831 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
12832
12833 PR tree-optimization/84357
12834 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12835 operand 1 of an ARRAY_REF too.
12836
12837 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
12838
12839 PR target/83831
12840 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12841 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12842 declarations.
12843 (set_of_reg): New struct.
12844 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12845 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12846 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12847 functions.
12848 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12849 Split into bitclr, bitset, bitinvert patterns if appropriate.
12850 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12851 use rx_fuse_in_memory_bitop.
12852 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12853 to named insn, correct maximum insn length.
12854
12855 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
12856
12857 PR target/79242
12858 * machmode.def: Define a complex mode for PARTIAL_INT.
12859 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12860 MODE_PARTIAL_INT.
12861 * doc/rtl.texi: Document CSPImode.
12862 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12863 handling.
12864 (msp430_hard_regno_nregs_with_padding): Likewise.
12865
12866 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
12867
12868 PR target/84279
12869 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12870
12871 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
12872
12873 PR rtl-optimization/84169
12874 * combine.c (try_combine): New variable split_i2i3. Set it to true if
12875 we generated a parallel as new i3 and we split that to new i2 and i3
12876 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
12877 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
12878 those to i2, not i1. Partially rewrite this scan code.
12879
12880 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12881
12882 PR c/82210
12883 * stor-layout.c (place_field): For variable length fields, adjust
12884 offset_align afterwards not just based on the field's alignment,
12885 but also on the size.
12886
12887 PR middle-end/84309
12888 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12889 of exps and logs in the use_exp2 case.
12890
12891 2018-02-13 Jeff Law <law@redhat.com>
12892
12893 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12894 entry for "vector".
12895
12896 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12897 ARGS as unused.
12898
12899 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
12900
12901 PR debug/84342
12902 PR debug/84319
12903 * common.opt (gas-loc-support, gas-locview-support): New.
12904 (ginline-points, ginternal-reset-location-views): New.
12905 * doc/invoke.texi: Document them. Use @itemx where intended.
12906 (gvariable-location-views): Adjust.
12907 * target.def (reset_location_view): New.
12908 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12909 (TARGET_RESET_LOCATION_VIEW): New.
12910 * doc/tm.texi: Rebuilt.
12911 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12912 (dwarf2out_default_as_locview_support): New.
12913 (output_asm_line_debug_info): Use option variables.
12914 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12915 (output_loc_list): Likewise.
12916 (add_high_low_attributes): Check option variables.
12917 Don't output entry view attribute in strict mode.
12918 (gen_inlined_subroutine_die): Check option variables.
12919 (dwarf2out_inline_entry): Likewise.
12920 (init_sections_and_labels): Likewise.
12921 (dwarf2out_early_finish): Likewise.
12922 (maybe_reset_location_view): New, from...
12923 (dwarf2out_var_location): ... here. Call it.
12924 * debug.h (dwarf2out_default_as_loc_support): Declare.
12925 (dwarf2out_default_as_locview_support): Declare.
12926 * hooks.c (hook_int_rtx_insn_0): New.
12927 * hooks.h (hook_int_rtx_insn_0): Declare.
12928 * toplev.c (process_options): Take -gas-loc-support and
12929 -gas-locview-support from dwarf2out. Enable
12930 -gvariable-location-views by default only with locview
12931 assembler support. Enable -ginternal-reset-location-views by
12932 default only if the target defines the corresponding hook.
12933 Enable -ginline-points by default if location views are
12934 enabled; force it disabled if statement frontiers are
12935 disabled.
12936 * tree-inline.c (expand_call_inline): Check option variables.
12937 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12938
12939 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
12940
12941 PR tree-optimization/84321
12942 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12943 handling. Also check whether the anti-range contains any values
12944 that satisfy the mask; switch to a VR_RANGE if not.
12945
12946 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
12947
12948 PR sanitizer/84340
12949 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12950
12951 2018-02-13 Martin Jambor <mjambor@suse.cz>
12952
12953 PR c++/83990
12954 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12955 of call statements, also set location of a load to a temporary.
12956
12957 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
12958
12959 * config/rl78/rl78.c (add_vector_labels): New function.
12960 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12961 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12962 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12963 which checks that no arguments are passed.
12964 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12965 * doc/extend.texi: Documentation for the new attribute.
12966
12967 2018-02-13 Andreas Schwab <schwab@suse.de>
12968
12969 * config/riscv/linux.h (CPP_SPEC): Define.
12970
12971 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12972
12973 PR target/84335
12974 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12975 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12976 OPTION_MASK_ISA_AES as first argument to def_builtin_const
12977 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12978 instead of OPTION_MASK_ISA_PCLMUL as first argument to
12979 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12980 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12981 temporarily for AES and PCLMUL builtins.
12982
12983 PR tree-optimization/84339
12984 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12985 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12986 Formatting fixes.
12987
12988 PR middle-end/84309
12989 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12990 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12991 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12992 inline function.
12993 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12994 inline function.
12995 * omp-simd-clone.h: New file.
12996 * omp-simd-clone.c: Include omp-simd-clone.h.
12997 (expand_simd_clones): No longer static.
12998 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12999 cgraph.h and omp-simd-clone.h.
13000 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13001 (vect_recog_widen_shift_pattern): Formatting fix.
13002 (vect_pattern_recog_1): Don't check optab for calls.
13003
13004 PR target/84336
13005 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13006 operands[2] into a REG before using gen_lowpart on it.
13007
13008 2018-02-12 Jeff Law <law@redhat.com>
13009
13010 PR target/83760
13011 * config/sh/sh.c (find_barrier): Consider a sibling call
13012 a barrier as well.
13013
13014 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13015 successfully back substituting a reg.
13016
13017 2018-02-12 Richard Biener <rguenther@suse.de>
13018
13019 PR tree-optimization/84037
13020 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13021 parameter, move visited init to caller.
13022 (vect_slp_analyze_operations): Separate cost from validity
13023 check, initialize visited once for all instances.
13024 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13025 for all instances.
13026 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13027 out an assert.
13028 (vect_model_promotion_demotion_cost): Likewise.
13029 (vectorizable_bswap): Guard cost modeling with !slp_node
13030 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13031 SLP stmts.
13032 (vectorizable_call): Likewise.
13033 (vectorizable_conversion): Likewise.
13034 (vectorizable_assignment): Likewise.
13035 (vectorizable_shift): Likewise.
13036 (vectorizable_operation): Likewise.
13037 (vectorizable_store): Likewise.
13038 (vectorizable_load): Likewise.
13039 (vectorizable_condition): Likewise.
13040 (vectorizable_comparison): Likewise.
13041
13042 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13043
13044 PR sanitizer/84307
13045 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13046 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13047 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13048
13049 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13050
13051 PR middle-end/83665
13052 * params.def (inline-min-speedup): Increase from 8 to 15.
13053 (max-inline-insns-auto): Decrease from 40 to 30.
13054 * ipa-split.c (consider_split): Add some buffer for function to
13055 be considered inlining candidate.
13056 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13057 default values.
13058
13059 2018-02-12 Richard Biener <rguenther@suse.de>
13060
13061 PR tree-optimization/84037
13062 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13063 matched stmts if we cannot swap the non-matched ones.
13064
13065 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13066
13067 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13068 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13069 _mm_maskz_scalef_round_ss): New intrinsics.
13070 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13071 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13072 __builtin_ia32_scalefss_round): Remove.
13073 (__builtin_ia32_scalefsd_mask_round,
13074 __builtin_ia32_scalefss_mask_round): New intrinsics.
13075 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13076 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13077 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13078 "<round_constraint>")): Changed to ...
13079 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13080 "<round_scalar_constraint>")): ... this.
13081 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13082 %0, %1, %2<round_op3>}"): Changed to ...
13083 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13084 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13085 %2<round_scalar_mask_op3>}"): ... this.
13086 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13087
13088 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13089
13090 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13091 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13092 (_mm_maskz_sqrt_round_ss): New intrinsics.
13093 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13094 (__builtin_ia32_sqrtsd_mask_round)
13095 (__builtin_ia32_sqrtss_mask_round): New builtins.
13096 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13097 (__builtin_ia32_sqrtss_round): Remove.
13098 (__builtin_ia32_sqrtsd_mask_round)
13099 (__builtin_ia32_sqrtss_mask_round): New builtins.
13100 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13101 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13102 ((match_operand:VF_128 1 "vector_operand"
13103 "xBm,<round_constraint>")): Changed to ...
13104 ((match_operand:VF_128 1 "vector_operand"
13105 "xBm,<round_scalar_constraint>")): ... this.
13106 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13107 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13108 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13109 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13110 %<iptr>1<round_scalar_mask_op3>}): ... this.
13111 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13112 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13113
13114 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13115
13116 PR target/84266
13117 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13118 Cast vec_cmpeq result to correct type.
13119 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13120 Cast vec_cmpgt result to correct type.
13121
13122 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13123
13124 * final.c (final_scan_insn_1): Renamed from...
13125 (final_scan_insn): ... this. New wrapper, to recover
13126 seen from the outermost call in recursive ones.
13127 * config/sparc/sparc.c (output_return): Drop seen from call.
13128 (output_sibcall): Likewise.
13129 * config/visium/visium.c (output_branch): Likewise.
13130
13131 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13132
13133 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13134 function label.
13135
13136 2018-02-10 Alan Modra <amodra@gmail.com>
13137
13138 PR target/84300
13139 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13140 Specify LR as an input.
13141
13142 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13143
13144 PR sanitizer/83987
13145 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13146 remove_member_access_dummy_vars): New functions.
13147 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13148 lower_omp_1, execute_lower_omp): Use them.
13149
13150 PR rtl-optimization/84308
13151 * shrink-wrap.c (spread_components): Release todo vector.
13152
13153 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13154
13155 PR rtl-optimization/57193
13156 * ira-color.c (struct allocno_color_data): Add member
13157 conflict_allocno_hard_prefs.
13158 (update_conflict_allocno_hard_prefs): New.
13159 (bucket_allocno_compare_func): Add a preference based on
13160 conflict_allocno_hard_prefs.
13161 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13162 (color_allocnos): Remove a dead code. Initiate
13163 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13164
13165 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13166
13167 PR target/84226
13168 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13169 constraint from =wa to wa. Avoid a subreg on the output operand,
13170 instead use a pseudo and subreg it in a move.
13171 (p9_xxbrd_<mode>): Changed to ...
13172 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13173 (p9_xxbrd_v2df): New expander.
13174 (p9_xxbrw_<mode>): Changed to ...
13175 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13176 (p9_xxbrw_v4sf): New expander.
13177
13178 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13179
13180 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13181
13182 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13183
13184 PR target/83926
13185 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13186 multiply in 32-bit mode.
13187 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13188 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13189 mode.
13190
13191 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13192
13193 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13194 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13195 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13196 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13197
13198 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13199
13200 PR lto/84213
13201 * dwarf2out.c (is_trivial_indirect_ref): New function.
13202 (dwarf2out_late_global_decl): Do not generate a location
13203 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13204 and that are not defined in the current unit.
13205
13206 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13207
13208 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13209 instead of a libcall for UNORDERED.
13210
13211 2018-02-09 Tamar Christina <tamar.christina@arm.com>
13212
13213 PR target/82641
13214 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13215 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13216
13217 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13218
13219 PR target/PR84295
13220 * config/s390/s390.c (s390_set_current_function): Invoke
13221 s390_indirect_branch_settings also if fndecl didn't change.
13222
13223 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13224
13225 * config/rs6000/rs6000.md (blockage): Set length to zero.
13226
13227 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13228
13229 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13230
13231 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13232
13233 PR sanitizer/84285
13234 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13235 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13236 -static-lib*san.
13237
13238 PR debug/84252
13239 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13240 PARALLEL incoming that failed vt_get_decl_and_offset check.
13241
13242 PR middle-end/84237
13243 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13244 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13245 TREE_READONLY bit.
13246 (get_variable_section): For decls in named .bss* sections pass true as
13247 second argument to bss_initializer_p.
13248
13249 2018-02-09 Marek Polacek <polacek@redhat.com>
13250 Jakub Jelinek <jakub@redhat.com>
13251
13252 PR c++/83659
13253 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13254 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
13255 Sync some changes from cxx_fold_indirect_ref.
13256
13257 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13258
13259 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13260 markers.
13261 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13262 (BLOCK_INLINE_ENTRY_LABEL): New.
13263 (dwarf2out_var_location): Disregard inline entry markers.
13264 (inline_entry_data): New struct.
13265 (inline_entry_data_hasher): New hashtable type.
13266 (inline_entry_data_hasher::hash): New.
13267 (inline_entry_data_hasher::equal): New.
13268 (inline_entry_data_table): New variable.
13269 (add_high_low_attributes): Add DW_AT_entry_pc and
13270 DW_AT_GNU_entry_view attributes if a pending entry is found
13271 in inline_entry_data_table. Add old entry_pc attribute only
13272 if debug nonbinding markers are disabled.
13273 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13274 markers are enabled.
13275 (block_within_block_p, dwarf2out_inline_entry): New.
13276 (dwarf2out_finish): Check that no entries remained in
13277 inline_entry_data_table.
13278 * final.c (reemit_insn_block_notes): Handle inline entry notes.
13279 (final_scan_insn, notice_source_line): Likewise.
13280 (rest_of_clean_state): Skip inline entry markers.
13281 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13282 markers.
13283 * gimple.c (gimple_build_debug_inline_entry): New.
13284 * gimple.h (enum gimple_debug_subcode): Add
13285 GIMPLE_DEBUG_INLINE_ENTRY.
13286 (gimple_build_debug_inline_entry): Declare.
13287 (gimple_debug_inline_entry_p): New.
13288 (gimple_debug_nonbind_marker_p): Adjust.
13289 * insn-notes.def (INLINE_ENTRY): New.
13290 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13291 inline entry marker notes.
13292 (print_insn): Likewise.
13293 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13294 (INSN_DEBUG_MARKER_KIND): Likewise.
13295 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13296 * tree-inline.c (expand_call_inline): Build and insert
13297 debug_inline_entry stmt.
13298 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13299 inline entry blocks early, if nonbind markers are enabled.
13300 (dump_scope_block): Dump fragment info.
13301 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13302 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13303 (gimple_build_debug_inline_entry): New.
13304 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13305 Enable/disable inline entry points too.
13306 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13307 (DEBUG_INSN): Describe inline entry markers.
13308
13309 * common.opt (gvariable-location-views): New.
13310 (gvariable-location-views=incompat5): New.
13311 * config.in: Rebuilt.
13312 * configure: Rebuilt.
13313 * configure.ac: Test assembler for view support.
13314 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13315 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13316 * dwarf2out.c (var_loc_view): New typedef.
13317 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13318 (dwarf2out_locviews_in_attribute): New.
13319 (dwarf2out_locviews_in_loclist): New.
13320 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13321 (enum dw_line_info_opcode): Add LI_adv_address.
13322 (struct dw_line_info_table): Add view.
13323 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13324 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13325 (zero_view_p): New variable.
13326 (ZERO_VIEW_P): New macro.
13327 (output_asm_line_debug_info): New.
13328 (struct var_loc_node): Add view.
13329 (add_AT_view_list, AT_loc_list): New.
13330 (add_var_loc_to_decl): Add view param. Test it against last.
13331 (new_loc_list): Add view params. Record them.
13332 (AT_loc_list_ptr): Handle loc and view lists.
13333 (view_list_to_loc_list_val_node): New.
13334 (print_dw_val): Handle dw_val_class_view_list.
13335 (size_of_die): Likewise.
13336 (value_format): Likewise.
13337 (loc_list_has_views): New.
13338 (gen_llsym): Set vl_symbol too.
13339 (maybe_gen_llsym, skip_loc_list_entry): New.
13340 (dwarf2out_maybe_output_loclist_view_pair): New.
13341 (output_loc_list): Output view list or entries too.
13342 (output_view_list_offset): New.
13343 (output_die): Handle dw_val_class_view_list.
13344 (output_dwarf_version): New.
13345 (output_compilation_unit_header): Use it.
13346 (output_skeleton_debug_sections): Likewise.
13347 (output_rnglists, output_line_info): Likewise.
13348 (output_pubnames, output_aranges): Update version comments.
13349 (output_one_line_info_table): Output view numbers in asm comments.
13350 (dw_loc_list): Determine current endview, pass it to new_loc_list.
13351 Call maybe_gen_llsym.
13352 (loc_list_from_tree_1): Adjust.
13353 (add_AT_location_description): Create view list attribute if
13354 needed, check it's absent otherwise.
13355 (convert_cfa_to_fb_loc_list): Adjust.
13356 (maybe_emit_file): Call output_asm_line_debug_info for test.
13357 (dwarf2out_var_location): Reset views as needed. Precompute
13358 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
13359 attribute. Set view.
13360 (new_line_info_table): Reset next view.
13361 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13362 (dwarf2out_source_line): Likewise. Output view resets and labels to
13363 the assembler, or select appropriate line info opcodes.
13364 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13365 (optimize_string_length): Catch it. Adjust.
13366 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
13367 dw_val_class_view_list, and remove it if no longer needed.
13368 (hash_loc_list): Hash view numbers.
13369 (loc_list_hasher::equal): Compare them.
13370 (optimize_location_lists): Check whether a view list symbol is
13371 needed, and whether the locview attribute is present, and
13372 whether they match. Remove the locview attribute if no longer
13373 needed.
13374 (index_location_lists): Call skip_loc_list_entry for test.
13375 (dwarf2out_finish): Call output_asm_line_debug_info for test.
13376 Use output_dwarf_version.
13377 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13378 (struct dw_val_node): Add val_view_list.
13379 * final.c (SEEN_NEXT_VIEW): New.
13380 (set_next_view_needed): New.
13381 (clear_next_view_needed): New.
13382 (maybe_output_next_view): New.
13383 (final_start_function): Rename to...
13384 (final_start_function_1): ... this. Take pointer to FIRST,
13385 add SEEN parameter. Emit param bindings in the initial view.
13386 (final_start_function): Reintroduce SEEN-less interface.
13387 (final): Rename to...
13388 (final_1): ... this. Take SEEN parameter. Output final pending
13389 next view at the end.
13390 (final): Reintroduce seen-less interface.
13391 (final_scan_insn): Output pending next view before switching
13392 sections or ending a block. Mark the next view as needed when
13393 outputting variable locations. Notify debug backend of section
13394 changes, and of location view changes.
13395 (rest_of_handle_final): Adjust.
13396 * toplev.c (process_options): Autodetect value for debug variable
13397 location views option. Warn on incompat5 without -gdwarf-5.
13398 * doc/invoke.texi (gvariable-location-views): New.
13399 (gvariable-location-views=incompat5): New.
13400 (gno-variable-location-views): New.
13401
13402 2018-02-08 David Malcolm <dmalcolm@redhat.com>
13403
13404 PR tree-optimization/84136
13405 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13406 that the result of find_edge is non-NULL.
13407
13408 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13409
13410 PR target/83008
13411 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13412 storing integer register in SImode. Fix cost of 256 and 512
13413 byte aligned SSE register store.
13414
13415 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13416
13417 * config/i386/i386.c (ix86_multiplication_cost): Fix
13418 multiplication cost for TARGET_AVX512DQ.
13419
13420 2018-02-08 Marek Polacek <polacek@redhat.com>
13421
13422 PR tree-optimization/84238
13423 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13424 get_range_strlen.
13425
13426 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13427
13428 PR tree-optimization/84265
13429 * tree-vect-stmts.c (vectorizable_store): Don't treat
13430 VMAT_CONTIGUOUS accesses as grouped.
13431 (vectorizable_load): Likewise.
13432
13433 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13434
13435 PR tree-optimization/81635
13436 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13437 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13438 (test_round_for_mask): New functions.
13439 (wide_int_cc_tests): Call test_round_for_mask.
13440 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13441 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13442 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13443 range returned by get_range_info.
13444
13445 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13446
13447 PR ipa/81360
13448 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13449 * symtab.c: Include builtins.h
13450 (symtab_node::output_to_lto_symbol_table_p): Move here
13451 from lto-streamer-out.c:output_symbol_p.
13452 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
13453 (output_symbol_p): Move all logic to symtab.c
13454 (produce_symtab): Update.
13455
13456 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13457
13458 * config/s390/s390-opts.h (enum indirect_branch): Define.
13459 * config/s390/s390-protos.h (s390_return_addr_from_memory)
13460 (s390_indirect_branch_via_thunk)
13461 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
13462 (enum s390_indirect_branch_type): Define.
13463 * config/s390/s390.c (struct s390_frame_layout, struct
13464 machine_function): Remove.
13465 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
13466 (indirect_branch_table_label_no, indirect_branch_table_name):
13467 Define variables.
13468 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
13469 (enum s390_indirect_branch_option): Define.
13470 (s390_return_addr_from_memory): New function.
13471 (s390_handle_string_attribute): New function.
13472 (s390_attribute_table): Add new attribute handler.
13473 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
13474 (s390_indirect_branch_via_thunk): New function.
13475 (s390_indirect_branch_via_inline_thunk): New function.
13476 (s390_function_ok_for_sibcall): When jumping via thunk disallow
13477 sibling call optimization for non z10 compiles.
13478 (s390_emit_call): Force indirect branch target to be a single
13479 register. Add r1 clobber for non-z10 compiles.
13480 (s390_emit_epilogue): Emit return jump via return_use expander.
13481 (s390_reorg): Handle JUMP_INSNs as execute targets.
13482 (s390_option_override_internal): Perform validity checks for the
13483 new command line options.
13484 (s390_indirect_branch_attrvalue): New function.
13485 (s390_indirect_branch_settings): New function.
13486 (s390_set_current_function): Invoke s390_indirect_branch_settings.
13487 (s390_output_indirect_thunk_function): New function.
13488 (s390_code_end): Implement target hook.
13489 (s390_case_values_threshold): Implement target hook.
13490 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
13491 macros.
13492 * config/s390/s390.h (struct s390_frame_layout)
13493 (struct machine_function): Move here from s390.c.
13494 (TARGET_INDIRECT_BRANCH_NOBP_RET)
13495 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13496 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13497 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13498 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13499 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13500 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13501 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13502 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13503 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13504 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13505 (mnemonic attribute): Add values which aren't recognized
13506 automatically.
13507 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13508 pattern for branch conversion. Fix mnemonic attribute.
13509 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13510 indirect branch via thunk if requested.
13511 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13512 ("*indirect_jump"): Disable for branch conversion using out of
13513 line thunks.
13514 ("indirect_jump_via_thunk<mode>_z10")
13515 ("indirect_jump_via_thunk<mode>")
13516 ("indirect_jump_via_inlinethunk<mode>_z10")
13517 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13518 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13519 ("casesi_jump_via_inlinethunk<mode>_z10")
13520 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13521 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13522 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13523 ("*indirect2_jump"): Disable for branch conversion.
13524 ("casesi_jump"): Turn into expander and expand patterns for branch
13525 conversion.
13526 ("return_use"): New expander.
13527 ("*return"): Emit return via thunk and rename it to ...
13528 ("*return<mode>"): ... this one.
13529 * config/s390/s390.opt: Add new options and and enum for the
13530 option values.
13531
13532 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13533
13534 * lra-constraints.c (match_reload): Unconditionally use
13535 gen_lowpart_SUBREG, rather than selecting between that
13536 and equivalent gen_rtx_SUBREG code.
13537
13538 2018-02-08 Richard Biener <rguenther@suse.de>
13539
13540 PR tree-optimization/84233
13541 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13542 changed flag instead of boguously re-using phi_inserted.
13543
13544 2018-02-08 Martin Jambor <mjambor@suse.cz>
13545
13546 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13547 static local variables.
13548
13549 2018-02-08 Richard Biener <rguenther@suse.de>
13550
13551 PR tree-optimization/84278
13552 * tree-vect-stmts.c (vectorizable_store): When looking for
13553 smaller vector types to perform grouped strided loads/stores
13554 make sure the mode is supported by the target.
13555 (vectorizable_load): Likewise.
13556
13557 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13558
13559 * config/aarch64/aarch64.c (aarch64_components_for_bb):
13560 Increase LDP/STP opportunities by adding adjacent callee-saves.
13561
13562 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13563
13564 PR rtl-optimization/84068
13565 PR rtl-optimization/83459
13566 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13567
13568 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
13569
13570 PR tree-optimization/84224
13571 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13572 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13573 non-zero arguments.
13574
13575 2018-02-07 Iain Sandoe <iain@codesourcery.com>
13576
13577 PR target/84113
13578 * config/rs6000/altivec.md (*restore_world): Remove LR use.
13579 * config/rs6000/predicates.md (restore_world_operation): Adjust op
13580 count, remove one USE.
13581
13582 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
13583
13584 * doc/install.texi (Configuration): Document the
13585 --with-long-double-format={ibm,ieee} PowerPC configuration
13586 options.
13587
13588 PR target/84154
13589 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13590 Convert from define_expand to be define_insn_and_split. Rework
13591 float/double/_Float128 conversions to QI/HI/SImode to work with
13592 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
13593 conversions to QI/HImode types did a store and then a load to
13594 truncate the value. For conversions to VSX registers, don't split
13595 the insn, instead emit the code directly. Use the code iterator
13596 any_fix to combine signed and unsigned conversions.
13597 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13598 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13599 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13600 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13601 (fix_<mode>di2_hw): Likewise.
13602 (fixuns_<mode>di2_hw): Likewise.
13603 (fix_<mode>si2_hw): Likewise.
13604 (fixuns_<mode>si2_hw): Likewise.
13605 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13606 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13607 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13608 fix<uns>_trunc<SFDF:mode>si2_p8.
13609 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13610 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13611 (fix<uns>_<mode>_mem): Likewise.
13612 (fctiw<u>z_<mode>_mem): Likewise.
13613 (fix<uns>_<mode>_mem): Likewise.
13614 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13615 the register allocator from doing a direct move to the GPRs to do
13616 a store, and instead use the ISA 3.0 store byte/half-word from
13617 vector register instruction. For IEEE 128-bit floating point,
13618 also optimize stores of 32-bit ints.
13619 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13620
13621 2018-02-07 Alan Hayward <alan.hayward@arm.com>
13622
13623 * genextract.c (push_pathstr_operand): New function to support
13624 [a-zA-Z].
13625 (walk_rtx): Call push_pathstr_operand.
13626 (print_path): Support [a-zA-Z].
13627
13628 2018-02-07 Richard Biener <rguenther@suse.de>
13629
13630 PR tree-optimization/84037
13631 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13632 (cse_and_gimplify_to_preheader): Declare.
13633 (vect_get_place_in_interleaving_chain): Likewise.
13634 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13635 ivexpr_map.
13636 (_loop_vec_info::~_loop_vec_info): Delete it.
13637 (cse_and_gimplify_to_preheader): New function.
13638 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13639 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13640 (vectorizable_load): Likewise. For grouped stores always base
13641 the IV on the first element.
13642 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13643 condition before gimplifying.
13644
13645 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13646
13647 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13648 *DIV_EXPR and *MOD_EXPR.
13649
13650 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
13651
13652 PR target/84248
13653 * config/i386/i386.c (ix86_option_override_internal): Mask out
13654 the CF_SET bit when checking -fcf-protection.
13655
13656 2018-02-07 Tom de Vries <tom@codesourcery.com>
13657
13658 PR libgomp/84217
13659 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13660 enough.
13661
13662 2018-02-07 Richard Biener <rguenther@suse.de>
13663
13664 PR tree-optimization/84204
13665 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13666 this place.
13667
13668 PR tree-optimization/84205
13669 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13670 special-case isl_ast_op_zdiv_r.
13671
13672 PR tree-optimization/84223
13673 * graphite-scop-detection.c (gather_bbs::before_dom_children):
13674 Only add conditions from within the region.
13675 (gather_bbs::after_dom_children): Adjust.
13676
13677 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
13678
13679 PR target/84209
13680 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13681 * config/avr/avr.md: Only post-reload split REG-REG moves if
13682 either register is GENERAL_REG_P.
13683
13684 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13685
13686 PR tree-optimization/84235
13687 * tree-ssa-scopedtables.c
13688 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13689 if the subtraction is performed in floating point type where NaNs are
13690 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13691 build 1. Formatting fix.
13692
13693 2018-02-06 Jakub Jelinek <jakub@redhat.com>
13694
13695 PR target/84146
13696 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13697 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13698 and skip it regardless of bb boundaries. Use CALL_P macro,
13699 don't test INSN_P (insn) together with CALL_P or JUMP_P check
13700 unnecessarily, formatting fix.
13701
13702 2018-02-06 Michael Collison <michael.collison@arm.com>
13703
13704 * config/arm/thumb2.md:
13705 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13706 (*thumb_mov_notscc): Ditto.
13707
13708 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
13709
13710 PR target/84154
13711 * config/rs6000/rs6000.md (su code attribute): Use "u" for
13712 unsigned_fix, not "s".
13713
13714 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13715
13716 * configure.ac (gcc_fn_eh_frame_ro): New function.
13717 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13718 correct .eh_frame permissions.
13719 * configure: Regenerate.
13720
13721 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
13722
13723 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13724 irrelevant options.
13725
13726 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13727
13728 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13729 Display warning message for -mno-speculate-indirect-jumps.
13730
13731 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
13732
13733 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13734 Undocumented.
13735 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13736
13737 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
13738
13739 PR tree-optimization/84225
13740 * tree-eh.c (find_trapping_overflow): Only call
13741 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13742
13743 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13744
13745 PR target/84145
13746 * config/i386/i386.c: Reimplement the check of possible options
13747 -mibt/-mshstk conbination. Change error messages.
13748 * doc/invoke.texi: Fix a typo: remove extra '='.
13749
13750 2018-02-06 Marek Polacek <polacek@redhat.com>
13751
13752 PR tree-optimization/84228
13753 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13754
13755 2018-02-06 Tamar Christina <tamar.christina@arm.com>
13756
13757 PR target/82641
13758 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13759 emitted arch directives.
13760 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13761 __ARM_FEATURE_COPROC before changing architectures.
13762
13763 2018-02-06 Richard Biener <rguenther@suse.de>
13764
13765 * config/i386/i386.c (print_reg): Fix typo.
13766 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13767
13768 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
13769
13770 * configure: Regenerate.
13771
13772 2018-02-05 Martin Sebor <msebor@redhat.com>
13773
13774 PR tree-optimization/83369
13775 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13776 inlining context.
13777
13778 2018-02-05 Martin Liska <mliska@suse.cz>
13779
13780 * doc/invoke.texi: Cherry-pick upstream r323995.
13781
13782 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
13783
13784 * ira.c (ira_init_register_move_cost): Adjust comment.
13785
13786 2018-02-05 Martin Liska <mliska@suse.cz>
13787
13788 PR gcov-profile/84137
13789 * doc/gcov.texi: Fix typo in documentation.
13790
13791 2018-02-05 Martin Liska <mliska@suse.cz>
13792
13793 PR gcov-profile/83879
13794 * doc/gcov.texi: Document necessity of --dynamic-list-data when
13795 using dlopen functionality.
13796
13797 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
13798
13799 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13800 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13801 _mm_maskz_range_ss, _mm_mask_range_round_ss,
13802 _mm_maskz_range_round_ss): New intrinsics.
13803 (__builtin_ia32_rangesd128_round)
13804 (__builtin_ia32_rangess128_round): Remove.
13805 (__builtin_ia32_rangesd128_mask_round,
13806 __builtin_ia32_rangess128_mask_round): New builtins.
13807 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13808 __builtin_ia32_rangess128_round): Remove.
13809 (__builtin_ia32_rangesd128_mask_round,
13810 __builtin_ia32_rangess128_mask_round): New builtins.
13811 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13812 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13813 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13814 "<round_saeonly_constraint>")): Changed to ...
13815 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13816 "<round_saeonly_scalar_constraint>")): ... this.
13817 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13818 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13819 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13820 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13821 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13822
13823 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
13824
13825 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13826 options.
13827 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13828 Remove all values except native, 8540 and 8548.
13829
13830 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
13831
13832 * config/i386/i386.c (ix86_output_function_return): Pass
13833 INVALID_REGNUM, instead of -1, as invalid register number to
13834 indirect_thunk_name and output_indirect_thunk.
13835
13836 2018-02-02 Julia Koval <julia.koval@intel.com>
13837
13838 * config.gcc: Add -march=icelake.
13839 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13840 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13841 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13842 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13843 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13844 (processor_target_table): Add icelake.
13845 (ix86_option_override_internal): Handle new PTAs.
13846 (get_builtin_code_for_version): Handle icelake.
13847 (M_INTEL_COREI7_ICELAKE): New.
13848 (fold_builtin_cpu): Handle icelake.
13849 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13850 * doc/invoke.texi: Add -march=icelake.
13851
13852 2018-02-02 Julia Koval <julia.koval@intel.com>
13853
13854 * config/i386/i386.c (ix86_option_override_internal): Change flags type
13855 to wide_int_bitmask.
13856 * wide-int-bitmask.h: New.
13857
13858 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13859
13860 PR target/84066
13861 * config/i386/i386.md: Replace Pmode with word_mode in
13862 builtin_setjmp_setup and builtin_longjmp to support x32.
13863
13864 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
13865
13866 PR target/56010
13867 PR target/83743
13868 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13869 #include "opts.h".
13870 (rs6000_supported_cpu_names): New static variable.
13871 (linux_cpu_translation_table): Likewise.
13872 (elf_platform) <cpu>: Define new static variable and use it.
13873 Translate kernel AT_PLATFORM name to canonical name if needed.
13874 Error if platform name is unknown.
13875
13876 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
13877
13878 PR target/84089
13879 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13880
13881 2018-02-01 Jeff Law <law@redhat.com>
13882
13883 PR target/84128
13884 * config/i386/i386.c (release_scratch_register_on_entry): Add new
13885 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
13886 the scratch if RELEASE_VIA_POP is false.
13887 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13888 If we have to save a temporary register, decrement SIZE appropriately.
13889 Pass new arguments to release_scratch_register_on_entry.
13890 (ix86_adjust_stack_and_probe): Likewise.
13891 (ix86_emit_probe_stack_range): Pass new arguments to
13892 release_scratch_register_on_entry.
13893
13894 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
13895
13896 PR rtl-optimization/84157
13897 * combine.c (change_zero_ext): Use REG_P predicate in
13898 front of HARD_REGISTER_P predicate.
13899
13900 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
13901
13902 * config/avr/avr.c (avr_option_override): Move disabling of
13903 -fdelete-null-pointer-checks to...
13904 * common/config/avr/avr-common.c (avr_option_optimization_table):
13905 ...here.
13906
13907 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13908
13909 PR tree-optimization/81635
13910 * tree-data-ref.c (split_constant_offset_1): For types that
13911 wrap on overflow, try to use range info to prove that wrapping
13912 cannot occur.
13913
13914 2018-02-01 Renlin Li <renlin.li@arm.com>
13915
13916 PR target/83370
13917 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13918 TAILCALL_ADDR_REGS.
13919 (aarch64_register_move_cost): Likewise.
13920 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13921 TAILCALL_ADDR_REGS.
13922 (REG_CLASS_NAMES): Likewise.
13923 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13924 TAILCALL_ADDR_REGS. Remove IP registers.
13925 * config/aarch64/aarch64.md (Ucs): Update register constraint.
13926
13927 2018-02-01 Richard Biener <rguenther@suse.de>
13928
13929 * domwalk.h (dom_walker::dom_walker): Add additional constructor
13930 for specifying RPO order and allow NULL for that.
13931 * domwalk.c (dom_walker::dom_walker): Likewise.
13932 (dom_walker::walk): Handle NULL RPO order.
13933 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13934 in RPO order.
13935 (rewrite_update_dom_walker): Likewise.
13936 (mark_def_dom_walker): Likewise.
13937
13938 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13939
13940 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13941 (aarch64_maybe_expand_sve_subreg_move): Declare.
13942 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13943 * config/aarch64/predicates.md (aarch64_any_register_operand): New
13944 predicate.
13945 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13946 that are semantically a reverse operation.
13947 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13948 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13949 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13950 functions.
13951 (aarch64_can_change_mode_class): For big-endian, forbid changes
13952 between two SVE modes if they have different element sizes.
13953
13954 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13955
13956 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13957 the TImode handling for big-endian targets.
13958
13959 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13960
13961 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13962 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
13963 not just bytes.
13964 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13965 Remove BSWAP handing for big-endian targets and use the form of
13966 LD1RQ appropariate for the mode.
13967
13968 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13969
13970 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13971 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13972 duplicated element.
13973
13974 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13975
13976 PR tearget/83845
13977 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13978 check for operands that need to go through aarch64_sve_reload_be.
13979
13980 2018-02-01 Jakub Jelinek <jakub@redhat.com>
13981
13982 PR tree-optimization/81661
13983 PR tree-optimization/84117
13984 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13985 * tree-eh.c: Include gimplify.h.
13986 (find_trapping_overflow, replace_trapping_overflow,
13987 rewrite_to_non_trapping_overflow): New functions.
13988 * tree-vect-loop.c: Include tree-eh.h.
13989 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13990 * tree-data-ref.c: Include tree-eh.h.
13991 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13992
13993 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
13994
13995 PR rtl-optimization/84123
13996 * combine.c (change_zero_ext): Check if hard register satisfies
13997 can_change_dest_mode before calling gen_lowpart_SUBREG.
13998
13999 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14000
14001 PR target/82444
14002 * ira.c (ira_init_register_move_cost): Remove assert.
14003
14004 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14005
14006 PR rtl-optimization/84071
14007 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14008 * doc/tm.texi: Regenerate.
14009
14010 2018-01-31 Richard Biener <rguenther@suse.de>
14011
14012 PR tree-optimization/84132
14013 * tree-data-ref.c (analyze_miv_subscript): Properly
14014 check whether evolution_function_is_affine_multivariate_p
14015 before calling gcd_of_steps_may_divide_p.
14016
14017 2018-01-31 Julia Koval <julia.koval@intel.com>
14018
14019 PR target/83618
14020 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14021 * config/i386/i386.md (rdpid_rex64) New.
14022 (rdpid): Make 32bit only.
14023
14024 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14025
14026 PR lto/84105
14027 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14028 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14029
14030 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14031
14032 Revert
14033 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14034
14035 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14036
14037 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14038
14039 PR rtl-optimization/84071
14040 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14041 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14042
14043 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14044
14045 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14046 (arc_attribute_table): Add 'aux' attribute.
14047 (arc_in_small_data_p): Consider aux like variables.
14048 (arc_is_aux_reg_p): New function.
14049 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14050 (arc_get_aux_arg): New function.
14051 (prepare_move_operands): Handle aux-register access.
14052 (arc_handle_aux_attribute): New function.
14053 * doc/extend.texi (ARC Variable attributes): Add subsection.
14054
14055 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14056
14057 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14058 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14059 (arc_attribute_table): Add 'uncached' attribute.
14060 (arc_print_operand): Print '.di' flag for uncached memory
14061 accesses.
14062 (arc_in_small_data_p): Do not consider for small data the uncached
14063 types.
14064 (arc_is_uncached_mem_p): New function.
14065 * config/arc/predicates.md (compact_store_memory_operand): Check
14066 for uncached memory accesses.
14067 (nonvol_nonimm_operand): Likewise.
14068 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14069
14070 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14071
14072 PR c/84100
14073 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14074 falign-loops=): Add Optimization flag.
14075
14076 2018-01-30 Jeff Law <law@redhat.com>
14077
14078 PR target/84064
14079 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14080 INT_REGISTERS_SAVED. Check it prior to calling
14081 get_scratch_register_on_entry.
14082 (ix86_adjust_stack_and_probe): Similarly.
14083 (ix86_emit_probe_stack_range): Similarly.
14084 (ix86_expand_prologue): Corresponding changes.
14085
14086 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14087
14088 PR target/40411
14089 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14090 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14091
14092 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14093
14094 PR target/84112
14095 * lra-constraints.c (curr_insn_transform): Process AND in the
14096 address.
14097
14098 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14099
14100 PR rtl-optimization/83986
14101 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14102 dependence against last_pending_memory_flush in addition to
14103 pending_jump_insns.
14104
14105 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14106
14107 PR tree-optimization/81611
14108 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14109 copies.
14110
14111 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14112
14113 PR target/83758
14114 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14115 a reg rtx.
14116
14117 2018-01-30 Richard Biener <rguenther@suse.de>
14118 Jakub Jelinek <jakub@redhat.com>
14119
14120 PR tree-optimization/84111
14121 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14122 inner loops added during recursion, as they don't have up-to-date
14123 SSA form.
14124
14125 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14126
14127 PR ipa/81360
14128 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14129 (can_inline_edge_by_limits_p): ... here.
14130 (can_early_inline_edge_p, check_callers,
14131 update_caller_keys, update_callee_keys, recursive_inlining,
14132 add_new_edges_to_heap, speculation_useful_p,
14133 inline_small_functions,
14134 inline_small_functions, flatten_function,
14135 inline_to_all_callers_1): Update.
14136
14137 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14138
14139 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14140 zeros correctly.
14141
14142 2018-01-30 Richard Biener <rguenther@suse.de>
14143
14144 PR tree-optimization/83008
14145 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14146 invariant and constant vector uses in stmts when they need
14147 more than one stmt.
14148
14149 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14150
14151 PR bootstrap/84017
14152 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14153 * configure: Regenerate.
14154
14155 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14156
14157 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14158 pattern.
14159 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14160 Use gen_rtx_REG rather than gen_lowpart.
14161
14162 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14163
14164 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14165 rather than 0 when creating partial subregs.
14166
14167 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14168
14169 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14170 of usage.
14171
14172 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14173
14174 PR target/81550
14175 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14176 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14177 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14178 flags. This restores the settings used before the 2017-07-24.
14179 Turning off pre increment/decrement/modify allows IVOPTS to
14180 optimize DF/SF loops where the index is an int.
14181
14182 2018-01-29 Richard Biener <rguenther@suse.de>
14183 Kelvin Nilsen <kelvin@gcc.gnu.org>
14184
14185 PR bootstrap/80867
14186 * tree-vect-stmts.c (vectorizable_call): Don't call
14187 targetm.vectorize_builtin_md_vectorized_function if callee is
14188 NULL.
14189
14190 2018-01-22 Carl Love <cel@us.ibm.com>
14191
14192 * doc/extend.tex: Fix typo in second arg in
14193 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14194
14195 2018-01-29 Richard Biener <rguenther@suse.de>
14196
14197 PR tree-optimization/84086
14198 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14199 (flush_ssaname_freelist): When SSA names were released reset
14200 the SCEV hash table.
14201
14202 2018-01-29 Richard Biener <rguenther@suse.de>
14203
14204 PR tree-optimization/84057
14205 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14206 removed paths when removing edges.
14207
14208 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
14209
14210 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14211 -mfunction-return=@var{choice}.
14212
14213 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
14214
14215 PR diagnostic/84034
14216 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14217 Handle CR like TAB.
14218 (layout::print_source_line): Likewise.
14219 (test_get_line_width_without_trailing_whitespace): Add test cases.
14220
14221 2018-01-27 Jakub Jelinek <jakub@redhat.com>
14222
14223 PR middle-end/84040
14224 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14225 debug insns.
14226
14227 2018-01-26 Jim Wilson <jimw@sifive.com>
14228
14229 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14230
14231 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14232 specified.
14233
14234 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14235
14236 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14237 and CMP + SUB-immediate -> SUBS.
14238
14239 2018-01-26 Martin Sebor <msebor@redhat.com>
14240
14241 PR tree-optimization/83896
14242 * tree-ssa-strlen.c (get_string_len): Rename...
14243 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
14244 Avoid assuming length is constant.
14245 (handle_char_store): Use HOST_WIDE_INT for string length.
14246
14247 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
14248
14249 PR target/81763
14250 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14251 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14252
14253 2018-01-26 Richard Biener <rguenther@suse.de>
14254
14255 PR rtl-optimization/84003
14256 * dse.c (record_store): Only record redundant stores when
14257 the earlier store aliases at least all accesses the later one does.
14258
14259 2018-01-26 Jakub Jelinek <jakub@redhat.com>
14260
14261 PR rtl-optimization/83985
14262 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14263 REG_CFA_RESTORE insns.
14264 (delete_unmarked_insns): Don't ignore separate shrink wrapping
14265 REG_CFA_RESTORE insns here.
14266
14267 PR c/83989
14268 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14269 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14270
14271 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14272
14273 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14274 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14275 (arc_init): Likewise.
14276 (arc_override_options): Likewise.
14277 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14278 value.
14279 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14280 support.
14281 * config/arc/arc.h (TARGET_DBNZ): Define.
14282 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14283 properly set the tune attribute.
14284 (dbnz): Use TARGET_DBNZ guard.
14285 * config/arc/arc.opt (mtune): Add core3 option.
14286
14287 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14288
14289 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14290 recognize new pic like addresses.
14291 (arc_delegitimize_address): Clean up.
14292
14293 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14294
14295 * config/arc/arc-arches.def: Option mrf16 valid for all
14296 architectures.
14297 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14298 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14299 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14300 * config/arc/arc-tables.opt: Regenerate.
14301 * config/arc/arc.c (arc_conditional_register_usage): Handle
14302 reduced register file case.
14303 (arc_file_start): Set must have build attributes.
14304 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14305 mrf16 option value.
14306 * config/arc/arc.opt (mrf16): Add new option.
14307 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14308 * config/arc/genmultilib.awk: Handle new mrf16 option.
14309 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14310 * config/arc/t-multilib: Regenerate.
14311 * doc/invoke.texi (ARC Options): Document mrf16 option.
14312
14313 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14314
14315 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14316 * config/arc/arc.c (arc_handle_secure_attribute): New function.
14317 (arc_attribute_table): Add 'secure_call' attribute.
14318 (arc_print_operand): Print secure call operand.
14319 (arc_function_ok_for_sibcall): Don't optimize tail calls when
14320 secure.
14321 (arc_is_secure_call_p): New function. * config/arc/arc.md
14322 (call_i): Add support for sjli instruction.
14323 (call_value_i): Likewise.
14324 * config/arc/constraints.md (Csc): New constraint.
14325
14326 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14327 John Eric Martin <John.Martin@emmicro-us.com>
14328
14329 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14330 * config/arc/arc.c (_arc_jli_section): New struct.
14331 (arc_jli_section): New type.
14332 (rc_jli_sections): New static variable.
14333 (arc_handle_jli_attribute): New function.
14334 (arc_attribute_table): Add jli_always and jli_fixed attribute.
14335 (arc_file_end): New function.
14336 (TARGET_ASM_FILE_END): Define.
14337 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14338 (arc_add_jli_section): New function.
14339 (jli_call_scan): Likewise.
14340 (arc_reorg): Call jli_call_scan.
14341 (arc_output_addsi): Remove 'S' from printing asm operand.
14342 (arc_is_jli_call_p): New function.
14343 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14344 operand.
14345 (movhi_insn): Likewise.
14346 (movsi_insn): Likewise.
14347 (movsi_set_cc_insn): Likewise.
14348 (loadqi_update): Likewise.
14349 (load_zeroextendqisi_update): Likewise.
14350 (load_signextendqisi_update): Likewise.
14351 (loadhi_update): Likewise.
14352 (load_zeroextendhisi_update): Likewise.
14353 (load_signextendhisi_update): Likewise.
14354 (loadsi_update): Likewise.
14355 (loadsf_update): Likewise.
14356 (movsicc_insn): Likewise.
14357 (bset_insn): Likewise.
14358 (bxor_insn): Likewise.
14359 (bclr_insn): Likewise.
14360 (bmsk_insn): Likewise.
14361 (bicsi3_insn): Likewise.
14362 (cmpsi_cc_c_insn): Likewise.
14363 (movsi_ne): Likewise.
14364 (movsi_cond_exec): Likewise.
14365 (clrsbsi2): Likewise.
14366 (norm_f): Likewise.
14367 (normw): Likewise.
14368 (swap): Likewise.
14369 (divaw): Likewise.
14370 (flag): Likewise.
14371 (sr): Likewise.
14372 (kflag): Likewise.
14373 (ffs): Likewise.
14374 (ffs_f): Likewise.
14375 (fls): Likewise.
14376 (call_i): Remove 'S' asm letter, add jli instruction.
14377 (call_value_i): Likewise.
14378 * config/arc/arc.op (mjli-always): New option.
14379 * config/arc/constraints.md (Cji): New constraint.
14380 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14381 operand.
14382 (subsf3_fpx): Likewise.
14383 (mulsf3_fpx): Likewise.
14384 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14385 asm operand.
14386 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14387 function attrbutes.
14388 * doc/invoke.texi (ARC): Document mjli-always option.
14389
14390 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
14391
14392 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14393 avoid addition with 0 and use incw and decw where possible.
14394
14395 2018-01-26 Richard Biener <rguenther@suse.de>
14396
14397 PR tree-optimization/81082
14398 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14399 association if it requires casting to unsigned.
14400 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14401 from fold_plusminus_mult_expr to catch important cases late when
14402 range info is available.
14403
14404 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14405
14406 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14407 * configure.ac (hidden_linkonce): New test.
14408 * configure: Regenerate.
14409 * config.in: Regenerate.
14410
14411 2018-01-26 Julia Koval <julia.koval@intel.com>
14412
14413 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14414 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14415 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14416 _mm_mask_bitshuffle_epi64_mask): Fix type.
14417 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14418 USI_FTYPE_V4DI_V4DI_USI): Remove.
14419 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14420 __builtin_ia32_vpshufbitqmb256_mask,
14421 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14422 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14423 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14424
14425 2018-01-26 Alan Modra <amodra@gmail.com>
14426
14427 PR target/84033
14428 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14429 UNSPEC_VBPERMQ. Sort other unspecs.
14430
14431 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
14432
14433 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14434
14435 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
14436
14437 PR middle-end/83055
14438 * predict.c (drop_profile): Do not push/pop cfun; update also
14439 node->count.
14440 (handle_missing_profiles): Fix logic looking for zero profiles.
14441
14442 2018-01-25 Jakub Jelinek <jakub@redhat.com>
14443
14444 PR middle-end/83977
14445 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14446 on functions with #pragma omp declare simd or functions with simd
14447 attribute.
14448 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14449 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14450 Remove trailing \n from warning_at calls.
14451
14452 2018-01-25 Tom de Vries <tom@codesourcery.com>
14453
14454 PR target/84028
14455 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14456 for neutered workers.
14457
14458 2018-01-24 Joseph Myers <joseph@codesourcery.com>
14459
14460 PR target/68467
14461 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
14462 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
14463
14464 2018-01-24 Jeff Law <law@redhat.com>
14465
14466 PR target/83994
14467 * i386.c (get_probe_interval): Move to earlier point.
14468 (ix86_compute_frame_layout): If -fstack-clash-protection and
14469 the frame is larger than the probe interval, then use pushes
14470 to save registers rather than reg->mem moves.
14471 (ix86_expand_prologue): Remove conditional for int_registers_saved
14472 assertion.
14473
14474 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
14475
14476 PR target/84014
14477 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
14478 min/max for never referenced object.
14479
14480 2018-01-24 Jakub Jelinek <jakub@redhat.com>
14481
14482 PR middle-end/83977
14483 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
14484 here.
14485 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
14486 attributes from DECL_ATTRIBUTES (decl) without affecting
14487 DECL_ATTRIBUTES (current_function_decl).
14488 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
14489 functions with non-NULL DECL_ABSTRACT_ORIGIN.
14490
14491 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
14492
14493 PR tree-optimization/83979
14494 * fold-const.c (fold_comparison): Use constant_boolean_node
14495 instead of boolean_{true,false}_node.
14496
14497 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
14498
14499 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14500 with zero counts.
14501
14502 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14503
14504 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14505 Simplify the clause that sets the length attribute.
14506 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14507 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14508 clause that sets the length attribute.
14509 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14510
14511 2018-01-24 Tom de Vries <tom@codesourcery.com>
14512
14513 PR target/83589
14514 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14515 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14516 Add strict parameter.
14517 (prevent_branch_around_nothing): Insert dummy insn between branch to
14518 label and label with no ptx insn inbetween.
14519 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14520
14521 2018-01-24 Tom de Vries <tom@codesourcery.com>
14522
14523 PR target/81352
14524 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14525 for neutered threads in warp.
14526 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14527
14528 2018-01-24 Richard Biener <rguenther@suse.de>
14529
14530 PR tree-optimization/83176
14531 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14532 operands.
14533
14534 2018-01-24 Richard Biener <rguenther@suse.de>
14535
14536 PR tree-optimization/82819
14537 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14538 code generating pluses that are no-ops in the target precision.
14539
14540 2018-01-24 Richard Biener <rguenther@suse.de>
14541
14542 PR middle-end/84000
14543 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14544
14545 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14546
14547 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14548 to merge probabilities.
14549 * predict.c (probably_never_executed): Also mark as cold functions
14550 with global 0 profile and guessed local profile.
14551 * profile-count.c (profile_probability::combine_with_count): New
14552 member function.
14553 * profile-count.h (profile_probability::operator*,
14554 profile_probability::operator*=, profile_probability::operator/,
14555 profile_probability::operator/=): Reduce precision to adjusted
14556 and set value to guessed on contradictory divisions.
14557 (profile_probability::combine_with_freq): Remove.
14558 (profile_probability::combine_wiht_count): Declare.
14559 (profile_count::force_nonzero):: Set to adjusted.
14560 (profile_count::probability_in):: Set quality to adjusted.
14561 * tree-ssa-tail-merge.c (replace_block_by): Use
14562 combine_with_count.
14563
14564 2018-01-23 Andrew Waterman <andrew@sifive.com>
14565 Jim Wilson <jimw@sifive.com>
14566
14567 * config/riscv/riscv.c (riscv_stack_boundary): New.
14568 (riscv_option_override): Set riscv_stack_boundary. Handle
14569 riscv_preferred_stack_boundary_arg.
14570 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14571 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14572 (STACK_BOUNDARY): Set to riscv_stack_boundary.
14573 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14574 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14575 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14576
14577 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
14578
14579 PR target/83905
14580 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14581 of struct ix86_frame.
14582 (ix86_expand_epilogue): Likewise. Add a local variable for
14583 the reg_save_offset field in struct ix86_frame.
14584
14585 2018-01-23 Bin Cheng <bin.cheng@arm.com>
14586
14587 PR tree-optimization/82604
14588 * tree-loop-distribution.c (enum partition_kind): New enum item
14589 PKIND_PARTIAL_MEMSET.
14590 (partition_builtin_p): Support above new enum item.
14591 (generate_code_for_partition): Ditto.
14592 (compute_access_range): Differentiate cases that equality can be
14593 proven at all loops, the innermost loops or no loops.
14594 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14595 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
14596 (finalize_partitions, distribute_loop): Don't fuse partition of
14597 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14598 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14599 parloop is enabled.
14600
14601 2018-01-23 Martin Liska <mliska@suse.cz>
14602
14603 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14604 order to ignore the predictor.
14605 (PRED_POLYMORPHIC_CALL): Likewise.
14606 (PRED_RECURSIVE_CALL): Likewise.
14607
14608 2018-01-23 Martin Liska <mliska@suse.cz>
14609
14610 * tree-profile.c (tree_profiling): Print function header to
14611 aware reader which function we are working on.
14612 * value-prof.c (gimple_find_values_to_profile): Do not print
14613 not interesting value histograms.
14614
14615 2018-01-23 Martin Liska <mliska@suse.cz>
14616
14617 * profile-count.h (enum profile_quality): Add
14618 profile_uninitialized as the first value. Do not number values
14619 as they are zero based.
14620 (profile_count::verify): Update sanity check.
14621 (profile_probability::verify): Likewise.
14622
14623 2018-01-23 Nathan Sidwell <nathan@acm.org>
14624
14625 * doc/invoke.texi (ffor-scope): Deprecate.
14626
14627 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14628
14629 PR tree-optimization/83510
14630 * domwalk.c (set_all_edges_as_executable): New function.
14631 (dom_walker::dom_walker): Convert bool param
14632 "skip_unreachable_blocks" to enum reachability. Move setup of
14633 edge flags to set_all_edges_as_executable and only do it when
14634 reachability is REACHABLE_BLOCKS.
14635 * domwalk.h (enum dom_walker::reachability): New enum.
14636 (dom_walker::dom_walker): Convert bool param
14637 "skip_unreachable_blocks" to enum reachability.
14638 (set_all_edges_as_executable): New decl.
14639 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
14640 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14641 "reachability".
14642 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14643 but converting true to REACHABLE_BLOCKS.
14644 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14645 * tree-vrp.c
14646 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14647 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14648 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14649 REACHABLE_BLOCKS.
14650 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14651 if check_all_array_refs will be called.
14652
14653 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14654
14655 * tree.c (selftest::test_location_wrappers): Add more test
14656 coverage.
14657
14658 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14659
14660 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14661 (selftest::test_bit_in_range): Likewise.
14662
14663 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14664
14665 PR testsuite/83888
14666 * doc/sourcebuild.texi (vect_float): Say that the selector
14667 only describes the situation when -funsafe-math-optimizations is on.
14668 (vect_float_strict): Document.
14669
14670 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14671
14672 PR tree-optimization/83965
14673 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14674 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14675 instead of checking only for a reduction.
14676 (vect_recog_widen_sum_pattern): Likewise.
14677
14678 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14679
14680 * predict.c (probably_never_executed): Only use precise profile info.
14681 (compute_function_frequency): Skip after inlining hack since we now
14682 have quality checking.
14683
14684 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14685
14686 * profile-count.h (profile_probability::very_unlikely,
14687 profile_probability::unlikely, profile_probability::even): Set
14688 precision to guessed.
14689
14690 2018-01-23 Richard Biener <rguenther@suse.de>
14691
14692 PR tree-optimization/83963
14693 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14694 Properly terminate dominator walk when crossing the exit edge not
14695 when visiting its source block.
14696
14697 2018-01-23 Jakub Jelinek <jakub@redhat.com>
14698
14699 PR c++/83918
14700 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14701 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14702
14703 2018-01-22 Jakub Jelinek <jakub@redhat.com>
14704
14705 PR tree-optimization/83957
14706 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
14707 semicolon after for body surrounded by braces.
14708
14709 PR tree-optimization/83081
14710 * profile-count.h (profile_probability::split): New method.
14711 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14712 Use profile_probability::split.
14713 (do_compare_rtx_and_jump): Fix adjustment of probabilities
14714 when splitting a single conditional jump into 2.
14715
14716 2018-01-22 David Malcolm <dmalcolm@redhat.com>
14717
14718 PR tree-optimization/69452
14719 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14720 decl.
14721
14722 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14723
14724 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14725 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14726 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14727
14728 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14729
14730 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14731 declaration.
14732 * config/rl78/rl78.md (movdi): New define_expand.
14733 * config/rl78/rl78.c (rl78_split_movdi): New function.
14734
14735 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
14736
14737 PR target/83862
14738 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14739 no longer used.
14740 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14741 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14742 128-bit to produce an UNSPEC move to get the double word with the
14743 signbit and then a shift directly to do signbit.
14744 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14745 implementation with a new version that just does either a direct
14746 move or a regular move. Move memory interface to separate insns.
14747 Move insns so they are next to the expander.
14748 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14749 with signbit move. Split big and little endian case.
14750 (signbit<mode>2_dm_mem_le): Likewise.
14751 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14752 (signbit<mode>2_dm2): Likewise.
14753
14754 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14755
14756 * config/rl78/rl78.md (anddi3): New define_expand.
14757
14758 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14759
14760 * config/rl78/rl78.md (umindi3): New define_expand.
14761
14762 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14763
14764 * config/rl78/rl78.md (smindi3): New define_expand.
14765
14766 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14767
14768 * config/rl78/rl78.md (smaxdi3): New define_expand.
14769
14770 2018-01-22 Carl Love <cel@us.ibm.com>
14771
14772 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14773 LVX_V1TI): Add macro expansion.
14774 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14775 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14776 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14777 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14778 Change check to determine if the instruction is a byte reversing
14779 entry. Fix typo in comment.
14780 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14781 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14782 Add def_builtin calls for new builtins.
14783 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14784 Add define_insn expansion.
14785
14786 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14787
14788 * config/rl78/rl78.md (umaxdi3): New define_expand.
14789
14790 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14791
14792 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14793 for non-QImode registers.
14794
14795 2018-01-22 Richard Biener <rguenther@suse.de>
14796
14797 PR tree-optimization/83963
14798 * graphite-scop-detection.c (scop_detection::get_sese): Delay
14799 including the loop exit block.
14800 (scop_detection::merge_sese): Likewise.
14801 (scop_detection::add_scop): Do it here instead.
14802
14803 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14804
14805 * doc/sourcebuild.texi (arm_softfloat): Document.
14806
14807 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
14808
14809 PR gcc/77734
14810 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14811 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14812 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14813
14814 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14815 David Edelsohn <dje.gcc@gmail.com>
14816
14817 PR target/83946
14818 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14819 Change "crset eq" to "crset 2".
14820 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14821 (*call_indirect_aix<mode>_nospec): Likewise.
14822 (*call_value_indirect_aix<mode>_nospec): Likewise.
14823 (*call_indirect_elfv2<mode>_nospec): Likewise.
14824 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14825 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14826 change assembly output from . to $.
14827 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14828 (indirect_jump<mode>_nospec): Change assembly output from . to $.
14829 (*tablejump<mode>_internal1_nospec): Likewise.
14830
14831 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
14832
14833 PR target/80870
14834 * config/sh/sh_optimize_sett_clrt.cc:
14835 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14836
14837 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
14838
14839 PR tree-optimization/83940
14840 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14841 offset_dt to vect_constant_def rather than vect_unknown_def_type.
14842 (vect_check_load_store_mask): Add a mask_dt_out parameter and
14843 use it to pass back the definition type.
14844 (vect_check_store_rhs): Likewise rhs_dt_out.
14845 (vect_build_gather_load_calls): Add a mask_dt argument and use
14846 it instead of a call to vect_is_simple_use.
14847 (vectorizable_store): Update calls to vect_check_load_store_mask
14848 and vect_check_store_rhs. Use the dt returned by the latter instead
14849 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
14850 instead of calls to vect_is_simple_use. Pass the scalar rather
14851 than the vector operand to vect_is_simple_use when handling
14852 second and subsequent copies of an rhs value.
14853 (vectorizable_load): Update calls to vect_check_load_store_mask
14854 and vect_build_gather_load_calls. Use the cached mask_dt and
14855 gs_info.offset_dt instead of calls to vect_is_simple_use.
14856
14857 2018-01-20 Jakub Jelinek <jakub@redhat.com>
14858
14859 PR middle-end/83945
14860 * tree-emutls.c: Include gimplify.h.
14861 (lower_emutls_2): New function.
14862 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14863 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14864 it before further processing.
14865
14866 PR target/83930
14867 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14868 UINTVAL (trueop1) instead of INTVAL (op1).
14869
14870 2018-01-19 Jakub Jelinek <jakub@redhat.com>
14871
14872 PR debug/81570
14873 PR debug/83728
14874 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14875 INCOMING_FRAME_SP_OFFSET if not defined.
14876 (scan_trace): Add ENTRY argument. If true and
14877 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14878 emit a note to adjust the CFA offset.
14879 (create_cfi_notes): Adjust scan_trace callers.
14880 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14881 INCOMING_FRAME_SP_OFFSET in the CIE.
14882 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14883 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14884 Likewise.
14885 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14886 * doc/tm.texi: Regenerated.
14887
14888 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14889
14890 PR rtl-optimization/83147
14891 * lra-constraints.c (remove_inheritance_pseudos): Use
14892 lra_substitute_pseudo_within_insn.
14893
14894 2018-01-19 Tom de Vries <tom@codesourcery.com>
14895 Cesar Philippidis <cesar@codesourcery.com>
14896
14897 PR target/83920
14898 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14899
14900 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
14901
14902 PR target/83790
14903 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14904 spaces for function labels.
14905
14906 2018-01-19 Martin Liska <mliska@suse.cz>
14907
14908 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14909 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14910 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14911 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14912 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14913 (PRED_CONST_RETURN): Change from 69 to 65.
14914 (PRED_NULL_RETURN): Change from 91 to 71.
14915 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14916 (PRED_LOOP_GUARD): Change from 66 to 73.
14917
14918 2018-01-19 Martin Liska <mliska@suse.cz>
14919
14920 * predict.c (predict_insn_def): Add new assert.
14921 (struct branch_predictor): Change type to signed integer.
14922 (test_prediction_value_range): Amend test to cover
14923 PROB_UNINITIALIZED.
14924 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14925 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14926 (PRED_LOOP_ITERATIONS_MAX): Likewise.
14927 (PRED_LOOP_IV_COMPARE): Likewise.
14928 * predict.h (PROB_UNINITIALIZED): Define new constant.
14929
14930 2018-01-19 Martin Liska <mliska@suse.cz>
14931
14932 * predict.c (dump_prediction): Add new format for
14933 analyze_brprob.py script which is enabled with -details
14934 suboption.
14935 * profile-count.h (precise_p): New function.
14936
14937 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14938
14939 PR tree-optimization/83922
14940 * tree-vect-loop.c (vect_verify_full_masking): Return false if
14941 there are no statements that need masking.
14942 (vect_active_double_reduction_p): New function.
14943 (vect_analyze_loop_operations): Use it when handling phis that
14944 are not in the loop header.
14945
14946 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14947
14948 PR tree-optimization/83914
14949 * tree-vect-loop.c (vectorizable_induction): Don't convert
14950 init_expr or apply the peeling adjustment for inductions
14951 that are nested within the vectorized loop.
14952
14953 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14954
14955 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14956 instead of NEG.
14957
14958 2018-01-18 Jakub Jelinek <jakub@redhat.com>
14959
14960 PR sanitizer/81715
14961 PR testsuite/83882
14962 * function.h (gimplify_parameters): Add gimple_seq * argument.
14963 * function.c: Include gimple.h and options.h.
14964 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14965 for the added local temporaries if needed.
14966 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14967 if there are any parameter cleanups, wrap whole body into a
14968 try/finally with the cleanups.
14969
14970 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
14971
14972 PR target/82964
14973 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14974 Use GET_MODE_CLASS for scalar floating point.
14975
14976 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14977
14978 PR ipa/82256
14979 patch by PaX Team
14980 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14981 Fix call of call_cgraph_insertion_hooks.
14982
14983 2018-01-18 Martin Sebor <msebor@redhat.com>
14984
14985 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14986
14987 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14988
14989 PR ipa/83619
14990 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14991 frequencies.
14992
14993 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
14994
14995 PR other/70268
14996 * common.opt: (-ffile-prefix-map): New option.
14997 * opts.c (common_handle_option): Defer it.
14998 * opts-global.c (handle_common_deferred_options): Handle it.
14999 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15000 * file-prefix-map.h: New file.
15001 (remap_debug_filename, add_debug_prefix_map): ...here.
15002 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15003 * final.c (debug_prefix_map, add_debug_prefix_map
15004 remap_debug_filename): Move to...
15005 * file-prefix-map.c: New file.
15006 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15007 generalize, get rid of alloca(), use strrchr() instead of strchr().
15008 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15009 Implement in terms of add_prefix_map().
15010 (remap_macro_filename, remap_debug_filename): Implement in term of
15011 remap_filename().
15012 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15013 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15014 * dbxout.c: Include file-prefix-map.h.
15015 * varasm.c: Likewise.
15016 * vmsdbgout.c: Likewise.
15017 * xcoffout.c: Likewise.
15018 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15019 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15020 * doc/invoke.texi (-ffile-prefix-map): Document.
15021 (-fdebug-prefix-map): Update description.
15022
15023 2018-01-18 Martin Liska <mliska@suse.cz>
15024
15025 * config/i386/i386.c (indirect_thunk_name): Document that also
15026 lfence is emitted.
15027 (output_indirect_thunk): Document why both instructions
15028 (pause and lfence) are generated.
15029
15030 2018-01-18 Richard Biener <rguenther@suse.de>
15031
15032 PR tree-optimization/83887
15033 * graphite-scop-detection.c
15034 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15035 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15036 (scop_detection::merge_sese): Re-implement with a flood-fill
15037 algorithm that properly finds a SESE region if it exists.
15038
15039 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15040
15041 PR c/61240
15042 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15043 pointer_diff optimizations use view_convert instead of convert.
15044
15045 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15046
15047 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15048 Generate different code for -mno-speculate-indirect-jumps.
15049 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15050 (*call_indirect_aix<mode>): Disable for
15051 -mno-speculate-indirect-jumps.
15052 (*call_indirect_aix<mode>_nospec): New define_insn.
15053 (*call_value_indirect_aix<mode>): Disable for
15054 -mno-speculate-indirect-jumps.
15055 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15056 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15057 -mno-speculate-indirect-jumps.
15058 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15059
15060 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15061
15062 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15063 long double type, set the flags for noting the default long double
15064 type, even if we don't pass or return a long double type.
15065
15066 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15067
15068 PR ipa/83051
15069 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15070 failure.
15071
15072 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15073
15074 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15075 support for merge[hl].
15076 (fold_mergehl_helper): New helper function.
15077 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15078 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15079 (altivec_vmrglw_direct): Add xxmrglw insn.
15080
15081 2018-01-17 Andrew Waterman <andrew@sifive.com>
15082
15083 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15084 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15085
15086 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15087
15088 PR lto/83121
15089 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15090 call the lto_location_cache before reading the
15091 DECL_SOURCE_LOCATION of the types.
15092
15093 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15094 Richard Sandiford <richard.sandiford@linaro.org>
15095
15096 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15097 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15098 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15099 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15100 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15101 Add declaration.
15102 * config/aarch64/constraints.md (aarch64_movti_operand):
15103 Limit immediates.
15104 * config/aarch64/predicates.md (Uti): Add new constraint.
15105
15106 2018-01-17 Carl Love <cel@us.ibm.com>
15107
15108 * config/rs6000/vsx.md (define_expand xl_len_r,
15109 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15110 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15111 lxvll.
15112 (define_expand, define_insn): Move the shift left from the
15113 define_insn to the define_expand for lxvl and stxvl instructions.
15114 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15115 and XL_LEN_R definitions to PURE.
15116
15117 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15118
15119 * config/i386/i386.c (indirect_thunk_name): Declare regno
15120 as unsigned int. Compare regno with INVALID_REGNUM.
15121 (output_indirect_thunk): Ditto.
15122 (output_indirect_thunk_function): Ditto.
15123 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15124 in the call to output_indirect_thunk_function.
15125
15126 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15127
15128 PR middle-end/83884
15129 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15130 rather than the size of inner_type to determine the stack slot size
15131 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15132
15133 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15134
15135 PR target/83546
15136 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15137 to PTA_SILVERMONT.
15138
15139 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15140
15141 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15142 endian Linux systems to optionally enable multilibs for selecting
15143 the long double type if the user configured an explicit type.
15144 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15145 have no long double multilibs if not defined.
15146 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15147 warn if the user used -mabi={ieee,ibm}longdouble and we built
15148 multilibs for long double.
15149 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15150 appropriate multilib option.
15151 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15152 multilib options.
15153 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15154 for building long double multilibs.
15155 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15156
15157 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15158
15159 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15160 copies.
15161
15162 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15163 64 bits.
15164 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15165 128 bits.
15166
15167 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15168 variables.
15169
15170 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15171 return value.
15172
15173 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15174
15175 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15176 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15177
15178 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15179
15180 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15181 different rtl trees depending on TARGET_64BIT.
15182 (rs6000_gen_lvx): Likewise.
15183
15184 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15185
15186 * config/visium/visium.md (nop): Tweak comment.
15187 (hazard_nop): Likewise.
15188
15189 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15190
15191 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15192 -mspeculate-indirect-jumps.
15193 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15194 for -mno-speculate-indirect-jumps.
15195 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15196 (*call_value_indirect_elfv2<mode>): Disable for
15197 -mno-speculate-indirect-jumps.
15198 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15199 (indirect_jump): Emit different RTL for
15200 -mno-speculate-indirect-jumps.
15201 (*indirect_jump<mode>): Disable for
15202 -mno-speculate-indirect-jumps.
15203 (*indirect_jump<mode>_nospec): New define_insn.
15204 (tablejump): Emit different RTL for
15205 -mno-speculate-indirect-jumps.
15206 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15207 (tablejumpsi_nospec): New define_expand.
15208 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15209 (tablejumpdi_nospec): New define_expand.
15210 (*tablejump<mode>_internal1): Disable for
15211 -mno-speculate-indirect-jumps.
15212 (*tablejump<mode>_internal1_nospec): New define_insn.
15213 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15214 option.
15215
15216 2018-01-16 Artyom Skrobov tyomitch@gmail.com
15217
15218 * caller-save.c (insert_save): Drop unnecessary parameter. All
15219 callers updated.
15220
15221 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15222 Richard Biener <rguenth@suse.de>
15223
15224 PR libgomp/83590
15225 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15226 return early, inline manually is_gimple_sizepos. Make sure if we
15227 call gimplify_expr we don't end up with a gimple constant.
15228 * tree.c (variably_modified_type_p): Don't return true for
15229 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
15230 * gimplify.h (is_gimple_sizepos): Remove.
15231
15232 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15233
15234 PR tree-optimization/83857
15235 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15236 vectorizable_live_operation for pure SLP statements.
15237 (vectorizable_live_operation): Handle PHIs.
15238
15239 2018-01-16 Richard Biener <rguenther@suse.de>
15240
15241 PR tree-optimization/83867
15242 * tree-vect-stmts.c (vect_transform_stmt): Precompute
15243 nested_in_vect_loop_p since the scalar stmt may get invalidated.
15244
15245 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15246
15247 PR c/83844
15248 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15249 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15250 If off is not INTEGER_CST, issue a may not be aligned warning
15251 rather than isn't aligned. Use isn%'t rather than isn't.
15252 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15253 into MULT_EXPR.
15254 <case MULT_EXPR>: Improve the case when bottom and one of the
15255 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15256 operand, in that case check if the other operand is multiple of
15257 bottom divided by the INTEGER_CST operand.
15258
15259 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15260
15261 PR target/83858
15262 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15263 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15264 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15265 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15266 * config/pa/pa.c (pa_function_arg_advance): Likewise.
15267 (pa_function_arg, pa_arg_partial_bytes): Likewise.
15268 (pa_function_arg_size): New function.
15269
15270 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15271
15272 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15273 in a separate statement.
15274
15275 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15276
15277 PR tree-optimization/83847
15278 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15279 group gathers and scatters.
15280
15281 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15282
15283 PR rtl-optimization/86620
15284 * params.def (max-sched-ready-insns): Bump minimum value to 1.
15285
15286 PR rtl-optimization/83213
15287 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15288 to last if both are JUMP_INSNs.
15289
15290 PR tree-optimization/83843
15291 * gimple-ssa-store-merging.c
15292 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15293 store_immediate_info for bswap/nop orig_stores.
15294
15295 2018-01-15 Andrew Waterman <andrew@sifive.com>
15296
15297 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15298 !TARGET_MUL.
15299 <UDIV>: Increase cost if !TARGET_DIV.
15300
15301 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
15302
15303 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15304 (define_attr "cr_logical_3op"): New.
15305 (cceq_ior_compare): Adjust.
15306 (cceq_ior_compare_complement): Adjust.
15307 (*cceq_rev_compare): Adjust.
15308 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15309 (is_cracked_insn): Adjust.
15310 (insn_must_be_first_in_group): Adjust.
15311 * config/rs6000/40x.md: Adjust.
15312 * config/rs6000/440.md: Adjust.
15313 * config/rs6000/476.md: Adjust.
15314 * config/rs6000/601.md: Adjust.
15315 * config/rs6000/603.md: Adjust.
15316 * config/rs6000/6xx.md: Adjust.
15317 * config/rs6000/7450.md: Adjust.
15318 * config/rs6000/7xx.md: Adjust.
15319 * config/rs6000/8540.md: Adjust.
15320 * config/rs6000/cell.md: Adjust.
15321 * config/rs6000/e300c2c3.md: Adjust.
15322 * config/rs6000/e500mc.md: Adjust.
15323 * config/rs6000/e500mc64.md: Adjust.
15324 * config/rs6000/e5500.md: Adjust.
15325 * config/rs6000/e6500.md: Adjust.
15326 * config/rs6000/mpc.md: Adjust.
15327 * config/rs6000/power4.md: Adjust.
15328 * config/rs6000/power5.md: Adjust.
15329 * config/rs6000/power6.md: Adjust.
15330 * config/rs6000/power7.md: Adjust.
15331 * config/rs6000/power8.md: Adjust.
15332 * config/rs6000/power9.md: Adjust.
15333 * config/rs6000/rs64.md: Adjust.
15334 * config/rs6000/titan.md: Adjust.
15335
15336 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15337
15338 * config/i386/predicates.md (indirect_branch_operand): Rewrite
15339 ix86_indirect_branch_register logic.
15340
15341 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15342
15343 * config/i386/constraints.md (Bs): Update
15344 ix86_indirect_branch_register check. Don't check
15345 ix86_indirect_branch_register with GOT_memory_operand.
15346 (Bw): Likewise.
15347 * config/i386/predicates.md (GOT_memory_operand): Don't check
15348 ix86_indirect_branch_register here.
15349 (GOT32_symbol_operand): Likewise.
15350
15351 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15352
15353 * config/i386/predicates.md (constant_call_address_operand):
15354 Rewrite ix86_indirect_branch_register logic.
15355 (sibcall_insn_operand): Likewise.
15356
15357 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15358
15359 * config/i386/constraints.md (Bs): Replace
15360 ix86_indirect_branch_thunk_register with
15361 ix86_indirect_branch_register.
15362 (Bw): Likewise.
15363 * config/i386/i386.md (indirect_jump): Likewise.
15364 (tablejump): Likewise.
15365 (*sibcall_memory): Likewise.
15366 (*sibcall_value_memory): Likewise.
15367 Peepholes of indirect call and jump via memory: Likewise.
15368 * config/i386/i386.opt: Likewise.
15369 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15370 (GOT_memory_operand): Likewise.
15371 (call_insn_operand): Likewise.
15372 (sibcall_insn_operand): Likewise.
15373 (GOT32_symbol_operand): Likewise.
15374
15375 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15376
15377 PR middle-end/83837
15378 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15379 type rather than type addr's type points to.
15380 (expand_omp_atomic_mutex): Likewise.
15381 (expand_omp_atomic): Likewise.
15382
15383 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15384
15385 PR target/83839
15386 * config/i386/i386.c (output_indirect_thunk_function): Use
15387 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15388 for __x86_return_thunk.
15389
15390 2018-01-15 Richard Biener <rguenther@suse.de>
15391
15392 PR middle-end/83850
15393 * expmed.c (extract_bit_field_1): Fix typo.
15394
15395 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15396
15397 PR target/83687
15398 * config/arm/iterators.md (VF): New mode iterator.
15399 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15400 Remove integer-related logic from pattern.
15401 (neon_vabd<mode>_3): Likewise.
15402
15403 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15404
15405 PR middle-end/82694
15406 * common.opt (fstrict-overflow): No longer an alias.
15407 (fwrapv-pointer): New option.
15408 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15409 also for pointer types based on flag_wrapv_pointer.
15410 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15411 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15412 opts->x_flag_wrapv got set.
15413 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15414 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15415 POINTER_TYPE_OVERFLOW_UNDEFINED.
15416 * match.pd: Likewise in address comparison pattern.
15417 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15418
15419 2018-01-15 Richard Biener <rguenther@suse.de>
15420
15421 PR lto/83804
15422 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15423 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
15424 Reset type names to their identifier if their TYPE_DECL doesn't
15425 have linkage (and thus is used for ODR and devirt).
15426 (save_debug_info_for_decl): Remove.
15427 (save_debug_info_for_type): Likewise.
15428 (add_tree_to_fld_list): Adjust.
15429 * tree-pretty-print.c (dump_generic_node): Make dumping of
15430 type names more robust.
15431
15432 2018-01-15 Richard Biener <rguenther@suse.de>
15433
15434 * BASE-VER: Bump to 8.0.1.
15435
15436 2018-01-14 Martin Sebor <msebor@redhat.com>
15437
15438 PR other/83508
15439 * builtins.c (check_access): Avoid warning when the no-warning bit
15440 is set.
15441
15442 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
15443
15444 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15445 * ira-color (allocno_hard_regs_compare): Likewise.
15446
15447 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
15448
15449 PR target/83013
15450 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15451 Use .pushsection/.popsection.
15452
15453 2018-01-14 Martin Sebor <msebor@redhat.com>
15454
15455 PR c++/81327
15456 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
15457
15458 2018-01-14 Jakub Jelinek <jakub@redhat.com>
15459
15460 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
15461 entry from extra_headers.
15462 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
15463 extra_headers, make the list bitwise identical to the i?86-*-* one.
15464
15465 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15466
15467 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
15468 -mcmodel=large with -mindirect-branch=thunk,
15469 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
15470 -mfunction-return=thunk-extern.
15471 * doc/invoke.texi: Document -mcmodel=large is incompatible with
15472 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
15473 -mfunction-return=thunk and -mfunction-return=thunk-extern.
15474
15475 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15476
15477 * config/i386/i386.c (print_reg): Print the name of the full
15478 integer register without '%'.
15479 (ix86_print_operand): Handle 'V'.
15480 * doc/extend.texi: Document 'V' modifier.
15481
15482 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15483
15484 * config/i386/constraints.md (Bs): Disallow memory operand for
15485 -mindirect-branch-register.
15486 (Bw): Likewise.
15487 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15488 (GOT_memory_operand): Likewise.
15489 (call_insn_operand): Likewise.
15490 (sibcall_insn_operand): Likewise.
15491 (GOT32_symbol_operand): Likewise.
15492 * config/i386/i386.md (indirect_jump): Call convert_memory_address
15493 for -mindirect-branch-register.
15494 (tablejump): Likewise.
15495 (*sibcall_memory): Likewise.
15496 (*sibcall_value_memory): Likewise.
15497 Disallow peepholes of indirect call and jump via memory for
15498 -mindirect-branch-register.
15499 (*call_pop): Replace m with Bw.
15500 (*call_value_pop): Likewise.
15501 (*sibcall_pop_memory): Replace m with Bs.
15502 * config/i386/i386.opt (mindirect-branch-register): New option.
15503 * doc/invoke.texi: Document -mindirect-branch-register option.
15504
15505 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15506
15507 * config/i386/i386-protos.h (ix86_output_function_return): New.
15508 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15509 set function_return_type.
15510 (indirect_thunk_name): Add ret_p to indicate thunk for function
15511 return.
15512 (output_indirect_thunk_function): Pass false to
15513 indirect_thunk_name.
15514 (ix86_output_indirect_branch_via_reg): Likewise.
15515 (ix86_output_indirect_branch_via_push): Likewise.
15516 (output_indirect_thunk_function): Create alias for function
15517 return thunk if regno < 0.
15518 (ix86_output_function_return): New function.
15519 (ix86_handle_fndecl_attribute): Handle function_return.
15520 (ix86_attribute_table): Add function_return.
15521 * config/i386/i386.h (machine_function): Add
15522 function_return_type.
15523 * config/i386/i386.md (simple_return_internal): Use
15524 ix86_output_function_return.
15525 (simple_return_internal_long): Likewise.
15526 * config/i386/i386.opt (mfunction-return=): New option.
15527 (indirect_branch): Mention -mfunction-return=.
15528 * doc/extend.texi: Document function_return function attribute.
15529 * doc/invoke.texi: Document -mfunction-return= option.
15530
15531 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15532
15533 * config/i386/i386-opts.h (indirect_branch): New.
15534 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15535 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15536 with local indirect jump when converting indirect call and jump.
15537 (ix86_set_indirect_branch_type): New.
15538 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15539 (indirectlabelno): New.
15540 (indirect_thunk_needed): Likewise.
15541 (indirect_thunk_bnd_needed): Likewise.
15542 (indirect_thunks_used): Likewise.
15543 (indirect_thunks_bnd_used): Likewise.
15544 (INDIRECT_LABEL): Likewise.
15545 (indirect_thunk_name): Likewise.
15546 (output_indirect_thunk): Likewise.
15547 (output_indirect_thunk_function): Likewise.
15548 (ix86_output_indirect_branch_via_reg): Likewise.
15549 (ix86_output_indirect_branch_via_push): Likewise.
15550 (ix86_output_indirect_branch): Likewise.
15551 (ix86_output_indirect_jmp): Likewise.
15552 (ix86_code_end): Call output_indirect_thunk_function if needed.
15553 (ix86_output_call_insn): Call ix86_output_indirect_branch if
15554 needed.
15555 (ix86_handle_fndecl_attribute): Handle indirect_branch.
15556 (ix86_attribute_table): Add indirect_branch.
15557 * config/i386/i386.h (machine_function): Add indirect_branch_type
15558 and has_local_indirect_jump.
15559 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15560 to true.
15561 (tablejump): Likewise.
15562 (*indirect_jump): Use ix86_output_indirect_jmp.
15563 (*tablejump_1): Likewise.
15564 (simple_return_indirect_internal): Likewise.
15565 * config/i386/i386.opt (mindirect-branch=): New option.
15566 (indirect_branch): New.
15567 (keep): Likewise.
15568 (thunk): Likewise.
15569 (thunk-inline): Likewise.
15570 (thunk-extern): Likewise.
15571 * doc/extend.texi: Document indirect_branch function attribute.
15572 * doc/invoke.texi: Document -mindirect-branch= option.
15573
15574 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
15575
15576 PR ipa/83051
15577 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15578
15579 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
15580
15581 * ipa-inline.c (want_inline_small_function_p): Return false if
15582 inlining has already failed with CIF_FINAL_ERROR.
15583 (update_caller_keys): Call want_inline_small_function_p before
15584 can_inline_edge_p.
15585 (update_callee_keys): Likewise.
15586
15587 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15588
15589 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15590 New function.
15591 (rs6000_quadword_masked_address_p): Likewise.
15592 (quad_aligned_load_p): Likewise.
15593 (quad_aligned_store_p): Likewise.
15594 (const_load_sequence_p): Add comment to describe the outer-most loop.
15595 (mimic_memory_attributes_and_flags): New function.
15596 (rs6000_gen_stvx): Likewise.
15597 (replace_swapped_aligned_store): Likewise.
15598 (rs6000_gen_lvx): Likewise.
15599 (replace_swapped_aligned_load): Likewise.
15600 (replace_swapped_load_constant): Capitalize argument name in
15601 comment describing this function.
15602 (rs6000_analyze_swaps): Add a third pass to search for vector loads
15603 and stores that access quad-word aligned addresses and replace
15604 with stvx or lvx instructions when appropriate.
15605 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15606 New function prototype.
15607 (rs6000_quadword_masked_address_p): Likewise.
15608 (rs6000_gen_lvx): Likewise.
15609 (rs6000_gen_stvx): Likewise.
15610 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15611 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15612 when memory address is aligned.
15613 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15614 this split to select lvx instruction when memory address is aligned.
15615 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15616 instruction when memory address is aligned.
15617 (*vsx_le_perm_load_v16qi): Likewise.
15618 (four unnamed splitters): Modify to select the stvx instruction
15619 when memory is aligned.
15620
15621 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
15622
15623 * predict.c (determine_unlikely_bbs): Handle correctly BBs
15624 which appears in the queue multiple times.
15625
15626 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15627 Alan Hayward <alan.hayward@arm.com>
15628 David Sherwood <david.sherwood@arm.com>
15629
15630 * tree-vectorizer.h (vec_lower_bound): New structure.
15631 (_loop_vec_info): Add check_nonzero and lower_bounds.
15632 (LOOP_VINFO_CHECK_NONZERO): New macro.
15633 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15634 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15635 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15636 fields. Make seg_len the distance travelled, not including the
15637 access size.
15638 (dr_direction_indicator): Declare.
15639 (dr_zero_step_indicator): Likewise.
15640 (dr_known_forward_stride_p): Likewise.
15641 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15642 tree-ssanames.h.
15643 (runtime_alias_check_p): Allow runtime alias checks with
15644 variable strides.
15645 (operator ==): Compare access_size and align.
15646 (prune_runtime_alias_test_list): Rework for new distinction between
15647 the access_size and seg_len.
15648 (create_intersect_range_checks_index): Likewise. Cope with polynomial
15649 segment lengths.
15650 (get_segment_min_max): New function.
15651 (create_intersect_range_checks): Use it.
15652 (dr_step_indicator): New function.
15653 (dr_direction_indicator): Likewise.
15654 (dr_zero_step_indicator): Likewise.
15655 (dr_known_forward_stride_p): Likewise.
15656 * tree-loop-distribution.c (data_ref_segment_size): Return
15657 DR_STEP * (niters - 1).
15658 (compute_alias_check_pairs): Update call to the dr_with_seg_len
15659 constructor.
15660 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15661 (vect_preserves_scalar_order_p): New function, split out from...
15662 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
15663 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15664 (vect_vfa_access_size): New function.
15665 (vect_vfa_align): Likewise.
15666 (vect_compile_time_alias): Take access_size_a and access_b arguments.
15667 (dump_lower_bound): New function.
15668 (vect_check_lower_bound): Likewise.
15669 (vect_small_gap_p): Likewise.
15670 (vectorizable_with_step_bound_p): Likewise.
15671 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15672 depencies if the vectorization factor is 1. Convert the checks
15673 for nonzero steps into checks on the bounds of DR_STEP. Try using
15674 a bunds check for variable steps if the minimum required step is
15675 relatively small. Update calls to the dr_with_seg_len
15676 constructor and to vect_compile_time_alias.
15677 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15678 function.
15679 (vect_loop_versioning): Call it.
15680 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15681 when retrying.
15682 (vect_estimate_min_profitable_iters): Account for any bounds checks.
15683
15684 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15685 Alan Hayward <alan.hayward@arm.com>
15686 David Sherwood <david.sherwood@arm.com>
15687
15688 * doc/sourcebuild.texi (vect_scatter_store): Document.
15689 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15690 optabs.
15691 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15692 Document.
15693 * genopinit.c (main): Add supports_vec_scatter_store and
15694 supports_vec_scatter_store_cached to target_optabs.
15695 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15696 IFN_MASK_SCATTER_STORE.
15697 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15698 functions.
15699 * internal-fn.h (internal_store_fn_p): Declare.
15700 (internal_fn_stored_value_index): Likewise.
15701 * internal-fn.c (scatter_store_direct): New macro.
15702 (expand_scatter_store_optab_fn): New function.
15703 (direct_scatter_store_optab_supported_p): New macro.
15704 (internal_store_fn_p): New function.
15705 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15706 IFN_MASK_SCATTER_STORE.
15707 (internal_fn_mask_index): Likewise.
15708 (internal_fn_stored_value_index): New function.
15709 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15710 for scatter stores.
15711 * optabs-query.h (supports_vec_scatter_store_p): Declare.
15712 * optabs-query.c (supports_vec_scatter_store_p): New function.
15713 * tree-vectorizer.h (vect_get_store_rhs): Declare.
15714 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15715 true for scatter stores.
15716 (vect_gather_scatter_fn_p): Handle scatter stores too.
15717 (vect_check_gather_scatter): Consider using scatter stores if
15718 supports_vec_scatter_store_p.
15719 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15720 scatter stores too.
15721 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15722 internal_fn_stored_value_index.
15723 (check_load_store_masking): Handle scatter stores too.
15724 (vect_get_store_rhs): Make public.
15725 (vectorizable_call): Use internal_store_fn_p.
15726 (vectorizable_store): Handle scatter store internal functions.
15727 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15728 when deciding whether the end of the group has been reached.
15729 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15730 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15731 (mask_scatter_store<mode>): New insns.
15732
15733 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15734 Alan Hayward <alan.hayward@arm.com>
15735 David Sherwood <david.sherwood@arm.com>
15736
15737 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15738 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15739 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15740 function.
15741 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15742 Use vect_truncate_gather_scatter_offset if we can't treat the
15743 operation as a normal gather load or scatter store.
15744 (get_group_load_store_type): Take the gather_scatter_info
15745 as argument. Try using a gather load or scatter store for
15746 single-element groups.
15747 (get_load_store_type): Update calls to get_group_load_store_type
15748 and vect_use_strided_gather_scatters_p.
15749
15750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15751 Alan Hayward <alan.hayward@arm.com>
15752 David Sherwood <david.sherwood@arm.com>
15753
15754 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15755 optional tree argument.
15756 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15757 null target hooks.
15758 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15759 but continue to use the current value as a fallback.
15760 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15761 to compare the updates.
15762 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15763 (get_load_store_type): Use it when handling a strided access.
15764 (vect_get_strided_load_store_ops): New function.
15765 (vect_get_data_ptr_increment): Likewise.
15766 (vectorizable_load): Handle strided gather loads. Always pass
15767 a step to vect_create_data_ref_ptr and bump_vector_ptr.
15768
15769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15770 Alan Hayward <alan.hayward@arm.com>
15771 David Sherwood <david.sherwood@arm.com>
15772
15773 * doc/md.texi (gather_load@var{m}): Document.
15774 (mask_gather_load@var{m}): Likewise.
15775 * genopinit.c (main): Add supports_vec_gather_load and
15776 supports_vec_gather_load_cached to target_optabs.
15777 * optabs-tree.c (init_tree_optimization_optabs): Use
15778 ggc_cleared_alloc to allocate target_optabs.
15779 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15780 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15781 functions.
15782 * internal-fn.h (internal_load_fn_p): Declare.
15783 (internal_gather_scatter_fn_p): Likewise.
15784 (internal_fn_mask_index): Likewise.
15785 (internal_gather_scatter_fn_supported_p): Likewise.
15786 * internal-fn.c (gather_load_direct): New macro.
15787 (expand_gather_load_optab_fn): New function.
15788 (direct_gather_load_optab_supported_p): New macro.
15789 (direct_internal_fn_optab): New function.
15790 (internal_load_fn_p): Likewise.
15791 (internal_gather_scatter_fn_p): Likewise.
15792 (internal_fn_mask_index): Likewise.
15793 (internal_gather_scatter_fn_supported_p): Likewise.
15794 * optabs-query.c (supports_at_least_one_mode_p): New function.
15795 (supports_vec_gather_load_p): Likewise.
15796 * optabs-query.h (supports_vec_gather_load_p): Declare.
15797 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15798 and memory_type field.
15799 (NUM_PATTERNS): Bump to 15.
15800 * tree-vect-data-refs.c: Include internal-fn.h.
15801 (vect_gather_scatter_fn_p): New function.
15802 (vect_describe_gather_scatter_call): Likewise.
15803 (vect_check_gather_scatter): Try using internal functions for
15804 gather loads. Recognize existing calls to a gather load function.
15805 (vect_analyze_data_refs): Consider using gather loads if
15806 supports_vec_gather_load_p.
15807 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15808 (vect_get_gather_scatter_offset_type): Likewise.
15809 (vect_convert_mask_for_vectype): Likewise.
15810 (vect_add_conversion_to_patterm): Likewise.
15811 (vect_try_gather_scatter_pattern): Likewise.
15812 (vect_recog_gather_scatter_pattern): New pattern recognizer.
15813 (vect_vect_recog_func_ptrs): Add it.
15814 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15815 internal_fn_mask_index and internal_gather_scatter_fn_p.
15816 (check_load_store_masking): Take the gather_scatter_info as an
15817 argument and handle gather loads.
15818 (vect_get_gather_scatter_ops): New function.
15819 (vectorizable_call): Check internal_load_fn_p.
15820 (vectorizable_load): Likewise. Handle gather load internal
15821 functions.
15822 (vectorizable_store): Update call to check_load_store_masking.
15823 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15824 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15825 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15826 (aarch64_gather_scale_operand_d): New predicates.
15827 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15828 (mask_gather_load<mode>): New insns.
15829
15830 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15831 Alan Hayward <alan.hayward@arm.com>
15832 David Sherwood <david.sherwood@arm.com>
15833
15834 * optabs.def (fold_left_plus_optab): New optab.
15835 * doc/md.texi (fold_left_plus_@var{m}): Document.
15836 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15837 * internal-fn.c (fold_left_direct): Define.
15838 (expand_fold_left_optab_fn): Likewise.
15839 (direct_fold_left_optab_supported_p): Likewise.
15840 * fold-const-call.c (fold_const_fold_left): New function.
15841 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15842 * tree-parloops.c (valid_reduction_p): New function.
15843 (gather_scalar_reductions): Use it.
15844 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15845 (vect_finish_replace_stmt): Declare.
15846 * tree-vect-loop.c (fold_left_reduction_fn): New function.
15847 (needs_fold_left_reduction_p): New function, split out from...
15848 (vect_is_simple_reduction): ...here. Accept reductions that
15849 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15850 (vect_force_simple_reduction): Also store the reduction type in
15851 the assignment's STMT_VINFO_REDUC_TYPE.
15852 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15853 (merge_with_identity): New function.
15854 (vect_expand_fold_left): Likewise.
15855 (vectorize_fold_left_reduction): Likewise.
15856 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
15857 scalar phi in place for it. Check for target support and reject
15858 cases that would reassociate the operation. Defer the transform
15859 phase to vectorize_fold_left_reduction.
15860 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15861 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15862 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15863
15864 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15865
15866 * tree-if-conv.c (predicate_mem_writes): Remove redundant
15867 call to ifc_temp_var.
15868
15869 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15870 Alan Hayward <alan.hayward@arm.com>
15871 David Sherwood <david.sherwood@arm.com>
15872
15873 * target.def (legitimize_address_displacement): Take the original
15874 offset as a poly_int.
15875 * targhooks.h (default_legitimize_address_displacement): Update
15876 accordingly.
15877 * targhooks.c (default_legitimize_address_displacement): Likewise.
15878 * doc/tm.texi: Regenerate.
15879 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15880 as an argument, moving assert of ad->disp == ad->disp_term to...
15881 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
15882 Try calling targetm.legitimize_address_displacement before expanding
15883 the address rather than afterwards, and adjust for the new interface.
15884 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15885 Match the new hook interface. Handle SVE addresses.
15886 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15887 new hook interface.
15888
15889 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15890
15891 * Makefile.in (OBJS): Add early-remat.o.
15892 * target.def (select_early_remat_modes): New hook.
15893 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15894 * doc/tm.texi: Regenerate.
15895 * targhooks.h (default_select_early_remat_modes): Declare.
15896 * targhooks.c (default_select_early_remat_modes): New function.
15897 * timevar.def (TV_EARLY_REMAT): New timevar.
15898 * passes.def (pass_early_remat): New pass.
15899 * tree-pass.h (make_pass_early_remat): Declare.
15900 * early-remat.c: New file.
15901 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15902 function.
15903 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15904
15905 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15906 Alan Hayward <alan.hayward@arm.com>
15907 David Sherwood <david.sherwood@arm.com>
15908
15909 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15910 vfm1 with a bound_epilog parameter.
15911 (vect_do_peeling): Update calls accordingly, and move the prologue
15912 call earlier in the function. Treat the base bound_epilog as 0 for
15913 fully-masked loops and retain vf - 1 for other loops. Add 1 to
15914 this base when peeling for gaps.
15915 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15916 with fully-masked loops.
15917 (vect_estimate_min_profitable_iters): Handle the single peeled
15918 iteration in that case.
15919
15920 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15921 Alan Hayward <alan.hayward@arm.com>
15922 David Sherwood <david.sherwood@arm.com>
15923
15924 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
15925 single-element interleaving even if the size is not a power of 2.
15926 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15927 accesses for single-element interleaving if the group size is
15928 not a power of 2.
15929
15930 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15931 Alan Hayward <alan.hayward@arm.com>
15932 David Sherwood <david.sherwood@arm.com>
15933
15934 * doc/md.texi (fold_extract_last_@var{m}): Document.
15935 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15936 * optabs.def (fold_extract_last_optab): New optab.
15937 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15938 * internal-fn.c (fold_extract_direct): New macro.
15939 (expand_fold_extract_optab_fn): Likewise.
15940 (direct_fold_extract_optab_supported_p): Likewise.
15941 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15942 * tree-vect-loop.c (vect_model_reduction_cost): Handle
15943 EXTRACT_LAST_REDUCTION.
15944 (get_initial_def_for_reduction): Do not create an initial vector
15945 for EXTRACT_LAST_REDUCTION reductions.
15946 (vectorizable_reduction): Leave the scalar phi in place for
15947 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
15948 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
15949 epilogue code for EXTRACT_LAST_REDUCTION and defer the
15950 transform phase to vectorizable_condition.
15951 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15952 split out from...
15953 (vect_finish_stmt_generation): ...here.
15954 (vect_finish_replace_stmt): New function.
15955 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15956 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15957 pattern.
15958 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15959
15960 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15961 Alan Hayward <alan.hayward@arm.com>
15962 David Sherwood <david.sherwood@arm.com>
15963
15964 * doc/md.texi (extract_last_@var{m}): Document.
15965 * optabs.def (extract_last_optab): New optab.
15966 * internal-fn.def (EXTRACT_LAST): New internal function.
15967 * internal-fn.c (cond_unary_direct): New macro.
15968 (expand_cond_unary_optab_fn): Likewise.
15969 (direct_cond_unary_optab_supported_p): Likewise.
15970 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15971 loops using EXTRACT_LAST.
15972 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15973 (extract_last_<mode>): ...this optab.
15974 (vec_extract<mode><Vel>): Update accordingly.
15975
15976 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15977 Alan Hayward <alan.hayward@arm.com>
15978 David Sherwood <david.sherwood@arm.com>
15979
15980 * target.def (empty_mask_is_expensive): New hook.
15981 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15982 * doc/tm.texi: Regenerate.
15983 * targhooks.h (default_empty_mask_is_expensive): Declare.
15984 * targhooks.c (default_empty_mask_is_expensive): New function.
15985 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15986 if the target says that empty masks are expensive.
15987 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15988 New function.
15989 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15990
15991 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15992 Alan Hayward <alan.hayward@arm.com>
15993 David Sherwood <david.sherwood@arm.com>
15994
15995 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15996 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15997 (vect_use_loop_mask_for_alignment_p): New function.
15998 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15999 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16000 niters_skip argument. Make sure that the first niters_skip elements
16001 of the first iteration are inactive.
16002 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16003 Update call to vect_set_loop_masks_directly.
16004 (get_misalign_in_elems): New function, split out from...
16005 (vect_gen_prolog_loop_niters): ...here.
16006 (vect_update_init_of_dr): Take a code argument that specifies whether
16007 the adjustment should be added or subtracted.
16008 (vect_update_init_of_drs): Likewise.
16009 (vect_prepare_for_masked_peels): New function.
16010 (vect_do_peeling): Skip prologue peeling if we're using a mask
16011 instead. Update call to vect_update_inits_of_drs.
16012 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16013 mask_skip_niters.
16014 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16015 alignment. Do not include the number of peeled iterations in
16016 the minimum threshold in that case.
16017 (vectorizable_induction): Adjust the start value down by
16018 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16019 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16020 Take the number of skipped iterations into account when calculating
16021 the loop bounds.
16022 * tree-vect-stmts.c (vect_gen_while_not): New function.
16023
16024 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16025 Alan Hayward <alan.hayward@arm.com>
16026 David Sherwood <david.sherwood@arm.com>
16027
16028 * doc/sourcebuild.texi (vect_fully_masked): Document.
16029 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16030 default value to 0.
16031 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16032 split out from...
16033 (vect_analyze_loop_2): ...here. Don't check the vectorization
16034 factor against the number of loop iterations if the loop is
16035 fully-masked.
16036
16037 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16038 Alan Hayward <alan.hayward@arm.com>
16039 David Sherwood <david.sherwood@arm.com>
16040
16041 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16042 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16043 (dump_groups): Update accordingly.
16044 (iv_use::mem_type): New member variable.
16045 (address_p): New function.
16046 (record_use): Add a mem_type argument and initialize the new
16047 mem_type field.
16048 (record_group_use): Add a mem_type argument. Use address_p.
16049 Remove obsolete null checks of base_object. Update call to record_use.
16050 (find_interesting_uses_op): Update call to record_group_use.
16051 (find_interesting_uses_cond): Likewise.
16052 (find_interesting_uses_address): Likewise.
16053 (get_mem_type_for_internal_fn): New function.
16054 (find_address_like_use): Likewise.
16055 (find_interesting_uses_stmt): Try find_address_like_use before
16056 calling find_interesting_uses_op.
16057 (addr_offset_valid_p): Use the iv mem_type field as the type
16058 of the addressed memory.
16059 (add_autoinc_candidates): Likewise.
16060 (get_address_cost): Likewise.
16061 (split_small_address_groups_p): Use address_p.
16062 (split_address_groups): Likewise.
16063 (add_iv_candidate_for_use): Likewise.
16064 (autoinc_possible_for_pair): Likewise.
16065 (rewrite_groups): Likewise.
16066 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16067 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16068 (get_alias_ptr_type_for_ptr_address): New function.
16069 (rewrite_use_address): Rewrite address uses in calls that were
16070 identified by find_address_like_use.
16071
16072 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16073 Alan Hayward <alan.hayward@arm.com>
16074 David Sherwood <david.sherwood@arm.com>
16075
16076 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16077 TARGET_MEM_REFs.
16078 * gimple-expr.h (is_gimple_addressable: Likewise.
16079 * gimple-expr.c (is_gimple_address): Likewise.
16080 * internal-fn.c (expand_call_mem_ref): New function.
16081 (expand_mask_load_optab_fn): Use it.
16082 (expand_mask_store_optab_fn): Likewise.
16083
16084 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16085 Alan Hayward <alan.hayward@arm.com>
16086 David Sherwood <david.sherwood@arm.com>
16087
16088 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16089 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16090 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16091 (cond_umax@var{mode}): Document.
16092 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16093 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16094 (cond_umin_optab, cond_umax_optab): New optabs.
16095 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16096 (COND_IOR, COND_XOR): New internal functions.
16097 * internal-fn.h (get_conditional_internal_fn): Declare.
16098 * internal-fn.c (cond_binary_direct): New macro.
16099 (expand_cond_binary_optab_fn): Likewise.
16100 (direct_cond_binary_optab_supported_p): Likewise.
16101 (get_conditional_internal_fn): New function.
16102 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16103 Cope with reduction statements that are vectorized as calls rather
16104 than assignments.
16105 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16106 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16107 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16108 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16109 (UNSPEC_COND_EOR): New unspecs.
16110 (optab): Add mappings for them.
16111 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16112 (sve_int_op, sve_fp_op): New int attributes.
16113
16114 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16115 Alan Hayward <alan.hayward@arm.com>
16116 David Sherwood <david.sherwood@arm.com>
16117
16118 * optabs.def (while_ult_optab): New optab.
16119 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16120 * internal-fn.def (WHILE_ULT): New internal function.
16121 * internal-fn.h (direct_internal_fn_supported_p): New override
16122 that takes two types as argument.
16123 * internal-fn.c (while_direct): New macro.
16124 (expand_while_optab_fn): New function.
16125 (convert_optab_supported_p): Likewise.
16126 (direct_while_optab_supported_p): New macro.
16127 * wide-int.h (wi::udiv_ceil): New function.
16128 * tree-vectorizer.h (rgroup_masks): New structure.
16129 (vec_loop_masks): New typedef.
16130 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16131 and fully_masked_p.
16132 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16133 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16134 (vect_max_vf): New function.
16135 (slpeel_make_loop_iterate_ntimes): Delete.
16136 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16137 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16138 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16139 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16140 internal-fn.h, stor-layout.h and optabs-query.h.
16141 (vect_set_loop_mask): New function.
16142 (add_preheader_seq): Likewise.
16143 (add_header_seq): Likewise.
16144 (interleave_supported_p): Likewise.
16145 (vect_maybe_permute_loop_masks): Likewise.
16146 (vect_set_loop_masks_directly): Likewise.
16147 (vect_set_loop_condition_masked): Likewise.
16148 (vect_set_loop_condition_unmasked): New function, split out from
16149 slpeel_make_loop_iterate_ntimes.
16150 (slpeel_make_loop_iterate_ntimes): Rename to..
16151 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16152 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16153 (vect_do_peeling): Update call accordingly.
16154 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16155 loops.
16156 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16157 mask_compare_type, can_fully_mask_p and fully_masked_p.
16158 (release_vec_loop_masks): New function.
16159 (_loop_vec_info): Use it to free the loop masks.
16160 (can_produce_all_loop_masks_p): New function.
16161 (vect_get_max_nscalars_per_iter): Likewise.
16162 (vect_verify_full_masking): Likewise.
16163 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16164 retries, and free the mask rgroups before retrying. Check loop-wide
16165 reasons for disallowing fully-masked loops. Make the final decision
16166 about whether use a fully-masked loop or not.
16167 (vect_estimate_min_profitable_iters): Do not assume that peeling
16168 for the number of iterations will be needed for fully-masked loops.
16169 (vectorizable_reduction): Disable fully-masked loops.
16170 (vectorizable_live_operation): Likewise.
16171 (vect_halve_mask_nunits): New function.
16172 (vect_double_mask_nunits): Likewise.
16173 (vect_record_loop_mask): Likewise.
16174 (vect_get_loop_mask): Likewise.
16175 (vect_transform_loop): Handle the case in which the final loop
16176 iteration might handle a partial vector. Call vect_set_loop_condition
16177 instead of slpeel_make_loop_iterate_ntimes.
16178 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16179 (check_load_store_masking): New function.
16180 (prepare_load_store_mask): Likewise.
16181 (vectorizable_store): Handle fully-masked loops.
16182 (vectorizable_load): Likewise.
16183 (supportable_widening_operation): Use vect_halve_mask_nunits for
16184 booleans.
16185 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16186 (vect_gen_while): New function.
16187 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16188 (aarch64_uqdec<mode>): New insn.
16189
16190 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16191 Alan Hayward <alan.hayward@arm.com>
16192 David Sherwood <david.sherwood@arm.com>
16193
16194 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16195 (reduc_xor_scal_optab): New optabs.
16196 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16197 (reduc_xor_scal_@var{m}): Document.
16198 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16199 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16200 internal functions.
16201 * fold-const-call.c (fold_const_call): Handle them.
16202 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16203 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16204 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16205 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16206 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16207 (UNSPEC_XORV): New unspecs.
16208 (optab): Add entries for them.
16209 (BITWISEV): New int iterator.
16210 (bit_reduc_op): New int attributes.
16211
16212 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16213 Alan Hayward <alan.hayward@arm.com>
16214 David Sherwood <david.sherwood@arm.com>
16215
16216 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16217 * internal-fn.def (VEC_SHL_INSERT): New internal function.
16218 * optabs.def (vec_shl_insert_optab): New optab.
16219 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16220 (duplicate_and_interleave): Likewise.
16221 * tree-vect-loop.c: Include internal-fn.h.
16222 (neutral_op_for_slp_reduction): New function, split out from
16223 get_initial_defs_for_reduction.
16224 (get_initial_def_for_reduction): Handle option 2 for variable-length
16225 vectors by loading the neutral value into a vector and then shifting
16226 the initial value into element 0.
16227 (get_initial_defs_for_reduction): Replace the code argument with
16228 the neutral value calculated by neutral_op_for_slp_reduction.
16229 Use gimple_build_vector for constant-length vectors.
16230 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16231 but the first group_size elements have a neutral value.
16232 Use duplicate_and_interleave otherwise.
16233 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16234 Update call to get_initial_defs_for_reduction. Handle SLP
16235 reductions for variable-length vectors by creating one vector
16236 result for each scalar result, with the elements associated
16237 with other scalar results stubbed out with the neutral value.
16238 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16239 Require IFN_VEC_SHL_INSERT for double reductions on
16240 variable-length vectors, or SLP reductions that have
16241 a neutral value. Require can_duplicate_and_interleave_p
16242 support for variable-length unchained SLP reductions if there
16243 is no neutral value, such as for MIN/MAX reductions. Also require
16244 the number of vector elements to be a multiple of the number of
16245 SLP statements when doing variable-length unchained SLP reductions.
16246 Update call to vect_create_epilog_for_reduction.
16247 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16248 and remove initial values.
16249 (duplicate_and_interleave): Make public.
16250 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16251 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16252
16253 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16254 Alan Hayward <alan.hayward@arm.com>
16255 David Sherwood <david.sherwood@arm.com>
16256
16257 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16258 (can_duplicate_and_interleave_p): New function.
16259 (vect_get_and_check_slp_defs): Take the vector of statements
16260 rather than just the current one. Remove excess parentheses.
16261 Restriction rejectinon of vect_constant_def and vect_external_def
16262 for variable-length vectors to boolean types, or types for which
16263 can_duplicate_and_interleave_p is false.
16264 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16265 (duplicate_and_interleave): New function.
16266 (vect_get_constant_vectors): Use gimple_build_vector for
16267 constant-length vectors and suitable variable-length constant
16268 vectors. Use duplicate_and_interleave for other variable-length
16269 vectors. Don't defer the update when inserting new statements.
16270
16271 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16272 Alan Hayward <alan.hayward@arm.com>
16273 David Sherwood <david.sherwood@arm.com>
16274
16275 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16276 min_profitable_iters doesn't go negative.
16277
16278 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16279 Alan Hayward <alan.hayward@arm.com>
16280 David Sherwood <david.sherwood@arm.com>
16281
16282 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16283 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16284 * optabs.def (vec_mask_load_lanes_optab): New optab.
16285 (vec_mask_store_lanes_optab): Likewise.
16286 * internal-fn.def (MASK_LOAD_LANES): New internal function.
16287 (MASK_STORE_LANES): Likewise.
16288 * internal-fn.c (mask_load_lanes_direct): New macro.
16289 (mask_store_lanes_direct): Likewise.
16290 (expand_mask_load_optab_fn): Handle masked operations.
16291 (expand_mask_load_lanes_optab_fn): New macro.
16292 (expand_mask_store_optab_fn): Handle masked operations.
16293 (expand_mask_store_lanes_optab_fn): New macro.
16294 (direct_mask_load_lanes_optab_supported_p): Likewise.
16295 (direct_mask_store_lanes_optab_supported_p): Likewise.
16296 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16297 parameter.
16298 (vect_load_lanes_supported): Likewise.
16299 * tree-vect-data-refs.c (strip_conversion): New function.
16300 (can_group_stmts_p): Likewise.
16301 (vect_analyze_data_ref_accesses): Use it instead of checking
16302 for a pair of assignments.
16303 (vect_store_lanes_supported): Take a masked_p parameter.
16304 (vect_load_lanes_supported): Likewise.
16305 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16306 vect_store_lanes_supported and vect_load_lanes_supported.
16307 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16308 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16309 parameter. Don't allow gaps for masked accesses.
16310 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
16311 and vect_load_lanes_supported.
16312 (get_load_store_type): Take a masked_p parameter and update
16313 call to get_group_load_store_type.
16314 (vectorizable_store): Update call to get_load_store_type.
16315 Handle IFN_MASK_STORE_LANES.
16316 (vectorizable_load): Update call to get_load_store_type.
16317 Handle IFN_MASK_LOAD_LANES.
16318
16319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16320 Alan Hayward <alan.hayward@arm.com>
16321 David Sherwood <david.sherwood@arm.com>
16322
16323 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16324 modes for SVE.
16325 * config/aarch64/aarch64-protos.h
16326 (aarch64_sve_struct_memory_operand_p): Declare.
16327 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16328 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16329 (VPRED, vpred): Handle SVE structure modes.
16330 * config/aarch64/constraints.md (Utx): New constraint.
16331 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16332 (aarch64_sve_struct_nonimmediate_operand): New predicates.
16333 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16334 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16335 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16336 structure modes. Split into pieces after RA.
16337 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16338 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16339 New patterns.
16340 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16341 SVE structure modes.
16342 (aarch64_classify_address): Likewise.
16343 (sizetochar): Move earlier in file.
16344 (aarch64_print_operand): Handle SVE register lists.
16345 (aarch64_array_mode): New function.
16346 (aarch64_sve_struct_memory_operand_p): Likewise.
16347 (TARGET_ARRAY_MODE): Redefine.
16348
16349 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16350 Alan Hayward <alan.hayward@arm.com>
16351 David Sherwood <david.sherwood@arm.com>
16352
16353 * target.def (array_mode): New target hook.
16354 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16355 * doc/tm.texi: Regenerate.
16356 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16357 * hooks.c (hook_optmode_mode_uhwi_none): New function.
16358 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16359 targetm.array_mode.
16360 * stor-layout.c (mode_for_array): Likewise. Support polynomial
16361 type sizes.
16362
16363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16364 Alan Hayward <alan.hayward@arm.com>
16365 David Sherwood <david.sherwood@arm.com>
16366
16367 * fold-const.c (fold_binary_loc): Check the argument types
16368 rather than the result type when testing for a vector operation.
16369
16370 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16371
16372 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16373 * doc/tm.texi: Regenerate.
16374
16375 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16376 Alan Hayward <alan.hayward@arm.com>
16377 David Sherwood <david.sherwood@arm.com>
16378
16379 * doc/invoke.texi (-msve-vector-bits=): Document new option.
16380 (sve): Document new AArch64 extension.
16381 * doc/md.texi (w): Extend the description of the AArch64
16382 constraint to include SVE vectors.
16383 (Upl, Upa): Document new AArch64 predicate constraints.
16384 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16385 enum.
16386 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16387 (msve-vector-bits=): New option.
16388 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16389 SVE when these are disabled.
16390 (sve): New extension.
16391 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16392 modes. Adjust their number of units based on aarch64_sve_vg.
16393 (MAX_BITSIZE_MODE_ANY_MODE): Define.
16394 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16395 aarch64_addr_query_type.
16396 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16397 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16398 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16399 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16400 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16401 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16402 (aarch64_simd_imm_zero_p): Delete.
16403 (aarch64_check_zero_based_sve_index_immediate): Declare.
16404 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16405 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16406 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16407 (aarch64_sve_float_mul_immediate_p): Likewise.
16408 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16409 rather than an rtx.
16410 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16411 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16412 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16413 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16414 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16415 (aarch64_regmode_natural_size): Likewise.
16416 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16417 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16418 left one place.
16419 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16420 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16421 for VG and the SVE predicate registers.
16422 (V_ALIASES): Add a "z"-prefixed alias.
16423 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16424 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16425 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16426 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16427 (REG_CLASS_NAMES): Add entries for them.
16428 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
16429 and the predicate registers.
16430 (aarch64_sve_vg): Declare.
16431 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16432 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16433 (REGMODE_NATURAL_SIZE): Define.
16434 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16435 SVE macros.
16436 * config/aarch64/aarch64.c: Include cfgrtl.h.
16437 (simd_immediate_info): Add a constructor for series vectors,
16438 and an associated step field.
16439 (aarch64_sve_vg): New variable.
16440 (aarch64_dbx_register_number): Handle VG and the predicate registers.
16441 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16442 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16443 (VEC_ANY_DATA, VEC_STRUCT): New constants.
16444 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16445 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16446 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16447 (aarch64_get_mask_mode): New functions.
16448 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16449 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16450 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
16451 predicate modes and predicate registers. Explicitly restrict
16452 GPRs to modes of 16 bytes or smaller. Only allow FP registers
16453 to store a vector mode if it is recognized by
16454 aarch64_classify_vector_mode.
16455 (aarch64_regmode_natural_size): New function.
16456 (aarch64_hard_regno_caller_save_mode): Return the original mode
16457 for predicates.
16458 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
16459 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
16460 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
16461 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
16462 functions.
16463 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
16464 does not overlap dest if the function is frame-related. Handle
16465 SVE constants.
16466 (aarch64_split_add_offset): New function.
16467 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
16468 them aarch64_add_offset.
16469 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
16470 and update call to aarch64_sub_sp.
16471 (aarch64_add_cfa_expression): New function.
16472 (aarch64_expand_prologue): Pass extra temporary registers to the
16473 functions above. Handle the case in which we need to emit new
16474 DW_CFA_expressions for registers that were originally saved
16475 relative to the stack pointer, but now have to be expressed
16476 relative to the frame pointer.
16477 (aarch64_output_mi_thunk): Pass extra temporary registers to the
16478 functions above.
16479 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
16480 IP0 and IP1 values for SVE frames.
16481 (aarch64_expand_vec_series): New function.
16482 (aarch64_expand_sve_widened_duplicate): Likewise.
16483 (aarch64_expand_sve_const_vector): Likewise.
16484 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
16485 Handle SVE constants. Use emit_move_insn to move a force_const_mem
16486 into the register, rather than emitting a SET directly.
16487 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
16488 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
16489 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
16490 (offset_9bit_signed_scaled_p): New functions.
16491 (aarch64_replicate_bitmask_imm): New function.
16492 (aarch64_bitmask_imm): Use it.
16493 (aarch64_cannot_force_const_mem): Reject expressions involving
16494 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
16495 (aarch64_classify_index): Handle SVE indices, by requiring
16496 a plain register index with a scale that matches the element size.
16497 (aarch64_classify_address): Handle SVE addresses. Assert that
16498 the mode of the address is VOIDmode or an integer mode.
16499 Update call to aarch64_classify_symbol.
16500 (aarch64_classify_symbolic_expression): Update call to
16501 aarch64_classify_symbol.
16502 (aarch64_const_vec_all_in_range_p): New function.
16503 (aarch64_print_vector_float_operand): Likewise.
16504 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
16505 "vN" for FP registers with SVE modes. Handle (const ...) vectors
16506 and the FP immediates 1.0 and 0.5.
16507 (aarch64_print_address_internal): Handle SVE addresses.
16508 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16509 (aarch64_regno_regclass): Handle predicate registers.
16510 (aarch64_secondary_reload): Handle big-endian reloads of SVE
16511 data modes.
16512 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16513 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16514 (aarch64_convert_sve_vector_bits): New function.
16515 (aarch64_override_options): Use it to handle -msve-vector-bits=.
16516 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16517 rather than an rtx.
16518 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16519 Handle SVE vector and predicate modes. Accept VL-based constants
16520 that need only one temporary register, and VL offsets that require
16521 no temporary registers.
16522 (aarch64_conditional_register_usage): Mark the predicate registers
16523 as fixed if SVE isn't available.
16524 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16525 Return true for SVE vector and predicate modes.
16526 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16527 rather than an unsigned int. Handle SVE modes.
16528 (aarch64_preferred_simd_mode): Update call accordingly. Handle
16529 SVE modes.
16530 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16531 if SVE is enabled.
16532 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16533 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16534 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16535 (aarch64_sve_float_mul_immediate_p): New functions.
16536 (aarch64_sve_valid_immediate): New function.
16537 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16538 Explicitly reject structure modes. Check for INDEX constants.
16539 Handle PTRUE and PFALSE constants.
16540 (aarch64_check_zero_based_sve_index_immediate): New function.
16541 (aarch64_simd_imm_zero_p): Delete.
16542 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16543 vector modes. Accept constants in the range of CNT[BHWD].
16544 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16545 ask for an Advanced SIMD mode.
16546 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16547 (aarch64_simd_vector_alignment): Handle SVE predicates.
16548 (aarch64_vectorize_preferred_vector_alignment): New function.
16549 (aarch64_simd_vector_alignment_reachable): Use it instead of
16550 the vector size.
16551 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16552 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16553 functions.
16554 (MAX_VECT_LEN): Delete.
16555 (expand_vec_perm_d): Add a vec_flags field.
16556 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16557 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16558 (aarch64_evpc_ext): Don't apply a big-endian lane correction
16559 for SVE modes.
16560 (aarch64_evpc_rev): Rename to...
16561 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
16562 (aarch64_evpc_rev_global): New function.
16563 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16564 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16565 MAX_VECT_LEN.
16566 (aarch64_evpc_sve_tbl): New function.
16567 (aarch64_expand_vec_perm_const_1): Update after rename of
16568 aarch64_evpc_rev. Handle SVE permutes too, trying
16569 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16570 than aarch64_evpc_tbl.
16571 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16572 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16573 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16574 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16575 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16576 (aarch64_expand_sve_vcond): New functions.
16577 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16578 of aarch64_vector_mode_p.
16579 (aarch64_dwarf_poly_indeterminate_value): New function.
16580 (aarch64_compute_pressure_classes): Likewise.
16581 (aarch64_can_change_mode_class): Likewise.
16582 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16583 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16584 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16585 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16586 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16587 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16588 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16589 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16590 constraints.
16591 (Dn, Dl, Dr): Accept const as well as const_vector.
16592 (Dz): Likewise. Compare against CONST0_RTX.
16593 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16594 of "vector" where appropriate.
16595 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16596 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16597 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16598 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16599 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16600 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16601 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16602 (v_int_equiv): Extend to SVE modes.
16603 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16604 mode attributes.
16605 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16606 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16607 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16608 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16609 (SVE_COND_FP_CMP): New int iterators.
16610 (perm_hilo): Handle the new unpack unspecs.
16611 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16612 attributes.
16613 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16614 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16615 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16616 (aarch64_equality_operator, aarch64_constant_vector_operand)
16617 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16618 (aarch64_sve_nonimmediate_operand): Likewise.
16619 (aarch64_sve_general_operand): Likewise.
16620 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16621 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16622 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16623 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16624 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16625 (aarch64_sve_float_arith_immediate): Likewise.
16626 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16627 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16628 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16629 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16630 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16631 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16632 (aarch64_sve_float_arith_operand): Likewise.
16633 (aarch64_sve_float_arith_with_sub_operand): Likewise.
16634 (aarch64_sve_float_mul_operand): Likewise.
16635 (aarch64_sve_vec_perm_operand): Likewise.
16636 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16637 (aarch64_mov_operand): Accept const_poly_int and const_vector.
16638 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16639 as well as const_vector.
16640 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16641 in file. Use CONST0_RTX and CONSTM1_RTX.
16642 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
16643 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16644 Use aarch64_simd_imm_zero.
16645 * config/aarch64/aarch64-sve.md: New file.
16646 * config/aarch64/aarch64.md: Include it.
16647 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16648 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16649 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16650 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16651 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16652 (sve): New attribute.
16653 (enabled): Disable instructions with the sve attribute unless
16654 TARGET_SVE.
16655 (movqi, movhi): Pass CONST_POLY_INT operaneds through
16656 aarch64_expand_mov_immediate.
16657 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16658 CNT[BHSD] immediates.
16659 (movti): Split CONST_POLY_INT moves into two halves.
16660 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16661 Split additions that need a temporary here if the destination
16662 is the stack pointer.
16663 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16664 (*add<mode>3_poly_1): New instruction.
16665 (set_clobber_cc): New expander.
16666
16667 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16668
16669 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16670 parameter and use it instead of GET_MODE_SIZE (innermode). Use
16671 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16672 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16673 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
16674 Change innermode from fixed_mode_size to machine_mode.
16675 (simplify_subreg): Update call accordingly. Handle a constant-sized
16676 subreg of a variable-length CONST_VECTOR.
16677
16678 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16679 Alan Hayward <alan.hayward@arm.com>
16680 David Sherwood <david.sherwood@arm.com>
16681
16682 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16683 (add_offset_to_base): New function, split out from...
16684 (create_mem_ref): ...here. When handling a scale other than 1,
16685 check first whether the address is valid without the offset.
16686 Add it into the base if so, leaving the index and scale as-is.
16687
16688 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16689
16690 PR c++/83778
16691 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16692 fold_for_warn before checking if arg2 is INTEGER_CST.
16693
16694 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
16695
16696 * config/rs6000/predicates.md (load_multiple_operation): Delete.
16697 (store_multiple_operation): Delete.
16698 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16699 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16700 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16701 guarded by TARGET_STRING.
16702 (rs6000_output_load_multiple): Delete.
16703 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16704 OPTION_MASK_STRING / TARGET_STRING handling.
16705 (print_operand) <'N', 'O'>: Add comment that these are unused now.
16706 (const rs6000_opt_masks) <"string">: Change mask to 0.
16707 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16708 (MASK_STRING): Delete.
16709 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16710 parts. Simplify.
16711 (load_multiple): Delete.
16712 (*ldmsi8): Delete.
16713 (*ldmsi7): Delete.
16714 (*ldmsi6): Delete.
16715 (*ldmsi5): Delete.
16716 (*ldmsi4): Delete.
16717 (*ldmsi3): Delete.
16718 (store_multiple): Delete.
16719 (*stmsi8): Delete.
16720 (*stmsi7): Delete.
16721 (*stmsi6): Delete.
16722 (*stmsi5): Delete.
16723 (*stmsi4): Delete.
16724 (*stmsi3): Delete.
16725 (movmemsi_8reg): Delete.
16726 (corresponding unnamed define_insn): Delete.
16727 (movmemsi_6reg): Delete.
16728 (corresponding unnamed define_insn): Delete.
16729 (movmemsi_4reg): Delete.
16730 (corresponding unnamed define_insn): Delete.
16731 (movmemsi_2reg): Delete.
16732 (corresponding unnamed define_insn): Delete.
16733 (movmemsi_1reg): Delete.
16734 (corresponding unnamed define_insn): Delete.
16735 * config/rs6000/rs6000.opt (mno-string): New.
16736 (mstring): Replace by deprecation warning stub.
16737 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16738
16739 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16740
16741 * regrename.c (regrename_do_replace): If replacing the same
16742 reg multiple times, try to reuse last created gen_raw_REG.
16743
16744 PR debug/81155
16745 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16746 main to workaround a bug in GDB.
16747
16748 2018-01-12 Tom de Vries <tom@codesourcery.com>
16749
16750 PR target/83737
16751 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16752
16753 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
16754
16755 PR rtl-optimization/80481
16756 * ira-color.c (get_cap_member): New function.
16757 (allocnos_conflict_by_live_ranges_p): Use it.
16758 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16759 (setup_slot_coalesced_allocno_live_ranges): Ditto.
16760
16761 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
16762
16763 PR target/83628
16764 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16765 (*saddl_se_1): Ditto.
16766 (*ssubsi_1): Ditto.
16767 (*ssubl_se_1): Ditto.
16768
16769 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16770
16771 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16772 rather than wi::to_widest for DR_INITs.
16773 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16774 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16775 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16776 INTEGER_CSTs.
16777 (vect_analyze_group_access_1): Note that here.
16778
16779 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16780
16781 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16782 polynomial type sizes.
16783
16784 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16785
16786 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16787 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16788 (gimple_add_tmp_var): Likewise.
16789
16790 2018-01-12 Martin Liska <mliska@suse.cz>
16791
16792 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16793 (gimple_alloc_sizes): Likewise.
16794 (dump_gimple_statistics): Use PRIu64 in printf format.
16795 * gimple.h: Change uint64_t to int.
16796
16797 2018-01-12 Martin Liska <mliska@suse.cz>
16798
16799 * tree-core.h: Use uint64_t instead of int.
16800 * tree.c (tree_node_counts): Likewise.
16801 (tree_node_sizes): Likewise.
16802 (dump_tree_statistics): Use PRIu64 in printf format.
16803
16804 2018-01-12 Martin Liska <mliska@suse.cz>
16805
16806 * Makefile.in: As qsort_chk is implemented in vec.c, add
16807 vec.o to linkage of gencfn-macros.
16808 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16809 passing the info to record_node_allocation_statistics.
16810 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16811 and pass the info.
16812 * ggc-common.c (struct ggc_usage): Add operator== and use
16813 it in operator< and compare function.
16814 * mem-stats.h (struct mem_usage): Likewise.
16815 * vec.c (struct vec_usage): Remove operator< and compare
16816 function. Can be simply inherited.
16817
16818 2018-01-12 Martin Jambor <mjambor@suse.cz>
16819
16820 PR target/81616
16821 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16822 * tree-ssa-math-opts.c: Include domwalk.h.
16823 (convert_mult_to_fma_1): New function.
16824 (fma_transformation_info): New type.
16825 (fma_deferring_state): Likewise.
16826 (cancel_fma_deferring): New function.
16827 (result_of_phi): Likewise.
16828 (last_fma_candidate_feeds_initial_phi): Likewise.
16829 (convert_mult_to_fma): Added deferring logic, split actual
16830 transformation to convert_mult_to_fma_1.
16831 (math_opts_dom_walker): New type.
16832 (math_opts_dom_walker::after_dom_children): New method, body moved
16833 here from pass_optimize_widening_mul::execute, added deferring logic
16834 bits.
16835 (pass_optimize_widening_mul::execute): Moved most of code to
16836 math_opts_dom_walker::after_dom_children.
16837 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16838 * config/i386/i386.c (ix86_option_override_internal): Added
16839 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16840
16841 2018-01-12 Richard Biener <rguenther@suse.de>
16842
16843 PR debug/83157
16844 * dwarf2out.c (gen_variable_die): Do not reset old_die for
16845 inline instance vars.
16846
16847 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
16848
16849 PR target/81819
16850 * config/rx/rx.c (rx_is_restricted_memory_address):
16851 Handle SUBREG case.
16852
16853 2018-01-12 Richard Biener <rguenther@suse.de>
16854
16855 PR tree-optimization/80846
16856 * target.def (split_reduction): New target hook.
16857 * targhooks.c (default_split_reduction): New function.
16858 * targhooks.h (default_split_reduction): Declare.
16859 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16860 target requests first reduce vectors by combining low and high
16861 parts.
16862 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16863 (get_vectype_for_scalar_type_and_size): Export.
16864 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16865 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16866 * doc/tm.texi: Regenerate.
16867 * config/i386/i386.c (ix86_split_reduction): Implement
16868 TARGET_VECTORIZE_SPLIT_REDUCTION.
16869
16870 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16871
16872 PR target/83368
16873 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16874 in PIC mode except for TARGET_VXWORKS_RTP.
16875 * config/sparc/sparc.c: Include cfgrtl.h.
16876 (TARGET_INIT_PIC_REG): Define.
16877 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16878 (sparc_pic_register_p): New predicate.
16879 (sparc_legitimate_address_p): Use it.
16880 (sparc_legitimize_pic_address): Likewise.
16881 (sparc_delegitimize_address): Likewise.
16882 (sparc_mode_dependent_address_p): Likewise.
16883 (gen_load_pcrel_sym): Remove 4th parameter.
16884 (load_got_register): Adjust call to above. Remove obsolete stuff.
16885 (sparc_expand_prologue): Do not call load_got_register here.
16886 (sparc_flat_expand_prologue): Likewise.
16887 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16888 (sparc_use_pseudo_pic_reg): New function.
16889 (sparc_init_pic_reg): Likewise.
16890 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16891 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16892
16893 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
16894
16895 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16896 Add item for branch_cost.
16897
16898 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16899
16900 PR rtl-optimization/83565
16901 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16902 not extend the result to a larger mode for rotate operations.
16903 (num_sign_bit_copies1): Likewise.
16904
16905 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16906
16907 PR target/40411
16908 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16909 -symbolic.
16910 Use values-Xc.o for -pedantic.
16911 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16912
16913 2018-01-12 Martin Liska <mliska@suse.cz>
16914
16915 PR ipa/83054
16916 * ipa-devirt.c (final_warning_record::grow_type_warnings):
16917 New function.
16918 (possible_polymorphic_call_targets): Use it.
16919 (ipa_devirt): Likewise.
16920
16921 2018-01-12 Martin Liska <mliska@suse.cz>
16922
16923 * profile-count.h (enum profile_quality): Use 0 as invalid
16924 enum value of profile_quality.
16925
16926 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
16927
16928 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16929 -mext-string options.
16930
16931 2018-01-12 Richard Biener <rguenther@suse.de>
16932
16933 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16934 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16935 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16936 Likewise.
16937 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16938
16939 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16940
16941 * configure.ac (--with-long-double-format): Add support for the
16942 configuration option to change the default long double format on
16943 PowerPC systems.
16944 * config.gcc (powerpc*-linux*-*): Likewise.
16945 * configure: Regenerate.
16946 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16947 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16948 used without modification.
16949
16950 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16951
16952 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16953 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16954 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16955 MISC_BUILTIN_SPEC_BARRIER.
16956 (rs6000_init_builtins): Likewise.
16957 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16958 enum value.
16959 (speculation_barrier): New define_insn.
16960 * doc/extend.texi: Document __builtin_speculation_barrier.
16961
16962 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16963
16964 PR target/83203
16965 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16966 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16967 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16968 iterators.
16969 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
16970 integral modes instead of "ss" and "sd".
16971 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16972 vectors with 32-bit and 64-bit elements.
16973 (vecdupssescalarmodesuffix): New mode attribute.
16974 (vec_dup<mode>): Use it.
16975
16976 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
16977
16978 PR target/83330
16979 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16980 frame if argument is passed on stack.
16981
16982 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16983
16984 PR target/82682
16985 * ree.c (combine_reaching_defs): Optimize also
16986 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16987 reg2=any_extend(exp); reg1=reg2;, formatting fix.
16988
16989 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16990
16991 PR middle-end/83189
16992 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16993
16994 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16995
16996 PR middle-end/83718
16997 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16998 after they are computed.
16999
17000 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17001
17002 PR tree-optimization/83695
17003 * gimple-loop-linterchange.cc
17004 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17005 reset cached scev information after interchange.
17006 (pass_linterchange::execute): Remove call to scev_reset_htab.
17007
17008 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17009
17010 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17011 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17012 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17013 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17014 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17015 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17016 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17017 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17018 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17019 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17020 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17021 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17022 (V_lane_reg): Likewise.
17023 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17024 New define_expand.
17025 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17026 (vfmal_lane_low<mode>_intrinsic,
17027 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17028 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17029 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17030 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17031 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17032 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17033
17034 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17035
17036 * config/arm/arm-cpus.in (fp16fml): New feature.
17037 (ALL_SIMD): Add fp16fml.
17038 (armv8.2-a): Add fp16fml as an option.
17039 (armv8.3-a): Likewise.
17040 (armv8.4-a): Add fp16fml as part of fp16.
17041 * config/arm/arm.h (TARGET_FP16FML): Define.
17042 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17043 when appropriate.
17044 * config/arm/arm-modes.def (V2HF): Define.
17045 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17046 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17047 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17048 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17049 vfmsl_low, vfmsl_high): New set of builtins.
17050 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17051 (vfml_op): New code attribute.
17052 (VFMLHALVES): New int iterator.
17053 (VFML, VFMLSEL): New mode attributes.
17054 (V_reg): Define mapping for V2HF.
17055 (V_hi, V_lo): New mode attributes.
17056 (VF_constraint): Likewise.
17057 (vfml_half, vfml_half_selector): New int attributes.
17058 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17059 define_expand.
17060 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17061 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17062 New define_insn.
17063 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17064 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17065 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17066 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17067 documentation.
17068 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17069 Document new effective target and option set.
17070
17071 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17072
17073 * config/arm/arm-cpus.in (armv8_4): New feature.
17074 (ARMv8_4a): New fgroup.
17075 (armv8.4-a): New arch.
17076 * config/arm/arm-tables.opt: Regenerate.
17077 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17078 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17079 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17080 Add matching rules for -march=armv8.4-a and extensions.
17081 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17082
17083 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17084
17085 PR target/81821
17086 * config/rx/rx.md (BW): New mode attribute.
17087 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17088
17089 2018-01-11 Richard Biener <rguenther@suse.de>
17090
17091 PR tree-optimization/83435
17092 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17093 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17094 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17095
17096 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17097 Alan Hayward <alan.hayward@arm.com>
17098 David Sherwood <david.sherwood@arm.com>
17099
17100 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17101 field.
17102 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17103 (aarch64_print_address_internal): Use it to check for a zero offset.
17104
17105 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17106 Alan Hayward <alan.hayward@arm.com>
17107 David Sherwood <david.sherwood@arm.com>
17108
17109 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17110 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17111 Return a poly_int64 rather than a HOST_WIDE_INT.
17112 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17113 rather than a HOST_WIDE_INT.
17114 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17115 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17116 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17117 final_offset from HOST_WIDE_INT to poly_int64.
17118 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17119 to_constant when getting the number of units in an Advanced SIMD
17120 mode.
17121 (aarch64_builtin_vectorized_function): Check for a constant number
17122 of units.
17123 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17124 GET_MODE_SIZE.
17125 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17126 attribute instead of GET_MODE_NUNITS.
17127 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17128 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17129 GET_MODE_SIZE for fixed-size registers.
17130 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17131 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17132 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17133 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17134 (aarch64_print_operand, aarch64_print_address_internal)
17135 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17136 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17137 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17138 Handle polynomial GET_MODE_SIZE.
17139 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17140 wider than SImode without modification.
17141 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17142 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17143 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17144 passing and returning SVE modes.
17145 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17146 rather than GEN_INT.
17147 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17148 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17149 (aarch64_allocate_and_probe_stack_space): Likewise.
17150 (aarch64_layout_frame): Cope with polynomial offsets.
17151 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17152 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17153 polynomial offsets.
17154 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17155 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17156 poly_int64 rather than a HOST_WIDE_INT.
17157 (aarch64_get_separate_components, aarch64_process_components)
17158 (aarch64_expand_prologue, aarch64_expand_epilogue)
17159 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17160 (aarch64_anchor_offset): New function, split out from...
17161 (aarch64_legitimize_address): ...here.
17162 (aarch64_builtin_vectorization_cost): Handle polynomial
17163 TYPE_VECTOR_SUBPARTS.
17164 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17165 GET_MODE_NUNITS.
17166 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17167 number of elements from the PARALLEL rather than the mode.
17168 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17169 rather than GET_MODE_BITSIZE.
17170 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17171 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17172 (aarch64_expand_vec_perm_const_1): Handle polynomial
17173 d->perm.length () and d->perm elements.
17174 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17175 Apply to_constant to d->perm elements.
17176 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17177 polynomial CONST_VECTOR_NUNITS.
17178 (aarch64_move_pointer): Take amount as a poly_int64 rather
17179 than an int.
17180 (aarch64_progress_pointer): Avoid temporary variable.
17181 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17182 the mode attribute instead of GET_MODE.
17183
17184 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17185 Alan Hayward <alan.hayward@arm.com>
17186 David Sherwood <david.sherwood@arm.com>
17187
17188 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17189 x exists before using it.
17190 (aarch64_add_constant_internal): Rename to...
17191 (aarch64_add_offset_1): ...this. Replace regnum with separate
17192 src and dest rtxes. Handle the case in which they're different,
17193 including when the offset is zero. Replace scratchreg with an rtx.
17194 Use 2 additions if there is no spare register into which we can
17195 move a 16-bit constant.
17196 (aarch64_add_constant): Delete.
17197 (aarch64_add_offset): Replace reg with separate src and dest
17198 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17199 Use aarch64_add_offset_1.
17200 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17201 an rtx rather than an int. Take the delta as a poly_int64
17202 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17203 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17204 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17205 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17206 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17207 and aarch64_add_sp.
17208 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17209 aarch64_add_constant.
17210
17211 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17212
17213 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17214 Use scalar_float_mode.
17215
17216 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17217
17218 * config/aarch64/aarch64-simd.md
17219 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17220 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17221 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17222 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17223 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17224 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17225 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17226 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17227 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17228 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17229
17230 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17231
17232 PR target/83514
17233 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17234 targ_options->x_arm_arch_string is non NULL.
17235
17236 2018-01-11 Tamar Christina <tamar.christina@arm.com>
17237
17238 * config/aarch64/aarch64.h
17239 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
17240
17241 2018-01-11 Sudakshina Das <sudi.das@arm.com>
17242
17243 PR target/82096
17244 * expmed.c (emit_store_flag_force): Swap if const op0
17245 and change VOIDmode to mode of op0.
17246
17247 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17248
17249 PR rtl-optimization/83761
17250 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17251 than bytes to mode_for_size.
17252
17253 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17254
17255 PR middle-end/83189
17256 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17257 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17258 profile.
17259
17260 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17261
17262 PR middle-end/83575
17263 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17264 when in layout mode.
17265 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17266 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17267 partition fixup.
17268
17269 2018-01-10 Michael Collison <michael.collison@arm.com>
17270
17271 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17272 * config/aarch64/aarch64-option-extension.def: Add
17273 AARCH64_OPT_EXTENSION of 'fp16fml'.
17274 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17275 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17276 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17277 * config/aarch64/constraints.md (Ui7): New constraint.
17278 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17279 (VFMLA_SEL_W): Ditto.
17280 (f16quad): Ditto.
17281 (f16mac1): Ditto.
17282 (VFMLA16_LOW): New int iterator.
17283 (VFMLA16_HIGH): Ditto.
17284 (UNSPEC_FMLAL): New unspec.
17285 (UNSPEC_FMLSL): Ditto.
17286 (UNSPEC_FMLAL2): Ditto.
17287 (UNSPEC_FMLSL2): Ditto.
17288 (f16mac): New code attribute.
17289 * config/aarch64/aarch64-simd-builtins.def
17290 (aarch64_fmlal_lowv2sf): Ditto.
17291 (aarch64_fmlsl_lowv2sf): Ditto.
17292 (aarch64_fmlalq_lowv4sf): Ditto.
17293 (aarch64_fmlslq_lowv4sf): Ditto.
17294 (aarch64_fmlal_highv2sf): Ditto.
17295 (aarch64_fmlsl_highv2sf): Ditto.
17296 (aarch64_fmlalq_highv4sf): Ditto.
17297 (aarch64_fmlslq_highv4sf): Ditto.
17298 (aarch64_fmlal_lane_lowv2sf): Ditto.
17299 (aarch64_fmlsl_lane_lowv2sf): Ditto.
17300 (aarch64_fmlal_laneq_lowv2sf): Ditto.
17301 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17302 (aarch64_fmlalq_lane_lowv4sf): Ditto.
17303 (aarch64_fmlsl_lane_lowv4sf): Ditto.
17304 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17305 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17306 (aarch64_fmlal_lane_highv2sf): Ditto.
17307 (aarch64_fmlsl_lane_highv2sf): Ditto.
17308 (aarch64_fmlal_laneq_highv2sf): Ditto.
17309 (aarch64_fmlsl_laneq_highv2sf): Ditto.
17310 (aarch64_fmlalq_lane_highv4sf): Ditto.
17311 (aarch64_fmlsl_lane_highv4sf): Ditto.
17312 (aarch64_fmlalq_laneq_highv4sf): Ditto.
17313 (aarch64_fmlsl_laneq_highv4sf): Ditto.
17314 * config/aarch64/aarch64-simd.md:
17315 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17316 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17317 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17318 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17319 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17320 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17321 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17322 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17323 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17324 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17325 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17326 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17327 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17328 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17329 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17330 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17331 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17332 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17333 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17334 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17335 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17336 (vfmlsl_low_u32): Ditto.
17337 (vfmlalq_low_u32): Ditto.
17338 (vfmlslq_low_u32): Ditto.
17339 (vfmlal_high_u32): Ditto.
17340 (vfmlsl_high_u32): Ditto.
17341 (vfmlalq_high_u32): Ditto.
17342 (vfmlslq_high_u32): Ditto.
17343 (vfmlal_lane_low_u32): Ditto.
17344 (vfmlsl_lane_low_u32): Ditto.
17345 (vfmlal_laneq_low_u32): Ditto.
17346 (vfmlsl_laneq_low_u32): Ditto.
17347 (vfmlalq_lane_low_u32): Ditto.
17348 (vfmlslq_lane_low_u32): Ditto.
17349 (vfmlalq_laneq_low_u32): Ditto.
17350 (vfmlslq_laneq_low_u32): Ditto.
17351 (vfmlal_lane_high_u32): Ditto.
17352 (vfmlsl_lane_high_u32): Ditto.
17353 (vfmlal_laneq_high_u32): Ditto.
17354 (vfmlsl_laneq_high_u32): Ditto.
17355 (vfmlalq_lane_high_u32): Ditto.
17356 (vfmlslq_lane_high_u32): Ditto.
17357 (vfmlalq_laneq_high_u32): Ditto.
17358 (vfmlslq_laneq_high_u32): Ditto.
17359 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17360 (AARCH64_FL_FOR_ARCH8_4): New.
17361 (AARCH64_ISA_F16FML): New ISA flag.
17362 (TARGET_F16FML): New feature flag for fp16fml.
17363 (doc/invoke.texi): Document new fp16fml option.
17364
17365 2018-01-10 Michael Collison <michael.collison@arm.com>
17366
17367 * config/aarch64/aarch64-builtins.c:
17368 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17369 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17370 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17371 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17372 (AARCH64_ISA_SHA3): New ISA flag.
17373 (TARGET_SHA3): New feature flag for sha3.
17374 * config/aarch64/iterators.md (sha512_op): New int attribute.
17375 (CRYPTO_SHA512): New int iterator.
17376 (UNSPEC_SHA512H): New unspec.
17377 (UNSPEC_SHA512H2): Ditto.
17378 (UNSPEC_SHA512SU0): Ditto.
17379 (UNSPEC_SHA512SU1): Ditto.
17380 * config/aarch64/aarch64-simd-builtins.def
17381 (aarch64_crypto_sha512hqv2di): New builtin.
17382 (aarch64_crypto_sha512h2qv2di): Ditto.
17383 (aarch64_crypto_sha512su0qv2di): Ditto.
17384 (aarch64_crypto_sha512su1qv2di): Ditto.
17385 (aarch64_eor3qv8hi): Ditto.
17386 (aarch64_rax1qv2di): Ditto.
17387 (aarch64_xarqv2di): Ditto.
17388 (aarch64_bcaxqv8hi): Ditto.
17389 * config/aarch64/aarch64-simd.md:
17390 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17391 (aarch64_crypto_sha512su0qv2di): Ditto.
17392 (aarch64_crypto_sha512su1qv2di): Ditto.
17393 (aarch64_eor3qv8hi): Ditto.
17394 (aarch64_rax1qv2di): Ditto.
17395 (aarch64_xarqv2di): Ditto.
17396 (aarch64_bcaxqv8hi): Ditto.
17397 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17398 (vsha512h2q_u64): Ditto.
17399 (vsha512su0q_u64): Ditto.
17400 (vsha512su1q_u64): Ditto.
17401 (veor3q_u16): Ditto.
17402 (vrax1q_u64): Ditto.
17403 (vxarq_u64): Ditto.
17404 (vbcaxq_u16): Ditto.
17405 * config/arm/types.md (crypto_sha512): New type attribute.
17406 (crypto_sha3): Ditto.
17407 (doc/invoke.texi): Document new sha3 option.
17408
17409 2018-01-10 Michael Collison <michael.collison@arm.com>
17410
17411 * config/aarch64/aarch64-builtins.c:
17412 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17413 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17414 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17415 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17416 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17417 (AARCH64_ISA_SM4): New ISA flag.
17418 (TARGET_SM4): New feature flag for sm4.
17419 * config/aarch64/aarch64-simd-builtins.def
17420 (aarch64_sm3ss1qv4si): Ditto.
17421 (aarch64_sm3tt1aq4si): Ditto.
17422 (aarch64_sm3tt1bq4si): Ditto.
17423 (aarch64_sm3tt2aq4si): Ditto.
17424 (aarch64_sm3tt2bq4si): Ditto.
17425 (aarch64_sm3partw1qv4si): Ditto.
17426 (aarch64_sm3partw2qv4si): Ditto.
17427 (aarch64_sm4eqv4si): Ditto.
17428 (aarch64_sm4ekeyqv4si): Ditto.
17429 * config/aarch64/aarch64-simd.md:
17430 (aarch64_sm3ss1qv4si): Ditto.
17431 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17432 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17433 (aarch64_sm4eqv4si): Ditto.
17434 (aarch64_sm4ekeyqv4si): Ditto.
17435 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17436 (sm3part_op): Ditto.
17437 (CRYPTO_SM3TT): Ditto.
17438 (CRYPTO_SM3PART): Ditto.
17439 (UNSPEC_SM3SS1): New unspec.
17440 (UNSPEC_SM3TT1A): Ditto.
17441 (UNSPEC_SM3TT1B): Ditto.
17442 (UNSPEC_SM3TT2A): Ditto.
17443 (UNSPEC_SM3TT2B): Ditto.
17444 (UNSPEC_SM3PARTW1): Ditto.
17445 (UNSPEC_SM3PARTW2): Ditto.
17446 (UNSPEC_SM4E): Ditto.
17447 (UNSPEC_SM4EKEY): Ditto.
17448 * config/aarch64/constraints.md (Ui2): New constraint.
17449 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17450 * config/arm/types.md (crypto_sm3): New type attribute.
17451 (crypto_sm4): Ditto.
17452 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
17453 (vsm3tt1aq_u32): Ditto.
17454 (vsm3tt1bq_u32): Ditto.
17455 (vsm3tt2aq_u32): Ditto.
17456 (vsm3tt2bq_u32): Ditto.
17457 (vsm3partw1q_u32): Ditto.
17458 (vsm3partw2q_u32): Ditto.
17459 (vsm4eq_u32): Ditto.
17460 (vsm4ekeyq_u32): Ditto.
17461 (doc/invoke.texi): Document new sm4 option.
17462
17463 2018-01-10 Michael Collison <michael.collison@arm.com>
17464
17465 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
17466 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
17467 (AARCH64_FL_FOR_ARCH8_4): New.
17468 (AARCH64_FL_V8_4): New flag.
17469 (doc/invoke.texi): Document new armv8.4-a option.
17470
17471 2018-01-10 Michael Collison <michael.collison@arm.com>
17472
17473 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17474 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
17475 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
17476 * config/aarch64/aarch64-option-extension.def: Add
17477 AARCH64_OPT_EXTENSION of 'sha2'.
17478 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
17479 (crypto): Disable sha2 and aes if crypto disabled.
17480 (crypto): Enable aes and sha2 if enabled.
17481 (simd): Disable sha2 and aes if simd disabled.
17482 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
17483 New flags.
17484 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
17485 (TARGET_SHA2): New feature flag for sha2.
17486 (TARGET_AES): New feature flag for aes.
17487 * config/aarch64/aarch64-simd.md:
17488 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
17489 conditional on TARGET_AES.
17490 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
17491 (aarch64_crypto_sha1hsi): Make pattern conditional
17492 on TARGET_SHA2.
17493 (aarch64_crypto_sha1hv4si): Ditto.
17494 (aarch64_be_crypto_sha1hv4si): Ditto.
17495 (aarch64_crypto_sha1su1v4si): Ditto.
17496 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17497 (aarch64_crypto_sha1su0v4si): Ditto.
17498 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17499 (aarch64_crypto_sha256su0v4si): Ditto.
17500 (aarch64_crypto_sha256su1v4si): Ditto.
17501 (doc/invoke.texi): Document new aes and sha2 options.
17502
17503 2018-01-10 Martin Sebor <msebor@redhat.com>
17504
17505 PR tree-optimization/83781
17506 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17507 as string arrays.
17508
17509 2018-01-11 Martin Sebor <msebor@gmail.com>
17510 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17511
17512 PR tree-optimization/83501
17513 PR tree-optimization/81703
17514
17515 * tree-ssa-strlen.c (get_string_cst): Rename...
17516 (get_string_len): ...to this. Handle global constants.
17517 (handle_char_store): Adjust.
17518
17519 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
17520 Jim Wilson <jimw@sifive.com>
17521
17522 * config/riscv/riscv-protos.h (riscv_output_return): New.
17523 * config/riscv/riscv.c (struct machine_function): New naked_p field.
17524 (riscv_attribute_table, riscv_output_return),
17525 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17526 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17527 (riscv_compute_frame_info): Only compute frame->mask if not a naked
17528 function.
17529 (riscv_expand_prologue): Add early return for naked function.
17530 (riscv_expand_epilogue): Likewise.
17531 (riscv_function_ok_for_sibcall): Return false for naked function.
17532 (riscv_set_current_function): New.
17533 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17534 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17535 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17536 * doc/extend.texi (RISC-V Function Attributes): New.
17537
17538 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17539
17540 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17541 check for 128-bit long double before checking TCmode.
17542 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17543 128-bit long doubles before checking TFmode or TCmode.
17544 (FLOAT128_IBM_P): Likewise.
17545
17546 2018-01-10 Martin Sebor <msebor@redhat.com>
17547
17548 PR tree-optimization/83671
17549 * builtins.c (c_strlen): Unconditionally return zero for the empty
17550 string.
17551 Use -Warray-bounds for warnings.
17552 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17553 for non-constant array indices with COMPONENT_REF, arrays of
17554 arrays, and pointers to arrays.
17555 (gimple_fold_builtin_strlen): Determine and set length range for
17556 non-constant character arrays.
17557
17558 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
17559
17560 PR middle-end/81897
17561 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17562 empty blocks.
17563
17564 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
17565
17566 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17567
17568 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17569
17570 PR target/83399
17571 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17572 VECTOR_MEM_ALTIVEC_OR_VSX_P.
17573 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17574 indexed_or_indirect_operand predicate.
17575 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17576 (*vsx_le_perm_load_v8hi): Likewise.
17577 (*vsx_le_perm_load_v16qi): Likewise.
17578 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17579 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17580 (*vsx_le_perm_store_v8hi): Likewise.
17581 (*vsx_le_perm_store_v16qi): Likewise.
17582 (eight unnamed splitters): Likewise.
17583
17584 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17585
17586 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17587 * config/rs6000/emmintrin.h: Likewise.
17588 * config/rs6000/mmintrin.h: Likewise.
17589 * config/rs6000/xmmintrin.h: Likewise.
17590
17591 2018-01-10 David Malcolm <dmalcolm@redhat.com>
17592
17593 PR c++/43486
17594 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17595 "public_flag".
17596 * tree.c (tree_nop_conversion): Return true for location wrapper
17597 nodes.
17598 (maybe_wrap_with_location): New function.
17599 (selftest::check_strip_nops): New function.
17600 (selftest::test_location_wrappers): New function.
17601 (selftest::tree_c_tests): Call it.
17602 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17603 (maybe_wrap_with_location): New decl.
17604 (EXPR_LOCATION_WRAPPER_P): New macro.
17605 (location_wrapper_p): New inline function.
17606 (tree_strip_any_location_wrapper): New inline function.
17607
17608 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
17609
17610 PR target/83735
17611 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17612 stack_realign_offset for the largest alignment of stack slot
17613 actually used.
17614 (ix86_find_max_used_stack_alignment): New function.
17615 (ix86_finalize_stack_frame_flags): Use it. Set
17616 max_used_stack_alignment if we don't realign stack.
17617 * config/i386/i386.h (machine_function): Add
17618 max_used_stack_alignment.
17619
17620 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
17621
17622 * config/arm/arm.opt (-mbranch-cost): New option.
17623 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17624 account.
17625
17626 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
17627
17628 PR target/83629
17629 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17630 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17631
17632 2018-01-10 Richard Biener <rguenther@suse.de>
17633
17634 PR debug/83765
17635 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17636 early out so it also covers the case where we have a non-NULL
17637 origin.
17638
17639 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17640
17641 PR tree-optimization/83753
17642 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17643 for non-strided grouped accesses if the number of elements is 1.
17644
17645 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17646
17647 PR target/81616
17648 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17649 * i386.h (TARGET_USE_GATHER): Define.
17650 * x86-tune.def (X86_TUNE_USE_GATHER): New.
17651
17652 2018-01-10 Martin Liska <mliska@suse.cz>
17653
17654 PR bootstrap/82831
17655 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17656 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17657 partitioning.
17658 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17659 CLEANUP_NO_PARTITIONING is not set.
17660
17661 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17662
17663 * doc/rtl.texi: Remove documentation of (const ...) wrappers
17664 for vectors, as a partial revert of r254296.
17665 * rtl.h (const_vec_p): Delete.
17666 (const_vec_duplicate_p): Don't test for vector CONSTs.
17667 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17668 * expmed.c (make_tree): Likewise.
17669
17670 Revert:
17671 * common.md (E, F): Use CONSTANT_P instead of checking for
17672 CONST_VECTOR.
17673 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17674 checking for CONST_VECTOR.
17675
17676 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17677
17678 PR middle-end/83575
17679 * predict.c (force_edge_cold): Handle in more sane way edges
17680 with no prediction.
17681
17682 2018-01-09 Carl Love <cel@us.ibm.com>
17683
17684 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17685 V4SI, V4SF types.
17686 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17687 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17688 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17689 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
17690 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17691 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
17692 * config/rs6000/rs6000-protos.h: Add extern defition for
17693 rs6000_generate_float2_double_code.
17694 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17695 function.
17696 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17697 (float2_v2df): Add define_expand.
17698
17699 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
17700
17701 PR target/83628
17702 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17703 op_mode in the force_to_mode call.
17704
17705 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17706
17707 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17708 instead of checking each element individually.
17709 (aarch64_evpc_uzp): Likewise.
17710 (aarch64_evpc_zip): Likewise.
17711 (aarch64_evpc_ext): Likewise.
17712 (aarch64_evpc_rev): Likewise.
17713 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17714 instead of checking each element individually. Return true without
17715 generating rtl if
17716 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17717 whether all selected elements come from the same input, instead of
17718 checking each element individually. Remove calls to gen_rtx_REG,
17719 start_sequence and end_sequence and instead assert that no rtl is
17720 generated.
17721
17722 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17723
17724 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17725 order of HIGH and CONST checks.
17726
17727 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17728
17729 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17730 if the destination isn't an SSA_NAME.
17731
17732 2018-01-09 Richard Biener <rguenther@suse.de>
17733
17734 PR tree-optimization/83668
17735 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17736 move prologue...
17737 (canonicalize_loop_form): ... here, renamed from ...
17738 (canonicalize_loop_closed_ssa_form): ... this and amended to
17739 swap successor edges for loop exit blocks to make us use
17740 the RPO order we need for initial schedule generation.
17741
17742 2018-01-09 Joseph Myers <joseph@codesourcery.com>
17743
17744 PR tree-optimization/64811
17745 * match.pd: When optimizing comparisons with Inf, avoid
17746 introducing or losing exceptions from comparisons with NaN.
17747
17748 2018-01-09 Martin Liska <mliska@suse.cz>
17749
17750 PR sanitizer/82517
17751 * asan.c (shadow_mem_size): Add gcc_assert.
17752
17753 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
17754
17755 Don't save registers in main().
17756
17757 PR target/83738
17758 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17759 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17760 * config/avr/avr.c (avr_set_current_function): Don't error if
17761 naked, OS_task or OS_main are specified at the same time.
17762 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17763 OS_main.
17764 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17765 attribute.
17766 * common/config/avr/avr-common.c (avr_option_optimization_table):
17767 Switch on -mmain-is-OS_task for optimizing compilations.
17768
17769 2018-01-09 Richard Biener <rguenther@suse.de>
17770
17771 PR tree-optimization/83572
17772 * graphite.c: Include cfganal.h.
17773 (graphite_transform_loops): Connect infinite loops to exit
17774 and remove fake edges at the end.
17775
17776 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17777
17778 * ipa-inline.c (edge_badness): Revert accidental checkin.
17779
17780 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17781
17782 PR ipa/80763
17783 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17784 symbols; not inline clones.
17785
17786 2018-01-09 Jakub Jelinek <jakub@redhat.com>
17787
17788 PR target/83507
17789 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17790 hard registers. Formatting fixes.
17791
17792 PR preprocessor/83722
17793 * gcc.c (try_generate_repro): Pass
17794 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17795 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17796 do_report_bug.
17797
17798 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
17799 Kito Cheng <kito.cheng@gmail.com>
17800
17801 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17802 (riscv_leaf_function_p): Delete.
17803 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17804
17805 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17806
17807 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17808 function.
17809 (do_ifelse): New function.
17810 (do_isel): New function.
17811 (do_sub3): New function.
17812 (do_add3): New function.
17813 (do_load_mask_compare): New function.
17814 (do_overlap_load_compare): New function.
17815 (expand_compare_loop): New function.
17816 (expand_block_compare): Call expand_compare_loop() when appropriate.
17817 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17818 option description.
17819 (-mblock-compare-inline-loop-limit): New option.
17820
17821 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17822
17823 PR target/83677
17824 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17825 Reverse order of second and third operands in first alternative.
17826 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17827 of first and second elements in UNSPEC_VPERMR vector.
17828 (altivec_expand_vec_perm_le): Likewise.
17829
17830 2018-01-08 Jeff Law <law@redhat.com>
17831
17832 PR rtl-optimizatin/81308
17833 * tree-switch-conversion.c (cfg_altered): New file scoped static.
17834 (process_switch): If group_case_labels makes a change, then set
17835 cfg_altered.
17836 (pass_convert_switch::execute): If a switch is converted, then
17837 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
17838
17839 PR rtl-optimization/81308
17840 * recog.c (split_all_insns): Conditionally cleanup the CFG after
17841 splitting insns.
17842
17843 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
17844
17845 PR target/83663 - Revert r255946
17846 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17847 generation for cases where splatting a value is not useful.
17848 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17849 across a vec_duplicate and a paradoxical subreg forming a vector
17850 mode to a vec_concat.
17851
17852 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17853
17854 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17855 -march=armv8.3-a variants.
17856 * config/arm/t-multilib: Likewise.
17857 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
17858
17859 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17860
17861 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17862 to generate rtl.
17863 (cceq_ior_compare_complement): Give it a name so I can use it, and
17864 change boolean_or_operator predicate to boolean_operator so it can
17865 be used to generate a crand.
17866 (eqne): New code iterator.
17867 (bd/bd_neg): New code_attrs.
17868 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17869 a single define_insn.
17870 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17871 decrement (bdnzt/bdnzf/bdzt/bdzf).
17872 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17873 with the new names of the branch decrement patterns, and added the
17874 names of the branch decrement conditional patterns.
17875
17876 2018-01-08 Richard Biener <rguenther@suse.de>
17877
17878 PR tree-optimization/83563
17879 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17880 cache.
17881
17882 2018-01-08 Richard Biener <rguenther@suse.de>
17883
17884 PR middle-end/83713
17885 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17886
17887 2018-01-08 Richard Biener <rguenther@suse.de>
17888
17889 PR tree-optimization/83685
17890 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17891 references to abnormals.
17892
17893 2018-01-08 Richard Biener <rguenther@suse.de>
17894
17895 PR lto/83719
17896 * dwarf2out.c (output_indirect_strings): Handle empty
17897 skeleton_debug_str_hash.
17898 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17899
17900 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17901
17902 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17903 (emit_store_direct): Likewise.
17904 (arc_trampoline_adjust_address): Likewise.
17905 (arc_asm_trampoline_template): New function.
17906 (arc_initialize_trampoline): Use asm_trampoline_template.
17907 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17908 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17909 * config/arc/arc.md (flush_icache): Delete pattern.
17910
17911 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17912
17913 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17914 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17915 munaligned-access.
17916
17917 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17918
17919 PR target/83681
17920 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17921 by not USED_FOR_TARGET.
17922 (make_pass_resolve_sw_modes): Likewise.
17923
17924 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17925
17926 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17927 USED_FOR_TARGET.
17928
17929 2018-01-08 Richard Biener <rguenther@suse.de>
17930
17931 PR middle-end/83580
17932 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17933
17934 2018-01-08 Richard Biener <rguenther@suse.de>
17935
17936 PR middle-end/83517
17937 * match.pd ((t * 2) / 2) -> t): Add missing :c.
17938
17939 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
17940
17941 PR middle-end/81897
17942 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17943 basic blocks with a small number of successors.
17944 (convert_control_dep_chain_into_preds): Improve handling of
17945 forwarder blocks.
17946 (dump_predicates): Split apart into...
17947 (dump_pred_chain): ...here...
17948 (dump_pred_info): ...and here.
17949 (can_one_predicate_be_invalidated_p): Add debugging printfs.
17950 (can_chain_union_be_invalidated_p): Improve check for invalidation
17951 of paths.
17952 (uninit_uses_cannot_happen): Avoid unnecessary if
17953 convert_control_dep_chain_into_preds yielded nothing.
17954
17955 2018-01-06 Martin Sebor <msebor@redhat.com>
17956
17957 PR tree-optimization/83640
17958 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17959 subtracting negative offset from size.
17960 (builtin_access::overlap): Adjust offset bounds of the access to fall
17961 within the size of the object if possible.
17962
17963 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
17964
17965 PR rtl-optimization/83699
17966 * expmed.c (extract_bit_field_1): Restrict the vector usage of
17967 extract_bit_field_as_subreg to cases in which the extracted
17968 value is also a vector.
17969
17970 * lra-constraints.c (process_alt_operands): Test for the equivalence
17971 substitutions when detecting a possible reload cycle.
17972
17973 2018-01-06 Jakub Jelinek <jakub@redhat.com>
17974
17975 PR debug/83480
17976 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17977 by default if flag_selective_schedling{,2}. Formatting fixes.
17978
17979 PR rtl-optimization/83682
17980 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17981 if it has non-VECTOR_MODE element mode.
17982 (vec_duplicate_p): Likewise.
17983
17984 PR middle-end/83694
17985 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17986 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17987
17988 2018-01-05 Jakub Jelinek <jakub@redhat.com>
17989
17990 PR target/83604
17991 * config/i386/i386-builtin.def
17992 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17993 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17994 Require also OPTION_MASK_ISA_AVX512F in addition to
17995 OPTION_MASK_ISA_GFNI.
17996 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17997 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17998 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17999 to OPTION_MASK_ISA_GFNI.
18000 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18001 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18002 OPTION_MASK_ISA_AVX512BW.
18003 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18004 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18005 addition to OPTION_MASK_ISA_GFNI.
18006 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18007 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18008 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18009 to OPTION_MASK_ISA_GFNI.
18010 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18011 a requirement for all ISAs rather than any of them with a few
18012 exceptions.
18013 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18014 processing.
18015 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18016 bitmasks to be enabled with 3 exceptions, instead of requiring any
18017 enabled ISA with lots of exceptions.
18018 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18019 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18020 Change avx512bw in isa attribute to avx512f.
18021 * config/i386/sgxintrin.h: Add license boilerplate.
18022 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18023 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18024 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18025 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18026 defined.
18027 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18028 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18029 temporarily sse2 rather than sse if not enabled already.
18030
18031 PR target/83604
18032 * config/i386/sse.md (VI248_VLBW): Rename to ...
18033 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18034 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18035 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18036 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18037 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18038 mode iterator instead of VI248_VLBW.
18039
18040 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18041
18042 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18043 (record_modified): Skip clobbers; add debug output.
18044 (param_change_prob): Use sreal frequencies.
18045
18046 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18047
18048 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18049 punt for user-aligned variables.
18050
18051 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18052
18053 * tree-chrec.c (chrec_contains_symbols): Return true for
18054 POLY_INT_CST.
18055
18056 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18057
18058 PR target/82439
18059 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18060 of (x|y) == x for BICS pattern.
18061
18062 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18063
18064 PR tree-optimization/83605
18065 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18066 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18067 can throw.
18068
18069 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18070
18071 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18072 * config/epiphany/rtems.h: New file.
18073
18074 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18075 Uros Bizjak <ubizjak@gmail.com>
18076
18077 PR target/83554
18078 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18079 QIreg_operand instead of register_operand predicate.
18080 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18081 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18082 comments instead of -fmitigate[-_]rop.
18083
18084 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18085
18086 PR bootstrap/81926
18087 * cgraphunit.c (symbol_table::compile): Switch to text_section
18088 before calling assembly_start debug hook.
18089 * run-rtl-passes.c (run_rtl_passes): Likewise.
18090 Include output.h.
18091
18092 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18093
18094 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18095 range_int_cst_p rather than !symbolic_range_p before calling
18096 extract_range_from_multiplicative_op_1.
18097
18098 2018-01-04 Jeff Law <law@redhat.com>
18099
18100 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18101 redundant test in assertion.
18102
18103 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18104
18105 * doc/rtl.texi: Document machine_mode wrapper classes.
18106
18107 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18108
18109 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18110 using tree_to_uhwi.
18111
18112 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18113
18114 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18115 the VEC_PERM_EXPR fold to fail.
18116
18117 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18118
18119 PR debug/83585
18120 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18121 to switched_sections.
18122
18123 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18124
18125 PR target/83680
18126 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18127 test for d.testing.
18128
18129 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18130
18131 PR target/83387
18132 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18133 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18134
18135 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18136
18137 PR debug/83666
18138 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18139 is BLKmode and bitpos not zero or mode change is needed.
18140
18141 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18142
18143 PR target/83675
18144 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18145 TARGET_VIS2.
18146
18147 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18148
18149 PR target/83628
18150 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18151 instead of MULT rtx. Update all corresponding splitters.
18152 (*saddl_se): Ditto.
18153 (*ssub<modesuffix>): Ditto.
18154 (*ssubl_se): Ditto.
18155 (*cmp_sadd_di): Update split patterns.
18156 (*cmp_sadd_si): Ditto.
18157 (*cmp_sadd_sidi): Ditto.
18158 (*cmp_ssub_di): Ditto.
18159 (*cmp_ssub_si): Ditto.
18160 (*cmp_ssub_sidi): Ditto.
18161 * config/alpha/predicates.md (const23_operand): New predicate.
18162 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18163 Look for ASHIFT, not MULT inner operand.
18164 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18165
18166 2018-01-04 Martin Liska <mliska@suse.cz>
18167
18168 PR gcov-profile/83669
18169 * gcov.c (output_intermediate_file): Add version to intermediate
18170 gcov file.
18171 * doc/gcov.texi: Document new field 'version' in intermediate
18172 file format. Fix location of '-k' option of gcov command.
18173
18174 2018-01-04 Martin Liska <mliska@suse.cz>
18175
18176 PR ipa/82352
18177 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18178
18179 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18180
18181 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18182
18183 2018-01-03 Martin Sebor <msebor@redhat.com>
18184
18185 PR tree-optimization/83655
18186 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18187 checking calls with invalid arguments.
18188
18189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18190
18191 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18192 (vectorizable_mask_load_store): Delete.
18193 (vectorizable_call): Return false for masked loads and stores.
18194 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18195 instead of gimple_assign_rhs1.
18196 (vectorizable_load): Handle IFN_MASK_LOAD.
18197 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18198
18199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18200
18201 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18202 split out from..,
18203 (vectorizable_mask_load_store): ...here.
18204 (vectorizable_load): ...and here.
18205
18206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18207
18208 * tree-vect-stmts.c (vect_build_all_ones_mask)
18209 (vect_build_zero_merge_argument): New functions, split out from...
18210 (vectorizable_load): ...here.
18211
18212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18213
18214 * tree-vect-stmts.c (vect_check_store_rhs): New function,
18215 split out from...
18216 (vectorizable_mask_load_store): ...here.
18217 (vectorizable_store): ...and here.
18218
18219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18220
18221 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18222 split out from...
18223 (vectorizable_mask_load_store): ...here.
18224
18225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18226
18227 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18228 (vect_model_store_cost): Take a vec_load_store_type instead of a
18229 vect_def_type.
18230 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18231 (vect_model_store_cost): Take a vec_load_store_type instead of a
18232 vect_def_type.
18233 (vectorizable_mask_load_store): Update accordingly.
18234 (vectorizable_store): Likewise.
18235 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18236
18237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18238
18239 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18240 IFN_MASK_LOAD calls here rather than...
18241 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18242
18243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18244 Alan Hayward <alan.hayward@arm.com>
18245 David Sherwood <david.sherwood@arm.com>
18246
18247 * expmed.c (extract_bit_field_1): For vector extracts,
18248 fall back to extract_bit_field_as_subreg if vec_extract
18249 isn't available.
18250
18251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18252 Alan Hayward <alan.hayward@arm.com>
18253 David Sherwood <david.sherwood@arm.com>
18254
18255 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18256 they are variable or constant sized.
18257 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18258 slots for constant-sized data.
18259
18260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18261 Alan Hayward <alan.hayward@arm.com>
18262 David Sherwood <david.sherwood@arm.com>
18263
18264 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18265 handling COND_EXPRs with boolean comparisons, try to find a better
18266 basis for the mask type than the boolean itself.
18267
18268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18269
18270 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18271 is calculated and how it can be overridden.
18272 * genmodes.c (max_bitsize_mode_any_mode): New variable.
18273 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18274 if defined.
18275 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18276 if nonzero.
18277
18278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18279 Alan Hayward <alan.hayward@arm.com>
18280 David Sherwood <david.sherwood@arm.com>
18281
18282 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18283 Remove the mode argument.
18284 (aarch64_simd_valid_immediate): Remove the mode and inverse
18285 arguments.
18286 * config/aarch64/iterators.md (bitsize): New iterator.
18287 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18288 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18289 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18290 aarch64_simd_valid_immediate.
18291 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18292 (aarch64_reg_or_bic_imm): Likewise.
18293 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18294 with an insn_type enum and msl with a modifier_type enum.
18295 Replace element_width with a scalar_mode. Change the shift
18296 to unsigned int. Add constructors for scalar_float_mode and
18297 scalar_int_mode elements.
18298 (aarch64_vect_float_const_representable_p): Delete.
18299 (aarch64_can_const_movi_rtx_p)
18300 (aarch64_simd_scalar_immediate_valid_for_move)
18301 (aarch64_simd_make_constant): Update call to
18302 aarch64_simd_valid_immediate.
18303 (aarch64_advsimd_valid_immediate_hs): New function.
18304 (aarch64_advsimd_valid_immediate): Likewise.
18305 (aarch64_simd_valid_immediate): Remove mode and inverse
18306 arguments. Rewrite to use the above. Use const_vec_duplicate_p
18307 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18308 and aarch64_float_const_representable_p on the result.
18309 (aarch64_output_simd_mov_immediate): Remove mode argument.
18310 Update call to aarch64_simd_valid_immediate and use of
18311 simd_immediate_info.
18312 (aarch64_output_scalar_simd_mov_immediate): Update call
18313 accordingly.
18314
18315 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18316 Alan Hayward <alan.hayward@arm.com>
18317 David Sherwood <david.sherwood@arm.com>
18318
18319 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18320 (mode_nunits): Likewise CONST_MODE_NUNITS.
18321 * machmode.def (ADJUST_NUNITS): Document.
18322 * genmodes.c (mode_data::need_nunits_adj): New field.
18323 (blank_mode): Update accordingly.
18324 (adj_nunits): New variable.
18325 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18326 parameter.
18327 (emit_mode_size_inline): Set need_bytesize_adj for all modes
18328 listed in adj_nunits.
18329 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18330 listed in adj_nunits. Don't emit case statements for such modes.
18331 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18332 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
18333 nothing if adj_nunits is nonnull.
18334 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18335 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18336 (emit_mode_fbit): Update use of print_maybe_const_decl.
18337 (emit_move_size): Likewise. Treat the array as non-const
18338 if adj_nunits.
18339 (emit_mode_adjustments): Handle adj_nunits.
18340
18341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18342
18343 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18344 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18345 (VECTOR_MODES): Use it.
18346 (make_vector_modes): Take the prefix as an argument.
18347
18348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18349 Alan Hayward <alan.hayward@arm.com>
18350 David Sherwood <david.sherwood@arm.com>
18351
18352 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18353 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18354 for MODE_VECTOR_BOOL.
18355 * machmode.def (VECTOR_BOOL_MODE): Document.
18356 * genmodes.c (VECTOR_BOOL_MODE): New macro.
18357 (make_vector_bool_mode): New function.
18358 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18359 MODE_VECTOR_BOOL.
18360 * lto-streamer-in.c (lto_input_mode_table): Likewise.
18361 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18362 Likewise.
18363 * stor-layout.c (int_mode_for_mode): Likewise.
18364 * tree.c (build_vector_type_for_mode): Likewise.
18365 * varasm.c (output_constant_pool_2): Likewise.
18366 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18367 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
18368 for MODE_VECTOR_BOOL.
18369 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18370 of mode class checks.
18371 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18372 instead of a list of mode class checks.
18373 (expand_vector_scalar_condition): Likewise.
18374 (type_for_widest_vector_mode): Handle BImode as an inner mode.
18375
18376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18377 Alan Hayward <alan.hayward@arm.com>
18378 David Sherwood <david.sherwood@arm.com>
18379
18380 * machmode.h (mode_size): Change from unsigned short to
18381 poly_uint16_pod.
18382 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18383 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18384 or if measurement_type is not polynomial.
18385 (fixed_size_mode::includes_p): Check for constant-sized modes.
18386 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18387 return a poly_uint16 rather than an unsigned short.
18388 (emit_mode_size): Change the type of mode_size from unsigned short
18389 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
18390 (emit_mode_adjustments): Cope with polynomial vector sizes.
18391 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18392 for GET_MODE_SIZE.
18393 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18394 for GET_MODE_SIZE.
18395 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18396 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18397 * caller-save.c (setup_save_areas): Likewise.
18398 (replace_reg_with_saved_mem): Likewise.
18399 * calls.c (emit_library_call_value_1): Likewise.
18400 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18401 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18402 (gen_lowpart_for_combine): Likewise.
18403 * convert.c (convert_to_integer_1): Likewise.
18404 * cse.c (equiv_constant, cse_insn): Likewise.
18405 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18406 (cselib_subst_to_values): Likewise.
18407 * dce.c (word_dce_process_block): Likewise.
18408 * df-problems.c (df_word_lr_mark_ref): Likewise.
18409 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18410 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18411 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18412 (rtl_for_decl_location): Likewise.
18413 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18414 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18415 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18416 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18417 (expand_expr_real_1): Likewise.
18418 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18419 (pad_below): Likewise.
18420 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18421 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18422 * ira.c (get_subreg_tracking_sizes): Likewise.
18423 * ira-build.c (ira_create_allocno_objects): Likewise.
18424 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18425 (ira_sort_regnos_for_alter_reg): Likewise.
18426 * ira-costs.c (record_operand_costs): Likewise.
18427 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18428 (resolve_simple_move): Likewise.
18429 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18430 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18431 (lra_constraints): Likewise.
18432 (CONST_POOL_OK_P): Reject variable-sized modes.
18433 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18434 (add_pseudo_to_slot, lra_spill): Likewise.
18435 * omp-low.c (omp_clause_aligned_alignment): Likewise.
18436 * optabs-query.c (get_best_extraction_insn): Likewise.
18437 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18438 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18439 (expand_mult_highpart, valid_multiword_target_p): Likewise.
18440 * recog.c (offsettable_address_addr_space_p): Likewise.
18441 * regcprop.c (maybe_mode_change): Likewise.
18442 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18443 * regrename.c (build_def_use): Likewise.
18444 * regstat.c (dump_reg_info): Likewise.
18445 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18446 (find_reloads, find_reloads_subreg_address): Likewise.
18447 * reload1.c (eliminate_regs_1): Likewise.
18448 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18449 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18450 (simplify_binary_operation_1, simplify_subreg): Likewise.
18451 * targhooks.c (default_function_arg_padding): Likewise.
18452 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
18453 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
18454 (verify_gimple_assign_ternary): Likewise.
18455 * tree-inline.c (estimate_move_cost): Likewise.
18456 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18457 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
18458 (get_address_cost_ainc): Likewise.
18459 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
18460 (vect_supportable_dr_alignment): Likewise.
18461 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18462 (vectorizable_reduction): Likewise.
18463 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
18464 (vectorizable_operation, vectorizable_load): Likewise.
18465 * tree.c (build_same_sized_truth_vector_type): Likewise.
18466 * valtrack.c (cleanup_auto_inc_dec): Likewise.
18467 * var-tracking.c (emit_note_insn_var_location): Likewise.
18468 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
18469 (ADDR_VEC_ALIGN): Likewise.
18470
18471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18472 Alan Hayward <alan.hayward@arm.com>
18473 David Sherwood <david.sherwood@arm.com>
18474
18475 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
18476 unsigned short.
18477 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18478 or if measurement_type is polynomial.
18479 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
18480 * combine.c (make_extraction): Likewise.
18481 * dse.c (find_shift_sequence): Likewise.
18482 * dwarf2out.c (mem_loc_descriptor): Likewise.
18483 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
18484 (extract_bit_field, extract_low_bits): Likewise.
18485 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
18486 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
18487 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
18488 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
18489 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18490 * reload.c (find_reloads): Likewise.
18491 * reload1.c (alter_reg): Likewise.
18492 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18493 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18494 * tree-if-conv.c (predicate_mem_writes): Likewise.
18495 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18496 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18497 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18498 * valtrack.c (dead_debug_insert_temp): Likewise.
18499 * varasm.c (mergeable_constant_section): Likewise.
18500 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18501
18502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18503 Alan Hayward <alan.hayward@arm.com>
18504 David Sherwood <david.sherwood@arm.com>
18505
18506 * expr.c (expand_assignment): Cope with polynomial mode sizes
18507 when assigning to a CONCAT.
18508
18509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18510 Alan Hayward <alan.hayward@arm.com>
18511 David Sherwood <david.sherwood@arm.com>
18512
18513 * machmode.h (mode_precision): Change from unsigned short to
18514 poly_uint16_pod.
18515 (mode_to_precision): Return a poly_uint16 rather than an unsigned
18516 short.
18517 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18518 or if measurement_type is not polynomial.
18519 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
18520 in which the mode is already known to be a scalar_int_mode.
18521 * genmodes.c (emit_mode_precision): Change the type of mode_precision
18522 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
18523 initializer.
18524 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18525 for GET_MODE_PRECISION.
18526 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18527 for GET_MODE_PRECISION.
18528 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18529 as polynomial.
18530 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18531 (expand_field_assignment, make_extraction): Likewise.
18532 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18533 (get_last_value): Likewise.
18534 * convert.c (convert_to_integer_1): Likewise.
18535 * cse.c (cse_insn): Likewise.
18536 * expr.c (expand_expr_real_1): Likewise.
18537 * lra-constraints.c (simplify_operand_subreg): Likewise.
18538 * optabs-query.c (can_atomic_load_p): Likewise.
18539 * optabs.c (expand_atomic_load): Likewise.
18540 (expand_atomic_store): Likewise.
18541 * ree.c (combine_reaching_defs): Likewise.
18542 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18543 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18544 * tree.h (type_has_mode_precision_p): Likewise.
18545 * ubsan.c (instrument_si_overflow): Likewise.
18546
18547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18548 Alan Hayward <alan.hayward@arm.com>
18549 David Sherwood <david.sherwood@arm.com>
18550
18551 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18552 polynomial numbers of units.
18553 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18554 (valid_vector_subparts_p): New function.
18555 (build_vector_type): Remove temporary shim and take the number
18556 of units as a poly_uint64 rather than an int.
18557 (build_opaque_vector_type): Take the number of units as a
18558 poly_uint64 rather than an int.
18559 * tree.c (build_vector_from_ctor): Handle polynomial
18560 TYPE_VECTOR_SUBPARTS.
18561 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18562 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18563 (build_vector_from_val): If the number of units is variable,
18564 use build_vec_duplicate_cst for constant operands and
18565 VEC_DUPLICATE_EXPR otherwise.
18566 (make_vector_type): Remove temporary is_constant ().
18567 (build_vector_type, build_opaque_vector_type): Take the number of
18568 units as a poly_uint64 rather than an int.
18569 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18570 VECTOR_CST_NELTS.
18571 * cfgexpand.c (expand_debug_expr): Likewise.
18572 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18573 (store_constructor, expand_expr_real_1): Likewise.
18574 (const_scalar_mask_from_tree): Likewise.
18575 * fold-const-call.c (fold_const_reduction): Likewise.
18576 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18577 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18578 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18579 (fold_relational_const): Likewise.
18580 (native_interpret_vector): Likewise. Change the size from an
18581 int to an unsigned int.
18582 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18583 TYPE_VECTOR_SUBPARTS.
18584 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18585 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18586 duplicating a non-constant operand into a variable-length vector.
18587 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18588 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18589 * ipa-icf.c (sem_variable::equals): Likewise.
18590 * match.pd: Likewise.
18591 * omp-simd-clone.c (simd_clone_subparts): Likewise.
18592 * print-tree.c (print_node): Likewise.
18593 * stor-layout.c (layout_type): Likewise.
18594 * targhooks.c (default_builtin_vectorization_cost): Likewise.
18595 * tree-cfg.c (verify_gimple_comparison): Likewise.
18596 (verify_gimple_assign_binary): Likewise.
18597 (verify_gimple_assign_ternary): Likewise.
18598 (verify_gimple_assign_single): Likewise.
18599 * tree-pretty-print.c (dump_generic_node): Likewise.
18600 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18601 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18602 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18603 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18604 (vect_shift_permute_load_chain): Likewise.
18605 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18606 (expand_vector_condition, optimize_vector_constructor): Likewise.
18607 (lower_vec_perm, get_compute_type): Likewise.
18608 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18609 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18610 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18611 (vect_recog_mask_conversion_pattern): Likewise.
18612 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18613 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18614 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18615 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18616 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18617 (vectorizable_shift, vectorizable_operation, vectorizable_store)
18618 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18619 (supportable_widening_operation): Likewise.
18620 (supportable_narrowing_operation): Likewise.
18621 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18622 Likewise.
18623 * varasm.c (output_constant): Likewise.
18624
18625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18626 Alan Hayward <alan.hayward@arm.com>
18627 David Sherwood <david.sherwood@arm.com>
18628
18629 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18630 so that both the length == 3 and length != 3 cases set up their
18631 own permute vectors. Add comments explaining why we know the
18632 number of elements is constant.
18633 (vect_permute_load_chain): Likewise.
18634
18635 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18636 Alan Hayward <alan.hayward@arm.com>
18637 David Sherwood <david.sherwood@arm.com>
18638
18639 * machmode.h (mode_nunits): Change from unsigned char to
18640 poly_uint16_pod.
18641 (ONLY_FIXED_SIZE_MODES): New macro.
18642 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18643 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18644 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18645 New typedefs.
18646 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18647 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18648 or if measurement_type is not polynomial.
18649 * genmodes.c (ZERO_COEFFS): New macro.
18650 (emit_mode_nunits_inline): Make mode_nunits_inline return a
18651 poly_uint16.
18652 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18653 Use ZERO_COEFFS when emitting initializers.
18654 * data-streamer.h (bp_pack_poly_value): New function.
18655 (bp_unpack_poly_value): Likewise.
18656 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18657 for GET_MODE_NUNITS.
18658 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18659 for GET_MODE_NUNITS.
18660 * tree.c (make_vector_type): Remove temporary shim and make
18661 the real function take the number of units as a poly_uint64
18662 rather than an int.
18663 (build_vector_type_for_mode): Handle polynomial nunits.
18664 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18665 * emit-rtl.c (const_vec_series_p_1): Likewise.
18666 (gen_rtx_CONST_VECTOR): Likewise.
18667 * fold-const.c (test_vec_duplicate_folding): Likewise.
18668 * genrecog.c (validate_pattern): Likewise.
18669 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18670 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18671 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18672 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18673 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18674 * rtlanal.c (subreg_get_info): Likewise.
18675 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18676 (vect_grouped_load_supported): Likewise.
18677 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18678 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18679 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18680 (simplify_const_unary_operation, simplify_binary_operation_1)
18681 (simplify_const_binary_operation, simplify_ternary_operation)
18682 (test_vector_ops_duplicate, test_vector_ops): Likewise.
18683 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18684 instead of CONST_VECTOR_NUNITS.
18685 * varasm.c (output_constant_pool_2): Likewise.
18686 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18687 explicit-encoded elements in the XVEC for variable-length vectors.
18688
18689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18690
18691 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18692
18693 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18694 Alan Hayward <alan.hayward@arm.com>
18695 David Sherwood <david.sherwood@arm.com>
18696
18697 * coretypes.h (fixed_size_mode): Declare.
18698 (fixed_size_mode_pod): New typedef.
18699 * builtins.h (target_builtins::x_apply_args_mode)
18700 (target_builtins::x_apply_result_mode): Change type to
18701 fixed_size_mode_pod.
18702 * builtins.c (apply_args_size, apply_result_size, result_vector)
18703 (expand_builtin_apply_args_1, expand_builtin_apply)
18704 (expand_builtin_return): Update accordingly.
18705
18706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18707
18708 * cse.c (hash_rtx_cb): Hash only the encoded elements.
18709 * cselib.c (cselib_hash_rtx): Likewise.
18710 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18711 CONST_VECTOR encoding.
18712
18713 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18714 Jeff Law <law@redhat.com>
18715
18716 PR target/83641
18717 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18718 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18719 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18720 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18721
18722 PR target/83641
18723 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18724 explicitly probe *sp in a noreturn function if there were any callee
18725 register saves or frame pointer is needed.
18726
18727 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18728
18729 PR debug/83621
18730 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18731 BLKmode for ternary, binary or unary expressions.
18732
18733 PR debug/83645
18734 * var-tracking.c (delete_vta_debug_insn): New inline function.
18735 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18736 insns from get_insns () to NULL instead of each bb separately.
18737 Use delete_vta_debug_insn. No longer static.
18738 (vt_debug_insns_local, variable_tracking_main_1): Adjust
18739 delete_vta_debug_insns callers.
18740 * rtl.h (delete_vta_debug_insns): Declare.
18741 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18742 instead of variable_tracking_main.
18743
18744 2018-01-03 Martin Sebor <msebor@redhat.com>
18745
18746 PR tree-optimization/83603
18747 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18748 arguments past the endof the argument list in functions declared
18749 without a prototype.
18750 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18751 Avoid checking when arguments are null.
18752
18753 2018-01-03 Martin Sebor <msebor@redhat.com>
18754
18755 PR c/83559
18756 * doc/extend.texi (attribute const): Fix a typo.
18757 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18758 issuing -Wsuggest-attribute for void functions.
18759
18760 2018-01-03 Martin Sebor <msebor@redhat.com>
18761
18762 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18763 offset_int::from instead of wide_int::to_shwi.
18764 (maybe_diag_overlap): Remove assertion.
18765 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18766 * gimple-ssa-sprintf.c (format_directive): Same.
18767 (parse_directive): Same.
18768 (sprintf_dom_walker::compute_format_length): Same.
18769 (try_substitute_return_value): Same.
18770
18771 2018-01-03 Jeff Law <law@redhat.com>
18772
18773 PR middle-end/83654
18774 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18775 non-constant residual for zero at runtime and avoid probing in
18776 that case. Reorganize code for trailing problem to mirror handling
18777 of the residual.
18778
18779 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18780
18781 PR tree-optimization/83501
18782 * tree-ssa-strlen.c (get_string_cst): New.
18783 (handle_char_store): Call get_string_cst.
18784
18785 2018-01-03 Martin Liska <mliska@suse.cz>
18786
18787 PR tree-optimization/83593
18788 * tree-ssa-strlen.c: Include tree-cfg.h.
18789 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18790 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18791 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18792 to false.
18793 (strlen_dom_walker::before_dom_children): Call
18794 gimple_purge_dead_eh_edges. Dump tranformation with details
18795 dump flags.
18796 (strlen_dom_walker::before_dom_children): Update call by adding
18797 new argument cleanup_eh.
18798 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18799
18800 2018-01-03 Martin Liska <mliska@suse.cz>
18801
18802 PR ipa/83549
18803 * cif-code.def (VARIADIC_THUNK): New enum value.
18804 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18805 thunks.
18806
18807 2018-01-03 Jan Beulich <jbeulich@suse.com>
18808
18809 * sse.md (mov<mode>_internal): Tighten condition for when to use
18810 vmovdqu<ssescalarsize> for TI and OI modes.
18811
18812 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18813
18814 Update copyright years.
18815
18816 2018-01-03 Martin Liska <mliska@suse.cz>
18817
18818 PR ipa/83594
18819 * ipa-visibility.c (function_and_variable_visibility): Skip
18820 functions with noipa attribure.
18821
18822 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18823
18824 * gcc.c (process_command): Update copyright notice dates.
18825 * gcov-dump.c (print_version): Ditto.
18826 * gcov.c (print_version): Ditto.
18827 * gcov-tool.c (print_version): Ditto.
18828 * gengtype.c (create_file): Ditto.
18829 * doc/cpp.texi: Bump @copying's copyright year.
18830 * doc/cppinternals.texi: Ditto.
18831 * doc/gcc.texi: Ditto.
18832 * doc/gccint.texi: Ditto.
18833 * doc/gcov.texi: Ditto.
18834 * doc/install.texi: Ditto.
18835 * doc/invoke.texi: Ditto.
18836
18837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18838
18839 * vector-builder.h (vector_builder::m_full_nelts): Change from
18840 unsigned int to poly_uint64.
18841 (vector_builder::full_nelts): Update prototype accordingly.
18842 (vector_builder::new_vector): Likewise.
18843 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18844 (vector_builder::operator ==): Likewise.
18845 (vector_builder::finalize): Likewise.
18846 * int-vector-builder.h (int_vector_builder::int_vector_builder):
18847 Take the number of elements as a poly_uint64 rather than an
18848 unsigned int.
18849 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18850 from unsigned int to poly_uint64.
18851 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18852 (vec_perm_indices::new_vector): Likewise.
18853 (vec_perm_indices::length): Likewise.
18854 (vec_perm_indices::nelts_per_input): Likewise.
18855 (vec_perm_indices::input_nelts): Likewise.
18856 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18857 number of elements per input as a poly_uint64 rather than an
18858 unsigned int. Use the original encoding for variable-length
18859 vectors, rather than clamping each individual element.
18860 For the second and subsequent elements in each pattern,
18861 clamp the step and base before clamping their sum.
18862 (vec_perm_indices::series_p): Handle polynomial element counts.
18863 (vec_perm_indices::all_in_range_p): Likewise.
18864 (vec_perm_indices_to_tree): Likewise.
18865 (vec_perm_indices_to_rtx): Likewise.
18866 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18867 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18868 (tree_vector_builder::new_binary_operation): Handle polynomial
18869 element counts. Return false if we need to know the number
18870 of elements at compile time.
18871 * fold-const.c (fold_vec_perm): Punt if the number of elements
18872 isn't known at compile time.
18873
18874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18875
18876 * vec-perm-indices.h (vec_perm_builder): Change element type
18877 from HOST_WIDE_INT to poly_int64.
18878 (vec_perm_indices::element_type): Update accordingly.
18879 (vec_perm_indices::clamp): Handle polynomial element_types.
18880 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18881 (vec_perm_indices::all_in_range_p): Likewise.
18882 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18883 than shwi trees.
18884 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18885 polynomial vec_perm_indices element types.
18886 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18887 * fold-const.c (fold_vec_perm): Likewise.
18888 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18889 * tree-vect-generic.c (lower_vec_perm): Likewise.
18890 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18891 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18892 element type to HOST_WIDE_INT.
18893
18894 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18895 Alan Hayward <alan.hayward@arm.com>
18896 David Sherwood <david.sherwood@arm.com>
18897
18898 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18899 rather than an int. Use plus_constant.
18900 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18901 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18902
18903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18904 Alan Hayward <alan.hayward@arm.com>
18905 David Sherwood <david.sherwood@arm.com>
18906
18907 * calls.c (emit_call_1, expand_call): Change struct_value_size from
18908 a HOST_WIDE_INT to a poly_int64.
18909
18910 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18911 Alan Hayward <alan.hayward@arm.com>
18912 David Sherwood <david.sherwood@arm.com>
18913
18914 * calls.c (load_register_parameters): Cope with polynomial
18915 mode sizes. Require a constant size for BLKmode parameters
18916 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
18917 forces a parameter to be padded at the lsb end in order to
18918 fill a complete number of words, require the parameter size
18919 to be ordered wrt UNITS_PER_WORD.
18920
18921 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18922 Alan Hayward <alan.hayward@arm.com>
18923 David Sherwood <david.sherwood@arm.com>
18924
18925 * reload1.c (spill_stack_slot_width): Change element type
18926 from unsigned int to poly_uint64_pod.
18927 (alter_reg): Treat mode sizes as polynomial.
18928
18929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18930 Alan Hayward <alan.hayward@arm.com>
18931 David Sherwood <david.sherwood@arm.com>
18932
18933 * reload.c (complex_word_subreg_p): New function.
18934 (reload_inner_reg_of_subreg, push_reload): Use it.
18935
18936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18937 Alan Hayward <alan.hayward@arm.com>
18938 David Sherwood <david.sherwood@arm.com>
18939
18940 * lra-constraints.c (process_alt_operands): Reject matched
18941 operands whose sizes aren't ordered.
18942 (match_reload): Refer to this check here.
18943
18944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18945 Alan Hayward <alan.hayward@arm.com>
18946 David Sherwood <david.sherwood@arm.com>
18947
18948 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18949 that the mode size is in the set {1, 2, 4, 8, 16}.
18950
18951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18952 Alan Hayward <alan.hayward@arm.com>
18953 David Sherwood <david.sherwood@arm.com>
18954
18955 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18956 Use plus_constant instead of gen_rtx_PLUS.
18957
18958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18959 Alan Hayward <alan.hayward@arm.com>
18960 David Sherwood <david.sherwood@arm.com>
18961
18962 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18963 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18964 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18965 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18966 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18967 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18968 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18969 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18970 * config/i386/i386.c (ix86_push_rounding): ...this new function.
18971 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18972 a poly_int64.
18973 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18974 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18975 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18976 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18977 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18978 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18979 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18980 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18981 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18982 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18983 function.
18984 * expr.c (emit_move_resolve_push): Treat the input and result
18985 of PUSH_ROUNDING as a poly_int64.
18986 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18987 (emit_push_insn): Likewise.
18988 * lra-eliminations.c (mark_not_eliminable): Likewise.
18989 * recog.c (push_operand): Likewise.
18990 * reload1.c (elimination_effects): Likewise.
18991 * rtlanal.c (nonzero_bits1): Likewise.
18992 * calls.c (store_one_arg): Likewise. Require the padding to be
18993 known at compile time.
18994
18995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18996 Alan Hayward <alan.hayward@arm.com>
18997 David Sherwood <david.sherwood@arm.com>
18998
18999 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19000 Use plus_constant instead of gen_rtx_PLUS.
19001
19002 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19003 Alan Hayward <alan.hayward@arm.com>
19004 David Sherwood <david.sherwood@arm.com>
19005
19006 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19007 rather than an int.
19008
19009 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19010 Alan Hayward <alan.hayward@arm.com>
19011 David Sherwood <david.sherwood@arm.com>
19012
19013 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19014 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19015 via stack temporaries. Treat the mode size as polynomial too.
19016
19017 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19018 Alan Hayward <alan.hayward@arm.com>
19019 David Sherwood <david.sherwood@arm.com>
19020
19021 * expr.c (expand_expr_real_2): When handling conversions involving
19022 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19023 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19024 as a poly_uint64 too.
19025
19026 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19027 Alan Hayward <alan.hayward@arm.com>
19028 David Sherwood <david.sherwood@arm.com>
19029
19030 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19031
19032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19033 Alan Hayward <alan.hayward@arm.com>
19034 David Sherwood <david.sherwood@arm.com>
19035
19036 * combine.c (can_change_dest_mode): Handle polynomial
19037 REGMODE_NATURAL_SIZE.
19038 * expmed.c (store_bit_field_1): Likewise.
19039 * expr.c (store_constructor): Likewise.
19040 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19041 and polynomial REGMODE_NATURAL_SIZE.
19042 (gen_lowpart_common): Likewise.
19043 * reginfo.c (record_subregs_of_mode): Likewise.
19044 * rtlanal.c (read_modify_subreg_p): Likewise.
19045
19046 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19047 Alan Hayward <alan.hayward@arm.com>
19048 David Sherwood <david.sherwood@arm.com>
19049
19050 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19051 numbers of elements.
19052
19053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19054 Alan Hayward <alan.hayward@arm.com>
19055 David Sherwood <david.sherwood@arm.com>
19056
19057 * match.pd: Cope with polynomial numbers of vector elements.
19058
19059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19060 Alan Hayward <alan.hayward@arm.com>
19061 David Sherwood <david.sherwood@arm.com>
19062
19063 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19064 in a POINTER_PLUS_EXPR.
19065
19066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19067 Alan Hayward <alan.hayward@arm.com>
19068 David Sherwood <david.sherwood@arm.com>
19069
19070 * omp-simd-clone.c (simd_clone_subparts): New function.
19071 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19072 (ipa_simd_modify_function_body): Likewise.
19073
19074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19075 Alan Hayward <alan.hayward@arm.com>
19076 David Sherwood <david.sherwood@arm.com>
19077
19078 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19079 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19080 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19081 (expand_vector_condition, vector_element): Likewise.
19082 (subparts_gt): New function.
19083 (get_compute_type): Use subparts_gt.
19084 (count_type_subparts): Delete.
19085 (expand_vector_operations_1): Use subparts_gt instead of
19086 count_type_subparts.
19087
19088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19089 Alan Hayward <alan.hayward@arm.com>
19090 David Sherwood <david.sherwood@arm.com>
19091
19092 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19093 (vect_compile_time_alias): ...this new function. Do the calculation
19094 on poly_ints rather than trees.
19095 (vect_prune_runtime_alias_test_list): Update call accordingly.
19096
19097 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19098 Alan Hayward <alan.hayward@arm.com>
19099 David Sherwood <david.sherwood@arm.com>
19100
19101 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19102 numbers of units.
19103 (vect_schedule_slp_instance): Likewise.
19104
19105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19106 Alan Hayward <alan.hayward@arm.com>
19107 David Sherwood <david.sherwood@arm.com>
19108
19109 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19110 constant and extern definitions for variable-length vectors.
19111 (vect_get_constant_vectors): Note that the number of units
19112 is known to be constant.
19113
19114 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19115 Alan Hayward <alan.hayward@arm.com>
19116 David Sherwood <david.sherwood@arm.com>
19117
19118 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19119 of units as polynomial. Choose between WIDE and NARROW based
19120 on multiple_p.
19121
19122 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19123 Alan Hayward <alan.hayward@arm.com>
19124 David Sherwood <david.sherwood@arm.com>
19125
19126 * tree-vect-stmts.c (simd_clone_subparts): New function.
19127 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19128
19129 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19130 Alan Hayward <alan.hayward@arm.com>
19131 David Sherwood <david.sherwood@arm.com>
19132
19133 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19134 vectors as polynomial. Use build_index_vector for
19135 IFN_GOMP_SIMD_LANE.
19136
19137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19138 Alan Hayward <alan.hayward@arm.com>
19139 David Sherwood <david.sherwood@arm.com>
19140
19141 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19142 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19143 for variable-length vectors.
19144 (vectorizable_mask_load_store): Treat the number of units as
19145 polynomial, asserting that it is constant if the condition has
19146 already been enforced.
19147 (vectorizable_store, vectorizable_load): Likewise.
19148
19149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19150 Alan Hayward <alan.hayward@arm.com>
19151 David Sherwood <david.sherwood@arm.com>
19152
19153 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19154 of units as polynomial. Punt if we can't tell at compile time
19155 which vector contains the final result.
19156
19157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19158 Alan Hayward <alan.hayward@arm.com>
19159 David Sherwood <david.sherwood@arm.com>
19160
19161 * tree-vect-loop.c (vectorizable_induction): Treat the number
19162 of units as polynomial. Punt on SLP inductions. Use an integer
19163 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19164 cast of such a series for variable-length floating-point
19165 reductions.
19166
19167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19168 Alan Hayward <alan.hayward@arm.com>
19169 David Sherwood <david.sherwood@arm.com>
19170
19171 * tree.h (build_index_vector): Declare.
19172 * tree.c (build_index_vector): New function.
19173 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19174 of units as polynomial, forcibly converting it to a constant if
19175 vectorizable_reduction has already enforced the condition.
19176 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19177 to create a {1,2,3,...} vector.
19178 (vectorizable_reduction): Treat the number of units as polynomial.
19179 Choose vectype_in based on the largest scalar element size rather
19180 than the smallest number of units. Enforce the restrictions
19181 relied on above.
19182
19183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19184 Alan Hayward <alan.hayward@arm.com>
19185 David Sherwood <david.sherwood@arm.com>
19186
19187 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19188 number of units as polynomial.
19189
19190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19191 Alan Hayward <alan.hayward@arm.com>
19192 David Sherwood <david.sherwood@arm.com>
19193
19194 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19195 * target.def (autovectorize_vector_sizes): Return the vector sizes
19196 by pointer, using vector_sizes rather than a bitmask.
19197 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19198 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19199 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19200 Likewise.
19201 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19202 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19203 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19204 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19205 * omp-general.c (omp_max_vf): Likewise.
19206 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19207 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19208 * tree-vect-loop.c (vect_analyze_loop): Likewise.
19209 * tree-vect-slp.c (vect_slp_bb): Likewise.
19210 * doc/tm.texi: Regenerate.
19211 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19212 to a poly_uint64.
19213 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19214 the vector size as a poly_uint64 rather than an unsigned int.
19215 (current_vector_size): Change from an unsigned int to a poly_uint64.
19216 (get_vectype_for_scalar_type): Update accordingly.
19217 * tree.h (build_truth_vector_type): Take the size and number of
19218 units as a poly_uint64 rather than an unsigned int.
19219 (build_vector_type): Add a temporary overload that takes
19220 the number of units as a poly_uint64 rather than an unsigned int.
19221 * tree.c (make_vector_type): Likewise.
19222 (build_truth_vector_type): Take the number of units as a poly_uint64
19223 rather than an unsigned int.
19224
19225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19226 Alan Hayward <alan.hayward@arm.com>
19227 David Sherwood <david.sherwood@arm.com>
19228
19229 * target.def (get_mask_mode): Take the number of units and length
19230 as poly_uint64s rather than unsigned ints.
19231 * targhooks.h (default_get_mask_mode): Update accordingly.
19232 * targhooks.c (default_get_mask_mode): Likewise.
19233 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19234 * doc/tm.texi: Regenerate.
19235
19236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19237 Alan Hayward <alan.hayward@arm.com>
19238 David Sherwood <david.sherwood@arm.com>
19239
19240 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19241 * omp-general.c (omp_max_vf): Likewise.
19242 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19243 (expand_omp_simd): Handle polynomial safelen.
19244 * omp-low.c (omplow_simd_context): Add a default constructor.
19245 (omplow_simd_context::max_vf): Change from int to poly_uint64.
19246 (lower_rec_simd_input_clauses): Update accordingly.
19247 (lower_rec_input_clauses): Likewise.
19248
19249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19250 Alan Hayward <alan.hayward@arm.com>
19251 David Sherwood <david.sherwood@arm.com>
19252
19253 * tree-vectorizer.h (vect_nunits_for_cost): New function.
19254 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19255 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19256 (vect_analyze_slp_cost): Likewise.
19257 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19258 (vect_model_load_cost): Likewise.
19259
19260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19261 Alan Hayward <alan.hayward@arm.com>
19262 David Sherwood <david.sherwood@arm.com>
19263
19264 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19265 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19266 from an unsigned int * to a poly_uint64_pod *.
19267 (calculate_unrolling_factor): New function.
19268 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
19269
19270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19271 Alan Hayward <alan.hayward@arm.com>
19272 David Sherwood <david.sherwood@arm.com>
19273
19274 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19275 from an unsigned int to a poly_uint64.
19276 (_loop_vec_info::slp_unrolling_factor): Likewise.
19277 (_loop_vec_info::vectorization_factor): Change from an int
19278 to a poly_uint64.
19279 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19280 (vect_get_num_vectors): New function.
19281 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19282 (vect_get_num_copies): Use vect_get_num_vectors.
19283 (vect_analyze_data_ref_dependences): Change max_vf from an int *
19284 to an unsigned int *.
19285 (vect_analyze_data_refs): Change min_vf from an int * to a
19286 poly_uint64 *.
19287 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19288 than an unsigned HOST_WIDE_INT.
19289 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19290 (vect_analyze_data_ref_dependence): Change max_vf from an int *
19291 to an unsigned int *.
19292 (vect_analyze_data_ref_dependences): Likewise.
19293 (vect_compute_data_ref_alignment): Handle polynomial vf.
19294 (vect_enhance_data_refs_alignment): Likewise.
19295 (vect_prune_runtime_alias_test_list): Likewise.
19296 (vect_shift_permute_load_chain): Likewise.
19297 (vect_supportable_dr_alignment): Likewise.
19298 (dependence_distance_ge_vf): Take the vectorization factor as a
19299 poly_uint64 rather than an unsigned HOST_WIDE_INT.
19300 (vect_analyze_data_refs): Change min_vf from an int * to a
19301 poly_uint64 *.
19302 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19303 vfm1 as a poly_uint64 rather than an int. Make the same change
19304 for the returned bound_scalar.
19305 (vect_gen_vector_loop_niters): Handle polynomial vf.
19306 (vect_do_peeling): Likewise. Update call to
19307 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19308 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19309 be constant.
19310 * tree-vect-loop.c (vect_determine_vectorization_factor)
19311 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19312 (vect_get_known_peeling_cost): Likewise.
19313 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19314 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19315 (vect_transform_loop): Likewise. Use the lowest possible VF when
19316 updating the upper bounds of the loop.
19317 (vect_min_worthwhile_factor): Make static. Return an unsigned int
19318 rather than an int.
19319 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19320 polynomial unroll factors.
19321 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19322 (vect_make_slp_decision): Likewise.
19323 (vect_supported_load_permutation_p): Likewise, and polynomial
19324 vf too.
19325 (vect_analyze_slp_cost): Handle polynomial vf.
19326 (vect_slp_analyze_node_operations): Likewise.
19327 (vect_slp_analyze_bb_1): Likewise.
19328 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19329 than an unsigned HOST_WIDE_INT.
19330 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19331 (vectorizable_load): Handle polynomial vf.
19332 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19333 a poly_uint64.
19334 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19335
19336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19337 Alan Hayward <alan.hayward@arm.com>
19338 David Sherwood <david.sherwood@arm.com>
19339
19340 * match.pd: Handle bit operations involving three constants
19341 and try to fold one pair.
19342
19343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19344
19345 * tree-vect-loop-manip.c: Include gimple-fold.h.
19346 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19347 niters_maybe_zero parameters. Handle other cases besides a step of 1.
19348 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19349 Add a path that uses a step of VF instead of 1, but disable it
19350 for now.
19351 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19352 and niters_no_overflow parameters. Update calls to
19353 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19354 Create a new SSA name if the latter choses to use a ste other
19355 than zero, and return it via niters_vector_mult_vf_var.
19356 * tree-vect-loop.c (vect_transform_loop): Update calls to
19357 vect_do_peeling, vect_gen_vector_loop_niters and
19358 slpeel_make_loop_iterate_ntimes.
19359 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19360 (vect_gen_vector_loop_niters): Update declarations after above changes.
19361
19362 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
19363
19364 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19365 128-bit round to integer instructions.
19366 (ceil<mode>2): Likewise.
19367 (btrunc<mode>2): Likewise.
19368 (round<mode>2): Likewise.
19369
19370 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19371
19372 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19373 unaligned VSX load/store on P8/P9.
19374 (expand_block_clear): Allow the use of unaligned VSX
19375 load/store on P8/P9.
19376
19377 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19378
19379 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19380 New function.
19381 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19382 swap associated with both a load and a store.
19383
19384 2018-01-02 Andrew Waterman <andrew@sifive.com>
19385
19386 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19387 * config/riscv/riscv.md (clear_cache): Use it.
19388
19389 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
19390
19391 * web.c: Remove out-of-date comment.
19392
19393 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19394
19395 * expr.c (fixup_args_size_notes): Check that any existing
19396 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19397 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19398 (emit_single_push_insn): ...here.
19399
19400 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19401
19402 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19403 (const_vector_encoded_nelts): New function.
19404 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19405 (const_vector_int_elt, const_vector_elt): Declare.
19406 * emit-rtl.c (const_vector_int_elt_1): New function.
19407 (const_vector_elt): Likewise.
19408 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19409 of CONST_VECTOR_ELT.
19410
19411 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19412
19413 * expr.c: Include rtx-vector-builder.h.
19414 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19415 directly on the tree encoding.
19416 (const_vector_from_tree): Likewise.
19417 * optabs.c: Include rtx-vector-builder.h.
19418 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19419 sequence of "u" values.
19420 * vec-perm-indices.c: Include rtx-vector-builder.h.
19421 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19422 directly on the vec_perm_indices encoding.
19423
19424 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19425
19426 * doc/rtl.texi (const_vector): Describe new encoding scheme.
19427 * Makefile.in (OBJS): Add rtx-vector-builder.o.
19428 * rtx-vector-builder.h: New file.
19429 * rtx-vector-builder.c: Likewise.
19430 * rtl.h (rtx_def::u2): Add a const_vector field.
19431 (CONST_VECTOR_NPATTERNS): New macro.
19432 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19433 (CONST_VECTOR_DUPLICATE_P): Likewise.
19434 (CONST_VECTOR_STEPPED_P): Likewise.
19435 (CONST_VECTOR_ENCODED_ELT): Likewise.
19436 (const_vec_duplicate_p): Check for a duplicated vector encoding.
19437 (unwrap_const_vec_duplicate): Likewise.
19438 (const_vec_series_p): Check for a non-duplicated vector encoding.
19439 Say that the function only returns true for integer vectors.
19440 * emit-rtl.c: Include rtx-vector-builder.h.
19441 (gen_const_vec_duplicate_1): Delete.
19442 (gen_const_vector): Call gen_const_vec_duplicate instead of
19443 gen_const_vec_duplicate_1.
19444 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19445 (gen_const_vec_duplicate): Use rtx_vector_builder.
19446 (gen_const_vec_series): Likewise.
19447 (gen_rtx_CONST_VECTOR): Likewise.
19448 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19449 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19450 Build a new vector rather than modifying a CONST_VECTOR in-place.
19451 (handle_special_swappables): Update call accordingly.
19452 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
19453 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19454 Build a new vector rather than modifying a CONST_VECTOR in-place.
19455 (handle_special_swappables): Update call accordingly.
19456
19457 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19458
19459 * simplify-rtx.c (simplify_const_binary_operation): Use
19460 CONST_VECTOR_ELT instead of XVECEXP.
19461
19462 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19463
19464 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
19465 the selector elements to be different from the data elements
19466 if the selector is a VECTOR_CST.
19467 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
19468 ssizetype for the selector.
19469
19470 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19471
19472 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
19473 before testing each element individually.
19474 * tree-vect-generic.c (lower_vec_perm): Likewise.
19475
19476 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19477
19478 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
19479 * selftest-run-tests.c (selftest::run_tests): Call it.
19480 * vector-builder.h (vector_builder::operator ==): New function.
19481 (vector_builder::operator !=): Likewise.
19482 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
19483 (vec_perm_indices::all_from_input_p): New function.
19484 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19485 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
19486 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
19487 instead of reading the VECTOR_CST directly. Detect whether both
19488 vector inputs are the same before constructing the vec_perm_indices,
19489 and update the number of inputs argument accordingly. Use the
19490 utility functions added above. Only construct sel2 if we need to.
19491
19492 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19493
19494 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19495 the broadcast of the low byte.
19496 (expand_mult_highpart): Use an explicit encoding for the permutes.
19497 * optabs-query.c (can_mult_highpart_p): Likewise.
19498 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19499 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19500 (vectorizable_bswap): Likewise.
19501 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19502 explicit encoding for the power-of-2 permutes.
19503 (vect_permute_store_chain): Likewise.
19504 (vect_grouped_load_supported): Likewise.
19505 (vect_permute_load_chain): Likewise.
19506
19507 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19508
19509 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19510 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19511 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19512 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19513 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19514 (vect_gen_perm_mask_any): Likewise.
19515
19516 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19517
19518 * int-vector-builder.h: New file.
19519 * vec-perm-indices.h: Include int-vector-builder.h.
19520 (vec_perm_indices): Redefine as an int_vector_builder.
19521 (auto_vec_perm_indices): Delete.
19522 (vec_perm_builder): Redefine as a stand-alone class.
19523 (vec_perm_indices::vec_perm_indices): New function.
19524 (vec_perm_indices::clamp): Likewise.
19525 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19526 (vec_perm_indices::new_vector): New function.
19527 (vec_perm_indices::new_expanded_vector): Update for new
19528 vec_perm_indices class.
19529 (vec_perm_indices::rotate_inputs): New function.
19530 (vec_perm_indices::all_in_range_p): Operate directly on the
19531 encoded form, without computing elided elements.
19532 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19533 encoding. Update for new vec_perm_indices class.
19534 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19535 the given vec_perm_builder.
19536 (expand_vec_perm_var): Update vec_perm_builder constructor.
19537 (expand_mult_highpart): Use vec_perm_builder instead of
19538 auto_vec_perm_indices.
19539 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19540 vec_perm_indices instead of auto_vec_perm_indices. Use a single
19541 or double series encoding as appropriate.
19542 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19543 vec_perm_indices instead of auto_vec_perm_indices.
19544 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19545 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19546 (vect_permute_store_chain): Likewise.
19547 (vect_grouped_load_supported): Likewise.
19548 (vect_permute_load_chain): Likewise.
19549 (vect_shift_permute_load_chain): Likewise.
19550 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19551 (vect_transform_slp_perm_load): Likewise.
19552 (vect_schedule_slp_instance): Likewise.
19553 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19554 (vectorizable_mask_load_store): Likewise.
19555 (vectorizable_bswap): Likewise.
19556 (vectorizable_store): Likewise.
19557 (vectorizable_load): Likewise.
19558 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19559 vec_perm_indices instead of auto_vec_perm_indices. Use
19560 tree_to_vec_perm_builder to read the vector from a tree.
19561 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19562 vec_perm_builder instead of a vec_perm_indices.
19563 (have_whole_vector_shift): Use vec_perm_builder and
19564 vec_perm_indices instead of auto_vec_perm_indices. Leave the
19565 truncation to calc_vec_perm_mask_for_shift.
19566 (vect_create_epilog_for_reduction): Likewise.
19567 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19568 from auto_vec_perm_indices to vec_perm_indices.
19569 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19570 instead of changing individual elements.
19571 (aarch64_vectorize_vec_perm_const): Use new_vector to install
19572 the vector in d.perm.
19573 * config/arm/arm.c (expand_vec_perm_d::perm): Change
19574 from auto_vec_perm_indices to vec_perm_indices.
19575 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19576 instead of changing individual elements.
19577 (arm_vectorize_vec_perm_const): Use new_vector to install
19578 the vector in d.perm.
19579 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19580 Update vec_perm_builder constructor.
19581 (rs6000_expand_interleave): Likewise.
19582 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19583 (rs6000_expand_interleave): Likewise.
19584
19585 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19586
19587 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19588 to qimode could truncate the indices.
19589 * optabs.c (expand_vec_perm_var): Likewise.
19590
19591 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19592
19593 * Makefile.in (OBJS): Add vec-perm-indices.o.
19594 * vec-perm-indices.h: New file.
19595 * vec-perm-indices.c: Likewise.
19596 * target.h (vec_perm_indices): Replace with a forward class
19597 declaration.
19598 (auto_vec_perm_indices): Move to vec-perm-indices.h.
19599 * optabs.h: Include vec-perm-indices.h.
19600 (expand_vec_perm): Delete.
19601 (selector_fits_mode_p, expand_vec_perm_var): Declare.
19602 (expand_vec_perm_const): Declare.
19603 * target.def (vec_perm_const_ok): Replace with...
19604 (vec_perm_const): ...this new hook.
19605 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19606 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19607 * doc/tm.texi: Regenerate.
19608 * optabs.def (vec_perm_const): Delete.
19609 * doc/md.texi (vec_perm_const): Likewise.
19610 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19611 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19612 expand_vec_perm for constant permutation vectors. Assert that
19613 the mode of variable permutation vectors is the integer equivalent
19614 of the mode that is being permuted.
19615 * optabs-query.h (selector_fits_mode_p): Declare.
19616 * optabs-query.c: Include vec-perm-indices.h.
19617 (selector_fits_mode_p): New function.
19618 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19619 is defined, instead of checking whether the vec_perm_const_optab
19620 exists. Use targetm.vectorize.vec_perm_const instead of
19621 targetm.vectorize.vec_perm_const_ok. Check whether the indices
19622 fit in the vector mode before using a variable permute.
19623 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19624 vec_perm_indices instead of an rtx.
19625 (expand_vec_perm): Replace with...
19626 (expand_vec_perm_const): ...this new function. Take the selector
19627 as a vec_perm_indices rather than an rtx. Also take the mode of
19628 the selector. Update call to shift_amt_for_vec_perm_mask.
19629 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19630 Use vec_perm_indices::new_expanded_vector to expand the original
19631 selector into bytes. Check whether the indices fit in the vector
19632 mode before using a variable permute.
19633 (expand_vec_perm_var): Make global.
19634 (expand_mult_highpart): Use expand_vec_perm_const.
19635 * fold-const.c: Includes vec-perm-indices.h.
19636 * tree-ssa-forwprop.c: Likewise.
19637 * tree-vect-data-refs.c: Likewise.
19638 * tree-vect-generic.c: Likewise.
19639 * tree-vect-loop.c: Likewise.
19640 * tree-vect-slp.c: Likewise.
19641 * tree-vect-stmts.c: Likewise.
19642 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19643 Delete.
19644 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19645 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19646 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19647 (aarch64_vectorize_vec_perm_const): ...this new function.
19648 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19649 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19650 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19651 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19652 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19653 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19654 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19655 into...
19656 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
19657 check for NEON modes.
19658 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19659 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19660 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19661 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19662 into...
19663 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
19664 the old VEC_PERM_CONST conditions.
19665 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19666 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19667 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19668 (ia64_vectorize_vec_perm_const_ok): Merge into...
19669 (ia64_vectorize_vec_perm_const): ...this new function.
19670 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19671 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19672 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19673 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19674 * config/mips/mips.c (mips_expand_vec_perm_const)
19675 (mips_vectorize_vec_perm_const_ok): Merge into...
19676 (mips_vectorize_vec_perm_const): ...this new function.
19677 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19678 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19679 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19680 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19681 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19682 (rs6000_expand_vec_perm_const): Delete.
19683 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19684 Delete.
19685 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19686 (altivec_expand_vec_perm_const_le): Take each operand individually.
19687 Operate on constant selectors rather than rtxes.
19688 (altivec_expand_vec_perm_const): Likewise. Update call to
19689 altivec_expand_vec_perm_const_le.
19690 (rs6000_expand_vec_perm_const): Delete.
19691 (rs6000_vectorize_vec_perm_const_ok): Delete.
19692 (rs6000_vectorize_vec_perm_const): New function.
19693 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19694 an element count and rtx array.
19695 (rs6000_expand_extract_even): Update call accordingly.
19696 (rs6000_expand_interleave): Likewise.
19697 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19698 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19699 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19700 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19701 (rs6000_expand_vec_perm_const): Delete.
19702 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19703 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19704 (altivec_expand_vec_perm_const_le): Take each operand individually.
19705 Operate on constant selectors rather than rtxes.
19706 (altivec_expand_vec_perm_const): Likewise. Update call to
19707 altivec_expand_vec_perm_const_le.
19708 (rs6000_expand_vec_perm_const): Delete.
19709 (rs6000_vectorize_vec_perm_const_ok): Delete.
19710 (rs6000_vectorize_vec_perm_const): New function. Remove stray
19711 reference to the SPE evmerge intructions.
19712 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19713 an element count and rtx array.
19714 (rs6000_expand_extract_even): Update call accordingly.
19715 (rs6000_expand_interleave): Likewise.
19716 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19717 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19718 new function.
19719 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19720
19721 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19722
19723 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19724 vector mode and that that mode matches the mode of the data
19725 being permuted.
19726 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19727 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
19728 directly using expand_vec_perm_1 when forcing selectors into
19729 registers.
19730 (expand_vec_perm_var): New function, split out from expand_vec_perm.
19731
19732 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19733
19734 * optabs-query.h (can_vec_perm_p): Delete.
19735 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19736 * optabs-query.c (can_vec_perm_p): Split into...
19737 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19738 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19739 particular selector is valid.
19740 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19741 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19742 (vect_grouped_load_supported): Likewise.
19743 (vect_shift_permute_load_chain): Likewise.
19744 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19745 (vect_transform_slp_perm_load): Likewise.
19746 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19747 (vectorizable_bswap): Likewise.
19748 (vect_gen_perm_mask_checked): Likewise.
19749 * fold-const.c (fold_ternary_loc): Likewise. Don't take
19750 implementations of variable permutation vectors into account
19751 when deciding which selector to use.
19752 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19753 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19754 with a false third argument.
19755 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19756 to test whether the constant selector is valid and can_vec_perm_var_p
19757 to test whether a variable selector is valid.
19758
19759 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19760
19761 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19762 * optabs-query.c (can_vec_perm_p): Likewise.
19763 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19764 instead of vec_perm_indices.
19765 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19766 (vect_gen_perm_mask_checked): Likewise,
19767 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19768 (vect_gen_perm_mask_checked): Likewise,
19769
19770 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19771
19772 * optabs-query.h (qimode_for_vec_perm): Declare.
19773 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19774 (qimode_for_vec_perm): ...this new function.
19775 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19776
19777 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19778
19779 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19780 does not have a conditional at the top.
19781
19782 2018-01-02 Richard Biener <rguenther@suse.de>
19783
19784 * ipa-inline.c (big_speedup_p): Fix expression.
19785
19786 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19787
19788 PR target/81616
19789 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19790 for generic 4->6.
19791
19792 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19793
19794 PR target/81616
19795 Generic tuning.
19796 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19797 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19798 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19799 cond_taken_branch_cost 3->4.
19800
19801 2018-01-01 Jakub Jelinek <jakub@redhat.com>
19802
19803 PR tree-optimization/83581
19804 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19805 TODO_cleanup_cfg if any changes have been made.
19806
19807 PR middle-end/83608
19808 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19809 convert_modes if target mode has the right side, but different mode
19810 class.
19811
19812 PR middle-end/83609
19813 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19814 last argument when extracting from CONCAT. If either from_real or
19815 from_imag is NULL, use expansion through memory. If result is not
19816 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19817 the parts directly to inner mode, if even that fails, use expansion
19818 through memory.
19819
19820 PR middle-end/83623
19821 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19822 check for bswap in mode rather than HImode and use that in expand_unop
19823 too.
19824 \f
19825 Copyright (C) 2018 Free Software Foundation, Inc.
19826
19827 Copying and distribution of this file, with or without modification,
19828 are permitted in any medium without royalty provided the copyright
19829 notice and this notice are preserved.