]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
[17/46] Make LOOP_VINFO_REDUCTIONS an auto_vec<stmt_vec_info>
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2
3 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6 than gimple stmts.
7 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8 of a gimple stmt.
9 (gather_scalar_reductions): Update after above interface changes.
10 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12 than gimple stmts.
13 (vect_force_simple_reduction): Likewise.
14 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
15 LOOP_VINFO_REDUCTIONS.
16 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17
18 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
19
20 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
21 a gimple stmt to a stmt_vec_info.
22 * tree-vect-loop.c (vect_active_double_reduction_p)
23 (vect_force_simple_reduction, vectorizable_reduction): Update
24 accordingly.
25
26 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
27
28 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
29 vec<gimple *> to a vec<stmt_vec_info>.
30 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
31 the reduction_phis argument from a vec<gimple *> to a
32 vec<stmt_vec_info>.
33 (vectorizable_reduction): Likewise the phis local variable that
34 is passed to vect_create_epilog_for_reduction. Update for new type
35 of SLP_TREE_VEC_STMTS.
36 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
37 (vectorizable_live_operation): Likewise.
38 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
39 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
40
41 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
42
43 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
44 a gimple stmt to a stmt_vec_info.
45 (vectorizable_condition, vectorizable_live_operation)
46 (vectorizable_reduction, vectorizable_induction): Pass back the
47 vectorized statement as a stmt_vec_info.
48 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
49 use of STMT_VINFO_VEC_STMT.
50 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
51 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
52 as stmt_vec_infos rather than gimple stmts.
53 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
54 to a stmt_vec_info.
55 (vectorizable_live_operation): Likewise.
56 (vectorizable_reduction, vectorizable_induction): Likewise,
57 updating use of STMT_VINFO_VEC_STMT.
58 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
59 of STMT_VINFO_VEC_STMT.
60 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
61 (vectorizable_simd_clone_call, vectorizable_conversion)
62 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
63 (vectorizable_store, vectorizable_load, vectorizable_condition)
64 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
65 from a gimple stmt to a stmt_vec_info.
66 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
67 pointer to a stmt_vec_info to the vectorizable_* routines.
68
69 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
70
71 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
72 a gimple stmt to a stmt_vec_info.
73 (is_pattern_stmt_p): Update accordingly.
74 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
75 (vect_record_grouped_load_vectors): Likewise.
76 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
77 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
78 (vect_model_reduction_cost): Likewise.
79 (vect_create_epilog_for_reduction): Likewise.
80 (vectorizable_reduction, vectorizable_induction): Likewise.
81 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
82 Return the stmt_vec_info for the pattern statement.
83 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
84 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
85 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
86 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
87 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
88 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
89 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
90 (free_stmt_vec_info, vect_is_simple_use): Likewise.
91
92 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
93
94 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
95 (vect_finish_stmt_generation): Likewise.
96 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
97 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
98 (vect_build_gather_load_calls): Use the return value of the above
99 functions instead of a separate call to vinfo_for_stmt. Use narrow
100 scopes for the input gimple stmt and wider scopes for the associated
101 stmt_vec_info. Use vec_info::lookup_def when setting these
102 stmt_vec_infos from an SSA_NAME definition.
103 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
104 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
105 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
106 (vectorizable_store, vectorizable_load, vectorizable_condition)
107 (vectorizable_comparison): Likewise.
108 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
109 (vectorizable_reduction): Likewise.
110
111 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
112
113 * tree-vectorizer.h (vect_is_simple_use): Add an optional
114 stmt_vec_info * parameter before the optional gimple **.
115 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
116 (process_use, vect_get_vec_def_for_operand_1): Update callers.
117 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
118 * tree-vect-loop.c (vectorizable_reduction): Likewise.
119 (vectorizable_live_operation): Likewise.
120 * tree-vect-patterns.c (type_conversion_p): Likewise.
121 (vect_look_through_possible_promotion): Likewise.
122 (vect_recog_rotate_pattern): Likewise.
123 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
124
125 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
126
127 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
128 a typedef to a wrapper class.
129 (NULL_STMT_VEC_INFO): New macro.
130 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
131 (stmt_vec_info::operator*): New function.
132 (stmt_vec_info::operator gimple *): Likewise.
133 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
134 (add_stmt_costs): Likewise.
135 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
136 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
137 (vect_get_known_peeling_cost): Likewise.
138 (vect_estimate_min_profitable_iters): Likewise.
139 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
140 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
141 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
142 (vectorizable_store, free_stmt_vec_infos): Likewise.
143 (new_stmt_vec_info): Change return type of xcalloc to
144 _stmt_vec_info *.
145
146 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
147
148 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
149 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
150 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
151 a single_imm_use-based sequence.
152 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
153
154 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
155
156 * tree-vectorizer.h (vec_info::lookup_def): Declare.
157 * tree-vectorizer.c (vec_info::lookup_def): New function.
158 * tree-vect-patterns.c (vect_get_internal_def): Use it.
159 (vect_widened_op_tree): Likewise.
160 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
161 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
162 (vectorizable_reduction): Likewise.
163 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
164 of a gimple *.
165 (vect_is_slp_reduction): Update calls accordingly. Use
166 vec_info::lookup_def.
167 (vect_is_simple_reduction): Likewise
168 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
169
170 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
171
172 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
173 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
174 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
175 of vinfo_for_stmt.
176 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
177 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
178 (vect_update_vf_for_slp, vect_analyze_loop_operations)
179 (vect_is_slp_reduction, vectorizable_induction)
180 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
181 * tree-vect-patterns.c (vect_init_pattern_stmt):
182 (vect_determine_min_output_precision_1, vect_determine_precisions)
183 (vect_pattern_recog): Likewise.
184 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
185 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
186 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
187 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
188 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
189 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
190 info field from a loop to a loop_vec_info.
191
192 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
193
194 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
195 (vec_info::add_stmt): Declare.
196 * tree-vectorizer.c (vec_info::add_stmt): New function.
197 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
198 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
199 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
200 (vectorizable_induction): Likewise.
201 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
202 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
203 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
204 (vectorizable_load): Likewise.
205 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
206 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
207 (vect_recog_gather_scatter_pattern): Likewise.
208 (append_pattern_def_seq): Likewise. Remove a check that is
209 performed by add_stmt itself.
210
211 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
212
213 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
214 which make_ssa_name was called with new_stmt before new_stmt
215 had been created.
216
217 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
218
219 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
220 split out from...
221 (vect_is_slp_reduction): ...here...
222 (vect_is_simple_reduction): ...and here. Remove repetition of tests
223 that are already known to be false.
224
225 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
226
227 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
228 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
229 STMT_VINFO_NUM_SLP_USES when it's true.
230 (vect_free_slp_instance): Add a final_p parameter and pass it to
231 vect_free_slp_tree.
232 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
233 (vect_analyze_slp_instance): Likewise.
234 (vect_slp_analyze_operations): Likewise.
235 (vect_slp_analyze_bb_1): Likewise.
236 * tree-vectorizer.c (vec_info): Likewise.
237 * tree-vect-loop.c (vect_transform_loop): Likewise.
238
239 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
240
241 * tree-vect-loop.c (vectorizable_reduction): Assert that the
242 function is not called for second and subsequent members of
243 a reduction group.
244
245 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
246
247 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
248 cases for nested loops from here to ...
249 (vect_create_epilog_for_reduction): ...here. Only call
250 vect_is_simple_use for inner-loop reductions.
251
252 2018-07-31 Martin Liska <mliska@suse.cz>
253
254 PR gcov-profile/85338
255 PR gcov-profile/85350
256 PR gcov-profile/85372
257 * profile.c (struct location_triplet): New.
258 (struct location_triplet_hash): Likewise.
259 (output_location): Do not output a BB that
260 is already recorded for a line.
261 (branch_prob): Use streamed_locations.
262
263 2018-07-31 Martin Liska <mliska@suse.cz>
264
265 PR gcov-profile/85370
266 * coverage.c (coverage_begin_function): Do not mark target
267 clones as artificial functions.
268
269 2018-07-31 Martin Liska <mliska@suse.cz>
270
271 PR gcov-profile/83813
272 PR gcov-profile/84758
273 PR gcov-profile/85217
274 PR gcov-profile/85332
275 * profile.c (branch_prob): Do not record GOTO expressions
276 for GIMPLE statements which locations are already streamed.
277
278 2018-07-31 Olivier Hainque <hainque@adacore.com>
279
280 * gcc.c (handle_spec_function): Accept a soft_matched_part
281 argument, as do_spec_1. Pass it down to ...
282 (eval_spec_function): Accept a soft_matched_part argument,
283 and pass it down to ...
284 (do_spec_2): Accept a soft_matched_part argument, and pass
285 it down to do_spec_1.
286 (do_spec_1): Pass soft_matched_part to handle_spec_function.
287 (handle_braces): Update call to handle_spec_function.
288 (driver::set_up_specs): Update calls to do_spec_2.
289 (compare_debug_dump_opt_spec_function): Likewise.
290 (compare_debug_self_opt_spec_function): Likewise.
291
292 2018-07-31 Olivier Hainque <hainque@adacore.com>
293
294 * common.opt (nolibc): New option.
295 * doc/invoke.texi (Link Options): Document it.
296 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
297 * config/alpha/linux.h: Likewise.
298 * config/arc/elf.h: Likewise.
299 * config/arm/uclinux-elf.h: Likewise.
300 * config/arm/unknown-elf.h: Likewise.
301 * config/avr/avrlibc.h: Likewise.
302 * config/bfin/bfin.h: Likewise.
303 * config/bfin/linux.h: Likewise.
304 * config/bfin/uclinux.h: Likewise.
305 * config/darwin.h: Likewise.
306 * config/darwin10.h: Likewise.
307 * config/darwin12.h: Likewise.
308 * config/gnu-user.h: Likewise.
309 * config/lm32/uclinux-elf.h: Likewise.
310 * config/pa/pa-hpux11.h: Likewise.
311 * config/pa/pa64-hpux.h: Likewise.
312 * config/sparc/sparc.h: Likewise.
313
314 2018-07-31 Olivier Hainque <hainque@adacore.com>
315
316 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
317 undefined variables.
318
319 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
320
321 PR target/86640
322 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
323 instead of GEN_INT.
324
325 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
326
327 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
328 terminated string literal.
329
330 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
331
332 PR rtl-optimization/85160
333 * combine.c (is_just_move): New function.
334 (try_combine): Allow combining two instructions into two if neither of
335 the original instructions was a move.
336
337 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
338
339 PR target/86673
340 * doc/extend.texi (Global Register Variables): Discourage use of type
341 qualifiers.
342 (Local Register Variables): Likewise.
343
344 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
345
346 PR tree-optimization/86506
347 * hwint.h (ceil_log2): Resync with hwint.c implementation.
348
349 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
350
351 PR target/86547
352 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
353 hard_regno, make sure no insn between `from` and `to` clobbers it.
354
355 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
356 Tom de Vries <tdevries@suse.de>
357
358 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
359 (PTX_DEFAULT_RUNTIME_DIM): ... this.
360 (nvptx_goacc_validate_dims): Set default worker and gang dims to
361 PTX_DEFAULT_RUNTIME_DIM.
362 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
363
364 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
365
366 * config/pa/pa.c (pa_output_addr_vec): Align address table.
367 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
368 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
369
370 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
371
372 * config/rs6000/constraints.md (wG constraint): Delete, no longer
373 used.
374 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
375 predicate to reflect toc fusion has been deleted.
376 (toc_fusion_mem_raw): Delete, no longer used.
377 (toc_fusion_mem_wrapped): Likewise.
378 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
379 fusion mask bit.
380 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
381 Delete, no longer used.
382 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
383 meant to be used for toc fusion.
384 (rs6000_debug_print_mode): Delete toc fusion debugging.
385 (rs6000_debug_reg_global): Likewise.
386 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
387 fusion and secondary reload support that were never used.
388 (rs6000_option_override_internal): Delete TOC fusion, that was only
389 partially defined, and it did not work unless you also used the
390 -mcmodel= switch.
391 (rs6000_legitimate_address_p): Delete TOC fusion support.
392 (rs6000_opt_masks): Likewise.
393 (fusion_wrap_memory_address): Delete function, no longer used.
394 (fusion_split_address); Delete TOC fusion support.
395 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
396 longer used with toc fusion being deleted.
397 (TARGET_TOC_FUSION_FP): Likewise.
398 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
399 UNSPEC.
400 (toc fusion spliter): Delete TOC fusion support.
401 (toc_fusionload_<mode>): Likewise.
402 (toc_fusionload_di): Likewise.
403 (fusion_gpr_load_<mode>): Delete generator function, this insn no
404 longer needs to be named. Rename predicate to delete TOC fusion.
405 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
406 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
407 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
408 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
409 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
410
411 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
412
413 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
414 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
415 __int128 in built-in function prototypes.
416 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
417 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
418
419 2018-07-27 Martin Sebor <msebor@redhat.com>
420
421 PR tree-optimization/86696
422 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
423 types, including enums.
424 (handle_char_store): Be prepared for the above function to fail.
425
426 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
427
428 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
429 when optimization level is lower than 2 or optimize for size.
430
431 2018-07-26 Martin Sebor <msebor@redhat.com>
432
433 PR tree-optimization/86043
434 PR tree-optimization/86042
435 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
436 (get_string_cst_length): Rename...
437 (get_min_string_length): ...to this. Add argument.
438 (handle_char_store): Extend to handle multi-character stores by
439 MEM_REF.
440 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
441 * tree.h (initializer_zerop): Add argument.
442
443 2018-07-26 Jakub Jelinek <jakub@redhat.com>
444
445 PR middle-end/86660
446 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
447 declare target to variables if they have always,{to,from,tofrom} map
448 kinds.
449
450 2018-07-26 Martin Liska <mliska@suse.cz>
451
452 PR lto/86548
453 * lto-wrapper.c: Add linker_output as prefix
454 for ltrans_output_file.
455
456 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
457
458 PR rtl-optimization/85805
459 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
460 value for hard registers if that was written in the same mode.
461
462 2018-07-26 Martin Liska <mliska@suse.cz>
463
464 PR gcov-profile/86536
465 * gcov.c (format_gcov): Use printf format %.*f directly
466 and do not handle special values.
467
468 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
469
470 * common/config/arc/arc-common.c (arc_option_optimization_table):
471 Update default optimizations for size.
472
473 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
474
475 * config/arc/arc.md (movsf_insn): Add short instruction selection.
476 * config/arc/constraints.md (CfZ): New constraint.
477 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
478 (subsf3_fpu): Likewise.
479 (cmpsf_fpu): Likewise.
480 (cmpsf_fpu_uneq): Likewise.
481
482 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
483
484 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
485 accesses as well.
486 (arc_is_uncached_mem_p): uncached applies to both the variable and
487 the pointer.
488
489 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
490
491 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
492 register names.
493
494 2018-07-25 David Malcolm <dmalcolm@redhat.com>
495
496 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
497 field "m_scopes" from vec to auto_vec.
498
499 2018-07-25 Martin Liska <mliska@suse.cz>
500
501 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
502 return type.
503
504 2018-07-25 Richard Biener <rguenther@suse.de>
505
506 PR debug/86654
507 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
508 special wrt context_die late.
509 (gen_subprogram_die): Re-use DIEs in local scope.
510
511 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
512
513 PR tree-optimization/86644
514 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
515
516 2018-07-25 Martin Liska <mliska@suse.cz>
517
518 PR middle-end/86645
519 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
520 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
521
522 2018-07-25 Martin Liska <mliska@suse.cz>
523
524 PR sanitizer/79635
525 * params.def: Explain ASan abbreviation and provide
526 a documentation link.
527
528 2018-07-24 Martin Sebor <msebor@redhat.com>
529
530 PR tree-optimization/86622
531 PR tree-optimization/86532
532 * builtins.h (string_length): Declare.
533 * builtins.c (c_strlen): Correct handling of non-constant offsets.
534 (check_access): Be prepared for non-constant length ranges.
535 (string_length): Make extern.
536 * expr.c (string_constant): Only handle the minor non-constant
537 array index. Use string_constant to compute the length of
538 a generic string constant.
539
540 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
541
542 PR tree-optimization/86618
543 * tree-vect-stmts.c (vectorizable_call): Don't take the address
544 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
545
546 2018-07-24 David Malcolm <dmalcolm@redhat.com>
547
548 PR tree-optimization/86636
549 * json.cc (json::object::set): Fix comment. Add assertions.
550 (json::array::append): Move here from json.h. Add comment and an
551 assertion.
552 (json::string::string): Likewise.
553 * json.h (json::array::append): Move to json.cc.
554 (json::string::string): Likewise.
555 * optinfo-emit-json.cc
556 (optrecord_json_writer::impl_location_to_json): Assert that we
557 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
558 wrapper around it. Expand the location once, rather than three
559 times.
560 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
561 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
562 wrappers.
563 (optrecord_json_writer::optinfo_to_json): Likewise, in four
564 places. Fix some overlong lines.
565
566 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
567
568 * config/aarch64/aarch64-simd.md
569 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
570 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
571 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
572 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
573 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
574 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
575 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
576 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
577 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
578
579 2018-07-24 Jakub Jelinek <jakub@redhat.com>
580
581 PR middle-end/86627
582 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
583 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
584 and abs_d == d, do the power of two handling if profitable.
585
586 2018-07-24 Richard Biener <rguenther@suse.de>
587
588 * match.pd: Add BIT_FIELD_REF canonicalizations.
589
590 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
591
592 PR c/86617
593 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
594
595 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
596
597 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
598 terminated STRING_CST object.
599
600 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
601
602 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
603
604 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
605
606 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
607 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
608 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
609 the elements into a register.
610 (rs6000_split_v4si_init_di_reg): Delete.
611 (rs6000_split_v4si_init): Delete.
612 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
613 (vsx_init_v4si): Rewrite as a define_expand.
614
615 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
616
617 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
618 zero_extend argument from memory): New.
619
620 2018-07-22 Martin Sebor <msebor@redhat.com>
621
622 PR bootstrap/86621
623 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
624 diagnosing calls with unknown arguments unless -Walloca-larger-than
625 is restricted to less than PTRDIFF_MAX bytes.
626
627 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
628
629 * doc/gcov.texi (Invoking Gcov): Editorial changes.
630
631 2018-07-20 David Malcolm <dmalcolm@redhat.com>
632
633 * pretty-print.c (text_info::set_location): Remove redundant
634 "line_table" parameter from call to rich_location::set_range.
635
636 2018-07-20 Martin Sebor <msebor@redhat.com>
637
638 PR middle-end/82063
639 * builtins.c (expand_builtin_alloca): Adjust.
640 * calls.c (alloc_max_size): Simplify.
641 * cgraphunit.c (cgraph_node::expand): Adjust.
642 * common.opt (larger_than_size, warn_frame_larger_than): Remove
643 variables.
644 (frame_larger_than_size): Same.
645 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
646 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
647 Initialize.
648 * doc/invoke.texi (GCC Command Options): Document option arguments.
649 Explain byte-size arguments and suffixes.
650 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
651 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
652 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
653 * doc/options.texi (UInteger): Expand.
654 (Host_Wide_Int, ByteSize): Document new properties.
655 * final.c (final_start_function_1): Include sizes in an error message.
656 * function.c (frame_offset_overflow): Same.
657 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
658 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
659 Diagnose unbounded alloca calls only for limits of less than
660 PTRDIFF_MAX.
661 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
662 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
663 for alloca(0).
664 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
665 only for limits of less than PTRDIFF_MAX.
666 * langhooks-def.h (lhd_handle_option): Change function argument
667 to HOST_WIDE_INT.
668 * langhooks.c (lhd_handle_option): Same.
669 * langhooks.h (handle_option): Same.
670 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
671 ByteSize flags.
672 (var_type, var_type_struct): Same.
673 (var_set): Handle ByteSize flag.
674 * optc-gen.awk: Add comments to output to ease debugging. Make
675 use of HOST_WIDE_INT where appropriate.
676 * opts-gen-save.awk: Use %lx to format unsigned long.
677 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
678 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
679 arguments. Parse bytes-size suffixes.
680 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
681 (enum_value_to_arg): Same.
682 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
683 (handle_option): Adjust.
684 (generate_option): Change function argument to HOST_WIDE_INT.
685 (cmdline_handle_error): Adjust.
686 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
687 (set_option): Change function argument to HOST_WIDE_INT.
688 (option_enabled): Handle cl_host_wide_int.
689 (get_option_state): Handle CLVC_SIZE.
690 (control_warning_option): Same.
691 * opts.c (common_handle_option): Change function argument to
692 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
693 OPT_Wvla_larger_than_.
694 * opts.h (enum cl_var_type): Add an enumerator.
695 * stor-layout.c (layout_decl): Print a more meaningful warning.
696 * toplev.c (output_stack_usage): Adjust.
697
698 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
699
700 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
701 call to inline_expand_builtin_string_cmp.
702 (expand_builtin_strcmp): Likewise.
703 (expand_builtin_strncmp): Likewise.
704 (inline_string_cmp): Delete the last parameter, change char_type_node
705 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
706 two operands.
707 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
708 the inlining expansion on target where the type of the call has same or
709 narrower precision than unsigned char.
710
711 2018-07-20 David Malcolm <dmalcolm@redhat.com>
712
713 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
714 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
715 * common.opt (fsave-optimization-record): New option.
716 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
717 * doc/invoke.texi (-fsave-optimization-record): New option.
718 * dumpfile.c: Include "optinfo-emit-json.h".
719 (struct kv_pair): Move to coretypes.h.
720 (optgroup_options): Make non-static.
721 (dump_context::end_scope): Call
722 optimization_records_maybe_pop_dump_scope.
723 * dumpfile.h (optgroup_options): New decl.
724 * json.cc: New file.
725 * json.h: New file.
726 * optinfo-emit-json.cc: New file.
727 * optinfo-emit-json.h: New file.
728 * optinfo.cc: Include "optinfo-emit-json.h".
729 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
730 (optinfo_enabled_p): Check optimization_records_enabled_p.
731 (optinfo_wants_inlining_info_p): Likewise.
732 * optinfo.h: Update comment.
733 * profile-count.c (profile_quality_as_string): New function.
734 * profile-count.h (profile_quality_as_string): New decl.
735 (profile_count::quality): New accessor.
736 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
737 and optinfo_emit_json_cc_tests.
738 * selftest.h (selftest::json_cc_tests): New decl.
739 (selftest::optinfo_emit_json_cc_tests): New decl.
740 * toplev.c: Include "optinfo-emit-json.h".
741 (compile_file): Call optimization_records_finish.
742 (do_compile): Call optimization_records_start.
743 * tree-ssa-live.c: Include optinfo.h.
744 (remove_unused_scope_block_p): Retain inlining information if
745 optinfo_wants_inlining_info_p returns true.
746
747 2018-07-20 Richard Biener <rguenther@suse.de>
748
749 PR debug/86585
750 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
751 to cover -flto-partition=none.
752
753 2018-07-20 Martin Liska <mliska@suse.cz>
754
755 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
756 (get_decl_source_range): Remove unused function.
757
758 2018-07-20 Richard Biener <rguenther@suse.de>
759
760 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
761 (struct vn_phi_s): Likewise.
762 (struct vn_reference_s): Likewise.
763 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
764 for searching the slot of an entry known to be in the hash itself.
765 (vn_phi_hasher::equal): Likewise.
766 (vn_reference_hasher::equal): Likewise.
767 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
768 globals.
769 (optimistic_info, current_info): Remove, keeping only valid_info.
770 (vn_reference_lookup_1): Remove fallback lookup.
771 (vn_reference_lookup_2): Likewise.
772 (vn_nary_op_lookup_1): Likewise.
773 (vn_phi_lookup): Likewise.
774 (vn_nary_build_or_lookup_1): Make sure to not chain the built
775 hash element.
776 (vn_reference_insert): Adjust, chain the inserted hash element
777 at last_inserted_ref.
778 (vn_reference_insert_pieces): Likewise.
779 (visit_reference_op_call): Likewise.
780 (vn_nary_op_insert_into): Chain the inserted hash element at
781 last_inserted_nary.
782 (vn_nary_op_insert_pieces): Adjust.
783 (vn_nary_op_insert): Likewise.
784 (vn_nary_op_insert_stmt): Likewise.
785 (vn_phi_insert): Adjust, chain the inserted hash element at
786 last_inserted_phi.
787 (process_scc): Remove clearing and copying the optimistic
788 table. Instead remove elements inserted during an optimistic
789 iteration from the single table we maintain.
790 (init_scc_vn): Adjust.
791 (free_scc_vn): Likewise.
792 (sccvn_dom_walker::record_cond): Likewise.
793 (sccvn_dom_walker::after_dom_children): Likewise.
794
795 2018-07-19 Martin Sebor <msebor@redhat.com>
796
797 PR tree-optimization/84047
798 PR tree-optimization/83776
799 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
800 (check_array_bounds): Call it.
801
802 2018-07-19 Martin Sebor <msebor@redhat.com>
803
804 * align.h (align_flags): Use member initialization.
805
806 2018-07-19 David Malcolm <dmalcolm@redhat.com>
807
808 * Makefile.in (OBJS): Add optinfo.o.
809 * coretypes.h (class symtab_node): New forward decl.
810 (struct cgraph_node): New forward decl.
811 (class varpool_node): New forward decl.
812 * dump-context.h: New file.
813 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
814 "tree-pass.h".
815 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
816 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
817 (set_alt_dump_file): Likewise.
818 (dump_context::~dump_context): New dtor.
819 (dump_gimple_stmt): Move implementation to...
820 (dump_context::dump_gimple_stmt): ...this new member function.
821 Add the stmt to any pending optinfo, creating one if need be.
822 (dump_gimple_stmt_loc): Move implementation to...
823 (dump_context::dump_gimple_stmt_loc): ...this new member function.
824 Start a new optinfo and add the stmt to it.
825 (dump_gimple_expr): Move implementation to...
826 (dump_context::dump_gimple_expr): ...this new member function.
827 Add the stmt to any pending optinfo, creating one if need be.
828 (dump_gimple_expr_loc): Move implementation to...
829 (dump_context::dump_gimple_expr_loc): ...this new member function.
830 Start a new optinfo and add the stmt to it.
831 (dump_generic_expr): Move implementation to...
832 (dump_context::dump_generic_expr): ...this new member function.
833 Add the tree to any pending optinfo, creating one if need be.
834 (dump_generic_expr_loc): Move implementation to...
835 (dump_context::dump_generic_expr_loc): ...this new member
836 function. Add the tree to any pending optinfo, creating one if
837 need be.
838 (dump_printf): Move implementation to...
839 (dump_context::dump_printf_va): ...this new member function. Add
840 the text to any pending optinfo, creating one if need be.
841 (dump_printf_loc): Move implementation to...
842 (dump_context::dump_printf_loc_va): ...this new member function.
843 Start a new optinfo and add the stmt to it.
844 (dump_dec): Move implementation to...
845 (dump_context::dump_dec): ...this new member function. Add the
846 value to any pending optinfo, creating one if need be.
847 (dump_context::dump_symtab_node): New member function.
848 (dump_context::get_scope_depth): New member function.
849 (dump_context::begin_scope): New member function.
850 (dump_context::end_scope): New member function.
851 (dump_context::ensure_pending_optinfo): New member function.
852 (dump_context::begin_next_optinfo): New member function.
853 (dump_context::end_any_optinfo): New member function.
854 (dump_context::s_current): New global.
855 (dump_context::s_default): New global.
856 (dump_scope_depth): Delete global.
857 (dumpfile_ensure_any_optinfo_are_flushed): New function.
858 (dump_symtab_node): New function.
859 (get_dump_scope_depth): Reimplement in terms of dump_context.
860 (dump_begin_scope): Likewise.
861 (dump_end_scope): Likewise.
862 (selftest::temp_dump_context::temp_dump_context): New ctor.
863 (selftest::temp_dump_context::~temp_dump_context): New dtor.
864 (selftest::verify_item): New function.
865 (ASSERT_IS_TEXT): New macro.
866 (ASSERT_IS_TREE): New macro.
867 (ASSERT_IS_GIMPLE): New macro.
868 (selftest::test_capture_of_dump_calls): New test.
869 (selftest::dumpfile_c_tests): Call it.
870 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
871 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
872 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
873 descriptive comment.
874 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
875 (dump_node, dump_bb): Move these unrelated decls.
876 (class dump_manager): Add leading comment.
877 * optinfo.cc: New file.
878 * optinfo.h: New file.
879
880 2018-07-19 Michael Collison <michael.collison@arm.com>
881 Richard Henderson <rth@redhat.com>
882
883 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
884 (subti): Handle op1 zero.
885 (subvti4, usub4ti4): New.
886 (*sub<GPI>3_compare1_imm): New.
887 (sub<GPI>3_carryinCV): New.
888 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
889 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
890
891 2018-07-19 Michael Collison <michael.collison@arm.com>
892 Richard Henderson <rth@redhat.com>
893
894 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
895 (addti3): Create simpler code if low part is already known to be 0.
896 (addvti4, uaddvti4): New.
897 (*add<GPI>3_compareC_cconly_imm): New.
898 (*add<GPI>3_compareC_cconly): New.
899 (*add<GPI>3_compareC_imm): New.
900 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
901 handle constants within this pattern..
902 (*add<GPI>3_compareV_cconly_imm): New.
903 (*add<GPI>3_compareV_cconly): New.
904 (*add<GPI>3_compareV_imm): New.
905 (add<GPI>3_compareV): New.
906 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
907 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
908 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
909 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
910 with 'comparison' operator.
911 (*add<GPI>3_compareV_cconly_imm): Ditto.
912 (*add<GPI>3_compareV_cconly): Ditto.
913 (*add<GPI>3_compareV_imm): Ditto.
914 (add<GPI>3_compareV): Ditto.
915 (add<mode>3_carryinC): Ditto.
916 (*add<mode>3_carryinC_zero): Ditto.
917 (*add<mode>3_carryinC): Ditto.
918 (add<mode>3_carryinV): Ditto.
919 (*add<mode>3_carryinV_zero): Ditto.
920 (*add<mode>3_carryinV): Ditto.
921
922 2018-07-19 Michael Collison <michael.collison@arm.com>
923 Richard Henderson <rth@redhat.com>
924
925 * config/aarch64/aarch64-modes.def (CC_V): New.
926 * config/aarch64/aarch64-protos.h
927 (aarch64_addti_scratch_regs): Declare
928 (aarch64_subvti_scratch_regs): Declare.
929 (aarch64_expand_subvti): Declare.
930 (aarch64_gen_unlikely_cbranch): Declare
931 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
932 for signed overflow using CC_Vmode.
933 (aarch64_get_condition_code_1): Handle CC_Vmode.
934 (aarch64_gen_unlikely_cbranch): New function.
935 (aarch64_addti_scratch_regs): New function.
936 (aarch64_subvti_scratch_regs): New function.
937 (aarch64_expand_subvti): New function.
938
939 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
940
941 * config/aarch64/aarch64-option-extensions.def: New entry for profile
942 extension.
943 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
944 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
945 extension.
946
947 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
948
949 PR target/83009
950 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
951 address check not strict.
952
953 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
954
955 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
956 Umq with Umn.
957 (store_pair_lanes<mode>): Likewise.
958 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
959 enum value 'ADDR_QUERY_LDP_STP_N'.
960 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
961 (aarch64_print_address_internal): Add declaration.
962 (aarch64_print_ldpstp_address): Remove.
963 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
964 (aarch64_print_operand): Change printing of 'y'.
965 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
966 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
967 'true' rather than '1'.
968 * config/aarch64/constraints.md (Uml): Likewise.
969 (Uml): Rename to Umn.
970 (Umq): Remove.
971
972 2018-07-19 Richard Biener <rguenther@suse.de>
973
974 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
975 a trailing array.
976 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
977 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
978 (vn_reference_hasher): Likewise.
979 (struct vn_tables_s): Remove obstack and alloc-pool members.
980 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
981 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
982 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
983 (vn_reference_insert_pieces): Likewise.
984 (alloc_vn_nary_op_noinit): Adjust.
985 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
986 (vn_phi_eq): Adjust.
987 (shared_lookup_phiargs): Remove.
988 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
989 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
990 (visit_reference_op_call): Likewise.
991 (copy_nary, copy_phi, copy_reference): Remove.
992 (process_scc): Rewind the obstack when iterating. Do not
993 copy the elements to valid_info but just move them from one
994 hashtable to the other.
995 (allocate_vn_table): Adjust.
996 (free_vn_table): Likewise.
997 (init_scc_vn): Likewise.
998 (free_scc_vn): Likewise.
999
1000 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 PR target/86560
1003 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1004 indirect_return as function type attribute.
1005 (ix86_attribute_table): Change indirect_return to function
1006 type attribute.
1007 * doc/extend.texi: Update indirect_return attribute.
1008
1009 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1010
1011 * wide-int.h (widest2_int): New.
1012 * gimple-fold.c (arith_overflowed_p): Use it.
1013 * tree.h (widest2_int_cst): New.
1014 * tree-vrp.c (wide_int_binop_overflow): Rename from
1015 vrp_int_const_binop.
1016 Rewrite to work on trees.
1017 (extract_range_from_multiplicative_op_1): Abstract code to...
1018 (wide_int_range_min_max): ...here.
1019 (wide_int_range_cross_product): ...and here.
1020 (extract_range_from_binary_expr_1): Abstract overflow code to...
1021 (wide_int_range_mult_wrapping): ...here.
1022 * tree-vrp.h (wide_int_range_cross_product): New.
1023 (wide_int_range_mult_wrapping): New.
1024
1025 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1026 Julia Koval <julia.koval@intel.com>
1027
1028 * config/i386/x86-tune-costs.h (skylake_memcpy,
1029 skylake_memset): Replace rep_prefix with unrolling for size 512.
1030
1031 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1032
1033 PR middle-end/86544
1034 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1035 in last stmt.
1036
1037 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1038
1039 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1040 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1041 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1042 previously known as "PowerPC AltiVec Built-in Functions". Move
1043 some material to new subsubsections "PowerPC AltiVec Built-in
1044 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1045 ISA 2.07".
1046 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1047 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1048 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1049 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1050
1051 2018-07-18 Richard Biener <rguenther@suse.de>
1052
1053 PR tree-optimization/86557
1054 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1055 EXACT_DIV_EXPR.
1056
1057 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1058
1059 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1060
1061 2018-07-17 Jeff Law <law@redhat.com>
1062
1063 * config/arm/arm.c (get_label_padding): Update for recent
1064 changes to label_to_alignment.
1065
1066 PR tree-optimization/86010
1067 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1068
1069 * config/mips/mips.c (vr4130_align_insns): Update for recent
1070 changes to label_to_alignment.
1071
1072 * config/frv/frv.c (frv_label_align): Update for recent changes
1073 to label_to_alignment.
1074
1075 * config/nios2/nios2.c (nios2_label_align): Update for recent
1076 changes which dropped ALIGN_LABELS_LOG.
1077
1078 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1079
1080 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1081 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1082
1083 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1084
1085 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1086 deprecated align_labels_log.
1087
1088 2018-07-17 Richard Biener <rguenther@suse.de>
1089
1090 PR lto/86456
1091 * dwarf2out.c (init_sections_and_labels): Always generate
1092 a debug_line_str_section for early LTO debug.
1093 (dwarf2out_finish): Reset debug_line_str_hash output early.
1094 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1095 with fat LTO part.
1096 (dwarf2out_early_finish): Output debug_line_str.
1097
1098 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1099
1100 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1101 index register on z196 or later.
1102
1103 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1104
1105 * config/s390/s390.c (s390_default_align): Set default function
1106 alignment to 16.
1107 (s390_override_options_after_change): Call s390_default align.
1108 (s390_option_override_internal): Call s390_default_align.
1109 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1110
1111 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1112
1113 PR middle-end/86542
1114 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1115 to _looptemp_ clauses, other than the first two.
1116
1117 2018-07-17 Martin Liska <mliska@suse.cz>
1118
1119 * opts.c: Do not enable OPT_falign_* for -Os.
1120
1121 2018-07-17 Martin Liska <mliska@suse.cz>
1122
1123 * align.h (MAX_CODE_ALIGN): New.
1124 (MAX_CODE_ALIGN_VALUE): New.
1125 * common/config/i386/i386-common.c (ix86_handle_option):
1126 (MAX_CODE_ALIGN): Moved to align.h.
1127 * final.c (MAX_CODE_ALIGN): Likewise.
1128 * opts.c (parse_and_check_align_values):
1129 (MAX_CODE_ALIGN): Likewise.
1130 (MAX_CODE_ALIGN_VALUE): Likewise.
1131
1132 2018-07-17 Martin Liska <mliska@suse.cz>
1133
1134 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1135 in order to fulfil coding style.
1136 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1137 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1138 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1139 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1140 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1141 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1142 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1143 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1144 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1145
1146 2018-07-17 Martin Liska <mliska@suse.cz>
1147
1148 * align.h: New file.
1149 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1150 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1151 align_flags of label_to_alignment.
1152 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1153 class.
1154 * config/m68k/m68k.c: Do not use removed align_labels_value and
1155 align_loops_value.
1156 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1157 (LOOP_ALIGN): Likewise.
1158 (LABEL_ALIGN): Likewise.
1159 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1160 Remove not used macro.
1161 (rs6000_loop_align): Change return type to align_flags.
1162 (rs6000_loop_align_max_skip): Remove.
1163 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1164 Change return type to align_flags.
1165 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1166 Remove not used macro.
1167 (rs6000_loop_align): Change return type to align_flags.
1168 (rs6000_loop_align_max_skip): Remove.
1169 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1170 * config/rx/rx-protos.h (rx_align_for_label): Make it
1171 static function.
1172 * config/rx/rx.c (rx_align_for_label): Change return type
1173 to align_flags.
1174 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1175 macro definitions.
1176 into align_flags class.
1177 (LABEL_ALIGN): Likewise.
1178 (LOOP_ALIGN): Likewise.
1179 * config/s390/s390.c (s390_label_align): Use align_flags
1180 class member.
1181 (s390_asm_output_function_label): Likewise.
1182 * config/sh/sh.c (sh_override_options_after_change):
1183 Use align_flags class directly without macros.
1184 (find_barrier): Likewise.
1185 (barrier_align): Likewise.
1186 (sh_loop_align): Likewise.
1187 * config/spu/spu.c (spu_option_override):
1188 Use align_flags_tuple::get_value instead of removed macros.
1189 (spu_sched_init): Likewise.
1190 * config/spu/spu.h (GTY): Likewise.
1191 * config/visium/visium.c (visium_option_override):
1192 Set "8" as default secondary alignment.
1193 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1194 in order to guarantee secondary alignment of 8.
1195 * coretypes.h: Include align.h header file.
1196 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1197 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1198 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1199 * doc/tm.texi.in: Likewise.
1200 * final.c (struct label_alignment): Remove not used structure.
1201 (LABEL_ALIGN): Change type to align_flags.
1202 (LOOP_ALIGN): Likewise.
1203 (JUMP_ALIGN): Likewise.
1204 (default_loop_align_max_skip): Remove.
1205 (default_label_align_max_skip): Likewise.
1206 (default_jump_align_max_skip): Likewise.
1207 (default_label_align_after_barrier_max_skip):
1208 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1209 (LABEL_TO_MAX_SKIP): Remove.
1210 (label_to_alignment): Return align_flags type instead of integer.
1211 (label_to_max_skip): Remove.
1212 (align_fuzz): Use align_flags type.
1213 (compute_alignments): Use align_flags type and use align_flags::max
1214 to combine multiple alignments.
1215 (grow_label_align): Grow vec instead of C array.
1216 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1217 (shorten_branches): Use align_flags type and use align_flags::max
1218 to combine multiple alignments.
1219 (final_scan_insn_1): Remove usage of secondary alignment that comes
1220 from label alignment, but instead use proper secondary alignment
1221 which is computed in grow_label_align.
1222 * flags.h (struct align_flags_tuple): Move to align.h.
1223 (struct align_flags): Likewise.
1224 (state_align_loops): Rename to align_loops.
1225 (state_align_jumps): Rename to align_jumps.
1226 (state_align_labels): Rename to align_labels.
1227 (state_align_functions): Rename to align_functions.
1228 (align_loops_log): Remove.
1229 (align_jumps_log): Remove.
1230 (align_labels_log): Remove.
1231 (align_functions_log): Remove.
1232 (align_loops_max_skip): Remove.
1233 (align_jumps_max_skip): Remove.
1234 (align_labels_max_skip): Remove.
1235 (align_functions_max_skip): Remove.
1236 (align_loops_value): Remove.
1237 (align_jumps_value): Remove.
1238 (align_labels_value): Remove.
1239 (align_functions_value): Remove.
1240 * output.h (label_to_alignment): Change return type to align_flags.
1241 (label_to_max_skip): Remove.
1242 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1243 jump_align_max_skip macros.
1244 * targhooks.h (default_loop_align_max_skip): Remove.
1245 (default_label_align_max_skip): Likewise.
1246 (default_jump_align_max_skip): Likewise.
1247 (default_label_align_after_barrier_max_skip): Remove.
1248 * toplev.c (read_log_maxskip): Use ::normalize function.
1249 (parse_N_M): Remove not used argument and also call ::normalize.
1250 (parse_alignment_opts): Do not pass unused arguments.
1251 * varasm.c (assemble_start_function): Use directly align_functions
1252 instead of removed macros.
1253 * system.h: Do not poison removed macros.
1254
1255 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1256
1257 PR middle-end/86539
1258 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1259 and cond temporaries don't have reference type if iterator has
1260 pointer type. For init use &for_pre_body instead of pre_p if
1261 for_pre_body is non-empty.
1262
1263 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1264
1265 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1266 double-double modes to SFmode directly directly.
1267 (trunc<mode>sf2_fprs): Delete.
1268
1269 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1270
1271 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1272 for conversions between IFmode and the decimal floating point modes.
1273 (init_float128_ieee): Use the correct names for conversions between
1274 KFmode and the decimal floating point modes.
1275
1276 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1277
1278 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1279 for the conversions between TDmode and IFmode.
1280 (init_float128_ieee): Use more correct names for the conversions
1281 between TDmode and KFmode.
1282
1283 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1284
1285 PR tree-optimization/86526
1286 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1287 (inline_expand_builtin_string_cmp): Likewise.
1288 (inline_string_cmp): Likewise. Use c_readstr instead of
1289 builtin_memcpy_read_str. Add unit_mode temporary.
1290
1291 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1292
1293 PR middle-end/86528
1294 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1295 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1296
1297 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1298
1299 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1300 Alphabetize prototypes of built-in functions, separating out
1301 built-in functions that are listed in this section but should be
1302 described elsewhere.
1303
1304 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1305
1306 PR target/86511
1307 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1308 conditional move when trapping comparison was split to a
1309 non-trapping one (and vice versa).
1310
1311 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1312
1313 * config/s390/s390.c (s390_function_profiler): Generate nops
1314 instead of profiler call sequences.
1315 * config/s390/s390.opt: Add the new option.
1316
1317 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1318
1319 * config/s390/s390.c (s390_function_profiler): Generate
1320 __mcount_loc section.
1321 * config/s390/s390.opt: Add the new option.
1322
1323 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1324
1325 * common.opt: Add the new warning.
1326 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1327 %r0,__fentry__" when -mfentry is specified.
1328 (s390_option_override_internal): Disallow -mfentry for 31-bit
1329 CPUs.
1330 * config/s390/s390.opt: Add the new option.
1331
1332 2018-07-16 Richard Biener <rguenther@suse.de>
1333
1334 PR lto/86523
1335 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1336 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1337
1338 2018-07-16 Martin Liska <mliska@suse.cz>
1339
1340 PR ipa/86529
1341 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1342 to ::get_create.
1343
1344 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1345
1346 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1347
1348 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1349
1350 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1351 for ARCHS4x.
1352 * config/arc/arc-cpus.def (hs4x): New cpu.
1353 (hs4xd): Likewise.
1354 * config/arc/arc-tables.opt: Regenerate.
1355 * config/arc/arc.c (arc_sched_issue_rate): New function.
1356 (TARGET_SCHED_ISSUE_RATE): Define.
1357 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1358 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1359 fpu_cvt.
1360 (attr tune): Add ARCHS4x tune values.
1361 (attr tune_dspmpy): Define.
1362 (*tst): Correct instruction type.
1363 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1364 * config/arc/arcHS4x.md: New file.
1365 * config/arc/fpu.md: Update instruction type attributes.
1366 * config/arc/t-multilib: Regenerate.
1367
1368 2018-07-16 Tom de Vries <tdevries@suse.de>
1369
1370 PR debug/86455
1371 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1372
1373 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1374
1375 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1376 early clobber.
1377
1378 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1379
1380 PR tree-optimization/86514
1381 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1382 conversion to a boolean type from a type with greater precision.
1383
1384 2018-07-16 Tom de Vries <tdevries@suse.de>
1385
1386 * var-tracking.c (vt_initialize): Print adjusted insn slim if
1387 dump_flags request TDF_SLIM.
1388
1389 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
1390
1391 * fold-const.c (int_const_binop_1): Abstract...
1392 (wide_int_binop): ...wide int code here.
1393 (poly_int_binop): ...poly int code here.
1394 Abstract the rest of int_const_binop_1 into int_const_binop.
1395 * fold-const.h (wide_int_binop): New.
1396 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1397 Remove useless PLUS/MINUS_EXPR case.
1398 (zero_nonzero_bits_from_vr): Move wide int code...
1399 (zero_nonzero_bits_from_bounds): ...here.
1400 (extract_range_from_binary_expr_1): Move mask optimization code...
1401 (range_easy_mask_min_max): ...here.
1402 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1403 (range_easy_mask_min_max): New.
1404
1405 2018-07-15 Jeff Law <law@redhat.com>
1406
1407 PR target/85993
1408 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1409 block.
1410
1411 2018-07-14 Jim Wilson <jimw@sifive.com>
1412
1413 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1414
1415 2018-07-14 Paul Koning <ni1d@arrl.net>
1416
1417 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1418
1419 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
1420
1421 * lto-streamer-out.c (copy_function_or_variable): Dump info about
1422 copying section.
1423
1424 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
1425 Steve Munroe <munroesj52@gmail.com>
1426
1427 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1428 (_mm_andnot_si128): Likewise.
1429 (_mm_or_si128): Likewise.
1430 (_mm_xor_si128): Likewise.
1431
1432 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
1433
1434 PR middle-end/78809
1435 * builtins.c (expand_builtin_memcmp): Inline the calls first
1436 when result_eq is false.
1437 (expand_builtin_strcmp): Inline the calls first.
1438 (expand_builtin_strncmp): Likewise.
1439 (inline_string_cmp): New routine. Expand a string compare
1440 call by using a sequence of char comparison.
1441 (inline_expand_builtin_string_cmp): New routine. Inline expansion
1442 a call to str(n)cmp/memcmp.
1443 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1444 New option.
1445 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1446
1447 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
1448
1449 * config/arm/driver-arm.c: Include arm-native.h.
1450 (host_detect_local_cpu): Use auto-generated data tables.
1451 (vendors, arm_cpu_table): Delete. Move part information to ...
1452 * config/arm/arm-cpus.in: ... here.
1453 * config/arm/parsecpu.awk (gen_native): New function.
1454 (vendor, part): New CPU fields.
1455 (END): Add support for building the native CPU detection tables.
1456 * config/arm/t-arm (arm-native.h): Add build rule.
1457 (driver-arm.o): Add dependency on arm-native.h.
1458
1459 2018-07-13 Richard Biener <rguenther@suse.de>
1460
1461 PR middle-end/85974
1462 * match.pd (addr1 - addr2): Allow either of the operand to
1463 have a conversion.
1464
1465 2018-07-13 Tom de Vries <tdevries@suse.de>
1466
1467 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1468 in remap_ssa_name.
1469
1470 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
1471
1472 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1473 arrays instead of numbered variables.
1474
1475 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
1476
1477 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1478 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1479
1480 2018-07-13 Richard Biener <rguenther@suse.de>
1481
1482 PR debug/86452
1483 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1484 instead of get_context_die.
1485
1486 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1487 Richard Biener <rguenther@suse.de>
1488
1489 PR middle-end/86489
1490 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1491 that the loop latch destination where phi is defined.
1492
1493 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
1494
1495 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1496 (riscv_expand_epilogue): Add assertion to check interrupt mode.
1497 (riscv_set_current_function): Extract getting interrupt type to new
1498 function.
1499 (riscv_get_interrupt_type): New function.
1500 (riscv_merge_decl_attributes): New function, checking interrupt type is
1501 same.
1502 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1503
1504 2018-07-12 Paul Koning <ni1d@arrl.net>
1505
1506 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1507 directive.
1508
1509 2018-07-12 Paul Koning <ni1d@arrl.net>
1510
1511 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1512 zero reference, add doloop_end instead.
1513 * doc/md.texi (decrement_and_branch_until_zero): Remove.
1514 (Looping patterns): Remove decrement_and_branch_until_zero. Add
1515 detail for doloop_end.
1516
1517 2018-07-12 Martin Sebor <msebor@redhat.com>
1518
1519 PR c/86453
1520 * attribs.c (decl_attributes): Reject conflicting attributes before
1521 calling attribute handlers.
1522
1523 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1524
1525 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1526 parameter.
1527 (gcc::dump_manager::get_dump_file_name): likewise.
1528 (dump_begin): Likewise.
1529 * dumpfile.h (dump_begin): Update prototype.
1530 (gcc::dump_manager::get_dump_file_name,
1531 gcc::dump_manager::get_dump_file_name): Update prototype.
1532
1533 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1534
1535 * internal-fn.h (vectorizable_internal_fn_p): New function.
1536 * tree-vect-slp.c (compatible_calls_p): Likewise.
1537 (vect_build_slp_tree_1): Remove nops argument. Handle calls
1538 to internal functions.
1539 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1540
1541 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1542
1543 * fold-const.h (inverse_conditions_p): Declare.
1544 * fold-const.c (inverse_conditions_p): New function.
1545 * match.pd: Use inverse_conditions_p. Add folds of view_converts
1546 that test the inverse condition of a conditional internal function.
1547 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1548 * internal-fn.c (internal_fn_mask_index): Handle conditional
1549 internal functions.
1550 (vectorized_internal_fn_supported_p): New function.
1551 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1552 (any_pred_load_store): Replace with...
1553 (need_to_predicate): ...this new variable.
1554 (redundant_ssa_names): New variable.
1555 (ifcvt_can_use_mask_load_store): Move initial checks to...
1556 (ifcvt_can_predicate): ...this new function. Handle tree codes
1557 for which a conditional internal function exists.
1558 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1559 instead of ifcvt_can_use_mask_load_store. Update after variable
1560 name change.
1561 (predicate_load_or_store): New function, split out from
1562 predicate_mem_writes.
1563 (check_redundant_cond_expr): New function.
1564 (value_available_p): Likewise.
1565 (predicate_rhs_code): Likewise.
1566 (predicate_mem_writes): Rename to...
1567 (predicate_statements): ...this. Use predicate_load_or_store
1568 and predicate_rhs_code.
1569 (combine_blocks, tree_if_conversion): Update after above name changes.
1570 (ifcvt_local_dce): Handle redundant_ssa_names.
1571 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1572 general conditional functions.
1573 * tree-vect-stmts.c (vectorizable_call): Likewise.
1574
1575 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1576 Alan Hayward <alan.hayward@arm.com>
1577 David Sherwood <david.sherwood@arm.com>
1578
1579 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1580 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1581 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1582 plus and minus and convert them into IFN_COND_FMA-based sequences.
1583 (convert_mult_to_fma): Handle conditional plus and minus.
1584
1585 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1586
1587 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1588 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1589 (cond_fnms_optab): New optabs.
1590 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1591 internal functions.
1592 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1593 * internal-fn.h (get_conditional_internal_fn): Declare.
1594 (get_unconditional_internal_fn): Likewise.
1595 * internal-fn.c (cond_ternary_direct): New macro.
1596 (expand_cond_ternary_optab_fn): Likewise.
1597 (direct_cond_ternary_optab_supported_p): Likewise.
1598 (FOR_EACH_COND_FN_PAIR): Likewise.
1599 (get_conditional_internal_fn): New function.
1600 (get_unconditional_internal_fn): Likewise.
1601 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1602 (gimple_match_op::gimple_match_op): Add a new overload for 5
1603 operands.
1604 (gimple_match_op::set_op): Likewise.
1605 (gimple_resimplify5): Declare.
1606 * genmatch.c (decision_tree::gen): Generate simplifications for
1607 5 operands.
1608 * gimple-match-head.c (gimple_simplify): Define an overload for
1609 5 operands. Handle calls with 5 arguments in the top-level overload.
1610 (convert_conditional_op): Handle conversions from unconditional
1611 internal functions to conditional ones.
1612 (gimple_resimplify5): New function.
1613 (build_call_internal): Pass a fifth operand.
1614 (maybe_push_res_to_seq): Likewise.
1615 (try_conditional_simplification): Try converting conditional
1616 internal functions to unconditional internal functions.
1617 Handle 3-operand unconditional forms.
1618 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1619 Define ternary equivalents of the current rules for binary conditional
1620 internal functions.
1621 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1622 ternary operations.
1623 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1624 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1625 (optab): Handle them.
1626 (SVE_COND_FP_TERNARY): New int iterator.
1627 (sve_fmla_op, sve_fmad_op): New int attributes.
1628 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1629 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1630 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1631
1632 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1633
1634 * target.def (preferred_else_value): New target hook.
1635 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1636 * doc/tm.texi: Regenerate.
1637 * targhooks.h (default_preferred_else_value): Declare.
1638 * targhooks.c (default_preferred_else_value): New function.
1639 * internal-fn.h (conditional_internal_fn_code): Declare.
1640 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1641 (get_conditional_internal_fn): Use it.
1642 (conditional_internal_fn_code): New function.
1643 * gimple-match.h (gimple_match_cond): New struct.
1644 (gimple_match_op): Add a cond member function.
1645 (gimple_match_op::gimple_match_op): Update all forms to take a
1646 gimple_match_cond.
1647 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1648 for the suboperation, but don't specify a particular else_value.
1649 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1650 (visit_nary_op, visit_reference_op_load): Pass
1651 gimple_match_cond::UNCOND to the gimple_match_op constructor.
1652 * gimple-match-head.c: Include tree-eh.h
1653 (convert_conditional_op): New function.
1654 (maybe_resimplify_conditional_op): Likewise.
1655 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1656 (gimple_resimplify2): Likewise.
1657 (gimple_resimplify3): Likewise.
1658 (gimple_resimplify4): Likewise.
1659 (maybe_push_res_to_seq): Return null for conditional operations.
1660 (try_conditional_simplification): New function.
1661 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
1662 constructor.
1663 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1664 IFN_COND_* call.
1665 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1666 function.
1667 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1668
1669 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1670
1671 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1672 DECL_FCONTEXT
1673 (hash_tree): Do not hash DECL_FCONTEXT
1674 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1675 Do not stream DECL_FCONTEXT.
1676 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1677 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1678
1679 2018-07-12 Richard Biener <rguenther@suse.de>
1680
1681 PR debug/86462
1682 * dwarf2out.c (gen_block_die): Only output blocks when they have
1683 at least one !DECL_IGNORED_P variable.
1684
1685 2018-07-12 Richard Biener <rguenther@suse.de>
1686
1687 PR target/84829
1688 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1689 Remove -mieee-fp handling.
1690
1691 2018-07-12 Richard Biener <rguenther@suse.de>
1692
1693 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1694 left-over from last patch.
1695
1696 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1697
1698 PR tree-optimization/86492
1699 * gimple-ssa-store-merging.c
1700 (imm_store_chain_info::coalesce_immediate_stores): Call
1701 check_no_overlap even for the merge_overlapping case. Formatting fix.
1702
1703 2018-07-12 Richard Biener <rguenther@suse.de>
1704
1705 PR middle-end/86479
1706 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1707 move possibly trapping operations into the conditional.
1708
1709 2018-07-12 Richard Biener <rguenther@suse.de>
1710
1711 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1712 (vn_lookup_simplify_result): Remove recursion limit applied
1713 here.
1714 (vn_nary_build_or_lookup_1): Adjust.
1715 (try_to_simplify): Likewise.
1716 * gimple-match-head.c (gimple_resimplify1): Instead apply one
1717 here.
1718 (gimple_resimplify2): Likewise.
1719 (gimple_resimplify3): Likewise.
1720 (gimple_resimplify4): Likewise.
1721
1722 2018-07-11 Jakub Jelinek <jakub@redhat.com>
1723
1724 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1725 Use __mmask64 type instead of __mmask8 for __M argument.
1726 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1727 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1728 __U argument.
1729 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1730 __mmask16 for __M argument.
1731 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1732 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1733 to __mmask16 instead of __mmask8.
1734 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1735 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1736 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1737 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1738 instead of __mmask16 for __U argument.
1739 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1740 __mmask16 instead of __mmask8 for __U argument.
1741 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1742 __U argument.
1743 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1744 __mmask16.
1745 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1746 argument.
1747 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1748 __U argument.
1749 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1750 __mmask16.
1751 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1752 of __mmask16.
1753 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1754 __U argument.
1755 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1756 __U argument.
1757 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1758 __U argument.
1759 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1760 __U argument.
1761 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1762 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1763 return type as well as __M argument type and all casts from __mmask8
1764 to __mmask32.
1765 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1766 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1767 return type as well as __M argument type and all casts from __mmask8
1768 to __mmask16.
1769 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1770 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1771 return type as well as __M argument type and all casts from __mmask8
1772 to __mmask32.
1773 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1774 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1775 return type as well as __M argument type and all casts from __mmask8
1776 to __mmask16.
1777 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1778 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1779 __mmask16.
1780
1781 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1782
1783 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1784 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1785 for __U argument.
1786
1787 2018-07-11 Paul Koning <ni1d@arrl.net>
1788
1789 * doc/md.texi (define_subst): Document how multiple occurrences of
1790 the same argument in the replacement pattern are handled.
1791
1792 2018-07-11 Paul Koning <ni1d@arrl.net>
1793
1794 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1795 alphabetical order.
1796 (Common Type Attributes): Add "mode" attribute.
1797
1798 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1799
1800 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1801 stream DECL_ORIGINAL_TYPE.
1802 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1803 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1804 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1805 Do not walk original type.
1806 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1807 external decls.
1808 (write_ts_decl_non_common_tree_pointers): Do not stream
1809 DECL_ORIGINAL_TYPE
1810 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1811 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1812
1813 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1814
1815 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1816 thread twice from the same starting edge.
1817
1818 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1819
1820 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1821 * gimple.c (gimple_call_nonnull_result_p): ...here...
1822 (gimple_call_nonnull_arg): ...and here.
1823 * gimple.h (gimple_call_nonnull_result_p): New.
1824 (gimple_call_nonnull_arg): New.
1825
1826 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1827
1828 * config/arm/arm-cpus.in: Move information from fpu field of each
1829 cpu definition to the isa field.
1830 * config/arm/parsecpu.awk (fpu): Delete match rule.
1831 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1832
1833 2018-07-11 Richard Biener <rguenther@suse.de>
1834
1835 PR debug/86457
1836 * dwarf2out.c (init_sections_and_labels): Use
1837 output_asm_line_debug_info consistently.
1838 (dwarf2out_early_finish): Likewise.
1839 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1840 type units.
1841
1842 2018-07-11 Richard Biener <rguenther@suse.de>
1843
1844 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1845 Rework father_bb setting in a way to avoid propagating constants
1846 multiple times on a loop body.
1847
1848 2018-07-10 Mark Wielaard <mark@klomp.org>
1849
1850 PR debug/86459
1851 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1852
1853 2018-07-10 Richard Biener <rguenther@suse.de>
1854
1855 * hash-map.h (hash_map::iterator::operator*): Return
1856 references to key and value.
1857
1858 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1859
1860 PR c++/86443
1861 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1862 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1863 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1864 (gimplify_omp_for): For composite loops, move outer
1865 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1866 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1867 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1868 TREE_LIST for both the original class iterator and the "last" helper
1869 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1870 loop, remember has_decl_expr from outer composite loops for the
1871 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1872
1873 2018-07-09 Martin Sebor <msebor@redhat.com>
1874
1875 PR middle-end/77357
1876 PR middle-end/86428
1877 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1878 accessing implicitly initialized array elements.
1879 * expr.c (string_constant): Handle string initializers of
1880 character arrays within aggregates.
1881 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1882 Store element offset. As a special case, handle zero size.
1883 (fold_nonarray_ctor_reference): Same.
1884 (fold_ctor_reference): Add argument. Store subobject offset.
1885 * gimple-fold.h (fold_ctor_reference): Add argument.
1886
1887 2018-07-09 Paul Koning <ni1d@arrl.net>
1888
1889 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1890 (pdp11_insn_cost): New function.
1891 (pdp11_md_asm_adjust): New function.
1892 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1893 (pdp11_rtx_costs): Update to match machine better.
1894 (output_addr_const_pdp11): Correct format mismatch warnings.
1895 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1896 * config/pdp11/pdp11.md: General change to add base_cost and/or
1897 length attributes for use by new pdp11_insn_cost function.
1898 (MIN_BRANCH): Correct definition.
1899 (MIN_SOB): Ditto.
1900 (doloop_end): Use standard pattern name for looping pattern.
1901 (doloop_end_nocc): New.
1902 (movsf): Add another constraint alternative.
1903 (zero_extendqihi2): Add constraint alternatives for not in place
1904 extend.
1905 (zero_extendhisi2): Remove.
1906 (shift patterns): Add CC handling variants.
1907 (bswaphi2): New.
1908 (bswapsi2): New.
1909 (rothi3): New.
1910 (define_peephole2): New peephole to recognize mov that sets CC for
1911 subsequent test.
1912
1913 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1914
1915 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1916 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1917 wi::add.
1918
1919 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1920
1921 PR c/86420
1922 * real.c (real_nextafter): Return true if result is denormal.
1923
1924 2018-07-09 Martin Liska <mliska@suse.cz>
1925
1926 * common.opt: Add back wrongly removed attribute.
1927
1928 2018-07-09 Richard Biener <rguenther@suse.de>
1929
1930 PR debug/86413
1931 * dwarf2out.c (gen_block_die): For an early generated DIE
1932 always output high/low PC attributes.
1933
1934 2018-07-09 Tom de Vries <tdevries@suse.de>
1935
1936 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1937 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1938 onto VAR_DECL with abstract origin.
1939
1940 2018-07-07 Jim Wilson <jimw@sifive.com>
1941
1942 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1943
1944 2018-07-07 Tom de Vries <tdevries@suse.de>
1945
1946 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1947
1948 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1949
1950 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1951 overflow_type.
1952 (combine_bound): Use wide-int overflow calculation instead of
1953 rolling our own.
1954 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1955 overflow_type.
1956 * fold-const.c (int_const_binop_2): Same.
1957 (extract_muldiv_1): Same.
1958 (fold_div_compare): Same.
1959 (fold_abs_const): Same.
1960 * match.pd: Same.
1961 * poly-int.h (add): Same.
1962 (sub): Same.
1963 (neg): Same.
1964 (mul): Same.
1965 * predict.c (predict_iv_comparison): Same.
1966 * profile-count.c (slow_safe_scale_64bit): Same.
1967 * simplify-rtx.c (simplify_const_binary_operation): Same.
1968 * tree-chrec.c (tree_fold_binomial): Same.
1969 * tree-data-ref.c (split_constant_offset_1): Same.
1970 * tree-if-conv.c (idx_within_array_bound): Same.
1971 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1972 * tree-ssa-phiopt.c (minmax_replacement): Same.
1973 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1974 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1975 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1976 * wide-int.cc (wi::add_large): Same.
1977 (wi::mul_internal): Same.
1978 (wi::sub_large): Same.
1979 (wi::divmod_internal): Same.
1980 * wide-int.h: Change overflow type to overflow_type for neg, add,
1981 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1982 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1983 mul_internal, divmod_internal.
1984 (overflow_type): New enum.
1985 (accumulate_overflow): New.
1986
1987 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1988
1989 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1990 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1991
1992 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1993
1994 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1995 argument is checked for zero before entering loop, avoid checking again.
1996
1997 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1998
1999 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2000 * gimplify.h (generic_expr_could_trap_p): Likwise.
2001 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2002
2003 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2004
2005 PR tree-optimization/86401
2006 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2007 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2008 (fold_bit_and_mask): ... here. New helper function for match.pd.
2009 * fold-const.h (fold_bit_and_mask): Declare.
2010 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2011
2012 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2013
2014 PR target/86324
2015 * target.def (translate_mode_attribute): New hook.
2016 * targhooks.h (default_translate_mode_attribute): Declare.
2017 * targhooks.c (default_translate_mode_attribute): New function.
2018 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2019 * doc/tm.texi: Regenerate.
2020 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2021 (rs6000_translate_mode_attribute): New function.
2022
2023 2018-07-06 Paul Koning <ni1d@arrl.net>
2024
2025 * doc/md.texi (define_split): Document DONE and FAIL.
2026 (define_peephole2): Ditto.
2027
2028 2018-07-05 Jeff Law <law@redhat.com>
2029
2030 PR tree-optimization/86010
2031 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2032 both the head and tail of mem* and str* calls.
2033
2034 2018-07-05 Jim Wilson <jimw@sifive.com>
2035
2036 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2037
2038 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2039
2040 * config/aarch64/aarch64-simd.md: correct flags text for
2041 MIN_EXPR replacement.
2042
2043 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2044
2045 * configure: Regenerated.
2046
2047 2018-07-05 Carl Love <cel@us.ibm.com>
2048
2049 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2050 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2051 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2052 VSX_BUILTIN_DOUBLEL_V4SF.
2053
2054 2018-07-05 Martin Sebor <msebor@redhat.com>
2055
2056 PR c++/86400
2057 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2058 than its domain to compute its the upper bound of a char array.
2059
2060 2018-07-05 Nathan Sidwell <nathan@acm.org>
2061
2062 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2063 * doc/cpp.texi: Update comment.
2064 * doc/tm.texi: Rebuilt.
2065 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2066 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2067 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2068 headers affected by extern "C".
2069 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2070 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2071 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2072 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2073 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2074 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2075 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2076 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2077 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2078 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2079 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2080 config/sparc/sp64-elf.h, config/spu/spu.h,
2081 config/stormy16/stormy16.h, config/v850/v850.h,
2082 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2083 define NO_IMPLICIT_EXTERN_C.
2084 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2085
2086 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2087
2088 PR target/84711
2089 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2090 instead of GET_MODE_SIZE when comparing Units.
2091
2092 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2093
2094 PR target/84711
2095 * rtlanal.c (set_noop_p): Constrain on mode change,
2096 include hard-reg-set.h
2097
2098 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2099
2100 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2101
2102 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2103
2104 Revert
2105 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2106
2107 PR sanitizer/84250
2108 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2109 libasan.
2110 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2111
2112 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2113
2114 PR sanitizer/84250
2115 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2116 libasan.
2117 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2118
2119 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2120
2121 PR middle-end/86380
2122 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2123
2124 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2125
2126 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2127 neg_*_op* variables.
2128
2129 2018-07-04 Martin Liska <mliska@suse.cz>
2130
2131 * tree-switch-conversion.c: Define
2132 max_ratio_for_speed and max_ratio_for_size constants.
2133
2134 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2135 Martin Liska <mliska@suse.cz>
2136
2137 PR middle-end/66240
2138 PR target/45996
2139 PR c/84100
2140 * common.opt: Rename align options with 'str_' prefix.
2141 * common/config/i386/i386-common.c (set_malign_value): New
2142 function.
2143 (ix86_handle_option): Use it to set -falign-* options/
2144 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2145 type from int to string.
2146 * config/aarch64/aarch64.c: Update default values from int
2147 to string.
2148 * config/alpha/alpha.c (alpha_override_options_after_change):
2149 Likewise.
2150 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2151 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2152 max skip conditionally.
2153 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2154 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2155 max skip conditionally.
2156 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2157 max skip conditionally.
2158 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2159 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2160 max skip conditionally.
2161 * config/i386/i386.c (struct ptt): Change type from int to
2162 string.
2163 (ix86_default_align): Set default values.
2164 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2165 max skip conditionally.
2166 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2167 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2168 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2169 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2170 max skip conditionally.
2171 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2172 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2173 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2174 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2175 max skip conditionally.
2176 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2177 * config/ia64/ia64.c (ia64_option_override): Set default values
2178 for alignment options.
2179 * config/m68k/m68k.c: Handle new str_align_* options.
2180 * config/mips/mips.c (mips_set_compression_mode): Change
2181 type of constants.
2182 (mips_option_override): Set default values for options.
2183 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2184 Likewise.
2185 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2186 Likewise.
2187 * config/rx/rx.c (rx_option_override): Likewise.
2188 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2189 (LABEL_ALIGN): Use align_labels_log.
2190 (LOOP_ALIGN): Use align_loops_align.
2191 * config/s390/s390.c (s390_asm_output_function_label): Use new
2192 macros.
2193 * config/sh/sh.c (sh_override_options_after_change):
2194 Change type of constants.
2195 * config/spu/spu.c (spu_sched_init): Likewise.
2196 * config/sparc/sparc.c (sparc_option_override): Set default
2197 values for options.
2198 * config/visium/visium.c (visium_option_override): Likewise.
2199 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2200 emit p2align format with last argument if it's not needed.
2201 * doc/invoke.texi: Document extended format of -falign-*.
2202 * final.c: Use align_labels alignment.
2203 * flags.h (struct target_flag_state): Change type to use
2204 align_flags.
2205 (struct align_flags_tuple): New.
2206 (struct align_flags): Likewise.
2207 (align_loops_log): Redefine macro to use new types.
2208 (align_loops_max_skip): Redefine macro to use new types.
2209 (align_jumps_log): Redefine macro to use new types.
2210 (align_jumps_max_skip): Redefine macro to use new types.
2211 (align_labels_log): Redefine macro to use new types.
2212 (align_labels_max_skip): Redefine macro to use new types.
2213 (align_functions_log): Redefine macro to use new types.
2214 (align_loops): Redefine macro to use new types.
2215 (align_jumps): Redefine macro to use new types.
2216 (align_labels): Redefine macro to use new types.
2217 (align_functions): Redefine macro to use new types.
2218 (align_functions_max_skip): Redefine macro to use new types.
2219 (align_loops_value): New macro.
2220 (align_jumps_value): New macro.
2221 (align_labels_value): New macro.
2222 (align_functions_value): New macro.
2223 * function.c (invoke_set_current_function_hook): Propagate
2224 alignment values from flags to global variables default in
2225 topleev.h.
2226 * ipa-icf.c (sem_function::equals_wpa): Use
2227 cl_optimization_option_eq instead of memcmp.
2228 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2229 of string types.
2230 (cl_optimization_stream_in): Likewise.
2231 * optc-save-gen.awk: Support strings in cl_optimization.
2232 * opth-gen.awk: Likewise.
2233 * opts.c (finish_options): Remove error checking of invalid
2234 value ranges.
2235 (MAX_CODE_ALIGN): Remove.
2236 (MAX_CODE_ALIGN_VALUE): Likewise.
2237 (parse_and_check_align_values): New function.
2238 (check_alignment_argument): Likewise.
2239 (common_handle_option): Use check_alignment_argument.
2240 * opts.h (parse_and_check_align_values): Declare.
2241 * toplev.c (init_alignments): Remove.
2242 (read_log_maxskip): New.
2243 (parse_N_M): Likewise.
2244 (parse_alignment_opts): Likewise.
2245 (backend_init_target): Remove usage of init_alignments.
2246 * toplev.h (parse_alignment_opts): Declare.
2247 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2248 argument.
2249 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2250 * tree.c (cl_option_hasher::equal): New.
2251 * varasm.c: Use new global macros.
2252
2253 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2254
2255 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2256 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2257 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2258 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2259 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2260 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2261 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2262 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2263 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2264 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2265 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2266 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2267 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2268
2269 2018-07-04 Martin Liska <mliska@suse.cz>
2270 Jonathan Wakely <jwakely@redhat.com>
2271
2272 * coverage.c: Use correct type.
2273 * doc/invoke.texi: Language correction.
2274
2275 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2276
2277 PR target/85620
2278 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2279 ENDBRANCH for non-tail call which may return via indirect branch.
2280 * doc/extend.texi: Document indirect_return attribute.
2281
2282 2018-07-03 Martin Sebor <msebor@redhat.com>
2283
2284 PR tree-optimization/86274
2285 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2286 precondition.
2287 (format_floating): Correct handling of infinities and NaNs.
2288
2289 2018-07-03 Martin Sebor <msebor@redhat.com>
2290
2291 * print-tree.c (print_real_cst): New function.
2292 (print_node_brief): Call it.
2293 (print_node): Ditto.
2294
2295 2018-07-03 Jeff Law <law@redhat.com>
2296
2297 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2298 into a single pattern.
2299
2300 * config/h8300/h8300.md (ors code_iterator): New.
2301 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2302 a single pattern and single splitter.
2303 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2304 (iorqi3_1, xorqi3_1): Likewise.
2305 (iorqi3, xorqi3 expanders): Similarly.
2306
2307 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2308 (movmd_internal) into a single pattern using the P mode iterator.
2309 (movmd splitters): Similarly.
2310 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2311 (movsd splitters): Similarly.
2312
2313 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2314 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2315 right table based on the size of the operand.
2316 * config/h8300/h8300.md (length_table): Corresponding changes. All
2317 references to "addb", "addw" and "addl" changed to "add".
2318 (btst patterns): Merge two variants into a single pattern.
2319 (tstqi, tsthi): Likewise.
2320 (addhi3_incdec, addsi3_incdec): Likewise.
2321 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2322 (mulhi3, mulsi3): Likewise.
2323 (udivhi3, udivsi3): Likewise.
2324 (divhi3, divsi3): Likewise.
2325 (andorqi3, andorhi3, andorsi3): Likewise.
2326
2327 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2328
2329 PR target/85694
2330 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2331 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2332
2333 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2334
2335 PR tree-optimization/85694
2336 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2337 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2338 UNSPEC_URHADD.
2339 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2340 (<u>avg<mode>3_ceil): New patterns.
2341
2342 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2343
2344 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2345 scan-tree-dump directive.
2346 * gcc.dg/vect/slp-perm-2.c: Likewise.
2347 * gcc.dg/vect/slp-perm-3.c: Likewise.
2348 * gcc.dg/vect/slp-perm-5.c: Likewise.
2349 * gcc.dg/vect/slp-perm-6.c: Likewise.
2350 * gcc.dg/vect/slp-perm-7.c: Likewise.
2351 * gcc.dg/vect/slp-perm-8.c: Likewise.
2352
2353 2018-07-03 Marek Polacek <polacek@redhat.com>
2354
2355 PR middle-end/86202
2356 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2357
2358 2018-07-03 Richard Biener <rguenther@suse.de>
2359
2360 PR ipa/86389
2361 * tree-ssa-structalias.c (find_func_clobbers): Properly
2362 handle indirect calls.
2363
2364 2018-07-03 Jeff Law <law@redhat.com>
2365
2366 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2367 (shifts): New code iterator.
2368 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2369 expander. Fix HImode handling on H8/SX.
2370 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2371 (subqi3, subhi3, subsi3 expanders): Likewise.
2372 (andqi3, andhi3, andsi3 expanders): Likewise.
2373 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2374 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2375 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2376 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2377 (zero_extendqihi2, zero_extendqisi2): Likewise.
2378 (extendqihi2, extendqisi2): Likewise.
2379 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2380 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2381 (rotlqi3_1, rotlhi3_1): Likewise.
2382 (logicalhi3_sn, logicalsi3_sn): Likewise.
2383 (logicalhi3, logicalsi3): Likewise.
2384
2385 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2386
2387 * tree-vect-patterns.c (vect_recog_rotate_pattern)
2388 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2389 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2390 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2391 type to append_pattern_def_seq instead of creating a stmt_vec_info
2392 directly.
2393 (build_mask_conversion): Likewise. Remove vinfo argument.
2394 (vect_add_conversion_to_patterm): Likewise, renaming to...
2395 (vect_add_conversion_to_pattern): ...this.
2396 (vect_recog_mask_conversion_pattern): Update call to
2397 build_mask_conversion. Pass the vector type to
2398 append_pattern_def_seq here too.
2399 (vect_recog_gather_scatter_pattern): Update call to
2400 vect_add_conversion_to_pattern.
2401
2402 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2403
2404 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2405 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2406 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2407 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2408 STMT_VINFO_PATTERN_DEF_SEQ to null here.
2409 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2410 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2411 append_pattern_def_seq instead of new_pattern_def_seq.
2412 (vect_recog_divmod_pattern): Do both of the above.
2413 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2414 is null.
2415
2416 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2417
2418 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2419 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2420 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2421 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2422 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2423 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2424 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2425 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2426 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2427 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2428 parameter with a single stmt_vec_info.
2429 (vect_recog_func_ptr): Likewise.
2430 (vect_recog_gather_scatter_pattern): Likewise, folding in...
2431 (vect_try_gather_scatter_pattern): ...this.
2432 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2433 the stmt_vec_info of the statement to be matched. Don't clear
2434 STMT_VINFO_RELATED_STMT.
2435 (vect_pattern_recog): Update call accordingly.
2436
2437 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2438
2439 PR tree-optimization/85694
2440 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2441 (uavgM3_ceil): Document new optabs.
2442 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2443 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2444 functions.
2445 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2446 (savg_ceil_optab): New optabs.
2447 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2448 (vect_vect_recog_func_ptrs): Add it.
2449 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2450 constant directly from the associated lhs.
2451
2452 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2453
2454 * tree-vect-patterns.c (vect_split_statement): New function.
2455 (vect_convert_input): Use it to try to split an existing cast.
2456
2457 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2458
2459 * poly-int.h (print_hex): New function.
2460 * dumpfile.h (dump_dec, dump_hex): Declare.
2461 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2462 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2463 min_input_precision, operation_precision and operation_sign.
2464 * tree-vect-patterns.c (vect_get_range_info): New function.
2465 (vect_same_loop_or_bb_p, vect_single_imm_use)
2466 (vect_operation_fits_smaller_type): Delete.
2467 (vect_look_through_possible_promotion): Add an optional
2468 single_use_p parameter.
2469 (vect_recog_over_widening_pattern): Rewrite to use new
2470 stmt_vec_info infomration. Handle one operation at a time.
2471 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2472 (vect_truncatable_operation_p, vect_set_operation_type)
2473 (vect_set_min_input_precision): New functions.
2474 (vect_determine_min_output_precision_1): Likewise.
2475 (vect_determine_min_output_precision): Likewise.
2476 (vect_determine_precisions_from_range): Likewise.
2477 (vect_determine_precisions_from_users): Likewise.
2478 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2479 (vect_vect_recog_func_ptrs): Put over_widening first.
2480 Add cast_forwprop.
2481 (vect_pattern_recog): Call vect_determine_precisions.
2482
2483 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2484
2485 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2486 statements that have been replaced by further pattern statements.
2487 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2488
2489 2018-07-03 Richard Biener <rguenther@suse.de>
2490
2491 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2492 always set *dt. Dump vectype in vectype overload.
2493 * dumpfile.h (dump_gimple_expr): New function.
2494 (dump_gimple_expr_loc): Likewise.
2495 * dumpfile.c (dump_gimple_expr): New function.
2496 (dump_gimple_expr_loc): Likewise.
2497
2498 2018-07-02 Jeff Law <law@redhat.com>
2499
2500 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2501 the H8/300, H8/300H and H8/S variants into a single pattern.
2502 (movhi_h8300, movqi_h8300hs): Similarly.
2503 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2504 (QHI mode iterator): New.
2505
2506 * config/h8300/h8300.md: Remove trailing whitespace.
2507
2508 2018-07-02 Jim Wilson <jimw@sifive.com>
2509
2510 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2511 instead of emit_insn for interrupt returns.
2512 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2513 (riscv_sret, riscv_uret): Likewise.
2514
2515 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2516
2517 * pretty-print.c (selftest::test_pp_format): Move save and restore
2518 of quotes to class auto_fix_quotes, and add an instance.
2519 * selftest.c: Include "intl.h".
2520 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2521 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2522 * selftest.h (selftest::auto_fix_quotes): New class.
2523
2524 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
2525
2526 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2527 (aarch64_sve_prepare_conditional_op): Remove.
2528 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2529 Allow aarch64_simd_reg_or_zero as select operand; remove
2530 the aarch64_sve_prepare_conditional_op call.
2531 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2532 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2533 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2534 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2535 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2536 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2537 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2538 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2539 and a splitters to match all of the *_any patterns.
2540 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2541
2542 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2543 (SVE_COND_FP_BINARY_REV): Remove.
2544 (sve_int_op_rev, sve_fp_op_rev): New.
2545 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2546 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2547 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2548 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2549 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2550 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2551 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2552 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2553 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2554
2555 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2556 Remove match_dup 1 from the inner unspec.
2557 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2558
2559 * config/aarch64/aarch64.md (movprfx): New attr.
2560 (length): Default movprfx to 8.
2561 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2562 (*madd<SVE_I>, *msub<SVE_I): Likewise.
2563 (*<su>mul<SVE_I>3_highpart): Likewise.
2564 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2565 (*v<ASHIFT><SVE_I>3): Likewise.
2566 (*<su><MAXMIN><SVE_I>3): Likewise.
2567 (*<su><MAXMIN><SVE_F>3): Likewise.
2568 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2569 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2570 (*div<SVE_F>4): Likewise.
2571
2572 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
2573
2574 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2575 in dump string.
2576
2577 2018-07-02 Richard Biener <rguenther@suse.de>
2578
2579 PR tree-optimization/86363
2580 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2581 memset argument refers to a non-variable address.
2582
2583 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2584
2585 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2586 {PLUS,MINUS}_EXPR code to...
2587 (adjust_symbolic_bound): ...here,
2588 (combine_bound): ...here,
2589 (set_value_range_with_overflow): ...and here.
2590
2591 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2592
2593 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2594 code...
2595 (extract_range_from_abs_expr): ...here.
2596
2597 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
2598
2599 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2600 -fno-omit-frame-pointer when not optimizing.
2601
2602 2018-07-02 Martin Liska <mliska@suse.cz>
2603
2604 PR ipa/86279
2605 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2606 (propagate_nothrow): Likewise.
2607
2608 2018-07-02 Martin Liska <mliska@suse.cz>
2609
2610 PR ipa/86323
2611 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2612
2613 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2614
2615 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2616 function in r262149, changing "loc" param from source_location to
2617 const dump_location_t &.
2618 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2619 declaration, as above.
2620
2621 2018-07-01 Paul Koning <ni1d@arrl.net>
2622
2623 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2624 -munit-asm, -mgnu-asm, -mdec-asm.
2625 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2626 (pdp11_output_labelref): New.
2627 (pdp11_output_def): New.
2628 (pdp11_output_addr_vec_elt): New.
2629 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2630 %# and %@ format codes.
2631 (pdp11_option_override): New.
2632 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2633 (pdp11_output_ident): New.
2634 (pdp11_asm_named_section): New.
2635 (pdp11_asm_init_sections): New.
2636 (pdp11_file_start): New.
2637 (pdp11_file_end): New.
2638 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2639 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2640 %o, like %c but octal.
2641 (pdp11_option_override): New.
2642 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2643 -mdec-asm.
2644 (DATA_SECTION_ASM_OP): Ditto.
2645 (READONLY_DATA_SECTION_ASM_OP): New.
2646 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2647 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2648 (ASM_OUTPUT_LABELREF): Ditto.
2649 (ASM_OUTPUT_DEF): Ditto.
2650 (ASM_OUTPUT_EXTERNAL): New.
2651 (ASM_OUTPUT_SOURCE_FILENAME): New.
2652 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2653 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2654 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
2655 %# and %@ format codes.
2656 * config/pdp11/pdp11.opt (mgnu-asm): New.
2657 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2658 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2659 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2660
2661 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
2662
2663 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2664 dereferencing path[] beyond its length.
2665 (debug_path): New.
2666 (debug_all_paths): New.
2667 (rewire_first_differing_edge): New.
2668 (adjust_paths_after_duplication): New.
2669 (duplicate_thread_path): Call adjust_paths_after_duplication.
2670 Add new argument.
2671 (thread_through_all_blocks): Add new argument to
2672 duplicate_thread_path.
2673
2674 2018-06-30 Jim Wilson <jimw@sifive.com>
2675
2676 * config/riscv/predicates.md (p2m1_shift_operand): New.
2677 (high_mask_shift_operand): New.
2678 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2679 pattern using p2m1_shift_operand.
2680 (lshsi3_zero_extend_3+2): New combiner pattern using
2681 high_mask_shift_operand.
2682
2683 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2684
2685 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2686 split out from...
2687 (vect_recog_rotate_pattern): ...here.
2688 (vect_convert_input): Try to insert casts of invariants in the
2689 preheader.
2690 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2691 preheader to be empty.
2692
2693 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2694
2695 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2696 vector type. If given, install it in the new statement's
2697 STMT_VINFO_VECTYPE.
2698 (vect_element_precision): New function.
2699 (vect_unpromoted_value): New struct.
2700 (vect_unpromoted_value::vect_unpromoted_value): New function.
2701 (vect_unpromoted_value::set_op): Likewise.
2702 (vect_look_through_possible_promotion): Likewise.
2703 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2704 (vect_widened_op_tree, vect_convert_input): Likewise.
2705 (vect_convert_inputs, vect_convert_output): Likewise.
2706 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2707 to handle the optional cast of the multiplication result and
2708 vect_widened_op_tree to detect the widened multiplication itself.
2709 Do not require the input and output of promotion casts to have
2710 the same sign, but base the signedness of the operation on the
2711 input rather than the result. If the pattern includes two
2712 promotions, check that those promotions have the same sign.
2713 Do not restrict the MULT_EXPR handling to a double-width result;
2714 handle quadruple-width results and wider. Use vect_convert_inputs
2715 to convert the inputs to the common type.
2716 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
2717 to handle the optional cast of the ABS result. Also allow a sign
2718 change or a sign extension between the ABS and MINUS.
2719 Use vect_widened_op_tree to detect the widened subtraction and use
2720 vect_convert_inputs to convert the inputs to the common type.
2721 (vect_handle_widen_op_by_const): Delete.
2722 (vect_recog_widen_op_pattern): New function.
2723 (vect_recog_widen_mult_pattern): Use it.
2724 (vect_recog_widen_shift_pattern): Likewise.
2725 (vect_recog_widen_sum_pattern): Use
2726 vect_look_through_possible_promotion to handle the promoted
2727 PLUS_EXPR operand.
2728
2729 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2730
2731 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2732 the containing gimple_seq *.
2733 * gimple-iterator.h (gsi_for_stmt): Declare it.
2734 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2735 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2736 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2737 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2738 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2739 checks.
2740 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2741 split out from...
2742 (vect_mark_pattern_stmts): ...here. Handle cases in which the
2743 statement being replaced is part of an existing pattern
2744 definition sequence, inserting the new pattern statements before
2745 the original one.
2746 (vect_pattern_recog_1): Don't return a bool. If the statement
2747 is already part of a pattern, instead apply pattern matching
2748 to the pattern definition statements. Don't clear the
2749 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2750 (vect_pattern_recog): Don't break after the first match;
2751 continue processing the pattern definition statements instead.
2752 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2753
2754 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2755
2756 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2757 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2758 (vect_recog_widen_sum_pattern): Use it.
2759
2760 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2761
2762 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2763 phi is not a pattern statement and has not been replaced by
2764 a pattern statement.
2765 * tree-vect-patterns.c (type_conversion_p): Don't check
2766 STMT_VINFO_IN_PATTERN_P.
2767 (vect_recog_vector_vector_shift_pattern): Likewise.
2768 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2769 the pattern statement rather than the original statement; check
2770 directly for a WIDEN_MULT_EXPR here.
2771 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2772 vect_is_simple_use to return the pattern statement rather
2773 than the original statement; use is_pattern_stmt_p to check
2774 for such a pattern statement.
2775 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2776 to return the pattern statement rather than the original statement;
2777 don't do the same transformation here.
2778 (vect_is_simple_use): If the defining statement has been replaced
2779 by a pattern statement, return the pattern statement instead.
2780 Remove the corresponding (local) transformation from the vectype
2781 overload.
2782
2783 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2784
2785 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2786 end and default to null.
2787 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2788 (vectorizable_reduction): Update calls accordingly, dropping the
2789 gimple ** argument if the passed-back statement isn't needed.
2790 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2791 (vect_recog_rotate_pattern): Likewise.
2792 (vect_recog_mask_conversion_pattern): Likewise.
2793 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2794 (vect_mask_constant_operand_p): Likewise.
2795 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2796 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2797 (get_group_load_store_type, get_load_store_type): Likewise.
2798 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2799 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2800 (vectorizable_conversion, vectorizable_assignment): Likewise.
2801 (vectorizable_shift, vectorizable_operation): Likewise.
2802 (vectorizable_store, vect_is_simple_cond): Likewise.
2803 (vectorizable_condition, vectorizable_comparison): Likewise.
2804 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2805 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2806 and move it to the end. Cope with null def_stmt_outs.
2807
2808 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2809
2810 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2811
2812 2018-06-29 Jeff Law <law@redhat.com>
2813
2814 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2815 displacements for TARGET_V850E2V3 and newer.
2816 (TARGET_LRA_P): Remove. Defaults to LRA now.
2817 * config/v850/v850.md (sign23byte_load): Remove.
2818 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2819 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2820
2821 2018-06-29 Martin Liska <mliska@suse.cz>
2822
2823 PR lto/85759
2824 * coverage.c (coverage_init): Mangle full path name.
2825 * doc/invoke.texi: Document the change.
2826 * gcov-io.c (mangle_path): New.
2827 * gcov-io.h (mangle_path): Likewise.
2828 * gcov.c (mangle_name): Use mangle_path for path mangling.
2829
2830 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2831
2832 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2833 if starting source register is not even.
2834
2835 2018-06-29 Martin Liska <mliska@suse.cz>
2836
2837 PR tree-optimization/86263
2838 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2839 Make edge redirection.
2840
2841 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2842
2843 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2844 (dump_scope_depth): New variable.
2845 (get_dump_scope_depth): New function.
2846 (dump_begin_scope): New function.
2847 (dump_end_scope): New function.
2848 * dumpfile.h (get_dump_scope_depth): New declaration.
2849 (dump_begin_scope): New declaration.
2850 (dump_end_scope): New declaration.
2851 (class auto_dump_scope): New class.
2852 (AUTO_DUMP_SCOPE): New macro.
2853 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2854 AUTO_DUMP_SCOPE.
2855
2856 2018-06-29 Richard Biener <rguenther@suse.de>
2857
2858 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2859 compute_all_dependences succeeds.
2860 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2861 exceed --param loop-max-datarefs-for-datadeps.
2862
2863 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2864
2865 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2866
2867 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2868
2869 PR target/86348
2870 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2871 alternative 0 in preferred_for_speed attribute.
2872
2873 2018-06-28 Paul Koning <ni1d@arrl.net>
2874
2875 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2876 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2877 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2878 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2879 for shift insn patterns.
2880
2881 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2882
2883 * cgraph.c (cgraph_node::get_body): Replace assignments to
2884 "dump_file" with calls to set_dump_file.
2885 * dumpfile.c (alt_dump_file): Make static, and group with...
2886 (alt_flags): ...this definition.
2887 (dumps_are_enabled): New variable.
2888 (refresh_dumps_are_enabled): New function.
2889 (set_dump_file): New function.
2890 (set_alt_dump_file): New function.
2891 (gcc::dump_manager::dump_start): Replace assignments to
2892 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2893 set_alt_dump_file.
2894 (gcc::dump_manager::dump_finish): Likewise.
2895 * dumpfile.h (alt_dump_file): Delete decl.
2896 (dumps_are_enabled): New variable decl.
2897 (set_dump_file): New function decl.
2898 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2899 global.
2900 * tree-nested.c (lower_nested_functions): Replace assignments to
2901 "dump_file" with calls to set_dump_file.
2902
2903 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2904
2905 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2906 goto_locus of each outgoing edge of each basic block.
2907
2908 2018-06-28 Richard Biener <rguenther@suse.de>
2909
2910 * dwarf2out.c (decl_scope_table): Remove.
2911 (push_decl_scope): Likewise.
2912 (pop_decl_scope): Likewise.
2913 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2914 (gen_struct_or_union_type_die): Likewise.
2915 (gen_tagged_type_die): Likewise.
2916 (dwarf2out_init): Do not initialize decl_scope_table.
2917 (dwarf2out_c_finalize): Do not free it.
2918
2919 2018-06-28 Richard Biener <rguenther@suse.de>
2920
2921 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2922 deciding whether to not re-use a DIE.
2923
2924 2018-06-28 Richard Biener <rguenther@suse.de>
2925
2926 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2927 DW_AT_abstract_origin attribute.
2928
2929 2018-06-28 Martin Liska <mliska@suse.cz>
2930
2931 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2932 Use newly introduced constants.
2933 * tree-switch-conversion.h (struct jump_table_cluster):
2934 Define max_ratio_for_size and max_ratio_for_speed.
2935
2936 2018-06-28 Martin Liska <mliska@suse.cz>
2937
2938 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2939 Add new checking assert to catch invalid state.
2940 (jump_table_cluster::can_be_handled): Handle single case
2941 clusters.
2942 (jump_table_cluster::is_beneficial): Bail out for such case.
2943 (bit_test_cluster::find_bit_tests):
2944 Add new checking assert to catch invalid state.
2945 (bit_test_cluster::can_be_handled): Handle single case
2946 clusters.
2947 (bit_test_cluster::is_beneficial): Bail out for such case.
2948 (switch_decision_tree::analyze_switch_statement):
2949 Fix comment.
2950
2951 2018-06-28 Martin Liska <mliska@suse.cz>
2952
2953 * common.opt: Introduce -completion option.
2954 * gcc.c (driver_handle_option): Handle it.
2955 (driver::main): Print completions if completion
2956 is set.
2957 * opt-suggestions.c (option_proposer::get_completions):
2958 New function.
2959 (option_proposer::suggest_completion): Likewise.
2960 (option_proposer::find_param_completions): Likewise.
2961 (verify_autocompletions): Likewise.
2962 (test_completion_valid_options): Likewise.
2963 (test_completion_valid_params): Likewise.
2964 (in_completion_p): Likewise.
2965 (empty_completion_p): Likewise.
2966 (test_completion_partial_match): Likewise.
2967 (test_completion_garbage): Likewise.
2968 (opt_proposer_c_tests): Likewise.
2969 * opt-suggestions.h: Declare new functions.
2970 * opts.c (common_handle_option): Handle OPT__completion_.
2971 * selftest-run-tests.c (selftest::run_tests): Add
2972 opt_proposer_c_tests.
2973 * selftest.c (assert_str_startswith): New.
2974 * selftest.h (assert_str_startswith): Likewise.
2975 (opt_proposer_c_tests): New.
2976 (ASSERT_STR_STARTSWITH): Likewise.
2977
2978 2018-06-28 Martin Liska <mliska@suse.cz>
2979
2980 * Makefile.in: Add opt-suggestions.o.
2981 * gcc-main.c: Include opt-suggestions.h.
2982 * gcc.c (driver::driver): Likewise.
2983 (driver::~driver): Remove m_option_suggestions.
2984 (driver::build_option_suggestions): Moved to option_proposer.
2985 (driver::suggest_option): Likewise.
2986 (driver::handle_unrecognized_options): Use option_proposer.
2987 * gcc.h (class driver): Add new memver m_option_proposer.
2988 * opt-suggestions.c: New file.
2989 * opt-suggestions.h: New file.
2990
2991 2018-06-28 Martin Liska <mliska@suse.cz>
2992
2993 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2994 (auto_string_vec::~auto_string_vec): Likewise.
2995
2996 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2997
2998 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2999 prevent_decl_creation_for_types fields up and add reset_location field.
3000 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3001 statement if id->reset_location is true.
3002 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3003 id->reset_location is true.
3004 (copy_phis_for_bb): Force input_location on the arguments if
3005 id->reset_location is true.
3006 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3007 is set on the function to be inlined.
3008
3009 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3010
3011 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3012
3013 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3014
3015 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3016 registers for Pmode.
3017 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3018 hard registers for the clobbered pseudo.
3019
3020 2018-06-27 Paul Koning <ni1d@arrl.net>
3021
3022 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3023 mutually exclusive options.
3024 * config/pdp11/constraints.md (h): New constraint.
3025 (O): Update definition to match shift code generation.
3026 (D): New constraint.
3027 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3028 (CCFP): Remove.
3029 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3030 function.
3031 (output_jump): Change arguments.
3032 (pdp11_fixed_cc_regs): New function.
3033 (pdp11_cc_mode): Ditto.
3034 (pdp11_expand_shift): Ditto.
3035 (pdp11_assemble_shift): Ditto.
3036 (pdp11_small_shift): Ditto.
3037 (pdp11_branch_cost): Remove.
3038 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3039 from output.
3040 (pdp11_register_move_cost): Update for CC registers.
3041 (pdp11_rtx_costs): Add case for LSHIFTRT.
3042 (pdp11_output_jump): Add CCNZ mode conditional branches.
3043 (notice_update_cc_on_set): Remove.
3044 (pdp11_cc_mode): New function.
3045 (simple_memory_operand): Correct pre/post decrement case.
3046 (no_side_effect_operand): New function.
3047 (pdp11_regno_reg_class): Add CC_REGS class.
3048 (pdp11_fixed_cc_regs): New function.
3049 (pdp11_small_shift): New function.
3050 (pdp11_expand_shift): New function to expand shift insns.
3051 (pdp11_assemble_shift): New function to output shifts.
3052 (pdp11_branch_cost): Remove.
3053 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3054 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3055 (WCHAR_TYPE): Ditto.
3056 (PTRDIFF_TYPE): Ditto.
3057 (ADJUST_INSN_LENGTH): New macro.
3058 (FIXED_REGISTERS): Add CC registers.
3059 (CALL_USED_REGISTERS): Ditto.
3060 (reg_class): Ditto.
3061 (REG_CLASS_NAMES): Ditto.
3062 (REG_CLASS_CONTENTS): Ditto.
3063 (SELECT_CC_MODE): Use new function.
3064 (TARGET_FLAGS_REGNUM): New macro.
3065 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3066 (cc0_reg_rtx): Remove.
3067 (CC_STATUS_MDEP): Remove.
3068 (CC_STATUS_MDEFP_INIT): Remove.
3069 (CC_IN_FPU): Remove.
3070 (NOTICE_UPDATE_CC): Remove.
3071 (REGISTER_NAMES): Add CC registers.
3072 (BRANCH_COST): Change to constant 1.
3073 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3074 handling.
3075 * config/pdp11/pdp11.opt (mbcopy): Remove.
3076 (mbcopy-builtin): Remove.
3077 (mbranch-cheap): Remove.
3078 (mbranch-expensive): Remove.
3079 * config/pdp11/predicates.md (expand_shift_operand): Update to
3080 match shift code generation.
3081 (ccnz_operator): New predicate.
3082 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3083 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3084 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3085 exclusive options.
3086 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3087 description of O constraint.
3088
3089 2018-06-27 Jeff Law <law@redhat.com>
3090 Austin Law <austinklaw@gmail.com>
3091
3092 * config/v850/v850.md (addsi3_set_flags): New pattern.
3093 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3094 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3095 (zero_extendhisi2_v850_set_flags): Likewise.
3096 (zero_extendqisi2_v850_set_flags): Likewise.
3097 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3098 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3099 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3100
3101 * config/v850/v850-protos.h (notice_update_cc): Remove.
3102 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3103 (v850_print_operand): Handle 'D' and "d".
3104 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3105 Add handling of arithmetic/logical operations compared against zero.
3106 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3107 Do not look at v850_compare_op, instead get mode from last argument.
3108 (v850_gen_compare): Remove
3109 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3110 after reload for prologue insns.
3111 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3112 patterns.
3113 (construct_save_jarl): Likewise.
3114 (TARGET_FLAGS_REGNUM): Define.
3115 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3116 (NOTICE_UPDATE_CC): Remove.
3117 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3118 than cc0. Conditionalize on reload_completed.
3119 (cmpsi_insn, setfcc_insn): Likewise.
3120 (tst1 splitter): Turn into define_and_split which sets the flags
3121 after reload.
3122 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3123 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3124 (cstoresf4, cstoredf4): Clobber the flags.
3125 (cmpsi, cmpsf, cmpdf): Remove expanders.
3126 (setf_insn): Remove pattern.
3127 (addsi3): Turn into define_and_split which clobbers the flags after
3128 reload and a suitable pattern (addsi3_clobber_flags) for use after
3129 reload.
3130 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3131 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3132 (ashrsi3, ashrsi3_v850e2): Likewise.
3133 (bins): Clobber the flags.
3134 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3135 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3136 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3137 (call_value_internal_short, call_value_internal_long): Likewise.
3138 (callt_save_interrupt, callt_return_interrupt): Likewise.
3139 (save_interrupt, return_interrupt): Likewise.
3140 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3141 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3142 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3143 (All FP comparisons): Only allow after reload has completed.
3144 (trfsr): Likewise.
3145 (divh, divhu): Tweak output template.
3146 (branch_z_normal, branch_z_invert): Remove
3147 (branch_nz_normal, branch_nz_invert): Likewise.
3148 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3149
3150 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3151 * config/v850/v850.c (notice_update_cc): Remove.
3152 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3153 (CC_NO_CARRY): Likewise.
3154 (NOTICE_UPDATE_CC): Define to nothing.
3155 * config/v850/v850.md: Remove block comment on cc0 handling
3156 Remove "cc" attribute from all patterns. Remove cc_status handling
3157 from all patterns. Minor formatting fixes.
3158
3159 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3160
3161 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3162 (cortex-a76.cortex-a55): Likewise.
3163 * config/aarch64/aarch64-tune.md: Regenerate.
3164 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3165 cortex-a76.cortex-a55.
3166
3167 2018-06-27 Jeff Law <law@redhat.com>
3168
3169 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3170 (MULTILIB_DIRNAMES): Similarly.
3171
3172 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3173
3174 * gimple.h (gimple_return_retbnd): Delete.
3175 (gimple_return_set_retbnd): Likewise.
3176 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3177 gimple_return_set_retbnd.
3178 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3179 gimple_return_retbnd and adjust.
3180 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3181 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3182 Explicitly return NULL in a couple more cases. Move assertion
3183 on debug statements and remove unreachable code.
3184 (reset_debug_binding): Do not test id->retbnd.
3185 (expand_call_inline): Do not set it.
3186
3187 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3188
3189 * configure.ac: Add --disable-gcov option.
3190 * configure: Regenerate.
3191 * Makefile.in: Honour @enable_gcov@.
3192 * doc/install.texi: Document --disable-gcov.
3193
3194 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3195
3196 * config/arm/arm-cpus.in (cortex-a76): New entry.
3197 (cortex-a76.cortex-a55): Likewise.
3198 * config/arm/arm-tables.opt: Regenerate.
3199 * config/arm/arm-tune.md: Likewise.
3200 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3201 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3202 cortex-a76.cortex-a55.
3203
3204 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3205
3206 PR target/85769
3207 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3208
3209 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3210
3211 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3212 comment.
3213 (EPILOGUE_USES): Likewise.
3214
3215 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3216
3217 * tree-inline.c (remap_location): New function extracted from...
3218 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3219 (copy_phis_for_bb): ...here. Call remap_location.
3220 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3221
3222 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3223
3224 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3225 unaligned vsx for 16B memset.
3226
3227 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3228
3229 PR target/86285
3230 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3231 ieee128_float_type_node to long_double_type_node unless
3232 TARGET_LONG_DOUBLE_128 is set.
3233
3234 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3235
3236 * cfgloop.c (get_loop_location): Convert return type from
3237 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3238 by implicit construction from rtx_insn *, and using
3239 dump_user_location_t::from_function_decl for the fallback case.
3240 * cfgloop.h (get_loop_location): Convert return type from
3241 location_t to dump_user_location_t.
3242 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3243 dump_printf_loc to pass in a dump_location_t rather than a
3244 location_t, via the gimple stmt.
3245 * coverage.c (get_coverage_counts): Update calls to
3246 dump_printf_loc to pass in dump_location_t rather than a
3247 location_t.
3248 * doc/optinfo.texi (Dump types): Convert example of
3249 dump_printf_loc from taking "locus" to taking "insn". Update
3250 description of the "_loc" calls to cover dump_location_t.
3251 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3252 "selftest.h".
3253 (dump_user_location_t::dump_user_location_t): New constructors,
3254 from gimple *stmt and rtx_insn *.
3255 (dump_user_location_t::from_function_decl): New function.
3256 (dump_loc): Make static.
3257 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3258 const dump_location_t &.
3259 (dump_generic_expr_loc): Delete.
3260 (dump_printf_loc): Convert param "loc" from location_t to
3261 const dump_location_t &.
3262 (selftest::test_impl_location): New function.
3263 (selftest::dumpfile_c_tests): New function.
3264 * dumpfile.h: Include "profile-count.h".
3265 (class dump_user_location_t): New class.
3266 (struct dump_impl_location_t): New struct.
3267 (class dump_location_t): New class.
3268 (dump_printf_loc): Convert 2nd param from source_location to
3269 const dump_location_t &.
3270 (dump_generic_expr_loc): Delete.
3271 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3272 const dump_location_t &.
3273 * gimple-fold.c (fold_gimple_assign): Update call to
3274 dump_printf_loc to pass in a dump_location_t rather than a
3275 location_t, via the gimple stmt.
3276 (gimple_fold_call): Likewise.
3277 * gimple-loop-interchange.cc
3278 (loop_cand::analyze_iloop_reduction_var): Update for change to
3279 check_reduction_path.
3280 (tree_loop_interchange::interchange): Update for change to
3281 find_loop_location.
3282 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3283 change in return-type of find_loop_location.
3284 (graphite_regenerate_ast_isl): Likewise.
3285 * graphite-optimize-isl.c (optimize_isl): Likewise.
3286 * graphite.c (graphite_transform_loops): Likewise.
3287 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3288 pass in a dump_location_t rather than a location_t, via the
3289 gimple stmt.
3290 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3291 * ipa.c (walk_polymorphic_call_targets): Likewise.
3292 * loop-unroll.c (report_unroll): Convert "locus" param from
3293 location_t to dump_location_t.
3294 (decide_unrolling): Update for change to get_loop_location's
3295 return type.
3296 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3297 location_t to dump_user_location_t.
3298 (grid_find_single_omp_among_assignments_1): Updates calls to
3299 dump_printf_loc to pass in a dump_location_t rather than a
3300 location_t, via the gimple stmt.
3301 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3302 location_t to dump_location_t. Updates calls to dump_printf_loc
3303 to pass in a dump_location_t rather than a location_t, via the
3304 gimple stmt.
3305 (grid_inner_loop_gridifiable_p): Likewise.
3306 (grid_dist_follows_simple_pattern): Likewise.
3307 (grid_gfor_follows_tiling_pattern): Likewise.
3308 (grid_target_follows_gridifiable_pattern): Likewise.
3309 (grid_attempt_target_gridification): Convert initialization
3310 of local "grid" from memset to zero-initialization; FIXME: does
3311 this require C++11? Update call to dump_printf_loc to pass in a
3312 optinfo_location rather than a location_t, via the gimple stmt.
3313 * profile.c (read_profile_edge_counts): Updates call to
3314 dump_printf_loc to pass in a dump_location_t rather than a
3315 location_t
3316 (compute_branch_probabilities): Likewise.
3317 * selftest-run-tests.c (selftest::run_tests): Call
3318 dumpfile_c_tests.
3319 * selftest.h (dumpfile_c_tests): New decl.
3320 * tree-loop-distribution.c (pass_loop_distribution::execute):
3321 Update for change in return type of find_loop_location.
3322 * tree-parloops.c (parallelize_loops): Likewise.
3323 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3324 "locus" from location_t to dump_user_location_t.
3325 (canonicalize_loop_induction_variables): Likewise.
3326 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3327 for change in return type of find_loop_location.
3328 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3329 to dump_printf_loc to pass in a dump_location_t rather than a
3330 location_t, via the stmt.
3331 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3332 Likewise.
3333 * tree-vect-loop-manip.c (find_loop_location): Convert return
3334 type from source_location to dump_user_location_t.
3335 (vect_do_peeling): Update for above change.
3336 (vect_loop_versioning): Update for change in type of
3337 vect_location.
3338 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3339 from location_t to dump_user_location_t.
3340 (vect_estimate_min_profitable_iters): Update for change in type
3341 of vect_location.
3342 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3343 location_t to dump_location_t.
3344 (vect_slp_bb): Update for change in type of vect_location.
3345 * tree-vectorizer.c (vect_location): Convert from source_location
3346 to dump_user_location_t.
3347 (try_vectorize_loop_1): Update for change in vect_location's type.
3348 (vectorize_loops): Likewise.
3349 (increase_alignment): Likewise.
3350 * tree-vectorizer.h (vect_location): Convert from source_location
3351 to dump_user_location_t.
3352 (find_loop_location): Convert return type from source_location to
3353 dump_user_location_t.
3354 (check_reduction_path): Convert 1st param from location_t to
3355 dump_user_location_t.
3356 * value-prof.c (check_counter): Update call to dump_printf_loc to
3357 pass in a dump_user_location_t rather than a location_t; update
3358 call to error_at for change in type of "locus".
3359 (check_ic_target): Update call to dump_printf_loc to
3360 pass in a dump_user_location_t rather than a location_t, via the
3361 call_stmt.
3362
3363 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3364
3365 * config/s390/s390.h (enum processor_flags): Do not use
3366 default tune parameter when -march was specified.
3367
3368 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3369
3370 PR target/86314
3371 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3372 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3373 operands.
3374
3375 2018-06-26 Richard Biener <rguenther@suse.de>
3376
3377 PR tree-optimization/86287
3378 PR bootstrap/86316
3379 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3380 (vect_analyze_loop): Initialize n_stmts.
3381
3382 2018-06-26 Richard Biener <rguenther@suse.de>
3383
3384 PR middle-end/86271
3385 * fold-const.c (fold_convertible_p): Pointer extension
3386 isn't valid.
3387
3388 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
3389
3390 PR debug/86064
3391 * dwarf2out.c (loc_list_has_views): Adjust comments.
3392 (dw_loc_list): Split single cross-partition range with
3393 nonzero locview.
3394
3395 2018-06-25 Jeff Law <law@redhat.com>
3396
3397 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3398 on -mbig-switch by default.
3399
3400 * config/v850/predicates.md (const_float_1_operand): Fix match_code
3401 test.
3402 (const_float_0_operand): Remove unused predicate.
3403 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3404 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3405 (recipsf2): New expander. Original pattern now called
3406 (recipsf2_insn).
3407 (recipdf2, recipdf2_insn): Similarly.
3408 (rsqrtsf2, rsqrtsf2_insn): Similarly
3409 (rsqrtdf2, rsqrtdf2_insn): Similarly
3410
3411 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
3412
3413 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3414 Simplify logic for FreeBSD (twice).
3415
3416 2018-06-25 Martin Sebor <msebor@redhat.com>
3417
3418 PR tree-optimization/86204
3419 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3420 a strnlen result if it's less than the length of the string.
3421
3422 2018-06-25 Martin Sebor <msebor@redhat.com>
3423
3424 PR tree-optimization/85700
3425 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3426 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3427 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3428
3429 2018-06-25 Martin Sebor <msebor@redhat.com>
3430
3431 * doc/extend.texi (Zero-length arrays): Update and clarify.
3432
3433 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3434
3435 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3436 added IEEE/IBM long double multilib support on PowerPC little
3437 endian Linux systems.
3438 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3439 (MULTILIB_DEFAULTS): Likewise.
3440 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3441 Likewise.
3442 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3443 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3444 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3445
3446 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
3447
3448 PR middle-end/86311
3449 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3450 (REORDER_45): Likewise.
3451
3452 2018-06-25 Jeff Law <law@redhat.com>
3453
3454 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3455 dividend to 32 bits. Adjust length.
3456 (udivmodhi4): Cleanup output template. Fix length.
3457
3458 2018-06-25 Carl Love <cel@us.ibm.com>
3459
3460 * config/rs6000/vsx.md: Change word selector to prefered location.
3461
3462 2018-06-25 Richard Biener <rguenther@suse.de>
3463
3464 PR tree-optimization/86304
3465 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3466 epilogue-if-converted loops as well.
3467
3468 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
3469
3470 * lto-section-out.c (lto_begin_section): Do not print section
3471 name for noaddr and unnumbered dumps.
3472
3473 2018-06-25 Richard Biener <rguenther@suse.de>
3474
3475 * tree-vectorizer.h (struct vec_info_shared): New structure
3476 with parts split out from struct vec_info and loop_nest from
3477 struct _loop_vec_info.
3478 (struct vec_info): Adjust accordingly.
3479 (struct _loop_vec_info): Likewise.
3480 (LOOP_VINFO_LOOP_NEST): Adjust.
3481 (LOOP_VINFO_DATAREFS): Likewise.
3482 (LOOP_VINFO_DDRS): Likewise.
3483 (struct _bb_vec_info): Likewise.
3484 (BB_VINFO_DATAREFS): Likewise.
3485 (BB_VINFO_DDRS): Likewise.
3486 (struct _stmt_vec_info): Add dr_aux member.
3487 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3488 (DR_MISALIGNMENT_UNINITIALIZED): New.
3489 (set_dr_misalignment): Adjust.
3490 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3491 (vect_analyze_loop): Adjust prototype.
3492 (vect_analyze_loop_form): Likewise.
3493 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3494 Compute dependences lazily.
3495 (vect_record_base_alignments): Use shared datarefs/ddrs.
3496 (vect_verify_datarefs_alignment): Likewise.
3497 (vect_analyze_data_refs_alignment): Likewise.
3498 (vect_analyze_data_ref_accesses): Likewise.
3499 (vect_analyze_data_refs): Likewise.
3500 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3501 constructor parameter for shared part.
3502 (vect_analyze_loop_form): Pass in shared part and adjust.
3503 (vect_analyze_loop_2): Pass in storage for the number of
3504 stmts. Move loop nest finding to the caller. Compute
3505 datarefs lazily.
3506 (vect_analyze_loop): Pass in shared part.
3507 (vect_transform_loop): Verify shared datarefs are unchanged.
3508 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3509 constructor parameter for shared part.
3510 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3511 (vect_slp_bb): Verify shared datarefs are unchanged before
3512 transform.
3513 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3514 change.
3515 (new_stmt_vec_info): Initialize DR_AUX misalignment to
3516 DR_MISALIGNMENT_UNINITIALIZED.
3517 * tree-vectorizer.c (vec_info::vec_info): Add constructor
3518 parameter for shared part.
3519 (vec_info::~vec_info): Adjust.
3520 (vec_info_shared::vec_info_shared): New.
3521 (vec_info_shared::~vec_info_shared): Likewise.
3522 (vec_info_shared::save_datarefs): Likewise.
3523 (vec_info_shared::check_datarefs): Likewise.
3524 (try_vectorize_loop_1): Construct shared part live for analyses
3525 of a single loop for multiple vector sizes.
3526 * tree-parloops.c (gather_scalar_reductions): Adjust.
3527
3528 2018-06-25 Richard Biener <rguenther@suse.de>
3529
3530 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3531 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3532 (vect_analyze_data_refs): Remove similar code from here and
3533 simplify accordingly.
3534
3535 2018-06-25 Richard Biener <rguenther@suse.de>
3536
3537 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3538 for reverse storage order accesses rather than asserting
3539 they cannot happen here.
3540
3541 2018-06-25 Tom de Vries <tdevries@suse.de>
3542
3543 PR debug/86257
3544 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3545 Use data16 instead of .byte for insn prefix.
3546
3547 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
3548
3549 PR C++/86082
3550 * parser.c (make_char_string_pack): Pass this literal chars
3551 through cpp_interpret_string.
3552 (cp_parser_userdef_numeric_literal): Check the result of
3553 make_char_string_pack.
3554
3555 2018-06-24 Maya Rashish <coypu@sdf.org>
3556
3557 * ginclude/stddef.h: Simplify conditions around avoiding
3558 re-definition of __size_t.
3559
3560 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3561
3562 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3563 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3564
3565 2018-06-22 Maya Rashish <coypu@sdf.org>
3566
3567 * doc/invoke.texi (mno-fancy-math-387): Update for changes
3568 made to OpenBSD and NetBSD through the years.
3569
3570 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3571
3572 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3573 behavior of vec_pack (vector double, vector double) to match
3574 behavior of vec_float2 (vector double, vector double).
3575
3576 2018-06-22 Olivier Hainque <hainque@adacore.com>
3577
3578 * gimplify.c (gimplify_function_tree): Prevent creation
3579 of a trampoline for the address of the current function
3580 passed to entry/exit instrumentation hooks.
3581
3582 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3583
3584 PR target/86222
3585 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3586 correctly.
3587
3588 2018-06-22 Martin Liska <mliska@suse.cz>
3589
3590 PR tree-optimization/86263
3591 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3592 Bail out if is_enabled is false.
3593 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3594 New declaration.
3595 (jump_table_cluster::is_enabled): New function.
3596
3597 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3598
3599 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3600 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3601 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3602 (lto_input_ts_binfo_tree_pointers): Likewise.
3603 * tree-streamer-out.c (streamer_write_tree_bitfields,
3604 write_ts_binfo_tree_pointers): Likewise.
3605 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3606
3607 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3608
3609 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3610
3611 2018-06-22 Martin Liska <mliska@suse.cz>
3612
3613 * symbol-summary.h (get): Make it pure and inline move
3614 functionality from ::get function.
3615 (get): Remove and inline into ::get and ::get_create.
3616 (get_create): Move code from ::get function.
3617
3618 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3619
3620 PR target/85994
3621 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3622 -x assembler-with-cpp.
3623
3624 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3625
3626 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3627 _FILE_OFFSET_BITS=64 for C++.
3628
3629 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3630
3631 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3632 conversion insn that shows up when pr85657-3.c is compiled using
3633 IEEE 128-bit long double.
3634 (neg<mode>2_internal): Use the correct mode to check whether the
3635 mode is IBM extended.
3636 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3637 multiply and divide external functions from being created more
3638 than once.
3639
3640 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3641
3642 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3643 functions.
3644 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3645 the edge can be forwarded.
3646 (cfg_layout_merge_blocks): Likewise.
3647
3648 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3649
3650 * except.c (finish_eh_generation): Commit edge insertions only after
3651 the EH edges have been redirected from post-landing to landing pads.
3652
3653 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3654
3655 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3656 create_tmp_var_for to create the FRAME decl.
3657 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3658
3659 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3660
3661 * tree-inline.c (copy_edges_for_bb): Minor tweak.
3662 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3663 debug statement when resetting its value.
3664 (expand_call_inline): Copy the locus of the call onto the assignment
3665 of the return value, if any. Use local variable in more cases.
3666
3667 2018-06-21 Martin Liska <mliska@suse.cz>
3668
3669 * ipa-pure-const.c (propagate_nothrow): Use
3670 funct_state_summaries->get.
3671 (dump_malloc_lattice): Likewise.
3672 (propagate_malloc): Likewise.
3673
3674 2018-06-21 Richard Biener <rguenther@suse.de>
3675
3676 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3677 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3678 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3679 comment.
3680 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3681 BLOCK_ABSTRACT_ORIGIN unconditionally.
3682
3683 2018-06-21 David Malcolm <dmalcolm@redhat.com>
3684
3685 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3686 deleting it.
3687 * ipa-reference.c (ipa_reference_c_finalize): Delete
3688 ipa_ref_opt_sum_summaries and set it to NULL.
3689
3690 2018-06-21 Tom de Vries <tdevries@suse.de>
3691
3692 PR tree-optimization/85859
3693 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3694 test with comment from bb_no_side_effects_p.
3695
3696 2018-06-21 Richard Biener <rguenther@suse.de>
3697
3698 PR tree-optimization/86232
3699 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3700 max for constant niter.
3701
3702 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3703
3704 * config/aarch64/aarch64-simd.md
3705 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3706
3707 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3708
3709 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3710 Make opernads of the unspec commutative.
3711
3712 2018-06-21 Richard Biener <rguenther@suse.de>
3713
3714 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3715 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3716 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3717 (vect_analyze_data_ref_dependence): Re-order checks to deal with
3718 NULL DR_STEP.
3719 (vect_record_base_alignments): Do not record base alignment
3720 for gathers or scatters.
3721 (vect_compute_data_ref_alignment): Drop return value that is always
3722 true. Bail out early for gathers or scatters.
3723 (vect_enhance_data_refs_alignment): Bail out early for gathers
3724 or scatters.
3725 (vect_find_same_alignment_drs): Likewise.
3726 (vect_analyze_data_refs_alignment): Remove dead code.
3727 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3728 (vect_analyze_data_refs): For possible gathers or scatters do
3729 not create an alternate DR, just check their possible validity
3730 and mark them. Adjust DECL_NONALIASED handling to not rely
3731 on DR_BASE_ADDRESS.
3732 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3733 update inits of gathers or scatters.
3734 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3735 Also copy gather/scatter flag to pattern vinfo.
3736
3737 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3738
3739 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3740 behavior of vec_packsu (vector unsigned long long, vector unsigned
3741 long long) to match behavior of vec_packs with same signature.
3742
3743 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3744 Thomas Schwinge <thomas@codesourcery.com>
3745 Cesar Philippidis <cesar@codesourcery.com>
3746
3747 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3748 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3749 (gimplify_adjust_omp_clauses): Likewise.
3750 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3751 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3752 (gimplify_omp_target_update): Update handling of acc update and
3753 enter/exit data.
3754 * omp-low.c (install_var_field): Remove unused parameter
3755 base_pointers_restrict.
3756 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3757 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3758 FINALIZE}
3759 (omp_target_base_pointers_restrict_p): Delete.
3760 (scan_omp_target): Update call to scan_sharing_clauses.
3761 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3762 FINALIZE}.
3763 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3764 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3765 (convert_local_omp_clauses): Likewise.
3766 * tree-pretty-print.c (dump_omp_clause): Likewise.
3767 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3768 FINALIZE}.
3769 (omp_clause_code_name): Likewise.
3770
3771 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3772
3773 PR debug/86194
3774 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3775 be narrowed.
3776
3777 PR tree-optimization/86231
3778 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3779 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3780
3781 2018-06-20 Tom de Vries <tdevries@suse.de>
3782
3783 PR tree-optimization/86097
3784 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3785 iv type if signedness of iv type is not the same as that of *nit.
3786
3787 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3788
3789 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3790 EDGE_EH edges, verify they are all EDGE_EH.
3791
3792 2018-06-20 Maya Rashish <coypu@sdf.org>
3793
3794 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3795
3796 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3797
3798 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3799 * config/aarch64/aarch64.c (xgene1_tunings): Add
3800 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3801 (aarch64_mode_valid_for_sched_fusion_p):
3802 Allow 16-byte modes.
3803 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3804 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3805 128-bit modes.
3806 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3807 New pattern.
3808 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3809 * config/aarch64/iterators.md (VQ2): New mode iterator.
3810
3811 2018-06-20 Martin Liska <mliska@suse.cz>
3812
3813 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3814 Change default ratio from 10 to 8.
3815
3816 2018-06-20 Martin Liska <mliska@suse.cz>
3817
3818 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3819 New.
3820 (bit_test_cluster::find_bit_tests): Likewise.
3821 (switch_decision_tree::analyze_switch_statement): Find clusters.
3822 * tree-switch-conversion.h (struct jump_table_cluster): Document
3823 hierarchy.
3824
3825 2018-06-20 Martin Liska <mliska@suse.cz>
3826
3827 * tree-switch-conversion.c (switch_conversion::collect):
3828 Record m_uniq property.
3829 (switch_conversion::expand): Bail out for special conditions.
3830 (group_cluster::~group_cluster): New.
3831 (group_cluster::group_cluster): Likewise.
3832 (group_cluster::dump): Likewise.
3833 (jump_table_cluster::emit): New.
3834 (switch_decision_tree::fix_phi_operands_for_edges): New.
3835 (struct case_node): Remove struct.
3836 (jump_table_cluster::can_be_handled): New.
3837 (case_values_threshold): Moved to header.
3838 (reset_out_edges_aux): Likewise.
3839 (jump_table_cluster::is_beneficial): New.
3840 (bit_test_cluster::can_be_handled): Likewise.
3841 (add_case_node): Remove.
3842 (bit_test_cluster::is_beneficial): New.
3843 (case_bit_test::cmp): New.
3844 (bit_test_cluster::emit): New.
3845 (expand_switch_as_decision_tree_p): Remove.
3846 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3847 (fix_phi_operands_for_edge): Likewise.
3848 (switch_decision_tree::analyze_switch_statement): New.
3849 (compute_cases_per_edge): Move ...
3850 (switch_decision_tree::compute_cases_per_edge): ... here.
3851 (try_switch_expansion): Likewise.
3852 (switch_decision_tree::try_switch_expansion): Likewise.
3853 (record_phi_operand_mapping): Likewise.
3854 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3855 (emit_case_decision_tree): Likewise.
3856 (switch_decision_tree::emit): Likewise.
3857 (balance_case_nodes): Likewise.
3858 (switch_decision_tree::balance_case_nodes): Likewise.
3859 (dump_case_nodes): Likewise.
3860 (switch_decision_tree::dump_case_nodes): Likewise.
3861 (emit_jump): Likewise.
3862 (switch_decision_tree::emit_jump): Likewise.
3863 (emit_cmp_and_jump_insns): Likewise.
3864 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3865 (emit_case_nodes): Likewise.
3866 (switch_decision_tree::emit_case_nodes): Likewise.
3867 (conditional_probability): Remove.
3868 * tree-switch-conversion.h (enum cluster_type): New.
3869 (PRINT_CASE): New.
3870 (struct cluster): Likewise.
3871 (cluster::cluster): Likewise.
3872 (struct simple_cluster): Likewise.
3873 (simple_cluster::simple_cluster): Likewise.
3874 (struct group_cluster): Likewise.
3875 (struct jump_table_cluster): Likewise.
3876 (struct bit_test_cluster): Likewise.
3877 (struct min_cluster_item): Likewise.
3878 (struct case_tree_node): Likewise.
3879 (case_tree_node::case_tree_node): Likewise.
3880 (jump_table_cluster::case_values_threshold): Likewise.
3881 (struct case_bit_test): Likewise.
3882 (struct switch_decision_tree): Likewise.
3883 (struct switch_conversion): Likewise.
3884 (switch_decision_tree::reset_out_edges_aux): Likewise.
3885
3886 2018-06-20 Martin Liska <mliska@suse.cz>
3887
3888 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3889 (hoist_edge_and_branch_if_true): Likewise.
3890 (expand_switch_using_bit_tests_p): Likewise.
3891 (struct case_bit_test): Likewise.
3892 (case_bit_test_cmp): Likewise.
3893 (emit_case_bit_tests): Likewise.
3894 (switch_conversion::switch_conversion): New class.
3895 (struct switch_conv_info): Remove old struct.
3896 (collect_switch_conv_info): More to ...
3897 (switch_conversion::collect): ... this.
3898 (check_range): Likewise.
3899 (switch_conversion::check_range): Likewise.
3900 (check_all_empty_except_final): Likewise.
3901 (switch_conversion::check_all_empty_except_final): Likewise.
3902 (check_final_bb): Likewise.
3903 (switch_conversion::check_final_bb): Likewise.
3904 (create_temp_arrays): Likewise.
3905 (switch_conversion::create_temp_arrays): Likewise.
3906 (free_temp_arrays): Likewise.
3907 (gather_default_values): Likewise.
3908 (switch_conversion::gather_default_values): Likewise.
3909 (build_constructors): Likewise.
3910 (switch_conversion::build_constructors): Likewise.
3911 (constructor_contains_same_values_p): Likewise.
3912 (switch_conversion::contains_same_values_p): Likewise.
3913 (array_value_type): Likewise.
3914 (switch_conversion::array_value_type): Likewise.
3915 (build_one_array): Likewise.
3916 (switch_conversion::build_one_array): Likewise.
3917 (build_arrays): Likewise.
3918 (switch_conversion::build_arrays): Likewise.
3919 (gen_def_assigns): Likewise.
3920 (switch_conversion::gen_def_assigns): Likewise.
3921 (prune_bbs): Likewise.
3922 (switch_conversion::prune_bbs): Likewise.
3923 (fix_phi_nodes): Likewise.
3924 (switch_conversion::fix_phi_nodes): Likewise.
3925 (gen_inbound_check): Likewise.
3926 (switch_conversion::gen_inbound_check): Likewise.
3927 (process_switch): Use the newly created class.
3928 (switch_conversion::expand): New.
3929 (switch_conversion::~switch_conversion): New.
3930 * tree-switch-conversion.h: New file.
3931
3932 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3933
3934 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3935 tree-vect-patterns.c.
3936 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3937 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3938 (vect_recog_sad_pattern): Likewise.
3939 (vect_recog_widen_sum_pattern): Likewise.
3940 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3941 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3942 (vect_recog_rotate_pattern): Likewise.
3943 (vect_recog_mult_pattern): Likewise.
3944 (vect_recog_vector_vector_shift_pattern): Likewise.
3945 (vect_recog_divmod_pattern): Likewise.
3946 (vect_recog_mixed_size_cond_pattern): Likewise.
3947 (vect_recog_bool_pattern): Likewise.
3948 (vect_recog_mask_conversion_pattern): Likewise.
3949 (vect_try_gather_scatter_pattern): Likewise.
3950 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3951 (vect_recog_over_widening_pattern): Likewise.
3952 (vect_recog_gather_scatter_pattern): Likewise.
3953 (vect_recog_func_ptr): Move from tree-vectorizer.h
3954 (vect_vect_recog_func_ptrs): Move further down the file.
3955 (vect_recog_func): Likewise. Remove the third argument.
3956 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3957 (vect_pattern_recog_1): Expect the pattern function to do any
3958 necessary target tests. Also expect it to provide a vector type.
3959 Remove the type_in handling.
3960
3961 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3962
3963 * tree-vect-patterns.c (vect_pattern_detected): New function.
3964 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3965 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3966 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3967 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3968 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3969 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3970 (vect_recog_mask_conversion_pattern)
3971 (vect_try_gather_scatter_pattern): Likewise.
3972
3973 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3974
3975 * tree-vect-patterns.c (vect_get_internal_def): New function.
3976 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3977 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3978 (search_type_for_mask_1): Use it.
3979
3980 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3981
3982 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3983 redundant WIDEN_SUM_EXPR handling.
3984 (vect_recog_sad_pattern): Likewise.
3985
3986 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3987
3988 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3989 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3990 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3991 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3992 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3993
3994 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3995
3996 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3997 use the stmt_vec_info of the original bb statement for the
3998 new zero assignment, even if the call is part of a pattern.
3999
4000 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4001
4002 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4003 that the sequence is attached to the original statement rather
4004 than the pattern statement.
4005 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4006 PATTERN_DEF_SEQ from the original statement rather than
4007 the main pattern statement.
4008 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4009 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4010 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4011
4012 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4013
4014 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4015 definition statements before the early exit for statements that aren't
4016 live or relevant.
4017 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4018 split out from...
4019 (vect_transform_loop): ...here. Process pattern definition
4020 statements without first checking whether the main pattern
4021 statement is live or relevant.
4022
4023 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4024
4025 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4026 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4027
4028 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4029
4030 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4031 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4032 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4033 (expand_block_compare): Change select_block_compare_mode call.
4034 (expand_strncmp_align_check): Use new functions, fix comment.
4035 (emit_final_str_compare_gpr): New function.
4036 (expand_strn_compare): Refactor and clean up code.
4037 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4038
4039 2018-06-19 Tony Reix <tony.reix@atos.com>
4040 Damien Bergamini <damien.bergamini@atos.com>
4041 David Edelsohn <dje.gcc@gmail.com>
4042
4043 * collect2.c (static_obj): New variable.
4044 (static_libs): New variable.
4045 (is_in_list): Uncomment declaration.
4046 (main): Track AIX libraries linked statically.
4047 (is_in_list): Uncomment definition.
4048 (scan_prog_file): Don't add AIX shared libraries initializer
4049 to constructor list if linking statically.
4050
4051 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4052
4053 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4054 constant.
4055 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4056
4057 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4058
4059 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4060 blocks.
4061
4062 2018-06-19 Martin Liska <mliska@suse.cz>
4063
4064 * config/i386/i386.c (ix86_can_inline_p): Do not use
4065 ipa_fn_summaries::get_create.
4066 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4067 get.
4068 (devirtualization_time_bonus): Likewise.
4069 (ipcp_propagate_stage): Likewise.
4070 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4071 (edge_set_predicate): Likewise.
4072 (evaluate_conditions_for_known_args): Likewise.
4073 (evaluate_properties_for_edge): Likewise.
4074 (ipa_call_summary::reset): Tranform to ...
4075 (ipa_call_summary::~ipa_call_summary): ... this.
4076 (ipa_fn_summary::reset): Transform to ...
4077 (ipa_fn_summary::~ipa_fn_summary): ... this.
4078 (ipa_fn_summary_t::remove): Rename to ...
4079 (ipa_fn_summary_t::remove_callees): ... this.
4080 (ipa_fn_summary_t::duplicate): Use placement new
4081 instead of memory copy.
4082 (ipa_call_summary_t::duplicate): Likewise.
4083 (ipa_call_summary_t::remove): Remove.
4084 (dump_ipa_call_summary): Change get_create to get.
4085 (ipa_dump_fn_summary): Dump only when summary exists.
4086 (analyze_function_body): Use symbol_summary::get instead
4087 of get_create.
4088 (compute_fn_summary): Likewise.
4089 (estimate_edge_devirt_benefit): Likewise.
4090 (estimate_edge_size_and_time): Likewise.
4091 (inline_update_callee_summaries): Likewise.
4092 (remap_edge_change_prob): Likewise.
4093 (remap_edge_summaries): Likewise.
4094 (ipa_merge_fn_summary_after_inlining): Likewise.
4095 (write_ipa_call_summary): Likewise.
4096 (ipa_fn_summary_write): Likewise.
4097 (ipa_free_fn_summary): Likewise.
4098 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4099 (struct ipa_call_summary): Likewise.
4100 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4101 of get_create.
4102 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4103 (estimate_size_after_inlining): Likewise.
4104 (estimate_growth): Likewise.
4105 (growth_likely_positive): Likewise.
4106 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4107 (inline_call): Likewise.
4108 * ipa-inline.c (caller_growth_limits): Likewise.
4109 (can_inline_edge_p): Likewise.
4110 (can_inline_edge_by_limits_p): Likewise.
4111 (compute_uninlined_call_time): Likewise.
4112 (compute_inlined_call_time): Likewise.
4113 (want_inline_small_function_p): Likewise.
4114 (edge_badness): Likewise.
4115 (update_caller_keys): Likewise.
4116 (update_callee_keys): Likewise.
4117 (inline_small_functions): Likewise.
4118 (inline_to_all_callers_1): Likewise.
4119 (dump_overall_stats): Likewise.
4120 (early_inline_small_functions): Likewise.
4121 (early_inliner): Likewise.
4122 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4123 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4124 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4125 * ipa-split.c (execute_split_functions): Likewise.
4126 * symbol-summary.h: Likewise.
4127 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4128
4129 2018-06-19 Richard Biener <rguenther@suse.de>
4130
4131 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4132 (vectorize_loops): ... here. Fix dbgcnt handling.
4133 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4134
4135 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4136
4137 PR target/86197
4138 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4139 ieee128 argument takes up only one (vector) register, not two (floating
4140 point) registers.
4141
4142 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4143
4144 * gimplify.c (gimplify_init_constructor): Really never clear for an
4145 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4146
4147 2018-06-19 Richard Biener <rguenther@suse.de>
4148
4149 PR tree-optimization/86179
4150 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4151 after failed recognition.
4152
4153 2018-06-18 Martin Sebor <msebor@redhat.com>
4154
4155 PR middle-end/85602
4156 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4157 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4158 Handle integer subtraction.
4159 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4160 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4161
4162 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4163
4164 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4165 param from rtx to rtx_insn *.
4166 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4167 param.
4168 (frv_ifcvt_modify_insn): Likwise.
4169 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4170 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4171 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4172 as_a <rtx_insn *> cast to local "unprotected_region" once
4173 it's been established that it's not NULL or pc_rtx.
4174 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4175 param "sethi" from rtx to rtx_insn *.
4176 (nds32_group_float_insns): Likewise for param "insn".
4177 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4178 param.
4179 (vax_output_int_subtract): Likewise.
4180 * config/vax/vax.c (vax_output_int_add): Likewise for param
4181 "insn".
4182 (vax_output_int_subtract): Likewise.
4183 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4184 (emit_pattern_after): Likewise for param "after".
4185 (emit_insn_after): Likewise.
4186 (emit_jump_insn_after): Likewise.
4187 (emit_call_insn_after): Likewise.
4188 (emit_debug_insn_after): Likewise.
4189 (emit_pattern_before): Likewise for param "before".
4190 (emit_insn_before): Likewise.
4191 (emit_jump_insn_before): Likewise.
4192 * final.c (get_insn_template): Likewise for param "insn", removing
4193 a cast.
4194 * output.h (get_insn_template): Likewise for 2nd param.
4195 * rtl.h (emit_insn_before): Likewise.
4196 (emit_jump_insn_before): Likewise.
4197 (emit_debug_insn_before_noloc): Likewise.
4198 (emit_insn_after): Likewise.
4199 (emit_jump_insn_after): Likewise.
4200 (emit_call_insn_after): Likewise.
4201 (emit_debug_insn_after): Likewise.
4202 (set_insn_deleted): Likewise for param.
4203
4204 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4205
4206 PR target/85358
4207 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4208 floating point modes, so that IFmode is numerically greater than
4209 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4210 to declare the ordering. This prevents IFmode from being
4211 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4212 machine. Include rs6000-modes.h to share the fractional values
4213 between genmodes* and the rest of the compiler.
4214 (IFmode): Likewise.
4215 (KFmode): Likewise.
4216 (TFmode): Likewise.
4217 * config/rs6000/rs6000-modes.h: New file.
4218 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4219 meaning of rs6000_long_double_size so that 126..128 selects an
4220 appropriate 128-bit floating point type.
4221 (rs6000_option_override_internal): Likewise.
4222 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4223 (TARGET_LONG_DOUBLE_128): Change the meaning of
4224 rs6000_long_double_size so that 126..128 selects an appropriate
4225 128-bit floating point type.
4226 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4227 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4228 source and destination to match the standard usage.
4229 (truncifkf2): Likewise.
4230 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4231 ISA 2.07 to use an explicit clobber, instead of passing in a
4232 temporary.
4233 (copysign<mode>3_soft): Likewise.
4234
4235 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4236
4237 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4238 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4239 (vect_slp_analyze_instance_dependence): Likewise.
4240 (vect_enhance_data_refs_alignment): Likewise.
4241 (vect_analyze_data_refs_alignment): Likewise.
4242 (vect_slp_analyze_and_verify_instance_alignment
4243 (vect_analyze_data_ref_accesses): Likewise.
4244 (vect_prune_runtime_alias_test_list): Likewise.
4245 (vect_analyze_data_refs): Likewise.
4246 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4247 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4248 (vect_analyze_scalar_cycles_1): Likewise.
4249 (vect_get_loop_niters): Likewise.
4250 (vect_analyze_loop_form_1): Likewise.
4251 (vect_update_vf_for_slp): Likewise.
4252 (vect_analyze_loop_operations): Likewise.
4253 (vect_analyze_loop): Likewise.
4254 (vectorizable_induction): Likewise.
4255 (vect_transform_loop): Likewise.
4256 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4257 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4258 (vect_make_slp_decision): Likewise.
4259 (vect_detect_hybrid_slp): Likewise.
4260 (vect_slp_analyze_operations): Likewise.
4261 (vect_slp_bb): Likewise.
4262 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4263 (vectorizable_bswap): Likewise.
4264 (vectorizable_call): Likewise.
4265 (vectorizable_simd_clone_call): Likewise.
4266 (vectorizable_conversion): Likewise.
4267 (vectorizable_assignment): Likewise.
4268 (vectorizable_shift): Likewise.
4269 (vectorizable_operation): Likewise.
4270 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4271
4272 2018-06-18 Martin Sebor <msebor@redhat.com>
4273
4274 PR tree-optimization/81384
4275 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4276 * builtins.c (expand_builtin_strnlen): New function.
4277 (expand_builtin): Call it.
4278 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4279 * builtins.def (BUILT_IN_STRNLEN): New.
4280 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4281 Warn for bounds in excess of maximum object size.
4282 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4283 single-value ranges. Handle strnlen.
4284 (handle_builtin_strlen): Handle strnlen.
4285 (strlen_check_and_optimize_stmt): Same.
4286 * doc/extend.texi (Other Builtins): Document strnlen.
4287
4288 2018-06-18 Maya Rashish <coypu@sdf.org>
4289
4290 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4291 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4292 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4293
4294 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4295 here to ...
4296 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4297
4298 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4299
4300 * tree.c (escaped_string::escape): Replace cast to char * by
4301 const_cast<char *> (unescaped).
4302
4303 2018-06-18 Nick Clifton <nickc@redhat.com>
4304
4305 PR 84195
4306 * tree.c (escaped_string): New class. Converts an unescaped
4307 string into its escaped equivalent.
4308 (warn_deprecated_use): Use the new class to convert the
4309 deprecation message, if present.
4310 (test_escaped_strings): New self test.
4311 (test_c_tests): Add test_escaped_strings.
4312 * doc/extend.texi (deprecated): Add a note that the
4313 deprecation message is affected by the -fmessage-length
4314 option, and that control characters will be escaped.
4315 (#pragma GCC error): Document this pragma.
4316 (#pragma GCC warning): Likewise.
4317 * doc/invoke.texi (-fmessage-length): Document this option's
4318 effect on the #warning and #error preprocessor directives and
4319 the deprecated attribute.
4320
4321 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4322
4323 * tree.c (decl_value_expr_lookup): Revert latest change.
4324 (decl_value_expr_insert): Likewise.
4325
4326 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4327
4328 * gimplify.c (nonlocal_vlas): Delete.
4329 (nonlocal_vla_vars): Likewise.
4330 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4331 referenced VLAs.
4332 (gimplify_body): Do not create and destroy nonlocal_vlas.
4333 * tree-nested.c: Include diagnostic.h.
4334 (use_pointer_in_frame): Tweak.
4335 (lookup_field_for_decl): Add assertion and declare the transformation.
4336 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4337 internal error when the reference is in a wrong context. Do not
4338 create a debug decl by default.
4339 (note_nonlocal_block_vlas): Delete.
4340 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4341 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4342 create a debug decl by default.
4343 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4344 call is in a wrong context.
4345 (fixup_vla_decls): New function.
4346 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4347 debug variables were created.
4348 * tree.c (decl_value_expr_lookup): Add checking assertion.
4349 (decl_value_expr_insert): Likewise.
4350
4351 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4352
4353 PR middle-end/82479
4354 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4355 * tree-scalar-evolution.c (interpret_expr): Likewise.
4356 (expression_expensive_p): Likewise.
4357 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4358 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4359 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4360 (ssa_defined_by_minus_one_stmt_p): New.
4361
4362 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4363
4364 PR middle-end/64946
4365 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4366 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4367 * dojump.c (do_jump): Likewise.
4368 * expr.c (expand_expr_real_2): Check operand type's sign.
4369 * fold-const.c (const_unop): Handle ABSU_EXPR.
4370 (fold_abs_const): Likewise.
4371 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4372 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4373 (strip_sign_op_1): Likesise.
4374 * match.pd: Add new pattern to generate ABSU_EXPR.
4375 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4376 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4377 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4378 * tree-inline.c (estimate_operator_cost): Likewise.
4379 * tree-pretty-print.c (dump_generic_node): Likewise.
4380 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4381 * tree.def (ABSU_EXPR): New.
4382
4383 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4384
4385 PR middle-end/86095
4386 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4387 documented as preserved for backward compatibility only.
4388 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4389
4390 PR rtl-optimization/86108
4391 * bb-reorder.c (create_forwarder_block): Renamed to ...
4392 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4393 jump from new landing pad to the second part.
4394 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4395 Adjust callers.
4396
4397 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4398
4399 PR middle-end/85878
4400 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4401 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4402 Only call store_expr for halves if the mode is the same.
4403
4404 PR middle-end/86123
4405 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4406 Fix up comment formatting.
4407
4408 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4409
4410 * typed-splay-tree.h (typed_splay_tree::remove): New function.
4411 (typed_splay_tree::closure,
4412 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4413 (typed_splay_tree::typed_splay_tree,
4414 typed_splay_tree::operator =): Declared private.
4415 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4416 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4417 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4418 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4419 typed_splay_tree::splay_tree_splay,
4420 typed_splay_tree::splay_tree_foreach_helper,
4421 typed_splay_tree::splay_tree_insert,
4422 typed_splay_tree::splay_tree_remove,
4423 typed_splay_tree::splay_tree_lookup,
4424 typed_splay_tree::splay_tree_predecessor,
4425 typed_splay_tree::splay_tree_successor,
4426 typed_splay_tree::splay_tree_min,
4427 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4428 (typed_splay_tree::root, typed_splay_tree::comp,
4429 typed_splay_tree::delete_key,
4430 typed_splay_tree::delete_value): New data members.
4431 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4432 typed_splay_tree::remove.
4433
4434 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
4435
4436 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4437 -mginv and -mno-ginv to the assembler.
4438 * config/mips/mips.opt (-mcrc): New option.
4439 (-mginv): Likewise.
4440 * doc/invoke.text (-mcrc): Document.
4441 (-mginv): Likewise.
4442
4443 2018-06-15 Nick Clifton <nickc@redhat.com>
4444
4445 PR 84195
4446 * tree.c (escaped_string): New class. Converts an unescaped
4447 string into its escaped equivalent.
4448 (warn_deprecated_use): Use the new class to convert the
4449 deprecation message, if present.
4450 (test_escaped_strings): New self test.
4451 (test_c_tests): Add test_escaped_strings.
4452 * doc/extend.texi (deprecated): Add a note that the
4453 deprecation message is affected by the -fmessage-length
4454 option, and that control characters will be escaped.
4455 (#pragma GCC error): Document this pragma.
4456 (#pragma GCC warning): Likewise.
4457 * doc/invoke.texi (-fmessage-length): Document this option's
4458 effect on the #warning and #error preprocessor directives and
4459 the deprecated attribute.
4460
4461 2018-06-15 Richard Biener <rguenther@suse.de>
4462
4463 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4464 here, also noting vector size used.
4465 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
4466 size used in MSG_OPTIMIZED_LOCATIONS dump.
4467 (pass_slp_vectorize::execute): Adjust.
4468
4469 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
4470
4471 PR target/85968
4472 * config/arc/arc.c (arc_return_address_register): Fix
4473 if-condition.
4474
4475 2018-06-15 Richard Biener <rguenther@suse.de>
4476
4477 PR middle-end/86159
4478 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4479 leave useless conversion stripping to force_gimple_operand_gsi.
4480 (gimplify_build2): Likewise.
4481 (gimplify_build1): Likewise.
4482
4483 2018-06-15 Richard Biener <rguenther@suse.de>
4484
4485 PR middle-end/86076
4486 * tree-cfg.c (move_stmt_op): unshare invariant addresses
4487 before adjusting their block.
4488
4489 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
4490
4491 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4492 multilibs for *-*-rtems*.
4493 * config/riscv/t-rtems: New file.
4494
4495 2018-06-14 Jakub Jelinek <jakub@redhat.com>
4496
4497 PR middle-end/86122
4498 * match.pd ((A +- CST1) +- CST2): Punt if last resort
4499 unsigned_type_for returns NULL.
4500
4501 PR target/85945
4502 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4503 subregs of multi-word pseudos unless the float mode has word size.
4504
4505 2018-06-14 Richard Biener <rguenther@suse.de>
4506
4507 PR middle-end/86139
4508 * tree-vect-generic.c (build_word_mode_vector_type): Remove
4509 duplicate and harmful type_hash_canon.
4510 * tree.c (type_hash_canon): Assert we didn't find ourselves.
4511
4512 2018-06-14 Richard Biener <rguenther@suse.de>
4513
4514 PR ipa/86124
4515 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4516 NULL cgraph_node.
4517
4518 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
4519
4520 * config/rtems.h (STDINT_LONG32): Define.
4521
4522 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
4523 Prachi Godbole <prachi.godbole@imgtec.com>
4524
4525 * config/mips/mips-cpus.def: Define P6600.
4526 * config/mips/mips-tables.opt: Regenerate.
4527 * config/mips/mips.c (mips_ucbranch_type): New enum.
4528 (mips_rtx_cost_data): Add support for P6600.
4529 (mips_issue_rate): Likewise.
4530 (mips_multipass_dfa_lookahead): Likewise.
4531 (mips_avoid_hazard): Likewise.
4532 (mips_reorg_process_insns): Likewise.
4533 (mips_classify_branch_p6600): New function.
4534 * config/mips/mips.h (TUNE_P6600): New define.
4535 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4536 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4537 * config/mips/mips.md: Include p6600.md.
4538 (processor): Add p6600.
4539 * config/mips/p6600.md: New file.
4540 * doc/invoke.texi: Add p6600 to supported architectures.
4541
4542 2018-06-13 Martin Sebor <msebor@redhat.com>
4543
4544 PR tree-optimization/86114
4545 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4546 of integer types.
4547 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4548
4549 2018-06-13 Richard Biener <rguenther@suse.de>
4550
4551 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4552 Properly set vector type of the intermediate stmt.
4553 * tree-vect-stmts.c (vectorizable_operation): The destination
4554 var always has vectype_out type.
4555
4556 2018-06-13 Jeff Law <law@redhat.com>
4557
4558 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4559 integer 0 for argument to print_rtl_with_bb.
4560 (rl78_reorg): Likewise.
4561
4562 2018-06-13 David Malcolm <dmalcolm@redhat.com>
4563
4564 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4565 from rtx to rtx_insn *.
4566 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4567 "label".
4568 (add_sched_insns_for_speculation): Likewise for local "target",
4569 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4570 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4571 from rtx_insn ** to rtx_code_label **.
4572 (reorg_emit_nops): Likewise.
4573 (c6x_reorg): Likewise for local "call_labels".
4574 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4575 rtx to rtx_insn *.
4576 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4577 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4578 the loops over LABEL_REFS.
4579 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4580 braf_label.
4581 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4582 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4583 (split_branches): Strengthen local "olabel" from rtx to
4584 rtx_insn *, adding a safe_as_a cast.
4585 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4586 to "rtx_insn *".
4587 (add_insn_after): Likewise for first two params.
4588 (add_insn_before): Likewise.
4589 (remove_insn): Likewise for param.
4590 (emit_pattern_before_noloc): Likewise for second and third params.
4591 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4592 (emit_call_insn_before_noloc): Likewise.
4593 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4594 to "rtx_insn *".
4595 (emit_barrier_before): Likewise.
4596 (emit_label_before): Strengthen "label" param from "rtx" to
4597 "rtx_code_label *". Strengthen "before" param from "rtx" to
4598 "rtx_insn *".
4599 (emit_insn_after_1): Strengthen "after" param from "rtx" to
4600 "rtx_insn *".
4601 (emit_pattern_after_noloc): Likewise.
4602 (emit_insn_after_noloc): Likewise.
4603 (emit_jump_insn_after_noloc): Likewise.
4604 (emit_call_insn_after_noloc): Likewise.
4605 (emit_debug_insn_after_noloc): Likewise.
4606 (emit_barrier_after): Likewise.
4607 (emit_label_after): Likewise for both params.
4608 (emit_pattern_after_setloc): Likewise for "after" param. Convert
4609 "loc" param from "int" to "location_t".
4610 (emit_insn_after_setloc): Likewise.
4611 (emit_jump_insn_after_setloc): Likewise.
4612 (emit_call_insn_after_setloc): Likewise.
4613 (emit_debug_insn_after_setloc): Likewise.
4614 (emit_pattern_before_setloc): Likewise for "before" param. Convert
4615 "loc" param from "int" to "location_t".
4616 (emit_pattern_before): Convert NULL_RTX to NULL.
4617 (emit_insn_before_setloc): Convert "loc" param from "int" to
4618 "location_t".
4619 (emit_jump_insn_before_setloc): Likewise.
4620 (emit_call_insn_before_setloc): Likewise.
4621 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4622 rtx_insn *. Convert "loc" param from "int" to "location_t".
4623 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4624 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4625 Convert 3rd param from "int" to "location_t".
4626 (emit_barrier_before, emit_barrier_after, next_real_insn):
4627 Strengthen param from rtx to rtx_insn *.
4628 (emit_label_before): Strengthen 1st param from "rtx" to
4629 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4630 "rtx_insn *".
4631 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4632 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4633 Strengthen 2nd param from "rtx" to "rtx_insn *".
4634 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4635 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4636 Likewise. Convert 3rd param from "int" to "location_t".
4637 (emit_label_after): Strengthen 1st param from "rtx" to
4638 "rtx_code_label *".
4639 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4640 "rtx_insn *".
4641 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4642 from "rtx" to "rtx_insn *".
4643
4644 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4645
4646 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4647 bodies streamed in with -Q.
4648 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4649 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4650 * gimple-streamer-out.c: Include gimple-pretty-print.h
4651 (output_bb): Dump stmts streamed.
4652 * lto-section-out.c: Include print-tree.h
4653 (lto_begin_section): Dump sections created.
4654 (lto_output_decl_index): Dump decl encoded.
4655 * lto-streamer-out.c: Include print-tree.h
4656 (create_output_block): Dump output block created.
4657 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4658 (output_function): Dump function output.
4659 (output_constructor): Dump constructor streamed.
4660 (write_global_stream): Output indexes encoded.
4661 (produce_asm_for_decls): Dump streams encoded.
4662 * lto-streamer.c (streamer_dump_file): New global var.
4663 * lto-streamer.h (streamer_dump_file): Declare.
4664 * passes.c (ipa_write_summaries): Initialize streamer dump.
4665 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4666 in.
4667
4668 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4669
4670 PR target/86048
4671 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4672 offsets for register save directives. Emit a second batch of save
4673 directives, if need be, when the function accesses prior frames.
4674
4675 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4676
4677 * config/arc/fpu.md (fmasf4): Force operand to register.
4678 (fnmasf4): Likewise.
4679
4680 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4681
4682 * config/arc/arc-protos.h (arc_pad_return): Remove.
4683 * config/arc/arc.c (machine_function): Remove force_short_suffix
4684 and size_reason.
4685 (arc_print_operand): Adjust printing of '&'.
4686 (arc_verify_short): Remove conditional printing of short suffix.
4687 (arc_final_prescan_insn): Remove reference to size_reason.
4688 (pad_return): New function.
4689 (arc_reorg): Call pad_return.
4690 (arc_pad_return): Remove.
4691 (arc_init_machine_status): Remove reference to force_short_suffix.
4692 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4693 (attr length): When attribute iscompact is true force to 2
4694 regardless; in the case of maybe check if we want to force the
4695 instruction to have 4 bytes length.
4696 (nopv): Change it to generate 4 byte long nop as well.
4697 (blockage): New pattern.
4698 (simple_return): Remove call to arc_pad_return.
4699 (p_return_i): Likewise.
4700
4701 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4702
4703 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4704
4705 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4706
4707 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4708 ARC cores.
4709
4710 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4711
4712 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4713 for ARC700 and ARCv2.
4714
4715 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
4716
4717 PR target/86076
4718 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4719 operands[2] instead of operands[1].
4720
4721
4722 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4723
4724 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4725 case, check whether the outer register overlaps an unallocatable
4726 register, not just whether it fits the required class.
4727
4728 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4729
4730 * poly-int.h (can_div_trunc_p): Add new overload in which all values
4731 are poly_ints.
4732 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4733 (memrefs_conflict_p): Likewise.
4734 (init_alias_analysis): Likewise.
4735 * cfgexpand.c (expand_debug_expr): Likewise.
4736 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4737 * cse.c (fold_rtx): Likewise.
4738 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4739 * expr.c (emit_block_move_hints): Likewise.
4740 (clear_storage_hints, push_block, emit_push_insn): Likewise.
4741 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4742 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4743 (emit_group_store): Likewise.
4744 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
4745 to read the PRE/POST_MODIFY increment.
4746 * calls.c (store_one_arg): Use strip_offset.
4747 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4748 poly_int_rtx_p.
4749 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4750 by a VEC_SELECT.
4751 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4752 (simplify_binary_operation_1): Extend CONST_INT handling to
4753 poly_int_rtx_p.
4754 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4755 than a HOST_WIDE_INT.
4756 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4757 poly_int64.
4758 (adjust_mems, add_stores): Update accodingly.
4759 (vt_canonicalize_addr): Track polynomial offsets.
4760 (emit_note_insn_var_location): Likewise.
4761 (vt_add_function_parameter): Likewise.
4762 (vt_initialize): Likewise.
4763
4764 2018-06-12 Jeff Law <law@redhat.com>
4765
4766 * config.gcc (alpha*-*-freebsd*): Remove.
4767 * config/alpha/freebsd.h: Remove.
4768
4769 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4770
4771 PR other/69968
4772 * spellcheck-tree.c (levenshtein_distance): Rename to...
4773 (get_edit_distance): ...this, and update for underlying renaming.
4774 * spellcheck-tree.h (levenshtein_distance): Rename to...
4775 (get_edit_distance): ...this.
4776 * spellcheck.c (levenshtein_distance): Rename to...
4777 (get_edit_distance): ...this. Convert from Levenshtein distance
4778 to Damerau-Levenshtein distance by supporting transpositions of
4779 adjacent characters. Rename "v1" to "v_next" and "v0" to
4780 "v_one_ago".
4781 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4782 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4783 update for underlying renaming.
4784 (selftest::levenshtein_distance_unit_test): Rename to...
4785 (selftest::test_get_edit_distance_unit): ...this, and update for
4786 underlying renaming.
4787 (selftest::test_find_closest_string): Add example from PR 69968
4788 where transposition helps
4789 (selftest::test_metric_conditions): Update for renaming.
4790 (selftest::test_metric_conditions): Likewise.
4791 (selftest::spellcheck_c_tests): Likewise.
4792 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4793 (get_edit_distance): ...this.
4794 (best_match::consider): Update for renaming.
4795
4796 2018-06-12 Martin Sebor <msebor@redhat.com>
4797
4798 PR tree-optimization/85259
4799 * builtins.c (compute_objsize): Handle constant offsets.
4800 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4801 true iff a warning has been issued.
4802 * gimple.h (gimple_nonartificial_location): New function.
4803 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4804 gimple_nonartificial_location and handle -Wno-system-headers.
4805 (handle_builtin_stxncpy): Same.
4806
4807 2018-06-12 Martin Sebor <msebor@redhat.com>
4808
4809 PR c/85931
4810 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4811
4812 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4813
4814 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4815 BUILTIN_VEC_XST entries for pointer to double and long long.
4816
4817 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4818
4819 PR target/85990
4820 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4821 Update comments.
4822 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4823 Likewise.
4824
4825 2018-06-12 Martin Liska <mliska@suse.cz>
4826
4827 * doc/options.texi: Document IntegerRange.
4828
4829 2018-06-12 Martin Liska <mliska@suse.cz>
4830
4831 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4832 * opt-functions.awk: Handle Deprecated flag.
4833 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4834 and report error.
4835 (read_cmdline_option): Report warning for a deprecated option.
4836 * opts.h (struct cl_option): Add new field cl_deprecated.
4837 (CL_ERR_DEPRECATED): New.
4838
4839 2018-06-12 Martin Liska <mliska@suse.cz>
4840
4841 * doc/options.texi: Document Deprecated option flag.
4842
4843 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4844
4845 * config/arc/arc-arch.h (arc_extras): New enum.
4846 (arc_cpu_t):Add field extra.
4847 (arc_cpu_types): Consider the extras.
4848 * config/arc/arc-cpus.def: Add extras info.
4849 * config/arc/arc-opts.h (processor_type): Consider extra field.
4850 * config/arc/arc.c (arc_override_options): Handle extra field.
4851
4852 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4853
4854 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4855 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4856 field.
4857 * config/arc/arc.c (arc_init): Update pic warning.
4858 (irq_range): Update irq range parsing warnings.
4859 (arc_override_options): Update various warning messages.
4860 (arc_handle_aux_attribute): Likewise.
4861
4862 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4863
4864 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4865
4866 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4867
4868 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4869 compiler messages directives.
4870
4871 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4872
4873 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4874 * config/mips/mips-tables.opt: Regenerate.
4875 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4876 mips64r6.
4877 * doc/invoke.texi: Document -march=i6500.
4878
4879 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4880
4881 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4882 (i6400_gpmul): Add cpu_unit.
4883 (i6400_gpdiv): Likewise.
4884 (i6400_msa_add_d): Update reservations.
4885 (i6400_msa_int_add) Likewise.
4886 (i6400_msa_short_logic3) Likewise.
4887 (i6400_msa_short_logic2) Likewise.
4888 (i6400_msa_short_logic) Likewise.
4889 (i6400_msa_move) Likewise.
4890 (i6400_msa_cmp) Likewise.
4891 (i6400_msa_short_float2) Likewise.
4892 (i6400_msa_div_d) Likewise.
4893 (i6400_msa_long_logic1) Likewise.
4894 (i6400_msa_long_logic2) Likewise.
4895 (i6400_msa_mult) Likewise.
4896 (i6400_msa_long_float2) Likewise.
4897 (i6400_msa_long_float4) Likewise.
4898 (i6400_msa_long_float5) Likewise.
4899 (i6400_msa_long_float8) Likewise.
4900 (i6400_fpu_fadd): Include frint type.
4901 (i6400_fpu_store): New define_insn_reservation.
4902 (i6400_fpu_load): Likewise.
4903 (i6400_fpu_move): Likewise.
4904 (i6400_fpu_fcmp): Likewise.
4905 (i6400_fpu_fmadd): Likewise.
4906 (i6400_int_mult): Include imul3nc type and update reservation.
4907 (i6400_int_div): Include idiv3 type and update reservation.
4908 (i6400_int_load): Update to check type not move_type.
4909 (i6400_int_store): Likewise.
4910 (i6400_int_prefetch): Set zero latency.
4911
4912 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4913
4914 * gcc.c: Document new %@{...} sequence.
4915 (LINK_COMMAND_SPEC): Use it for the -L switches.
4916 (cpp_unique_options): Use it for the -I switches.
4917 (at_file_argbuf): New global variable.
4918 (in_at_file): Likewise.
4919 (alloc_args): Create at_file_argbuf.
4920 (clear_args): Truncate at_file_argbuf.
4921 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4922 (open_at_file): New function.
4923 (close_at_file): Likewise.
4924 (create_at_file): Delete.
4925 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4926 <'o'>: Likewise.
4927 <'@'>: New case.
4928 (validate_switches_from_spec): Deal with %@{...} sequence.
4929 (validate_switches): Likewise.
4930 (driver::finalize): Call clear_args.
4931
4932 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4933
4934 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4935
4936 2018-06-11 Martin Sebor <msebor@redhat.com>
4937
4938 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4939 (Wno-class-memaccess): Add @opindex.
4940 (Wno-templates, Wno-multiple-inheritance): Same.
4941 (Wno-virtual-inheritance, Wno-namespaces): Same.
4942 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4943 (Wno-format-overflow, Wno-format-truncation): Same.
4944 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4945 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4946 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4947 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4948 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4949 (Wno-misspelled-isr): Same.
4950
4951 2018-06-11 Martin Sebor <msebor@redhat.com>
4952
4953 * PR tree-optimization/86083
4954 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4955
4956 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4957
4958 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4959
4960 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4961
4962 PR target/85755
4963 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4964 on the correct operand.
4965 (*movdi_internal64): Ditto.
4966
4967 2018-06-11 Martin Liska <mliska@suse.cz>
4968
4969 PR tree-optimization/86089
4970 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4971
4972 2018-06-11 Julia Koval <julia.koval@intel.com>
4973
4974 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4975 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4976 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4977
4978 2018-06-11 Olivier Hainque <hainque@adacore.com>
4979
4980 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4981 for Ada with strict dwarf2.
4982
4983 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4984
4985 PR target/85755
4986 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4987 addresses.
4988
4989 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4990
4991 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4992
4993 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4994
4995 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4996 TARGET_ELF.
4997
4998 2018-06-08 Martin Liska <mliska@suse.cz>
4999
5000 * tree-cfg.h (debug_function): Fix argument type to match
5001 implementation.
5002
5003 2018-06-08 Martin Liska <mliska@suse.cz>
5004
5005 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5006 Remove usage of MPX-related (and removed) fields.
5007 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5008
5009 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5010
5011 * cfg.c (debug): Use TDF_NONE rather than 0.
5012 * cfghooks.c (debug): Likewise.
5013 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5014 (struct dump_option_value_info): Convert to...
5015 (struct kv_pair): ...this template type.
5016 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5017 rather than 0.
5018 (optinfo_verbosity_options): Likewise.
5019 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5020 OPTGROUP_NONE.
5021 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5022 than int for "optgroup_flags" param.
5023 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5024 "dump_kind" param.
5025 (dump_dec): Likewise.
5026 (dump_finish): Use TDF_NONE rather than 0.
5027 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5028 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5029 than 0. Update for change to option_ptr.
5030 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5031 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5032 0. Update for changes to optinfo_verbosity_options and
5033 optgroup_options.
5034 (opt_info_switch_p): Convert optgroup_flags from int to
5035 optgroup_flags_t.
5036 (dump_basic_block): Use dump_flags_t rather than int
5037 for "dump_kind" param.
5038 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5039 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5040 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5041 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5042 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5043 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5044 TDF_NONE): Convert from macros to...
5045 (enum dump_flag): ...this new enum.
5046 (dump_flags_t): Update to use enum.
5047 (operator|, operator&, operator~, operator|=, operator&=):
5048 Implement for dump_flags_t.
5049 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5050 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5051 Convert from macros to...
5052 (enum optgroup_flag): ...this new enum.
5053 (optgroup_flags_t): New typedef.
5054 (operator|, operator|=): Implement for optgroup_flags_t.
5055 (struct dump_file_info): Convert field "alt_flags" to
5056 dump_flags_t. Convert field "optgroup_flags" to
5057 optgroup_flags_t.
5058 (dump_basic_block): Use dump_flags_t rather than int for param.
5059 (dump_generic_expr_loc): Likewise.
5060 (dump_dec): Likewise.
5061 (dump_register): Convert param "optgroup_flags" to
5062 optgroup_flags_t.
5063 (opt_info_enable_passes): Likewise.
5064 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5065 than 0.
5066 * gimple-pretty-print.c (debug): Likewise.
5067 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5068 (merged_store_group::apply_stores): Likewise.
5069 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5070 * gimple.c (verify_gimple_pp): Likewise.
5071 * graphite-poly.c (print_pbb_body): Likewise.
5072 * passes.c (pass_manager::register_one_dump_file): Convert
5073 local "optgroup_flags" to optgroup_flags_t.
5074 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5075 (debug): Likewise.
5076 (debug_body): Likewise.
5077 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5078 to optgroup_flags_t.
5079 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5080 than 0.
5081 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5082 (convert_mult_to_fma): Likewise.
5083 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5084 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5085 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5086 "dump_kind" to dump_flags_t.
5087
5088 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5089
5090 * config/rs6000/rs6000.c (min, max): Delete.
5091
5092 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5093
5094 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5095 -mabi=spe and -mabi=no-spe.
5096
5097 2018-06-08 Martin Liska <mliska@suse.cz>
5098
5099 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5100 where we expect an existing summary.
5101
5102 2018-06-08 Martin Liska <mliska@suse.cz>
5103
5104 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5105 * ipa-inline.h (estimate_edge_growth): Likewise.
5106
5107 2018-06-08 Martin Liska <mliska@suse.cz>
5108
5109 * cgraph.c (function_version_hasher::hash): Use
5110 cgraph_node::get_uid ().
5111 (function_version_hasher::equal):
5112 * cgraph.h (cgraph_node::get_uid): New method.
5113 * ipa-inline.c (update_caller_keys): Use
5114 cgraph_node::get_uid ().
5115 (update_callee_keys): Likewise.
5116 * ipa-utils.c (searchc): Likewise.
5117 (ipa_reduced_postorder): Likewise.
5118 * lto-cgraph.c (input_node): Likewise.
5119 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5120 * symbol-summary.h (symtab_insertion): Likewise.
5121 (symtab_removal): Likewise.
5122 (symtab_duplication): Likewise.
5123 * tree-pretty-print.c (dump_function_header): Likewise.
5124 * tree-sra.c (convert_callers_for_node): Likewise.
5125
5126 2018-06-08 Martin Liska <mliska@suse.cz>
5127
5128 * cgraph.c (symbol_table::create_edge): Always assign a new
5129 unique number.
5130 (symbol_table::free_edge): Do not recycle numbers.
5131 * cgraph.h (cgraph_edge::get): New method.
5132 * symbol-summary.h (symtab_removal): Use it.
5133 (symtab_duplication): Likewise.
5134 (call_summary::hashable_uid): Remove.
5135
5136 2018-06-08 Martin Liska <mliska@suse.cz>
5137
5138 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5139 (initialize_growth_caches): Remove.
5140 (free_growth_caches): Likewise.
5141 (do_estimate_edge_time): Use edge_growth_cache.
5142 (do_estimate_edge_size): Likewise.
5143 (do_estimate_edge_hints): Likewise.
5144 * ipa-inline.c (reset_edge_caches): Likewise.
5145 (recursive_inlining): Likewise.
5146 (inline_small_functions): Likewise.
5147 * ipa-inline.h (initialize_growth_caches): Remove.
5148 (estimate_edge_size): Likewise.
5149 (estimate_edge_time): Likewise.
5150 (estimate_edge_hints): Likewise.
5151 (reset_edge_growth_cache): Likewise.
5152 * symbol-summary.h (call_summary::remove): New method.
5153
5154 2018-06-08 Martin Liska <mliska@suse.cz>
5155
5156 * ipa-cp.c (class edge_clone_summary): New summary.
5157 (grow_edge_clone_vectors): Remove.
5158 (ipcp_edge_duplication_hook): Remove.
5159 (class edge_clone_summary_t): New call_summary class.
5160 (ipcp_edge_removal_hook): Remove.
5161 (edge_clone_summary_t::duplicate): New function.
5162 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5163 (create_specialized_node): Likewise.
5164 (ipcp_driver): Initialize edge_clone_summaries and do not
5165 register hooks.
5166
5167 2018-06-08 Martin Liska <mliska@suse.cz>
5168
5169 * symbol-summary.h (get): New function.
5170 (call_summary::m_initialize_when_cloning): New class member.
5171
5172 2018-06-08 Martin Liska <mliska@suse.cz>
5173
5174 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5175 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5176 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5177 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5178 (remove_cgraph_node_from_order): Use the removed_nodes set.
5179 (do_per_function_toporder): Likwise.
5180 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5181 instead of summary_uid.
5182 (symtab_removal): Likewise.
5183 (symtab_duplication): Likewise.
5184
5185 2018-06-08 Martin Liska <mliska@suse.cz>
5186
5187 * ipa-cp.c (ipcp_store_bits_results): Use
5188 ipcp_transformation_sum.
5189 (ipcp_store_vr_results): Likewise.
5190 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5191 to ...
5192 (ipcp_transformation_initialize): ... this.
5193 (ipa_set_node_agg_value_chain):
5194 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5195 (write_ipcp_transformation_info): Likewise.
5196 (read_ipcp_transformation_info): Likewise.
5197 (ipcp_update_bits): Likewise.
5198 (ipcp_update_vr): Likewise.
5199 (ipcp_transform_function): Likewise.
5200 * ipa-prop.h: Rename ipcp_transformation_summary to
5201 ipcp_transformation.
5202 (class ipcp_transformation_t): New function summary.
5203 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5204 (ipa_get_agg_replacements_for_node): Likewise.
5205
5206 2018-06-08 Martin Liska <mliska@suse.cz>
5207
5208 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5209 of struct.
5210 (class funct_state_summary_t): New function_summary class.
5211 (has_function_state): Remove.
5212 (get_function_state): Likewise.
5213 (set_function_state): Likewise.
5214 (add_new_function): Likewise.
5215 (funct_state_summary_t::insert): New function.
5216 (duplicate_node_data): Remove.
5217 (remove_node_data): Remove.
5218 (funct_state_summary_t::duplicate): New function.
5219 (register_hooks): Create new funct_state_summaries.
5220 (pure_const_generate_summary): Use it.
5221 (pure_const_write_summary): Likewise.
5222 (pure_const_read_summary): Likewise.
5223 (propagate_pure_const): Likewise.
5224 (propagate_nothrow): Likewise.
5225 (dump_malloc_lattice): Likewise.
5226 (propagate_malloc): Likewise.
5227 (execute): Do not register hooks, just remove summary
5228 instead.
5229 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5230 constructor.
5231
5232 2018-06-08 Martin Liska <mliska@suse.cz>
5233
5234 * ipa-reference.c (remove_node_data): Remove.
5235 (duplicate_node_data): Likewise.
5236 (class ipa_ref_var_info_summary_t): New class.
5237 (class ipa_ref_opt_summary_t): Likewise.
5238 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5239 (get_reference_optimization_summary): Use
5240 ipa_ref_opt_sum_summaries.
5241 (set_reference_vars_info): Remove.
5242 (set_reference_optimization_summary): Likewise.
5243 (ipa_init): Create summaries.
5244 (init_function_info): Use function summary.
5245 (ipa_ref_opt_summary_t::duplicate): New function.
5246 (ipa_ref_opt_summary_t::remove): New function.
5247 (get_read_write_all_from_node): Fix GNU coding style.
5248 (propagate): Use function summary.
5249 (write_node_summary_p): Fix GNU coding style.
5250 (stream_out_bitmap): Likewise.
5251 (ipa_reference_read_optimization_summary): Use function summary.
5252 (ipa_reference_c_finalize): Do not release hooks.
5253
5254 2018-06-08 Martin Liska <mliska@suse.cz>
5255
5256 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5257 (analyze_function_body): Extract multiple calls of get_create.
5258 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5259 * ipa-inline.c (recursive_inlining): Use ::get method.
5260 * ipa-inline.h (estimate_edge_growth): Likewise.
5261
5262 2018-06-08 Martin Liska <mliska@suse.cz>
5263
5264 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5265 HSA_INVALID.
5266 (hsa_function_summary::hsa_function_summary): Use the new enum
5267 value.
5268 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5269 * hsa-gen.c (hsa_get_host_function): Likewise.
5270 (get_brig_function_name): Likewise.
5271 * ipa-hsa.c (process_hsa_functions): Likewise.
5272 (ipa_hsa_write_summary): Likewise.
5273 * symbol-summary.h (symtab_duplication): Use ::get function/
5274 (get): New function.
5275
5276 2018-06-08 Martin Liska <mliska@suse.cz>
5277
5278 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5279 of get.
5280 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5281 (hsa_register_kernel): Likewise.
5282 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5283 * hsa-gen.c (hsa_get_host_function): Likewise.
5284 (get_brig_function_name): Likewise.
5285 (generate_hsa): Likewise.
5286 (pass_gen_hsail::execute): Likewise.
5287 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5288 (devirtualization_time_bonus): Likewise.
5289 (ipcp_propagate_stage): Likewise.
5290 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5291 (edge_set_predicate): Likewise.
5292 (evaluate_conditions_for_known_args): Likewise.
5293 (evaluate_properties_for_edge): Likewise.
5294 (ipa_fn_summary::reset): Likewise.
5295 (ipa_fn_summary_t::duplicate): Likewise.
5296 (dump_ipa_call_summary): Likewise.
5297 (ipa_dump_fn_summary): Likewise.
5298 (analyze_function_body): Likewise.
5299 (compute_fn_summary): Likewise.
5300 (estimate_edge_devirt_benefit): Likewise.
5301 (estimate_edge_size_and_time): Likewise.
5302 (estimate_calls_size_and_time): Likewise.
5303 (estimate_node_size_and_time): Likewise.
5304 (inline_update_callee_summaries): Likewise.
5305 (remap_edge_change_prob): Likewise.
5306 (remap_edge_summaries): Likewise.
5307 (ipa_merge_fn_summary_after_inlining): Likewise.
5308 (ipa_update_overall_fn_summary): Likewise.
5309 (read_ipa_call_summary): Likewise.
5310 (inline_read_section): Likewise.
5311 (write_ipa_call_summary): Likewise.
5312 (ipa_fn_summary_write): Likewise.
5313 (ipa_free_fn_summary): Likewise.
5314 * ipa-hsa.c (process_hsa_functions): Likewise.
5315 (ipa_hsa_write_summary): Likewise.
5316 (ipa_hsa_read_section): Likewise.
5317 * ipa-icf.c (sem_function::merge): Likewise.
5318 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5319 (do_estimate_edge_time): Likewise.
5320 (estimate_size_after_inlining): Likewise.
5321 (estimate_growth): Likewise.
5322 (growth_likely_positive): Likewise.
5323 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5324 (inline_call): Likewise.
5325 * ipa-inline.c (caller_growth_limits): Likewise.
5326 (can_inline_edge_p): Likewise.
5327 (can_inline_edge_by_limits_p): Likewise.
5328 (compute_uninlined_call_time): Likewise.
5329 (compute_inlined_call_time): Likewise.
5330 (want_inline_small_function_p): Likewise.
5331 (edge_badness): Likewise.
5332 (update_caller_keys): Likewise.
5333 (update_callee_keys): Likewise.
5334 (recursive_inlining): Likewise.
5335 (inline_small_functions): Likewise.
5336 (inline_to_all_callers_1): Likewise.
5337 (dump_overall_stats): Likewise.
5338 (early_inline_small_functions): Likewise.
5339 (early_inliner): Likewise.
5340 * ipa-inline.h (estimate_edge_growth): Likewise.
5341 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5342 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5343 * ipa-prop.h (IPA_NODE_REF): Likewise.
5344 (IPA_EDGE_REF): Likewise.
5345 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5346 (propagate_malloc): Likewise.
5347 * ipa-split.c (execute_split_functions): Likewise.
5348 * symbol-summary.h: Rename get to get_create.
5349 (get): Likewise.
5350 (get_create): Likewise.
5351 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5352
5353 2018-06-08 Martin Liska <mliska@suse.cz>
5354
5355 * symbol-summary.h (release): Move definition out of class
5356 declaration.
5357 (symtab_removal): Likewise.
5358 (symtab_duplication): Likewise.
5359
5360 2018-06-08 Martin Liska <mliska@suse.cz>
5361
5362 * symbol-summary.h (function_summary): Move constructor
5363 implementation out of class declaration.
5364 (release): Likewise.
5365 (symtab_insertion): Likewise.
5366 (symtab_removal): Likewise.
5367 (symtab_duplication): Likewise.
5368 (get): Likewise.
5369
5370 2018-06-08 Martin Liska <mliska@suse.cz>
5371
5372 * Makefile.in: Remove support for MPX (macros, related functions,
5373 fields in cgraph_node, ...).
5374 * builtin-types.def (BT_BND): Likewise.
5375 (BT_FN_BND_CONST_PTR): Likewise.
5376 (BT_FN_CONST_PTR_BND): Likewise.
5377 (BT_FN_VOID_PTR_BND): Likewise.
5378 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5379 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5380 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5381 (expand_builtin_mempcpy_with_bounds): Likewise.
5382 (expand_builtin_memset_with_bounds): Likewise.
5383 (expand_builtin_memset_args): Likewise.
5384 (std_expand_builtin_va_start): Likewise.
5385 (expand_builtin): Likewise.
5386 (expand_builtin_with_bounds): Likewise.
5387 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5388 (DEF_LIB_BUILTIN_CHKP): Likewise.
5389 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5390 (DEF_CHKP_BUILTIN): Likewise.
5391 (BUILT_IN_MEMCPY): Likewise.
5392 (BUILT_IN_MEMMOVE): Likewise.
5393 (BUILT_IN_MEMPCPY): Likewise.
5394 (BUILT_IN_MEMSET): Likewise.
5395 (BUILT_IN_STPCPY): Likewise.
5396 (BUILT_IN_STRCAT): Likewise.
5397 (BUILT_IN_STRCHR): Likewise.
5398 (BUILT_IN_STRCPY): Likewise.
5399 (BUILT_IN_STRLEN): Likewise.
5400 (BUILT_IN_MEMCPY_CHK): Likewise.
5401 (BUILT_IN_MEMMOVE_CHK): Likewise.
5402 (BUILT_IN_MEMPCPY_CHK): Likewise.
5403 (BUILT_IN_MEMSET_CHK): Likewise.
5404 (BUILT_IN_STPCPY_CHK): Likewise.
5405 (BUILT_IN_STRCAT_CHK): Likewise.
5406 (BUILT_IN_STRCPY_CHK): Likewise.
5407 * calls.c (store_bounds): Likewise.
5408 (emit_call_1): Likewise.
5409 (special_function_p): Likewise.
5410 (maybe_warn_nonstring_arg): Likewise.
5411 (initialize_argument_information): Likewise.
5412 (finalize_must_preallocate): Likewise.
5413 (compute_argument_addresses): Likewise.
5414 (expand_call): Likewise.
5415 * cfgexpand.c (expand_call_stmt): Likewise.
5416 (expand_return): Likewise.
5417 (expand_gimple_stmt_1): Likewise.
5418 (pass_expand::execute): Likewise.
5419 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5420 (cgraph_node::remove): Likewise.
5421 (cgraph_node::dump): Likewise.
5422 (cgraph_node::verify_node): Likewise.
5423 * cgraph.h (chkp_function_instrumented_p): Likewise.
5424 (symtab_node::get_alias_target): Likewise.
5425 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5426 (cgraph_local_p): Likewise.
5427 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5428 (cgraph_edge::rebuild_references): Likewise.
5429 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5430 (walk_polymorphic_call_targets): Likewise.
5431 (cgraph_node::expand_thunk): Likewise.
5432 (symbol_table::output_weakrefs): Likewise.
5433 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5434 (ix86_handle_option): Likewise.
5435 * config/i386/constraints.md: Likewise.
5436 * config/i386/i386-builtin-types.def (BND): Likewise.
5437 (VOID): Likewise.
5438 (PVOID): Likewise.
5439 (ULONG): Likewise.
5440 * config/i386/i386-builtin.def (BDESC_END): Likewise.
5441 (BDESC_FIRST): Likewise.
5442 (BDESC): Likewise.
5443 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5444 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5445 * config/i386/i386.c (enum reg_class): Likewise.
5446 (ix86_target_string): Likewise.
5447 (ix86_option_override_internal): Likewise.
5448 (ix86_conditional_register_usage): Likewise.
5449 (ix86_valid_target_attribute_inner_p): Likewise.
5450 (ix86_set_indirect_branch_type): Likewise.
5451 (ix86_set_current_function): Likewise.
5452 (ix86_function_arg_regno_p): Likewise.
5453 (init_cumulative_args): Likewise.
5454 (ix86_function_arg_advance): Likewise.
5455 (ix86_function_arg): Likewise.
5456 (ix86_pass_by_reference): Likewise.
5457 (ix86_function_value_regno_p): Likewise.
5458 (ix86_function_value_1): Likewise.
5459 (ix86_function_value_bounds): Likewise.
5460 (ix86_return_in_memory): Likewise.
5461 (ix86_setup_incoming_vararg_bounds): Likewise.
5462 (ix86_va_start): Likewise.
5463 (indirect_thunk_need_prefix): Likewise.
5464 (print_reg): Likewise.
5465 (ix86_print_operand): Likewise.
5466 (ix86_expand_call): Likewise.
5467 (ix86_output_function_return): Likewise.
5468 (reg_encoded_number): Likewise.
5469 (BDESC_VERIFYS): Likewise.
5470 (ix86_init_mpx_builtins): Likewise.
5471 (ix86_init_builtins): Likewise.
5472 (ix86_emit_cmove): Likewise.
5473 (ix86_emit_move_max): Likewise.
5474 (ix86_expand_builtin): Likewise.
5475 (ix86_builtin_mpx_function): Likewise.
5476 (ix86_get_arg_address_for_bt): Likewise.
5477 (ix86_load_bounds): Likewise.
5478 (ix86_store_bounds): Likewise.
5479 (ix86_load_returned_bounds): Likewise.
5480 (ix86_store_returned_bounds): Likewise.
5481 (ix86_class_likely_spilled_p): Likewise.
5482 (ix86_hard_regno_mode_ok): Likewise.
5483 (x86_order_regs_for_local_alloc): Likewise.
5484 (ix86_mitigate_rop): Likewise.
5485 (ix86_bnd_prefixed_insn_p): Likewise.
5486 (ix86_mpx_bound_mode): Likewise.
5487 (ix86_make_bounds_constant): Likewise.
5488 (ix86_initialize_bounds): Likewise.
5489 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5490 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5491 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5492 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5493 (TARGET_CHKP_BOUND_MODE): Likewise.
5494 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5495 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5496 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5497 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5498 * config/i386/i386.h (TARGET_MPX): Likewise.
5499 (TARGET_MPX_P): Likewise.
5500 (VALID_BND_REG_MODE): Likewise.
5501 (FIRST_BND_REG): Likewise.
5502 (LAST_BND_REG): Likewise.
5503 (enum reg_class): Likewise.
5504 (BND_REG_P): Likewise.
5505 (BND_REGNO_P): Likewise.
5506 (BNDmode): Likewise.
5507 (ADJUST_INSN_LENGTH): Likewise.
5508 * config/i386/i386.md: Likewise.
5509 * config/i386/i386.opt: Likewise.
5510 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5511 (defined): Likewise.
5512 (LINK_MPX): Likewise.
5513 (MPX_SPEC): Likewise.
5514 (LIBMPX_SPEC): Likewise.
5515 (LIBMPXWRAPPERS_SPEC): Likewise.
5516 (CHKP_SPEC): Likewise.
5517 * config/i386/predicates.md: Likewise.
5518 * dbxout.c (dbxout_type): Likewise.
5519 * doc/extend.texi: Likewise.
5520 * doc/invoke.texi: Likewise.
5521 * doc/md.texi: Likewise.
5522 * doc/tm.texi: Likewise.
5523 * doc/tm.texi.in: Likewise.
5524 * dwarf2out.c (is_base_type): Likewise.
5525 (gen_formal_types_die): Likewise.
5526 (gen_subprogram_die): Likewise.
5527 (gen_type_die_with_usage): Likewise.
5528 (gen_decl_die): Likewise.
5529 (dwarf2out_late_global_decl): Likewise.
5530 * expr.c (expand_assignment): Likewise.
5531 (emit_storent_insn): Likewise.
5532 (store_expr_with_bounds): Likewise.
5533 (store_expr): Likewise.
5534 (expand_expr_real_1): Likewise.
5535 * expr.h (store_expr_with_bounds): Likewise.
5536 * function.c (use_register_for_decl): Likewise.
5537 (struct bounds_parm_data): Likewise.
5538 (assign_parms_augmented_arg_list): Likewise.
5539 (assign_parm_find_entry_rtl): Likewise.
5540 (assign_parm_is_stack_parm): Likewise.
5541 (assign_parm_load_bounds): Likewise.
5542 (assign_bounds): Likewise.
5543 (assign_parms): Likewise.
5544 (expand_function_start): Likewise.
5545 * gcc.c (CHKP_SPEC): Likewise.
5546 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5547 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5548 (wrestrict_dom_walker::check_call): Likewise.
5549 * gimple.c (gimple_build_call_from_tree): Likewise.
5550 * gimple.h (enum gf_mask): Likewise.
5551 (gimple_call_with_bounds_p): Likewise.
5552 (gimple_call_set_with_bounds): Likewise.
5553 * gimplify.c (gimplify_init_constructor): Likewise.
5554 * ipa-cp.c (initialize_node_lattices): Likewise.
5555 (propagate_constants_across_call): Likewise.
5556 (find_more_scalar_values_for_callers_subset): Likewise.
5557 * ipa-hsa.c (process_hsa_functions): Likewise.
5558 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5559 * ipa-icf.c (sem_function::merge): Likewise.
5560 * ipa-inline.c (early_inliner): Likewise.
5561 * ipa-pure-const.c (warn_function_noreturn): Likewise.
5562 (warn_function_cold): Likewise.
5563 (propagate_pure_const): Likewise.
5564 * ipa-ref.h (enum GTY): Likewise.
5565 * ipa-split.c (find_retbnd): Likewise.
5566 (consider_split): Likewise.
5567 (split_function): Likewise.
5568 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5569 * ipa.c (walk_polymorphic_call_targets): Likewise.
5570 (symbol_table::remove_unreachable_nodes): Likewise.
5571 (process_references): Likewise.
5572 (cgraph_build_static_cdtor_1): Likewise.
5573 * lto-cgraph.c (lto_output_node): Likewise.
5574 (output_refs): Likewise.
5575 (compute_ltrans_boundary): Likewise.
5576 (input_overwrite_node): Likewise.
5577 (input_node): Likewise.
5578 (input_cgraph_1): Likewise.
5579 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5580 * passes.c (pass_manager::execute_early_local_passes): Likewise.
5581 (class pass_chkp_instrumentation_passes): Likewise.
5582 (make_pass_chkp_instrumentation_passes): Likewise.
5583 * passes.def: Likewise.
5584 * rtl.h (struct GTY): Likewise.
5585 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5586 * stor-layout.c (layout_type): Likewise.
5587 * symtab.c: Likewise.
5588 * target.def: Likewise.
5589 * targhooks.c (default_chkp_bound_type): Likewise.
5590 (default_chkp_bound_mode): Likewise.
5591 (default_builtin_chkp_function): Likewise.
5592 (default_chkp_function_value_bounds): Likewise.
5593 (default_chkp_make_bounds_constant): Likewise.
5594 (default_chkp_initialize_bounds): Likewise.
5595 * targhooks.h (default_chkp_bound_type): Likewise.
5596 (default_chkp_bound_mode): Likewise.
5597 (default_builtin_chkp_function): Likewise.
5598 (default_chkp_function_value_bounds): Likewise.
5599 (default_chkp_make_bounds_constant): Likewise.
5600 (default_chkp_initialize_bounds): Likewise.
5601 * toplev.c (compile_file): Likewise.
5602 (process_options): Likewise.
5603 * tree-core.h (DEF_BUILTIN): Likewise.
5604 (DEF_BUILTIN_CHKP): Likewise.
5605 * tree-inline.c (declare_return_variable): Likewise.
5606 (remap_gimple_stmt): Likewise.
5607 (copy_bb): Likewise.
5608 (initialize_inlined_parameters): Likewise.
5609 (expand_call_inline): Likewise.
5610 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5611 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5612 (make_pass_ipa_chkp_produce_thunks): Likewise.
5613 (make_pass_chkp): Likewise.
5614 (make_pass_chkp_opt): Likewise.
5615 (make_pass_chkp_instrumentation_passes): Likewise.
5616 * tree-pretty-print.c (dump_generic_node): Likewise.
5617 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5618 * tree-ssa-dce.c (propagate_necessity): Likewise.
5619 (eliminate_unnecessary_stmts): Likewise.
5620 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5621 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5622 * tree-ssa-sccvn.h: Likewise.
5623 * tree-ssa-strlen.c (get_string_length): Likewise.
5624 (valid_builtin_call): Likewise.
5625 (adjust_last_stmt): Likewise.
5626 (handle_builtin_strchr): Likewise.
5627 (handle_builtin_strcpy): Likewise.
5628 (handle_builtin_stxncpy): Likewise.
5629 (handle_builtin_memcpy): Likewise.
5630 (handle_builtin_strcat): Likewise.
5631 (strlen_check_and_optimize_stmt): Likewise.
5632 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5633 * tree-streamer-in.c: Likewise.
5634 * tree-streamer.c (record_common_node): Likewise.
5635 * tree.c (tree_code_size): Likewise.
5636 (wide_int_to_tree_1): Likewise.
5637 (type_contains_placeholder_1): Likewise.
5638 (build_common_tree_nodes): Likewise.
5639 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5640 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5641 (POINTER_BOUNDS_P): Likewise.
5642 (BOUNDED_TYPE_P): Likewise.
5643 (BOUNDED_P): Likewise.
5644 (CALL_WITH_BOUNDS_P): Likewise.
5645 (pointer_bounds_type_node): Likewise.
5646 * value-prof.c (gimple_ic): Likewise.
5647 * var-tracking.c (vt_add_function_parameters): Likewise.
5648 * varasm.c (make_decl_rtl): Likewise.
5649 (assemble_start_function): Likewise.
5650 (output_constant): Likewise.
5651 (maybe_assemble_visibility): Likewise.
5652 * varpool.c (ctor_for_folding): Likewise.
5653 * chkp-builtins.def: Remove.
5654 * ipa-chkp.c: Remove.
5655 * ipa-chkp.h: Remove.
5656 * rtl-chkp.c: Remove.
5657 * rtl-chkp.h: Remove.
5658 * tree-chkp-opt.c: Remove.
5659 * tree-chkp.c: Remove.
5660 * tree-chkp.h: Remove.
5661
5662 2018-06-07 Carl Love <cel@us.ibm.com>
5663
5664 * config/rs6000/vsx.md (vextract_fp_from_shorth,
5665 vextract_fp_from_shortl): Add BE support.
5666
5667 2018-06-07 Paul Koning <ni1d@arrl.net>
5668
5669 * compare-elim.c (try_merge_compare): Don't merge compare if
5670 address contains a side effect.
5671 (try_eliminate_compare): Likewise.
5672
5673 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
5674
5675 * config.gcc: Support "tremont".
5676 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5677 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5678 PROCESSOR_TREMONT.
5679 * config/i386/i386.c (m_TREMONT): Define.
5680 (processor_target_table): Add "tremont".
5681 (PTA_TREMONT): Define.
5682 (ix86_lea_outperforms): Add TARGET_TREMONT.
5683 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5684 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5685 and M_INTEL_GOLDMONT_PLUS.
5686 (fold_builtin_cpu): Add "tremont".
5687 (ix86_add_stmt_cost): Add TARGET_TREMONT.
5688 (ix86_option_override_internal): Add "tremont".
5689 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5690 (processor_type): Add PROCESSOR_TREMONT.
5691 * config/i386/x86-tune.def: Add m_TREMONT.
5692 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5693
5694 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5695
5696 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5697 symbol defined for msp430i* devices to be lower case.
5698
5699 2018-06-07 Richard Biener <rguenther@suse.de>
5700
5701 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5702 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
5703 Properly wrap signed arithmetic if overflow wraps.
5704
5705 2018-06-07 Jakub Jelinek <jakub@redhat.com>
5706
5707 PR tree-optimization/69615
5708 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5709 of a cast from a same precision integral SSA_NAME in a bb dominated
5710 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
5711 cast to utype if rhs2 has already a compatible type.
5712
5713 2018-06-07 Richard Biener <rguenther@suse.de>
5714
5715 PR tree-optimization/85935
5716 * graphite-scop-detection.c (find_params_in_bb): Analyze
5717 condition operands with respect to the correct loop. Assert
5718 the analysis doesn't fail.
5719
5720 2018-06-04 Carl Love <cel@us.ibm.com>
5721
5722 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5723 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
5724 as it is slightly cheaper.
5725 (first_match_or_eos_index_<mode>):
5726 Calculate index using natural element order.
5727 (first_match_index_<mode>):
5728 Calculate index using natural element order.
5729 (first_match_or_eos_index_<mode>):
5730 Calculate index using natural order.
5731 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5732 for BE and LE modes.
5733 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5734 P9V_BUILTIN_VCLZLSBB_V16QI.
5735 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5736 specific.
5737
5738 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5739
5740 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5741 indentation and line wrap for many prototypes. Add missing
5742 @smallexample directives around block of prototypes for vec_xl and
5743 vec_xst.
5744
5745 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5746
5747 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5748 track if we pass or return IEEE 128-bit floating point.
5749 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5750 C++ mangling that is compatible with GCC 8.1.
5751 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5752 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5753 floating point types.
5754 (rs6000_function_arg_advance_1): Likewise.
5755 (rs6000_mangle_type): Optionally generate mangled names that match
5756 what GCC 8.1 generated for IEEE 128-bit floating point types.
5757 (rs6000_globalize_decl_name): If we have an external function that
5758 passes or returns IEEE 128-bit types, generate a weak reference
5759 from the mangled name used in GCC 8.1 to the current mangled
5760 name.
5761 (rs6000_init_builtins): Make __ibm128 use the long double type if
5762 long double is IBM extended double. Make __float128 use the long
5763 double type if long double is IEEE 128-bit.
5764
5765 PR target/85657
5766 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5767 macro for __ibm128 built-in functions.
5768 (PACK_IF): Add __ibm128 pack/unpack functions.
5769 (UNPACK_IF): Likewise.
5770 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5771 enable long double built-in functions if long double is IEEE
5772 128-bit floating point.
5773 (rs6000_invalid_builtin): Update long double built-in function
5774 error message.
5775 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5776 functions, adjust the built-in function to use the long double
5777 built-in function if __ibm128 and long double are the same type.
5778 * doc/extend.texi (PowerPC builtins): Update documention for
5779 __builtin_{,un}pack_longdouble. Add documentation for
5780 __builtin_{,un}pack_ibm128.
5781
5782 2018-06-06 Jim Wilson <jimw@sifive.com>
5783
5784 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5785 (struct machine_function): New field interrupt_mode.
5786 (riscv_handle_type_attribute): New function. Add forward declaration.
5787 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5788 (riscv_expand_epilogue): Check interrupt_mode field.
5789 (riscv_set_current_function): Check interrupt attribute args and
5790 set interrupt_mode field.
5791 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5792 (riscv_sret, riscv_uret): New.
5793 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5794 new arguments to interrupt attribute.
5795
5796 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5797
5798 PR target/63177
5799 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5800 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5801
5802 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5803
5804 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5805 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5806 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5807 several redundant entries.
5808
5809 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5810
5811 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5812 type from "rtx" to "rtx_insn *".
5813 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5814 for local "call_insn", removing cast.
5815 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5816
5817 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5818
5819 PR tree-optimization/86066
5820 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5821 for BIT_INSERT_EXPR stores.
5822
5823 2018-06-06 Richard Biener <rguenther@suse.de>
5824
5825 PR tree-optimization/86062
5826 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5827 component refs ontop
5828 of to be offsetted base.
5829
5830 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5831
5832 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5833 to be static and remove check on interrupt attribute name.
5834
5835 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5836
5837 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5838 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5839
5840 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5841
5842 PR target/79924
5843 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5844 second argument.
5845 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5846 Remove second argument, change how error is called.
5847 (aarch64_layout_arg): Remove second argument from
5848 aarch64_err_no_fpadvsimd call.
5849 (aarch64_init_cumulative_args): Ditto.
5850 (aarch64_gimplify_va_arg_expr): Ditto.
5851 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5852
5853 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5854
5855 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5856 (*simple_return_indirect_internal<mode>): Rename from
5857 simple_return_indirect_internal. Use W mode iterator.
5858 (rstorssp): New expander.
5859 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5860 (clrssbsy): New expander.
5861 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5862
5863 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5864
5865 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5866 __typeof__.
5867 (cmse_check_pointed_object): Likewise.
5868
5869 2018-06-05 Martin Liska <mliska@suse.cz>
5870
5871 PR gcov-profile/47618
5872 * doc/invoke.texi: Document how -fprofile-dir format
5873 is extended.
5874
5875 2018-06-05 Richard Biener <rguenther@suse.de>
5876
5877 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5878 removal pretend DOM info isn't available so we do not update
5879 it and only remove edges, not dominated blocks. Actually free
5880 DOM info in case we removed something. Remove unreachable blocks.
5881 (mfb_keep_latches): Work with either DOM info or marked backedges.
5882 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5883 first. Mark backedges if DOM info isn't available.
5884 (Re-)compute DOM info after cleanup_control_flow_pre.
5885
5886 2018-06-05 Richard Biener <rguenther@suse.de>
5887
5888 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5889 (locus_discrim_hasher::hash): Adjust.
5890 (locus_discrim_hasher::equal): Likewise.
5891 (next_discriminator_for_locus): Work on line directly.
5892 (same_line_p): Pass in expanded locus1 as well.
5893 (assign_discriminators): Avoid redundant location expansions.
5894
5895 2018-06-05 Richard Biener <rguenther@suse.de>
5896
5897 PR tree-optimization/86046
5898 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5899 if required after clearing TREE_ADDRESSABLE.
5900
5901 2018-06-05 Richard Biener <rguenther@suse.de>
5902
5903 PR tree-optimization/86047
5904 * tree-ssa-loop.c (for_each_index): Glob handling of all
5905 decls and constants and really handle all of them.
5906
5907 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5908
5909 PR target/81497
5910 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5911 qualifier_void_pointer and qualifier_const_void_pointer.
5912 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5913 (arm_init_builtins): Handle the above.
5914 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5915 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5916 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5917 void intrinsics.
5918
5919 2018-06-05 Martin Liska <mliska@suse.cz>
5920
5921 * auto-profile.c (read_autofdo_file): Do not use
5922 gcov_ctr_summary struct.
5923 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5924 * coverage.c (struct counts_entry): Likewise.
5925 (read_counts_file): Read just single summary entry.
5926 (get_coverage_counts): Use gcov_summary struct.
5927 * coverage.h (get_coverage_counts): Likewise.
5928 * gcov-dump.c (dump_working_sets): Likewise.
5929 (tag_summary): Dump just single summary.
5930 * gcov-io.c (gcov_write_summary): Write just histogram
5931 summary.
5932 (gcov_read_summary): Read just single summary.
5933 (compute_working_sets): Use gcov_summary struct.
5934 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5935 of GCOV_COUNTERS_SUMMABLE.
5936 (GCOV_COUNTERS_SUMMABLE): Remove.
5937 (GCOV_FIRST_VALUE_COUNTER): Replace with
5938 GCOV_COUNTER_V_INTERVAL.
5939 (struct gcov_ctr_summary): Remove.
5940 (struct gcov_summary): Directly use fields of former
5941 gcov_ctr_summary.
5942 (compute_working_sets): Use gcov_summary struct.
5943 * gcov.c (read_count_file): Do not use ctrs fields.
5944 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5945 struct.
5946 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5947 struct.
5948 * profile.c: Likewise.
5949 * profile.h: Likewise.
5950
5951 2018-06-05 Martin Liska <mliska@suse.cz>
5952
5953 PR gcov-profile/84846
5954 * gcov.c (output_lines): Print working directory only
5955 in intermediate format.
5956
5957 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5958
5959 * config/s390/s390-builtin-types.def: Add void function type.
5960 * config/s390/s390-builtins.def: Use the function type for the
5961 tbeginc builtin.
5962
5963 2018-06-04 Jim Wilson <jimw@sifive.com>
5964
5965 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5966 to int.
5967 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5968 and maybe_eh_return. Change regno to unsigned int. Use new args to
5969 handle EH_RETURN_DATA_REGNO registers properly.
5970 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5971 (riscv_expand_epilogue): Update comment. Change argument name and
5972 type. Update code to use new name and type. Pass new args to
5973 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5974 EXCEPTION_RETURN.
5975 * config/riscv/riscv.md (NORMAL_RETURN): New.
5976 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5977 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5978 (eh_return): Call gen_eh_return_internal and emit barrier.
5979 (eh_return_internal): Call riscv_expand_epilogue.
5980
5981 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5982
5983 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5984 bit_insertion field and declare can_be_merged_into method.
5985 (merged_store_group::can_be_merged_into): New method.
5986 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5987 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5988 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5989
5990 2018-06-04 Richard Biener <rguenther@suse.de>
5991
5992 PR tree-optimization/85955
5993 * builtins.c (fold_builtin_sincos): Convert pointers to
5994 destination to appropriate type before dereferencing.
5995
5996 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5997
5998 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5999
6000 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6001
6002 * expr.c (expand_expr_real_1): Force the operand into memory if
6003 its TYPE_MODE is BLKmode and if there is no integer mode for
6004 the number of bits being extracted.
6005
6006 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6007
6008 PR target/85832
6009 PR target/86036
6010 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6011 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6012
6013 2018-06-04 Richard Biener <rguenther@suse.de>
6014
6015 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6016 (cleanup_tree_cfg_noloop): ... single caller. Do
6017 start_recording_case_labels later.
6018
6019 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6020
6021 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6022 to _IMMINTRIN_H_INCLUDED.
6023 * config/i386/pconfigintrin.h: Ditto.
6024 * config/i386/waitpkgintrin.h: Ditto.
6025 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6026 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6027 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6028 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6029 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6030 waitpkgintrin.h and cldemoteintrin.h.
6031
6032 2018-06-04 Richard Biener <rguenther@suse.de>
6033
6034 PR tree-optimization/86038
6035 * tracer.c (find_best_successor): Check probability for
6036 being initialized, bail out if not.
6037
6038 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6039
6040 PR target/86003
6041 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6042 of bits to ignore when comparing architectures.
6043
6044 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6045
6046 PR tree-optimization/69615
6047 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6048 maximum or minimum of the type, try to merge it also as if
6049 range1 is + [-, x - 1] or + [x + 1, -].
6050
6051 PR c++/86025
6052 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6053
6054 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6055
6056 PR tree-optimization/86034
6057 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6058 the unsigned bitfield type in a bit insertion sequence if it does not
6059 have a larger precision than the bitfield size.
6060 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6061
6062 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6063
6064 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6065
6066 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6067
6068 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6069 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6070 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6071 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6072
6073 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6074
6075 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6076 Disable -fdelete-null-pointer-checks for ELF toolchain.
6077
6078 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6079 Kito Cheng <kito.cheng@gmail.com>
6080
6081 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6082 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6083 (nds32*-*-*): Add glibc and uclibc conditions.
6084 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6085 (TARGET_EXCEPT_UNWIND_INFO): Define.
6086 * config/nds32/elf.h: New file.
6087 * config/nds32/linux.h: New file.
6088 * config/nds32/nds32-elf.opt: New file.
6089 * config/nds32/nds32-linux.opt: New file.
6090 * config/nds32/nds32-fp-as-gp.c
6091 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6092 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6093 TARGET_LINUX_ABI.
6094 (nds32_asm_file_end): Ditto.
6095 (nds32_print_operand): Ditto.
6096 (nds32_insert_attributes): Ditto.
6097 (nds32_init_libfuncs): New function.
6098 (TARGET_HAVE_TLS): Define.
6099 (TARGET_INIT_LIBFUNCS): Define.
6100 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6101 spec content.
6102 (TARGET_ELF): Apply different mcmodel setting.
6103 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6104 been migrated into elf.h and linux.h files.
6105 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6106 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6107 (mcmodel): The content has been migrated into nds32-elf.opt and
6108 nds32-linux.opt files.
6109 * config/nds32/t-elf: New file.
6110 * config/nds32/t-linux: New file.
6111
6112 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6113 Shiva Chen <shiva0217@gmail.com>
6114
6115 * config/nds32/constants.md (unspec_volatile_element): Add
6116 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6117 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6118 optimization.
6119 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6120 (make_pass_nds32_fp_as_gp): Declare.
6121 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6122 optmization pass.
6123 (nds32_asm_function_end_prologue): Remove unused asm output.
6124 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6125 (nds32_asm_file_start): Output necessary fp_as_gp information.
6126 (nds32_option_override): Adjust register usage.
6127 (nds32_expand_prologue): Consider fp_as_gp situation.
6128 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6129 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6130 (epilogue): Ditto.
6131 (return): Ditto.
6132 (simple_return): Ditto.
6133 (omit_fp_begin): Output special directive for fp_as_gp.
6134 (omit_fp_end): Output special directive for fp_as_gp.
6135 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6136 mforbid-fp-as-gp): New options.
6137
6138 2018-06-01 Mark Wielaard <mark@klomp.org>
6139
6140 * dwarf2out.c (dwarf2out_finish): Remove generation of
6141 DW_AT_loclists_base.
6142
6143 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6144
6145 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6146 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6147 (struct merged_store_group): Add bit_insertion field.
6148 (dump_char_array): Use standard hexadecimal format.
6149 (merged_store_group::merged_store_group): Set bit_insertion to false.
6150 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6151 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6152 also print the mask in the dump file.
6153 (pass_store_merging::gate): Minor tweak.
6154 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6155 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6156 stores with INTEGER_CST stores.
6157 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6158 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6159 and use it throughout. Generate bit insertion sequences if need be.
6160 (pass_store_merging::process_store): Remove redundant condition.
6161 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6162
6163 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6164
6165 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6166 the 128-bit floating point types. Fix function comment.
6167
6168 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6169
6170 * config/aarch64/aarch64-simd.md
6171 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6172 mnemonics.
6173 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6174 mnemonics.
6175
6176 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6177
6178 PR tree-optimization/85989
6179 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6180 variable.
6181 (backprop::intersect_uses): Check it when deciding whether this
6182 is a backedge reference.
6183 (backprop::process_block): Add each phi to m_visited_phis
6184 after visiting it, then clear it at the end.
6185
6186 2018-06-01 Richard Biener <rguenther@suse.de>
6187
6188 * tree-vectorizer.h (vect_dr_stmt): New function.
6189 (vect_get_load_cost): Adjust.
6190 (vect_get_store_cost): Likewise.
6191 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6192 Use vect_dr_stmt instead of DR_SMTT.
6193 (vect_record_base_alignments): Likewise.
6194 (vect_calculate_target_alignment): Likewise.
6195 (vect_compute_data_ref_alignment): Likewise and make static.
6196 (vect_update_misalignment_for_peel): Likewise.
6197 (vect_verify_datarefs_alignment): Likewise.
6198 (vector_alignment_reachable_p): Likewise.
6199 (vect_get_data_access_cost): Likewise. Pass down
6200 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6201 (vect_get_peeling_costs_all_drs): Likewise.
6202 (vect_peeling_hash_get_lowest_cost): Likewise.
6203 (vect_enhance_data_refs_alignment): Likewise.
6204 (vect_find_same_alignment_drs): Likewise.
6205 (vect_analyze_data_refs_alignment): Likewise.
6206 (vect_analyze_group_access_1): Likewise.
6207 (vect_analyze_group_access): Likewise.
6208 (vect_analyze_data_ref_access): Likewise.
6209 (vect_analyze_data_ref_accesses): Likewise.
6210 (vect_vfa_segment_size): Likewise.
6211 (vect_small_gap_p): Likewise.
6212 (vectorizable_with_step_bound_p): Likewise.
6213 (vect_prune_runtime_alias_test_list): Likewise.
6214 (vect_analyze_data_refs): Likewise.
6215 (vect_supportable_dr_alignment): Likewise.
6216 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6217 (vect_gen_prolog_loop_niters): Likewise.
6218 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6219 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6220 modify DR_STMT.
6221 (vect_recog_mask_conversion_pattern): Likewise.
6222 (vect_try_gather_scatter_pattern): Likewise.
6223 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6224 to vect_get_store_cost.
6225 (vect_get_store_cost): Get stmt_info instead of DR.
6226 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6227 (vect_get_load_cost): Get stmt_info instead of DR.
6228
6229 2018-06-01 Richard Biener <rguenther@suse.de>
6230
6231 PR middle-end/86017
6232 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6233 vars wrapped in MEM_REFs.
6234
6235 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6236
6237 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6238 Fix subreg tests so that we only return a choice between
6239 GENERAL_REGS and FP_REGS if the original classes included both.
6240
6241 2018-06-01 Richard Biener <rguenther@suse.de>
6242
6243 PR ipa/85960
6244 * tree-ssa-structalias.c (get_function_part_constraint):
6245 Handle NULL fi->decl.
6246 (find_func_aliases_for_call): Properly handle indirect
6247 fi from direct call.
6248 (find_func_clobbers): Likewise.
6249 (ipa_pta_execute): Likewise.
6250 (create_variable_info_for): For functions that are ifunc_resolver
6251 resolve to a varinfo that contains the result of the resolver call.
6252 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6253 aliases.
6254
6255 2018-05-31 Michael Collison <michael.collison@arm.com>
6256
6257 * config/aarch64/aarch64.md:
6258 (*fix_to_zero_extenddfdi2): New pattern.
6259 * gcc.target/aarch64/fix_extend1.c: New testcase.
6260
6261 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6262
6263 PR middle-end/78809
6264 PR middle-end/83026
6265 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6266 and BUILT_IN_STRNCMP_EQ.
6267 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6268 BUILT_IN_STRNCMP_EQ.
6269 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6270 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6271 (gimple_fold_builtin): Likewise.
6272 * tree-ssa-strlen.c (compute_string_length): New function.
6273 (determine_min_obsize): New function.
6274 (handle_builtin_string_cmp): New function to handle calls to
6275 string compare functions.
6276 (strlen_optimize_stmt): Add handling to builtin string compare
6277 calls.
6278 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6279 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6280 * tree.c (build_common_builtin_nodes): Add new defines of
6281 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6282
6283 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6284
6285 PR target/85984
6286 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6287 functions with naked attribute.
6288
6289 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6290
6291 * config/i386/sse.md (avx_vec_concat<mode>):
6292 Substitute concat_tg_mode mode attribute with xtg_mode.
6293 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6294 (concat_tg_mode): Remove mode attribute.
6295
6296 2018-05-31 Martin Sebor <msebor@redhat.com>
6297
6298 PR c/82063
6299 * calls.c (alloc_max_size): Correct a logic error/typo.
6300 Treat excessive arguments as infinite. Warn for invalid arguments.
6301 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6302
6303 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6304
6305 PR target/85829
6306 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6307 and movx for Haswell.
6308
6309 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6310 Cesar Philippidis <cesar@codesourcery.com>
6311
6312 PR middle-end/85879
6313 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6314 when emitting error on private/firstprivate reductions.
6315 * omp-low.c (lower_omp_target): Avoid reference-type processing
6316 on pointers for firstprivate clause.
6317
6318 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6319
6320 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6321 (st1x2): Likewise.
6322 (st1x3): Likewise.
6323 * config/aarch64/aarch64-simd.md
6324 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6325 (aarch64_ld1_x3_<mode>): Likewise
6326 (aarch64_st1x2<VALLDIF:mode>): Likewise
6327 (aarch64_st1_x2_<mode>): Likewise
6328 (aarch64_st1x3<VALLDIF:mode>): Likewise
6329 (aarch64_st1_x3_<mode>): Likewise
6330 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6331 (vld1_s8_x3): Likewise.
6332 (vld1_u16_x3): Likewise.
6333 (vld1_s16_x3): Likewise.
6334 (vld1_u32_x3): Likewise.
6335 (vld1_s32_x3): Likewise.
6336 (vld1_u64_x3): Likewise.
6337 (vld1_s64_x3): Likewise.
6338 (vld1_f16_x3): Likewise.
6339 (vld1_f32_x3): Likewise.
6340 (vld1_f64_x3): Likewise.
6341 (vld1_p8_x3): Likewise.
6342 (vld1_p16_x3): Likewise.
6343 (vld1_p64_x3): Likewise.
6344 (vld1q_u8_x3): Likewise.
6345 (vld1q_s8_x3): Likewise.
6346 (vld1q_u16_x3): Likewise.
6347 (vld1q_s16_x3): Likewise.
6348 (vld1q_u32_x3): Likewise.
6349 (vld1q_s32_x3): Likewise.
6350 (vld1q_u64_x3): Likewise.
6351 (vld1q_s64_x3): Likewise.
6352 (vld1q_f16_x3): Likewise.
6353 (vld1q_f32_x3): Likewise.
6354 (vld1q_f64_x3): Likewise.
6355 (vld1q_p8_x3): Likewise.
6356 (vld1q_p16_x3): Likewise.
6357 (vld1q_p64_x3): Likewise.
6358 (vst1_s64_x2): Likewise.
6359 (vst1_u64_x2): Likewise.
6360 (vst1_f64_x2): Likewise.
6361 (vst1_s8_x2): Likewise.
6362 (vst1_p8_x2): Likewise.
6363 (vst1_s16_x2): Likewise.
6364 (vst1_p16_x2): Likewise.
6365 (vst1_s32_x2): Likewise.
6366 (vst1_u8_x2): Likewise.
6367 (vst1_u16_x2): Likewise.
6368 (vst1_u32_x2): Likewise.
6369 (vst1_f16_x2): Likewise.
6370 (vst1_f32_x2): Likewise.
6371 (vst1_p64_x2): Likewise.
6372 (vst1q_s8_x2): Likewise.
6373 (vst1q_p8_x2): Likewise.
6374 (vst1q_s16_x2): Likewise.
6375 (vst1q_p16_x2): Likewise.
6376 (vst1q_s32_x2): Likewise.
6377 (vst1q_s64_x2): Likewise.
6378 (vst1q_u8_x2): Likewise.
6379 (vst1q_u16_x2): Likewise.
6380 (vst1q_u32_x2): Likewise.
6381 (vst1q_u64_x2): Likewise.
6382 (vst1q_f16_x2): Likewise.
6383 (vst1q_f32_x2): Likewise.
6384 (vst1q_f64_x2): Likewise.
6385 (vst1q_p64_x2): Likewise.
6386 (vst1_s64_x3): Likewise.
6387 (vst1_u64_x3): Likewise.
6388 (vst1_f64_x3): Likewise.
6389 (vst1_s8_x3): Likewise.
6390 (vst1_p8_x3): Likewise.
6391 (vst1_s16_x3): Likewise.
6392 (vst1_p16_x3): Likewise.
6393 (vst1_s32_x3): Likewise.
6394 (vst1_u8_x3): Likewise.
6395 (vst1_u16_x3): Likewise.
6396 (vst1_u32_x3): Likewise.
6397 (vst1_f16_x3): Likewise.
6398 (vst1_f32_x3): Likewise.
6399 (vst1_p64_x3): Likewise.
6400 (vst1q_s8_x3): Likewise.
6401 (vst1q_p8_x3): Likewise.
6402 (vst1q_s16_x3): Likewise.
6403 (vst1q_p16_x3): Likewise.
6404 (vst1q_s32_x3): Likewise.
6405 (vst1q_s64_x3): Likewise.
6406 (vst1q_u8_x3): Likewise.
6407 (vst1q_u16_x3): Likewise.
6408 (vst1q_u32_x3): Likewise.
6409 (vst1q_u64_x3): Likewise.
6410 (vst1q_f16_x3): Likewise.
6411 (vst1q_f32_x3): Likewise.
6412 (vst1q_f64_x3): Likewise.
6413 (vst1q_p64_x3): Likewise.
6414
6415 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6416
6417 * config/msp430/msp430.c (msp430_output_labelref): Prepend
6418 user_label_prefix to name.
6419
6420 * tree-core.h: Update comment about the format of NAME string
6421 passed to handler in attribute_spec.
6422
6423 * config/msp430/msp430.md: Remove erroneous subreg expression from
6424 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6425 zero_extend{q,h}isi2.
6426
6427 2018-05-30 Borislav Petkov <bp@suse.de>
6428
6429 * doc/extend.texi: Document some architecture specific
6430 constraints and sort entries.
6431
6432 2018-05-30 Martin Sebor <msebor@redhat.com>
6433
6434 PR middle-end/85369
6435 * builtins.c (expand_builtin_stpcpy_1): New function.
6436 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6437 only if the former succeeds.
6438
6439 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6440
6441 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6442 in saphira.
6443
6444 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6445
6446 * doc/invoke.texi (-flinker-output): Document
6447
6448 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6449
6450 * passes.c (ipa_write_summaries): Only modify statements if body
6451 is in memory.
6452 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6453 incrementally linking.
6454 (ipa_passes): Likewise.
6455 * lto-cgraph.c (lto_output_node): When incrementally linking do not
6456 pass down resolution info.
6457 * common.opt (flag_incremental_link): Update info.
6458 * gcc.c (plugin specs): Turn flinker-output=* to
6459 -plugin-opt=-linker-output-known
6460 * toplev.c (compile_file): Also cut compilation when doing incremental
6461 link.
6462 * flag-types. (enum lto_partition_model): Add
6463 LTO_LINKER_OUTPUT_NOLTOREL.
6464 (invoke.texi): Add -flinker-output docs.
6465 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6466 link same way as WPA; do not stream in dead initializers.
6467
6468 * dwarf2out.c (dwarf2out_die_ref_for_decl,
6469 darf2out_register_external_decl): Support incremental link.
6470
6471 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6472
6473 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6474
6475 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6476
6477 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6478 it down to simple_object_copy_lto_debug_sections.
6479 (run_gcc): Determine incremental LTO link time and configure
6480 lto1 into non-wpa mode, disable renaming of debug sections.
6481
6482 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
6483
6484 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6485 descriptions of various incorrectly documented functions.
6486
6487 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
6488
6489 Revert:
6490 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6491 address check not strict.
6492
6493 2018-05-30 Richard Biener <rguenther@suse.de>
6494
6495 PR tree-optimization/85964
6496 * tracer.c (better_p): Drop initialized count check, we only
6497 call the function with initialized counts now.
6498 (find_best_successor): Do find a best edge if one
6499 has uninitialized count.
6500 (find_best_predecessor): Likewise. Do BB frequency check only
6501 if count is initialized.
6502
6503 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
6504
6505 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6506 (aarch64_ldrstr_offset_compare): New.
6507 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6508 load/store orderings.
6509 (aarch64_gen_adjusted_ldpstp): Likewise.
6510
6511 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
6512
6513 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6514 Check for subset of GENERAL_REGS and FP_REGS.
6515 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6516 r=w alternative.
6517
6518 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
6519
6520 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6521 and wi::to_poly_offset. Add the current offset and then check
6522 whether the sum fits, rather than using an unchecked addition of
6523 a checked term. Check for a shwi rather than a uhwi.
6524 * expr.c (get_bit_range): Use tree_to_poly_uint64.
6525 (store_constructor): Use poly_int_tree_p.
6526 (expand_expr_real_1): Likewise.
6527 * function.c (assign_temp): Likewise.
6528 * fold-const.c (const_binop): Use poly_int_tree_p and
6529 wi::to_poly_offset.
6530 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
6531 division.
6532 * ipa-icf-gimple.c (func_checker::compare_operand): Use
6533 to_poly_offset for MEM offsets.
6534 * ipa-icf.c (sem_variable::equals): Likewise.
6535 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6536 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6537 wi::to_poly_offset for BIT_FIELD_REF offsets.
6538 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6539 wi::to_poly_offset.
6540 * var-tracking.c (emit_note_insn_var_location): Use
6541 tree_to_poly_uint64.
6542
6543 2018-05-29 Jim Wilson <jimw@sifive.com>
6544
6545 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6546
6547 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
6548
6549 PR target/85950
6550 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6551 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6552 sequence.
6553 (sse4_1_round<mode>2): Use nonimmediate_operand
6554 for operand 1 predicate.
6555
6556 2018-05-29 Martin Sebor <msebor@redhat.com>
6557 Richard Biener <rguenther@suse.de>
6558
6559 PR testsuite/85888
6560 * calls.c (get_size_range): Call determine_value_range instead
6561 of get_value_range..
6562 * tree-vrp.h (determine_value_range): Declared new function.
6563 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6564
6565 2018-05-29 Richard Biener <rguenther@suse.de>
6566
6567 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6568 sure to use non-pattern stmts for get_earlier_stmt arguments.
6569 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6570 called on pattern stmts.
6571 (get_later_stmt): Likewise.
6572
6573 2018-05-29 Martin Liska <mliska@suse.cz>
6574
6575 PR gcov-profile/85759
6576 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6577 env variables.
6578
6579 2018-05-29 Jakub Jelinek <jakub@redhat.com>
6580
6581 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6582 VEC_UNPACK_*_EXPR.
6583 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6584 VEC_PACK_*_EXPR.
6585
6586 PR target/85918
6587 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6588 VEC_PACK_FLOAT_EXPR): New tree codes.
6589 * tree-pretty-print.c (op_code_prio): Handle
6590 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6591 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6592 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6593 * tree-inline.c (estimate_operator_cost): Likewise.
6594 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6595 * fold-const.c (const_binop): Likewise.
6596 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6597 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6598 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6599 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6600 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6601 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6602 * expr.c (expand_expr_real_2): Likewise.
6603 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6604 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6605 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6606 optabs.
6607 * optabs.c (expand_widen_pattern_expr): For
6608 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6609 sign from result type rather than operand's type.
6610 (expand_binop_directly): For vec_packu_float_optab and
6611 vec_packs_float_optab allow result type to be different from operand's
6612 type.
6613 * optabs-tree.c (optab_for_tree_code): Handle
6614 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6615 VEC_PACK_FLOAT_EXPR. Formatting fixes.
6616 * tree-vect-generic.c (expand_vector_operations_1): Handle
6617 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6618 VEC_PACK_FLOAT_EXPR.
6619 * tree-vect-stmts.c (supportable_widening_operation): Handle
6620 FIX_TRUNC_EXPR.
6621 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6622 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6623 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6624 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6625 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6626 mode attributes.
6627 (vec_pack<floatprefix>_float_<mode>): New expander.
6628 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6629 attributes.
6630 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6631 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6632 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6633 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6634 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6635 Document.
6636 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6637 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6638 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6639 VEC_PACK_FLOAT_EXPR): Document.
6640
6641 2018-05-29 Richard Biener <rguenther@suse.de>
6642
6643 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6644 member.
6645 (stmt_vec_info_vec): Make pointer.
6646 (init_stmt_vec_info_vec): Remove.
6647 (free_stmt_vec_info_vec): Likewise.
6648 (set_stmt_vec_info_vec): New function.
6649 (free_stmt_vec_infos): Likewise.
6650 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6651 (set_vinfo_for_stmt): Likewise.
6652 (get_earlier_stmt): Likewise.
6653 (get_later_stmt): Likewise.
6654 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6655 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6656 (vec_info::~vec_info): Free stmt_vec_infos.
6657 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6658 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6659 (pass_slp_vectorize::execute): Likewise.
6660 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6661 (free_stmt_vec_info_vec): Likewise.
6662 (set_stmt_vec_info_vec): New function.
6663 (free_stmt_vec_infos): Likewise.
6664 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6665 the global stmt_vec_info_vec.
6666 * tree-parloops.c (gather_scalar_reductions): Use
6667 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6668 vector.
6669
6670 2018-05-29 Richard Biener <rguenther@suse.de>
6671
6672 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6673
6674 2018-05-29 Martin Liska <mliska@suse.cz>
6675 David Malcolm <dmalcolm@redhat.com>
6676
6677 * vec.c (test_reverse): New.
6678 (vec_c_tests): Add new test.
6679 * vec.h (vl_ptr>::reverse): New function.
6680
6681 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
6682
6683 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6684
6685 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6686 and later.
6687
6688 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6689
6690 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6691
6692 2018-05-28 Richard Biener <rguenther@suse.de>
6693
6694 PR tree-optimization/85933
6695 * tree-vect-data-refs.c (vect_record_base_alignments): Only
6696 look at stmts marked as vectorizable.
6697
6698 2018-05-28 Richard Biener <rguenther@suse.de>
6699
6700 PR tree-optimization/85934
6701 * tree-vect-generic.c (expand_vector_operations_1): Hoist
6702 vector boolean check before scalar optimization.
6703
6704 2018-05-28 Jakub Jelinek <jakub@redhat.com>
6705
6706 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6707 for armv5te.
6708
6709 2018-05-28 Mark Wielaard <mark@klomp.org>
6710
6711 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6712 if it is an expression containing a minus sign.
6713
6714 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
6715
6716 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6717
6718 2018-05-27 Paul Koning <ni1d@arrl.net>
6719
6720 * config/pdp11/pdp11.md (truncsihi2): Remove.
6721
6722 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
6723 Chung-Ju Wu <jasonwucj@gmail.com>
6724
6725 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6726 implementation.
6727 (unaligned_store_dw): Ditto.
6728 * config/nds32/nds32-memory-manipulation.c
6729 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6730 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6731 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6732 (emit_setmem_word_loop): Rename to ...
6733 (emit_setmem_doubleword_loop): ... this.
6734 (nds32_gen_dup_4_byte_to_word_value): New function.
6735 (nds32_gen_dup_8_byte_to_double_word_value): New function.
6736 (nds32_expand_setmem_loop): Refine implementation.
6737 (nds32_expand_setmem_loop_v3m): Ditto.
6738 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6739 pattern.
6740
6741 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6742
6743 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6744
6745 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6746
6747 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6748 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6749 machine->attr_no_prologue_p.
6750 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6751 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6752 (nds32_expand_epilogue): Consider attr_naked_p.
6753 (nds32_expand_epilogue_v3pop): Likewise.
6754 (nds32_can_use_return_insn): Likewise.
6755 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6756 attr_no_prologue_p fields.
6757 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6758
6759 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6760
6761 PR target/85918
6762 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6763 attributes.
6764 * config/i386/sse.md
6765 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6766 Rename to ...
6767 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6768 ... this.
6769 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6770 Rename to ...
6771 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6772 ... this.
6773 (*<floatsuffix>floatv2div2sf2): Rename to ...
6774 (*float<floatunssuffix>v2div2sf2): ... this.
6775 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6776 (float<floatunssuffix>v2div2sf2_mask): ... this.
6777 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6778 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6779 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6780 to ...
6781 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6782 ... this.
6783 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6784 Rename to ...
6785 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6786 ... this.
6787 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6788 Rename to ...
6789 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6790 ... this.
6791 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6792 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6793 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6794 gen_ufix_truncv8dfv8si2.
6795 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6796 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6797 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6798 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6799 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6800 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6801 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6802 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6803
6804 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6805
6806 PR target/85900
6807 PR target/85345
6808 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6809
6810 2018-05-25 Jim Wilson <jimw@sifive.com>
6811
6812 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6813 * config/riscv/riscv.c (struct machine_function): Add
6814 interrupt_handler_p and attribute_checked_p fields.
6815 (riscv_attribute_table): Add interrupt.
6816 (riscv_interrupt_type_p): New.
6817 (riscv_save_reg_p): Save extra regs for interrupt handler.
6818 (riscv_use_save_libcall): Return false for interrupt handler.
6819 (riscv_first_stack_step): Add forward declaration.
6820 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6821 for interrupt handler with large frame. Use it for saved reg list.
6822 (riscv_expand_prologue): Move flag_stack_usage_info support to
6823 eliminate duplication.
6824 (riscv_expand_epilogue): Generate mret for interrupt handler.
6825 (riscv_epilogue_uses): New.
6826 (riscv_can_use_return_insn): Return false for interrupt handler.
6827 (riscv_function_ok_for_sibcall): Likewise.
6828 (riscv_set_current_function): Add interrupt handler support.
6829 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6830 * config/riscv/riscv.md (UNSPECV_MRET): New.
6831 (GP_REGNUM): New.
6832 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6833 (riscv_mret): New.
6834 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6835
6836 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6837
6838 PR tree-optimization/85712
6839 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6840 this candidate has already been replaced in-situ by a copy.
6841
6842 2018-05-25 Jason Merrill <jason@redhat.com>
6843
6844 PR c++/80485 - inline function non-zero address.
6845 * symtab.c (nonzero_address): Check DECL_COMDAT.
6846
6847 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6848
6849 PR target/83628
6850 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6851 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6852 extension of SImode operation. Use const123_operand predicate.
6853 (*saddsi_1): Remove.
6854 (*saddl_se_1): Ditto.
6855 (*ssubsi_1): Ditto.
6856 (*ssubl_se_1): Ditto.
6857 * config/alpha/predicates.md (const123_operand): New predicate.
6858 * config/alpha/constraints.md (P): Use IN_RANGE.
6859
6860 2018-05-25 Richard Biener <rguenther@suse.de>
6861
6862 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6863 defaulted to true.
6864 (ref_maybe_used_by_stmt_p): Likewise.
6865 (stmt_may_clobber_ref_p): Likewise.
6866 (stmt_may_clobber_ref_p_1): Likewise.
6867 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6868 and pass it along.
6869 (ref_maybe_used_by_stmt_p): Likewise.
6870 (stmt_may_clobber_ref_p): Likewise.
6871 (stmt_may_clobber_ref_p_1): Likewise.
6872 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6873 the alias oracle to disambiguate DRs with stmts DR analysis
6874 couldn't handle.
6875 (vect_analyze_data_refs): Do not give up on not analyzable
6876 DRs for BB vectorization. Remove code truncating the dataref
6877 vector.
6878
6879 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6880
6881 PR target/85832
6882 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6883 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6884 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6885
6886 2018-05-25 Richard Biener <rguenther@suse.de>
6887
6888 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6889 function, combining stmt data ref gathering and fatal analysis
6890 parts.
6891 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6892 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6893 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6894 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6895 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6896
6897 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6898
6899 PR tree-optimization/85720
6900 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6901 SCC if all partitions are builtins.
6902 (version_loop_by_alias_check): New parameter. Generate cancelable
6903 runtime alias check if all partitions are builtins.
6904 (distribute_loop): Update call to above function.
6905
6906 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6907
6908 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6909 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6910 (parm_default_def_partition_arg): Ditto.
6911 (set_parm_default_def_partition): Ditto.
6912 (get_parm_default_def_partitions): Ditto and make it static.
6913 (get_undefined_value_partitions): Ditto and make it static.
6914 (remove_ssa_form): Refactor call to init_var_map here.
6915 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6916 computation for loop region.
6917 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6918 (register_default_def): Delete.
6919 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6920 (parm_default_def_partition_arg): Ditto.
6921 (set_parm_default_def_partition): Ditto.
6922 (get_parm_default_def_partitions): Ditto and make it static.
6923 (get_undefined_value_partitions): Ditto and make it static.
6924 (coalesce_with_default, coalesce_with_default): Update comment.
6925 (create_coalesce_list_for_region): New func factored out from
6926 create_outofssa_var_map.
6927 (populate_coalesce_list_for_outofssa): New func factored out from
6928 create_outofssa_var_map and coalesce_ssa_name.
6929 (create_outofssa_var_map): Delete.
6930 (coalesce_ssa_name): Refactor to support live range computation.
6931 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6932 (get_parm_default_def_partitions): Delete.
6933 (get_undefined_value_partitions): Ditto.
6934 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6935 computation for loop region.
6936 (new_tree_live_info, loe_visit_block): Ditto.
6937 (live_worklist, set_var_live_on_entry): Ditto.
6938 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6939 * tree-ssa-live.h (struct _var_map): New fields.
6940 (init_var_map): Change decl.
6941 (region_contains_p): New.
6942
6943 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6944
6945 * tree-ssa-live.h (live_merge_and_clear): Delete.
6946
6947 2018-05-25 Richard Biener <rguenther@suse.de>
6948
6949 PR c++/85912
6950 * tree-dump.c (dequeue_and_dump): Remove access to removed
6951 operand 2 of a SWITCH_EXPR.
6952
6953 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6954
6955 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6956 multiplication and division.
6957 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6958 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6959 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6960 (cond_udiv_optab, cond_umod_optab): New optabs.
6961 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6962 (IFN_COND_RDIV): New internal functions.
6963 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6964 TRUNC_MOD_EXPR and RDIV_EXPR.
6965 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6966 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6967 New unspecs.
6968 (SVE_INT_BINARY): Include mult.
6969 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6970 (optab, sve_int_op): Handle mult.
6971 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6972 UNSPEC_COND_DIV.
6973 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6974 for SVE_INT_BINARY_SD.
6975
6976 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6977
6978 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6979 (optab, sve_int_op): Handle div and udiv.
6980 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6981 for SVE_INT_BINARY_SD.
6982 (*<optab><mode>3): New insn for the same.
6983
6984 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6985
6986 * tree-vect-patterns.c: Include predict.h.
6987 (vect_recog_divmod_pattern): Restrict check for division support
6988 to when optimizing for size.
6989
6990 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6991
6992 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6993 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6994 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6995 (gimple_match_op::set_op): Likewise.
6996 (gimple_resimplify4): Declare.
6997 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6998 (expr::gen_transform): Likewise.
6999 (decision_tree::gen): Generate a simplification routine for 4 operands.
7000 * gimple-match-head.c (gimple_simplify): Add an overload for
7001 4 operands. In the top-level function, handle up to 4 call
7002 arguments and call gimple_resimplify4.
7003 (gimple_resimplify4): New function.
7004 (build_call_internal): Pass a fourth operand.
7005 (maybe_push_to_seq): Likewise.
7006 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7007 Fold VEC_COND_EXPRs of an operation and a default value into
7008 an IFN_COND_* function if possible.
7009 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7010 New unspecs.
7011 (SVE_COND_FP_BINARY): Include them.
7012 (optab, sve_fp_op): Handle them.
7013 (SVE_INT_BINARY_REV): New code iterator.
7014 (SVE_COND_FP_BINARY_REV): New int iterator.
7015 (commutative): New int attribute.
7016 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7017 Declare.
7018 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7019 function.
7020 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7021 (*cond_<optab><mode>): New patterns for reversed operands.
7022
7023 2018-05-25 Richard Biener <rguenther@suse.de>
7024
7025 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7026 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7027 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7028 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7029 * tree-vect-data-refs.c (everywhere): Adjust users.
7030 * tree-vect-loop.c (everywhere): Likewise.
7031 * tree-vect-slp.c (everywhere): Likewise.
7032 * tree-vect-stmts.c (everywhere): Likewise.
7033 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7034
7035 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7036
7037 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7038 Rename to...
7039 (gcc_cv_as_section_exclude): ... this.
7040 Try Solaris as #exclude syntax.
7041 * configure: Regenerate.
7042 * config.in: Regenerate.
7043 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7044 SECTION_EXCLUDE.
7045 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7046 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7047
7048 * varasm.c (default_elf_asm_named_section): Don't check if
7049 HAVE_GAS_SECTION_EXCLUDE is defined.
7050
7051 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7052
7053 * doc/md.texi: Update the documentation of the cond_* optabs
7054 to mention the new final operand. Fix GET_MODE_NUNITS call.
7055 Describe the scalar case too.
7056 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7057 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7058 instead of 2.
7059 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7060 (get_conditional_internal_fn): Update comment.
7061 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7062 accumulator value as a final argument to conditional functions.
7063 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7064 a define_expand and add an "else" operand. Assert for now that
7065 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7066 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7067 (*cond_<optab><mode>): New patterns.
7068 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7069 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7070 (UNSPEC_COND_EOR): Delete.
7071 (optab): Remove associated mappings.
7072 (SVE_INT_BINARY): New code iterator.
7073 (sve_int_op): Remove int attribute and add "minus" to the code
7074 attribute.
7075 (SVE_COND_INT_OP): Delete.
7076 (SVE_COND_FP_OP): Rename to...
7077 (SVE_COND_FP_BINARY): ...this.
7078
7079 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7080
7081 * optabs.c (can_reuse_operands_p): New function.
7082 (maybe_legitimize_operands): Try to reuse the results for
7083 earlier operands.
7084
7085 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7086
7087 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7088 Add {q} suffix to insn mnemonic.
7089
7090 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7091
7092 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7093 (msp430_warn_func_return): New.
7094
7095 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7096
7097 * fold-const.c (tree_nonzero_bits): New function.
7098 * fold-const.h (tree_nonzero_bits): Likewise.
7099 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7100 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7101
7102 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7103
7104 PR target/85900
7105 PR target/85345
7106 * varasm.c (assemble_alias): Check ifunc_resolver only on
7107 FUNCTION_DECL.
7108
7109 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7110
7111 PR target/85903
7112 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7113 when memory input operand is handled.
7114
7115 2018-05-24 Luis Machado <luis.machado@linaro.org>
7116
7117 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7118 global.
7119 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7120
7121 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7122
7123 * match.pd: Delay FMA folds until after vectorization.
7124
7125 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7126
7127 PR target/83009
7128 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7129 address check not strict.
7130
7131 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7132
7133 * gimple-match.h (gimple_match_op): New class.
7134 (mprts_hook): Replace parameters with a gimple_match_op *.
7135 (maybe_build_generic_op): Likewise.
7136 (gimple_simplified_result_is_gimple_val): Replace parameters with
7137 a const gimple_match_op *.
7138 (gimple_simplify): Replace code_helper * and tree * parameters with
7139 a gimple_match_op * parameter.
7140 (gimple_resimplify1): Replace code_helper *, tree and tree *
7141 parameters with a gimple_match_op * parameter.
7142 (gimple_resimplify2): Likewise.
7143 (gimple_resimplify3): Likewise.
7144 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7145 parameters with a gimple_match_op * parameter.
7146 * gimple-match-head.c (gimple_simplify): Change prototypes of
7147 auto-generated functions to take a gimple_match_op * instead of
7148 separate code_helper * and tree * parameters. Make the same
7149 change in the top-level overload and update calls to the
7150 gimple_resimplify routines. Update calls to the auto-generated
7151 functions and to maybe_push_res_to_seq in the publicly-facing
7152 operation-specific gimple_simplify overloads.
7153 (gimple_match_op::MAX_NUM_OPS): Define.
7154 (gimple_resimplify1): Replace rcode and ops with a single res_op
7155 parameter. Update call to gimple_simplify.
7156 (gimple_resimplify2): Likewise.
7157 (gimple_resimplify3): Likewise.
7158 (mprts_hook): Replace parameters with a gimple_match_op *.
7159 (maybe_build_generic_op): Likewise.
7160 (build_call_internal): Replace type, nargs and ops with
7161 a gimple_match_op *.
7162 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7163 with a single gimple_match_op *. Update calls to mprts_hook,
7164 build_call_internal and gimple_simplified_result_is_gimple_val.
7165 Factor out code that is common to the tree_code and combined_fn cases.
7166 * genmatch.c (expr::gen_transform): Replace tem_code and
7167 tem_ops with a gimple_match_op called tem_op. Update calls
7168 to the gimple_resimplify functions and maybe_push_res_to_seq.
7169 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7170 res_ops. Update call to the gimple_resimplify functions.
7171 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7172 (decision_tree::gen): Make the functions take a gimple_match_op *
7173 called res_op instead of separate res_code and res_ops parameters.
7174 Update call accordingly.
7175 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7176 and ops with a single res_op parameter. Update calls to
7177 maybe_build_generic_op and maybe_push_res_to_seq.
7178 (fold_stmt_1): Update calls to gimple_simplify and
7179 replace_stmt_with_simplification.
7180 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7181 and gimple_simplified_result_is_gimple_val.
7182 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7183 gimple_simplify.
7184 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7185 with a gimple_match_op *.
7186 (vn_nary_build_or_lookup): Likewise. Update call to
7187 vn_nary_build_or_lookup_1.
7188 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7189 gimple_match_op *. Update calls to the gimple_resimplify routines
7190 and to gimple_simplified_result_is_gimple_val.
7191 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7192 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7193 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7194 (visit_nary_op): Likewise.
7195 (visit_reference_op_load): Likewise.
7196
7197 2018-05-23 Luis Machado <luis.machado@linaro.org>
7198
7199 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7200 modifier for printing the step amount.
7201
7202 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7203
7204 PR target/78849
7205 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7206 types.
7207
7208 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7209
7210 * doc/sourcebuild.texi (Endianness): New subsubsection.
7211
7212 2018-05-23 Luis Machado <luis.machado@linaro.org>
7213
7214 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7215 <prefetch_dynamic_strides>: New const bool field.
7216 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7217 prefetch_dynamic_strides.
7218 (exynosm1_prefetch_tune): Likewise.
7219 (thunderxt88_prefetch_tune): Likewise.
7220 (thunderx_prefetch_tune): Likewise.
7221 (thunderx2t99_prefetch_tune): Likewise.
7222 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7223 false.
7224 (aarch64_override_options_internal): Update to set
7225 PARAM_PREFETCH_DYNAMIC_STRIDES.
7226 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7227 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7228 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7229 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7230 prefetch-dynamic-strides setting.
7231
7232 2018-05-23 Luis Machado <luis.machado@linaro.org>
7233
7234 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7235 <minimum_stride>: New const int field.
7236 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7237 minimum_stride field defaulting to -1.
7238 (exynosm1_prefetch_tune): Likewise.
7239 (thunderxt88_prefetch_tune): Likewise.
7240 (thunderx_prefetch_tune): Likewise.
7241 (thunderx2t99_prefetch_tune): Likewise.
7242 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7243 <default_opt_level>: Set to 3.
7244 (aarch64_override_options_internal): Update to set
7245 PARAM_PREFETCH_MINIMUM_STRIDE.
7246 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7247 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7248 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7249 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7250 stride is constant and is below the minimum stride threshold.
7251
7252 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7253
7254 * config/arm/arm-cpus.in (mode26): Delete.
7255 (armv4): Delete mode26 reference.
7256 * config/arm/arm.c (arm_configure_build_target): Delete use of
7257 isa_bit_mode26.
7258
7259 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7260
7261 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7262 New insn pattern.
7263 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7264 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7265 for non-SSE modes.
7266 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7267 (floatunsdidf2): Ditto.
7268
7269 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7270
7271 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7272 (fixuns_trunc<mode>si2_avx512f): Ditto.
7273 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7274 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7275 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7276
7277 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7278
7279 PR rtl-optimization/79985
7280 * df-scan.c (df_insn_refs_collect): Remove special case for
7281 global registers and asm statements.
7282
7283 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7284
7285 * extend.texi (Global Register Variables): Rewrite the bullet list.
7286 Note that the register is available for allocation. Note that access
7287 via inline asm must use constraints. Add note about async-signal
7288 handlers. Remove paragraph about automagic register selection.
7289
7290 2018-05-23 Richard Biener <rguenther@suse.de>
7291
7292 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7293 of fixed offset from memset VN.
7294
7295 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7296
7297 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7298 first_interp field.
7299 (alloc_cand_and_find_basis): Initialize first_interp field.
7300 (slsr_process_mul): Modify first_interp field.
7301 (slsr_process_add): Likewise.
7302 (slsr_process_cast): Modify first_interp field for each new
7303 interpretation.
7304 (slsr_process_copy): Likewise.
7305 (dump_candidate): Dump first_interp field.
7306 (replace_mult_candidate): Process all interpretations, not just
7307 subsequent ones.
7308 (replace_rhs_if_not_dup): Likewise.
7309 (replace_one_candidate): Likewise.
7310
7311 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7312
7313 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7314 Add new boolean.
7315 (aarch64_needs_frame_chain): New function.
7316 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7317
7318 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7319
7320 PR target/84882
7321 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7322 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7323 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7324 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7325 as true for strict-align.
7326 (aarch64_can_inline_p): Perform checks even when callee has no
7327 attributes to check for strict alignment.
7328 * doc/extend.texi (AArch64 Function Attributes): Document
7329 no-strict-align.
7330 * doc/invoke.texi: (AArch64 Options): Likewise.
7331
7332 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7333
7334 PR tree-optimization/85853
7335 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7336 the handling of the root of the node to...
7337 (vect_slp_analyze_node_operations_1): ...this new function,
7338 and run the whole thing with the child nodes' def types
7339 set according to their SLP node's def type.
7340
7341 2018-05-23 Richard Biener <rguenther@suse.de>
7342
7343 PR middle-end/85874
7344 * tree-data-ref.c (create_runtime_alias_checks): Defer
7345 and ignore overflow warnings.
7346
7347 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7348
7349 PR tree-optimization/85822
7350 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7351 constants.
7352
7353 2018-05-23 Richard Biener <rguenther@suse.de>
7354
7355 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7356 memset constants via native_interpret_expr.
7357
7358 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7359
7360 PR target/85345
7361 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7362 attribute.
7363 (cgraph_node::create_alias): Likewise.
7364 (cgraph_node::get_availability): Check ifunc_resolver instead
7365 of looking up ifunc attribute.
7366 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7367 * varasm.c (do_assemble_alias): Likewise.
7368 (assemble_alias): Likewise.
7369 (default_binds_local_p_3): Likewise.
7370 * cgraph.h (cgraph_node): Add ifunc_resolver.
7371 (cgraph_node::only_called_directly_or_aliased_p): Return false
7372 for IFUNC resolver.
7373 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7374 attribute.
7375 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7376 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7377 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7378 instead of looking up ifunc attribute.
7379
7380 2018-05-22 Luis Machado <luis.machado@linaro.org>
7381
7382 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7383
7384 2018-05-22 Martin Sebor <msebor@redhat.com>
7385
7386 PR middle-end/85359
7387 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7388 only when expasion succeeds.
7389 (expand_builtin_strcmp): Same.
7390 (expand_builtin_strncmp): Same.
7391
7392 2018-05-22 Martin Sebor <msebor@redhat.com>
7393
7394 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7395
7396 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7397 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7398
7399 * config/aarch64/aarch64-ldpstp.md: Replace uses of
7400 aarch64_mem_pair_operand with memory_operand and delete operand swapping
7401 code.
7402 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7403 Add check for legitimate_address.
7404 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7405 (aarch64_swap_ldrstr_operands): New.
7406 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7407 Define prototype.
7408
7409 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7410 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7411
7412 * config/aarch64/aarch64.md: New patterns to generate stp
7413 and ldp.
7414 (store_pair_sw, store_pair_dw): New patterns to generate stp for
7415 single words and double words.
7416 (load_pair_sw, load_pair_dw): Likewise.
7417 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7418 Delete.
7419 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7420 Delete.
7421 * config/aarch64/aarch64-ldpstp.md: Modify peephole
7422 for different mode ldpstp and add peephole for merged zero stores.
7423 Likewise for loads.
7424 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7425 Add size check.
7426 (aarch64_gen_store_pair): Rename calls to match new patterns.
7427 (aarch64_gen_load_pair): Rename calls to match new patterns.
7428 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7429 (load_pair<DREG:mode><DREG2:mode>): ... This.
7430 (store_pair<mode>): Rename to...
7431 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7432 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7433 New mode iterators.
7434 (V_INT_EQUIV): Handle SImode.
7435 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7436 New predicate.
7437
7438 2018-05-22 Martin Sebor <msebor@redhat.com>
7439
7440 PR c/85623
7441 * calls.c (maybe_warn_nonstring_arg): Use string length to set
7442 or ajust the presumed bound on an operation to avoid unnecessary
7443 warnings.
7444
7445 2018-05-22 Martin Sebor <msebor@redhat.com>
7446
7447 PR tree-optimization/85826
7448 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7449 assuming that a DECL necesarily has a constant size.
7450
7451 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
7452
7453 PR middle-end/85862
7454 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7455
7456 2018-05-22 Richard Biener <rguenther@suse.de>
7457
7458 PR tree-optimization/85834
7459 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7460 non-constant and non-zero memset arguments.
7461
7462 2018-05-22 Martin Liska <mliska@suse.cz>
7463
7464 PR ipa/85607
7465 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7466
7467 2018-05-22 Richard Biener <rguenther@suse.de>
7468
7469 PR tree-optimization/85863
7470 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7471 comparisons when vectype is specified.
7472 (vectorizable_condition): Do not specify vectype for
7473 vect_is_simple_cond when SLP vectorizing.
7474
7475 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
7476
7477 PR target/85657
7478 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7479 define __ibm128 as long double.
7480 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7481 as a distinct type when IEEE 128-bit support is enabled.
7482 (init_float128_ieee): Fix up conversions between IFmode and IEEE
7483 128-bit types to use the correct functions.
7484 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7485 convert between 128-bit floating point types that have different
7486 modes but the same representation, instead of using gen_lowpart to
7487 makean alias.
7488 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7489 KFmode.
7490 (IFKF_reg): New attributes to give the register constraints for
7491 IFmode and KFmode.
7492 (extend<mode>tf2_internal): New insns to mark an explicit
7493 conversion between 128-bit floating point types that have a
7494 different mode but share the same representation.
7495
7496 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
7497
7498 PR tree-optimization/85814
7499 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7500 a null return from get_strinfo when unsharing the next
7501 strinfo in the chain.
7502
7503 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7504
7505 PR gcc/84923
7506 * varasm.c (weak_finish): Clean up weak_decls.
7507
7508 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7509
7510 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7511 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7512 UNSPEC_UADALP values.
7513 * config/aarch64/iterators.md (ABAL): New int iterator.
7514 (ABDL2): Likewise.
7515 (ADALP): Likewise.
7516 (sur): Add mappings for the above.
7517 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7518 New define_insn.
7519 (aarch64_<sur>abal<mode>_4): Likewise.
7520 (aarch64_<sur>adalp<mode>_3): Likewise.
7521 (<sur>sadv16qi): New define_expand.
7522
7523 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
7524
7525 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7526 (*movdf_internal): Ditto.
7527 (*rcpsf2_sse): Ditto.
7528 (*rsqrtsf2_sse): Ditto.
7529 (*sqrt<mode>2_sse): Ditto.
7530
7531 2018-05-21 Tamar Christina <tamar.christina@arm.com>
7532
7533 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7534 eor3q<mode>4.
7535 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7536 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7537 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7538 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7539 vbcaxq_s64): New.
7540 * config/aarch64/arm_neon.h: Likewise.
7541 * config/aarch64/iterators.md (VQ_I): New.
7542
7543 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
7544
7545 * config.gcc: Add arc/t-multilib-linux to tmake_file for
7546 arc*-*-linux*.
7547 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7548 MULTILIB_DIRNAMES
7549
7550 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7551
7552 * config/nds32/constraints.md (S): New constraint.
7553 * config/nds32/nds32.md (call_internal): Use constraint S.
7554 (call_value_internal): Likewise.
7555 (sibcall_internal): Likewise.
7556 (sibcall_value_internal): Likewise.
7557
7558 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7559 Chung-Ju Wu <jasonwucj@gmail.com>
7560
7561 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7562 into consideration.
7563
7564 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7565 Chung-Ju Wu <jasonwucj@gmail.com>
7566
7567 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7568 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7569 (nds32_rtx_costs_impl): Simplify.
7570 (nds32_address_cost_impl): Simplify.
7571 (nds32_init_rtx_costs): New function.
7572 (nds32_rtx_costs_speed_prefer): Likewise.
7573 (nds32_rtx_costs_size_prefer): Likewise.
7574 (nds32_address_cost_speed_prefer): Likewise.
7575 (nds32_address_cost_speed_fwprop): Likewise.
7576 (nds32_address_cost_size_prefer): Likewise.
7577 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7578 * config/nds32/nds32.c (nds32_option_override): Use
7579 nds32_init_rtx_costs function.
7580
7581 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7582
7583 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7584 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7585 (TARGET_PIPELINE_N8): Likewise.
7586 (TARGET_PIPELINE_N10): Likewise.
7587 (TARGET_PIPELINE_N13): Likewise.
7588 (TARGET_PIPELINE_GRAYWOLF): Likewise.
7589
7590 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
7591
7592 * config/nds32/nds32-fpu.md: Update copyright year.
7593
7594 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7595
7596 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7597
7598 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7599
7600 * config/nds32/nds32.c
7601 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7602 * config/nds32/nds32.opt (minline-asm-r15): New option.
7603
7604 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7605
7606 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7607 MASK_HW_ABS.
7608 * config/nds32/nds32.md (abssi2): New pattern.
7609
7610 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
7611
7612 * config/i386/i386.md (rex64namesuffix): New mode attribute.
7613 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7614 Merge insn pattern from sse_cvtsi2ss<round_name> and
7615 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7616 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7617 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7618 using SWI48 mode iterator.
7619 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7620 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7621 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7622 pattern from sse_cvttss2si<round_saeonly_name>
7623 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7624 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7625 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7626 using SWI48 mode iterator.
7627 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7628 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7629 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7630 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7631 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7632 using SWI48 mode iterator.
7633 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7634 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7635 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7636 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7637 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7638 SWI48 mode iterator.
7639 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7640 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7641 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7642 pattern from sse_cvttsd2si<round_saeonly_name>
7643 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7644
7645 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7646
7647 * config/nds32/nds32-md-auxiliary.c
7648 (nds32_valid_smw_lwm_base_p): Refine.
7649 (nds32_output_smw_single_word): Refine.
7650 (nds32_output_smw_double_word): New.
7651 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7652
7653 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7654
7655 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7656 (nds32_output_stack_pop): Refine.
7657 (nds32_expand_unaligned_load): Refine.
7658 (nds32_expand_unaligned_store): Refine.
7659
7660 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7661 Chung-Ju Wu <jasonwucj@gmail.com>
7662
7663 * config/nds32/constants.md: Add TP_REGNUM constant.
7664 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7665 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7666 UNSPEC_ADD32.
7667 * config/nds32/nds32-doubleword.md: Consider flag_pic.
7668 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7669 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7670 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7671 and PIC code generation.
7672 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7673 code generation.
7674 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7675 optimization.
7676 * config/nds32/nds32.md: Support TLS and PIC.
7677 * config/nds32/nds32.c: Support TLS and PIC.
7678 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7679 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7680 predicate.
7681
7682 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7683
7684 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7685 mode with E_ prefix.
7686
7687 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7688 Chung-Ju Wu <jasonwucj@gmail.com>
7689
7690 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7691 * config/nds32/nds32-md-auxiliary.c
7692 (symbolic_reference_mentioned_p): New.
7693 (nds32_legitimize_ict_address): New.
7694 (nds32_expand_ict_move): New.
7695 (nds32_indirect_call_referenced_p): New.
7696 (nds32_symbol_binds_local_p): Delete.
7697 (nds32_long_call_p): Modify.
7698 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7699 * config/nds32/nds32-protos.h
7700 (symbolic_reference_mentioned_p): Declare.
7701 (nds32_legitimize_ict_address): Declare.
7702 (nds32_expand_ict_move): Declare.
7703 (nds32_indirect_call_referenced_p): Declare.
7704 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7705 (nds32_relax_group): Use nds32_ict_const_p as condition.
7706 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7707 (nds32_asm_file_start): Output ict_model directive in asm code.
7708 (nds32_legitimate_address_p): Consider indirect call.
7709 (nds32_print_operand): Consider indirect call.
7710 (nds32_print_operand_address): Consider indirect call.
7711 (nds32_insert_attributes): Handle "indirect_call" attribute.
7712 (TARGET_LEGITIMATE_ADDRESS_P): Define.
7713 (TARGET_LEGITIMATE_CONSTANT_P): Define.
7714 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7715 (TARGET_DELEGITIMIZE_ADDRESS): Define.
7716 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7717 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7718 (TARGET_ICT_MODEL_SMALL): Define.
7719 (TARGET_ICT_MODEL_LARGE): Define.
7720 * config/nds32/nds32.md (movsi): Consider ict model.
7721 (call, call_value): Consider ict model.
7722 (sibcall, sibcall_value): Consider ict model.
7723 * config/nds32/nds32.opt (mict-model): New option.
7724 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7725 model.
7726
7727 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
7728 Monk Chiang <sh.chiang04@gmail.com>
7729 Jim Wilson <jimw@sifive.com>
7730
7731 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7732 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
7733 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7734 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7735 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
7736 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7737 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7738 compute save_libcall_adjustment properly.
7739 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7740 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7741 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7742 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7743 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7744 (ABI_SPEC): Handle mabi=ilp32e.
7745 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7746 (RVE): Add RVE mask.
7747 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7748 <-march>: Add rv32e as an example.
7749
7750 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7751
7752 PR c++/82899
7753 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7754 (intra_create_variable_infos): Handle C++ constructors.
7755
7756 2018-05-18 Martin Liska <mliska@suse.cz>
7757
7758 * passes.def: Remove a redundant pass.
7759
7760 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7761
7762 PR bootstrap/85838
7763 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7764
7765 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7766
7767 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7768 (ARMv4): Update.
7769 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7770 (ARMv6m): Update.
7771 (armv2, armv2a, armv3, armv3m): Delete architectures.
7772 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7773 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7774 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7775 Delete cpus.
7776 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7777 (*mulsidi3adddi): Likewise.
7778 (mulsidi3): Likewise.
7779 (*mulsidi3_nov6): Likewise.
7780 (umulsidi3): Likewise.
7781 (umulsidi3_nov6): Likewise.
7782 (umaddsidi4): Likewise.
7783 (*umulsidi3adddi): Likewise.
7784 (smulsi3_highpart): Likewise.
7785 (*smulsi3_highpart_nov6): Likewise.
7786 (umulsi3_highpart): Likewise.
7787 (*umulsi3_highpart_nov6): Likewise.
7788 * config/arm/arm.h (arm_arch3m): Delete.
7789 * config/arm/arm.c (arm_arch3m): Delete.
7790 (arm_option_override_internal): Update armv3-related comment.
7791 (arm_configure_build_target): Delete use of isa_bit_mode32.
7792 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7793 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7794 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7795 (mulsa3): Likewise.
7796 (mulusa3): Likewise.
7797 * config/arm/arm-protos.h (arm_arch3m): Delete.
7798 * config/arm/arm-tables.opt: Regenerate.
7799 * config/arm/arm-tune.md: Likewise.
7800 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7801 deleted architectures.
7802
7803 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7804
7805 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7806 (armv5t, armv5te): New features.
7807 (ARMv5, ARMv5e): Delete fgroups.
7808 (ARMv5t, ARMv5te): Adjust for above changes.
7809 (ARMv6m): Likewise.
7810 (armv5, armv5e): Delete arches.
7811 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7812 arm_arch5.
7813 (*call_reg_arm): Likewise.
7814 (*call_value_reg_armv5): Likewise.
7815 (*call_value_reg_arm): Likewise.
7816 (*call_symbol): Likewise.
7817 (*call_value_symbol): Likewise.
7818 (*sibcall_insn): Likewise.
7819 (*sibcall_value_insn): Likewise.
7820 (clzsi2): Likewise.
7821 (prefetch): Likewise.
7822 (define_split and define_peephole2 dependent on arm_arch5):
7823 Likewise.
7824 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7825 arm_arch5e.
7826 (TARGET_ARM_QBIT): Likewise.
7827 (TARGET_DSP_MULTIPLY): Likewise.
7828 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7829 (arm_arch5, arm_arch5e): Delete.
7830 (arm_arch5t, arm_arch5te): Declare.
7831 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7832 (arm_arch5t): Declare.
7833 (arm_option_reconfigure_globals): Update for the above.
7834 (arm_options_perform_arch_sanity_checks): Update comment, replace
7835 use of arm_arch5 with arm_arch5t.
7836 (use_return_insn): Likewise.
7837 (arm_emit_call_insn): Likewise.
7838 (output_return_instruction): Likewise.
7839 (arm_final_prescan_insn): Likewise.
7840 (arm_coproc_builtin_available): Likewise.
7841 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7842 arm_arch5e with arm_arch5t and arm_arch5te.
7843 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7844 (arm_arch5t, arm_arch5te): Declare.
7845 * config/arm/arm-tables.opt: Regenerate.
7846 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7847 * config/arm/t-multilib: Likewise.
7848 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7849 instead of arm_arch5.
7850 (*call_reg_thumb1): Likewise.
7851 (*call_value_reg_thumb1_v5): Likewise.
7852 (*call_value_reg_thumb1): Likewise.
7853 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7854 unreachable path.
7855 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7856
7857 2018-05-18 Martin Liska <mliska@suse.cz>
7858
7859 PR gcov-profile/84846
7860 * doc/gcov.texi: Document -t option of gcov tool.
7861
7862 2018-05-18 Martin Liska <mliska@suse.cz>
7863
7864 PR gcov-profile/84846
7865 * gcov.c (print_usage): Add new -t option.
7866 (process_args): Handle the option.
7867 (generate_results): Use stdout as output when requested by
7868 the option.
7869
7870 2018-05-18 Martin Liska <mliska@suse.cz>
7871
7872 PR gcov-profile/84846
7873 * coverage.c (coverage_init): Write PWD to .gcno file.
7874 * doc/gcov.texi: Document how working directory is printed.
7875 * gcov-dump.c (dump_gcov_file): Print PWD.
7876 * gcov.c (output_intermediate_file): Likewise.
7877 (read_graph_file): Read PWD string.
7878 (output_lines): Print PWD.
7879
7880 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7881
7882 PR middle-end/85817
7883 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7884 for retval and return false if all args to phi are zero.
7885
7886 2018-05-18 Richard Biener <rguenther@suse.de>
7887
7888 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7889 method.
7890 (evrp_dom_walker::before_dom_children): Call it.
7891
7892 2018-05-18 Richard Biener <rguenther@suse.de>
7893
7894 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7895 results when processing array refs with variable index.
7896
7897 2018-05-18 Toon Moene <toon@moene.org>
7898
7899 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7900 directly after that of -floop-interchange. Indicate that both
7901 options are enabled by default when specifying -O3.
7902
7903 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7904
7905 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7906 iterator. Delete separate integer-mode vec_set<mode> expander.
7907 (aarch64_simd_vec_setv2di): Delete.
7908 (vec_setv2di): Delete.
7909 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7910 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7911 the "w, r" alternative.
7912
7913 2018-05-18 Martin Liska <mliska@suse.cz>
7914
7915 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7916 * tree-pass.h (make_pass_lower_switch_O0): New function.
7917 * tree-switch-conversion.c (node_has_low_bound): Remove.
7918 (node_has_high_bound): Likewise.
7919 (node_is_bounded): Likewise.
7920 (class pass_lower_switch): Make it a template type and create
7921 two instances.
7922 (pass_lower_switch::execute): Add template argument.
7923 (make_pass_lower_switch): New function.
7924 (make_pass_lower_switch_O0): New function.
7925 (do_jump_if_equal): Remove.
7926 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7927 all the hard work to tree optimization passes.
7928
7929 2018-05-18 Martin Liska <mliska@suse.cz>
7930
7931 * dbgcnt.c (limit_low): Renamed from limit.
7932 (limit_high): New variable.
7933 (dbg_cnt_is_enabled): Check for upper limit.
7934 (dbg_cnt): Adjust dumping.
7935 (dbg_cnt_set_limit_by_index): Add new argument for high
7936 value.
7937 (dbg_cnt_set_limit_by_name): Likewise.
7938 (dbg_cnt_process_single_pair): Parse new format.
7939 (dbg_cnt_process_opt): Use strtok.
7940 (dbg_cnt_list_all_counters): Remove 'value' and add
7941 'limit_high'.
7942 * doc/invoke.texi: Document changes.
7943
7944 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7945
7946 * doc/sourcebuild.texi (scalar_all_fma): Document.
7947 * tree.def (FMA_EXPR): Delete.
7948 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7949 * internal-fn.c (ternary_direct): New macro.
7950 (expand_ternary_optab_fn): Likewise.
7951 (direct_ternary_optab_supported_p): Likewise.
7952 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7953 * builtins.c (fold_builtin_fma): Delete.
7954 (fold_builtin_3): Don't call it.
7955 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7956 * expr.c (expand_expr_real_2): Likewise.
7957 * fold-const.c (operand_equal_p): Likewise.
7958 (fold_ternary_loc): Likewise.
7959 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7960 * gimple.c (DEFTREECODE): Likewise.
7961 * gimplify.c (gimplify_expr): Likewise.
7962 * optabs-tree.c (optab_for_tree_code): Likewise.
7963 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7964 * tree-eh.c (operation_could_trap_p): Likewise.
7965 (stmt_could_throw_1_p): Likewise.
7966 * tree-inline.c (estimate_operator_cost): Likewise.
7967 * tree-pretty-print.c (dump_generic_node): Likewise.
7968 (op_code_prio): Likewise.
7969 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7970 * tree-ssa-operands.c (get_expr_operands): Likewise.
7971 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7972 * fold-const-call.h (fold_fma): Delete.
7973 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7974 CFN_FNMA and CFN_FNMS.
7975 (fold_fma): Delete.
7976 * genmatch.c (combined_fn): New enum.
7977 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7978 (commutative_op): New function.
7979 (commutate): Use it. Handle more than 2 operands.
7980 (dt_operand::gen_gimple_expr): Use commutative_op.
7981 (parser::parse_expr): Allow :c to be used with non-binary
7982 operators if the commutative operand is known.
7983 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7984 CFN_FMS, CFN_FNMA and CFN_FNMS.
7985 (backprop::process_assign_use): Remove FMA_EXPR handling.
7986 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7987 (gen_hsa_fma): New function.
7988 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7989 IFN_FNMA and IFN_FNMS.
7990 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7991 * gimple-fold.h (follow_all_ssa_edges): Declare.
7992 * gimple-fold.c (follow_all_ssa_edges): New function.
7993 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7994 gimple_build interface and use follow_all_ssa_edges to fold the result.
7995 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7996 instead of checking for optabs directly.
7997 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7998 rather than FMA_EXPRs.
7999 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8000 call to IFN_FMA instead of an FMA_EXPR.
8001
8002 2018-05-17 Jim Wilson <jimw@sifive.com>
8003
8004 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8005 sign extended promoted subreg, and the range does not have the sign bit
8006 set, then do a sign extend.
8007
8008 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8009 test, check for sign extended subreg and/or constant operands, and
8010 do a sign extend in that case.
8011
8012 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8013
8014 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8015 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8016 Add untyped.
8017 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8018 Change logics_shift_reg to logics_shift_imm.
8019 (thunderx2t99_fp_loadpair_basic): Delete.
8020 (thunderx2t99_fp_storepair_basic): Delete.
8021 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8022 (thunderx2t99_asimd_polynomial): Delete.
8023 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8024 and neon_fp_mul_d_scalar_q.
8025 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8026 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8027 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8028 (thunderx2t99_asimd_lut): Add missing tbl types.
8029 (thunderx2t99_asimd_ext): Delete.
8030 (thunderx2t99_asimd_load1_1_mult): Delete.
8031 (thunderx2t99_asimd_load1_2_mult): Delete.
8032 (thunderx2t99_asimd_load1_ldp): New.
8033 (thunderx2t99_asimd_load1): New.
8034 (thunderx2t99_asimd_load2): Add missing *load2* types.
8035 (thunderx2t99_asimd_load3): New.
8036 (thunderx2t99_asimd_load4): New.
8037 (thunderx2t99_asimd_store1_1_mult): Delete.
8038 (thunderx2t99_asimd_store1_2_mult): Delete.
8039 (thunderx2t99_asimd_store2_mult): Delete.
8040 (thunderx2t99_asimd_store2_onelane): Delete.
8041 (thunderx2t99_asimd_store_stp): New.
8042 (thunderx2t99_asimd_store1): New.
8043 (thunderx2t99_asimd_store2): New.
8044 (thunderx2t99_asimd_store3): New.
8045 (thunderx2t99_asimd_store4): New.
8046
8047 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8048
8049 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8050 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8051
8052 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8053 Segher Boessenkool <segher@kernel.crashing.org>
8054
8055 PR target/85698
8056 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8057 operand.
8058
8059 2018-05-17 Richard Biener <rguenther@suse.de>
8060
8061 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8062 for pruning loop and prune defs feeding only already visited PHIs.
8063
8064 2018-05-17 Richard Biener <rguenther@suse.de>
8065
8066 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8067
8068 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8069 Richard Biener <rguenther@suse.de>
8070
8071 PR tree-optimization/85793
8072 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8073 for VMAT_ELEMENTWISE.
8074
8075 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8076
8077 * internal-fn.h (lookup_internal_fn): Declare
8078 * internal-fn.c (lookup_internal_fn): New function.
8079 * gimple.c (gimple_build_call_from_tree): Handle calls to
8080 internal functions.
8081 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8082 internal function names.
8083 * tree-pretty-print.c (dump_generic_node): Likewise.
8084 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8085
8086 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8087
8088 * gimple-fold.h (gimple_build): Make the function forms take
8089 combined_fn rather than built_in_function.
8090 (gimple_simplify): Likewise.
8091 * gimple-match-head.c (gimple_simplify): Likewise.
8092 * gimple-fold.c (gimple_build): Likewise.
8093 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8094 rather than gimple_build_call_internal.
8095 (get_initial_defs_for_reduction): Likewise.
8096 (vect_create_epilog_for_reduction): Likewise.
8097 (vectorizable_live_operation): Likewise.
8098
8099 2018-05-17 Martin Liska <mliska@suse.cz>
8100
8101 * gimple-ssa-sprintf.c (format_directive): Do not use
8102 space in between 'G_' and '('.
8103
8104 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8105
8106 PR target/85323
8107 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8108 even if the mask is not all ones.
8109
8110 PR target/85323
8111 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8112 vector.
8113 (ix86_gimple_fold_builtin): Likewise.
8114
8115 PR target/85323
8116 * config/i386/i386.c: Include tree-vector-builder.h.
8117 (ix86_vector_shift_count): New function.
8118 (ix86_fold_builtin): Fold shift builtins by scalar count.
8119 (ix86_gimple_fold_builtin): Likewise.
8120
8121 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8122 _mm512_setzero): New intrinsics.
8123
8124 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8125 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8126
8127 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8128 code generation for cases where splatting a value is not useful.
8129 * simplify-rtx.c (simplify_ternary_operation): Simplify
8130 vec_merge across a vec_duplicate and a paradoxical subreg forming
8131 a vector mode to a vec_concat.
8132
8133 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8134
8135 * config.gcc: Support "goldmont-plus".
8136 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8137 "goldmont-plus".
8138 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8139 PROCESSOR_GOLDMONT_PLUS.
8140 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8141 (processor_target_table): Add "goldmont-plus".
8142 (PTA_GOLDMONT_PLUS): Define.
8143 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8144 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8145 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8146 (fold_builtin_cpu): Add "goldmont-plus".
8147 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8148 (ix86_option_override_internal): Add "goldmont-plus".
8149 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8150 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8151 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8152 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8153
8154 2018-05-17 Richard Biener <rguenther@suse.de>
8155
8156 PR tree-optimization/85757
8157 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8158 remove defs that only feed that PHI from further processing.
8159
8160 2018-05-16 Jim Wilson <jimw@sifive.com>
8161
8162 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8163 asterisk to name.
8164 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8165
8166 2018-05-16 Mark Wielaard <mark@klomp.org>
8167
8168 * dwarf2out.c (count_index_strings): New function.
8169 (output_indirect_strings): Call count_index_strings and generate
8170 header for dwarf_version >= 5.
8171
8172 2018-05-16 Mark Wielaard <mark@klomp.org>
8173
8174 * dwarf2out.c (dwarf_FORM): New function.
8175 (set_indirect_string): Use dwarf_FORM.
8176 (reset_indirect_string): Likewise.
8177 (size_of_die): Likewise.
8178 (value_format): Likewise.
8179 (output_die): Likewise.
8180 (add_skeleton_AT_string): Likewise.
8181 (output_macinfo_op): Likewise.
8182 (index_string): Likewise.
8183 (output_index_string_offset): Likewise.
8184 (output_index_string): Likewise.
8185 (count_index_strings): Likewise.
8186
8187 2018-05-16 Carl Love <cel@us.ibm.com>
8188
8189 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8190 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8191
8192 2018-05-16 Martin Jambor <mjambor@suse.cz>
8193
8194 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8195 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8196
8197 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8198
8199 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8200 (fnma<mode>4): Likewise.
8201 (fms<mode>4): Likewise.
8202 (fnms<mode>4): Likewise.
8203 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8204 (aarch64_fnma<mode>4): Likewise.
8205 (aarch64_fms<mode>4): Likewise.
8206 (aarch64_fnms<mode>4): Likewise.
8207 (aarch64_fnmadd<mode>4): Likewise.
8208
8209 2018-05-16 Jason Merrill <jason@redhat.com>
8210
8211 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8212
8213 2018-05-16 Richard Biener <rguenther@suse.de>
8214
8215 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8216 (dump_stmt_cost): Declare.
8217 (add_stmt_cost): Dump cost we add.
8218 (add_stmt_costs): New function.
8219 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8220 No longer exported.
8221 (vect_analyze_stmt): Adjust prototype.
8222 (vectorizable_condition): Likewise.
8223 (vectorizable_live_operation): Likewise.
8224 (vectorizable_reduction): Likewise.
8225 (vectorizable_induction): Likewise.
8226 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8227 cost vector to pass to vectorizable_ and record afterwards.
8228 (vect_model_reduction_cost): Take cost vector argument and adjust.
8229 (vect_model_induction_cost): Likewise.
8230 (vectorizable_reduction): Likewise.
8231 (vectorizable_induction): Likewise.
8232 (vectorizable_live_operation): Likewise.
8233 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8234 SLP_TREE_NUMBER_OF_VEC_STMTS.
8235 (vect_analyze_slp_cost_1): Remove.
8236 (vect_analyze_slp_cost): Likewise.
8237 (vect_slp_analyze_node_operations): Take visited args and
8238 a target cost vector. Avoid processing already visited stmt sets.
8239 (vect_slp_analyze_operations): Use a local cost vector to gather
8240 costs and register those of non-discarded instances.
8241 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8242 (vect_schedule_slp_instance): Remove copying of
8243 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8244 zero.
8245 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8246 adding cost. Record cost entry location.
8247 (vect_prologue_cost_for_slp_op): Function to compute cost of
8248 a constant or invariant generated for SLP vect in the prologue,
8249 split out from vect_analyze_slp_cost_1.
8250 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8251 (vect_model_promotion_demotion_cost): Likewise.
8252 (vect_model_store_cost): Likewise, make static.
8253 (vect_model_load_cost): Likewise.
8254 (vectorizable_bswap): Add cost vector arg and adjust.
8255 (vectorizable_call): Likewise.
8256 (vectorizable_simd_clone_call): Likewise.
8257 (vectorizable_conversion): Likewise.
8258 (vectorizable_assignment): Likewise.
8259 (vectorizable_shift): Likewise.
8260 (vectorizable_operation): Likewise.
8261 (vectorizable_store): Likewise.
8262 (vectorizable_load): Likewise.
8263 (vectorizable_condition): Likewise.
8264 (vectorizable_comparison): Likewise.
8265 (can_vectorize_live_stmts): Likewise.
8266 (vect_analyze_stmt): Likewise.
8267 (vect_transform_stmt): Adjust calls to vectorizable_*.
8268 * tree-vectorizer.c: Include gimple-pretty-print.h.
8269 (dump_stmt_cost): New function.
8270
8271 2018-05-16 Richard Biener <rguenther@suse.de>
8272
8273 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8274 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8275 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8276 (check_name): New callback.
8277 (dse_classify_store): Track cycles via a visited bitmap of PHI
8278 defs and simplify handling of in-loop and across loop dead stores
8279 and properly fail for loop-variant refs. Handle byte-tracking with
8280 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8281 limiting the walk.
8282
8283 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8284
8285 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8286 (vect_get_mask_type_for_stmt): Likewise.
8287 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8288 split out from...
8289 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8290 to determine the statement's vector type and the vector type that
8291 should be used for calculating nunits. Deal with cases in which
8292 the type has to be deferred.
8293 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8294 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8295 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8296 (vect_determine_vf_for_stmt): New functions, split out from...
8297 (vect_determine_vectorization_factor): ...here.
8298 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8299 (vect_get_mask_type_for_stmt): New functions, split out from
8300 vect_determine_vectorization_factor.
8301
8302 2018-05-16 Richard Biener <rguenther@suse.de>
8303
8304 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8305 verify the [VEC_]COND_EXPR embedded comparison.
8306
8307 2018-05-15 Martin Sebor <msebor@redhat.com>
8308
8309 PR tree-optimization/85753
8310 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8311 RECORD_TYPE in addition to ARRAY_TYPE.
8312
8313 2018-05-15 Martin Sebor <msebor@redhat.com>
8314
8315 PR middle-end/85643
8316 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8317
8318 2018-05-15 Richard Biener <rguenther@suse.de>
8319
8320 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8321 add by_clobber_p one. Change algorithm to collect all defs
8322 representing uses we need to walk and try reducing them to
8323 a single one before failing.
8324 (dse_dom_walker::dse_optimize_stmt): Adjust.
8325
8326 2018-05-13 Mark Wielaard <mark@klomp.org>
8327
8328 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8329 (size_of_loc_descr): Likewise.
8330 (output_loc_operands): Likewise.
8331 (output_loc_operands_raw): Likewise.
8332 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8333 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8334 (hash_loc_operands): Likewise.
8335 (compare_loc_operands): Likewise.
8336
8337 2018-05-14 Mark Wielaard <mark@klomp.org>
8338
8339 * dwarf2out.c (count_index_addrs): New function.
8340 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8341
8342 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8343
8344 PR tree-optimization/83648
8345 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8346 return value as malloc candidate.
8347
8348 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8349
8350 PR ipa/85734
8351 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8352 param as true in call to suggest_attribute.
8353
8354 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8355
8356 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8357 -mreadonly-in-sdata.
8358
8359 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8360
8361 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8362 New pattern.
8363 (aarch64_crypto_aesd_fused): Likewise.
8364
8365 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8366
8367 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8368 (movsi_aarch64): Likewise.
8369 (load_pairsi): Likewise.
8370 (load_pairdi): Likewise.
8371 (store_pairsi): Likewise.
8372 (store_pairdi): Likewise.
8373 (load_pairsf): Likewise.
8374 (load_pairdf): Likewise.
8375 (store_pairsf): Likewise.
8376 (store_pairdf): Likewise.
8377 (zero_extend): Likewise.
8378 (trunc): Swap alternatives.
8379 (fcvt_target): Add '?' to prefer w over r.
8380
8381 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8382
8383 PR target/85756
8384 * config/i386/i386.md: Disallow non-commutative arithmetics in
8385 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8386 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
8387 in the peephole2 before it.
8388
8389 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
8390
8391 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8392 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8393 (ix86_handle_option): Handle -mcldemote.
8394 * config.gcc: New header.
8395 * config/i386/cldemoteintrin.h: New file.
8396 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8397 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8398 -mcldemote.
8399 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8400 OPTION_MASK_ISA_CLDEMOTE.
8401 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8402 (ix86_valid_target_attribute_inner_p): Ditto.
8403 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8404 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8405 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8406 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8407 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8408 (cldemote): New.
8409 * config/i386/i386.opt: Add -mcldemote.
8410 * config/i386/x86intrin.h: New header.
8411 * doc/invoke.texi: Add -mcldemote.
8412
8413 2018-05-14 Richard Biener <rguenther@suse.de>
8414
8415 * doc/match-and-simplify.texi: Adjust :s documentation.
8416
8417 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
8418
8419 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8420 intended memcpy size.
8421 (REORDER_45): Likewise.
8422
8423 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
8424
8425 * sort.cc: New file.
8426 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8427 * vec.c (qsort_chk): Use gcc_qsort.
8428 * Makefile.in (OBJS-libcommon): Add sort.o.
8429 (build/sort.o): New target. Use it...
8430 (BUILD_RTL): ... here, and...
8431 (build/gencfn-macros): ... here, and...
8432 (build/genmatch): ... here.
8433
8434 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8435 Chung-Ju Wu <jasonwucj@gmail.com>
8436
8437 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8438 * config/nds32/nds32-graywolf.md: New file.
8439 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8440 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8441 pipeline.
8442 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8443 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8444 * config/nds32/nds32.md (pipeline_model): Add graywolf.
8445 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8446 * config/nds32/pipelines.md: Include n15 settings.
8447
8448 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8449 Chung-Ju Wu <jasonwucj@gmail.com>
8450
8451 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8452 * config/nds32/nds32-n13.md: New file.
8453 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8454 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8455 pipeline.
8456 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8457 * config/nds32/nds32.md (pipeline_model): Add n13.
8458 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8459 * config/nds32/pipelines.md: Include n13 settings.
8460
8461 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8462 Chung-Ju Wu <jasonwucj@gmail.com>
8463
8464 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8465 * config/nds32/nds32-n10.md: New file.
8466 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8467 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8468 pipeline.
8469 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8470 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8471 * config/nds32/nds32.md (pipeline_model): Add n10.
8472 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8473 * config/nds32/pipelines.md: Include n10 settings.
8474
8475 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
8476 Kito Cheng <kito.cheng@gmail.com>
8477 Chung-Ju Wu <jasonwucj@gmail.com>
8478
8479 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8480 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8481 Add enum values for DSP extension instructions.
8482 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8483 New constraints.
8484 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8485 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8486 New code iterators.
8487 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8488 * config/nds32/nds32-dspext.md: New file for DSP implementation.
8489 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8490 * config/nds32/nds32-intrinsic.md: Likewise.
8491 * config/nds32/nds32_intrinsic.h: Likewise.
8492 * config/nds32/nds32-md-auxiliary.c: Likewise.
8493 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8494 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8495 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8496 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8497 * config/nds32/nds32-protos.h: New declarations for DSP extension.
8498 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8499 TYPE_DMAC in switch statement.
8500 * config/nds32/nds32.c: New checking and implementation for DSP
8501 extension instructions.
8502 * config/nds32/nds32.h: Likewise.
8503 * config/nds32/nds32.md: Likewise.
8504 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8505 * config/nds32/predicates.md: Implement new predicates for DSP
8506 extension.
8507
8508 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8509
8510 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8511 Reformat alternatives and attributes so it is easier to identify
8512 which constraints/attributes go with which instruction.
8513 (mov<mode>_hardfloat32, FMOVE64): Likewise.
8514 (mov<mode>_softfloat32, FMOVE64): Likewise.
8515 (mov<mode>_hardfloat64, FMOVE64): Likewise.
8516 (mov<mode>_softfloat64, FMOVE64): Likewise.
8517
8518 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
8519
8520 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8521 subsection.
8522 (Basic PowerPC Built-in Functions): The new name of the
8523 subsection previously known as "PowerPC Built-in Functions".
8524 (Basic PowerPC Built-in Functions Available on all Configurations):
8525 New subsubsection.
8526 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8527 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8528 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8529 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8530
8531 2018-05-11 Martin Jambor <mjambor@suse.cz>
8532
8533 PR ipa/85655
8534 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8535 single const.
8536
8537 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8538
8539 PR target/85733
8540 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8541
8542 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
8543
8544 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8545 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8546 (ix86_handle_option): Handle -mwaitpkg.
8547 * config.gcc: New header.
8548 * config/i386/cpuid.h (bit_WAITPKG): New bit.
8549 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8550 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8551 function type.
8552 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8553 OPTION_MASK_ISA_WAITPKG.
8554 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8555 (ix86_option_override_internal): Add PTA_WAITPKG.
8556 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8557 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8558 IX86_BUILTIN_TPAUSE.
8559 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8560 __builtin_ia32_umwait and __builtin_ia32_tpause.
8561 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8562 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8563 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8564 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8565 UNSPECV_TPAUSE): New.
8566 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8567 * config/i386/i386.opt: Add -mwaitpkg.
8568 * config/i386/waitpkgintrin.h: New file.
8569 * config/i386/x86intrin.h: New header.
8570 * doc/invoke.texi: Add -mwaitpkg.
8571
8572 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8573
8574 PR target/85606
8575 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8576 equivalent.
8577 (cortex-m0): Use armv6s-m isa.
8578 (cortex-m0plus): Likewise.
8579 (cortex-m1): Likewise.
8580 (cortex-m0.small-multiply): Likewise.
8581 (cortex-m0plus.small-multiply): Likewise.
8582 (cortex-m1.small-multiply): Likewise.
8583
8584 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
8585 Jakub Jelinek <jakub@redhat.com>
8586
8587 PR tree-optimization/85692
8588 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8589 source permute as well.
8590
8591 2018-05-11 Martin Liska <mliska@suse.cz>
8592
8593 PR sanitizer/85556
8594 * doc/extend.texi: Document LLVM style format for no_sanitize
8595 attribute.
8596
8597 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
8598
8599 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8600 mode_supports_vsx_dform_quad to mode_supports_dq_form.
8601 (mode_supports_vsx_dform_quad): Likewise.
8602 (mode_supports_vmx_dform): Move these functions to be next to the
8603 other mode_supports functions.
8604 (mode_supports_dq_form): Likewise.
8605 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8606 mode_supports_dq_form.
8607 (reg_offset_addressing_ok_p): Likewise.
8608 (offsettable_ok_by_alignment): Likewise.
8609 (rs6000_legitimate_offset_address_p): Likewise.
8610 (legitimate_lo_sum_address_p): Likewise.
8611 (rs6000_legitimize_address): Likewise.
8612 (rs6000_legitimize_reload_address): Likewise.
8613 (rs6000_secondary_reload_inner): Likewise.
8614 (rs6000_preferred_reload_class): Likewise.
8615 (rs6000_output_move_128bit): Likewise.
8616
8617 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8618
8619 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8620 Generate SImode target register for null target.
8621 <case IX86_BUILTIN_XGETBV>: Ditto.
8622 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8623 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8624
8625 2018-05-10 Carl Love <cel@us.ibm.com>
8626
8627 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8628 dcbtt and dcbtstt if operands[2] is 0.
8629
8630 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8631
8632 PR target/85693
8633 * config/i386/sse.md (usadv64qi): New expander.
8634
8635 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8636
8637 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8638 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8639 -maltivec=be support.
8640 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8641 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8642 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8643 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8644 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8645 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8646 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8647 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8648 altivec_vsumsws): Adjust.
8649 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8650 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8651 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8652 support.
8653 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8654 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8655 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8656 (altivec_lve<VI_char>x): Delete expand.
8657 (*altivec_lve<VI_char>x_internal): Rename to...
8658 (altivec_lve<VI_char>x): ... this.
8659 (altivec_lvxl_<mode>): Delete expand.
8660 (*altivec_lvxl_<mode>_internal): Rename to ...
8661 (altivec_lvxl_<mode>): ... this.
8662 (altivec_stvxl_<mode>): Delete expand.
8663 (*altivec_stvxl_<mode>_internal): Rename to ...
8664 (altivec_stvxl_<mode>): ... this.
8665 (altivec_stve<VI_char>x): Delete expand.
8666 (*altivec_stve<VI_char>x_internal): Rename to ...
8667 (altivec_stve<VI_char>x): ... this.
8668 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8669 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8670 reduc_plus_scal_<mode>): Adjust.
8671 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8672 comment.
8673 (rs6000_cpu_cpp_builtins): Adjust.
8674 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8675 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8676 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8677 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8678 -maltivec=be support.
8679 (rs6000_split_vec_extract_var): Adjust.
8680 (rs6000_split_v4si_init): Adjust.
8681 (swap_selector_for_mode): Delete.
8682 (altivec_expand_lvx_be, altivec_expand_stvx_be,
8683 altivec_expand_stvex_be): Delete.
8684 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8685 -maltivec=be support.
8686 (rs6000_gimple_fold_builtin): Ditto.
8687 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8688 Adjust.
8689 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8690 (TARGET_DIRECT_MOVE_64BIT): Adjust.
8691 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8692 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8693 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8694 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8695 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8696 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8697 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8698 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8699 anonymous split): Adjust.
8700 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8701 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8702
8703 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
8704
8705 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8706 when --with-gxx-include-dir is also specified.
8707 * configure: Regenerate.
8708
8709 2018-05-09 Jim Wilson <jimw@sifive.com>
8710
8711 PR target/84797
8712 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8713 * config/riscv/t-withmultilib: New.
8714 * config/riscv/withmultilib.h: New.
8715 * doc/install.texi: Document RISC-V --with-multilib-list support.
8716
8717 2018-05-09 Richard Biener <rguenther@suse.de>
8718
8719 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8720 vector.
8721 (vect_bb_vectorization_profitable_p): Adjust. Compute
8722 actual scalar cost using the cost vector and the add_stmt_cost
8723 machinery.
8724
8725 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8726
8727 PR rtl-optimization/85645
8728 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8729 in the REG_CFA_REGISTER note for LR, don't leave it empty.
8730
8731 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8732
8733 PR rtl-optimization/85645
8734 * shrink-wrap.c (spread_components): Return a boolean saying if
8735 anything was changed.
8736 (try_shrink_wrapping_separate): Iterate spread_components until
8737 nothing changes anymore.
8738
8739 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8740
8741 PR rtl-optimization/85645
8742 * regrename.c (build_def_use): Also kill the chains that include the
8743 destination of a REG_CFA_REGISTER note.
8744
8745 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8746
8747 PR rtl-optimization/85645
8748 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8749 insn that has a REG_CFA_REGISTER note.
8750
8751 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8752
8753 * cfgexpand.c (expand_clobber): New function.
8754 (expand_gimple_stmt_1): Use it.
8755 * tree-vect-stmts.c (vect_clobber_variable): New function,
8756 split out from...
8757 (vectorizable_simd_clone_call): ...here.
8758 (vectorizable_store): Emit a clobber either side of an
8759 IFN_STORE_LANES sequence.
8760 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8761
8762 2018-05-09 Tom de Vries <tom@codesourcery.com>
8763
8764 PR target/85626
8765 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8766 (define_insn "trap_if_false"): Add exit after trap.
8767
8768 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8769
8770 PR rtl-optimization/85638
8771 * bb-reorder.c: Include common/common-target.h.
8772 (create_forwarder_block): New function extracted from...
8773 (fix_up_crossing_landing_pad): ...here. Rename into...
8774 (dw2_fix_up_crossing_landing_pad): ...this.
8775 (sjlj_fix_up_crossing_landing_pad): New function.
8776 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8777 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8778 from both partitions and exit the loop after one iteration.
8779
8780 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8781
8782 Revert:
8783 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8784 subsection.
8785 (Basic PowerPC Built-in Functions): The new name of the
8786 subsection previously known as "PowerPC Built-in Functions".
8787 (Basic PowerPC Built-in Functions Available on all Configurations):
8788 New subsubsection.
8789 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8790 subsubsection.
8791 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8792 subsubsection.
8793 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8794 subsubsection.
8795 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8796 subsubsection.
8797
8798 2018-05-08 Jim Wilson <jimw@sifive.com>
8799
8800 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8801 (LD_EMUL_SUFFIX): New.
8802 (LINK_SPEC): Use it.
8803
8804 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8805
8806 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8807 subsection.
8808 (Basic PowerPC Built-in Functions): The new name of the
8809 subsection previously known as "PowerPC Built-in Functions".
8810 (Basic PowerPC Built-in Functions Available on all Configurations):
8811 New subsubsection.
8812 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8813 subsubsection.
8814 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8815 subsubsection.
8816 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8817 subsubsection.
8818 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8819 subsubsection.
8820
8821 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8822
8823 PR target/85683
8824 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8825 after cmpelim optimization.
8826
8827 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8828
8829 * config.gcc: Support "goldmont".
8830 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8831 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8832 PROCESSOR_GOLDMONT.
8833 * config/i386/i386.c (m_GOLDMONT): Define.
8834 (processor_target_table): Add "goldmont".
8835 (PTA_GOLDMONT): Define.
8836 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8837 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8838 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8839 (fold_builtin_cpu): Add "goldmont".
8840 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8841 (ix86_option_override_internal): Add "goldmont".
8842 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8843 (processor_type): Add PROCESSOR_GOLDMONT.
8844 * config/i386/i386.md: Add CPU "glm".
8845 * config/i386/glm.md: New file.
8846 * config/i386/x86-tune.def: Add m_GOLDMONT.
8847 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8848
8849 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8850
8851 PR target/85572
8852 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8853 E_V4DImode.
8854 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8855 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8856 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8857
8858 PR target/85317
8859 * config/i386/i386.c (ix86_fold_builtin): Handle
8860 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8861
8862 PR target/85480
8863 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8864 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8865
8866 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8867
8868 PR target/85658
8869 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8870 (check_arch): Likewise.
8871 (check_fpu): Return the result rather than printing it.
8872 (end arch): Fix operator precedence.
8873 (end cpu): Likewise.
8874 (END): Print the result from check_fpu.
8875
8876 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8877 Alan Hayward <alan.hayward@arm.com>
8878 David Sherwood <david.sherwood@arm.com>
8879
8880 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8881 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8882 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8883 (*fcmuo<mode>_and): New patterns.
8884
8885 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8886
8887 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8888 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8889 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8890 (cmp_op, sve_imm_con): New code attributes.
8891 (SVE_COND_INT_CMP, imm_con): Delete.
8892 (cmp_op): Remove above unspecs from int attribute.
8893 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8894 to...
8895 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8896 comparison-specific unspecs.
8897 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8898 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8899 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8900 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8901 (*vec_fcm<cmp_op><mode>): Rename to...
8902 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8903 (*vec_fcmuo<mode>): Rename to...
8904 (*fcmuo<mode>): ...this and adjust likewise.
8905 (*pred_fcm<cmp_op><mode>): New pattern.
8906 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8907 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8908 functions.
8909 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8910 and UNORDERED.
8911 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8912 (aarch64_emit_sve_predicated_cond): New function.
8913 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8914 (aarch64_emit_unspec_cond_or): Replace with...
8915 (aarch64_emit_sve_or_conds): ...this new function. Use
8916 aarch64_emit_sve_ptrue_op for the individual comparisons and
8917 aarch64_emit_binop to OR them together.
8918 (aarch64_emit_inverted_unspec_cond): Replace with...
8919 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8920 aarch64_emit_sve_ptrue_op for the comparison and
8921 aarch64_emit_unop to invert the result.
8922 (aarch64_expand_sve_vec_cmp_float): Update after the above
8923 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8924
8925 2018-05-07 Nathan Sidwell <nathan@acm.org>
8926
8927 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8928 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8929 (Backwards Compatibility): Likewise.
8930
8931 2018-05-07 Luis Machado <luis.machado@linaro.org>
8932
8933 PR bootstrap/85681
8934 Revert:
8935 2018-05-07 Luis Machado <luis.machado@linaro.org>
8936
8937 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8938 <prefetch_dynamic_strides>: New const bool field.
8939 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8940 prefetch_dynamic_strides.
8941 (exynosm1_prefetch_tune): Likewise.
8942 (thunderxt88_prefetch_tune): Likewise.
8943 (thunderx_prefetch_tune): Likewise.
8944 (thunderx2t99_prefetch_tune): Likewise.
8945 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8946 to false.
8947 (aarch64_override_options_internal): Update to set
8948 PARAM_PREFETCH_DYNAMIC_STRIDES.
8949 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8950 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8951 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8952 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8953 prefetch-dynamic-strides setting.
8954
8955 2018-05-07 Luis Machado <luis.machado@linaro.org>
8956
8957 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8958 <minimum_stride>: New const int field.
8959 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8960 minimum_stride field.
8961 (exynosm1_prefetch_tune): Likewise.
8962 (thunderxt88_prefetch_tune): Likewise.
8963 (thunderx_prefetch_tune): Likewise.
8964 (thunderx2t99_prefetch_tune): Likewise.
8965 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8966 (aarch64_override_options_internal): Update to set
8967 PARAM_PREFETCH_MINIMUM_STRIDE.
8968 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8969 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8970 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8971 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8972 stride is constant and is below the minimum stride threshold.
8973
8974 2018-05-07 Luis Machado <luis.machado@linaro.org>
8975
8976 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8977 to 512.
8978
8979 2018-05-07 Luis Machado <luis.machado@linaro.org>
8980
8981 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8982 <prefetch_dynamic_strides>: New const bool field.
8983 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8984 prefetch_dynamic_strides.
8985 (exynosm1_prefetch_tune): Likewise.
8986 (thunderxt88_prefetch_tune): Likewise.
8987 (thunderx_prefetch_tune): Likewise.
8988 (thunderx2t99_prefetch_tune): Likewise.
8989 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8990 to false.
8991 (aarch64_override_options_internal): Update to set
8992 PARAM_PREFETCH_DYNAMIC_STRIDES.
8993 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8994 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8995 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8996 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8997 prefetch-dynamic-strides setting.
8998
8999 2018-05-07 Luis Machado <luis.machado@linaro.org>
9000
9001 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9002 <minimum_stride>: New const int field.
9003 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9004 minimum_stride field.
9005 (exynosm1_prefetch_tune): Likewise.
9006 (thunderxt88_prefetch_tune): Likewise.
9007 (thunderx_prefetch_tune): Likewise.
9008 (thunderx2t99_prefetch_tune): Likewise.
9009 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9010 (aarch64_override_options_internal): Update to set
9011 PARAM_PREFETCH_MINIMUM_STRIDE.
9012 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9013 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9014 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9015 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9016 stride is constant and is below the minimum stride threshold.
9017
9018 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9019
9020 PR c++/85659
9021 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9022 the type is addressable. Don't force op into register if it has
9023 BLKmode.
9024
9025 2018-05-05 Roland McGrath <mcgrathr@google.com>
9026
9027 PR other/77609
9028 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9029 any section for which we don't know a specific type it should have,
9030 regardless of name. Previously this was done only for the exact
9031 names ".init_array", ".fini_array", and ".preinit_array".
9032 (default_elf_asm_named_section): Add comment about
9033 relationship with default_section_type_flags and SECTION_NOTYPE.
9034 (get_section): Don't consider it a type conflict if one side has
9035 SECTION_NOTYPE and the other doesn't, as long as neither has the
9036 SECTION_BSS et al used in the default_section_type_flags logic.
9037
9038 2018-05-05 Tom de Vries <tom@codesourcery.com>
9039
9040 PR target/85653
9041 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9042 (workaround_barsyncs): New function.
9043 (nvptx_reorg): Use workaround_barsyncs.
9044 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9045 (define_expand "nvptx_membar_cta"): New define_expand.
9046 (define_insn "*nvptx_membar_cta"): New insn.
9047
9048 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9049
9050 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9051 To improve optimization opportunities.
9052 * builtin-types.def: The new needed builtin types for the above.
9053
9054 2018-05-04 Richard Biener <rguenther@suse.de>
9055
9056 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9057 * gimple-ssa-store-merging.c
9058 (imm_store_chain_info::output_merged_store): Remove redundant create,
9059 release split_store vector contents on failure.
9060 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9061 scalar stmt vector on cache hit.
9062
9063 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9064
9065 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9066 Xilinx FP support.
9067 * config.gcc (powerpc-xilinx-eabi*): Remove.
9068 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9069 support.
9070 (fusion_addis_mem_combo_load): Ditto.
9071 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9072 FP support.
9073 (rs6000_cpu_cpp_builtins): Ditto.
9074 * config/rs6000/rs6000-linux.c
9075 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9076 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9077 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9078 support.
9079 (rs6000_setup_reg_addr_masks): Ditto.
9080 (rs6000_init_hard_regno_mode_ok): Ditto.
9081 (rs6000_option_override_internal): Ditto.
9082 (legitimate_lo_sum_address_p): Ditto.
9083 (rs6000_legitimize_address): Ditto.
9084 (rs6000_legitimize_reload_address): Ditto.
9085 (rs6000_legitimate_address_p): Ditto.
9086 (abi_v4_pass_in_fpr): Ditto.
9087 (setup_incoming_varargs): Ditto.
9088 (rs6000_gimplify_va_arg): Ditto.
9089 (rs6000_split_multireg_move): Ditto.
9090 (rs6000_savres_strategy): Ditto.
9091 (rs6000_emit_prologue_components): Ditto.
9092 (rs6000_emit_epilogue_components): Ditto.
9093 (rs6000_emit_prologue): Ditto.
9094 (rs6000_emit_epilogue): Ditto.
9095 (rs6000_elf_file_end): Ditto.
9096 (rs6000_function_value): Ditto.
9097 (rs6000_libcall_value): Ditto.
9098 * config/rs6000/rs6000.h: Ditto.
9099 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9100 (TARGET_MINMAX): ... this. New.
9101 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9102 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9103 (*movsi_internal1_single): Delete.
9104 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9105 mfpu=, mxilinx-fpu): Delete.
9106 * config/rs6000/singlefp.h: Delete.
9107 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9108 * config/rs6000/t-rs6000: Ditto.
9109 * config/rs6000/t-xilinx: Delete.
9110 * config/rs6000/titan.md: Adjust for fp_type removal.
9111 * config/rs6000/vsx.md: Remove Xilinx FP support.
9112 (VStype_simple): Delete.
9113 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9114 * config/rs6000/xfpu.h: Delete.
9115 * config/rs6000/xfpu.md: Delete.
9116 * config/rs6000/xilinx.h: Delete.
9117 * config/rs6000/xilinx.opt: Delete.
9118 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9119 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9120
9121 2018-05-04 Tom de Vries <tom@codesourcery.com>
9122
9123 PR libgomp/85639
9124 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9125 if ignore == 0.
9126
9127 2018-05-04 Richard Biener <rguenther@suse.de>
9128
9129 PR middle-end/85627
9130 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9131 (expand_complex_div_wide): Likewise.
9132 (expand_complex_operations_1): Likewise.
9133 (expand_complex_libcall): Preserve EH info of the original stmt.
9134 (tree_lower_complex): Handle removed blocks.
9135 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9136 on complex multiplication and division libcall builtins.
9137
9138 2018-05-04 Richard Biener <rguenther@suse.de>
9139
9140 PR middle-end/85574
9141 * fold-const.c (negate_expr_p): Restrict negation of operand
9142 zero of a division to when we know that can happen without
9143 overflow.
9144 (fold_negate_expr_1): Likewise.
9145
9146 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9147
9148 PR libstdc++/85466
9149 * real.h (real_nextafter): Declare.
9150 * real.c (real_nextafter): New function.
9151 * fold-const-call.c (fold_const_nextafter): New function.
9152 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9153 CASE_CFN_NEXTTOWARD.
9154 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9155 even when arg1_mode is different from arg0_mode.
9156
9157 2018-05-03 Nathan Sidwell <nathan@acm.org>
9158
9159 * doc/extend.texi (Deprecated Features): Remove
9160 -ffriend-injection.
9161 (Backwards Compatibility): Likewise.
9162 * doc/invoke.texi (C++ Language Options): Likewise.
9163 (C++ Dialect Options): Likewise.
9164
9165 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9166
9167 PR target/85530
9168 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9169 _mm512_mask_mullox_epi64): New intrinsics.
9170
9171 2018-05-03 Tom de Vries <tom@codesourcery.com>
9172
9173 PR testsuite/85106
9174 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9175 dump files): Add offload-tree.
9176
9177 2018-05-03 Richard Biener <rguenther@suse.de>
9178
9179 PR tree-optimization/85615
9180 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9181 to loops not nested in BBs loop father to avoid creating multi-entry
9182 loops.
9183
9184 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9185
9186 PR tree-optimization/70291
9187 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9188 arguments. Change return type to tree. Emit libcall as a new
9189 statement rather than replacing existing one when inplace_p is true.
9190 (expand_complex_multiplication_components): New function.
9191 (expand_complex_multiplication): Expand floating-point complex
9192 multiplication using the above.
9193 (expand_complex_division): Rename inner_type parameter to type.
9194 Update expand_complex_libcall call-site.
9195 (expand_complex_operations_1): Update expand_complex_multiplication
9196 and expand_complex_division call-sites.
9197
9198 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9199
9200 PR target/85582
9201 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9202 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9203 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9204 the highest significant bit of the shift count mask is clear. In
9205 check whether and[sq]i3 is needed verify that all significant bits
9206 of the shift count other than the highest are set.
9207
9208 2018-05-02 Tom de Vries <tom@codesourcery.com>
9209
9210 PR libgomp/82428
9211 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9212 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9213 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9214 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9215 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9216 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9217 __builtin_goacc_parlevel_size.
9218
9219 2018-05-02 Richard Biener <rguenther@suse.de>
9220
9221 PR tree-optimization/85597
9222 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9223 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9224 directly.
9225
9226 2018-05-02 Tom de Vries <tom@codesourcery.com>
9227
9228 PR testsuite/85106
9229 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9230 dump files): Add ltrans-tree.
9231
9232 2018-05-02 Tom de Vries <tom@codesourcery.com>
9233
9234 PR testsuite/85106
9235 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9236 dump files): Add wpa-ipa.
9237
9238 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9239
9240 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9241 powerpc*-*-linux*paired* target.
9242 * config/rs6000/750cl.h: Delete.
9243 * config/rs6000/paired.h: Delete.
9244 * config/rs6000/paired.md: Delete.
9245 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9246 float support.
9247 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9248 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9249 comment. Remove paired float support.
9250 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9251 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9252 VECTOR_PAIRED.
9253 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9254 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9255 declarations.
9256 * config/rs6000/rs6000.c: Remove paired float support.
9257 (paired_expand_vector_init, paired_expand_vector_move,
9258 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9259 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9260 paired_expand_builtin, paired_expand_predicate_builtin,
9261 paired_init_builtins): Delete.
9262 * config/rs6000/rs6000.h: Remove paired float support.
9263 * config/rs6000/rs6000.md: Remove paired float support.
9264 (move_from_CR_ov_bit): Delete.
9265 * config/rs6000/rs6000.opt (mpaired): Delete.
9266 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9267 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9268
9269 2018-05-02 Richard Biener <rguenther@suse.de>
9270
9271 PR middle-end/85567
9272 * gimplify.c (gimplify_save_expr): When in SSA form allow
9273 SAVE_EXPRs to compute to SSA vars.
9274
9275 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9276
9277 PR target/85582
9278 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9279 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9280 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9281 clobber operands[2], instead use a new pseudo. Formatting fixes.
9282
9283 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9284
9285 PR tree-optimization/85586
9286 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9287 exit early for statements in the same group if the accesses are
9288 not strided.
9289
9290 2018-05-02 Tom de Vries <tom@codesourcery.com>
9291
9292 PR lto/85451
9293 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9294 error message.
9295
9296 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9297
9298 PR tree-optimization/85143
9299 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9300
9301 2018-05-01 Tom de Vries <tom@codesourcery.com>
9302
9303 PR lto/85451
9304 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9305 not found" error message.
9306
9307 2018-05-01 Tom de Vries <tom@codesourcery.com>
9308
9309 PR other/83786
9310 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9311 * vec.c (test_ordered_remove_if): New function.
9312 (vec_c_tests): Call test_ordered_remove_if.
9313 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9314 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9315 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9316 VEC_ORDERED_REMOVE_IF.
9317
9318 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9319
9320 PR tree-optimization/82665
9321 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9322 pointer subtraction where arguments come from a memchr call.
9323
9324 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9325
9326 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9327 --push-state --as-needed and --pop-state instead of --as-needed and
9328 --no-as-needed if ld supports it.
9329 * configure: Regenerated.
9330
9331 PR web/85578
9332 * doc/install.texi2html: Replace _002d with - and _002a with * in
9333 generated html files using sed.
9334
9335 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9336
9337 PR c++/85523
9338 * gcc-rich-location.c (blank_line_before_p): New function.
9339 (use_new_line): New function.
9340 (gcc_rich_location::add_fixit_insert_formatted): New function.
9341 * gcc-rich-location.h
9342 (gcc_rich_location::add_fixit_insert_formatted): New function.
9343
9344 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9345
9346 * selftest.c (assert_streq): Rename "expected" and "actual" to
9347 "val1" and "val2". Extend NULL-handling to cover both inputs
9348 symmetrically, while still requiring both to be non-NULL for a pass.
9349 * selftest.h (assert_streq): Rename "expected" and "actual" to
9350 "val1" and "val2".
9351 (ASSERT_EQ): Likewise.
9352 (ASSERT_EQ_AT): Likewise.
9353 (ASSERT_KNOWN_EQ): Likewise.
9354 (ASSERT_KNOWN_EQ_AT): Likewise.
9355 (ASSERT_NE): Likewise.
9356 (ASSERT_MAYBE_NE): Likewise.
9357 (ASSERT_MAYBE_NE_AT): Likewise.
9358 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9359 the assertion to pass.
9360 (ASSERT_STREQ_AT): Likewise.
9361
9362 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9363
9364 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9365 interaction with -pie.
9366
9367 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9368
9369 * selftest.h: Fix alphabetization of per-source-file selftest
9370 declarations.
9371
9372 2018-04-30 Jason Merrill <jason@redhat.com>
9373
9374 PR c++/61982 - dead stores to destroyed objects.
9375 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9376 of clobber.
9377
9378 2018-04-30 Jason Merrill <jason@redhat.com>
9379
9380 * tree.c (build_clobber): New.
9381 * tree.h: Declare it.
9382 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9383
9384 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9385
9386 * diagnostic-show-locus.c (layout::layout): Update for
9387 location_get_source_line returning a char_span.
9388 (struct char_span): Move to input.h.
9389 (struct correction): Update for fields in char_span becoming
9390 private.
9391 (struct source_line): Update for location_get_source_line
9392 returning a char_span.
9393 (layout::print_line): Likewise.
9394 * edit-context.c (edited_file::print_content): Likewise.
9395 (edited_file::print_diff_hunk): Likewise.
9396 (edited_file::print_run_of_changed_lines): Likewise.
9397 (edited_file::get_num_lines): Likewise.
9398 (edited_line::edited_line): Likewise.
9399 * final.c (asm_show_source): Likewise.
9400 * input.c (location_get_source_line): Convert return type
9401 from const char * to char_span, losing the final "line_len"
9402 param.
9403 (dump_location_info): Update for the above.
9404 (get_substring_ranges_for_loc): Likewise. Use a char_span
9405 when handling the literal within the line.
9406 (test_reading_source_line): Update for location_get_source_line
9407 returning a char_span.
9408 * input.h (class char_span): Move here from
9409 diagnostic-show-locus.c, converting from a struct to a class.
9410 Make data members private.
9411 (char_span::operator bool): New.
9412 (char_span::length): New.
9413 (char_span::get_buffer): New.
9414 (char_span::operator[]): New.
9415 (char_span::subspan): Make const.
9416 (char_span::xstrdup): New.
9417 (location_get_source_line): Convert return type from const char *
9418 to char_span, losing the final "line_size" param.
9419
9420 2018-04-30 Jan Hubicka <jh@suse.cz>
9421
9422 * lto-wrapper.c (ltrans_priorities): New static var.
9423 (cmp_priority): New.
9424 (run_gcc): Read priorities and if doing parallel build order
9425 the Makefile by them.
9426
9427 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9428
9429 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9430
9431 2018-04-30 Richard Biener <rguenther@suse.de>
9432
9433 * tree-cfg.c (verify_address): Remove base argument, add
9434 flag whether to check TREE_ADDRESSABLE and do that.
9435 (verify_expr): Remove.
9436 (verify_types_in_gimple_reference): Add pieces from verify_expr.
9437 (verify_gimple_assign_single): Likewise.
9438 (verify_gimple_switch): Likewise.
9439 (verify_expr_location_1): Dereference tp once. Add (disabled)
9440 piece from verify_expr.
9441 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9442
9443 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9444
9445 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9446
9447 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9448
9449 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9450 (small_data_pattern): Likewise.
9451 (arc_rewrite_small_data): Likewise.
9452 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9453 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9454 (get_symbol_alignment): New function.
9455 (legitimate_small_data_address_p): Likewise.
9456 (legitimate_scaled_address): Update, call
9457 legitimate_small_data_address_p.
9458 (output_sdata): New static variable.
9459 (arc_print_operand): Update how we handle small data operands.
9460 (arc_print_operand_address): Likewise.
9461 (arc_legitimate_address_p): Update, use
9462 legitimate_small_data_address_p.
9463 (arc_rewrite_small_data_p): Remove.
9464 (arc_rewrite_small_data_1): Likewise.
9465 (arc_rewrite_small_data): Likewise.
9466 (small_data_pattern): Likewise.
9467 (compact_sda_memory_operand): Update to use
9468 legitimate_small_data_address_p and get_symbol_alignment.
9469 (prepare_move_operands): Don't rewite sdata pattern.
9470 (prepare_extend_operands): Remove.
9471 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9472 pattern.
9473 (zero_extendqisi2): Likewise.
9474 (zero_extendhisi2): Likewise.
9475 (extendqihi2): Likewise.
9476 (extendqisi2): Likewise.
9477 (extendhisi2): Likewise.
9478 (addsi3): Likewise.
9479 (subsi3): Likewise.
9480 (andsi3): Likewise.
9481 * config/arc/constraints.md (Usd): Change it to memory constraint.
9482
9483 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9484
9485 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9486 as source of std instructions.
9487 * config/arc/arc.md (movsi_insn): Update pattern predicate to
9488 allow 6-bit constants as source for store instructions.
9489 (movdi_insn): Update instruction pattern to allow 6-bit constants
9490 as source for store instructions.
9491
9492 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9493
9494 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9495
9496 2018-04-30 Nathan Sidwell <nathan@acm.org>
9497 Sandra Loosemore <sandra@codesourcery.com>
9498
9499 * dumpfile.c (dump_open): Allow '-' for stdout.
9500 * doc/invoke.texi (Developer Options): Document dump filename
9501 determination early. Document stdin/stdout selection.
9502
9503 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
9504
9505 Microblaze Target: PIC data text relative
9506
9507 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9508 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9509 Add declaration.
9510 * config/microblaze/microblaze.h (microblaze_constant_address_p):
9511 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9512 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9513 New addressing mode for data-text relative position indepenedent code.
9514 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9515 'ADDRESS_SYMBOLIC_TXT_REL'.
9516 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9517 (microblaze_legitimate_pic_operand): Exclude function calls from
9518 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9519 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9520 addresses cases.
9521 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9522 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9523 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9524 for 'address + offset'.
9525 (microblaze_expand_prologue): Add new function prologue call for
9526 'r20' assignation.
9527 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9528 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9529 table in case of TARGET_PIC_DATA_TEXT_REL.
9530 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9531 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9532 Add new macros 'UNSPEC_TEXT',
9533 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9534 + exclude function calls from 'UNSPEC_PLT' in case of data text
9535 relative mode.
9536 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9537 new target hook for generating address diff vector tables in case of
9538 flag_pic.
9539 * doc/tm.texi : Regenerate.
9540 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9541 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9542 of addr diff vector generation.
9543 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9544 target hook definition.
9545 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9546 Add default function for generate_pic_addr_diff_vec -> flag_pic.
9547 * doc/invoke.texi (Add new pic option): Add new microblaze pic
9548 option for data text relative.
9549
9550 2018-04-30 Richard Biener <rguenther@suse.de>
9551
9552 * tree-chrec.h (evolution_function_is_constant_p): Remove
9553 redundant check.
9554 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9555
9556 2018-04-30 Richard Biener <rguenther@suse.de>
9557
9558 PR bootstrap/85571
9559 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9560
9561 2018-04-30 Richard Biener <rguenther@suse.de>
9562
9563 PR tree-optimization/28364
9564 PR tree-optimization/85275
9565 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9566 copying first exit test.
9567
9568 2018-04-28 Mark Wielaard <mark@klomp.org>
9569
9570 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9571 dwarf_version >= 5.
9572 (dwarf_AT): Handle DW_AT_addr_base.
9573 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9574
9575 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
9576
9577 PR target/84431
9578 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9579 (*ashl<dwi>3_doubleword_mask_1): Ditto.
9580 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9581 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9582
9583 2018-04-28 Richard Biener <rguenther@suse.de>
9584
9585 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9586 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9587 to reflect use. Only add interesting stmts.
9588
9589 2018-04-27 Martin Jambor <mjambor@suse.cz>
9590
9591 PR ipa/85549
9592 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9593 the jump function allows for passing through aggregate values.
9594
9595 2018-04-27 David Malcolm <dmalcolm@redhat.com>
9596
9597 * input.h (in_system_header_at): Convert from macro to inline
9598 function.
9599 (from_macro_expansion_at): Likewise.
9600 (from_macro_definition_at): Likewise.
9601
9602 2018-04-27 Jeff Law <law@redhat.com>
9603
9604 * config.gcc: Mark tile* targets as deprecated/obsolete.
9605
9606 2018-04-27 Richard Biener <rguenther@suse.de>
9607
9608 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9609 fix for ILP32.
9610
9611 2018-04-27 Richard Biener <rguenther@suse.de>
9612
9613 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9614
9615 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9616
9617 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9618 with Yd constraint. Set "preferred_for_speed" attribute from
9619 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9620 with Yd constraint.
9621 (*movdi_internal): Ditto.
9622 (movti_interunit splitters): Remove
9623 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9624 (movdi_interunit splitters): Ditto.
9625 * config/i386/constraints.md (Ye): Remove.
9626 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9627
9628 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9629
9630 PR target/85512
9631 * config/aarch64/constraints.md (Usg): Limit to 31.
9632 (Usj): Limit to 63.
9633
9634 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9635
9636 PR tree-optimization/85529
9637 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9638 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9639 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9640 zero extension or masking of the MSB bit.
9641 (optimize_range_tests): Add FIRST_BB argument, pass it through
9642 to optimize_range_tests_var_bound.
9643 (maybe_optimize_range_tests, reassociate_bb): Adjust
9644 optimize_range_tests callers.
9645
9646 2018-04-26 Richard Biener <rguenther@suse.de>
9647 Jakub Jelinek <jakub@redhat.com>
9648
9649 * cgraph.h (symbol_table): Just declare debug method here.
9650 * symtab.c (symbol_table::debug): Define.
9651
9652 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
9653
9654 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9655
9656 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
9657
9658 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9659 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9660 (*movdi_internal): Substitute Yi and Yj constraint with x
9661 and Ym and Yn constraint with y constraint. Update "isa"
9662 attribute and set "preferred_for_speed" attribute from
9663 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9664 (*movsi_internal): Ditto.
9665 (*movdf_internal): Ditto.
9666 (*movsf_internal): Ditto.
9667 (*zero_extendsidi2): Ditto.
9668 * config/i386/sse.md (vec_set<mode>_0): Ditto.
9669 (sse2_loadld): Ditto.
9670 (*vec_extract<ssevecmodelower>_0): Ditto.
9671 (*vec_extractv4si_0_zext_sse4): Ditto.
9672 (vec_concatv2di): Ditto.
9673 (*vec_dup<mode>): Ditto.
9674 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9675 * config/i386/constraints.md (Yi): Remove.
9676 (Yj): Remove.
9677 (Ym): Remove.
9678 (Yn): Remove.
9679
9680 2018-04-26 Nathan Sidwell <nathan@acm.org>
9681
9682 * dumpfile.c (dump_open): New.
9683 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9684 (dump_finish): Detect stdio/stderr by value not name.
9685
9686 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
9687
9688 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9689
9690 2018-04-26 Tom de Vries <tom@codesourcery.com>
9691
9692 PR target/84952
9693 * config/nvptx/nvptx.c (verify_neutering_jumps)
9694 (verify_neutering_labels): New function
9695 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9696
9697 2018-04-26 Tom de Vries <tom@codesourcery.com>
9698
9699 PR target/84025
9700 * config/nvptx/nvptx.c (needs_neutering_p): New function.
9701 (nvptx_single): Use needs_neutering_p to skip over insns that do not
9702 need neutering.
9703
9704 2018-04-26 Richard Biener <rguenther@suse.de>
9705 Tom de Vries <tom@codesourcery.com>
9706
9707 PR lto/85422
9708 * lto-streamer-out.c (output_function): Fixup loops if required to match
9709 discovery done in the reader.
9710
9711 2018-04-26 Richard Biener <rguenther@suse.de>
9712
9713 PR tree-optimization/85116
9714 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9715 have a loop exit from the single latch predecessor. Remove
9716 case of header with just condition.
9717 (ch_base::copy_headers): Exclude infinite loops from any
9718 processing.
9719 (pass_ch::execute): Record exits.
9720
9721 2018-04-26 Richard Biener <rguenther@suse.de>
9722
9723 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9724 prologue cost vector and pass it to vect_get_load_cost.
9725 (vect_get_peeling_costs_all_drs): Likewise.
9726 (vect_peeling_hash_get_lowest_cost): Likewise.
9727 (vect_enhance_data_refs_alignment): Likewise.
9728
9729 2018-04-26 Richard Biener <rguenther@suse.de>
9730
9731 PR middle-end/85450
9732 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9733 checking of integer<->pointer conversions.
9734 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9735 sign-/zero-extending pointer types.
9736 (expand_omp_for_static_chunk): Likewise.
9737
9738 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9739 Jean Lee <xiaoyur347@gmail.com>
9740
9741 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9742 (TARGET_ASAN_SHADOW_OFFSET): Define.
9743 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9744 true for -fsanitize=address.
9745
9746 2018-04-25 Mark Wielaard <mark@klomp.org>
9747
9748 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9749 shorter ones.
9750
9751 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9752
9753 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9754 than "alu", remove explicit "memory" and "imm_disp" attributes.
9755 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9756
9757 PR middle-end/85414
9758 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9759 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9760 gen_lowpart_no_emit.
9761
9762 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9763
9764 PR target/85473
9765 * config/i386/i386.c (ix86_expand_builtin): Change memory
9766 operand to XI, extend p0 to Pmode.
9767 * config/i386/i386.md: Change unspec volatile and operand
9768 1 mode to XI, change operand 0 mode to P.
9769
9770 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9771
9772 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9773 GET_MODE_MASK before any checking.
9774 (nds32_can_use_bset_p): Likewise.
9775 (nds32_can_use_btgl_p): Likewise.
9776
9777 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9778
9779 * config/nds32/nds32-doubleword.md: New define_split pattern for
9780 illegal register number.
9781
9782 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9783
9784 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9785
9786 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9787
9788 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9789
9790 2018-04-25 Richard Biener <rguenther@suse.de>
9791
9792 * lto-streamer.h (LTO_major_version): Bump to 8.
9793
9794 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9795
9796 * BASE-VER: Set to 9.0.0.
9797
9798 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9799
9800 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9801 in __abskf2 and __powikf2.
9802
9803 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9804
9805 PR target/85512
9806 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9807 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9808 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9809 Use the above on operand 2. Reindent.
9810 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9811
9812 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9813
9814 PR target/85485
9815 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9816 handle OPT_mcet.
9817 * config/i386/i386.opt (mcet): Removed.
9818 * doc/install.texi: Remove -mcet documentation.
9819 * doc/invoke.texi: Likewise.
9820
9821 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9822
9823 PR target/85485
9824 * doc/install.texi: Remove -mcet from bootstrap-cet.
9825
9826 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9827
9828 PR target/85511
9829 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9830 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9831 if TARGET_64BIT.
9832
9833 PR target/85503
9834 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9835 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9836 containing a CONST_VECTOR.
9837
9838 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9839
9840 * doc/install.texi: Update newlib dependency for nvptx.
9841
9842 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9843
9844 PR target/85508
9845 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9846 instead of INTVAL when shifting x left.
9847
9848 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9849
9850 PR tree-optimization/85478
9851 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9852 vect_grouped_store_supported for single element vectors.
9853
9854 2018-04-24 Richard Biener <rguenther@suse.de>
9855
9856 PR target/85491
9857 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9858 load cost increase to the case of non-constant step.
9859
9860 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9861
9862 PR target/84828
9863 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9864 destination if any_malformed_asm.
9865
9866 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9867
9868 PR middle-end/85496
9869 * expr.c (store_field): In the bitfield case, if the value comes from
9870 a function call and is returned in registers by means of a PARALLEL,
9871 do not change the mode of the temporary unless BLKmode and VOIDmode.
9872
9873 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9874
9875 PR rtl-optimization/85423
9876 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9877 dependencies to debug insns when the previous insn is non-debug.
9878
9879 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9880
9881 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9882 enums into a single definition.
9883 (fls): Fix predicates and printing.
9884 (seti): Likewise.
9885
9886 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9887
9888 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9889 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9890 and short u6 immediate.
9891 (check_if_valid_sleep_operand): Remove.
9892 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9893
9894 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9895
9896 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9897 flag_always_save_lp condition.
9898 * config/nds32/nds32.opt (malways-save-lp): New option.
9899
9900 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9901
9902 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9903 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9904 * config/nds32/nds32.h
9905 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9906 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9907
9908 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9909
9910 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9911 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9912
9913 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9914 Chung-Ju Wu <jasonwucj@gmail.com>
9915
9916 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9917 Declare.
9918 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9919 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9920
9921 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9922
9923 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9924
9925 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9926
9927 * config/nds32/nds32-protos.h (nds32_data_alignment,
9928 nds32_local_alignment): Declare.
9929 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9930 nds32_local_alignment): New functions.
9931 (TARGET_CONSTANT_ALIGNMENT): Define.
9932 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9933
9934 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9935
9936 * config/nds32/nds32.c
9937 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9938 (TARGET_MODES_TIEABLE_P): Likewise.
9939
9940 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9941
9942 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9943 level Ofast and Og.
9944
9945 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9946 Chung-Ju Wu <jasonwucj@gmail.com>
9947
9948 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9949 for unaligned access.
9950 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9951 unaligned access.
9952 * config/nds32/nds32-intrinsic.md: Likewise.
9953 * config/nds32/nds32_intrinsic.h: Likewise.
9954 * config/nds32/nds32.h (nds32_builtins): Likewise.
9955 * config/nds32/nds32.opt (munaligned-access): New option.
9956 * config/nds32/nds32.c (nds32_asm_file_start): Display
9957 flag_unaligned_access status.
9958
9959 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9960
9961 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9962 -mno-relax is present.
9963 * config/riscv/linux.h (LINK_SPEC): Ditto.
9964
9965 2018-04-20 Martin Sebor <msebor@redhat.com>
9966
9967 PR c/85365
9968 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9969 for null pointers.
9970 (gimple_fold_builtin_stxcpy_chk): Same.
9971 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9972
9973 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9974
9975 PR target/85456
9976 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9977 __powikf2 when long double is IEEE 128-bit.
9978
9979 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9980
9981 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9982 step to make sure stack always aligned.
9983
9984 2018-04-20 Carl Love <cel@us.ibm.com>
9985
9986 PR target/83402
9987 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9988 size check for arg0.
9989
9990 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9991 Tom de Vries <tom@codesourcery.com>
9992
9993 PR target/85445
9994 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9995 Emit insns for calls too.
9996 (nvptx_find_par): Always look for worker-level predecessor insn.
9997 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9998 calls.
9999 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10000 (nvptx_process_pars): Propagate frames for calls.
10001
10002 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10003
10004 PR target/85469
10005 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10006 Removed.
10007 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10008 (ix86_handle_option): Don't handle OPT_mibt.
10009 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10010 __SHSTK__.
10011 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10012 has_ibt and ibt.
10013 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10014 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10015 (ix86_target_macros): Define __CET__ with flag_cf_protection
10016 for -fcf-protection.
10017 * config/i386/i386.c (isa2_opts): Remove -mibt.
10018 * config/i386/i386.h (TARGET_IBT): Removed.
10019 (TARGET_IBT_P): Likewise.
10020 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10021 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10022 * config/i386/i386.opt (mcet): Update help message.
10023 (mshstk): Likewise.
10024 (mibt): Removed.
10025 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10026 -mcet as an alias for -mshstk.
10027
10028 2018-04-20 Richard Biener <rguenther@suse.de>
10029
10030 PR middle-end/85475
10031 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10032 complexity by forcing a single use of the multiply operand.
10033
10034 2018-04-20 Martin Jambor <mjambor@suse.cz>
10035
10036 ipa/85449
10037 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10038 recursion dependency to only apply to non-clones.
10039
10040 2018-04-20 Martin Jambor <mjambor@suse.cz>
10041
10042 ipa/85447
10043 * ipa-cp.c (create_specialized_node): Check that clones of
10044 self-recursive edges exist during IPA-CP.
10045
10046 2018-04-19 Toon Moene <toon@moene.org>
10047
10048 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10049 by -O3.
10050
10051 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10052
10053 PR tree-optimization/85467
10054 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10055 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10056 VECTOR_CST element to type.
10057
10058 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10059
10060 PR target/85397
10061 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10062 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10063 (builtin_longjmp): Likewise.
10064 (save_stack_nonlocal): New pattern.
10065 (restore_stack_nonlocal): Likewise.
10066
10067 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10068
10069 PR target/85404
10070 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10071 Replace ASM_OUTPUT_LABEL with fprintf.
10072
10073 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10074
10075 PR target/85417
10076 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10077 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10078 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10079 define __IBT__ and __SHSTK__ for -fcf-protection.
10080 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10081 TARGET_IBT.
10082 (ix86_trampoline_init): Likewise.
10083 (x86_output_mi_thunk): Likewise.
10084 (ix86_notrack_prefixed_insn_p): Likewise.
10085 (ix86_option_override_internal): Don't disallow -fcf-protection.
10086 * config/i386/i386.md (rdssp<mode>): Also enable for
10087 -fcf-protection.
10088 (incssp<mode>): Likewise.
10089 (nop_endbr): Likewise.
10090 * config/i386/i386.opt (mcet): Change help message to built-in
10091 functions only.
10092 (mibt): Likewise.
10093 (mshstk): Likewise.
10094 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10095 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10096 enable CET built-in functions.
10097
10098 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10099
10100 * common/config/i386/i386-common.c
10101 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10102 OPTION_MASK_ISA_MOVDIRI_UNSET,
10103 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10104 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10105 * config.gcc (movdirintrin.h): New header.
10106 * config/i386/cpuid.h (bit_MOVDIRI,
10107 bit_MOVDIR64B): New bits.
10108 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10109 and -mmvodir64b.
10110 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10111 (VOID, PVOID, PCVOID)): New function types.
10112 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10113 __builtin_ia32_directstoreu_u64,
10114 __builtin_ia32_movdir64b): New builtins.
10115 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10116 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10117 and -mmovdiri.
10118 (ix86_valid_target_attribute_inner_p): Ditto.
10119 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10120 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10121 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10122 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10123 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10124 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10125 (movdiri<mode>, movdir64b_<mode>): New.
10126 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10127 * config/i386/immintrin.h: Include movdirintrin.h.
10128 * config/i386/movdirintrin.h: New file.
10129 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10130
10131 2018-04-19 Richard Biener <rguenther@suse.de>
10132
10133 PR middle-end/85455
10134 * cfg.c (clear_bb_flags): When loop state says we have
10135 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10136
10137 2018-04-19 Richard Biener <rguenther@suse.de>
10138
10139 PR tree-optimization/84737
10140 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10141 copying restrict info.
10142 (vect_setup_realignment): Use it.
10143 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10144 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10145 the first DR to all generated stores.
10146 (vectorizable_load): Likewise for loads.
10147
10148 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10149
10150 PR tree-optimization/85446
10151 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10152 the integral and pointer types to have the same precision.
10153
10154 * doc/install.texi: Document --disable-cet being the default and
10155 --enable-cet=auto.
10156
10157 2018-04-18 Martin Liska <mliska@suse.cz>
10158
10159 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10160 style.
10161
10162 2018-04-18 Martin Liska <mliska@suse.cz>
10163
10164 Revert
10165 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10166
10167 PR ipa/83983
10168 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10169 arguments if they are comparable.
10170
10171 2018-04-18 Martin Liska <mliska@suse.cz>
10172
10173 Revert
10174 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10175
10176 PR lto/84805
10177 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10178 incomplete types.
10179
10180 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10181
10182 PR target/85388
10183 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10184 ENDBR after calling __morestack.
10185
10186 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10187
10188 PR jit/85384
10189 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10190 by using gcc_base_ver to generate a gcc_driver_version, and use
10191 it when generating GCC_DRIVER_NAME.
10192 * configure: Regenerate.
10193
10194 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10195
10196 PR target/81084
10197 * config.gcc: Obsolete powerpc*-*-*spe*.
10198
10199 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10200
10201 PR debug/84637
10202 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10203 (stabstr_D): Change type of unum from unsigned int to
10204 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10205 type.
10206
10207 2018-04-17 Jim Wilson <jimw@sifive.com>
10208
10209 PR 84856
10210 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10211 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10212 Set arg_pointer_offset after using pretend_args_size.
10213
10214 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10215
10216 PR rtl-optimization/85431
10217 * dse.c (record_store): Ignore zero width stores.
10218
10219 PR sanitizer/85230
10220 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10221 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10222 __builtin_stack_restore rather than after it.
10223 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10224 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10225 argument instead of virtual_dynamic_stack_rtx.
10226
10227 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10228
10229 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10230 New prototype.
10231 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10232 Add note to error message to explain internal mapping of overloaded
10233 built-in function name to non-overloaded built-in function name.
10234 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10235 function.
10236
10237 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10238
10239 PR target/85424
10240 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10241 where the inputs overlap with the output.
10242
10243 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10244
10245 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10246 (=v, v) alternative and explicit "memory" attribute.
10247 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10248 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10249 attributes.
10250 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10251 "sselog1" type instead of "sselog".
10252 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10253 "sselog". Remove explicit "memory" attribute.
10254 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10255 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10256 attributes.
10257 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10258 "sselog1" type instead of "sselog". Remove explicit "memory"
10259 attribute.
10260 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10261 use "sselog1" type instead of "sselog". Remove explicit "memory"
10262 attribute.
10263 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10264 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10265 attributes.
10266 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10267 "sselog1" type instead of "sselog". Remove explicit "memory"
10268 attribute.
10269 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10270 use "sselog1" type instead of "sselog". Remove explicit "memory"
10271 attribute.
10272
10273 PR target/85430
10274 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10275
10276 PR middle-end/85414
10277 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10278 on a SUBREG.
10279
10280 2018-04-17 Martin Jambor <mjambor@suse.cz>
10281
10282 PR ipa/85421
10283 * ipa-cp.c (create_specialized_node): Call
10284 expand_all_artificial_thunks if necessary.
10285
10286 2018-04-17 Martin Liska <mliska@suse.cz>
10287
10288 PR lto/85405
10289 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10290 in message, remote space in between '_G' and '('.
10291
10292 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10293
10294 PR target/85281
10295 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10296 avx512f_vmcmp<mode>3<round_saeonly_name>,
10297 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10298 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10299 avx512f_rndscale<mode><round_saeonly_name>,
10300 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10301 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10302 Use %<iptr>2 instead of %2 for -masm=intel.
10303 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10304 avx512f_vcvttss2usi<round_saeonly_name>,
10305 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10306 -masm=intel.
10307 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10308 avx512f_vcvttsd2usi<round_saeonly_name>,
10309 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10310 Use %q1 instead of %1 for -masm=intel.
10311 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10312 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10313 of %3 for -masm=intel.
10314 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10315 -masm=intel.
10316 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10317 -masm=intel.
10318 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10319 -masm=intel.
10320 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10321 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10322 %g1.
10323 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10324 -masm=intel.
10325 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10326 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10327 %g1 and one with %0 and %1.
10328 (avx512er_vmrcp28<mode><round_saeonly_name>,
10329 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10330 %1 for -masm=intel.
10331 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10332 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10333 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10334 of %0 and %{%4%} for -masm=intel.
10335 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10336 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10337 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10338 order of %0 and %{%5%}%{z%} for -masm=intel.
10339
10340 2018-04-17 Jan Hubicka <jh@suse.cz>
10341
10342 PR lto/85405
10343 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10344
10345 2018-04-17 Martin Liska <mliska@suse.cz>
10346
10347 PR ipa/85329
10348 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10349 for target_clone error message. Make default implementation
10350 clone to be a local declaration.
10351 (separate_attrs): Add new argument and check for an empty
10352 string.
10353 (expand_target_clones): Handle it.
10354 (ipa_target_clone): Make redirection just for target_clones
10355 functions.
10356
10357 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10358 Tom de Vries <tom@codesourcery.com>
10359
10360 PR middle-end/84955
10361 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10362 tiled basic blocks without omp continue statements.
10363
10364 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10365
10366 PR target/83660
10367 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10368 vec_extract expression as having side effects to make sure it gets
10369 a cleanup point.
10370
10371 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10372
10373 PR target/85403
10374 * config/i386/i386.c (get_builtin_code_for_version): Check
10375 error_mark_node.
10376
10377 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10378
10379 PR target/84331
10380 * config.gcc: Support "skylake".
10381 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10382 PROCESSOR_SKYLAKE.
10383 * config/i386/i386.c (m_SKYLAKE): Define.
10384 (processor_target_table): Add "skylake".
10385 (ix86_option_override_internal): Add "skylake".
10386 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10387 PROCESSOR_CANNONLAKE.
10388 (get_builtin_code_for_version): Fix priority for
10389 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10390 PROCESSOR_SKYLAKE-AVX512.
10391 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10392 (processor_type): Add PROCESSOR_SKYLAKE.
10393
10394 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
10395 Jason Merrill <jason@redhat.com>
10396
10397 PR c++/85112
10398 * convert.c (convert_to_integer_1): Use direct recursion for
10399 enumeral types and types with a precision less than the number
10400 of bits in their mode.
10401
10402 2018-04-16 Julia Koval <julia.koval@intel.com>
10403
10404 PR target/84413
10405 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10406 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10407
10408 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
10409
10410 PR target/85293
10411 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10412 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10413 and -mno-direct-move.
10414
10415 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
10416
10417 PR target/83402
10418 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10419 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10420 Ensure negative shifts result in {0}.
10421
10422 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
10423
10424 PR rtl-optimization/79916
10425 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10426 regs (if any) to define how to gnerate SD moves when LRA is in
10427 progress.
10428
10429 2018-04-13 Jakub Jelinek <jakub@redhat.com>
10430
10431 PR rtl-optimization/85393
10432 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10433 * except.c (expand_dw2_landing_pad_for_region): Make static.
10434 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10435 a label and unconditional jump to old_bb, rather than
10436 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10437 basic block.
10438
10439 PR rtl-optimization/85376
10440 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10441 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10442 instead of a specific value.
10443
10444 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10445 Bin Cheng <bin.cheng@arm.com>
10446
10447 PR tree-optimization/82965
10448 PR tree-optimization/83991
10449 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10450 by_profile_only parameter.
10451 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10452 information if the loop was predicted to iterate too many times.
10453 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10454
10455 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10456
10457 PR lto/71991
10458 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10459 always inline.
10460
10461 2018-04-13 Martin Liska <mliska@suse.cz>
10462 Jakub Jelinek <jakub@redhat.com>
10463
10464 PR middle-end/81657
10465 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10466 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10467 * builtins.c (expand_builtin_memory_copy_args): Use
10468 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10469 handle dest_addr == pc_rtx.
10470
10471 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
10472
10473 PR target/85291
10474 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10475 asked to not generate direct moves.
10476 (fix_trunc<mode>si2_stfiwx): Similar.
10477 (fix_trunc<mode>si2_internal): Similar.
10478
10479 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10480
10481 PR debug/83157
10482 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10483 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10484 lookup if dest in some wider mode is known to be const0_rtx and
10485 if so, record permanent equivalence for it to be ZERO_EXTEND of
10486 the narrower mode destination.
10487
10488 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10489
10490 * lto-streamer-out.c (output_function): Revert 259346.
10491 * omp-expand.c (expand_oacc_for): Likewise.
10492
10493 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
10494
10495 PR rtl-optimization/85354
10496 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10497 * sel-sched.c (sel_global_init): ... here.
10498
10499 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
10500
10501 PR target/85238
10502 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10503 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10504 mode for PE-COFF targets.
10505 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10506 (i386_pe_asm_lto_end): Likewise.
10507 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10508 (TARGET_ASM_LTO_END): Likewise.
10509 * config/i386/winnt.c (saved_debug_info_level): New static variable.
10510 (i386_pe_asm_lto_start): New function.
10511 (i386_pe_asm_lto_end): Likewise.
10512
10513 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10514 Richard Biener <rguenther@suse.de>
10515
10516 PR middle-end/84955
10517 * lto-streamer-out.c (output_function): Fix CFG loop state before
10518 streaming out.
10519 * omp-expand.c (expand_oacc_for): Handle calls to internal
10520 functions like regular functions.
10521
10522 2018-04-12 Richard Biener <rguenther@suse.de>
10523
10524 PR lto/85371
10525 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10526 for the early LTO debug to properly generate references to it
10527 during DIE emission. Do not re-use that for the skeleton for
10528 split-dwarf.
10529 (dwarf2out_early_finish): Likewise.
10530
10531 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10532
10533 PR target/85328
10534 * config/i386/sse.md
10535 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10536 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10537 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10538 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10539 and output is a reg, avoid creating invalid lowpart subreg, but
10540 instead split into a 512-bit move. Don't split if not AVX512VL,
10541 input is xmm16+ reg and output is a mem.
10542 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10543 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10544 xmm16+ reg and output is a mem.
10545
10546 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10547
10548 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10549 also for flag_dwarf2_cfi_asm.
10550
10551 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10552
10553 PR rtl-optimization/85342
10554 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10555 a bool scalar var inside of the loop instead. Don't try to update
10556 recog_data.operand after failed apply_change_group.
10557
10558 2018-04-12 Tom de Vries <tom@codesourcery.com>
10559
10560 PR target/85296
10561 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10562 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
10563 array with flexible array member as array without given dimension.
10564 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10565 argument for undefined param to true.
10566
10567 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
10568
10569 PR target/85321
10570 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10571 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10572 from PowerPC section.
10573 * config/rs6000/sysv4.opt (mcall-): Improve help text.
10574 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10575 help text that is too long.
10576 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10577 help text that is too long.
10578 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10579 help text that is too long.
10580
10581 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
10582
10583 * config/alpha/alpha.md (stack_probe_internal): Rename
10584 from "probe_stack". Update all callers.
10585
10586 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10587
10588 PR rtl-optimization/84566
10589 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10590 sched_macro_fuse_insns.
10591
10592 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10593
10594 PR target/84301
10595 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10596 (compute_block_dependences): ... from here.
10597
10598 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10599
10600 PR tree-optimization/85331
10601 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10602 from int to HOST_WIDE_INT.
10603
10604 2018-04-11 Martin Jambor <mjambor@suse.cz>
10605
10606 PR ipa/84149
10607 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10608 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10609 not the same as the source val.
10610 (cgraph_edge_brings_value_p): New parameter.
10611 (gather_edges_for_value): Pass destination value to
10612 cgraph_edge_brings_value_p.
10613 (perhaps_add_new_callers): Likewise.
10614 (get_info_about_necessary_edges): Likewise and exclude values brought
10615 only by self-recursive edges.
10616 (create_specialized_node): Redirect only clones of self-calling edges.
10617 (+self_recursive_pass_through_p): New function.
10618 (find_more_scalar_values_for_callers_subset): Use it.
10619 (find_aggregate_values_for_callers_subset): Likewise.
10620 (known_aggs_to_agg_replacement_list): Removed.
10621 (decide_whether_version_node): Re-calculate known constants for all
10622 remaining context clones.
10623
10624 2018-04-11 Richard Biener <rguenther@suse.de>
10625
10626 PR lto/85339
10627 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10628 from early DWARF output.
10629 (dwarf2out_early_finish): Output line info unconditionally into
10630 early DWARF and add reference to it.
10631
10632 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10633
10634 PR target/85281
10635 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10636 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10637 other than V2DFmode using iptr mode attribute.
10638 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10639
10640 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10641
10642 PR rtl-optimization/84659
10643 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10644
10645 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10646
10647 PR debug/85302
10648 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10649 SIZEP is NULL.
10650 (output_loc_list): Pass address of a dummy size variable even in the
10651 locview handling loop.
10652 (index_location_lists): Add comment on why skip_loc_list_entry can't
10653 call size_of_locs.
10654
10655 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
10656
10657 PR target/85261
10658 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10659 into register.
10660
10661 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
10662
10663 PR target/85321
10664 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10665 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10666 and -mstring-compare-inline-limit.
10667
10668 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10669
10670 PR target/85287
10671 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10672 for stack clash protection in a register whenever we need it to be in
10673 a register.
10674
10675 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10676
10677 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10678 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10679
10680 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10681
10682 PR target/85321
10683 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10684 the help text.
10685 (mlong-double-): Ditto.
10686 * config/rs6000/sysv4.opt (msdata=): Ditto.
10687 (mtls-size=): Ditto.
10688
10689 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10690
10691 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10692 erroneous entries for
10693 "vector int vec_ldl (int, long int *)", and
10694 "vector unsigned int vec_ldl (int, unsigned long int *)".
10695 Add comments and entries for
10696 "vector bool char vec_ldl (int, bool char *)",
10697 "vector bool short vec_ldl (int, bool short *)",
10698 "vector bool int vec_ldl (int, bool int *)",
10699 "vector bool long long vec_ldl (int, bool long long *)",
10700 "vector pixel vec_ldl (int, pixel *)",
10701 "vector long long vec_ldl (int, long long *)",
10702 "vector unsigned long long vec_ldl (int, unsigned long long *)".
10703 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10704 type tree bool_long_long_type_node and correct definition of
10705 bool_V2DI_type_node to make reference to this new type tree.
10706 (rs6000_mangle_type): Replace erroneous reference to
10707 bool_long_type_node with bool_long_long_type_node.
10708 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10709 comments to emphasize sign distinctions for char and int types and
10710 replace RS6000_BTI_bool_long constant with
10711 RS6000_BTI_bool_long_long constant. Also add comment to restrict
10712 use of RS6000_BTI_pixel.
10713 (bool_long_type_node): Remove this macro definition.
10714 (bool_long_long_type_node): New macro definition
10715
10716 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10717
10718 PR rtl-optimization/85300
10719 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10720 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10721 simplify_unary_operation fails.
10722
10723 2018-04-10 Martin Liska <mliska@suse.cz>
10724
10725 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10726 cgraph_edge and ipa_ref.
10727
10728 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10729
10730 PR target/85177
10731 PR target/85255
10732 * config/i386/sse.md
10733 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10734 computation of the VEC_MERGE selector from mask.
10735 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10736 Fix decoding of the VEC_MERGE selector into mask.
10737
10738 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10739
10740 PR tree-optimization/85286
10741 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10742
10743 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10744
10745 * final.c (final_1): Set insn_last_address as well as
10746 insn_current_address.
10747
10748 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10749
10750 PR target/85173
10751 * explow.c (emit_stack_probe): Call validize_mem on memory location
10752 before passing it to gen_probe_stack. Create address operand and
10753 legitimize it for the probe_stack_address case.
10754
10755 2018-04-09 Jan Hubicka <jh@suse.cz>
10756
10757 PR lto/85078
10758 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10759 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10760 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10761 walk basetypes.
10762 (free_lang_data): Rebuild type inheritance graph.
10763
10764 2018-04-09 Martin Sebor <msebor@redhat.com>
10765
10766 * invoke.texi (-finline-small-functions): Mention other optimization
10767 options.
10768 (-findirect-inlining, -fpartial-inlining): Same.
10769 (-finline-functions-called-once): Same.
10770 (-freorder-blocks-and-partition): Same.
10771
10772 2018-04-09 Jan Hubicka <jh@suse.cz>
10773
10774 PR rtl/84058
10775 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10776 jumps; choose last target that matches the criteria (i.e.
10777 no partition changes for non-crossing jumps).
10778 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10779 support for redirecting crossing jumps to non-crossing.
10780
10781 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10782
10783 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10784 also for naked functions.
10785
10786 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10787
10788 * config/arc/arc.md (add_shift): New pattern.
10789 (add_shift2): Likewise.
10790 (sub_shift): Likewise.
10791 (sub_shift_cmp0_noout): Likewise.
10792 (compare_si_ashiftsi): Likewise.
10793 (xbfu_cmp0_noout): New combine pattern.
10794 (xbfu_cmp0"): Likewise.
10795 (movsi_set_cc_insn): Place the predicable variant first.
10796 (commutative_binary_cmp0_noout): Remove clobber.
10797 (commutative_binary_cmp0): New pattern.
10798 (noncommutative_binary_cmp0): Likewise.
10799 (noncommutative_binary_cmp0_noout): Likewise.
10800 (noncommutative_binary_comparison_result_used): Removed.
10801 (rsub_cmp0): New pattern.
10802 (rsub_cmp0_noout): Likewise.
10803 (extzvsi): Changed, keep only meaningful variants.
10804 (SQH, SEZ): New iterators.
10805 (SQH_postfix): New mode attribute.
10806 (SEZ_prefix): New code attribute.
10807 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10808 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10809 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10810 of numerical value.
10811 (noncommutative_operator): Check the availability of barrel
10812 shifter option.
10813
10814 2018-04-09 Richard Biener <rguenther@suse.de>
10815
10816 PR tree-optimization/85284
10817 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10818 Only use the niter constraining form of simple_iv when the exit
10819 is always executed.
10820
10821 2018-04-09 Tom de Vries <tom@codesourcery.com>
10822
10823 PR target/84041
10824 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10825 (define_expand "*memory_barrier"): New define_expand.
10826 (define_insn "memory_barrier"): New insn.
10827
10828 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10829
10830 PR rtl-optimization/80463
10831 PR rtl-optimization/83972
10832 PR rtl-optimization/83480
10833
10834 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10835 correct producer for the insn.
10836 (tidy_control_flow): Fixup seqnos in case of debug insns.
10837
10838 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10839
10840 PR rtl-optimization/83913
10841
10842 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10843 different sched-times when merging exprs.
10844
10845 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10846
10847 PR rtl-optimization/83962
10848
10849 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10850 tidy_fallthru_edge and tidy_control_flow.
10851
10852 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10853
10854 PR rtl-optimization/83530
10855
10856 * sel-sched.c (force_next_insn): New global variable.
10857 (remove_insn_for_debug): When force_next_insn is true, also leave only
10858 next insn in the ready list.
10859 (sel_sched_region): When the region wasn't scheduled, make another pass
10860 over it with force_next_insn set to 1.
10861
10862 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10863
10864 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10865 into tm_file.
10866 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10867 for interrupt control.
10868 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10869 functions for interrupt control.
10870 * config/nds32/nds32-intrinsic.md: Likewise.
10871 * config/nds32/nds32_intrinsic.h: Likewise.
10872 * config/nds32/nds32.h (nds32_builtins): Likewise.
10873
10874 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10875
10876 * config/nds32/nds32.c (nds32_init_machine_status,
10877 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10878 strict_aligned_p field.
10879 (nds32_expand_to_rtl_hook): New function.
10880 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10881 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10882
10883 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10884 Chung-Ju Wu <jasonwucj@gmail.com>
10885
10886 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10887 * config/nds32/nds32-n7.md: New file.
10888 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10889 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10890 pipeline.
10891 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10892 * config/nds32/nds32.md (pipeline_model): Add n7.
10893 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10894 * config/nds32/pipelines.md: Include n7 settings.
10895
10896 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10897 Chung-Ju Wu <jasonwucj@gmail.com>
10898
10899 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10900 * config/nds32/nds32-e8.md: New file.
10901 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10902 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10903 pipeline.
10904 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10905 * config/nds32/nds32.md (pipeline_model): Add e8.
10906 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10907 * config/nds32/pipelines.md: Include e8 settings.
10908
10909 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10910 Chung-Ju Wu <jasonwucj@gmail.com>
10911
10912 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10913 * config/nds32/nds32-n8.md: New file.
10914 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10915 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10916 pipeline.
10917 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10918 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10919 * config/nds32/nds32.md (pipeline_model): Add n8.
10920 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10921 * config/nds32/pipelines.md: Include n8 settings.
10922
10923 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10924 Chung-Ju Wu <jasonwucj@gmail.com>
10925
10926 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10927 * config/nds32/nds32-n9-2r1w.md: New file.
10928 * config/nds32/nds32-n9-3r2w.md: New file.
10929 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10930 nds32_register_ports): New or modify for cpu n9.
10931 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10932 pipeline.
10933 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10934 * config/nds32/nds32-utils.c: New file.
10935 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10936 TARGET_MUL_SLOW): Define.
10937 * config/nds32/nds32.md (pipeline_model): New attribute.
10938 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10939 New options that support cpu n9.
10940 * config/nds32/pipelines.md: Include n9 settings.
10941 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10942
10943 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10944
10945 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10946 information if necessary.
10947 (output_cond_branch_compare_zero): Likewise.
10948 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10949 (nds32_target_alignment): Refine for alignment.
10950 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10951 (FUNCTION_BOUNDARY): Modify.
10952 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10953 align case.
10954 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10955
10956 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10957
10958 * config/nds32/constants.md (unspec_volatile_element): Add values for
10959 TLB operation and data prefetch.
10960 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10961 functions for TLB operation and data prefetch.
10962 * config/nds32/nds32-intrinsic.md: Likewise.
10963 * config/nds32/nds32_intrinsic.h: Likewise.
10964 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10965 (nds32_print_operand): Likewise.
10966 * config/nds32/nds32.h (nds32_builtins): Likewise.
10967
10968 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10969 Andrew Pinski <pinsika@gcc.gnu.org>
10970
10971 PR middle-end/82976
10972 * match.pd: Use constant_boolean_node of correct type instead of
10973 boolean_true_node or boolean_false_node for simplifying
10974 pointer comparisons to zero.
10975
10976 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10977
10978 PR tree-optimization/80021
10979 * tree.c (verify_type_variant): Make error call in verify_variant_match
10980 translatable and remove final full stop.
10981
10982 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10983
10984 * config/nds32/constants.md (unspec_volatile_element): Add
10985 UNSPEC_VOLATILE_EH_RETURN.
10986 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10987 nds32_output_stack_pop): Support dwarf exception handling process.
10988 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10989 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10990 exception handling process.
10991 (nds32_compute_stack_frame): Likewise.
10992 (nds32_return_addr_rtx): Likewise.
10993 (nds32_initial_elimination_offset): Likewise.
10994 (nds32_expand_prologue): Likewise.
10995 (nds32_expand_epilogue): Likewise.
10996 (nds32_dynamic_chain_address): New function.
10997 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10998 exception handling.
10999 (DYNAMIC_CHAIN_ADDRESS): Define.
11000 (EH_RETURN_DATA_REGNO): Define.
11001 (EH_RETURN_STACKADJ_RTX): Define.
11002 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11003 patterns for dwarf exception handling.
11004
11005 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11006
11007 * config/nds32/nds32.h: Clean up obsolete macros.
11008
11009 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11010
11011 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11012 Add enum values for particular instructions.
11013 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11014 particular intrinsic functions.
11015 * config/nds32/nds32-intrinsic.md: Likewise.
11016 * config/nds32/nds32_intrinsic.h: Likewise.
11017 * config/nds32/nds32.h (nds32_builtins): Likewise.
11018 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11019 (btst, ave): New patterns for particular instructions.
11020
11021 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11022
11023 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11024 Add enum values for atomic load/store and memory sync.
11025 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11026 and memory sync.
11027 * config/nds32/nds32-intrinsic.md: Likewise.
11028 * config/nds32/nds32_intrinsic.h: Likewise.
11029 * config/nds32/nds32.h (nds32_builtins): Likewise.
11030
11031 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11032
11033 PR tree-optimization/85257
11034 * fold-const.c (native_encode_vector): If not all elts could fit
11035 and off is -1, return 0 rather than offset.
11036 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11037 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11038 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11039 adjust buffer in native_interpret_expr call.
11040
11041 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11042
11043 * config/nds32/constants.md (unspec_volatile_element): Add cache
11044 control enum values.
11045 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11046 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11047 * config/nds32/nds32.c (nds32_cctl_names): New.
11048 (nds32_print_operand): Handle cache control register names.
11049 * config/nds32/nds32.h (nds32_builtins): New enum values.
11050 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11051 macros.
11052 * config/nds32/nds32.md (type): Add mmu.
11053 * config/nds32/pipelines.md (simple_insn): Add mmu.
11054
11055 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11056
11057 * config/nds32/nds32.md (type): Remove call.
11058 * config/nds32/pipelines.md (simple_insn): Likewise.
11059
11060 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11061
11062 * config/nds32/constants.md (unspec_volatile_element): Add
11063 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11064 UNSPEC_VOLATILE_FMFCFG.
11065 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11066 description for fmfcfg and fmfcsr.
11067 (bdesc_1arg): Add fmtcsr.
11068 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11069 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11070 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11071 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11072 unspec_fmfcfg): New patterns.
11073 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11074 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11075 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11076 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11077 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11078 __nds32__fmfcfg): Define.
11079
11080 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11081
11082 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11083 intrinsic register names.
11084 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11085 intrinsic register enum values and macros.
11086
11087 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11088
11089 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11090 for load/store addressing form.
11091 (nds32_print_operand_address): Likewise.
11092
11093 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11094
11095 PR target/85196
11096 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11097 based on LABEL_REF. Remove useless assertion.
11098 (pic_address_needs_scratch): Fix formatting.
11099 (sparc_legitimize_pic_address): Minor tweaks.
11100 (sparc_delegitimize_address): Adjust assertion accordingly.
11101 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11102 into symbolic_operand.
11103 (movsi_high_pic_label_ref): Likewise.
11104 (movsi_lo_sum_pic_label_ref): Likewise.
11105 (movdi_pic_label_ref): Likewise.
11106 (movdi_high_pic_label_ref): Likewise.
11107 (movdi_lo_sum_pic_label_ref): Likewise.
11108
11109 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11110
11111 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11112 custom LIB_SPEC setup.
11113
11114 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11115 Kito Cheng <kito.cheng@gmail.com>
11116
11117 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11118 * config/riscv/freebsd.h: New.
11119
11120 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11121
11122 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11123 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11124 file.
11125
11126 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11127 Kito Cheng <kito.cheng@gmail.com>
11128
11129 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11130 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11131 * config/nds32/nds32-protos.h (nds32_output_call,
11132 nds32_output_return): Declare.
11133 * config/nds32/nds32.md: Refine all the call and return patterns.
11134
11135 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11136
11137 PR debug/85252
11138 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11139 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11140
11141 PR rtl-optimization/84872
11142 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11143 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11144 EDGE_CROSSING edge.
11145
11146 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11147
11148 * expr.c (copy_blkmode_to_reg): Revert 254862.
11149 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11150
11151 2018-04-06 Richard Biener <rguenther@suse.de>
11152
11153 PR middle-end/85244
11154 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11155 after seeing a component reference with an adjacent field. Treat
11156 refs to arrays at struct end of external decls similar to
11157 refs to unconstrained commons.
11158
11159 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11160
11161 PR sanitizer/85213
11162 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11163 look through SAVE_EXPRs with non-side-effects argument. Adjust
11164 recursive calls.
11165 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11166 save_p here.
11167
11168 2018-04-06 Richard Biener <rguenther@suse.de>
11169
11170 PR middle-end/85180
11171 * alias.c (find_base_term): New wrapper around find_base_term
11172 unwinding CSELIB_VAL_PTR changes.
11173 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11174 recursion.
11175
11176 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11177
11178 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11179 instructions.
11180 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11181 constant definitions.
11182 ("nop"): lr 0,0 -> nopr r0
11183 ("nop_lr0", "nop_lr1"): New insn definitions.
11184
11185 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11186
11187 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11188 NDS32_V3PUSH_AVAILABLE_P macro.
11189
11190 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11191 Chung-Ju Wu <jasonwucj@gmail.com>
11192
11193 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11194 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11195 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11196 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11197 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11198 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11199 * config/nds32/constraints.md: New constraints and checking for hard
11200 float configuration.
11201 * config/nds32/iterators.md: New mode iterator and attribute for hard
11202 float configuration.
11203 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11204 patterns.
11205 * config/nds32/nds32-fpu.md: New file.
11206 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11207 deal with hard float code generation.
11208 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11209 ARCH_V3S.
11210 (abi_type, float_reg_number): New enum type.
11211 * config/nds32/nds32-predicates.c: New predicates for hard float.
11212 * config/nds32/nds32-protos.h: Declare functions for hard float.
11213 * config/nds32/nds32.c: Implementation for hard float configuration.
11214 * config/nds32/nds32.h: Definitions for hard float configuration.
11215 * config/nds32/nds32.md: Include hard float machine description and
11216 modify patterns for hard float configuration.
11217 * config/nds32/nds32.opt: New options for hard float configuration.
11218 * config/nds32/predicates.md: New predicates for hard float
11219 configuration.
11220
11221 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11222
11223 * common/config/nds32/nds32-common.c
11224 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11225
11226 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11227
11228 PR middle-end/85195
11229 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11230 CONSTRUCTOR_ELT (ctor, ...)->value.
11231
11232 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11233
11234 PR target/85193
11235 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11236
11237 2018-04-05 Tom de Vries <tom@codesourcery.com>
11238
11239 PR target/85204
11240 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11241 cond jump.
11242
11243 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11244 Kito Cheng <kito.cheng@gmail.com>
11245
11246 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11247 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11248 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11249 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11250
11251 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11252 Kito Cheng <kito.cheng@gmail.com>
11253
11254 * config/nds32/constraints.md (Ufe): New memory constraint.
11255 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11256 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11257 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11258 operands.
11259 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11260 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11261
11262 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11263
11264 * config/nds32/nds32.md: Use optimize_size in the condition for
11265 alu-shift instructions.
11266
11267 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11268
11269 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11270
11271 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11272
11273 * config/nds32/nds32.md (negsi2): Refine pattern.
11274
11275 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11276 Chung-Ju Wu <jasonwucj@gmail.com>
11277
11278 * config/nds32/iterators.md (shift_rotate): New code iterator.
11279 (shift): New code attribute.
11280 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11281 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11282 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11283 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11284 bit-wise operations.
11285 (andsi3, *andsi3): Ditto.
11286 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11287 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11288 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11289 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11290 nds32_ior_operand, nds32_xor_operand): New predicates.
11291
11292 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11293
11294 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11295 (addsi3, subsi3): ... this.
11296
11297 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11298
11299 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11300
11301 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11302
11303 * config/nds32/nds32.md: Adjust indention.
11304
11305 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11306
11307 * config/nds32/nds32.md (feature): New attribute.
11308
11309 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11310
11311 * config/nds32/nds32.md (subtype): New attribute.
11312
11313 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11314
11315 PR target/85203
11316 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11317 expansion to perform a bitwise AND of the argument followed by a
11318 boolean negation of the result.
11319
11320 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11321
11322 PR rtl-optimization/84878
11323 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11324 the basic block. Assert the use reference is not artificial and that
11325 it has an associated insn.
11326
11327 2018-04-04 Michael Matz <matz@suse.de>
11328
11329 * builtins.c (compute_objsize): Pass correct operand
11330 to array_at_struct_end_p.
11331
11332 2018-04-04 Richard Biener <rguenther@suse.de>
11333
11334 PR lto/85176
11335 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11336 from contexts for DINFO_LEVEL_TERSE and below.
11337
11338 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11339
11340 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11341 resiter_operand condition.
11342 * config/nds32/nds32.md (*move<mode>): Ditto.
11343
11344 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11345 Monk Chiang <sh.chiang04@gmail.com>
11346
11347 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11348
11349 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11350
11351 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11352
11353 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11354 Kito Cheng <kito.cheng@gmail.com>
11355
11356 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11357 nds32_cond_code_str, output_cond_branch,
11358 output_cond_branch_compare_zero, nds32_expand_cbranch,
11359 nds32_expand_cstore, nds32_expand_movcc,
11360 nds32_output_cbranchsi4_equality_zero,
11361 nds32_output_cbranchsi4_equality_reg,
11362 nds32_output_cbranchsi4_equality_reg_or_const_int,
11363 nds32_output_cbranchsi4_greater_less_zero: New functions.
11364 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11365 nds32_expand_cstore, nds32_expand_movcc,
11366 nds32_output_cbranchsi4_equality_zero,
11367 nds32_output_cbranchsi4_equality_reg,
11368 nds32_output_cbranchsi4_equality_reg_or_const_int,
11369 nds32_output_cbranchsi4_greater_less_zero): Declare.
11370 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11371 nds32_rimm11s_operand): New predicates.
11372 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11373 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11374 patterns.
11375
11376 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11377
11378 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11379 * config/nds32/nds32.md: Ditto.
11380 * config/nds32/pipelines.md: Ditto.
11381
11382 2018-04-04 Richard Biener <rguenther@suse.de>
11383
11384 PR tree-optimization/85168
11385 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11386 propagating abnormals.
11387
11388 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11389
11390 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11391
11392 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11393 Kito Cheng <kito.cheng@gmail.com>
11394
11395 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11396 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11397 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11398 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11399 * config/nds32/nds32.md (sibcall_internal): New.
11400 (sibcall_register): Remove.
11401 (sibcall_immediate): Remove.
11402 (sibcall_value_internal): New.
11403 (sibcall_value_register): Remove.
11404 (sibcall_value_immediate): Remove.
11405 * config/nds32/predicates.md (nds32_general_register_operand): New.
11406 (nds32_call_address_operand): New.
11407
11408 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11409
11410 PR rtl-optimization/85167
11411 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11412 bb_defs if *split_p, instead preinitialize it to NULL.
11413
11414 PR tree-optimization/85156
11415 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11416 evaluating the argument multiple times.
11417
11418 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
11419
11420 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11421 than vector.
11422 (_mm_cvtpd_ps): Likewise.
11423 (_mm_cvttpd_epi32): Likewise.
11424 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11425 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11426 vector, pixel, and bool following altivec.h include.
11427
11428 2018-04-03 Martin Sebor <msebor@redhat.com>
11429
11430 * doc/extend.texi (Common Function Attributes): Clarify.
11431 (const attribute): Likewise.
11432 (pure attribute): Likewise.
11433
11434 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11435
11436 PR target/85169
11437 * config/i386/i386.c (ix86_expand_vector_set): Use
11438 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
11439
11440 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
11441
11442 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11443 instructions when changing rounding bits to preserve precision bits
11444 in the x87 control word.
11445
11446 2018-04-03 Martin Liska <mliska@suse.cz>
11447
11448 PR tree-optimization/82491
11449 * rtl.h (strip_offset_and_add): Replace += suboffset with
11450 poly_uint64 () + suboffset.
11451
11452 2018-03-29 Martin Liska <mliska@suse.cz>
11453 Martin Jambor <mjambor@suse.cz>
11454
11455 PR ipa/84947
11456 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11457 param_type is not an integral or pointer type.
11458
11459 2018-04-03 Richard Biener <rguenther@suse.de>
11460
11461 * sese.h (recompute_all_dominators): Remove.
11462
11463 2018-04-02 Martin Sebor <msebor@redhat.com>
11464
11465 * doc/invoke.texi (-Wrestrict): Fix typos.
11466
11467 2018-04-02 Jim Wilson <jimw@sifive.com>
11468
11469 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11470 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11471 (<optab>di3, <optab>si3_extend): Likewise.
11472 (<optab>si3_mask, <optab>si3_mask_1): New.
11473 (<optab>di3_mask, <optab>di3_mask_1): New.
11474 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11475 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11476 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11477
11478 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
11479
11480 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11481 example.
11482
11483 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
11484
11485 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11486 (nds32_canonicalize_comparison): New function.
11487
11488 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11489 Kito Cheng <kito.cheng@gmail.com>
11490 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11491
11492 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11493 * config/nds32/constants.md (unspec_volatile_element): Add
11494 UNSPEC_VOLATILE_RELAX_GROUP.
11495 * config/nds32/nds32-relax-opt.c: New file.
11496 * config/nds32/nds32-predicates.c
11497 (nds32_symbol_load_store_p): New function.
11498 * config/nds32/nds32-protos.h
11499 (nds32_symbol_load_store_p): Declare function.
11500 (make_pass_nds32_relax_opt): Declare new rtl pass function.
11501 * config/nds32/nds32.c
11502 (nds32_register_pass): New function to register pass.
11503 (nds32_register_passes): New function to register passes.
11504 * config/nds32/nds32.md (relax_group): New pattern.
11505 * config/nds32/nds32.opt (mrelax-hint): New option.
11506 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11507
11508 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
11509
11510 * config/nds32/t-nds32: Modify files dependency.
11511
11512 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11513
11514 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11515 (PROFILE_HOOK): Define its implementation.
11516
11517 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11518
11519 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11520 type and 32-bit size.
11521
11522 2018-04-01 Jakub Jelinek <jakub@redhat.com>
11523
11524 PR middle-end/85090
11525 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11526 (V_128_256): New mode iterator.
11527 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11528 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11529 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11530 of V.
11531 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11532 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11533
11534 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
11535
11536 PR target/83315
11537 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11538 NaN inputs correctly.
11539
11540 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
11541
11542 PR target/80546
11543 * config/rs6000/vsx.md (??r): New mode attribute.
11544 (*vsx_mov<mode>_64bit): Use it.
11545 (*vsx_mov<mode>_32bit): Likewise.
11546
11547 2018-03-30 Martin Sebor <msebor@redhat.com>
11548
11549 PR tree-optimization/84818
11550 * builtins.c (check_access): Use warning_n.
11551
11552 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11553
11554 PR target/83822
11555 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11556 condition.
11557 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11558 condition.
11559
11560 2018-03-30 Julia Koval <julia.koval@intel.com>
11561
11562 PR target/84413
11563 * x86-tune.def (movx, partial_reg_dependency): Enable for
11564 m_SKYLAKE_AVX512.
11565
11566 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
11567
11568 PR inline-asm/84985
11569 * lra-constraints.c (process_alt_operands): Move setting
11570 this_alternative_matches below.
11571
11572 2018-03-29 Martin Liska <mliska@suse.cz>
11573
11574 PR lto/84995.
11575 * doc/invoke.texi: Document how LTO works with debug info.
11576 Describe auto-load support of binutils. Mention 'x86-64'
11577 as valid option value of -march option.
11578
11579 2018-03-29 Jakub Jelinek <jakub@redhat.com>
11580
11581 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11582
11583 PR c/85094
11584 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11585 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11586 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11587 checking.
11588
11589 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11590
11591 PR target/84912
11592 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11593 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11594 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11595 for RS6000_BTM_POWERPC64.
11596 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11597 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11598 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11599 definition.
11600 (DIVDE): Use it.
11601 (DIVDEU): Likewise.
11602
11603 2018-03-28 Carl Love <cel@us.ibm.com>
11604
11605 Revert
11606 2017-09-27 Carl Love <cel@us.ibm.com>
11607
11608 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11609 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11610 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11611 fctiw instruction.
11612
11613 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11614
11615 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11616 instead of __vector bool.
11617 (_mm_max_pu8): Likewise.
11618 (_mm_min_pi16): Likewise.
11619
11620 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11621
11622 PR target/84912
11623 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11624 (DIVWEUO): Likewise.
11625 (DIVDEO): Likewise.
11626 (DIVDEUO): Likewise.
11627 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11628 DIVWEUO and DIVDEUO.
11629 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11630 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11631 (div_extend): Likewise.
11632 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11633 builtin function.
11634 (__builtin_divweuo): Likewise.
11635 (__builtin_divdeo): Likewise.
11636 (__builtin_divdeuo): Likewise.
11637
11638 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11639
11640 PR target/85095
11641 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11642 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11643
11644 PR tree-optimization/82004
11645 * gimple-match-head.c (optimize_pow_to_exp): New function.
11646 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11647 Don't fold to exp if optimize_pow_to_exp is false.
11648
11649 2018-03-28 Martin Liska <mliska@suse.cz>
11650
11651 PR other/84819
11652 * calls.c (initialize_argument_information): Fix trailing space.
11653 * common.opt: Fix typo and provide better explanation for
11654 -fsanitize-coverage option.
11655 * config/i386/i386.opt: Fix typo.
11656
11657 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11658 Martin Liska <mliska@suse.cz>
11659
11660 PR sanitizer/85081
11661 * gimplify.c (asan_poison_variable): Don't do the check for
11662 gimplify_omp_ctxp here.
11663 (gimplify_decl_expr): Do it here.
11664 (gimplify_target_expr): Likewise.
11665
11666 2018-03-28 Martin Liska <mliska@suse.cz>
11667
11668 PR target/84988
11669 * config/i386/i386.c (ix86_function_arg_advance): Do not call
11670 chkp_type_bounds_count if MPX is not enabled.
11671
11672 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
11673
11674 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11675
11676 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
11677
11678 PR target/84914
11679 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11680 function to create the function decl for complex long double
11681 multiply and divide for -mabi=ieeelongdouble.
11682 (init_float128_ieee): Call it.
11683
11684 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
11685
11686 PR target/85044
11687 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11688 -fcf-protection=branch -mibt.
11689 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11690
11691 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11692
11693 PR target/81863
11694 * config/arm/arm.c (arm_valid_symbolic_address): Handle
11695 arm_word_relocations.
11696
11697 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
11698
11699 PR target/85056
11700 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11701 extern array declarations.
11702
11703 2018-03-27 Richard Biener <rguenther@suse.de>
11704
11705 PR middle-end/84067
11706 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11707 explicit single_use checks.
11708
11709 2018-03-27 Richard Biener <rguenther@suse.de>
11710
11711 PR tree-optimization/85082
11712 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11713 Valueize the VUSE.
11714
11715 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11716
11717 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11718 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11719 Turn on fasynchronous-unwind-tables and funwind-tables.
11720
11721 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
11722
11723 PR target/85073
11724 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11725 (*bmi_blsr_<mode>_ccz): Ditto.
11726
11727 2018-03-26 Tom de Vries <tom@codesourcery.com>
11728
11729 PR tree-optimization/85063
11730 * omp-general.c (offloading_function_p): New function. Factor out
11731 of ...
11732 * omp-offload.c (pass_omp_target_link::gate): ... here.
11733 * omp-general.h (offloading_function_p): Declare.
11734 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11735 with attribute omp declare target for offloading functions.
11736
11737 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11738
11739 PR tree-optimization/84005
11740 * tree-data-ref.h (get_base_for_alignment): Declare.
11741 * tree-data-ref.c (get_base_for_alignment_1): New function.
11742 (get_base_for_alignment): Likewise.
11743 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11744 get_base_for_alignment to find a suitable base object, instead
11745 of always using drb->base_address.
11746
11747 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11748
11749 PR inline-asm/85022
11750 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11751 known size by default.
11752
11753 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11754
11755 PR inline-asm/85030
11756 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11757 and non BLKmode operands.
11758
11759 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11760
11761 PR target/85026
11762 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11763 Clean up attributes.
11764
11765 2018-03-23 Richard Biener <rguenther@suse.de>
11766
11767 PR debug/85020
11768 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11769 we are going to emit early debug for LTO.
11770
11771 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11772
11773 PR inline-asm/85034
11774 * function.c (match_asm_constraints_1): Don't optimize if input
11775 doesn't satisfy general_operand predicate for output's mode.
11776
11777 PR inline-asm/85022
11778 * alias.c (write_dependence_p): Don't require for x_canonicalized
11779 non-VOIDmode if x has VOIDmode.
11780
11781 PR sanitizer/85029
11782 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11783 just don't try to optimize it rather than assert it never happens.
11784
11785 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11786
11787 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11788 macro expansions for definition of ST_INTERNAL_<mode> and
11789 LD_INTERNAL_<mode> builtins.
11790 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11791 Remove prototype.
11792 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11793 function.
11794 (altivec_expand_st_builtin): Likewise.
11795 (altivec_expand_builtin): Remove calls to deleted functions.
11796 (rs6000_address_for_altivec): Delete this function.
11797 * config/rs6000/vector.md: Remove expands for
11798 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11799
11800 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11801
11802 PR target/84826
11803 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11804 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11805 re-computing once computed.
11806 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11807 (arm_init_machine_status): Initialize
11808 machine->static_chain_stack_bytes.
11809
11810 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11811
11812 PR target/84760
11813 * doc/extend.texi: Add four new prototypes for vec_ld.
11814 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11815 definitions for more logical presentation.
11816 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11817 entries for V1TI variants of __builtin_altivec_ld builtin.
11818 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11819 handling of V1TI variant of LVX icode pattern.
11820 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11821 (rs6000_gimple_fold_builtin): Likewise.
11822 (altivec_init_builtins): Add code to define
11823 __builtin_altivec_lvx_v1ti function.
11824
11825 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11826
11827 PR inline-asm/84941
11828 * function.c (match_asm_constraints_1): Don't do the optimization
11829 if input isn't a REG, SUBREG, MEM or constant.
11830
11831 2018-03-22 Tom de Vries <tom@codesourcery.com>
11832
11833 PR tree-optimization/84956
11834 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11835 bb_has_abnormal_pred.
11836
11837 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11838
11839 PR sanitizer/85018
11840 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11841 DECL_INITIAL (decl) to decl at the end.
11842 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11843 adjust the comment.
11844
11845 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11846
11847 * doc/extend.texi (__builtin_tgmath): Document when complex
11848 integer types are treated as _Complex _Float64.
11849
11850 2018-03-21 Tom de Vries <tom@codesourcery.com>
11851
11852 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11853
11854 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11855
11856 PR tree-optimization/84960
11857 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11858 if it is ENTRY block, move them into single succ of ENTRY in that case.
11859
11860 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11861
11862 PR tree-optimization/84811
11863 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11864 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11865 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11866 (known_subrange_p): Update accordingly. Cast each value involved
11867 in the size comparison, rather than casting the result of the
11868 subtraction.
11869
11870 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11871
11872 PR tree-optimization/84982
11873 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11874 by flipping the least significant bit rather than all bits from
11875 bitpos to bitpos + bitsize - 1.
11876
11877 2018-03-21 Nathan Sidwell <nathan@acm.org>
11878
11879 * doc/extend.texi (Deprecated Features): Remove mention of
11880 long-deleted deprecations.
11881
11882 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11883
11884 PR jit/84288
11885 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11886 * configure: Regenerate.
11887
11888 2018-03-21 Tom de Vries <tom@codesourcery.com>
11889
11890 PR tree-optimization/83126
11891 * tree-parloops.c (num_phis): New function.
11892 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11893
11894 2018-03-21 Nathan Sidwell <nathan@acm.org>
11895
11896 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11897 mention anon-struct/union members and trailing attributes.
11898
11899 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11900
11901 PR tree-optimization/84969
11902 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11903 builtin memset partitions if they set different rhs values.
11904
11905 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11906
11907 PR rtl-optimization/84989
11908 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11909 VEC_DUPLICATE with scalar result mode.
11910
11911 2018-03-21 Martin Liska <mliska@suse.cz>
11912
11913 PR ipa/84963
11914 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11915 not intended return statement.
11916
11917 2018-03-21 Martin Liska <mliska@suse.cz>
11918
11919 PR target/84988
11920 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11921 (chkp_find_bound_slots_1): Limit number of iterations.
11922
11923 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11924
11925 PR target/84838
11926 * Minor grammar fixes for x86 options.
11927
11928 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11929
11930 PR debug/84875
11931 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11932 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11933
11934 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11935
11936 PR target/83789
11937 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11938 (altivec_lvx_<mode>_1op): Likewise.
11939 (altivec_stvx_<mode>_2op): Likewise.
11940 (altivec_stvx_<mode>_1op): Likewise.
11941 (altivec_lvx_<VM2:mode>): New define_expand.
11942 (altivec_stvx_<VM2:mode>): Likewise.
11943 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11944 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11945 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11946 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11947 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11948 (rs6000_gen_lvx): Likewise.
11949 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11950 (altivec_expand_stv_builtin): Likewise.
11951 (altivec_expand_builtin): Likewise.
11952 * config/rs6000/vector.md: Likewise.
11953
11954 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11955
11956 PR target/82518
11957 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11958 BYTES_BIG_ENDIAN.
11959
11960 2018-03-20 Richard Biener <rguenther@suse.de>
11961
11962 PR target/84986
11963 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11964 sign-conversions as zero, fall back to standard scalar_stmt
11965 cost for the rest.
11966
11967 2018-03-20 Martin Liska <mliska@suse.cz>
11968
11969 PR ipa/84825
11970 * predict.c (rebuild_frequencies): Handle case when we have
11971 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11972
11973 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11974
11975 PR target/84990
11976 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11977 flag_section_anchors.
11978 * varasm.c (use_blocks_for_decl_p): Remove hack for
11979 dw2_force_const_mem.
11980
11981 PR target/84845
11982 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11983 to ...
11984 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11985 be created, use lowpart_subreg of operands[0] rather than operands[0]
11986 itself.
11987 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11988 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11989 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11990 and n constraint instead of aarch64_shift_imm_di and Usd.
11991 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11992 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11993
11994 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11995
11996 PR target/82989
11997 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11998 to favor GPR over NEON registers.
11999 (<shift>di3_neon): Likewise.
12000
12001 2018-03-20 Tom de Vries <tom@codesourcery.com>
12002
12003 PR target/84952
12004 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12005 (nvptx_process_pars): Emit bar.sync asap and alap.
12006
12007 2018-03-20 Tom de Vries <tom@codesourcery.com>
12008
12009 PR target/84954
12010 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12011 seen_label if seen_label is already set.
12012
12013 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12014
12015 PR target/84945
12016 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12017 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12018 Use 1U instead of 1. Formatting fixes.
12019
12020 PR c/84953
12021 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12022 instead of TREE_TYPE (s1) for the return value.
12023
12024 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12025
12026 PR tree-optimization/84946
12027 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12028 bitsize + bitsize in poly_uint64 rather than poly_int64.
12029
12030 PR sanitizer/78651
12031 * dwarf2asm.c: Include fold-const.c.
12032 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12033 of decl rather than decl itself.
12034
12035 PR rtl-optimization/84643
12036 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12037
12038 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12039
12040 PR sanitizer/78651
12041 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12042 calling assemble_variable.
12043
12044 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12045
12046 PR target/81647
12047 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12048 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12049
12050 2018-03-19 Jim Wilson <jimw@sifive.com>
12051
12052 PR bootstrap/84856
12053 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12054 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12055 (riscv_first_stack_step): Likewise.
12056 (riscv_option_override): Use STACK_BOUNDARY instead of
12057 MIN_STACK_BOUNDARY.
12058 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12059 MIN_STACK_BOUNDARY.
12060 (BIGGEST_ALIGNMENT): Set to 128.
12061 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12062 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12063 STACK_BOUNDARY.
12064
12065 2018-03-19 Richard Biener <rguenther@suse.de>
12066
12067 PR tree-optimization/84933
12068 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12069 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12070
12071 2018-03-19 Richard Biener <rguenther@suse.de>
12072
12073 PR tree-optimization/84859
12074 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12075 (cond_if_else_store_replacement): Perform sinking operation on
12076 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12077 Generalize what a BB with a single eligible store is.
12078
12079 2018-03-19 Richard Biener <rguenther@suse.de>
12080
12081 PR tree-optimization/84929
12082 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12083 chrec_is_positive against non-chrec arg.
12084
12085 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12086
12087 PR target/84711
12088 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12089
12090 2018-03-18 Martin Liska <mliska@suse.cz>
12091
12092 PR rtl-optimization/84635
12093 * regrename.c (build_def_use): Use matches_mode only when
12094 matches >= 0.
12095
12096 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12097
12098 PR tree-optimization/84913
12099 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12100 vectorize chains of COND_EXPRs.
12101
12102 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12103
12104 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12105
12106 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12107
12108 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12109
12110 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12111
12112 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12113
12114 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12115 Kito Cheng <kito.cheng@gmail.com>
12116
12117 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12118 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12119 (nds32_adjust_reg_alloc_order): New function.
12120 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12121
12122 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12123
12124 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12125 nds32_print_operand, nds32_print_operand_address): Use
12126 HOST_WIDE_INT_PRINT_DEC instead.
12127
12128 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12129
12130 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12131
12132 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12133
12134 PR target/84902
12135 * config/i386/i386.c (initial_ix86_tune_features,
12136 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12137 unsigned long long.
12138 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12139 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12140 rather than 1u << ix86_tune. Formatting fix.
12141 (ix86_option_override_internal): Change ix86_arch_mask from
12142 unsigned int to unsigned HOST_WIDE_INT, initialize to
12143 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12144 (ix86_function_specific_restore): Likewise.
12145
12146 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12147
12148 PR target/84899
12149 * postreload.c (reload_combine_recognize_pattern): Perform
12150 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12151 truncate_int_for_mode the result for the destination's mode.
12152
12153 PR c/84909
12154 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12155 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12156 Likewise.
12157 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12158 Likewise.
12159
12160 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12161
12162 PR target/84876
12163 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12164 regno_allocno_class_array and sorted_pseudos.
12165 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12166 insns where regno is used.
12167
12168 2018-03-16 Martin Liska <mliska@suse.cz>
12169
12170 PR ipa/84833
12171 * multiple_target.c (create_dispatcher_calls): Redirect
12172 reference in the symbol table.
12173
12174 2018-03-16 Martin Liska <mliska@suse.cz>
12175
12176 PR ipa/84722
12177 * multiple_target.c (create_dispatcher_calls): Redirect also
12178 an alias.
12179
12180 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12181
12182 PR c++/79937
12183 PR c++/82410
12184 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12185 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12186 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12187
12188 2018-03-16 Julia Koval <julia.koval@intel.com>
12189
12190 * doc/invoke.texi (Skylake Server): Add CLWB.
12191 Cannonlake): Remove CLWB.
12192
12193 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12194
12195 PR tree-optimization/84841
12196 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12197 1 << 3.
12198 (FLOAT_ONE_CONST_TYPE): Define.
12199 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12200 (sort_by_operand_rank): Put entries with higher constant_type last
12201 rather than first to match comments.
12202
12203 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12204
12205 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12206 split predicate.
12207
12208 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12209
12210 PR c++/79085
12211 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12212 check and use address of target always.
12213
12214 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12215
12216 PR target/84574
12217 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12218 (indirect_thunk_bnd_needed): Likewise.
12219 (indirect_thunks_used): Likewise.
12220 (indirect_thunks_bnd_used): Likewise.
12221 (indirect_return_needed): New.
12222 (indirect_return_bnd_needed): Likewise.
12223 (output_indirect_thunk_function): Add a bool argument for
12224 function return.
12225 (output_indirect_thunk_function): Don't generate alias for
12226 function return thunk.
12227 (ix86_code_end): Call output_indirect_thunk_function to generate
12228 function return thunks.
12229 (ix86_output_function_return): Set indirect_return_bnd_needed
12230 and indirect_return_needed instead of indirect_thunk_bnd_needed
12231 and indirect_thunk_needed.
12232
12233 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12234
12235 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12236 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12237 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12238
12239 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12240 Paul Hua <paul.hua.gm@gmail.com>
12241
12242 PR c/84852
12243 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12244
12245 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12246
12247 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12248 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12249 resp. SFmode cases.
12250
12251 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12252
12253 PR target/84711
12254 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12255 instead of GET_MODE_SIZE when comparing Units.
12256
12257 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12258
12259 PR target/68256
12260 * varasm.c (hash_section): Return an unchangeble hash value
12261 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12262 Return !aarch64_can_use_per_function_literal_pools_p ().
12263
12264 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12265
12266 PR target/84860
12267 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12268 rather than address of cmode as last argument to prepare_cmp_insn.
12269
12270 2018-03-15 Julia Koval <julia.koval@intel.com>
12271
12272 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12273 F_AVX512VNNI, F_AVX512BITALG): New.
12274
12275 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12276
12277 PR target/83451
12278 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12279 insn for floating-point loads and stores.
12280
12281 2018-03-14 Carl Love <cel@us.ibm.com>
12282
12283 * config/rs6000/rs6000-c.c: Add macro definitions for
12284 ALTIVEC_BUILTIN_VEC_PERMXOR.
12285 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12286 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12287 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12288 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12289 UNSPEC_VPERMXOR.
12290 * config/doc/extend.texi: Add prototypes for vec_permxor.
12291
12292 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12293
12294 PR c/84852
12295 * diagnostic-show-locus.c (class layout_point): Convert m_line
12296 from int to linenum_type.
12297 (line_span::comparator): Use linenum "compare" function when
12298 comparing line numbers.
12299 (test_line_span): New function.
12300 (layout_range::contains_point): Convert param "row" from int to
12301 linenum_type.
12302 (layout_range::intersects_line_p): Likewise.
12303 (layout::will_show_line_p): Likewise.
12304 (layout::print_source_line): Likewise.
12305 (layout::should_print_annotation_line_p): Likewise.
12306 (layout::print_annotation_line): Likewise.
12307 (layout::print_leading_fixits): Likewise.
12308 (layout::annotation_line_showed_range_p): Likewise.
12309 (struct line_corrections): Likewise for field m_row.
12310 (line_corrections::line_corrections): Likewise for param "row".
12311 (layout::print_trailing_fixits): Likewise.
12312 (layout::get_state_at_point): Likewise.
12313 (layout::get_x_bound_for_row): Likewise.
12314 (layout::print_line): Likewise.
12315 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12316 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12317 * input.c (selftest::test_linenum_comparisons): New function.
12318 (selftest::input_c_tests): Call it.
12319 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12320 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12321 * selftest.h (ASSERT_GT): New macro.
12322 (ASSERT_GT_AT): New macro.
12323 (ASSERT_LT): New macro.
12324 (ASSERT_LT_AT): New macro.
12325
12326 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12327
12328 PR rtl-optimization/84780
12329 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12330
12331 2018-03-14 Martin Liska <mliska@suse.cz>
12332
12333 * tree.c (record_node_allocation_statistics): Use
12334 get_stats_node_kind.
12335 (get_stats_node_kind): New function extracted from
12336 record_node_allocation_statistics.
12337 (free_node): Use get_stats_node_kind.
12338
12339 2018-03-14 Richard Biener <rguenther@suse.de>
12340
12341 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12342 that the value-set of ANTIC_IN doesn't grow.
12343
12344 Revert
12345 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12346 member.
12347 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12348 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12349
12350 2018-03-14 Julia Koval <julia.koval@intel.com>
12351
12352 * config.gcc (icelake-client, icelake-server): New.
12353 (icelake): Remove.
12354 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12355 (initial_ix86_arch_features): Ditto.
12356 (PTA_SKYLAKE): Add SGX.
12357 (PTA_ICELAKE): Remove.
12358 (PTA_ICELAKE_CLIENT): New.
12359 (PTA_ICELAKE_SERVER): New.
12360 (ix86_option_override_internal): Split up icelake on icelake client and
12361 icelake server.
12362 (get_builtin_code_for_version): Ditto.
12363 (fold_builtin_cpu): Ditto.
12364 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12365 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12366 * config/i386/i386.h (processor_type): Ditto.
12367 * doc/invoke.texi: Ditto.
12368
12369 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12370
12371 PR sanitizer/83392
12372 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12373 INTEGER_CST offset, add it together with bitpos / 8 and
12374 sign extend based on POINTER_SIZE.
12375
12376 PR target/84844
12377 Revert
12378 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12379
12380 PR target/78090
12381 * config/i386/constraints.md (Yc): New register constraint.
12382 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12383 Use Yc constraint for alternative 2 of operand 0. Remove
12384 preferred_for_speed attribute.
12385
12386 2018-03-14 Richard Biener <rguenther@suse.de>
12387
12388 PR tree-optimization/84830
12389 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12390 with the old one to avoid oscillations.
12391
12392 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
12393
12394 PR target/83712
12395 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12396 pseudos.
12397 (assign_by_spills): Return a flag of reload assignment failure.
12398 Do not process the reload assignment failures. Do not spill other
12399 reload pseudos if they has the same reg class. Update n if
12400 necessary.
12401 (lra_assign): Add a return arg. Set up from the result of
12402 assign_by_spills call.
12403 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12404 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12405 usage_insns if it is not NULL.
12406 (spill_hard_reg_in_range): New function.
12407 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12408 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12409 function prototypes.
12410 (lra_assign): Change prototype.
12411 * lra.c (lra): Add code to deal with fails by splitting hard reg
12412 live ranges.
12413
12414 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
12415
12416 * config/riscv/riscv.opt (mrelax): New option.
12417 * config/riscv/riscv.c (riscv_file_start): Emit ".option
12418 "norelax" when riscv_mrelax is disabled.
12419 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12420
12421 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12422
12423 PR target/84743
12424 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12425 reassociation for int modes.
12426
12427 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12428
12429 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12430 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12431 for big-endian.
12432 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12433 * config/aarch64/aarch64-sve.md
12434 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12435 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12436 (*extend<mode><Vwide>2): Rename to...
12437 (aarch64_sve_extend<mode><Vwide>2): ...this.
12438 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12439 renaming the old pattern to...
12440 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
12441 unsigned packs.
12442 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12443 define_expand, renaming the old pattern to...
12444 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12445 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12446 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12447 account when deciding which SVE instruction the optab should use.
12448 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12449
12450 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12451
12452 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12453 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12454 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12455 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12456 (tlsdesc_small_<mode>): Turn a define_expand and use
12457 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
12458 (tlsdesc_small_advsimd_<mode>): ...this.
12459 (tlsdesc_small_sve_<mode>): New pattern.
12460
12461 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12462
12463 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12464 (UNSPEC_UMUL_HIGHPART): New constants.
12465 (MUL_HIGHPART): New int iteraor.
12466 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12467 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12468 define_expand.
12469 (*<su>mul<mode>3_highpart): New define_insn.
12470
12471 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12472
12473 PR lto/84805
12474 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12475 incomplete types.
12476
12477 2018-03-13 Martin Liska <mliska@suse.cz>
12478
12479 PR ipa/84658.
12480 * (sem_item_optimizer::sem_item_optimizer): Initialize new
12481 vector.
12482 (sem_item_optimizer::~sem_item_optimizer): Release it.
12483 (sem_item_optimizer::merge_classes): Register variable aliases.
12484 (sem_item_optimizer::fixup_pt_set): New function.
12485 (sem_item_optimizer::fixup_points_to_sets): Likewise.
12486 * ipa-icf.h: Declare new variables and functions.
12487
12488 2018-03-13 Jakub Jelinek <jakub@redhat.com>
12489
12490 PR middle-end/84834
12491 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12492 integer_pow2p@2 and test integer_pow2p in condition.
12493 (A < 0 ? C : 0): Similarly for @1.
12494
12495 PR middle-end/84831
12496 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12497 characters starting at p contain '\0' character, don't look beyond
12498 that.
12499
12500 PR target/84827
12501 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12502 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12503
12504 PR target/84828
12505 * reg-stack.c (change_stack): Change update_end var from int to
12506 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12507 also call set_block_for_insn on the newly added insns and rescan.
12508
12509 PR target/84786
12510 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12511 on the last operand.
12512
12513 PR c++/84704
12514 * tree.c (stabilize_reference_1): Return save_expr (e) for
12515 STATEMENT_LIST even if it doesn't have side-effects.
12516
12517 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
12518
12519 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12520
12521 2018-03-12 Renlin Li <renlin.li@arm.com>
12522
12523 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12524 aarch64_output_scalar_simd_mov_immediate.
12525
12526 2018-03-12 Martin Sebor <msebor@redhat.com>
12527
12528 PR tree-optimization/83456
12529 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12530 for perfectly overlapping calls to memcpy.
12531 (gimple_fold_builtin_memory_chk): Same.
12532 (gimple_fold_builtin_strcpy): Handle no-warning.
12533 (gimple_fold_builtin_stxcpy_chk): Same.
12534 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12535
12536 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12537
12538 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12539 parameter. Use it for SFmode.
12540 (rs6000_function_arg_advance_1): Adjust.
12541 (rs6000_function_arg): Adjust.
12542 (rs6000_gimplify_va_arg): Pass false for that new parameter.
12543
12544 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12545
12546 PR rtl-optimization/84169
12547 PR rtl-optimization/84780
12548 * combine.c (can_combine_p): Check for a 2-insn combination whether
12549 the destination register is used between the two insns, too.
12550
12551 2018-03-12 Richard Biener <rguenther@suse.de>
12552
12553 PR tree-optimization/84803
12554 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12555 for refs DR analysis didn't process.
12556
12557 2018-03-12 Richard Biener <rguenther@suse.de>
12558
12559 PR tree-optimization/84777
12560 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12561 force-vectorize loops ignore whether we are optimizing for size.
12562
12563 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
12564
12565 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12566 (TARGET_MD_ASM_ADJUST): Define.
12567
12568 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
12569 Kito Cheng <kito.cheng@gmail.com>
12570 Chung-Ju Wu <jasonwucj@gmail.com>
12571
12572 * config/nds32/nds32.c (nds32_compute_stack_frame,
12573 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12574 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12575 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12576 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12577 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12578 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12579 * config/nds32/nds32.md (prologue, epilogue): Use macro
12580 NDS32_V3PUSH_AVAILABLE_P to do checking.
12581
12582 2018-03-11 Jakub Jelinek <jakub@redhat.com>
12583
12584 PR debug/58150
12585 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12586 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12587 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
12588 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
12589 addition of most attributes on !orig_type_die or the attribute not
12590 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12591
12592 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12593 Chung-Ju Wu <jasonwucj@gmail.com>
12594
12595 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12596 __NDS32_VH__ macro.
12597 * config/nds32/nds32.opt (mvh): New option.
12598
12599 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12600 Chung-Ju Wu <jasonwucj@gmail.com>
12601
12602 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12603 function.
12604 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12605 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12606 definition.
12607
12608 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12609 Chung-Ju Wu <jasonwucj@gmail.com>
12610
12611 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12612 function.
12613 * config/nds32/nds32-multiple.md (strlensi): New pattern.
12614 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12615
12616 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12617 Kito Cheng <kito.cheng@gmail.com>
12618 Chung-Ju Wu <jasonwucj@gmail.com>
12619
12620 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12621 UNSPEC_FFMISM and UNSPEC_FLMISM.
12622 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12623 for ffb, ffmism and flmism.
12624 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12625 (unspec_ffmism): Ditto.
12626 (unspec_flmism): Ditto.
12627 (nds32_expand_builtin_impl): Check if string extension is available.
12628 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12629 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12630
12631 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12632
12633 Reverting patch:
12634 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12635
12636 PR target/83712
12637 * lra-assigns.c (assign_by_spills): Return a flag of reload
12638 assignment failure. Do not process the reload assignment
12639 failures. Do not spill other reload pseudos if they has the same
12640 reg class.
12641 (lra_assign): Add a return arg. Set up from the result of
12642 assign_by_spills call.
12643 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12644 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12645 usage_insns if it is not NULL.
12646 (spill_hard_reg_in_range): New function.
12647 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12648 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12649 function prototypes.
12650 (lra_assign): Change prototype.
12651 * lra.c (lra): Add code to deal with fails by splitting hard reg
12652 live ranges.
12653
12654 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
12655
12656 PR target/84807
12657 * config/i386/i386.opt: Replace Enforcment with Enforcement.
12658
12659 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
12660
12661 PR debug/84620
12662 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12663 (dw_val_node): Add val_symbolic_view.
12664 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12665 (symview_upper_bound): New.
12666 (new_line_info_table): Initialize symviews_since_reset.
12667 (dwarf2out_source_line): Count symviews_since_reset and set
12668 symview_upper_bound.
12669 (dw_val_equal_p): Handle symview.
12670 (add_AT_symview): New.
12671 (print_dw_val): Handle symview.
12672 (attr_checksum, attr_checksum_ordered): Likewise.
12673 (same_dw_val_p, size_of_die): Likewise.
12674 (value_format, output_die): Likewise.
12675 (add_high_low_attributes): Use add_AT_symview for entry_view.
12676 (dwarf2out_finish): Reset symview_upper_bound, clear
12677 zero_view_p.
12678
12679 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
12680
12681 PR target/83969
12682 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12683 Add strict argument and use it.
12684 (rs6000_split_multireg_move): Update for new strict argument.
12685 (mem_operand_gpr): Disallow all non-offsettable addresses.
12686 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12687
12688 2018-03-09 Jakub Jelinek <jakub@redhat.com>
12689
12690 PR target/84772
12691 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12692 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12693 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12694
12695 PR c++/84767
12696 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12697 decl, use remap_type if we want to use the type.
12698
12699 2018-03-09 Martin Sebor <msebor@redhat.com>
12700
12701 PR tree-optimization/84526
12702 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12703 Remove dead code.
12704 (builtin_access::generic_overlap): Be prepared to handle non-array
12705 base objects.
12706
12707 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
12708
12709 PR rtl-optimization/84682
12710 * lra-constraints.c (process_address_1): Check is_address flag
12711 for address constraints.
12712 (process_alt_operands): Likewise.
12713 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12714 preprocess_constraints.
12715 * recog.h (preprocess_constraints): Add oploc parameter.
12716 Adjust callers.
12717 * recog.c (preprocess_constraints): Test address_operand for
12718 CT_ADDRESS constraints.
12719
12720 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12721
12722 PR target/83712
12723 * lra-assigns.c (assign_by_spills): Return a flag of reload
12724 assignment failure. Do not process the reload assignment
12725 failures. Do not spill other reload pseudos if they has the same
12726 reg class.
12727 (lra_assign): Add a return arg. Set up from the result of
12728 assign_by_spills call.
12729 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12730 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12731 usage_insns if it is not NULL.
12732 (spill_hard_reg_in_range): New function.
12733 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12734 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12735 function prototypes.
12736 (lra_assign): Change prototype.
12737 * lra.c (lra): Add code to deal with fails by splitting hard reg
12738 live ranges.
12739
12740 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12741
12742 PR target/83193
12743 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12744 Accept complain bool parameter. Only emit errors if it is true.
12745 (arm_parse_cpu_option_name): Likewise.
12746 (arm_target_thumb_only): Adjust callers of the above.
12747 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12748 prototype to take a default true bool parameter.
12749 (arm_parse_arch_option_name): Likewise.
12750
12751 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12752 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12753
12754 PR jit/64089
12755 PR jit/84288
12756 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12757 * configure: Regenerate.
12758 * configure.ac ("linker --version-script option"): New.
12759 ("linker soname option"): New.
12760
12761 2018-03-09 Richard Biener <rguenther@suse.de>
12762
12763 PR tree-optimization/84775
12764 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12765 immediate uses of predicate stmts and mark them modified.
12766
12767 Revert
12768 PR tree-optimization/84178
12769 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12770 to caller.
12771 (version_loop_for_if_conversion): Delay update_ssa call.
12772 (tree_if_conversion): Delay update_ssa until after predicate
12773 insertion.
12774
12775 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12776
12777 PR target/84763
12778 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12779 when the function accesses prior frames.
12780
12781 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12782
12783 PR debug/84456
12784 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12785 gen_llsym, otherwise call maybe_gen_llsym.
12786
12787 PR inline-asm/84742
12788 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12789 has ',' character inside of it.
12790
12791 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12792
12793 PR target/84748
12794 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12795 as clobbering CC_REGNUM.
12796
12797 2018-03-08 Richard Biener <rguenther@suse.de>
12798
12799 PR middle-end/84552
12800 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12801 (follow_copies_to_constant): Do not follow SSA names registered
12802 for update.
12803
12804 2018-03-08 Richard Biener <rguenther@suse.de>
12805
12806 PR tree-optimization/84178
12807 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12808 to caller.
12809 (version_loop_for_if_conversion): Delay update_ssa call.
12810 (tree_if_conversion): Delay update_ssa until after predicate
12811 insertion.
12812
12813 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12814
12815 PR tree-optimization/84178
12816 * tree-if-conv.c (release_bb_predicate): Remove the
12817 the assertion that the stmts have NULL use_ops.
12818 Discard the statements, asserting that they haven't
12819 yet been added to a BB.
12820
12821 2018-03-08 Richard Biener <rguenther@suse.de>
12822
12823 PR tree-optimization/84746
12824 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12825 (phi_translate): Pass in destination ANTIC_OUT set.
12826 (phi_translate_1): Likewise. For a simplified result lookup
12827 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12828 (phi_translate_set): Adjust.
12829 (do_pre_regular_insertion): Likewise.
12830 (do_pre_partial_partial_insertion): Likewise.
12831
12832 2018-03-08 Martin Liska <mliska@suse.cz>
12833
12834 PR gcov-profile/84735
12835 * doc/gcov.texi: Document usage of profile files.
12836 * gcov-io.h: Document changes in the format.
12837
12838 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12839
12840 PR debug/84404
12841 PR debug/84408
12842 * dwarf2out.c (struct dw_line_info_table): Update comments for
12843 view == -1.
12844 (FORCE_RESET_NEXT_VIEW): New.
12845 (FORCE_RESETTING_VIEW_P): New.
12846 (RESETTING_VIEW_P): Check for -1 too.
12847 (ZERO_VIEW_P): Likewise.
12848 (new_line_info_table): Force-reset next view.
12849 (dwarf2out_begin_function): Likewise.
12850 (dwarf2out_source_line): Simplify zero_view_p initialization.
12851 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12852 view directly. Omit view when omitting .loc at line 0.
12853
12854 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12855
12856 PR tree-optimization/84740
12857 * tree-switch-conversion.c (process_switch): Call build_constructors
12858 only if info.phi_count is non-zero.
12859
12860 PR tree-optimization/84739
12861 * tree-tailcall.c (find_tail_calls): Check call arguments against
12862 DECL_ARGUMENTS (current_function_decl) rather than
12863 DECL_ARGUMENTS (func) when checking for tail recursion.
12864
12865 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12866
12867 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12868 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12869 Volker Reichelt's entry and add entries for people that perform
12870 GCC fuzzy testing and report numerous bugs.
12871
12872 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12873
12874 PR target/82411
12875 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12876 readonly data in sdata, if that is disabled.
12877 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12878 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12879 -mreadonly-in-sdata option.
12880
12881 2018-03-07 Martin Sebor <msebor@redhat.com>
12882
12883 PR tree-optimization/84468
12884 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12885 basic block when looking for nul assignment.
12886
12887 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12888
12889 PR target/84277
12890 * except.h (output_function_exception_table): Adjust prototype.
12891 * except.c (output_function_exception_table): Remove FNNAME parameter
12892 and add SECTION parameter. Ouput one part of the table at a time.
12893 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12894 the first part of the exception table and emit unwind directives.
12895 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12896 (i386_pe_seh_cold_init): Likewise.
12897 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12898 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12899 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12900 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12901 * config/i386/winnt.c: Include except.h.
12902 (struct seh_frame_state): Add reg_offset, after_prologue and
12903 in_cold_section fields.
12904 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12905 (i386_pe_seh_cold_init): New function.
12906 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12907 to seh->in_cold_section.
12908 (seh_emit_push): Record the offset of the push.
12909 (seh_emit_save): Record the offet of the save.
12910 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12911 Test seh->after_prologue to disregard the epilogue.
12912 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12913 (i386_pe_end_cold_function): New function.
12914
12915 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12916
12917 PR fortran/84565
12918 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12919 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12920
12921 PR c++/84704
12922 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12923 on tmp_var.
12924 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12925 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12926
12927 PR middle-end/84723
12928 * multiple_target.c: Include tree-inline.h and intl.h.
12929 (expand_target_clones): Diagnose and fail if node->definition and
12930 !tree_versionable_function_p (node->decl).
12931
12932 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12933
12934 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12935 sprint_ul.
12936 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12937 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12938 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12939
12940 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12941
12942 PR target/84710
12943 * combine.c (try_combine): Use reg_or_subregno instead of handling
12944 just paradoxical SUBREGs and REGs.
12945
12946 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12947
12948 * config/arc/arc.c (arc_finalize_pic): Remove function.
12949 (arc_must_save_register): We use single base PIC register, remove
12950 checks to save/restore the PIC register.
12951 (arc_expand_prologue): Likewise.
12952 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12953 Remove.
12954 (arc_verify_short): Likewise.
12955 (arc_attr_type): Likewise.
12956 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12957 (walk_stores): Likewise.
12958 (arc_address_cost): Make it static.
12959 (arc_verify_short): Likewise.
12960 (branch_dest): Likewise.
12961 (arc_attr_type): Likewise.
12962 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12963 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12964 (arc_final_prescan_insn): Remove inserting the nops due to
12965 hardware hazards. It is done in reorg step.
12966 (insn_length_variant_t): Remove.
12967 (insn_length_parameters_t): Likewise.
12968 (arc_insn_length_parameters): Likewise.
12969 (arc_get_insn_variants): Likewise.
12970 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12971
12972 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12973
12974 PR inline-asm/84683
12975 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12976 assertion failure.
12977
12978 PR tree-optimization/84687
12979 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12980 on new_node->decl.
12981 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12982
12983 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12984
12985 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12986 Rename to ppc_speculation_barrier.
12987 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12988 __builtin_ppc_speculation_barrier.
12989
12990 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12991
12992 PR target/84700
12993 * combine.c (combine_simplify_rtx): Don't try to simplify if
12994 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12995 are equal to x.
12996
12997 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12998
12999 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13000 to 32 bytes when compiling for POWER9.
13001
13002 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13003
13004 PR target/84564
13005 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13006 regparm >= 3 with no arg reg available also for calls with
13007 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13008
13009 PR target/84524
13010 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13011 orig,vex.
13012 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13013
13014 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13015
13016 PR target/84264
13017 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13018
13019 2018-03-05 Richard Biener <rguenther@suse.de>
13020
13021 PR tree-optimization/84486
13022 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13023 When inserting a __builtin_assume_aligned call set the LHS
13024 SSA name alignment info accordingly.
13025
13026 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13027
13028 PR tree-optimization/84114
13029 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13030 Avoid reassociation of FLOAT_MODE addition.
13031
13032 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13033
13034 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13035 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13036 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13037 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13038 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13039 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13040 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13041 and -mwbnoinvd.
13042 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13043 __builtin_ia32_wbinvd): New builtins.
13044 (SPECIAL_ARGS2): New.
13045 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13046 (SPECIAL_ARGS2): New.
13047 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13048 (ix86_valid_target_attribute_inner_p): Ditto.
13049 (ix86_init_mmx_sse_builtins): Add special_args2.
13050 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13051 TARGET_WBNOINVD_P): New.
13052 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13053 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13054 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13055 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13056 * config/i386/pconfigintrin.h: New file.
13057 * config/i386/wbnoinvdintrin.h: Ditto.
13058 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13059 wbnoinvdintrin.h.
13060 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13061
13062 2018-03-05 Richard Biener <rguenther@suse.de>
13063
13064 PR tree-optimization/84670
13065 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13066 member.
13067 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13068 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13069 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13070 doesn't grow if all successors (recursively) were visited at least
13071 once.
13072
13073 2018-03-05 Richard Biener <rguenther@suse.de>
13074
13075 PR tree-optimization/84650
13076 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13077 if executed in the loop pipeline.
13078
13079 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13080
13081 * doc/configfiles.texi (Configuration Files): Move info about
13082 conditionalizing $target-protos.h to...
13083 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13084 differs from $target-protos.h.
13085
13086 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13087 Chung-Ju Wu <jasonwucj@gmail.com>
13088
13089 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13090 * config/nds32/nds32-multiple.md (setmemsi): Define.
13091 * config/nds32/nds32-memory-manipulation.c
13092 (nds32_gen_dup_4_byte_to_word_value): New.
13093 (emit_setmem_word_loop): New.
13094 (emit_setmem_byte_loop): New.
13095 (nds32_expand_setmem_loop): New.
13096 (nds32_expand_setmem_loop_v3m): New.
13097 (nds32_expand_setmem_unroll): New.
13098 (nds32_expand_setmem): New.
13099
13100 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13101 Chung-Ju Wu <jasonwucj@gmail.com>
13102
13103 * config/nds32/nds32-memory-manipulation.c
13104 (nds32_emit_load_store): New.
13105 (nds32_emit_post_inc_load_store): New.
13106 (nds32_emit_mem_move): New.
13107 (nds32_emit_mem_move_block): New.
13108 (nds32_expand_movmemsi_loop_unknown_size): New.
13109 (nds32_expand_movmemsi_loop_known_size): New.
13110 (nds32_expand_movmemsi_loop): New.
13111 (nds32_expand_movmemsi_unroll): New.
13112 (nds32_expand_movmemqi): Rename ...
13113 (nds32_expand_movmemsi): ... to this.
13114 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13115 (movmemsi): ... to this.
13116 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13117 (nds32_expand_movmemsi): ... to this.
13118
13119 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13120 Monk Chiang <sh.chiang04@gmail.com>
13121 Chung-Ju Wu <jasonwucj@gmail.com>
13122
13123 * config/nds32/nds32-protos.h
13124 (nds32_expand_load_multiple): New arguments.
13125 (nds32_expand_store_multiple): Ditto.
13126 (nds32_valid_multiple_load_store): Rename ...
13127 (nds32_valid_multiple_load_store_p): ... to this.
13128 * config/nds32/nds32-memory-manipulation.c
13129 (nds32_expand_load_multiple): Refine implementation.
13130 (nds32_expand_store_multiple): Ditto.
13131 * config/nds32/nds32-multiple.md
13132 (load_multiple): Update nds32_expand_load_multiple interface.
13133 (store_multiple): Update nds32_expand_store_multiple interface.
13134 * config/nds32/nds32-predicates.c
13135 (nds32_valid_multiple_load_store): Rename ...
13136 (nds32_valid_multiple_load_store_p): ... to this and refine
13137 implementation.
13138 * config/nds32/predicates.md
13139 (nds32_load_multiple_and_update_address_operation): New predicate.
13140 (nds32_store_multiple_and_update_address_operation): New predicate.
13141
13142 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13143 Chung-Ju Wu <jasonwucj@gmail.com>
13144
13145 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13146 (combo): New attribute.
13147 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13148
13149 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13150
13151 * config/nds32/nds32.opt: Change -mcmodel= default value.
13152
13153 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13154 Monk Chiang <sh.chiang04@gmail.com>
13155 Chung-Ju Wu <jasonwucj@gmail.com>
13156
13157 * config/nds32/constants.md (unspec_element): New enum.
13158 * config/nds32/constraints.md (Umw): New constraint.
13159 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13160 * config/nds32/nds32-intrinsic.md: Likewise.
13161 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13162 (nds32_valid_smw_lwm_base_p): New.
13163 (nds32_output_smw_single_word): New.
13164 (nds32_output_lmw_single_word): New.
13165 (nds32_expand_unaligned_load): New.
13166 (nds32_expand_unaligned_store): New.
13167 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13168 (nds32_output_smw_single_word): Declare.
13169 (nds32_output_lmw_single_word): Declare.
13170 (nds32_expand_unaligned_load): Declare.
13171 (nds32_expand_unaligned_store): Declare.
13172 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13173 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13174 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13175 NDS32_BUILTIN_UASTORE_DW.
13176 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13177 predicate.
13178
13179 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13180 Kito Cheng <kito.cheng@gmail.com>
13181 Chung-Ju Wu <jasonwucj@gmail.com>
13182
13183 * config/nds32/nds32-intrinsic.c
13184 (nds32_expand_builtin_null_ftype_reg): Delete.
13185 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13186 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13187 (nds32_read_argument): New.
13188 (nds32_legitimize_target): Ditto.
13189 (nds32_legitimize_argument): Ditto.
13190 (nds32_check_constant_argument): Ditto.
13191 (nds32_expand_unop_builtin): Ditto.
13192 (nds32_expand_unopimm_builtin): Ditto.
13193 (nds32_expand_binop_builtin): Ditto.
13194 (nds32_builtin_decl_impl): Ditto.
13195 (builtin_description): Ditto.
13196 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13197 (nds32_init_builtins_impl): Ditto.
13198 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13199 (nds32_builtin_decl): New.
13200 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13201 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13202
13203 2018-03-02 Jeff Law <law@redhat.com>
13204
13205 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13206 (redundant_insn, fill_simple_delay_slots): Likewise.
13207 (fill_slots_from_thread): Likewise.
13208 * resource.c (mark_referenced_resources): Likewise.
13209 (mark_set_resources, find_dead_or_set_registers): Likewise.
13210
13211 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13212
13213 * substring-locations.h (format_warning_va): Formatting fix for
13214 ATTRIBUTE_GCC_DIAG.
13215 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13216 argument.
13217 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13218 * substring-locations.c: Include intl.h.
13219 (format_warning_va): Turned into small wrapper around
13220 format_warning_n_va, renamed to ...
13221 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13222 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13223 use ngettext.
13224 (format_warning_at_substring_n): New function.
13225 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13226 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13227 format_warning_at_substring with just a shorter name instead of
13228 const function pointer.
13229 (fmtwarn_n): New function.
13230 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13231 appropriate, get rid of all the fmtstr temporaries, move conditionals
13232 with G_() wrapped string literals directly into fmtwarn arguments,
13233 cast dir.len to (int), formatting fixes.
13234
13235 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13236
13237 * doc/invoke.texi: Remove "Cilk Plus" references.
13238
13239 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13240 Richard Biener <rguenther@suse.de>
13241
13242 PR ipa/84628
13243 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13244 for error or warning attributes if CALL_FROM_THUNK_P is set.
13245 Formatting fixes.
13246
13247 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13248
13249 PR target/56540
13250 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13251 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13252
13253 PR target/56540
13254 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13255 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13256
13257 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13258 instead of -1U in last predictors element's probability member.
13259
13260 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13261
13262 PR ipa/83983
13263 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13264 arguments if they are comparable.
13265
13266 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13267
13268 PR tree-optimization/84634
13269 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13270 masks and masked_loop_p with a single loop_masks, making sure it's
13271 null for bb vectorization.
13272
13273 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13274
13275 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13276 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13277 loop->force_vectorize to check whether there is no alias.
13278
13279 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13280
13281 PR target/84614
13282 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13283 prototypes.
13284 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13285 comments.
13286 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13287 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13288 instead of a loop around prev_real_insn.
13289 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13290 prev_real_insn.
13291
13292 PR inline-asm/84625
13293 * config/i386/i386.c (ix86_print_operand): Use conditional
13294 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13295 zero vector.
13296
13297 2018-03-02 Richard Biener <rguenther@suse.de>
13298
13299 PR tree-optimization/84427
13300 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13301 (bitmap_set_subtract_values): Rewrite to handle multiple
13302 exprs per value.
13303 (clean): Likewise.
13304 (prune_clobbered_mems): Likewise.
13305 (phi_translate): Take edge instead of pred/phiblock.
13306 (phi_translate_1): Likewise.
13307 (phi_translate_set): Likewise. Insert all translated
13308 exprs for a value into the set, keeping possibly multiple
13309 expressions per value.
13310 (compute_antic_aux): Adjust for phi_translate changes.
13311 When intersecting union the expressions and prune those
13312 not in the final value set, keeping possibly multiple
13313 expressions per value. Do not use value-insertion
13314 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13315 all expressions. Add verification that the value-sets
13316 only shrink during iteration.
13317 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13318 (do_pre_regular_insertion): Likewise.
13319 (do_pre_partial_partial_insertion): Likewise.
13320
13321 2018-03-02 Richard Biener <rguenther@suse.de>
13322
13323 PR target/82005
13324 * config/darwin.c (saved_debug_info_level): New static global.
13325 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13326 (darwin_asm_lto_end): Restore debug info generation settings.
13327
13328 2018-03-01 Martin Liska <mliska@suse.cz>
13329
13330 PR sanitizer/82484
13331 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13332 volatile arguments.
13333
13334 2018-03-01 Richard Biener <rguenther@suse.de>
13335
13336 PR debug/84645
13337 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13338 type annotation with LTO when debug was disabled at compile-time.
13339
13340 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13341
13342 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13343 XINT with INTVAL.
13344 (mips_final_postscan_insn): Likewise.
13345
13346 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13347
13348 PR rtl-optimization/84528
13349 * alias.c (init_alias_target): Add commentary.
13350 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13351 a unique base value if the frame pointer is not eliminated
13352 to the stack pointer.
13353
13354 2018-03-01 Tom de Vries <tom@codesourcery.com>
13355
13356 PR rtl-optimization/83327
13357 * lra-int.h (hard_regs_spilled_into): Declare.
13358 * lra.c (hard_regs_spilled_into): Define.
13359 (init_reg_info): Init hard_regs_spilled_into.
13360 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13361 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13362 (process_bb_lives): Handle hard_regs_spilled_into.
13363 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13364 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13365
13366 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13367
13368 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13369 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13370 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13371 * config/rs6000/aix72.h: New file.
13372
13373 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13374
13375 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13376 instead of warning_at with conditional singular and plural messages
13377 where possible.
13378
13379 PR target/52991
13380 * stor-layout.c (update_alignment_for_field): For
13381 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13382 && !DECL_PACKED (field), do the alignment update, just use
13383 only desired_align instead of MAX (type_align, desired_align)
13384 as the alignment.
13385 (place_field): Don't do known_align < desired_align handling
13386 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13387 is non-NULL, instead do it after rli->prev_field handling and
13388 only if not within a bitfield word. For DECL_PACKED (field)
13389 use type_align of BITS_PER_UNIT.
13390
13391 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
13392
13393 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13394 superfluous parentheses and trailing spaces.
13395
13396 2018-02-28 Richard Biener <rguenther@suse.de>
13397
13398 PR tree-optimization/84584
13399 * graphite-scop-detection.c (scop_detection::add_scop): Discard
13400 SCoPs with fake exit edge.
13401
13402 2018-02-28 Martin Liska <mliska@suse.cz>
13403
13404 PR testsuite/84597
13405 * timevar.c (timer::print): Fix format to properly print 100%
13406 values.
13407
13408 2018-02-28 Richard Biener <rguenther@suse.de>
13409
13410 PR middle-end/84607
13411 * genmatch.c (capture_info::walk_match): Do not mark
13412 captured expressions without operands as expr_p given
13413 they act more like predicates and should be subject to
13414 "lost tail" side-effect preserving.
13415
13416 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
13417
13418 PR rtl-optimization/81611
13419 * auto-inc-dec.c (attempt_change): Move dead note from
13420 mem_insn if it's the next use of regno
13421 (find_address): Take address use of reg holding
13422 non-incremented value. Add parm to limit search to the named
13423 reg only.
13424 (merge_in_block): Attempt to use a mem insn that is the next
13425 use of the original regno.
13426
13427 2018-02-27 Martin Sebor <msebor@redhat.com>
13428
13429 PR c++/83871
13430 * doc/invoke.texi (-Wmissing-attributes): New option.
13431 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13432
13433 2018-02-27 Martin Sebor <msebor@redhat.com>
13434
13435 PR translation/84207
13436 * diagnostic-core.h (warning_n, error_n, inform_n): Change
13437 n argument to unsigned HOST_WIDE_INT.
13438 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13439 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
13440 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13441 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13442
13443 2018-02-27 Richard Biener <rguenther@suse.de>
13444
13445 PR tree-optimization/84512
13446 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13447 Do not use the estimate returned from record_stmt_cost for
13448 the scalar iteration cost but sum properly using add_stmt_cost.
13449
13450 2018-02-27 Richard Biener <rguenther@suse.de>
13451
13452 PR tree-optimization/84466
13453 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13454 Adjust last change to less strictly validate use operands.
13455
13456 2018-02-27 Martin Liska <mliska@suse.cz>
13457
13458 PR gcov-profile/84548
13459 * gcov.c (process_file): Allow partial overlap and consider it
13460 also as group functions.
13461 (output_lines): Properly calculate range of lines for a group.
13462
13463 2018-02-27 Martin Liska <mliska@suse.cz>
13464
13465 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13466 'ggc' suffixes. Change first column width.
13467 (timer::print): Fix formatting of the column.
13468
13469 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
13470
13471 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13472 preserve inline entry blocks for the sake of debug inline
13473 entry point markers alone.
13474 (remove_unused_locals): Suggest in comments a better place to
13475 force the preservation of inline entry blocks that are
13476 otherwise unused, but do not preserve them.
13477
13478 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13479
13480 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13481
13482 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13483
13484 PR target/84039
13485 * config/i386/constraints.md (Bs): Replace
13486 ix86_indirect_branch_register with
13487 TARGET_INDIRECT_BRANCH_REGISTER.
13488 (Bw): Likewise.
13489 * config/i386/i386.md (indirect_jump): Likewise.
13490 (tablejump): Likewise.
13491 (*sibcall_memory): Likewise.
13492 (*sibcall_value_memory): Likewise.
13493 Peepholes of indirect call and jump via memory: Likewise.
13494 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13495 (*sibcall_value_GOT_32): Likewise.
13496 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13497 (GOT_memory_operand): Likewise.
13498 (call_insn_operand): Likewise.
13499 (sibcall_insn_operand): Likewise.
13500 (GOT32_symbol_operand): Likewise.
13501 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13502
13503 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13504
13505 PR rtl-optimization/83496
13506 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13507 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
13508 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13509 redundant insn, if any.
13510 (relax_delay_slots): Likewise.
13511 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13512
13513 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
13514
13515 PR tree-optimization/83965
13516 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13517 that grouped statements are part of a reduction chain. Return
13518 true if the statement is not marked as a reduction itself but
13519 is part of a group.
13520 (vect_recog_dot_prod_pattern): Don't check whether the statement
13521 is part of a group here.
13522 (vect_recog_sad_pattern): Likewise.
13523 (vect_recog_widen_sum_pattern): Likewise.
13524
13525 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13526
13527 PR debug/84545
13528 * final.c (rest_of_clean_state): Also look for calls inside sequences.
13529
13530 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13531
13532 PR target/84530
13533 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13534 the bool argument.
13535 (ix86_output_indirect_function_return): New prototype.
13536 (ix86_split_simple_return_pop_internal): Likewise.
13537 * config/i386/i386.c (indirect_return_via_cx): New.
13538 (indirect_return_via_cx_bnd): Likewise.
13539 (indirect_thunk_name): Handle return va CX_REG.
13540 (output_indirect_thunk_function): Create alias for
13541 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13542 (ix86_output_indirect_jmp): Remove the bool argument.
13543 (ix86_output_indirect_function_return): New function.
13544 (ix86_split_simple_return_pop_internal): Likewise.
13545 * config/i386/i386.md (*indirect_jump): Don't pass false
13546 to ix86_output_indirect_jmp.
13547 (*tablejump_1): Likewise.
13548 (simple_return_pop_internal): Change it to define_insn_and_split.
13549 Call ix86_split_simple_return_pop_internal to split it for
13550 -mfunction-return=.
13551 (simple_return_indirect_internal): Call
13552 ix86_output_indirect_function_return instead of
13553 ix86_output_indirect_jmp.
13554
13555 2018-02-26 Jakub Jelinek <jakub@redhat.com>
13556
13557 PR bootstrap/84405
13558 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13559 memset and value initialization afterwards.
13560
13561 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
13562
13563 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13564
13565 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13566
13567 PR target/84521
13568 * common/config/aarch64/aarch64-common.c
13569 (aarch_option_optimization_table[]): Switch
13570 off fomit-frame-pointer
13571
13572 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13573 Chung-Ju Wu <jasonwucj@gmail.com>
13574
13575 * config/nds32/nds32-multiple.md (load_multiple): Disallow
13576 volatile memory.
13577 (store_multiple): Ditto.
13578
13579 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13580
13581 * config.gcc: Add --with-cpu support for nds32 target.
13582 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13583 * config/nds32/nds32.opt: Add -mcpu= option.
13584
13585 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
13586
13587 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13588 isel=yes): Warn for these deprecated options.
13589
13590 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
13591
13592 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13593 ISA_2_5_MASKS_EMBEDDED.
13594
13595 2018-02-23 Jakub Jelinek <jakub@redhat.com>
13596
13597 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13598 p->max as pointers rather than using iterative_hash_expr.
13599
13600 2018-02-23 Carl Love <cel@us.ibm.com>
13601
13602 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13603 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13604 BU_P8V_OVERLOAD_2.
13605 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13606 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13607 P8V_BUILTIN_VEC_VUNSIGNED2.
13608
13609 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
13610
13611 PR target/81572
13612 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13613 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13614 LRA_UNKNOWN_ALT.
13615 * lra-constraints.c (curr_insn_transform): Set up
13616 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13617 LRA_UNKNOWN_ALT.
13618 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13619 * lra-eliminations.c (spill_pseudos): Ditto.
13620 (process_insn_for_elimination): Ditto.
13621 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13622 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13623 LRA_NON_CLOBBERED_ALT.
13624
13625 2018-02-22 Martin Sebor <msebor@redhat.com>
13626
13627 PR tree-optimization/84480
13628 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13629 to maybe_diag_stxncpy_trunc. Call it.
13630 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13631 from gimple_fold_builtin_strcpy. Print inlining stack.
13632 (handle_builtin_stxncpy): Print inlining stack.
13633 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13634
13635 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13636
13637 PR target/84176
13638 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13639 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13640 and -fcheck-pointer-bounds are used together.
13641 (indirect_thunk_prefix): New enum.
13642 (indirect_thunk_need_prefix): New function.
13643 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13644 "_nt" instead of "_bnd" for NOTRACK prefix.
13645 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13646 (output_indirect_thunk_function): Likewise.
13647 (): Likewise.
13648 (ix86_code_end): Update output_indirect_thunk_function calls.
13649 (ix86_output_indirect_branch_via_reg): Replace
13650 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13651 (ix86_output_indirect_branch_via_push): Likewise.
13652 (ix86_output_function_return): Likewise.
13653 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13654 incompatible with -fcf-protection=branch and
13655 -fcheck-pointer-bounds.
13656
13657 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13658
13659 PR target/83335
13660 * config/aarch64/aarch64.c (aarch64_print_address_internal):
13661 Change gcc_assert call to output_operand_lossage.
13662
13663 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13664
13665 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13666
13667 2018-02-22 DJ Delorie <dj@redhat.com>
13668 Sebastian Perta <sebastian.perta@renesas.com>
13669 Oleg Endo <olegendo@gcc.gnu.org>
13670
13671 * config/rx/rx.c (rx_rtx_costs): New function.
13672 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13673
13674 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
13675
13676 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13677
13678 2018-02-22 Martin Liska <mliska@suse.cz>
13679
13680 PR driver/83193
13681 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13682 Add "native" as a possible value.
13683
13684 2018-02-22 Martin Liska <mliska@suse.cz>
13685
13686 PR driver/83193
13687 * config/i386/i386.c (ix86_option_override_internal):
13688 Add "native" as a possible value for -march and -mtune.
13689
13690 2018-02-22 Jakub Jelinek <jakub@redhat.com>
13691
13692 PR target/84502
13693 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13694 to all type variants.
13695
13696 PR tree-optimization/84503
13697 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13698 width as info->bitpos + info->bitsize - start.
13699 (merged_store_group::merge_overlapping): Simplify width computation.
13700 (check_no_overlap): New function.
13701 (imm_store_chain_info::try_coalesce_bswap): Compute expected
13702 start + width and last_order of the group, fail if check_no_overlap
13703 fails.
13704 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13705 to group if check_no_overlap fails.
13706
13707 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13708
13709 * config/rs6000/altivec.md: Delete contraint arguments to
13710 define_expand, define_split, and define_peephole2, and in
13711 define_insn_and_split if always unused.
13712 * config/rs6000/darwin.md: Ditto.
13713 * config/rs6000/dfp.md: Ditto.
13714 * config/rs6000/rs6000.md: Ditto.
13715 * config/rs6000/sync.md: Ditto.
13716 * config/rs6000/vector.md: Ditto.
13717 * config/rs6000/vsx.md: Ditto.
13718
13719 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13720
13721 * config/rs6000/altivec.md: Write output control strings as braced
13722 blocks instead of double-quoted strings.
13723 * config/rs6000/darwin.md: Ditto.
13724 * config/rs6000/rs6000.md: Ditto.
13725 * config/rs6000/vector.md: Ditto.
13726 * config/rs6000/vsx.md: Ditto.
13727
13728 2018-02-21 Jason Merrill <jason@redhat.com>
13729
13730 PR c++/84314 - ICE with templates and fastcall attribute.
13731 * attribs.c (build_type_attribute_qual_variant): Remove assert.
13732
13733 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13734
13735 * ipa-cp.c (determine_versionability): Fix comment typos.
13736
13737 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13738
13739 PR c/84229
13740 * ipa-cp.c (determine_versionability): Do not version functions caling
13741 va_arg_pack.
13742
13743 2018-02-21 Martin Liska <mliska@suse.cz>
13744
13745 PR driver/83193
13746 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13747 Add "native" as a possible value.
13748 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13749 the macro when native cpu detection is available.
13750
13751 2018-02-21 Martin Liska <mliska@suse.cz>
13752
13753 PR driver/83193
13754 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13755 Add "native" as a possible value.
13756 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13757 when native cpu detection is available.
13758
13759 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13760 Martin Sebor <msebor@redhat.com>
13761
13762 PR tree-optimization/84478
13763 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13764 false.
13765 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13766 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13767 support which is conservatively correct, for 2 only stay conservative
13768 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13769 argument to the 2 argument get_range_strlen, adjust 6 arg
13770 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13771 false.
13772 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13773 (gimple_fold_builtin_strlen): Pass true as last argument to
13774 get_range_strlen.
13775
13776 2018-02-20 Martin Sebor <msebor@redhat.com>
13777
13778 PR middle-end/84095
13779 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13780 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13781 (builtin_memref::builtin_memref): Factor out parts into
13782 set_base_and_offset and call it.
13783
13784 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13785
13786 PR middle-end/84406
13787 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13788 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13789 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13790 search at the associated MODE_INT.
13791
13792 2018-02-20 Jeff Law <law@redhat.com>
13793
13794 PR middle-end/82123
13795 PR tree-optimization/81592
13796 PR middle-end/79257
13797 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13798 for range data rather than using global data.
13799 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13800 range data rather than using global data.
13801 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13802 pass it to children as needed.
13803 (struct directive::fmtresult): Similarly.
13804 (struct directive::set_width): Similarly.
13805 (struct directive::set_precision): Similarly.
13806 (format_integer, format_directive, parse_directive): Similarly.
13807 (format_none): Accept unnamed vr_values parameter.
13808 (format_percent, format_floating, format_character): Similarly.
13809 (format_string, format_plain): Similarly.
13810 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13811 the EVRP range analyzer for range data rather than using global data.
13812 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13813 gimple-ssa-evrp-analyze.h
13814 (class sprintf_dom_walker): Add after_dom_children member function.
13815 Add evrp_range_analyzer member.
13816 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13817 range analyzer as needed.
13818 (sprintf_dom_walker::after_dom_children): New member function.
13819 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13820 if not optimizing.
13821 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13822 (evrp_range_analyzer::pop_to_marker): Likewise.
13823
13824 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13825
13826 PR tree-optimization/84419
13827 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13828 with the required type if its current type is compatible but
13829 different.
13830
13831 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13832
13833 PR middle-end/82004
13834 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13835 after vectorization.
13836
13837 2018-02-20 Martin Liska <mliska@suse.cz>
13838
13839 PR driver/83193
13840 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13841 possible values if we don't have a hint.
13842
13843 2018-02-20 Martin Liska <mliska@suse.cz>
13844
13845 PR c/84310
13846 PR target/79747
13847 * final.c (shorten_branches): Build align_tab array with one
13848 more element.
13849 * opts.c (finish_options): Add alignment option limit check.
13850 (MAX_CODE_ALIGN): Likewise.
13851 (MAX_CODE_ALIGN_VALUE): Likewise.
13852 * doc/invoke.texi: Document maximum allowed option value for
13853 all -falign-* options.
13854
13855 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13856
13857 PR target/84146
13858 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13859 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13860 * var-tracking.c (emit_note_insn_var_location): Remove all references
13861 to NOTE_INSN_CALL_ARG_LOCATION.
13862 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13863 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13864 Use copy_rtx_if_shared.
13865 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13866 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13867 (dwarf2out_var_location): Remove handling of
13868 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13869 on call_insn.
13870 * final.c (final_scan_insn): Remove all references to
13871 NOTE_INSN_CALL_ARG_LOCATION.
13872 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13873 before dumping final insns.
13874 * except.c (emit_note_eh_region_end): Remove all references to
13875 NOTE_INSN_CALL_ARG_LOCATION.
13876 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13877 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13878 * config/arc/arc.c (hwloop_optimize): Likewise.
13879 * config/arm/arm.c (create_fix_barrier): Likewise.
13880 * config/s390/s390.c (s390_chunkify_start): Likewise.
13881 * config/sh/sh.c (find_barrier): Likewise.
13882 * config/i386/i386.c (rest_of_insert_endbranch,
13883 ix86_seh_fixup_eh_fallthru): Likewise.
13884 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13885 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13886 * config/frv/frv.c (frv_function_prologue): Likewise.
13887 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13888 reg note.
13889 (note_outside_basic_block_p): Remove all references to
13890 NOTE_INSN_CALL_ARG_LOCATION.
13891 * gengtype.c (adjust_field_rtx_def): Likewise.
13892 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13893 Likewise.
13894 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13895 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13896
13897 PR c++/84444
13898 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13899 is ADDR_EXPR.
13900
13901 PR tree-optimization/84452
13902 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13903 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13904 is NULL.
13905
13906 2018-02-19 Martin Liska <mliska@suse.cz>
13907
13908 PR sanitizer/82183
13909 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13910
13911 2018-02-19 Martin Liska <mliska@suse.cz>
13912 Richard Sandiford <richard.sandiford@linaro.org>
13913
13914 PR tree-optimization/82491
13915 * gimple-fold.c (get_base_constructor): Make earlier bail out
13916 to prevent ubsan.
13917
13918 2018-02-19 Carl Love <cel@us.ibm.com>
13919
13920 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13921 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13922 BU_P8V_OVERLOAD_1.
13923 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13924 P8V_BUILTIN_VEC_NEG.
13925
13926 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13927
13928 * config/rl78/rl78.md (movdf): New define expand.
13929
13930 2018-02-19 Martin Liska <mliska@suse.cz>
13931
13932 PR other/80589
13933 * doc/invoke.texi: Fix typo.
13934 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13935
13936 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13937
13938 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13939 handle rs6000_single_float and rs6000_double_float specially for
13940 e500 family CPUs.
13941
13942 2018-02-16 Jeff Law <law@redhat.com>
13943
13944 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13945 (pop_regs): Use it.
13946
13947 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13948
13949 PR ipa/84425
13950 * ipa-inline.c (inline_small_functions): Fix a typo.
13951
13952 2018-02-16 Nathan Sidwell <nathan@acm.org>
13953
13954 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13955
13956 2018-02-16 Carl Love <cel@us.ibm.com>
13957
13958 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13959 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13960 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13961 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13962 expansion to P8V_BUILTIN_VEC_FLOAT2.
13963
13964 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13965
13966 PR rtl-optimization/70023
13967 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13968 src_regno into account.
13969
13970 2018-02-16 Carl Love <cel@us.ibm.com>
13971
13972 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13973 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13974 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13975 * config/rs6000/rs6000.c: Remove case statements for
13976 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13977 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13978 and P9V_BUILTIN_VEC_VINSERT4B.
13979 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13980 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13981 * config/rs6000/vsx.md:
13982 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13983 vec_insert4b.
13984
13985 2018-02-16 Carl Love <cel@us.ibm.com>
13986
13987 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13988 vec_insert4b.
13989 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13990 definitions.
13991 * config/rs6000/rs6000-c.c: Add the definitions for
13992 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13993 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13994 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13995 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13996 definition for insert4b and define insn *insert3b_internal.
13997 * doc/extend.texi: Add documentation for vec_extract4b.
13998
13999 2018-02-16 Nathan Sidwell <nathan@acm.org>
14000
14001 * doc/extend.texi (Backwards Compatibility): Mention friend
14002 injection. Note for-scope is deprecated.
14003 * doc/invoke.texi (-ffriend-injection): Deprecate.
14004
14005 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14006
14007 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14008 that moved to I2, also allow destinations that are a paradoxical
14009 subreg (instead of a normal reg).
14010
14011 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14012
14013 PR target/83831
14014 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14015 to QImode.
14016
14017 2018-02-16 Richard Biener <rguenther@suse.de>
14018
14019 PR tree-optimization/84037
14020 PR tree-optimization/84016
14021 PR target/82862
14022 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14023 Adjust vec_construct for the fact we need additional higher latency
14024 128bit inserts for AVX256 and AVX512 vector builds.
14025 (ix86_add_stmt_cost): Scale vector construction cost for
14026 elementwise loads.
14027
14028 2018-02-16 Richard Biener <rguenther@suse.de>
14029
14030 PR tree-optimization/84417
14031 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14032 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14033 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14034
14035 2018-02-16 Martin Liska <mliska@suse.cz>
14036
14037 PR sanitizer/84307
14038 * internal-fn.def (ASAN_CHECK): Set proper flags.
14039 (ASAN_MARK): Likewise.
14040
14041 2018-02-16 Julia Koval <julia.koval@intel.com>
14042
14043 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14044 from PTA_CANNONLAKE.
14045
14046 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14047
14048 PR target/84272
14049 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14050 Use ++iter rather than iter++ for std::list iterators.
14051 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14052 defer deleting them until all nodes in the forest are processed. Do
14053 free even leaf nodes. Change to_process into auto_vec.
14054
14055 PR bootstrap/84405
14056 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14057 * vec.h (vec_default_construct): Use memset instead of placement new
14058 if BROKEN_VALUE_INITIALIZATION is defined.
14059 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14060 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14061 is defined.
14062
14063 PR rtl-optimization/83723
14064 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14065 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14066 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14067 recursive calls.
14068 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14069 callers.
14070 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14071
14072 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14073
14074 PR rtl-optimization/81443
14075 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14076 from inner REGs to paradoxical SUBREGs.
14077
14078 2018-02-16 Richard Biener <rguenther@suse.de>
14079
14080 PR tree-optimization/84399
14081 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14082 For operands we can analyze at their definition make sure we can
14083 analyze them at each use as well.
14084
14085 2018-02-16 Richard Biener <rguenther@suse.de>
14086
14087 PR tree-optimization/84190
14088 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14089 volatile accesses if the decl isn't volatile.
14090
14091 2018-02-15 Jason Merrill <jason@redhat.com>
14092
14093 PR c++/84314 - ICE with templates and fastcall attribute.
14094 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14095 TYPE_CANONICAL on an existing type.
14096
14097 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14098
14099 PR tree-optimization/84383
14100 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14101 dstoff nor call operand_equal_p if dstbase is NULL.
14102
14103 PR tree-optimization/84334
14104 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14105 also a CONSTANT_CLASS_P, punt.
14106
14107 2018-02-14 Jim Wilson <jimw@sifive.com>
14108
14109 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14110 first SMALL_OPERAND check. New local min_second_step. Move assert
14111 to where locals are set. Add TARGET_RVC support.
14112 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14113
14114 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14115
14116 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14117
14118 2018-02-14 Martin Sebor <msebor@redhat.com>
14119
14120 PR tree-optimization/83698
14121 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14122 arrays constrain the offset range to their bounds.
14123 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14124 (builtin_access::overlap): Avoid setting the size of overlap if it's
14125 already been set.
14126 (maybe_diag_overlap): Also consider arrays when deciding what values
14127 of offsets to include in diagnostics.
14128
14129 2018-02-14 Martin Sebor <msebor@redhat.com>
14130
14131 PR c/84108
14132 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14133 that correspond to the kind of a declaration.
14134
14135 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14136
14137 PR target/83984
14138 * config/pa/pa.md: Load address of PIC label using the linkage table
14139 if the label is nonlocal.
14140
14141 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14142
14143 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14144 warning message if user requests -maltivec=be.
14145 * doc/invoke.texi: Document deprecation of -maltivec=be.
14146
14147 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14148
14149 PR target/84220
14150 * config/rs6000/rs6000-c.c: Update definitions for
14151 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14152 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14153
14154 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14155
14156 PR target/84239
14157 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14158 add _get_ssp intrinsics. Remove argument from
14159 __builtin_ia32_rdssp[d|q].
14160 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14161 * config/i386/i386-builtin.def: Remove argument from
14162 __builtin_ia32_rdssp[d|q].
14163 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14164 ix86_expand_special_args_builtin for _rdssp[d|q].
14165 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14166 Clear register before usage.
14167 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14168 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14169
14170 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14171
14172 PR tree-optimization/84357
14173 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14174 operand 1 of an ARRAY_REF too.
14175
14176 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14177
14178 PR target/83831
14179 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14180 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14181 declarations.
14182 (set_of_reg): New struct.
14183 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14184 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14185 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14186 functions.
14187 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14188 Split into bitclr, bitset, bitinvert patterns if appropriate.
14189 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14190 use rx_fuse_in_memory_bitop.
14191 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14192 to named insn, correct maximum insn length.
14193
14194 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14195
14196 PR target/79242
14197 * machmode.def: Define a complex mode for PARTIAL_INT.
14198 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14199 MODE_PARTIAL_INT.
14200 * doc/rtl.texi: Document CSPImode.
14201 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14202 handling.
14203 (msp430_hard_regno_nregs_with_padding): Likewise.
14204
14205 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14206
14207 PR target/84279
14208 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14209
14210 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14211
14212 PR rtl-optimization/84169
14213 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14214 we generated a parallel as new i3 and we split that to new i2 and i3
14215 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14216 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14217 those to i2, not i1. Partially rewrite this scan code.
14218
14219 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14220
14221 PR c/82210
14222 * stor-layout.c (place_field): For variable length fields, adjust
14223 offset_align afterwards not just based on the field's alignment,
14224 but also on the size.
14225
14226 PR middle-end/84309
14227 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14228 of exps and logs in the use_exp2 case.
14229
14230 2018-02-13 Jeff Law <law@redhat.com>
14231
14232 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14233 entry for "vector".
14234
14235 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14236 ARGS as unused.
14237
14238 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14239
14240 PR debug/84342
14241 PR debug/84319
14242 * common.opt (gas-loc-support, gas-locview-support): New.
14243 (ginline-points, ginternal-reset-location-views): New.
14244 * doc/invoke.texi: Document them. Use @itemx where intended.
14245 (gvariable-location-views): Adjust.
14246 * target.def (reset_location_view): New.
14247 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14248 (TARGET_RESET_LOCATION_VIEW): New.
14249 * doc/tm.texi: Rebuilt.
14250 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14251 (dwarf2out_default_as_locview_support): New.
14252 (output_asm_line_debug_info): Use option variables.
14253 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14254 (output_loc_list): Likewise.
14255 (add_high_low_attributes): Check option variables.
14256 Don't output entry view attribute in strict mode.
14257 (gen_inlined_subroutine_die): Check option variables.
14258 (dwarf2out_inline_entry): Likewise.
14259 (init_sections_and_labels): Likewise.
14260 (dwarf2out_early_finish): Likewise.
14261 (maybe_reset_location_view): New, from...
14262 (dwarf2out_var_location): ... here. Call it.
14263 * debug.h (dwarf2out_default_as_loc_support): Declare.
14264 (dwarf2out_default_as_locview_support): Declare.
14265 * hooks.c (hook_int_rtx_insn_0): New.
14266 * hooks.h (hook_int_rtx_insn_0): Declare.
14267 * toplev.c (process_options): Take -gas-loc-support and
14268 -gas-locview-support from dwarf2out. Enable
14269 -gvariable-location-views by default only with locview
14270 assembler support. Enable -ginternal-reset-location-views by
14271 default only if the target defines the corresponding hook.
14272 Enable -ginline-points by default if location views are
14273 enabled; force it disabled if statement frontiers are
14274 disabled.
14275 * tree-inline.c (expand_call_inline): Check option variables.
14276 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14277
14278 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14279
14280 PR tree-optimization/84321
14281 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14282 handling. Also check whether the anti-range contains any values
14283 that satisfy the mask; switch to a VR_RANGE if not.
14284
14285 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14286
14287 PR sanitizer/84340
14288 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14289
14290 2018-02-13 Martin Jambor <mjambor@suse.cz>
14291
14292 PR c++/83990
14293 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14294 of call statements, also set location of a load to a temporary.
14295
14296 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14297
14298 * config/rl78/rl78.c (add_vector_labels): New function.
14299 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14300 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14301 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14302 which checks that no arguments are passed.
14303 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14304 * doc/extend.texi: Documentation for the new attribute.
14305
14306 2018-02-13 Andreas Schwab <schwab@suse.de>
14307
14308 * config/riscv/linux.h (CPP_SPEC): Define.
14309
14310 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14311
14312 PR target/84335
14313 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14314 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14315 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14316 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14317 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14318 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14319 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14320 temporarily for AES and PCLMUL builtins.
14321
14322 PR tree-optimization/84339
14323 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14324 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14325 Formatting fixes.
14326
14327 PR middle-end/84309
14328 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14329 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14330 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14331 inline function.
14332 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14333 inline function.
14334 * omp-simd-clone.h: New file.
14335 * omp-simd-clone.c: Include omp-simd-clone.h.
14336 (expand_simd_clones): No longer static.
14337 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14338 cgraph.h and omp-simd-clone.h.
14339 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14340 (vect_recog_widen_shift_pattern): Formatting fix.
14341 (vect_pattern_recog_1): Don't check optab for calls.
14342
14343 PR target/84336
14344 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14345 operands[2] into a REG before using gen_lowpart on it.
14346
14347 2018-02-12 Jeff Law <law@redhat.com>
14348
14349 PR target/83760
14350 * config/sh/sh.c (find_barrier): Consider a sibling call
14351 a barrier as well.
14352
14353 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14354 successfully back substituting a reg.
14355
14356 2018-02-12 Richard Biener <rguenther@suse.de>
14357
14358 PR tree-optimization/84037
14359 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14360 parameter, move visited init to caller.
14361 (vect_slp_analyze_operations): Separate cost from validity
14362 check, initialize visited once for all instances.
14363 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14364 for all instances.
14365 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14366 out an assert.
14367 (vect_model_promotion_demotion_cost): Likewise.
14368 (vectorizable_bswap): Guard cost modeling with !slp_node
14369 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14370 SLP stmts.
14371 (vectorizable_call): Likewise.
14372 (vectorizable_conversion): Likewise.
14373 (vectorizable_assignment): Likewise.
14374 (vectorizable_shift): Likewise.
14375 (vectorizable_operation): Likewise.
14376 (vectorizable_store): Likewise.
14377 (vectorizable_load): Likewise.
14378 (vectorizable_condition): Likewise.
14379 (vectorizable_comparison): Likewise.
14380
14381 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14382
14383 PR sanitizer/84307
14384 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14385 (ASAN_MARK): Fix fnspec to account for return value, change pointer
14386 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14387
14388 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14389
14390 PR middle-end/83665
14391 * params.def (inline-min-speedup): Increase from 8 to 15.
14392 (max-inline-insns-auto): Decrease from 40 to 30.
14393 * ipa-split.c (consider_split): Add some buffer for function to
14394 be considered inlining candidate.
14395 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14396 default values.
14397
14398 2018-02-12 Richard Biener <rguenther@suse.de>
14399
14400 PR tree-optimization/84037
14401 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14402 matched stmts if we cannot swap the non-matched ones.
14403
14404 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14405
14406 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14407 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14408 _mm_maskz_scalef_round_ss): New intrinsics.
14409 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14410 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14411 __builtin_ia32_scalefss_round): Remove.
14412 (__builtin_ia32_scalefsd_mask_round,
14413 __builtin_ia32_scalefss_mask_round): New intrinsics.
14414 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14415 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14416 ((match_operand:VF_128 2 "<round_nimm_predicate>"
14417 "<round_constraint>")): Changed to ...
14418 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14419 "<round_scalar_constraint>")): ... this.
14420 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14421 %0, %1, %2<round_op3>}"): Changed to ...
14422 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14423 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14424 %2<round_scalar_mask_op3>}"): ... this.
14425 * config/i386/subst.md (round_scalar_nimm_predicate): New.
14426
14427 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14428
14429 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14430 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14431 (_mm_maskz_sqrt_round_ss): New intrinsics.
14432 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14433 (__builtin_ia32_sqrtsd_mask_round)
14434 (__builtin_ia32_sqrtss_mask_round): New builtins.
14435 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14436 (__builtin_ia32_sqrtss_round): Remove.
14437 (__builtin_ia32_sqrtsd_mask_round)
14438 (__builtin_ia32_sqrtss_mask_round): New builtins.
14439 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14440 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14441 ((match_operand:VF_128 1 "vector_operand"
14442 "xBm,<round_constraint>")): Changed to ...
14443 ((match_operand:VF_128 1 "vector_operand"
14444 "xBm,<round_scalar_constraint>")): ... this.
14445 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14446 %0, %2, %<iptr>1<round_op3>}): Changed to ...
14447 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14448 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14449 %<iptr>1<round_scalar_mask_op3>}): ... this.
14450 ((set_attr "prefix" "<round_prefix>")): Changed to ...
14451 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14452
14453 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
14454
14455 PR target/84266
14456 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14457 Cast vec_cmpeq result to correct type.
14458 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14459 Cast vec_cmpgt result to correct type.
14460
14461 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
14462
14463 * final.c (final_scan_insn_1): Renamed from...
14464 (final_scan_insn): ... this. New wrapper, to recover
14465 seen from the outermost call in recursive ones.
14466 * config/sparc/sparc.c (output_return): Drop seen from call.
14467 (output_sibcall): Likewise.
14468 * config/visium/visium.c (output_branch): Likewise.
14469
14470 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
14471
14472 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14473 function label.
14474
14475 2018-02-10 Alan Modra <amodra@gmail.com>
14476
14477 PR target/84300
14478 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14479 Specify LR as an input.
14480
14481 2018-02-10 Jakub Jelinek <jakub@redhat.com>
14482
14483 PR sanitizer/83987
14484 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14485 remove_member_access_dummy_vars): New functions.
14486 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14487 lower_omp_1, execute_lower_omp): Use them.
14488
14489 PR rtl-optimization/84308
14490 * shrink-wrap.c (spread_components): Release todo vector.
14491
14492 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
14493
14494 PR rtl-optimization/57193
14495 * ira-color.c (struct allocno_color_data): Add member
14496 conflict_allocno_hard_prefs.
14497 (update_conflict_allocno_hard_prefs): New.
14498 (bucket_allocno_compare_func): Add a preference based on
14499 conflict_allocno_hard_prefs.
14500 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14501 (color_allocnos): Remove a dead code. Initiate
14502 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
14503
14504 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14505
14506 PR target/84226
14507 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14508 constraint from =wa to wa. Avoid a subreg on the output operand,
14509 instead use a pseudo and subreg it in a move.
14510 (p9_xxbrd_<mode>): Changed to ...
14511 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14512 (p9_xxbrd_v2df): New expander.
14513 (p9_xxbrw_<mode>): Changed to ...
14514 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14515 (p9_xxbrw_v4sf): New expander.
14516
14517 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14518
14519 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14520
14521 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
14522
14523 PR target/83926
14524 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14525 multiply in 32-bit mode.
14526 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14527 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14528 mode.
14529
14530 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14531
14532 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14533 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14534 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14535 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14536
14537 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
14538
14539 PR lto/84213
14540 * dwarf2out.c (is_trivial_indirect_ref): New function.
14541 (dwarf2out_late_global_decl): Do not generate a location
14542 attribute for variables that have a non-trivial DECL_VALUE_EXPR
14543 and that are not defined in the current unit.
14544
14545 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14546
14547 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14548 instead of a libcall for UNORDERED.
14549
14550 2018-02-09 Tamar Christina <tamar.christina@arm.com>
14551
14552 PR target/82641
14553 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14554 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14555
14556 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14557
14558 PR target/PR84295
14559 * config/s390/s390.c (s390_set_current_function): Invoke
14560 s390_indirect_branch_settings also if fndecl didn't change.
14561
14562 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14563
14564 * config/rs6000/rs6000.md (blockage): Set length to zero.
14565
14566 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14567
14568 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14569
14570 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14571
14572 PR sanitizer/84285
14573 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14574 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14575 -static-lib*san.
14576
14577 PR debug/84252
14578 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14579 PARALLEL incoming that failed vt_get_decl_and_offset check.
14580
14581 PR middle-end/84237
14582 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14583 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14584 TREE_READONLY bit.
14585 (get_variable_section): For decls in named .bss* sections pass true as
14586 second argument to bss_initializer_p.
14587
14588 2018-02-09 Marek Polacek <polacek@redhat.com>
14589 Jakub Jelinek <jakub@redhat.com>
14590
14591 PR c++/83659
14592 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14593 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
14594 Sync some changes from cxx_fold_indirect_ref.
14595
14596 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14597
14598 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14599 markers.
14600 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14601 (BLOCK_INLINE_ENTRY_LABEL): New.
14602 (dwarf2out_var_location): Disregard inline entry markers.
14603 (inline_entry_data): New struct.
14604 (inline_entry_data_hasher): New hashtable type.
14605 (inline_entry_data_hasher::hash): New.
14606 (inline_entry_data_hasher::equal): New.
14607 (inline_entry_data_table): New variable.
14608 (add_high_low_attributes): Add DW_AT_entry_pc and
14609 DW_AT_GNU_entry_view attributes if a pending entry is found
14610 in inline_entry_data_table. Add old entry_pc attribute only
14611 if debug nonbinding markers are disabled.
14612 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14613 markers are enabled.
14614 (block_within_block_p, dwarf2out_inline_entry): New.
14615 (dwarf2out_finish): Check that no entries remained in
14616 inline_entry_data_table.
14617 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14618 (final_scan_insn, notice_source_line): Likewise.
14619 (rest_of_clean_state): Skip inline entry markers.
14620 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14621 markers.
14622 * gimple.c (gimple_build_debug_inline_entry): New.
14623 * gimple.h (enum gimple_debug_subcode): Add
14624 GIMPLE_DEBUG_INLINE_ENTRY.
14625 (gimple_build_debug_inline_entry): Declare.
14626 (gimple_debug_inline_entry_p): New.
14627 (gimple_debug_nonbind_marker_p): Adjust.
14628 * insn-notes.def (INLINE_ENTRY): New.
14629 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14630 inline entry marker notes.
14631 (print_insn): Likewise.
14632 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14633 (INSN_DEBUG_MARKER_KIND): Likewise.
14634 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14635 * tree-inline.c (expand_call_inline): Build and insert
14636 debug_inline_entry stmt.
14637 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14638 inline entry blocks early, if nonbind markers are enabled.
14639 (dump_scope_block): Dump fragment info.
14640 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14641 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14642 (gimple_build_debug_inline_entry): New.
14643 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14644 Enable/disable inline entry points too.
14645 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14646 (DEBUG_INSN): Describe inline entry markers.
14647
14648 * common.opt (gvariable-location-views): New.
14649 (gvariable-location-views=incompat5): New.
14650 * config.in: Rebuilt.
14651 * configure: Rebuilt.
14652 * configure.ac: Test assembler for view support.
14653 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14654 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14655 * dwarf2out.c (var_loc_view): New typedef.
14656 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14657 (dwarf2out_locviews_in_attribute): New.
14658 (dwarf2out_locviews_in_loclist): New.
14659 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14660 (enum dw_line_info_opcode): Add LI_adv_address.
14661 (struct dw_line_info_table): Add view.
14662 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14663 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14664 (zero_view_p): New variable.
14665 (ZERO_VIEW_P): New macro.
14666 (output_asm_line_debug_info): New.
14667 (struct var_loc_node): Add view.
14668 (add_AT_view_list, AT_loc_list): New.
14669 (add_var_loc_to_decl): Add view param. Test it against last.
14670 (new_loc_list): Add view params. Record them.
14671 (AT_loc_list_ptr): Handle loc and view lists.
14672 (view_list_to_loc_list_val_node): New.
14673 (print_dw_val): Handle dw_val_class_view_list.
14674 (size_of_die): Likewise.
14675 (value_format): Likewise.
14676 (loc_list_has_views): New.
14677 (gen_llsym): Set vl_symbol too.
14678 (maybe_gen_llsym, skip_loc_list_entry): New.
14679 (dwarf2out_maybe_output_loclist_view_pair): New.
14680 (output_loc_list): Output view list or entries too.
14681 (output_view_list_offset): New.
14682 (output_die): Handle dw_val_class_view_list.
14683 (output_dwarf_version): New.
14684 (output_compilation_unit_header): Use it.
14685 (output_skeleton_debug_sections): Likewise.
14686 (output_rnglists, output_line_info): Likewise.
14687 (output_pubnames, output_aranges): Update version comments.
14688 (output_one_line_info_table): Output view numbers in asm comments.
14689 (dw_loc_list): Determine current endview, pass it to new_loc_list.
14690 Call maybe_gen_llsym.
14691 (loc_list_from_tree_1): Adjust.
14692 (add_AT_location_description): Create view list attribute if
14693 needed, check it's absent otherwise.
14694 (convert_cfa_to_fb_loc_list): Adjust.
14695 (maybe_emit_file): Call output_asm_line_debug_info for test.
14696 (dwarf2out_var_location): Reset views as needed. Precompute
14697 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
14698 attribute. Set view.
14699 (new_line_info_table): Reset next view.
14700 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14701 (dwarf2out_source_line): Likewise. Output view resets and labels to
14702 the assembler, or select appropriate line info opcodes.
14703 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14704 (optimize_string_length): Catch it. Adjust.
14705 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
14706 dw_val_class_view_list, and remove it if no longer needed.
14707 (hash_loc_list): Hash view numbers.
14708 (loc_list_hasher::equal): Compare them.
14709 (optimize_location_lists): Check whether a view list symbol is
14710 needed, and whether the locview attribute is present, and
14711 whether they match. Remove the locview attribute if no longer
14712 needed.
14713 (index_location_lists): Call skip_loc_list_entry for test.
14714 (dwarf2out_finish): Call output_asm_line_debug_info for test.
14715 Use output_dwarf_version.
14716 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14717 (struct dw_val_node): Add val_view_list.
14718 * final.c (SEEN_NEXT_VIEW): New.
14719 (set_next_view_needed): New.
14720 (clear_next_view_needed): New.
14721 (maybe_output_next_view): New.
14722 (final_start_function): Rename to...
14723 (final_start_function_1): ... this. Take pointer to FIRST,
14724 add SEEN parameter. Emit param bindings in the initial view.
14725 (final_start_function): Reintroduce SEEN-less interface.
14726 (final): Rename to...
14727 (final_1): ... this. Take SEEN parameter. Output final pending
14728 next view at the end.
14729 (final): Reintroduce seen-less interface.
14730 (final_scan_insn): Output pending next view before switching
14731 sections or ending a block. Mark the next view as needed when
14732 outputting variable locations. Notify debug backend of section
14733 changes, and of location view changes.
14734 (rest_of_handle_final): Adjust.
14735 * toplev.c (process_options): Autodetect value for debug variable
14736 location views option. Warn on incompat5 without -gdwarf-5.
14737 * doc/invoke.texi (gvariable-location-views): New.
14738 (gvariable-location-views=incompat5): New.
14739 (gno-variable-location-views): New.
14740
14741 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14742
14743 PR tree-optimization/84136
14744 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14745 that the result of find_edge is non-NULL.
14746
14747 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14748
14749 PR target/83008
14750 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14751 storing integer register in SImode. Fix cost of 256 and 512
14752 byte aligned SSE register store.
14753
14754 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14755
14756 * config/i386/i386.c (ix86_multiplication_cost): Fix
14757 multiplication cost for TARGET_AVX512DQ.
14758
14759 2018-02-08 Marek Polacek <polacek@redhat.com>
14760
14761 PR tree-optimization/84238
14762 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14763 get_range_strlen.
14764
14765 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14766
14767 PR tree-optimization/84265
14768 * tree-vect-stmts.c (vectorizable_store): Don't treat
14769 VMAT_CONTIGUOUS accesses as grouped.
14770 (vectorizable_load): Likewise.
14771
14772 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14773
14774 PR tree-optimization/81635
14775 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14776 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14777 (test_round_for_mask): New functions.
14778 (wide_int_cc_tests): Call test_round_for_mask.
14779 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14780 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14781 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14782 range returned by get_range_info.
14783
14784 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14785
14786 PR ipa/81360
14787 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14788 * symtab.c: Include builtins.h
14789 (symtab_node::output_to_lto_symbol_table_p): Move here
14790 from lto-streamer-out.c:output_symbol_p.
14791 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14792 (output_symbol_p): Move all logic to symtab.c
14793 (produce_symtab): Update.
14794
14795 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14796
14797 * config/s390/s390-opts.h (enum indirect_branch): Define.
14798 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14799 (s390_indirect_branch_via_thunk)
14800 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14801 (enum s390_indirect_branch_type): Define.
14802 * config/s390/s390.c (struct s390_frame_layout, struct
14803 machine_function): Remove.
14804 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14805 (indirect_branch_table_label_no, indirect_branch_table_name):
14806 Define variables.
14807 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14808 (enum s390_indirect_branch_option): Define.
14809 (s390_return_addr_from_memory): New function.
14810 (s390_handle_string_attribute): New function.
14811 (s390_attribute_table): Add new attribute handler.
14812 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14813 (s390_indirect_branch_via_thunk): New function.
14814 (s390_indirect_branch_via_inline_thunk): New function.
14815 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14816 sibling call optimization for non z10 compiles.
14817 (s390_emit_call): Force indirect branch target to be a single
14818 register. Add r1 clobber for non-z10 compiles.
14819 (s390_emit_epilogue): Emit return jump via return_use expander.
14820 (s390_reorg): Handle JUMP_INSNs as execute targets.
14821 (s390_option_override_internal): Perform validity checks for the
14822 new command line options.
14823 (s390_indirect_branch_attrvalue): New function.
14824 (s390_indirect_branch_settings): New function.
14825 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14826 (s390_output_indirect_thunk_function): New function.
14827 (s390_code_end): Implement target hook.
14828 (s390_case_values_threshold): Implement target hook.
14829 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14830 macros.
14831 * config/s390/s390.h (struct s390_frame_layout)
14832 (struct machine_function): Move here from s390.c.
14833 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14834 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14835 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14836 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14837 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14838 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14839 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14840 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14841 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14842 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14843 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14844 (mnemonic attribute): Add values which aren't recognized
14845 automatically.
14846 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14847 pattern for branch conversion. Fix mnemonic attribute.
14848 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14849 indirect branch via thunk if requested.
14850 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14851 ("*indirect_jump"): Disable for branch conversion using out of
14852 line thunks.
14853 ("indirect_jump_via_thunk<mode>_z10")
14854 ("indirect_jump_via_thunk<mode>")
14855 ("indirect_jump_via_inlinethunk<mode>_z10")
14856 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14857 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14858 ("casesi_jump_via_inlinethunk<mode>_z10")
14859 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14860 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14861 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14862 ("*indirect2_jump"): Disable for branch conversion.
14863 ("casesi_jump"): Turn into expander and expand patterns for branch
14864 conversion.
14865 ("return_use"): New expander.
14866 ("*return"): Emit return via thunk and rename it to ...
14867 ("*return<mode>"): ... this one.
14868 * config/s390/s390.opt: Add new options and and enum for the
14869 option values.
14870
14871 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14872
14873 * lra-constraints.c (match_reload): Unconditionally use
14874 gen_lowpart_SUBREG, rather than selecting between that
14875 and equivalent gen_rtx_SUBREG code.
14876
14877 2018-02-08 Richard Biener <rguenther@suse.de>
14878
14879 PR tree-optimization/84233
14880 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14881 changed flag instead of boguously re-using phi_inserted.
14882
14883 2018-02-08 Martin Jambor <mjambor@suse.cz>
14884
14885 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14886 static local variables.
14887
14888 2018-02-08 Richard Biener <rguenther@suse.de>
14889
14890 PR tree-optimization/84278
14891 * tree-vect-stmts.c (vectorizable_store): When looking for
14892 smaller vector types to perform grouped strided loads/stores
14893 make sure the mode is supported by the target.
14894 (vectorizable_load): Likewise.
14895
14896 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14897
14898 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14899 Increase LDP/STP opportunities by adding adjacent callee-saves.
14900
14901 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14902
14903 PR rtl-optimization/84068
14904 PR rtl-optimization/83459
14905 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14906
14907 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14908
14909 PR tree-optimization/84224
14910 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14911 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14912 non-zero arguments.
14913
14914 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14915
14916 PR target/84113
14917 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14918 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14919 count, remove one USE.
14920
14921 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14922
14923 * doc/install.texi (Configuration): Document the
14924 --with-long-double-format={ibm,ieee} PowerPC configuration
14925 options.
14926
14927 PR target/84154
14928 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14929 Convert from define_expand to be define_insn_and_split. Rework
14930 float/double/_Float128 conversions to QI/HI/SImode to work with
14931 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14932 conversions to QI/HImode types did a store and then a load to
14933 truncate the value. For conversions to VSX registers, don't split
14934 the insn, instead emit the code directly. Use the code iterator
14935 any_fix to combine signed and unsigned conversions.
14936 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14937 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14938 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14939 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14940 (fix_<mode>di2_hw): Likewise.
14941 (fixuns_<mode>di2_hw): Likewise.
14942 (fix_<mode>si2_hw): Likewise.
14943 (fixuns_<mode>si2_hw): Likewise.
14944 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14945 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14946 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14947 fix<uns>_trunc<SFDF:mode>si2_p8.
14948 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14949 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14950 (fix<uns>_<mode>_mem): Likewise.
14951 (fctiw<u>z_<mode>_mem): Likewise.
14952 (fix<uns>_<mode>_mem): Likewise.
14953 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14954 the register allocator from doing a direct move to the GPRs to do
14955 a store, and instead use the ISA 3.0 store byte/half-word from
14956 vector register instruction. For IEEE 128-bit floating point,
14957 also optimize stores of 32-bit ints.
14958 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14959
14960 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14961
14962 * genextract.c (push_pathstr_operand): New function to support
14963 [a-zA-Z].
14964 (walk_rtx): Call push_pathstr_operand.
14965 (print_path): Support [a-zA-Z].
14966
14967 2018-02-07 Richard Biener <rguenther@suse.de>
14968
14969 PR tree-optimization/84037
14970 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14971 (cse_and_gimplify_to_preheader): Declare.
14972 (vect_get_place_in_interleaving_chain): Likewise.
14973 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14974 ivexpr_map.
14975 (_loop_vec_info::~_loop_vec_info): Delete it.
14976 (cse_and_gimplify_to_preheader): New function.
14977 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14978 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14979 (vectorizable_load): Likewise. For grouped stores always base
14980 the IV on the first element.
14981 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14982 condition before gimplifying.
14983
14984 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14985
14986 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14987 *DIV_EXPR and *MOD_EXPR.
14988
14989 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14990
14991 PR target/84248
14992 * config/i386/i386.c (ix86_option_override_internal): Mask out
14993 the CF_SET bit when checking -fcf-protection.
14994
14995 2018-02-07 Tom de Vries <tom@codesourcery.com>
14996
14997 PR libgomp/84217
14998 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14999 enough.
15000
15001 2018-02-07 Richard Biener <rguenther@suse.de>
15002
15003 PR tree-optimization/84204
15004 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15005 this place.
15006
15007 PR tree-optimization/84205
15008 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15009 special-case isl_ast_op_zdiv_r.
15010
15011 PR tree-optimization/84223
15012 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15013 Only add conditions from within the region.
15014 (gather_bbs::after_dom_children): Adjust.
15015
15016 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15017
15018 PR target/84209
15019 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15020 * config/avr/avr.md: Only post-reload split REG-REG moves if
15021 either register is GENERAL_REG_P.
15022
15023 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15024
15025 PR tree-optimization/84235
15026 * tree-ssa-scopedtables.c
15027 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15028 if the subtraction is performed in floating point type where NaNs are
15029 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15030 build 1. Formatting fix.
15031
15032 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15033
15034 PR target/84146
15035 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15036 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15037 and skip it regardless of bb boundaries. Use CALL_P macro,
15038 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15039 unnecessarily, formatting fix.
15040
15041 2018-02-06 Michael Collison <michael.collison@arm.com>
15042
15043 * config/arm/thumb2.md:
15044 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15045 (*thumb_mov_notscc): Ditto.
15046
15047 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15048
15049 PR target/84154
15050 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15051 unsigned_fix, not "s".
15052
15053 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15054
15055 * configure.ac (gcc_fn_eh_frame_ro): New function.
15056 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15057 correct .eh_frame permissions.
15058 * configure: Regenerate.
15059
15060 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15061
15062 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15063 irrelevant options.
15064
15065 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15066
15067 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15068 Display warning message for -mno-speculate-indirect-jumps.
15069
15070 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15071
15072 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15073 Undocumented.
15074 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15075
15076 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15077
15078 PR tree-optimization/84225
15079 * tree-eh.c (find_trapping_overflow): Only call
15080 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15081
15082 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15083
15084 PR target/84145
15085 * config/i386/i386.c: Reimplement the check of possible options
15086 -mibt/-mshstk conbination. Change error messages.
15087 * doc/invoke.texi: Fix a typo: remove extra '='.
15088
15089 2018-02-06 Marek Polacek <polacek@redhat.com>
15090
15091 PR tree-optimization/84228
15092 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15093
15094 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15095
15096 PR target/82641
15097 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15098 emitted arch directives.
15099 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15100 __ARM_FEATURE_COPROC before changing architectures.
15101
15102 2018-02-06 Richard Biener <rguenther@suse.de>
15103
15104 * config/i386/i386.c (print_reg): Fix typo.
15105 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15106
15107 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15108
15109 * configure: Regenerate.
15110
15111 2018-02-05 Martin Sebor <msebor@redhat.com>
15112
15113 PR tree-optimization/83369
15114 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15115 inlining context.
15116
15117 2018-02-05 Martin Liska <mliska@suse.cz>
15118
15119 * doc/invoke.texi: Cherry-pick upstream r323995.
15120
15121 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15122
15123 * ira.c (ira_init_register_move_cost): Adjust comment.
15124
15125 2018-02-05 Martin Liska <mliska@suse.cz>
15126
15127 PR gcov-profile/84137
15128 * doc/gcov.texi: Fix typo in documentation.
15129
15130 2018-02-05 Martin Liska <mliska@suse.cz>
15131
15132 PR gcov-profile/83879
15133 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15134 using dlopen functionality.
15135
15136 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15137
15138 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15139 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15140 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15141 _mm_maskz_range_round_ss): New intrinsics.
15142 (__builtin_ia32_rangesd128_round)
15143 (__builtin_ia32_rangess128_round): Remove.
15144 (__builtin_ia32_rangesd128_mask_round,
15145 __builtin_ia32_rangess128_mask_round): New builtins.
15146 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15147 __builtin_ia32_rangess128_round): Remove.
15148 (__builtin_ia32_rangesd128_mask_round,
15149 __builtin_ia32_rangess128_mask_round): New builtins.
15150 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15151 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15152 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15153 "<round_saeonly_constraint>")): Changed to ...
15154 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15155 "<round_saeonly_scalar_constraint>")): ... this.
15156 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15157 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15158 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15159 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15160 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15161
15162 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15163
15164 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15165 options.
15166 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15167 Remove all values except native, 8540 and 8548.
15168
15169 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15170
15171 * config/i386/i386.c (ix86_output_function_return): Pass
15172 INVALID_REGNUM, instead of -1, as invalid register number to
15173 indirect_thunk_name and output_indirect_thunk.
15174
15175 2018-02-02 Julia Koval <julia.koval@intel.com>
15176
15177 * config.gcc: Add -march=icelake.
15178 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15179 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15180 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15181 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15182 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15183 (processor_target_table): Add icelake.
15184 (ix86_option_override_internal): Handle new PTAs.
15185 (get_builtin_code_for_version): Handle icelake.
15186 (M_INTEL_COREI7_ICELAKE): New.
15187 (fold_builtin_cpu): Handle icelake.
15188 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15189 * doc/invoke.texi: Add -march=icelake.
15190
15191 2018-02-02 Julia Koval <julia.koval@intel.com>
15192
15193 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15194 to wide_int_bitmask.
15195 * wide-int-bitmask.h: New.
15196
15197 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15198
15199 PR target/84066
15200 * config/i386/i386.md: Replace Pmode with word_mode in
15201 builtin_setjmp_setup and builtin_longjmp to support x32.
15202
15203 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15204
15205 PR target/56010
15206 PR target/83743
15207 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15208 #include "opts.h".
15209 (rs6000_supported_cpu_names): New static variable.
15210 (linux_cpu_translation_table): Likewise.
15211 (elf_platform) <cpu>: Define new static variable and use it.
15212 Translate kernel AT_PLATFORM name to canonical name if needed.
15213 Error if platform name is unknown.
15214
15215 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15216
15217 PR target/84089
15218 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15219
15220 2018-02-01 Jeff Law <law@redhat.com>
15221
15222 PR target/84128
15223 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15224 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15225 the scratch if RELEASE_VIA_POP is false.
15226 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15227 If we have to save a temporary register, decrement SIZE appropriately.
15228 Pass new arguments to release_scratch_register_on_entry.
15229 (ix86_adjust_stack_and_probe): Likewise.
15230 (ix86_emit_probe_stack_range): Pass new arguments to
15231 release_scratch_register_on_entry.
15232
15233 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15234
15235 PR rtl-optimization/84157
15236 * combine.c (change_zero_ext): Use REG_P predicate in
15237 front of HARD_REGISTER_P predicate.
15238
15239 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15240
15241 * config/avr/avr.c (avr_option_override): Move disabling of
15242 -fdelete-null-pointer-checks to...
15243 * common/config/avr/avr-common.c (avr_option_optimization_table):
15244 ...here.
15245
15246 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15247
15248 PR tree-optimization/81635
15249 * tree-data-ref.c (split_constant_offset_1): For types that
15250 wrap on overflow, try to use range info to prove that wrapping
15251 cannot occur.
15252
15253 2018-02-01 Renlin Li <renlin.li@arm.com>
15254
15255 PR target/83370
15256 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15257 TAILCALL_ADDR_REGS.
15258 (aarch64_register_move_cost): Likewise.
15259 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15260 TAILCALL_ADDR_REGS.
15261 (REG_CLASS_NAMES): Likewise.
15262 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15263 TAILCALL_ADDR_REGS. Remove IP registers.
15264 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15265
15266 2018-02-01 Richard Biener <rguenther@suse.de>
15267
15268 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15269 for specifying RPO order and allow NULL for that.
15270 * domwalk.c (dom_walker::dom_walker): Likewise.
15271 (dom_walker::walk): Handle NULL RPO order.
15272 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15273 in RPO order.
15274 (rewrite_update_dom_walker): Likewise.
15275 (mark_def_dom_walker): Likewise.
15276
15277 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15278
15279 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15280 (aarch64_maybe_expand_sve_subreg_move): Declare.
15281 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15282 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15283 predicate.
15284 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15285 that are semantically a reverse operation.
15286 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15287 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15288 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15289 functions.
15290 (aarch64_can_change_mode_class): For big-endian, forbid changes
15291 between two SVE modes if they have different element sizes.
15292
15293 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15294
15295 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15296 the TImode handling for big-endian targets.
15297
15298 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15299
15300 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15301 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15302 not just bytes.
15303 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15304 Remove BSWAP handing for big-endian targets and use the form of
15305 LD1RQ appropariate for the mode.
15306
15307 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15308
15309 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15310 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15311 duplicated element.
15312
15313 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15314
15315 PR tearget/83845
15316 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15317 check for operands that need to go through aarch64_sve_reload_be.
15318
15319 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15320
15321 PR tree-optimization/81661
15322 PR tree-optimization/84117
15323 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15324 * tree-eh.c: Include gimplify.h.
15325 (find_trapping_overflow, replace_trapping_overflow,
15326 rewrite_to_non_trapping_overflow): New functions.
15327 * tree-vect-loop.c: Include tree-eh.h.
15328 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15329 * tree-data-ref.c: Include tree-eh.h.
15330 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15331
15332 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15333
15334 PR rtl-optimization/84123
15335 * combine.c (change_zero_ext): Check if hard register satisfies
15336 can_change_dest_mode before calling gen_lowpart_SUBREG.
15337
15338 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15339
15340 PR target/82444
15341 * ira.c (ira_init_register_move_cost): Remove assert.
15342
15343 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15344
15345 PR rtl-optimization/84071
15346 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15347 * doc/tm.texi: Regenerate.
15348
15349 2018-01-31 Richard Biener <rguenther@suse.de>
15350
15351 PR tree-optimization/84132
15352 * tree-data-ref.c (analyze_miv_subscript): Properly
15353 check whether evolution_function_is_affine_multivariate_p
15354 before calling gcd_of_steps_may_divide_p.
15355
15356 2018-01-31 Julia Koval <julia.koval@intel.com>
15357
15358 PR target/83618
15359 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15360 * config/i386/i386.md (rdpid_rex64) New.
15361 (rdpid): Make 32bit only.
15362
15363 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15364
15365 PR lto/84105
15366 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15367 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15368
15369 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15370
15371 Revert
15372 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15373
15374 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15375
15376 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15377
15378 PR rtl-optimization/84071
15379 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15380 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15381
15382 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15383
15384 * config/arc/arc.c (arc_handle_aux_attribute): New function.
15385 (arc_attribute_table): Add 'aux' attribute.
15386 (arc_in_small_data_p): Consider aux like variables.
15387 (arc_is_aux_reg_p): New function.
15388 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15389 (arc_get_aux_arg): New function.
15390 (prepare_move_operands): Handle aux-register access.
15391 (arc_handle_aux_attribute): New function.
15392 * doc/extend.texi (ARC Variable attributes): Add subsection.
15393
15394 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15395
15396 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15397 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15398 (arc_attribute_table): Add 'uncached' attribute.
15399 (arc_print_operand): Print '.di' flag for uncached memory
15400 accesses.
15401 (arc_in_small_data_p): Do not consider for small data the uncached
15402 types.
15403 (arc_is_uncached_mem_p): New function.
15404 * config/arc/predicates.md (compact_store_memory_operand): Check
15405 for uncached memory accesses.
15406 (nonvol_nonimm_operand): Likewise.
15407 * doc/extend.texi (ARC Type Attribute): New subsection.
15408
15409 2018-01-31 Jakub Jelinek <jakub@redhat.com>
15410
15411 PR c/84100
15412 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15413 falign-loops=): Add Optimization flag.
15414
15415 2018-01-30 Jeff Law <law@redhat.com>
15416
15417 PR target/84064
15418 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15419 INT_REGISTERS_SAVED. Check it prior to calling
15420 get_scratch_register_on_entry.
15421 (ix86_adjust_stack_and_probe): Similarly.
15422 (ix86_emit_probe_stack_range): Similarly.
15423 (ix86_expand_prologue): Corresponding changes.
15424
15425 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15426
15427 PR target/40411
15428 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15429 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15430
15431 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
15432
15433 PR target/84112
15434 * lra-constraints.c (curr_insn_transform): Process AND in the
15435 address.
15436
15437 2018-01-30 Jakub Jelinek <jakub@redhat.com>
15438
15439 PR rtl-optimization/83986
15440 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15441 dependence against last_pending_memory_flush in addition to
15442 pending_jump_insns.
15443
15444 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
15445
15446 PR tree-optimization/81611
15447 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15448 copies.
15449
15450 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15451
15452 PR target/83758
15453 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15454 a reg rtx.
15455
15456 2018-01-30 Richard Biener <rguenther@suse.de>
15457 Jakub Jelinek <jakub@redhat.com>
15458
15459 PR tree-optimization/84111
15460 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15461 inner loops added during recursion, as they don't have up-to-date
15462 SSA form.
15463
15464 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15465
15466 PR ipa/81360
15467 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15468 (can_inline_edge_by_limits_p): ... here.
15469 (can_early_inline_edge_p, check_callers,
15470 update_caller_keys, update_callee_keys, recursive_inlining,
15471 add_new_edges_to_heap, speculation_useful_p,
15472 inline_small_functions,
15473 inline_small_functions, flatten_function,
15474 inline_to_all_callers_1): Update.
15475
15476 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15477
15478 * profile-count.c (profile_count::combine_with_ipa_count): Handle
15479 zeros correctly.
15480
15481 2018-01-30 Richard Biener <rguenther@suse.de>
15482
15483 PR tree-optimization/83008
15484 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15485 invariant and constant vector uses in stmts when they need
15486 more than one stmt.
15487
15488 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15489
15490 PR bootstrap/84017
15491 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15492 * configure: Regenerate.
15493
15494 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15495
15496 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15497 pattern.
15498 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15499 Use gen_rtx_REG rather than gen_lowpart.
15500
15501 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15502
15503 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15504 rather than 0 when creating partial subregs.
15505
15506 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15507
15508 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15509 of usage.
15510
15511 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
15512
15513 PR target/81550
15514 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15515 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15516 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15517 flags. This restores the settings used before the 2017-07-24.
15518 Turning off pre increment/decrement/modify allows IVOPTS to
15519 optimize DF/SF loops where the index is an int.
15520
15521 2018-01-29 Richard Biener <rguenther@suse.de>
15522 Kelvin Nilsen <kelvin@gcc.gnu.org>
15523
15524 PR bootstrap/80867
15525 * tree-vect-stmts.c (vectorizable_call): Don't call
15526 targetm.vectorize_builtin_md_vectorized_function if callee is
15527 NULL.
15528
15529 2018-01-22 Carl Love <cel@us.ibm.com>
15530
15531 * doc/extend.tex: Fix typo in second arg in
15532 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15533
15534 2018-01-29 Richard Biener <rguenther@suse.de>
15535
15536 PR tree-optimization/84086
15537 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15538 (flush_ssaname_freelist): When SSA names were released reset
15539 the SCEV hash table.
15540
15541 2018-01-29 Richard Biener <rguenther@suse.de>
15542
15543 PR tree-optimization/84057
15544 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15545 removed paths when removing edges.
15546
15547 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
15548
15549 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15550 -mfunction-return=@var{choice}.
15551
15552 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
15553
15554 PR diagnostic/84034
15555 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15556 Handle CR like TAB.
15557 (layout::print_source_line): Likewise.
15558 (test_get_line_width_without_trailing_whitespace): Add test cases.
15559
15560 2018-01-27 Jakub Jelinek <jakub@redhat.com>
15561
15562 PR middle-end/84040
15563 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15564 debug insns.
15565
15566 2018-01-26 Jim Wilson <jimw@sifive.com>
15567
15568 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15569
15570 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15571 specified.
15572
15573 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15574
15575 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15576 and CMP + SUB-immediate -> SUBS.
15577
15578 2018-01-26 Martin Sebor <msebor@redhat.com>
15579
15580 PR tree-optimization/83896
15581 * tree-ssa-strlen.c (get_string_len): Rename...
15582 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
15583 Avoid assuming length is constant.
15584 (handle_char_store): Use HOST_WIDE_INT for string length.
15585
15586 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
15587
15588 PR target/81763
15589 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15590 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15591
15592 2018-01-26 Richard Biener <rguenther@suse.de>
15593
15594 PR rtl-optimization/84003
15595 * dse.c (record_store): Only record redundant stores when
15596 the earlier store aliases at least all accesses the later one does.
15597
15598 2018-01-26 Jakub Jelinek <jakub@redhat.com>
15599
15600 PR rtl-optimization/83985
15601 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15602 REG_CFA_RESTORE insns.
15603 (delete_unmarked_insns): Don't ignore separate shrink wrapping
15604 REG_CFA_RESTORE insns here.
15605
15606 PR c/83989
15607 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15608 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15609
15610 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15611
15612 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15613 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15614 (arc_init): Likewise.
15615 (arc_override_options): Likewise.
15616 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15617 value.
15618 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15619 support.
15620 * config/arc/arc.h (TARGET_DBNZ): Define.
15621 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15622 properly set the tune attribute.
15623 (dbnz): Use TARGET_DBNZ guard.
15624 * config/arc/arc.opt (mtune): Add core3 option.
15625
15626 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15627
15628 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15629 recognize new pic like addresses.
15630 (arc_delegitimize_address): Clean up.
15631
15632 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15633
15634 * config/arc/arc-arches.def: Option mrf16 valid for all
15635 architectures.
15636 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15637 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15638 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15639 * config/arc/arc-tables.opt: Regenerate.
15640 * config/arc/arc.c (arc_conditional_register_usage): Handle
15641 reduced register file case.
15642 (arc_file_start): Set must have build attributes.
15643 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15644 mrf16 option value.
15645 * config/arc/arc.opt (mrf16): Add new option.
15646 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15647 * config/arc/genmultilib.awk: Handle new mrf16 option.
15648 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15649 * config/arc/t-multilib: Regenerate.
15650 * doc/invoke.texi (ARC Options): Document mrf16 option.
15651
15652 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15653
15654 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15655 * config/arc/arc.c (arc_handle_secure_attribute): New function.
15656 (arc_attribute_table): Add 'secure_call' attribute.
15657 (arc_print_operand): Print secure call operand.
15658 (arc_function_ok_for_sibcall): Don't optimize tail calls when
15659 secure.
15660 (arc_is_secure_call_p): New function. * config/arc/arc.md
15661 (call_i): Add support for sjli instruction.
15662 (call_value_i): Likewise.
15663 * config/arc/constraints.md (Csc): New constraint.
15664
15665 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15666 John Eric Martin <John.Martin@emmicro-us.com>
15667
15668 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15669 * config/arc/arc.c (_arc_jli_section): New struct.
15670 (arc_jli_section): New type.
15671 (rc_jli_sections): New static variable.
15672 (arc_handle_jli_attribute): New function.
15673 (arc_attribute_table): Add jli_always and jli_fixed attribute.
15674 (arc_file_end): New function.
15675 (TARGET_ASM_FILE_END): Define.
15676 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15677 (arc_add_jli_section): New function.
15678 (jli_call_scan): Likewise.
15679 (arc_reorg): Call jli_call_scan.
15680 (arc_output_addsi): Remove 'S' from printing asm operand.
15681 (arc_is_jli_call_p): New function.
15682 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15683 operand.
15684 (movhi_insn): Likewise.
15685 (movsi_insn): Likewise.
15686 (movsi_set_cc_insn): Likewise.
15687 (loadqi_update): Likewise.
15688 (load_zeroextendqisi_update): Likewise.
15689 (load_signextendqisi_update): Likewise.
15690 (loadhi_update): Likewise.
15691 (load_zeroextendhisi_update): Likewise.
15692 (load_signextendhisi_update): Likewise.
15693 (loadsi_update): Likewise.
15694 (loadsf_update): Likewise.
15695 (movsicc_insn): Likewise.
15696 (bset_insn): Likewise.
15697 (bxor_insn): Likewise.
15698 (bclr_insn): Likewise.
15699 (bmsk_insn): Likewise.
15700 (bicsi3_insn): Likewise.
15701 (cmpsi_cc_c_insn): Likewise.
15702 (movsi_ne): Likewise.
15703 (movsi_cond_exec): Likewise.
15704 (clrsbsi2): Likewise.
15705 (norm_f): Likewise.
15706 (normw): Likewise.
15707 (swap): Likewise.
15708 (divaw): Likewise.
15709 (flag): Likewise.
15710 (sr): Likewise.
15711 (kflag): Likewise.
15712 (ffs): Likewise.
15713 (ffs_f): Likewise.
15714 (fls): Likewise.
15715 (call_i): Remove 'S' asm letter, add jli instruction.
15716 (call_value_i): Likewise.
15717 * config/arc/arc.op (mjli-always): New option.
15718 * config/arc/constraints.md (Cji): New constraint.
15719 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15720 operand.
15721 (subsf3_fpx): Likewise.
15722 (mulsf3_fpx): Likewise.
15723 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15724 asm operand.
15725 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15726 function attrbutes.
15727 * doc/invoke.texi (ARC): Document mjli-always option.
15728
15729 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
15730
15731 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15732 avoid addition with 0 and use incw and decw where possible.
15733
15734 2018-01-26 Richard Biener <rguenther@suse.de>
15735
15736 PR tree-optimization/81082
15737 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15738 association if it requires casting to unsigned.
15739 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15740 from fold_plusminus_mult_expr to catch important cases late when
15741 range info is available.
15742
15743 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15744
15745 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15746 * configure.ac (hidden_linkonce): New test.
15747 * configure: Regenerate.
15748 * config.in: Regenerate.
15749
15750 2018-01-26 Julia Koval <julia.koval@intel.com>
15751
15752 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15753 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15754 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15755 _mm_mask_bitshuffle_epi64_mask): Fix type.
15756 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15757 USI_FTYPE_V4DI_V4DI_USI): Remove.
15758 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15759 __builtin_ia32_vpshufbitqmb256_mask,
15760 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15761 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15762 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15763
15764 2018-01-26 Alan Modra <amodra@gmail.com>
15765
15766 PR target/84033
15767 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15768 UNSPEC_VBPERMQ. Sort other unspecs.
15769
15770 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15771
15772 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15773
15774 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15775
15776 PR middle-end/83055
15777 * predict.c (drop_profile): Do not push/pop cfun; update also
15778 node->count.
15779 (handle_missing_profiles): Fix logic looking for zero profiles.
15780
15781 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15782
15783 PR middle-end/83977
15784 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15785 on functions with #pragma omp declare simd or functions with simd
15786 attribute.
15787 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15788 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15789 Remove trailing \n from warning_at calls.
15790
15791 2018-01-25 Tom de Vries <tom@codesourcery.com>
15792
15793 PR target/84028
15794 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15795 for neutered workers.
15796
15797 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15798
15799 PR target/68467
15800 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15801 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15802
15803 2018-01-24 Jeff Law <law@redhat.com>
15804
15805 PR target/83994
15806 * i386.c (get_probe_interval): Move to earlier point.
15807 (ix86_compute_frame_layout): If -fstack-clash-protection and
15808 the frame is larger than the probe interval, then use pushes
15809 to save registers rather than reg->mem moves.
15810 (ix86_expand_prologue): Remove conditional for int_registers_saved
15811 assertion.
15812
15813 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15814
15815 PR target/84014
15816 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15817 min/max for never referenced object.
15818
15819 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15820
15821 PR middle-end/83977
15822 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15823 here.
15824 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15825 attributes from DECL_ATTRIBUTES (decl) without affecting
15826 DECL_ATTRIBUTES (current_function_decl).
15827 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15828 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15829
15830 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15831
15832 PR tree-optimization/83979
15833 * fold-const.c (fold_comparison): Use constant_boolean_node
15834 instead of boolean_{true,false}_node.
15835
15836 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15837
15838 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15839 with zero counts.
15840
15841 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15842
15843 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15844 Simplify the clause that sets the length attribute.
15845 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15846 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15847 clause that sets the length attribute.
15848 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15849
15850 2018-01-24 Tom de Vries <tom@codesourcery.com>
15851
15852 PR target/83589
15853 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15854 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15855 Add strict parameter.
15856 (prevent_branch_around_nothing): Insert dummy insn between branch to
15857 label and label with no ptx insn inbetween.
15858 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15859
15860 2018-01-24 Tom de Vries <tom@codesourcery.com>
15861
15862 PR target/81352
15863 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15864 for neutered threads in warp.
15865 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15866
15867 2018-01-24 Richard Biener <rguenther@suse.de>
15868
15869 PR tree-optimization/83176
15870 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15871 operands.
15872
15873 2018-01-24 Richard Biener <rguenther@suse.de>
15874
15875 PR tree-optimization/82819
15876 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15877 code generating pluses that are no-ops in the target precision.
15878
15879 2018-01-24 Richard Biener <rguenther@suse.de>
15880
15881 PR middle-end/84000
15882 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15883
15884 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15885
15886 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15887 to merge probabilities.
15888 * predict.c (probably_never_executed): Also mark as cold functions
15889 with global 0 profile and guessed local profile.
15890 * profile-count.c (profile_probability::combine_with_count): New
15891 member function.
15892 * profile-count.h (profile_probability::operator*,
15893 profile_probability::operator*=, profile_probability::operator/,
15894 profile_probability::operator/=): Reduce precision to adjusted
15895 and set value to guessed on contradictory divisions.
15896 (profile_probability::combine_with_freq): Remove.
15897 (profile_probability::combine_wiht_count): Declare.
15898 (profile_count::force_nonzero):: Set to adjusted.
15899 (profile_count::probability_in):: Set quality to adjusted.
15900 * tree-ssa-tail-merge.c (replace_block_by): Use
15901 combine_with_count.
15902
15903 2018-01-23 Andrew Waterman <andrew@sifive.com>
15904 Jim Wilson <jimw@sifive.com>
15905
15906 * config/riscv/riscv.c (riscv_stack_boundary): New.
15907 (riscv_option_override): Set riscv_stack_boundary. Handle
15908 riscv_preferred_stack_boundary_arg.
15909 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15910 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15911 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15912 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15913 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15914 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15915
15916 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15917
15918 PR target/83905
15919 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15920 of struct ix86_frame.
15921 (ix86_expand_epilogue): Likewise. Add a local variable for
15922 the reg_save_offset field in struct ix86_frame.
15923
15924 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15925
15926 PR tree-optimization/82604
15927 * tree-loop-distribution.c (enum partition_kind): New enum item
15928 PKIND_PARTIAL_MEMSET.
15929 (partition_builtin_p): Support above new enum item.
15930 (generate_code_for_partition): Ditto.
15931 (compute_access_range): Differentiate cases that equality can be
15932 proven at all loops, the innermost loops or no loops.
15933 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15934 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15935 (finalize_partitions, distribute_loop): Don't fuse partition of
15936 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15937 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15938 parloop is enabled.
15939
15940 2018-01-23 Martin Liska <mliska@suse.cz>
15941
15942 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15943 order to ignore the predictor.
15944 (PRED_POLYMORPHIC_CALL): Likewise.
15945 (PRED_RECURSIVE_CALL): Likewise.
15946
15947 2018-01-23 Martin Liska <mliska@suse.cz>
15948
15949 * tree-profile.c (tree_profiling): Print function header to
15950 aware reader which function we are working on.
15951 * value-prof.c (gimple_find_values_to_profile): Do not print
15952 not interesting value histograms.
15953
15954 2018-01-23 Martin Liska <mliska@suse.cz>
15955
15956 * profile-count.h (enum profile_quality): Add
15957 profile_uninitialized as the first value. Do not number values
15958 as they are zero based.
15959 (profile_count::verify): Update sanity check.
15960 (profile_probability::verify): Likewise.
15961
15962 2018-01-23 Nathan Sidwell <nathan@acm.org>
15963
15964 * doc/invoke.texi (ffor-scope): Deprecate.
15965
15966 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15967
15968 PR tree-optimization/83510
15969 * domwalk.c (set_all_edges_as_executable): New function.
15970 (dom_walker::dom_walker): Convert bool param
15971 "skip_unreachable_blocks" to enum reachability. Move setup of
15972 edge flags to set_all_edges_as_executable and only do it when
15973 reachability is REACHABLE_BLOCKS.
15974 * domwalk.h (enum dom_walker::reachability): New enum.
15975 (dom_walker::dom_walker): Convert bool param
15976 "skip_unreachable_blocks" to enum reachability.
15977 (set_all_edges_as_executable): New decl.
15978 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15979 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15980 "reachability".
15981 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15982 but converting true to REACHABLE_BLOCKS.
15983 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15984 * tree-vrp.c
15985 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15986 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15987 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15988 REACHABLE_BLOCKS.
15989 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15990 if check_all_array_refs will be called.
15991
15992 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15993
15994 * tree.c (selftest::test_location_wrappers): Add more test
15995 coverage.
15996
15997 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15998
15999 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16000 (selftest::test_bit_in_range): Likewise.
16001
16002 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16003
16004 PR testsuite/83888
16005 * doc/sourcebuild.texi (vect_float): Say that the selector
16006 only describes the situation when -funsafe-math-optimizations is on.
16007 (vect_float_strict): Document.
16008
16009 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16010
16011 PR tree-optimization/83965
16012 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16013 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16014 instead of checking only for a reduction.
16015 (vect_recog_widen_sum_pattern): Likewise.
16016
16017 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16018
16019 * predict.c (probably_never_executed): Only use precise profile info.
16020 (compute_function_frequency): Skip after inlining hack since we now
16021 have quality checking.
16022
16023 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16024
16025 * profile-count.h (profile_probability::very_unlikely,
16026 profile_probability::unlikely, profile_probability::even): Set
16027 precision to guessed.
16028
16029 2018-01-23 Richard Biener <rguenther@suse.de>
16030
16031 PR tree-optimization/83963
16032 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16033 Properly terminate dominator walk when crossing the exit edge not
16034 when visiting its source block.
16035
16036 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16037
16038 PR c++/83918
16039 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16040 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16041
16042 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16043
16044 PR tree-optimization/83957
16045 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16046 semicolon after for body surrounded by braces.
16047
16048 PR tree-optimization/83081
16049 * profile-count.h (profile_probability::split): New method.
16050 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16051 Use profile_probability::split.
16052 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16053 when splitting a single conditional jump into 2.
16054
16055 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16056
16057 PR tree-optimization/69452
16058 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16059 decl.
16060
16061 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16062
16063 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16064 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16065 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16066
16067 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16068
16069 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16070 declaration.
16071 * config/rl78/rl78.md (movdi): New define_expand.
16072 * config/rl78/rl78.c (rl78_split_movdi): New function.
16073
16074 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16075
16076 PR target/83862
16077 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16078 no longer used.
16079 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16080 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16081 128-bit to produce an UNSPEC move to get the double word with the
16082 signbit and then a shift directly to do signbit.
16083 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16084 implementation with a new version that just does either a direct
16085 move or a regular move. Move memory interface to separate insns.
16086 Move insns so they are next to the expander.
16087 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16088 with signbit move. Split big and little endian case.
16089 (signbit<mode>2_dm_mem_le): Likewise.
16090 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16091 (signbit<mode>2_dm2): Likewise.
16092
16093 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16094
16095 * config/rl78/rl78.md (anddi3): New define_expand.
16096
16097 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16098
16099 * config/rl78/rl78.md (umindi3): New define_expand.
16100
16101 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16102
16103 * config/rl78/rl78.md (smindi3): New define_expand.
16104
16105 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16106
16107 * config/rl78/rl78.md (smaxdi3): New define_expand.
16108
16109 2018-01-22 Carl Love <cel@us.ibm.com>
16110
16111 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16112 LVX_V1TI): Add macro expansion.
16113 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16114 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16115 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16116 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16117 Change check to determine if the instruction is a byte reversing
16118 entry. Fix typo in comment.
16119 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16120 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16121 Add def_builtin calls for new builtins.
16122 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16123 Add define_insn expansion.
16124
16125 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16126
16127 * config/rl78/rl78.md (umaxdi3): New define_expand.
16128
16129 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16130
16131 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16132 for non-QImode registers.
16133
16134 2018-01-22 Richard Biener <rguenther@suse.de>
16135
16136 PR tree-optimization/83963
16137 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16138 including the loop exit block.
16139 (scop_detection::merge_sese): Likewise.
16140 (scop_detection::add_scop): Do it here instead.
16141
16142 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16143
16144 * doc/sourcebuild.texi (arm_softfloat): Document.
16145
16146 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16147
16148 PR gcc/77734
16149 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16150 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16151 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16152
16153 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16154 David Edelsohn <dje.gcc@gmail.com>
16155
16156 PR target/83946
16157 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16158 Change "crset eq" to "crset 2".
16159 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16160 (*call_indirect_aix<mode>_nospec): Likewise.
16161 (*call_value_indirect_aix<mode>_nospec): Likewise.
16162 (*call_indirect_elfv2<mode>_nospec): Likewise.
16163 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16164 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16165 change assembly output from . to $.
16166 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16167 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16168 (*tablejump<mode>_internal1_nospec): Likewise.
16169
16170 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16171
16172 PR target/80870
16173 * config/sh/sh_optimize_sett_clrt.cc:
16174 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16175
16176 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16177
16178 PR tree-optimization/83940
16179 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16180 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16181 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16182 use it to pass back the definition type.
16183 (vect_check_store_rhs): Likewise rhs_dt_out.
16184 (vect_build_gather_load_calls): Add a mask_dt argument and use
16185 it instead of a call to vect_is_simple_use.
16186 (vectorizable_store): Update calls to vect_check_load_store_mask
16187 and vect_check_store_rhs. Use the dt returned by the latter instead
16188 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16189 instead of calls to vect_is_simple_use. Pass the scalar rather
16190 than the vector operand to vect_is_simple_use when handling
16191 second and subsequent copies of an rhs value.
16192 (vectorizable_load): Update calls to vect_check_load_store_mask
16193 and vect_build_gather_load_calls. Use the cached mask_dt and
16194 gs_info.offset_dt instead of calls to vect_is_simple_use.
16195
16196 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16197
16198 PR middle-end/83945
16199 * tree-emutls.c: Include gimplify.h.
16200 (lower_emutls_2): New function.
16201 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16202 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16203 it before further processing.
16204
16205 PR target/83930
16206 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16207 UINTVAL (trueop1) instead of INTVAL (op1).
16208
16209 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16210
16211 PR debug/81570
16212 PR debug/83728
16213 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16214 INCOMING_FRAME_SP_OFFSET if not defined.
16215 (scan_trace): Add ENTRY argument. If true and
16216 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16217 emit a note to adjust the CFA offset.
16218 (create_cfi_notes): Adjust scan_trace callers.
16219 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16220 INCOMING_FRAME_SP_OFFSET in the CIE.
16221 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16222 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16223 Likewise.
16224 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16225 * doc/tm.texi: Regenerated.
16226
16227 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16228
16229 PR rtl-optimization/83147
16230 * lra-constraints.c (remove_inheritance_pseudos): Use
16231 lra_substitute_pseudo_within_insn.
16232
16233 2018-01-19 Tom de Vries <tom@codesourcery.com>
16234 Cesar Philippidis <cesar@codesourcery.com>
16235
16236 PR target/83920
16237 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16238
16239 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16240
16241 PR target/83790
16242 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16243 spaces for function labels.
16244
16245 2018-01-19 Martin Liska <mliska@suse.cz>
16246
16247 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16248 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16249 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16250 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16251 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16252 (PRED_CONST_RETURN): Change from 69 to 65.
16253 (PRED_NULL_RETURN): Change from 91 to 71.
16254 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16255 (PRED_LOOP_GUARD): Change from 66 to 73.
16256
16257 2018-01-19 Martin Liska <mliska@suse.cz>
16258
16259 * predict.c (predict_insn_def): Add new assert.
16260 (struct branch_predictor): Change type to signed integer.
16261 (test_prediction_value_range): Amend test to cover
16262 PROB_UNINITIALIZED.
16263 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16264 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16265 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16266 (PRED_LOOP_IV_COMPARE): Likewise.
16267 * predict.h (PROB_UNINITIALIZED): Define new constant.
16268
16269 2018-01-19 Martin Liska <mliska@suse.cz>
16270
16271 * predict.c (dump_prediction): Add new format for
16272 analyze_brprob.py script which is enabled with -details
16273 suboption.
16274 * profile-count.h (precise_p): New function.
16275
16276 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16277
16278 PR tree-optimization/83922
16279 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16280 there are no statements that need masking.
16281 (vect_active_double_reduction_p): New function.
16282 (vect_analyze_loop_operations): Use it when handling phis that
16283 are not in the loop header.
16284
16285 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16286
16287 PR tree-optimization/83914
16288 * tree-vect-loop.c (vectorizable_induction): Don't convert
16289 init_expr or apply the peeling adjustment for inductions
16290 that are nested within the vectorized loop.
16291
16292 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16293
16294 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16295 instead of NEG.
16296
16297 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16298
16299 PR sanitizer/81715
16300 PR testsuite/83882
16301 * function.h (gimplify_parameters): Add gimple_seq * argument.
16302 * function.c: Include gimple.h and options.h.
16303 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16304 for the added local temporaries if needed.
16305 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16306 if there are any parameter cleanups, wrap whole body into a
16307 try/finally with the cleanups.
16308
16309 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16310
16311 PR target/82964
16312 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16313 Use GET_MODE_CLASS for scalar floating point.
16314
16315 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16316
16317 PR ipa/82256
16318 patch by PaX Team
16319 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16320 Fix call of call_cgraph_insertion_hooks.
16321
16322 2018-01-18 Martin Sebor <msebor@redhat.com>
16323
16324 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16325
16326 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16327
16328 PR ipa/83619
16329 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16330 frequencies.
16331
16332 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16333
16334 PR other/70268
16335 * common.opt: (-ffile-prefix-map): New option.
16336 * opts.c (common_handle_option): Defer it.
16337 * opts-global.c (handle_common_deferred_options): Handle it.
16338 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16339 * file-prefix-map.h: New file.
16340 (remap_debug_filename, add_debug_prefix_map): ...here.
16341 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16342 * final.c (debug_prefix_map, add_debug_prefix_map
16343 remap_debug_filename): Move to...
16344 * file-prefix-map.c: New file.
16345 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16346 generalize, get rid of alloca(), use strrchr() instead of strchr().
16347 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16348 Implement in terms of add_prefix_map().
16349 (remap_macro_filename, remap_debug_filename): Implement in term of
16350 remap_filename().
16351 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16352 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16353 * dbxout.c: Include file-prefix-map.h.
16354 * varasm.c: Likewise.
16355 * vmsdbgout.c: Likewise.
16356 * xcoffout.c: Likewise.
16357 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16358 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16359 * doc/invoke.texi (-ffile-prefix-map): Document.
16360 (-fdebug-prefix-map): Update description.
16361
16362 2018-01-18 Martin Liska <mliska@suse.cz>
16363
16364 * config/i386/i386.c (indirect_thunk_name): Document that also
16365 lfence is emitted.
16366 (output_indirect_thunk): Document why both instructions
16367 (pause and lfence) are generated.
16368
16369 2018-01-18 Richard Biener <rguenther@suse.de>
16370
16371 PR tree-optimization/83887
16372 * graphite-scop-detection.c
16373 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16374 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16375 (scop_detection::merge_sese): Re-implement with a flood-fill
16376 algorithm that properly finds a SESE region if it exists.
16377
16378 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16379
16380 PR c/61240
16381 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16382 pointer_diff optimizations use view_convert instead of convert.
16383
16384 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16385
16386 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16387 Generate different code for -mno-speculate-indirect-jumps.
16388 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16389 (*call_indirect_aix<mode>): Disable for
16390 -mno-speculate-indirect-jumps.
16391 (*call_indirect_aix<mode>_nospec): New define_insn.
16392 (*call_value_indirect_aix<mode>): Disable for
16393 -mno-speculate-indirect-jumps.
16394 (*call_value_indirect_aix<mode>_nospec): New define_insn.
16395 (*sibcall_nonlocal_sysv<mode>): Generate different code for
16396 -mno-speculate-indirect-jumps.
16397 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16398
16399 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16400
16401 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16402 long double type, set the flags for noting the default long double
16403 type, even if we don't pass or return a long double type.
16404
16405 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
16406
16407 PR ipa/83051
16408 * ipa-inline.c (flatten_function): Do not overwrite final inlining
16409 failure.
16410
16411 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
16412
16413 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16414 support for merge[hl].
16415 (fold_mergehl_helper): New helper function.
16416 (tree-vector-builder.h): New #include for tree_vector_builder usage.
16417 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16418 (altivec_vmrglw_direct): Add xxmrglw insn.
16419
16420 2018-01-17 Andrew Waterman <andrew@sifive.com>
16421
16422 * config/riscv/riscv.c (riscv_conditional_register_usage): If
16423 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16424
16425 2018-01-17 David Malcolm <dmalcolm@redhat.com>
16426
16427 PR lto/83121
16428 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16429 call the lto_location_cache before reading the
16430 DECL_SOURCE_LOCATION of the types.
16431
16432 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
16433 Richard Sandiford <richard.sandiford@linaro.org>
16434
16435 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16436 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16437 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16438 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16439 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16440 Add declaration.
16441 * config/aarch64/constraints.md (aarch64_movti_operand):
16442 Limit immediates.
16443 * config/aarch64/predicates.md (Uti): Add new constraint.
16444
16445 2018-01-17 Carl Love <cel@us.ibm.com>
16446
16447 * config/rs6000/vsx.md (define_expand xl_len_r,
16448 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16449 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16450 lxvll.
16451 (define_expand, define_insn): Move the shift left from the
16452 define_insn to the define_expand for lxvl and stxvl instructions.
16453 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16454 and XL_LEN_R definitions to PURE.
16455
16456 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
16457
16458 * config/i386/i386.c (indirect_thunk_name): Declare regno
16459 as unsigned int. Compare regno with INVALID_REGNUM.
16460 (output_indirect_thunk): Ditto.
16461 (output_indirect_thunk_function): Ditto.
16462 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
16463 in the call to output_indirect_thunk_function.
16464
16465 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
16466
16467 PR middle-end/83884
16468 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16469 rather than the size of inner_type to determine the stack slot size
16470 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16471
16472 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
16473
16474 PR target/83546
16475 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16476 to PTA_SILVERMONT.
16477
16478 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
16479
16480 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16481 endian Linux systems to optionally enable multilibs for selecting
16482 the long double type if the user configured an explicit type.
16483 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16484 have no long double multilibs if not defined.
16485 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16486 warn if the user used -mabi={ieee,ibm}longdouble and we built
16487 multilibs for long double.
16488 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16489 appropriate multilib option.
16490 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16491 multilib options.
16492 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16493 for building long double multilibs.
16494 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16495
16496 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
16497
16498 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16499 copies.
16500
16501 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16502 64 bits.
16503 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16504 128 bits.
16505
16506 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16507 variables.
16508
16509 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16510 return value.
16511
16512 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16513
16514 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16515 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16516
16517 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16518
16519 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16520 different rtl trees depending on TARGET_64BIT.
16521 (rs6000_gen_lvx): Likewise.
16522
16523 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16524
16525 * config/visium/visium.md (nop): Tweak comment.
16526 (hazard_nop): Likewise.
16527
16528 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16529
16530 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16531 -mspeculate-indirect-jumps.
16532 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16533 for -mno-speculate-indirect-jumps.
16534 (*call_indirect_elfv2<mode>_nospec): New define_insn.
16535 (*call_value_indirect_elfv2<mode>): Disable for
16536 -mno-speculate-indirect-jumps.
16537 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16538 (indirect_jump): Emit different RTL for
16539 -mno-speculate-indirect-jumps.
16540 (*indirect_jump<mode>): Disable for
16541 -mno-speculate-indirect-jumps.
16542 (*indirect_jump<mode>_nospec): New define_insn.
16543 (tablejump): Emit different RTL for
16544 -mno-speculate-indirect-jumps.
16545 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16546 (tablejumpsi_nospec): New define_expand.
16547 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16548 (tablejumpdi_nospec): New define_expand.
16549 (*tablejump<mode>_internal1): Disable for
16550 -mno-speculate-indirect-jumps.
16551 (*tablejump<mode>_internal1_nospec): New define_insn.
16552 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16553 option.
16554
16555 2018-01-16 Artyom Skrobov tyomitch@gmail.com
16556
16557 * caller-save.c (insert_save): Drop unnecessary parameter. All
16558 callers updated.
16559
16560 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16561 Richard Biener <rguenth@suse.de>
16562
16563 PR libgomp/83590
16564 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16565 return early, inline manually is_gimple_sizepos. Make sure if we
16566 call gimplify_expr we don't end up with a gimple constant.
16567 * tree.c (variably_modified_type_p): Don't return true for
16568 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
16569 * gimplify.h (is_gimple_sizepos): Remove.
16570
16571 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16572
16573 PR tree-optimization/83857
16574 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16575 vectorizable_live_operation for pure SLP statements.
16576 (vectorizable_live_operation): Handle PHIs.
16577
16578 2018-01-16 Richard Biener <rguenther@suse.de>
16579
16580 PR tree-optimization/83867
16581 * tree-vect-stmts.c (vect_transform_stmt): Precompute
16582 nested_in_vect_loop_p since the scalar stmt may get invalidated.
16583
16584 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16585
16586 PR c/83844
16587 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16588 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16589 If off is not INTEGER_CST, issue a may not be aligned warning
16590 rather than isn't aligned. Use isn%'t rather than isn't.
16591 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16592 into MULT_EXPR.
16593 <case MULT_EXPR>: Improve the case when bottom and one of the
16594 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16595 operand, in that case check if the other operand is multiple of
16596 bottom divided by the INTEGER_CST operand.
16597
16598 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16599
16600 PR target/83858
16601 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16602 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16603 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16604 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16605 * config/pa/pa.c (pa_function_arg_advance): Likewise.
16606 (pa_function_arg, pa_arg_partial_bytes): Likewise.
16607 (pa_function_arg_size): New function.
16608
16609 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16610
16611 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16612 in a separate statement.
16613
16614 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16615
16616 PR tree-optimization/83847
16617 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16618 group gathers and scatters.
16619
16620 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16621
16622 PR rtl-optimization/86620
16623 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16624
16625 PR rtl-optimization/83213
16626 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16627 to last if both are JUMP_INSNs.
16628
16629 PR tree-optimization/83843
16630 * gimple-ssa-store-merging.c
16631 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16632 store_immediate_info for bswap/nop orig_stores.
16633
16634 2018-01-15 Andrew Waterman <andrew@sifive.com>
16635
16636 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16637 !TARGET_MUL.
16638 <UDIV>: Increase cost if !TARGET_DIV.
16639
16640 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16641
16642 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16643 (define_attr "cr_logical_3op"): New.
16644 (cceq_ior_compare): Adjust.
16645 (cceq_ior_compare_complement): Adjust.
16646 (*cceq_rev_compare): Adjust.
16647 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16648 (is_cracked_insn): Adjust.
16649 (insn_must_be_first_in_group): Adjust.
16650 * config/rs6000/40x.md: Adjust.
16651 * config/rs6000/440.md: Adjust.
16652 * config/rs6000/476.md: Adjust.
16653 * config/rs6000/601.md: Adjust.
16654 * config/rs6000/603.md: Adjust.
16655 * config/rs6000/6xx.md: Adjust.
16656 * config/rs6000/7450.md: Adjust.
16657 * config/rs6000/7xx.md: Adjust.
16658 * config/rs6000/8540.md: Adjust.
16659 * config/rs6000/cell.md: Adjust.
16660 * config/rs6000/e300c2c3.md: Adjust.
16661 * config/rs6000/e500mc.md: Adjust.
16662 * config/rs6000/e500mc64.md: Adjust.
16663 * config/rs6000/e5500.md: Adjust.
16664 * config/rs6000/e6500.md: Adjust.
16665 * config/rs6000/mpc.md: Adjust.
16666 * config/rs6000/power4.md: Adjust.
16667 * config/rs6000/power5.md: Adjust.
16668 * config/rs6000/power6.md: Adjust.
16669 * config/rs6000/power7.md: Adjust.
16670 * config/rs6000/power8.md: Adjust.
16671 * config/rs6000/power9.md: Adjust.
16672 * config/rs6000/rs64.md: Adjust.
16673 * config/rs6000/titan.md: Adjust.
16674
16675 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16676
16677 * config/i386/predicates.md (indirect_branch_operand): Rewrite
16678 ix86_indirect_branch_register logic.
16679
16680 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16681
16682 * config/i386/constraints.md (Bs): Update
16683 ix86_indirect_branch_register check. Don't check
16684 ix86_indirect_branch_register with GOT_memory_operand.
16685 (Bw): Likewise.
16686 * config/i386/predicates.md (GOT_memory_operand): Don't check
16687 ix86_indirect_branch_register here.
16688 (GOT32_symbol_operand): Likewise.
16689
16690 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16691
16692 * config/i386/predicates.md (constant_call_address_operand):
16693 Rewrite ix86_indirect_branch_register logic.
16694 (sibcall_insn_operand): Likewise.
16695
16696 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16697
16698 * config/i386/constraints.md (Bs): Replace
16699 ix86_indirect_branch_thunk_register with
16700 ix86_indirect_branch_register.
16701 (Bw): Likewise.
16702 * config/i386/i386.md (indirect_jump): Likewise.
16703 (tablejump): Likewise.
16704 (*sibcall_memory): Likewise.
16705 (*sibcall_value_memory): Likewise.
16706 Peepholes of indirect call and jump via memory: Likewise.
16707 * config/i386/i386.opt: Likewise.
16708 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16709 (GOT_memory_operand): Likewise.
16710 (call_insn_operand): Likewise.
16711 (sibcall_insn_operand): Likewise.
16712 (GOT32_symbol_operand): Likewise.
16713
16714 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16715
16716 PR middle-end/83837
16717 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16718 type rather than type addr's type points to.
16719 (expand_omp_atomic_mutex): Likewise.
16720 (expand_omp_atomic): Likewise.
16721
16722 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16723
16724 PR target/83839
16725 * config/i386/i386.c (output_indirect_thunk_function): Use
16726 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16727 for __x86_return_thunk.
16728
16729 2018-01-15 Richard Biener <rguenther@suse.de>
16730
16731 PR middle-end/83850
16732 * expmed.c (extract_bit_field_1): Fix typo.
16733
16734 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16735
16736 PR target/83687
16737 * config/arm/iterators.md (VF): New mode iterator.
16738 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16739 Remove integer-related logic from pattern.
16740 (neon_vabd<mode>_3): Likewise.
16741
16742 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16743
16744 PR middle-end/82694
16745 * common.opt (fstrict-overflow): No longer an alias.
16746 (fwrapv-pointer): New option.
16747 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16748 also for pointer types based on flag_wrapv_pointer.
16749 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16750 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16751 opts->x_flag_wrapv got set.
16752 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16753 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16754 POINTER_TYPE_OVERFLOW_UNDEFINED.
16755 * match.pd: Likewise in address comparison pattern.
16756 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16757
16758 2018-01-15 Richard Biener <rguenther@suse.de>
16759
16760 PR lto/83804
16761 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16762 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16763 Reset type names to their identifier if their TYPE_DECL doesn't
16764 have linkage (and thus is used for ODR and devirt).
16765 (save_debug_info_for_decl): Remove.
16766 (save_debug_info_for_type): Likewise.
16767 (add_tree_to_fld_list): Adjust.
16768 * tree-pretty-print.c (dump_generic_node): Make dumping of
16769 type names more robust.
16770
16771 2018-01-15 Richard Biener <rguenther@suse.de>
16772
16773 * BASE-VER: Bump to 8.0.1.
16774
16775 2018-01-14 Martin Sebor <msebor@redhat.com>
16776
16777 PR other/83508
16778 * builtins.c (check_access): Avoid warning when the no-warning bit
16779 is set.
16780
16781 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16782
16783 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16784 * ira-color (allocno_hard_regs_compare): Likewise.
16785
16786 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16787
16788 PR target/83013
16789 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16790 Use .pushsection/.popsection.
16791
16792 2018-01-14 Martin Sebor <msebor@redhat.com>
16793
16794 PR c++/81327
16795 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16796
16797 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16798
16799 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16800 entry from extra_headers.
16801 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16802 extra_headers, make the list bitwise identical to the i?86-*-* one.
16803
16804 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16805
16806 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16807 -mcmodel=large with -mindirect-branch=thunk,
16808 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16809 -mfunction-return=thunk-extern.
16810 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16811 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16812 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16813
16814 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16815
16816 * config/i386/i386.c (print_reg): Print the name of the full
16817 integer register without '%'.
16818 (ix86_print_operand): Handle 'V'.
16819 * doc/extend.texi: Document 'V' modifier.
16820
16821 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16822
16823 * config/i386/constraints.md (Bs): Disallow memory operand for
16824 -mindirect-branch-register.
16825 (Bw): Likewise.
16826 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16827 (GOT_memory_operand): Likewise.
16828 (call_insn_operand): Likewise.
16829 (sibcall_insn_operand): Likewise.
16830 (GOT32_symbol_operand): Likewise.
16831 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16832 for -mindirect-branch-register.
16833 (tablejump): Likewise.
16834 (*sibcall_memory): Likewise.
16835 (*sibcall_value_memory): Likewise.
16836 Disallow peepholes of indirect call and jump via memory for
16837 -mindirect-branch-register.
16838 (*call_pop): Replace m with Bw.
16839 (*call_value_pop): Likewise.
16840 (*sibcall_pop_memory): Replace m with Bs.
16841 * config/i386/i386.opt (mindirect-branch-register): New option.
16842 * doc/invoke.texi: Document -mindirect-branch-register option.
16843
16844 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16845
16846 * config/i386/i386-protos.h (ix86_output_function_return): New.
16847 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16848 set function_return_type.
16849 (indirect_thunk_name): Add ret_p to indicate thunk for function
16850 return.
16851 (output_indirect_thunk_function): Pass false to
16852 indirect_thunk_name.
16853 (ix86_output_indirect_branch_via_reg): Likewise.
16854 (ix86_output_indirect_branch_via_push): Likewise.
16855 (output_indirect_thunk_function): Create alias for function
16856 return thunk if regno < 0.
16857 (ix86_output_function_return): New function.
16858 (ix86_handle_fndecl_attribute): Handle function_return.
16859 (ix86_attribute_table): Add function_return.
16860 * config/i386/i386.h (machine_function): Add
16861 function_return_type.
16862 * config/i386/i386.md (simple_return_internal): Use
16863 ix86_output_function_return.
16864 (simple_return_internal_long): Likewise.
16865 * config/i386/i386.opt (mfunction-return=): New option.
16866 (indirect_branch): Mention -mfunction-return=.
16867 * doc/extend.texi: Document function_return function attribute.
16868 * doc/invoke.texi: Document -mfunction-return= option.
16869
16870 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16871
16872 * config/i386/i386-opts.h (indirect_branch): New.
16873 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16874 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16875 with local indirect jump when converting indirect call and jump.
16876 (ix86_set_indirect_branch_type): New.
16877 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16878 (indirectlabelno): New.
16879 (indirect_thunk_needed): Likewise.
16880 (indirect_thunk_bnd_needed): Likewise.
16881 (indirect_thunks_used): Likewise.
16882 (indirect_thunks_bnd_used): Likewise.
16883 (INDIRECT_LABEL): Likewise.
16884 (indirect_thunk_name): Likewise.
16885 (output_indirect_thunk): Likewise.
16886 (output_indirect_thunk_function): Likewise.
16887 (ix86_output_indirect_branch_via_reg): Likewise.
16888 (ix86_output_indirect_branch_via_push): Likewise.
16889 (ix86_output_indirect_branch): Likewise.
16890 (ix86_output_indirect_jmp): Likewise.
16891 (ix86_code_end): Call output_indirect_thunk_function if needed.
16892 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16893 needed.
16894 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16895 (ix86_attribute_table): Add indirect_branch.
16896 * config/i386/i386.h (machine_function): Add indirect_branch_type
16897 and has_local_indirect_jump.
16898 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16899 to true.
16900 (tablejump): Likewise.
16901 (*indirect_jump): Use ix86_output_indirect_jmp.
16902 (*tablejump_1): Likewise.
16903 (simple_return_indirect_internal): Likewise.
16904 * config/i386/i386.opt (mindirect-branch=): New option.
16905 (indirect_branch): New.
16906 (keep): Likewise.
16907 (thunk): Likewise.
16908 (thunk-inline): Likewise.
16909 (thunk-extern): Likewise.
16910 * doc/extend.texi: Document indirect_branch function attribute.
16911 * doc/invoke.texi: Document -mindirect-branch= option.
16912
16913 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16914
16915 PR ipa/83051
16916 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16917
16918 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16919
16920 * ipa-inline.c (want_inline_small_function_p): Return false if
16921 inlining has already failed with CIF_FINAL_ERROR.
16922 (update_caller_keys): Call want_inline_small_function_p before
16923 can_inline_edge_p.
16924 (update_callee_keys): Likewise.
16925
16926 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16927
16928 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16929 New function.
16930 (rs6000_quadword_masked_address_p): Likewise.
16931 (quad_aligned_load_p): Likewise.
16932 (quad_aligned_store_p): Likewise.
16933 (const_load_sequence_p): Add comment to describe the outer-most loop.
16934 (mimic_memory_attributes_and_flags): New function.
16935 (rs6000_gen_stvx): Likewise.
16936 (replace_swapped_aligned_store): Likewise.
16937 (rs6000_gen_lvx): Likewise.
16938 (replace_swapped_aligned_load): Likewise.
16939 (replace_swapped_load_constant): Capitalize argument name in
16940 comment describing this function.
16941 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16942 and stores that access quad-word aligned addresses and replace
16943 with stvx or lvx instructions when appropriate.
16944 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16945 New function prototype.
16946 (rs6000_quadword_masked_address_p): Likewise.
16947 (rs6000_gen_lvx): Likewise.
16948 (rs6000_gen_stvx): Likewise.
16949 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16950 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16951 when memory address is aligned.
16952 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16953 this split to select lvx instruction when memory address is aligned.
16954 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16955 instruction when memory address is aligned.
16956 (*vsx_le_perm_load_v16qi): Likewise.
16957 (four unnamed splitters): Modify to select the stvx instruction
16958 when memory is aligned.
16959
16960 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16961
16962 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16963 which appears in the queue multiple times.
16964
16965 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16966 Alan Hayward <alan.hayward@arm.com>
16967 David Sherwood <david.sherwood@arm.com>
16968
16969 * tree-vectorizer.h (vec_lower_bound): New structure.
16970 (_loop_vec_info): Add check_nonzero and lower_bounds.
16971 (LOOP_VINFO_CHECK_NONZERO): New macro.
16972 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16973 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16974 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16975 fields. Make seg_len the distance travelled, not including the
16976 access size.
16977 (dr_direction_indicator): Declare.
16978 (dr_zero_step_indicator): Likewise.
16979 (dr_known_forward_stride_p): Likewise.
16980 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16981 tree-ssanames.h.
16982 (runtime_alias_check_p): Allow runtime alias checks with
16983 variable strides.
16984 (operator ==): Compare access_size and align.
16985 (prune_runtime_alias_test_list): Rework for new distinction between
16986 the access_size and seg_len.
16987 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16988 segment lengths.
16989 (get_segment_min_max): New function.
16990 (create_intersect_range_checks): Use it.
16991 (dr_step_indicator): New function.
16992 (dr_direction_indicator): Likewise.
16993 (dr_zero_step_indicator): Likewise.
16994 (dr_known_forward_stride_p): Likewise.
16995 * tree-loop-distribution.c (data_ref_segment_size): Return
16996 DR_STEP * (niters - 1).
16997 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16998 constructor.
16999 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17000 (vect_preserves_scalar_order_p): New function, split out from...
17001 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17002 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17003 (vect_vfa_access_size): New function.
17004 (vect_vfa_align): Likewise.
17005 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17006 (dump_lower_bound): New function.
17007 (vect_check_lower_bound): Likewise.
17008 (vect_small_gap_p): Likewise.
17009 (vectorizable_with_step_bound_p): Likewise.
17010 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17011 depencies if the vectorization factor is 1. Convert the checks
17012 for nonzero steps into checks on the bounds of DR_STEP. Try using
17013 a bunds check for variable steps if the minimum required step is
17014 relatively small. Update calls to the dr_with_seg_len
17015 constructor and to vect_compile_time_alias.
17016 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17017 function.
17018 (vect_loop_versioning): Call it.
17019 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17020 when retrying.
17021 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17022
17023 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17024 Alan Hayward <alan.hayward@arm.com>
17025 David Sherwood <david.sherwood@arm.com>
17026
17027 * doc/sourcebuild.texi (vect_scatter_store): Document.
17028 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17029 optabs.
17030 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17031 Document.
17032 * genopinit.c (main): Add supports_vec_scatter_store and
17033 supports_vec_scatter_store_cached to target_optabs.
17034 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17035 IFN_MASK_SCATTER_STORE.
17036 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17037 functions.
17038 * internal-fn.h (internal_store_fn_p): Declare.
17039 (internal_fn_stored_value_index): Likewise.
17040 * internal-fn.c (scatter_store_direct): New macro.
17041 (expand_scatter_store_optab_fn): New function.
17042 (direct_scatter_store_optab_supported_p): New macro.
17043 (internal_store_fn_p): New function.
17044 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17045 IFN_MASK_SCATTER_STORE.
17046 (internal_fn_mask_index): Likewise.
17047 (internal_fn_stored_value_index): New function.
17048 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17049 for scatter stores.
17050 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17051 * optabs-query.c (supports_vec_scatter_store_p): New function.
17052 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17053 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17054 true for scatter stores.
17055 (vect_gather_scatter_fn_p): Handle scatter stores too.
17056 (vect_check_gather_scatter): Consider using scatter stores if
17057 supports_vec_scatter_store_p.
17058 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17059 scatter stores too.
17060 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17061 internal_fn_stored_value_index.
17062 (check_load_store_masking): Handle scatter stores too.
17063 (vect_get_store_rhs): Make public.
17064 (vectorizable_call): Use internal_store_fn_p.
17065 (vectorizable_store): Handle scatter store internal functions.
17066 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17067 when deciding whether the end of the group has been reached.
17068 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17069 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17070 (mask_scatter_store<mode>): New insns.
17071
17072 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17073 Alan Hayward <alan.hayward@arm.com>
17074 David Sherwood <david.sherwood@arm.com>
17075
17076 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17077 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17078 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17079 function.
17080 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17081 Use vect_truncate_gather_scatter_offset if we can't treat the
17082 operation as a normal gather load or scatter store.
17083 (get_group_load_store_type): Take the gather_scatter_info
17084 as argument. Try using a gather load or scatter store for
17085 single-element groups.
17086 (get_load_store_type): Update calls to get_group_load_store_type
17087 and vect_use_strided_gather_scatters_p.
17088
17089 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17090 Alan Hayward <alan.hayward@arm.com>
17091 David Sherwood <david.sherwood@arm.com>
17092
17093 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17094 optional tree argument.
17095 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17096 null target hooks.
17097 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17098 but continue to use the current value as a fallback.
17099 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17100 to compare the updates.
17101 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17102 (get_load_store_type): Use it when handling a strided access.
17103 (vect_get_strided_load_store_ops): New function.
17104 (vect_get_data_ptr_increment): Likewise.
17105 (vectorizable_load): Handle strided gather loads. Always pass
17106 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17107
17108 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17109 Alan Hayward <alan.hayward@arm.com>
17110 David Sherwood <david.sherwood@arm.com>
17111
17112 * doc/md.texi (gather_load@var{m}): Document.
17113 (mask_gather_load@var{m}): Likewise.
17114 * genopinit.c (main): Add supports_vec_gather_load and
17115 supports_vec_gather_load_cached to target_optabs.
17116 * optabs-tree.c (init_tree_optimization_optabs): Use
17117 ggc_cleared_alloc to allocate target_optabs.
17118 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17119 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17120 functions.
17121 * internal-fn.h (internal_load_fn_p): Declare.
17122 (internal_gather_scatter_fn_p): Likewise.
17123 (internal_fn_mask_index): Likewise.
17124 (internal_gather_scatter_fn_supported_p): Likewise.
17125 * internal-fn.c (gather_load_direct): New macro.
17126 (expand_gather_load_optab_fn): New function.
17127 (direct_gather_load_optab_supported_p): New macro.
17128 (direct_internal_fn_optab): New function.
17129 (internal_load_fn_p): Likewise.
17130 (internal_gather_scatter_fn_p): Likewise.
17131 (internal_fn_mask_index): Likewise.
17132 (internal_gather_scatter_fn_supported_p): Likewise.
17133 * optabs-query.c (supports_at_least_one_mode_p): New function.
17134 (supports_vec_gather_load_p): Likewise.
17135 * optabs-query.h (supports_vec_gather_load_p): Declare.
17136 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17137 and memory_type field.
17138 (NUM_PATTERNS): Bump to 15.
17139 * tree-vect-data-refs.c: Include internal-fn.h.
17140 (vect_gather_scatter_fn_p): New function.
17141 (vect_describe_gather_scatter_call): Likewise.
17142 (vect_check_gather_scatter): Try using internal functions for
17143 gather loads. Recognize existing calls to a gather load function.
17144 (vect_analyze_data_refs): Consider using gather loads if
17145 supports_vec_gather_load_p.
17146 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17147 (vect_get_gather_scatter_offset_type): Likewise.
17148 (vect_convert_mask_for_vectype): Likewise.
17149 (vect_add_conversion_to_patterm): Likewise.
17150 (vect_try_gather_scatter_pattern): Likewise.
17151 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17152 (vect_vect_recog_func_ptrs): Add it.
17153 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17154 internal_fn_mask_index and internal_gather_scatter_fn_p.
17155 (check_load_store_masking): Take the gather_scatter_info as an
17156 argument and handle gather loads.
17157 (vect_get_gather_scatter_ops): New function.
17158 (vectorizable_call): Check internal_load_fn_p.
17159 (vectorizable_load): Likewise. Handle gather load internal
17160 functions.
17161 (vectorizable_store): Update call to check_load_store_masking.
17162 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17163 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17164 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17165 (aarch64_gather_scale_operand_d): New predicates.
17166 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17167 (mask_gather_load<mode>): New insns.
17168
17169 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17170 Alan Hayward <alan.hayward@arm.com>
17171 David Sherwood <david.sherwood@arm.com>
17172
17173 * optabs.def (fold_left_plus_optab): New optab.
17174 * doc/md.texi (fold_left_plus_@var{m}): Document.
17175 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17176 * internal-fn.c (fold_left_direct): Define.
17177 (expand_fold_left_optab_fn): Likewise.
17178 (direct_fold_left_optab_supported_p): Likewise.
17179 * fold-const-call.c (fold_const_fold_left): New function.
17180 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17181 * tree-parloops.c (valid_reduction_p): New function.
17182 (gather_scalar_reductions): Use it.
17183 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17184 (vect_finish_replace_stmt): Declare.
17185 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17186 (needs_fold_left_reduction_p): New function, split out from...
17187 (vect_is_simple_reduction): ...here. Accept reductions that
17188 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17189 (vect_force_simple_reduction): Also store the reduction type in
17190 the assignment's STMT_VINFO_REDUC_TYPE.
17191 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17192 (merge_with_identity): New function.
17193 (vect_expand_fold_left): Likewise.
17194 (vectorize_fold_left_reduction): Likewise.
17195 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17196 scalar phi in place for it. Check for target support and reject
17197 cases that would reassociate the operation. Defer the transform
17198 phase to vectorize_fold_left_reduction.
17199 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17200 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17201 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17202
17203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17204
17205 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17206 call to ifc_temp_var.
17207
17208 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17209 Alan Hayward <alan.hayward@arm.com>
17210 David Sherwood <david.sherwood@arm.com>
17211
17212 * target.def (legitimize_address_displacement): Take the original
17213 offset as a poly_int.
17214 * targhooks.h (default_legitimize_address_displacement): Update
17215 accordingly.
17216 * targhooks.c (default_legitimize_address_displacement): Likewise.
17217 * doc/tm.texi: Regenerate.
17218 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17219 as an argument, moving assert of ad->disp == ad->disp_term to...
17220 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17221 Try calling targetm.legitimize_address_displacement before expanding
17222 the address rather than afterwards, and adjust for the new interface.
17223 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17224 Match the new hook interface. Handle SVE addresses.
17225 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17226 new hook interface.
17227
17228 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17229
17230 * Makefile.in (OBJS): Add early-remat.o.
17231 * target.def (select_early_remat_modes): New hook.
17232 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17233 * doc/tm.texi: Regenerate.
17234 * targhooks.h (default_select_early_remat_modes): Declare.
17235 * targhooks.c (default_select_early_remat_modes): New function.
17236 * timevar.def (TV_EARLY_REMAT): New timevar.
17237 * passes.def (pass_early_remat): New pass.
17238 * tree-pass.h (make_pass_early_remat): Declare.
17239 * early-remat.c: New file.
17240 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17241 function.
17242 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17243
17244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17245 Alan Hayward <alan.hayward@arm.com>
17246 David Sherwood <david.sherwood@arm.com>
17247
17248 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17249 vfm1 with a bound_epilog parameter.
17250 (vect_do_peeling): Update calls accordingly, and move the prologue
17251 call earlier in the function. Treat the base bound_epilog as 0 for
17252 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17253 this base when peeling for gaps.
17254 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17255 with fully-masked loops.
17256 (vect_estimate_min_profitable_iters): Handle the single peeled
17257 iteration in that case.
17258
17259 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17260 Alan Hayward <alan.hayward@arm.com>
17261 David Sherwood <david.sherwood@arm.com>
17262
17263 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17264 single-element interleaving even if the size is not a power of 2.
17265 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17266 accesses for single-element interleaving if the group size is
17267 not a power of 2.
17268
17269 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17270 Alan Hayward <alan.hayward@arm.com>
17271 David Sherwood <david.sherwood@arm.com>
17272
17273 * doc/md.texi (fold_extract_last_@var{m}): Document.
17274 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17275 * optabs.def (fold_extract_last_optab): New optab.
17276 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17277 * internal-fn.c (fold_extract_direct): New macro.
17278 (expand_fold_extract_optab_fn): Likewise.
17279 (direct_fold_extract_optab_supported_p): Likewise.
17280 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17281 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17282 EXTRACT_LAST_REDUCTION.
17283 (get_initial_def_for_reduction): Do not create an initial vector
17284 for EXTRACT_LAST_REDUCTION reductions.
17285 (vectorizable_reduction): Leave the scalar phi in place for
17286 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17287 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17288 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17289 transform phase to vectorizable_condition.
17290 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17291 split out from...
17292 (vect_finish_stmt_generation): ...here.
17293 (vect_finish_replace_stmt): New function.
17294 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17295 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17296 pattern.
17297 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17298
17299 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17300 Alan Hayward <alan.hayward@arm.com>
17301 David Sherwood <david.sherwood@arm.com>
17302
17303 * doc/md.texi (extract_last_@var{m}): Document.
17304 * optabs.def (extract_last_optab): New optab.
17305 * internal-fn.def (EXTRACT_LAST): New internal function.
17306 * internal-fn.c (cond_unary_direct): New macro.
17307 (expand_cond_unary_optab_fn): Likewise.
17308 (direct_cond_unary_optab_supported_p): Likewise.
17309 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17310 loops using EXTRACT_LAST.
17311 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17312 (extract_last_<mode>): ...this optab.
17313 (vec_extract<mode><Vel>): Update accordingly.
17314
17315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17316 Alan Hayward <alan.hayward@arm.com>
17317 David Sherwood <david.sherwood@arm.com>
17318
17319 * target.def (empty_mask_is_expensive): New hook.
17320 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17321 * doc/tm.texi: Regenerate.
17322 * targhooks.h (default_empty_mask_is_expensive): Declare.
17323 * targhooks.c (default_empty_mask_is_expensive): New function.
17324 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17325 if the target says that empty masks are expensive.
17326 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17327 New function.
17328 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17329
17330 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17331 Alan Hayward <alan.hayward@arm.com>
17332 David Sherwood <david.sherwood@arm.com>
17333
17334 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17335 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17336 (vect_use_loop_mask_for_alignment_p): New function.
17337 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17338 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17339 niters_skip argument. Make sure that the first niters_skip elements
17340 of the first iteration are inactive.
17341 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17342 Update call to vect_set_loop_masks_directly.
17343 (get_misalign_in_elems): New function, split out from...
17344 (vect_gen_prolog_loop_niters): ...here.
17345 (vect_update_init_of_dr): Take a code argument that specifies whether
17346 the adjustment should be added or subtracted.
17347 (vect_update_init_of_drs): Likewise.
17348 (vect_prepare_for_masked_peels): New function.
17349 (vect_do_peeling): Skip prologue peeling if we're using a mask
17350 instead. Update call to vect_update_inits_of_drs.
17351 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17352 mask_skip_niters.
17353 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17354 alignment. Do not include the number of peeled iterations in
17355 the minimum threshold in that case.
17356 (vectorizable_induction): Adjust the start value down by
17357 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17358 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17359 Take the number of skipped iterations into account when calculating
17360 the loop bounds.
17361 * tree-vect-stmts.c (vect_gen_while_not): New function.
17362
17363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17364 Alan Hayward <alan.hayward@arm.com>
17365 David Sherwood <david.sherwood@arm.com>
17366
17367 * doc/sourcebuild.texi (vect_fully_masked): Document.
17368 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17369 default value to 0.
17370 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17371 split out from...
17372 (vect_analyze_loop_2): ...here. Don't check the vectorization
17373 factor against the number of loop iterations if the loop is
17374 fully-masked.
17375
17376 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17377 Alan Hayward <alan.hayward@arm.com>
17378 David Sherwood <david.sherwood@arm.com>
17379
17380 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17381 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17382 (dump_groups): Update accordingly.
17383 (iv_use::mem_type): New member variable.
17384 (address_p): New function.
17385 (record_use): Add a mem_type argument and initialize the new
17386 mem_type field.
17387 (record_group_use): Add a mem_type argument. Use address_p.
17388 Remove obsolete null checks of base_object. Update call to record_use.
17389 (find_interesting_uses_op): Update call to record_group_use.
17390 (find_interesting_uses_cond): Likewise.
17391 (find_interesting_uses_address): Likewise.
17392 (get_mem_type_for_internal_fn): New function.
17393 (find_address_like_use): Likewise.
17394 (find_interesting_uses_stmt): Try find_address_like_use before
17395 calling find_interesting_uses_op.
17396 (addr_offset_valid_p): Use the iv mem_type field as the type
17397 of the addressed memory.
17398 (add_autoinc_candidates): Likewise.
17399 (get_address_cost): Likewise.
17400 (split_small_address_groups_p): Use address_p.
17401 (split_address_groups): Likewise.
17402 (add_iv_candidate_for_use): Likewise.
17403 (autoinc_possible_for_pair): Likewise.
17404 (rewrite_groups): Likewise.
17405 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17406 (determine_group_iv_cost): Update after split of USE_ADDRESS.
17407 (get_alias_ptr_type_for_ptr_address): New function.
17408 (rewrite_use_address): Rewrite address uses in calls that were
17409 identified by find_address_like_use.
17410
17411 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17412 Alan Hayward <alan.hayward@arm.com>
17413 David Sherwood <david.sherwood@arm.com>
17414
17415 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17416 TARGET_MEM_REFs.
17417 * gimple-expr.h (is_gimple_addressable: Likewise.
17418 * gimple-expr.c (is_gimple_address): Likewise.
17419 * internal-fn.c (expand_call_mem_ref): New function.
17420 (expand_mask_load_optab_fn): Use it.
17421 (expand_mask_store_optab_fn): Likewise.
17422
17423 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17424 Alan Hayward <alan.hayward@arm.com>
17425 David Sherwood <david.sherwood@arm.com>
17426
17427 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17428 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17429 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17430 (cond_umax@var{mode}): Document.
17431 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17432 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17433 (cond_umin_optab, cond_umax_optab): New optabs.
17434 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17435 (COND_IOR, COND_XOR): New internal functions.
17436 * internal-fn.h (get_conditional_internal_fn): Declare.
17437 * internal-fn.c (cond_binary_direct): New macro.
17438 (expand_cond_binary_optab_fn): Likewise.
17439 (direct_cond_binary_optab_supported_p): Likewise.
17440 (get_conditional_internal_fn): New function.
17441 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17442 Cope with reduction statements that are vectorized as calls rather
17443 than assignments.
17444 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17445 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17446 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17447 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17448 (UNSPEC_COND_EOR): New unspecs.
17449 (optab): Add mappings for them.
17450 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17451 (sve_int_op, sve_fp_op): New int attributes.
17452
17453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17454 Alan Hayward <alan.hayward@arm.com>
17455 David Sherwood <david.sherwood@arm.com>
17456
17457 * optabs.def (while_ult_optab): New optab.
17458 * doc/md.texi (while_ult@var{m}@var{n}): Document.
17459 * internal-fn.def (WHILE_ULT): New internal function.
17460 * internal-fn.h (direct_internal_fn_supported_p): New override
17461 that takes two types as argument.
17462 * internal-fn.c (while_direct): New macro.
17463 (expand_while_optab_fn): New function.
17464 (convert_optab_supported_p): Likewise.
17465 (direct_while_optab_supported_p): New macro.
17466 * wide-int.h (wi::udiv_ceil): New function.
17467 * tree-vectorizer.h (rgroup_masks): New structure.
17468 (vec_loop_masks): New typedef.
17469 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17470 and fully_masked_p.
17471 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17472 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17473 (vect_max_vf): New function.
17474 (slpeel_make_loop_iterate_ntimes): Delete.
17475 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17476 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17477 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17478 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17479 internal-fn.h, stor-layout.h and optabs-query.h.
17480 (vect_set_loop_mask): New function.
17481 (add_preheader_seq): Likewise.
17482 (add_header_seq): Likewise.
17483 (interleave_supported_p): Likewise.
17484 (vect_maybe_permute_loop_masks): Likewise.
17485 (vect_set_loop_masks_directly): Likewise.
17486 (vect_set_loop_condition_masked): Likewise.
17487 (vect_set_loop_condition_unmasked): New function, split out from
17488 slpeel_make_loop_iterate_ntimes.
17489 (slpeel_make_loop_iterate_ntimes): Rename to..
17490 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
17491 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17492 (vect_do_peeling): Update call accordingly.
17493 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17494 loops.
17495 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17496 mask_compare_type, can_fully_mask_p and fully_masked_p.
17497 (release_vec_loop_masks): New function.
17498 (_loop_vec_info): Use it to free the loop masks.
17499 (can_produce_all_loop_masks_p): New function.
17500 (vect_get_max_nscalars_per_iter): Likewise.
17501 (vect_verify_full_masking): Likewise.
17502 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17503 retries, and free the mask rgroups before retrying. Check loop-wide
17504 reasons for disallowing fully-masked loops. Make the final decision
17505 about whether use a fully-masked loop or not.
17506 (vect_estimate_min_profitable_iters): Do not assume that peeling
17507 for the number of iterations will be needed for fully-masked loops.
17508 (vectorizable_reduction): Disable fully-masked loops.
17509 (vectorizable_live_operation): Likewise.
17510 (vect_halve_mask_nunits): New function.
17511 (vect_double_mask_nunits): Likewise.
17512 (vect_record_loop_mask): Likewise.
17513 (vect_get_loop_mask): Likewise.
17514 (vect_transform_loop): Handle the case in which the final loop
17515 iteration might handle a partial vector. Call vect_set_loop_condition
17516 instead of slpeel_make_loop_iterate_ntimes.
17517 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17518 (check_load_store_masking): New function.
17519 (prepare_load_store_mask): Likewise.
17520 (vectorizable_store): Handle fully-masked loops.
17521 (vectorizable_load): Likewise.
17522 (supportable_widening_operation): Use vect_halve_mask_nunits for
17523 booleans.
17524 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17525 (vect_gen_while): New function.
17526 * config/aarch64/aarch64.md (umax<mode>3): New expander.
17527 (aarch64_uqdec<mode>): New insn.
17528
17529 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17530 Alan Hayward <alan.hayward@arm.com>
17531 David Sherwood <david.sherwood@arm.com>
17532
17533 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17534 (reduc_xor_scal_optab): New optabs.
17535 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17536 (reduc_xor_scal_@var{m}): Document.
17537 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17538 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17539 internal functions.
17540 * fold-const-call.c (fold_const_call): Handle them.
17541 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17542 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17543 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17544 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17545 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17546 (UNSPEC_XORV): New unspecs.
17547 (optab): Add entries for them.
17548 (BITWISEV): New int iterator.
17549 (bit_reduc_op): New int attributes.
17550
17551 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17552 Alan Hayward <alan.hayward@arm.com>
17553 David Sherwood <david.sherwood@arm.com>
17554
17555 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17556 * internal-fn.def (VEC_SHL_INSERT): New internal function.
17557 * optabs.def (vec_shl_insert_optab): New optab.
17558 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17559 (duplicate_and_interleave): Likewise.
17560 * tree-vect-loop.c: Include internal-fn.h.
17561 (neutral_op_for_slp_reduction): New function, split out from
17562 get_initial_defs_for_reduction.
17563 (get_initial_def_for_reduction): Handle option 2 for variable-length
17564 vectors by loading the neutral value into a vector and then shifting
17565 the initial value into element 0.
17566 (get_initial_defs_for_reduction): Replace the code argument with
17567 the neutral value calculated by neutral_op_for_slp_reduction.
17568 Use gimple_build_vector for constant-length vectors.
17569 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17570 but the first group_size elements have a neutral value.
17571 Use duplicate_and_interleave otherwise.
17572 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17573 Update call to get_initial_defs_for_reduction. Handle SLP
17574 reductions for variable-length vectors by creating one vector
17575 result for each scalar result, with the elements associated
17576 with other scalar results stubbed out with the neutral value.
17577 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17578 Require IFN_VEC_SHL_INSERT for double reductions on
17579 variable-length vectors, or SLP reductions that have
17580 a neutral value. Require can_duplicate_and_interleave_p
17581 support for variable-length unchained SLP reductions if there
17582 is no neutral value, such as for MIN/MAX reductions. Also require
17583 the number of vector elements to be a multiple of the number of
17584 SLP statements when doing variable-length unchained SLP reductions.
17585 Update call to vect_create_epilog_for_reduction.
17586 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17587 and remove initial values.
17588 (duplicate_and_interleave): Make public.
17589 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17590 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17591
17592 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17593 Alan Hayward <alan.hayward@arm.com>
17594 David Sherwood <david.sherwood@arm.com>
17595
17596 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17597 (can_duplicate_and_interleave_p): New function.
17598 (vect_get_and_check_slp_defs): Take the vector of statements
17599 rather than just the current one. Remove excess parentheses.
17600 Restriction rejectinon of vect_constant_def and vect_external_def
17601 for variable-length vectors to boolean types, or types for which
17602 can_duplicate_and_interleave_p is false.
17603 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17604 (duplicate_and_interleave): New function.
17605 (vect_get_constant_vectors): Use gimple_build_vector for
17606 constant-length vectors and suitable variable-length constant
17607 vectors. Use duplicate_and_interleave for other variable-length
17608 vectors. Don't defer the update when inserting new statements.
17609
17610 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17611 Alan Hayward <alan.hayward@arm.com>
17612 David Sherwood <david.sherwood@arm.com>
17613
17614 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17615 min_profitable_iters doesn't go negative.
17616
17617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17618 Alan Hayward <alan.hayward@arm.com>
17619 David Sherwood <david.sherwood@arm.com>
17620
17621 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17622 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17623 * optabs.def (vec_mask_load_lanes_optab): New optab.
17624 (vec_mask_store_lanes_optab): Likewise.
17625 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17626 (MASK_STORE_LANES): Likewise.
17627 * internal-fn.c (mask_load_lanes_direct): New macro.
17628 (mask_store_lanes_direct): Likewise.
17629 (expand_mask_load_optab_fn): Handle masked operations.
17630 (expand_mask_load_lanes_optab_fn): New macro.
17631 (expand_mask_store_optab_fn): Handle masked operations.
17632 (expand_mask_store_lanes_optab_fn): New macro.
17633 (direct_mask_load_lanes_optab_supported_p): Likewise.
17634 (direct_mask_store_lanes_optab_supported_p): Likewise.
17635 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17636 parameter.
17637 (vect_load_lanes_supported): Likewise.
17638 * tree-vect-data-refs.c (strip_conversion): New function.
17639 (can_group_stmts_p): Likewise.
17640 (vect_analyze_data_ref_accesses): Use it instead of checking
17641 for a pair of assignments.
17642 (vect_store_lanes_supported): Take a masked_p parameter.
17643 (vect_load_lanes_supported): Likewise.
17644 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17645 vect_store_lanes_supported and vect_load_lanes_supported.
17646 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17647 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17648 parameter. Don't allow gaps for masked accesses.
17649 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17650 and vect_load_lanes_supported.
17651 (get_load_store_type): Take a masked_p parameter and update
17652 call to get_group_load_store_type.
17653 (vectorizable_store): Update call to get_load_store_type.
17654 Handle IFN_MASK_STORE_LANES.
17655 (vectorizable_load): Update call to get_load_store_type.
17656 Handle IFN_MASK_LOAD_LANES.
17657
17658 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17659 Alan Hayward <alan.hayward@arm.com>
17660 David Sherwood <david.sherwood@arm.com>
17661
17662 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17663 modes for SVE.
17664 * config/aarch64/aarch64-protos.h
17665 (aarch64_sve_struct_memory_operand_p): Declare.
17666 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17667 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17668 (VPRED, vpred): Handle SVE structure modes.
17669 * config/aarch64/constraints.md (Utx): New constraint.
17670 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17671 (aarch64_sve_struct_nonimmediate_operand): New predicates.
17672 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17673 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17674 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17675 structure modes. Split into pieces after RA.
17676 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17677 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17678 New patterns.
17679 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17680 SVE structure modes.
17681 (aarch64_classify_address): Likewise.
17682 (sizetochar): Move earlier in file.
17683 (aarch64_print_operand): Handle SVE register lists.
17684 (aarch64_array_mode): New function.
17685 (aarch64_sve_struct_memory_operand_p): Likewise.
17686 (TARGET_ARRAY_MODE): Redefine.
17687
17688 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17689 Alan Hayward <alan.hayward@arm.com>
17690 David Sherwood <david.sherwood@arm.com>
17691
17692 * target.def (array_mode): New target hook.
17693 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17694 * doc/tm.texi: Regenerate.
17695 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17696 * hooks.c (hook_optmode_mode_uhwi_none): New function.
17697 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17698 targetm.array_mode.
17699 * stor-layout.c (mode_for_array): Likewise. Support polynomial
17700 type sizes.
17701
17702 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17703 Alan Hayward <alan.hayward@arm.com>
17704 David Sherwood <david.sherwood@arm.com>
17705
17706 * fold-const.c (fold_binary_loc): Check the argument types
17707 rather than the result type when testing for a vector operation.
17708
17709 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17710
17711 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17712 * doc/tm.texi: Regenerate.
17713
17714 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17715 Alan Hayward <alan.hayward@arm.com>
17716 David Sherwood <david.sherwood@arm.com>
17717
17718 * doc/invoke.texi (-msve-vector-bits=): Document new option.
17719 (sve): Document new AArch64 extension.
17720 * doc/md.texi (w): Extend the description of the AArch64
17721 constraint to include SVE vectors.
17722 (Upl, Upa): Document new AArch64 predicate constraints.
17723 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17724 enum.
17725 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17726 (msve-vector-bits=): New option.
17727 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17728 SVE when these are disabled.
17729 (sve): New extension.
17730 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17731 modes. Adjust their number of units based on aarch64_sve_vg.
17732 (MAX_BITSIZE_MODE_ANY_MODE): Define.
17733 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17734 aarch64_addr_query_type.
17735 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17736 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17737 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17738 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17739 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17740 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17741 (aarch64_simd_imm_zero_p): Delete.
17742 (aarch64_check_zero_based_sve_index_immediate): Declare.
17743 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17744 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17745 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17746 (aarch64_sve_float_mul_immediate_p): Likewise.
17747 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17748 rather than an rtx.
17749 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17750 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17751 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17752 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17753 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17754 (aarch64_regmode_natural_size): Likewise.
17755 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17756 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17757 left one place.
17758 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17759 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17760 for VG and the SVE predicate registers.
17761 (V_ALIASES): Add a "z"-prefixed alias.
17762 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17763 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17764 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17765 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17766 (REG_CLASS_NAMES): Add entries for them.
17767 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17768 and the predicate registers.
17769 (aarch64_sve_vg): Declare.
17770 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17771 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17772 (REGMODE_NATURAL_SIZE): Define.
17773 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17774 SVE macros.
17775 * config/aarch64/aarch64.c: Include cfgrtl.h.
17776 (simd_immediate_info): Add a constructor for series vectors,
17777 and an associated step field.
17778 (aarch64_sve_vg): New variable.
17779 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17780 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17781 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17782 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17783 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17784 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17785 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17786 (aarch64_get_mask_mode): New functions.
17787 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17788 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17789 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17790 predicate modes and predicate registers. Explicitly restrict
17791 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17792 to store a vector mode if it is recognized by
17793 aarch64_classify_vector_mode.
17794 (aarch64_regmode_natural_size): New function.
17795 (aarch64_hard_regno_caller_save_mode): Return the original mode
17796 for predicates.
17797 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17798 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17799 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17800 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17801 functions.
17802 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17803 does not overlap dest if the function is frame-related. Handle
17804 SVE constants.
17805 (aarch64_split_add_offset): New function.
17806 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17807 them aarch64_add_offset.
17808 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17809 and update call to aarch64_sub_sp.
17810 (aarch64_add_cfa_expression): New function.
17811 (aarch64_expand_prologue): Pass extra temporary registers to the
17812 functions above. Handle the case in which we need to emit new
17813 DW_CFA_expressions for registers that were originally saved
17814 relative to the stack pointer, but now have to be expressed
17815 relative to the frame pointer.
17816 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17817 functions above.
17818 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17819 IP0 and IP1 values for SVE frames.
17820 (aarch64_expand_vec_series): New function.
17821 (aarch64_expand_sve_widened_duplicate): Likewise.
17822 (aarch64_expand_sve_const_vector): Likewise.
17823 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17824 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17825 into the register, rather than emitting a SET directly.
17826 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17827 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17828 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17829 (offset_9bit_signed_scaled_p): New functions.
17830 (aarch64_replicate_bitmask_imm): New function.
17831 (aarch64_bitmask_imm): Use it.
17832 (aarch64_cannot_force_const_mem): Reject expressions involving
17833 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17834 (aarch64_classify_index): Handle SVE indices, by requiring
17835 a plain register index with a scale that matches the element size.
17836 (aarch64_classify_address): Handle SVE addresses. Assert that
17837 the mode of the address is VOIDmode or an integer mode.
17838 Update call to aarch64_classify_symbol.
17839 (aarch64_classify_symbolic_expression): Update call to
17840 aarch64_classify_symbol.
17841 (aarch64_const_vec_all_in_range_p): New function.
17842 (aarch64_print_vector_float_operand): Likewise.
17843 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17844 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17845 and the FP immediates 1.0 and 0.5.
17846 (aarch64_print_address_internal): Handle SVE addresses.
17847 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17848 (aarch64_regno_regclass): Handle predicate registers.
17849 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17850 data modes.
17851 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17852 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17853 (aarch64_convert_sve_vector_bits): New function.
17854 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17855 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17856 rather than an rtx.
17857 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17858 Handle SVE vector and predicate modes. Accept VL-based constants
17859 that need only one temporary register, and VL offsets that require
17860 no temporary registers.
17861 (aarch64_conditional_register_usage): Mark the predicate registers
17862 as fixed if SVE isn't available.
17863 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17864 Return true for SVE vector and predicate modes.
17865 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17866 rather than an unsigned int. Handle SVE modes.
17867 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17868 SVE modes.
17869 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17870 if SVE is enabled.
17871 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17872 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17873 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17874 (aarch64_sve_float_mul_immediate_p): New functions.
17875 (aarch64_sve_valid_immediate): New function.
17876 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17877 Explicitly reject structure modes. Check for INDEX constants.
17878 Handle PTRUE and PFALSE constants.
17879 (aarch64_check_zero_based_sve_index_immediate): New function.
17880 (aarch64_simd_imm_zero_p): Delete.
17881 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17882 vector modes. Accept constants in the range of CNT[BHWD].
17883 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17884 ask for an Advanced SIMD mode.
17885 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17886 (aarch64_simd_vector_alignment): Handle SVE predicates.
17887 (aarch64_vectorize_preferred_vector_alignment): New function.
17888 (aarch64_simd_vector_alignment_reachable): Use it instead of
17889 the vector size.
17890 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17891 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17892 functions.
17893 (MAX_VECT_LEN): Delete.
17894 (expand_vec_perm_d): Add a vec_flags field.
17895 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17896 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17897 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17898 for SVE modes.
17899 (aarch64_evpc_rev): Rename to...
17900 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17901 (aarch64_evpc_rev_global): New function.
17902 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17903 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17904 MAX_VECT_LEN.
17905 (aarch64_evpc_sve_tbl): New function.
17906 (aarch64_expand_vec_perm_const_1): Update after rename of
17907 aarch64_evpc_rev. Handle SVE permutes too, trying
17908 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17909 than aarch64_evpc_tbl.
17910 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17911 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17912 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17913 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17914 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17915 (aarch64_expand_sve_vcond): New functions.
17916 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17917 of aarch64_vector_mode_p.
17918 (aarch64_dwarf_poly_indeterminate_value): New function.
17919 (aarch64_compute_pressure_classes): Likewise.
17920 (aarch64_can_change_mode_class): Likewise.
17921 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17922 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17923 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17924 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17925 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17926 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17927 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17928 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17929 constraints.
17930 (Dn, Dl, Dr): Accept const as well as const_vector.
17931 (Dz): Likewise. Compare against CONST0_RTX.
17932 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17933 of "vector" where appropriate.
17934 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17935 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17936 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17937 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17938 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17939 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17940 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17941 (v_int_equiv): Extend to SVE modes.
17942 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17943 mode attributes.
17944 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17945 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17946 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17947 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17948 (SVE_COND_FP_CMP): New int iterators.
17949 (perm_hilo): Handle the new unpack unspecs.
17950 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17951 attributes.
17952 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17953 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17954 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17955 (aarch64_equality_operator, aarch64_constant_vector_operand)
17956 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17957 (aarch64_sve_nonimmediate_operand): Likewise.
17958 (aarch64_sve_general_operand): Likewise.
17959 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17960 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17961 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17962 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17963 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17964 (aarch64_sve_float_arith_immediate): Likewise.
17965 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17966 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17967 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17968 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17969 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17970 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17971 (aarch64_sve_float_arith_operand): Likewise.
17972 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17973 (aarch64_sve_float_mul_operand): Likewise.
17974 (aarch64_sve_vec_perm_operand): Likewise.
17975 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17976 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17977 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17978 as well as const_vector.
17979 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17980 in file. Use CONST0_RTX and CONSTM1_RTX.
17981 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17982 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17983 Use aarch64_simd_imm_zero.
17984 * config/aarch64/aarch64-sve.md: New file.
17985 * config/aarch64/aarch64.md: Include it.
17986 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17987 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17988 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17989 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17990 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17991 (sve): New attribute.
17992 (enabled): Disable instructions with the sve attribute unless
17993 TARGET_SVE.
17994 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17995 aarch64_expand_mov_immediate.
17996 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17997 CNT[BHSD] immediates.
17998 (movti): Split CONST_POLY_INT moves into two halves.
17999 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18000 Split additions that need a temporary here if the destination
18001 is the stack pointer.
18002 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18003 (*add<mode>3_poly_1): New instruction.
18004 (set_clobber_cc): New expander.
18005
18006 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18007
18008 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18009 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18010 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18011 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18012 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18013 Change innermode from fixed_mode_size to machine_mode.
18014 (simplify_subreg): Update call accordingly. Handle a constant-sized
18015 subreg of a variable-length CONST_VECTOR.
18016
18017 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18018 Alan Hayward <alan.hayward@arm.com>
18019 David Sherwood <david.sherwood@arm.com>
18020
18021 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18022 (add_offset_to_base): New function, split out from...
18023 (create_mem_ref): ...here. When handling a scale other than 1,
18024 check first whether the address is valid without the offset.
18025 Add it into the base if so, leaving the index and scale as-is.
18026
18027 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18028
18029 PR c++/83778
18030 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18031 fold_for_warn before checking if arg2 is INTEGER_CST.
18032
18033 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18034
18035 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18036 (store_multiple_operation): Delete.
18037 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18038 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18039 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18040 guarded by TARGET_STRING.
18041 (rs6000_output_load_multiple): Delete.
18042 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18043 OPTION_MASK_STRING / TARGET_STRING handling.
18044 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18045 (const rs6000_opt_masks) <"string">: Change mask to 0.
18046 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18047 (MASK_STRING): Delete.
18048 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18049 parts. Simplify.
18050 (load_multiple): Delete.
18051 (*ldmsi8): Delete.
18052 (*ldmsi7): Delete.
18053 (*ldmsi6): Delete.
18054 (*ldmsi5): Delete.
18055 (*ldmsi4): Delete.
18056 (*ldmsi3): Delete.
18057 (store_multiple): Delete.
18058 (*stmsi8): Delete.
18059 (*stmsi7): Delete.
18060 (*stmsi6): Delete.
18061 (*stmsi5): Delete.
18062 (*stmsi4): Delete.
18063 (*stmsi3): Delete.
18064 (movmemsi_8reg): Delete.
18065 (corresponding unnamed define_insn): Delete.
18066 (movmemsi_6reg): Delete.
18067 (corresponding unnamed define_insn): Delete.
18068 (movmemsi_4reg): Delete.
18069 (corresponding unnamed define_insn): Delete.
18070 (movmemsi_2reg): Delete.
18071 (corresponding unnamed define_insn): Delete.
18072 (movmemsi_1reg): Delete.
18073 (corresponding unnamed define_insn): Delete.
18074 * config/rs6000/rs6000.opt (mno-string): New.
18075 (mstring): Replace by deprecation warning stub.
18076 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18077
18078 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18079
18080 * regrename.c (regrename_do_replace): If replacing the same
18081 reg multiple times, try to reuse last created gen_raw_REG.
18082
18083 PR debug/81155
18084 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18085 main to workaround a bug in GDB.
18086
18087 2018-01-12 Tom de Vries <tom@codesourcery.com>
18088
18089 PR target/83737
18090 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18091
18092 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18093
18094 PR rtl-optimization/80481
18095 * ira-color.c (get_cap_member): New function.
18096 (allocnos_conflict_by_live_ranges_p): Use it.
18097 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18098 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18099
18100 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18101
18102 PR target/83628
18103 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18104 (*saddl_se_1): Ditto.
18105 (*ssubsi_1): Ditto.
18106 (*ssubl_se_1): Ditto.
18107
18108 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18109
18110 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18111 rather than wi::to_widest for DR_INITs.
18112 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18113 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18114 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18115 INTEGER_CSTs.
18116 (vect_analyze_group_access_1): Note that here.
18117
18118 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18119
18120 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18121 polynomial type sizes.
18122
18123 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18124
18125 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18126 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18127 (gimple_add_tmp_var): Likewise.
18128
18129 2018-01-12 Martin Liska <mliska@suse.cz>
18130
18131 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18132 (gimple_alloc_sizes): Likewise.
18133 (dump_gimple_statistics): Use PRIu64 in printf format.
18134 * gimple.h: Change uint64_t to int.
18135
18136 2018-01-12 Martin Liska <mliska@suse.cz>
18137
18138 * tree-core.h: Use uint64_t instead of int.
18139 * tree.c (tree_node_counts): Likewise.
18140 (tree_node_sizes): Likewise.
18141 (dump_tree_statistics): Use PRIu64 in printf format.
18142
18143 2018-01-12 Martin Liska <mliska@suse.cz>
18144
18145 * Makefile.in: As qsort_chk is implemented in vec.c, add
18146 vec.o to linkage of gencfn-macros.
18147 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18148 passing the info to record_node_allocation_statistics.
18149 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18150 and pass the info.
18151 * ggc-common.c (struct ggc_usage): Add operator== and use
18152 it in operator< and compare function.
18153 * mem-stats.h (struct mem_usage): Likewise.
18154 * vec.c (struct vec_usage): Remove operator< and compare
18155 function. Can be simply inherited.
18156
18157 2018-01-12 Martin Jambor <mjambor@suse.cz>
18158
18159 PR target/81616
18160 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18161 * tree-ssa-math-opts.c: Include domwalk.h.
18162 (convert_mult_to_fma_1): New function.
18163 (fma_transformation_info): New type.
18164 (fma_deferring_state): Likewise.
18165 (cancel_fma_deferring): New function.
18166 (result_of_phi): Likewise.
18167 (last_fma_candidate_feeds_initial_phi): Likewise.
18168 (convert_mult_to_fma): Added deferring logic, split actual
18169 transformation to convert_mult_to_fma_1.
18170 (math_opts_dom_walker): New type.
18171 (math_opts_dom_walker::after_dom_children): New method, body moved
18172 here from pass_optimize_widening_mul::execute, added deferring logic
18173 bits.
18174 (pass_optimize_widening_mul::execute): Moved most of code to
18175 math_opts_dom_walker::after_dom_children.
18176 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18177 * config/i386/i386.c (ix86_option_override_internal): Added
18178 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18179
18180 2018-01-12 Richard Biener <rguenther@suse.de>
18181
18182 PR debug/83157
18183 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18184 inline instance vars.
18185
18186 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18187
18188 PR target/81819
18189 * config/rx/rx.c (rx_is_restricted_memory_address):
18190 Handle SUBREG case.
18191
18192 2018-01-12 Richard Biener <rguenther@suse.de>
18193
18194 PR tree-optimization/80846
18195 * target.def (split_reduction): New target hook.
18196 * targhooks.c (default_split_reduction): New function.
18197 * targhooks.h (default_split_reduction): Declare.
18198 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18199 target requests first reduce vectors by combining low and high
18200 parts.
18201 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18202 (get_vectype_for_scalar_type_and_size): Export.
18203 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18204 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18205 * doc/tm.texi: Regenerate.
18206 * config/i386/i386.c (ix86_split_reduction): Implement
18207 TARGET_VECTORIZE_SPLIT_REDUCTION.
18208
18209 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18210
18211 PR target/83368
18212 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18213 in PIC mode except for TARGET_VXWORKS_RTP.
18214 * config/sparc/sparc.c: Include cfgrtl.h.
18215 (TARGET_INIT_PIC_REG): Define.
18216 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18217 (sparc_pic_register_p): New predicate.
18218 (sparc_legitimate_address_p): Use it.
18219 (sparc_legitimize_pic_address): Likewise.
18220 (sparc_delegitimize_address): Likewise.
18221 (sparc_mode_dependent_address_p): Likewise.
18222 (gen_load_pcrel_sym): Remove 4th parameter.
18223 (load_got_register): Adjust call to above. Remove obsolete stuff.
18224 (sparc_expand_prologue): Do not call load_got_register here.
18225 (sparc_flat_expand_prologue): Likewise.
18226 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18227 (sparc_use_pseudo_pic_reg): New function.
18228 (sparc_init_pic_reg): Likewise.
18229 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18230 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18231
18232 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18233
18234 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18235 Add item for branch_cost.
18236
18237 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18238
18239 PR rtl-optimization/83565
18240 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18241 not extend the result to a larger mode for rotate operations.
18242 (num_sign_bit_copies1): Likewise.
18243
18244 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18245
18246 PR target/40411
18247 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18248 -symbolic.
18249 Use values-Xc.o for -pedantic.
18250 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18251
18252 2018-01-12 Martin Liska <mliska@suse.cz>
18253
18254 PR ipa/83054
18255 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18256 New function.
18257 (possible_polymorphic_call_targets): Use it.
18258 (ipa_devirt): Likewise.
18259
18260 2018-01-12 Martin Liska <mliska@suse.cz>
18261
18262 * profile-count.h (enum profile_quality): Use 0 as invalid
18263 enum value of profile_quality.
18264
18265 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18266
18267 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18268 -mext-string options.
18269
18270 2018-01-12 Richard Biener <rguenther@suse.de>
18271
18272 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18273 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18274 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18275 Likewise.
18276 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18277
18278 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18279
18280 * configure.ac (--with-long-double-format): Add support for the
18281 configuration option to change the default long double format on
18282 PowerPC systems.
18283 * config.gcc (powerpc*-linux*-*): Likewise.
18284 * configure: Regenerate.
18285 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18286 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18287 used without modification.
18288
18289 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18290
18291 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18292 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18293 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18294 MISC_BUILTIN_SPEC_BARRIER.
18295 (rs6000_init_builtins): Likewise.
18296 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18297 enum value.
18298 (speculation_barrier): New define_insn.
18299 * doc/extend.texi: Document __builtin_speculation_barrier.
18300
18301 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18302
18303 PR target/83203
18304 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18305 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18306 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18307 iterators.
18308 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18309 integral modes instead of "ss" and "sd".
18310 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18311 vectors with 32-bit and 64-bit elements.
18312 (vecdupssescalarmodesuffix): New mode attribute.
18313 (vec_dup<mode>): Use it.
18314
18315 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18316
18317 PR target/83330
18318 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18319 frame if argument is passed on stack.
18320
18321 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18322
18323 PR target/82682
18324 * ree.c (combine_reaching_defs): Optimize also
18325 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18326 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18327
18328 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18329
18330 PR middle-end/83189
18331 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18332
18333 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18334
18335 PR middle-end/83718
18336 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18337 after they are computed.
18338
18339 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18340
18341 PR tree-optimization/83695
18342 * gimple-loop-linterchange.cc
18343 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18344 reset cached scev information after interchange.
18345 (pass_linterchange::execute): Remove call to scev_reset_htab.
18346
18347 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18348
18349 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18350 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18351 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18352 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18353 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18354 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18355 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18356 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18357 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18358 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18359 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18360 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18361 (V_lane_reg): Likewise.
18362 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18363 New define_expand.
18364 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18365 (vfmal_lane_low<mode>_intrinsic,
18366 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18367 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18368 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18369 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18370 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18371 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18372
18373 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18374
18375 * config/arm/arm-cpus.in (fp16fml): New feature.
18376 (ALL_SIMD): Add fp16fml.
18377 (armv8.2-a): Add fp16fml as an option.
18378 (armv8.3-a): Likewise.
18379 (armv8.4-a): Add fp16fml as part of fp16.
18380 * config/arm/arm.h (TARGET_FP16FML): Define.
18381 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18382 when appropriate.
18383 * config/arm/arm-modes.def (V2HF): Define.
18384 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18385 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18386 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18387 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18388 vfmsl_low, vfmsl_high): New set of builtins.
18389 * config/arm/iterators.md (PLUSMINUS): New code iterator.
18390 (vfml_op): New code attribute.
18391 (VFMLHALVES): New int iterator.
18392 (VFML, VFMLSEL): New mode attributes.
18393 (V_reg): Define mapping for V2HF.
18394 (V_hi, V_lo): New mode attributes.
18395 (VF_constraint): Likewise.
18396 (vfml_half, vfml_half_selector): New int attributes.
18397 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18398 define_expand.
18399 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18400 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18401 New define_insn.
18402 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18403 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18404 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18405 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
18406 documentation.
18407 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18408 Document new effective target and option set.
18409
18410 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18411
18412 * config/arm/arm-cpus.in (armv8_4): New feature.
18413 (ARMv8_4a): New fgroup.
18414 (armv8.4-a): New arch.
18415 * config/arm/arm-tables.opt: Regenerate.
18416 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18417 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18418 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18419 Add matching rules for -march=armv8.4-a and extensions.
18420 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18421
18422 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
18423
18424 PR target/81821
18425 * config/rx/rx.md (BW): New mode attribute.
18426 (sync_lock_test_and_setsi): Add mode suffix to insn output.
18427
18428 2018-01-11 Richard Biener <rguenther@suse.de>
18429
18430 PR tree-optimization/83435
18431 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18432 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18433 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18434
18435 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18436 Alan Hayward <alan.hayward@arm.com>
18437 David Sherwood <david.sherwood@arm.com>
18438
18439 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18440 field.
18441 (aarch64_classify_address): Initialize it. Track polynomial offsets.
18442 (aarch64_print_address_internal): Use it to check for a zero offset.
18443
18444 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18445 Alan Hayward <alan.hayward@arm.com>
18446 David Sherwood <david.sherwood@arm.com>
18447
18448 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18449 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18450 Return a poly_int64 rather than a HOST_WIDE_INT.
18451 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18452 rather than a HOST_WIDE_INT.
18453 * config/aarch64/aarch64.h (aarch64_frame): Protect with
18454 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
18455 hard_fp_offset, frame_size, initial_adjust, callee_offset and
18456 final_offset from HOST_WIDE_INT to poly_int64.
18457 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18458 to_constant when getting the number of units in an Advanced SIMD
18459 mode.
18460 (aarch64_builtin_vectorized_function): Check for a constant number
18461 of units.
18462 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18463 GET_MODE_SIZE.
18464 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18465 attribute instead of GET_MODE_NUNITS.
18466 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18467 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18468 GET_MODE_SIZE for fixed-size registers.
18469 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18470 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18471 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18472 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18473 (aarch64_print_operand, aarch64_print_address_internal)
18474 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18475 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18476 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18477 Handle polynomial GET_MODE_SIZE.
18478 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
18479 wider than SImode without modification.
18480 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18481 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18482 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18483 passing and returning SVE modes.
18484 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18485 rather than GEN_INT.
18486 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18487 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18488 (aarch64_allocate_and_probe_stack_space): Likewise.
18489 (aarch64_layout_frame): Cope with polynomial offsets.
18490 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18491 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
18492 polynomial offsets.
18493 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18494 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18495 poly_int64 rather than a HOST_WIDE_INT.
18496 (aarch64_get_separate_components, aarch64_process_components)
18497 (aarch64_expand_prologue, aarch64_expand_epilogue)
18498 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18499 (aarch64_anchor_offset): New function, split out from...
18500 (aarch64_legitimize_address): ...here.
18501 (aarch64_builtin_vectorization_cost): Handle polynomial
18502 TYPE_VECTOR_SUBPARTS.
18503 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18504 GET_MODE_NUNITS.
18505 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18506 number of elements from the PARALLEL rather than the mode.
18507 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18508 rather than GET_MODE_BITSIZE.
18509 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18510 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18511 (aarch64_expand_vec_perm_const_1): Handle polynomial
18512 d->perm.length () and d->perm elements.
18513 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
18514 Apply to_constant to d->perm elements.
18515 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18516 polynomial CONST_VECTOR_NUNITS.
18517 (aarch64_move_pointer): Take amount as a poly_int64 rather
18518 than an int.
18519 (aarch64_progress_pointer): Avoid temporary variable.
18520 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18521 the mode attribute instead of GET_MODE.
18522
18523 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18524 Alan Hayward <alan.hayward@arm.com>
18525 David Sherwood <david.sherwood@arm.com>
18526
18527 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18528 x exists before using it.
18529 (aarch64_add_constant_internal): Rename to...
18530 (aarch64_add_offset_1): ...this. Replace regnum with separate
18531 src and dest rtxes. Handle the case in which they're different,
18532 including when the offset is zero. Replace scratchreg with an rtx.
18533 Use 2 additions if there is no spare register into which we can
18534 move a 16-bit constant.
18535 (aarch64_add_constant): Delete.
18536 (aarch64_add_offset): Replace reg with separate src and dest
18537 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
18538 Use aarch64_add_offset_1.
18539 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18540 an rtx rather than an int. Take the delta as a poly_int64
18541 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
18542 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18543 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18544 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18545 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18546 and aarch64_add_sp.
18547 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18548 aarch64_add_constant.
18549
18550 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18551
18552 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18553 Use scalar_float_mode.
18554
18555 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18556
18557 * config/aarch64/aarch64-simd.md
18558 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18559 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18560 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18561 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18562 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18563 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18564 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18565 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18566 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18567 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18568
18569 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18570
18571 PR target/83514
18572 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18573 targ_options->x_arm_arch_string is non NULL.
18574
18575 2018-01-11 Tamar Christina <tamar.christina@arm.com>
18576
18577 * config/aarch64/aarch64.h
18578 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
18579
18580 2018-01-11 Sudakshina Das <sudi.das@arm.com>
18581
18582 PR target/82096
18583 * expmed.c (emit_store_flag_force): Swap if const op0
18584 and change VOIDmode to mode of op0.
18585
18586 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18587
18588 PR rtl-optimization/83761
18589 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18590 than bytes to mode_for_size.
18591
18592 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18593
18594 PR middle-end/83189
18595 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18596 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18597 profile.
18598
18599 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18600
18601 PR middle-end/83575
18602 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18603 when in layout mode.
18604 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18605 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18606 partition fixup.
18607
18608 2018-01-10 Michael Collison <michael.collison@arm.com>
18609
18610 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18611 * config/aarch64/aarch64-option-extension.def: Add
18612 AARCH64_OPT_EXTENSION of 'fp16fml'.
18613 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18614 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18615 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18616 * config/aarch64/constraints.md (Ui7): New constraint.
18617 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18618 (VFMLA_SEL_W): Ditto.
18619 (f16quad): Ditto.
18620 (f16mac1): Ditto.
18621 (VFMLA16_LOW): New int iterator.
18622 (VFMLA16_HIGH): Ditto.
18623 (UNSPEC_FMLAL): New unspec.
18624 (UNSPEC_FMLSL): Ditto.
18625 (UNSPEC_FMLAL2): Ditto.
18626 (UNSPEC_FMLSL2): Ditto.
18627 (f16mac): New code attribute.
18628 * config/aarch64/aarch64-simd-builtins.def
18629 (aarch64_fmlal_lowv2sf): Ditto.
18630 (aarch64_fmlsl_lowv2sf): Ditto.
18631 (aarch64_fmlalq_lowv4sf): Ditto.
18632 (aarch64_fmlslq_lowv4sf): Ditto.
18633 (aarch64_fmlal_highv2sf): Ditto.
18634 (aarch64_fmlsl_highv2sf): Ditto.
18635 (aarch64_fmlalq_highv4sf): Ditto.
18636 (aarch64_fmlslq_highv4sf): Ditto.
18637 (aarch64_fmlal_lane_lowv2sf): Ditto.
18638 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18639 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18640 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18641 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18642 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18643 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18644 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18645 (aarch64_fmlal_lane_highv2sf): Ditto.
18646 (aarch64_fmlsl_lane_highv2sf): Ditto.
18647 (aarch64_fmlal_laneq_highv2sf): Ditto.
18648 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18649 (aarch64_fmlalq_lane_highv4sf): Ditto.
18650 (aarch64_fmlsl_lane_highv4sf): Ditto.
18651 (aarch64_fmlalq_laneq_highv4sf): Ditto.
18652 (aarch64_fmlsl_laneq_highv4sf): Ditto.
18653 * config/aarch64/aarch64-simd.md:
18654 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18655 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18656 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18657 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18658 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18659 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18660 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18661 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18662 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18663 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18664 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18665 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18666 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18667 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18668 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18669 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18670 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18671 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18672 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18673 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18674 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18675 (vfmlsl_low_u32): Ditto.
18676 (vfmlalq_low_u32): Ditto.
18677 (vfmlslq_low_u32): Ditto.
18678 (vfmlal_high_u32): Ditto.
18679 (vfmlsl_high_u32): Ditto.
18680 (vfmlalq_high_u32): Ditto.
18681 (vfmlslq_high_u32): Ditto.
18682 (vfmlal_lane_low_u32): Ditto.
18683 (vfmlsl_lane_low_u32): Ditto.
18684 (vfmlal_laneq_low_u32): Ditto.
18685 (vfmlsl_laneq_low_u32): Ditto.
18686 (vfmlalq_lane_low_u32): Ditto.
18687 (vfmlslq_lane_low_u32): Ditto.
18688 (vfmlalq_laneq_low_u32): Ditto.
18689 (vfmlslq_laneq_low_u32): Ditto.
18690 (vfmlal_lane_high_u32): Ditto.
18691 (vfmlsl_lane_high_u32): Ditto.
18692 (vfmlal_laneq_high_u32): Ditto.
18693 (vfmlsl_laneq_high_u32): Ditto.
18694 (vfmlalq_lane_high_u32): Ditto.
18695 (vfmlslq_lane_high_u32): Ditto.
18696 (vfmlalq_laneq_high_u32): Ditto.
18697 (vfmlslq_laneq_high_u32): Ditto.
18698 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18699 (AARCH64_FL_FOR_ARCH8_4): New.
18700 (AARCH64_ISA_F16FML): New ISA flag.
18701 (TARGET_F16FML): New feature flag for fp16fml.
18702 (doc/invoke.texi): Document new fp16fml option.
18703
18704 2018-01-10 Michael Collison <michael.collison@arm.com>
18705
18706 * config/aarch64/aarch64-builtins.c:
18707 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18708 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18709 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18710 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18711 (AARCH64_ISA_SHA3): New ISA flag.
18712 (TARGET_SHA3): New feature flag for sha3.
18713 * config/aarch64/iterators.md (sha512_op): New int attribute.
18714 (CRYPTO_SHA512): New int iterator.
18715 (UNSPEC_SHA512H): New unspec.
18716 (UNSPEC_SHA512H2): Ditto.
18717 (UNSPEC_SHA512SU0): Ditto.
18718 (UNSPEC_SHA512SU1): Ditto.
18719 * config/aarch64/aarch64-simd-builtins.def
18720 (aarch64_crypto_sha512hqv2di): New builtin.
18721 (aarch64_crypto_sha512h2qv2di): Ditto.
18722 (aarch64_crypto_sha512su0qv2di): Ditto.
18723 (aarch64_crypto_sha512su1qv2di): Ditto.
18724 (aarch64_eor3qv8hi): Ditto.
18725 (aarch64_rax1qv2di): Ditto.
18726 (aarch64_xarqv2di): Ditto.
18727 (aarch64_bcaxqv8hi): Ditto.
18728 * config/aarch64/aarch64-simd.md:
18729 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18730 (aarch64_crypto_sha512su0qv2di): Ditto.
18731 (aarch64_crypto_sha512su1qv2di): Ditto.
18732 (aarch64_eor3qv8hi): Ditto.
18733 (aarch64_rax1qv2di): Ditto.
18734 (aarch64_xarqv2di): Ditto.
18735 (aarch64_bcaxqv8hi): Ditto.
18736 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18737 (vsha512h2q_u64): Ditto.
18738 (vsha512su0q_u64): Ditto.
18739 (vsha512su1q_u64): Ditto.
18740 (veor3q_u16): Ditto.
18741 (vrax1q_u64): Ditto.
18742 (vxarq_u64): Ditto.
18743 (vbcaxq_u16): Ditto.
18744 * config/arm/types.md (crypto_sha512): New type attribute.
18745 (crypto_sha3): Ditto.
18746 (doc/invoke.texi): Document new sha3 option.
18747
18748 2018-01-10 Michael Collison <michael.collison@arm.com>
18749
18750 * config/aarch64/aarch64-builtins.c:
18751 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18752 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18753 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18754 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18755 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18756 (AARCH64_ISA_SM4): New ISA flag.
18757 (TARGET_SM4): New feature flag for sm4.
18758 * config/aarch64/aarch64-simd-builtins.def
18759 (aarch64_sm3ss1qv4si): Ditto.
18760 (aarch64_sm3tt1aq4si): Ditto.
18761 (aarch64_sm3tt1bq4si): Ditto.
18762 (aarch64_sm3tt2aq4si): Ditto.
18763 (aarch64_sm3tt2bq4si): Ditto.
18764 (aarch64_sm3partw1qv4si): Ditto.
18765 (aarch64_sm3partw2qv4si): Ditto.
18766 (aarch64_sm4eqv4si): Ditto.
18767 (aarch64_sm4ekeyqv4si): Ditto.
18768 * config/aarch64/aarch64-simd.md:
18769 (aarch64_sm3ss1qv4si): Ditto.
18770 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18771 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18772 (aarch64_sm4eqv4si): Ditto.
18773 (aarch64_sm4ekeyqv4si): Ditto.
18774 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18775 (sm3part_op): Ditto.
18776 (CRYPTO_SM3TT): Ditto.
18777 (CRYPTO_SM3PART): Ditto.
18778 (UNSPEC_SM3SS1): New unspec.
18779 (UNSPEC_SM3TT1A): Ditto.
18780 (UNSPEC_SM3TT1B): Ditto.
18781 (UNSPEC_SM3TT2A): Ditto.
18782 (UNSPEC_SM3TT2B): Ditto.
18783 (UNSPEC_SM3PARTW1): Ditto.
18784 (UNSPEC_SM3PARTW2): Ditto.
18785 (UNSPEC_SM4E): Ditto.
18786 (UNSPEC_SM4EKEY): Ditto.
18787 * config/aarch64/constraints.md (Ui2): New constraint.
18788 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18789 * config/arm/types.md (crypto_sm3): New type attribute.
18790 (crypto_sm4): Ditto.
18791 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18792 (vsm3tt1aq_u32): Ditto.
18793 (vsm3tt1bq_u32): Ditto.
18794 (vsm3tt2aq_u32): Ditto.
18795 (vsm3tt2bq_u32): Ditto.
18796 (vsm3partw1q_u32): Ditto.
18797 (vsm3partw2q_u32): Ditto.
18798 (vsm4eq_u32): Ditto.
18799 (vsm4ekeyq_u32): Ditto.
18800 (doc/invoke.texi): Document new sm4 option.
18801
18802 2018-01-10 Michael Collison <michael.collison@arm.com>
18803
18804 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18805 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18806 (AARCH64_FL_FOR_ARCH8_4): New.
18807 (AARCH64_FL_V8_4): New flag.
18808 (doc/invoke.texi): Document new armv8.4-a option.
18809
18810 2018-01-10 Michael Collison <michael.collison@arm.com>
18811
18812 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18813 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18814 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18815 * config/aarch64/aarch64-option-extension.def: Add
18816 AARCH64_OPT_EXTENSION of 'sha2'.
18817 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18818 (crypto): Disable sha2 and aes if crypto disabled.
18819 (crypto): Enable aes and sha2 if enabled.
18820 (simd): Disable sha2 and aes if simd disabled.
18821 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18822 New flags.
18823 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18824 (TARGET_SHA2): New feature flag for sha2.
18825 (TARGET_AES): New feature flag for aes.
18826 * config/aarch64/aarch64-simd.md:
18827 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18828 conditional on TARGET_AES.
18829 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18830 (aarch64_crypto_sha1hsi): Make pattern conditional
18831 on TARGET_SHA2.
18832 (aarch64_crypto_sha1hv4si): Ditto.
18833 (aarch64_be_crypto_sha1hv4si): Ditto.
18834 (aarch64_crypto_sha1su1v4si): Ditto.
18835 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18836 (aarch64_crypto_sha1su0v4si): Ditto.
18837 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18838 (aarch64_crypto_sha256su0v4si): Ditto.
18839 (aarch64_crypto_sha256su1v4si): Ditto.
18840 (doc/invoke.texi): Document new aes and sha2 options.
18841
18842 2018-01-10 Martin Sebor <msebor@redhat.com>
18843
18844 PR tree-optimization/83781
18845 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18846 as string arrays.
18847
18848 2018-01-11 Martin Sebor <msebor@gmail.com>
18849 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18850
18851 PR tree-optimization/83501
18852 PR tree-optimization/81703
18853
18854 * tree-ssa-strlen.c (get_string_cst): Rename...
18855 (get_string_len): ...to this. Handle global constants.
18856 (handle_char_store): Adjust.
18857
18858 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18859 Jim Wilson <jimw@sifive.com>
18860
18861 * config/riscv/riscv-protos.h (riscv_output_return): New.
18862 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18863 (riscv_attribute_table, riscv_output_return),
18864 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18865 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18866 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18867 function.
18868 (riscv_expand_prologue): Add early return for naked function.
18869 (riscv_expand_epilogue): Likewise.
18870 (riscv_function_ok_for_sibcall): Return false for naked function.
18871 (riscv_set_current_function): New.
18872 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18873 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18874 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18875 * doc/extend.texi (RISC-V Function Attributes): New.
18876
18877 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18878
18879 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18880 check for 128-bit long double before checking TCmode.
18881 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18882 128-bit long doubles before checking TFmode or TCmode.
18883 (FLOAT128_IBM_P): Likewise.
18884
18885 2018-01-10 Martin Sebor <msebor@redhat.com>
18886
18887 PR tree-optimization/83671
18888 * builtins.c (c_strlen): Unconditionally return zero for the empty
18889 string.
18890 Use -Warray-bounds for warnings.
18891 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18892 for non-constant array indices with COMPONENT_REF, arrays of
18893 arrays, and pointers to arrays.
18894 (gimple_fold_builtin_strlen): Determine and set length range for
18895 non-constant character arrays.
18896
18897 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18898
18899 PR middle-end/81897
18900 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18901 empty blocks.
18902
18903 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18904
18905 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18906
18907 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18908
18909 PR target/83399
18910 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18911 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18912 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18913 indexed_or_indirect_operand predicate.
18914 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18915 (*vsx_le_perm_load_v8hi): Likewise.
18916 (*vsx_le_perm_load_v16qi): Likewise.
18917 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18918 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18919 (*vsx_le_perm_store_v8hi): Likewise.
18920 (*vsx_le_perm_store_v16qi): Likewise.
18921 (eight unnamed splitters): Likewise.
18922
18923 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18924
18925 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18926 * config/rs6000/emmintrin.h: Likewise.
18927 * config/rs6000/mmintrin.h: Likewise.
18928 * config/rs6000/xmmintrin.h: Likewise.
18929
18930 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18931
18932 PR c++/43486
18933 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18934 "public_flag".
18935 * tree.c (tree_nop_conversion): Return true for location wrapper
18936 nodes.
18937 (maybe_wrap_with_location): New function.
18938 (selftest::check_strip_nops): New function.
18939 (selftest::test_location_wrappers): New function.
18940 (selftest::tree_c_tests): Call it.
18941 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18942 (maybe_wrap_with_location): New decl.
18943 (EXPR_LOCATION_WRAPPER_P): New macro.
18944 (location_wrapper_p): New inline function.
18945 (tree_strip_any_location_wrapper): New inline function.
18946
18947 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18948
18949 PR target/83735
18950 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18951 stack_realign_offset for the largest alignment of stack slot
18952 actually used.
18953 (ix86_find_max_used_stack_alignment): New function.
18954 (ix86_finalize_stack_frame_flags): Use it. Set
18955 max_used_stack_alignment if we don't realign stack.
18956 * config/i386/i386.h (machine_function): Add
18957 max_used_stack_alignment.
18958
18959 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18960
18961 * config/arm/arm.opt (-mbranch-cost): New option.
18962 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18963 account.
18964
18965 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18966
18967 PR target/83629
18968 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18969 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18970
18971 2018-01-10 Richard Biener <rguenther@suse.de>
18972
18973 PR debug/83765
18974 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18975 early out so it also covers the case where we have a non-NULL
18976 origin.
18977
18978 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18979
18980 PR tree-optimization/83753
18981 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18982 for non-strided grouped accesses if the number of elements is 1.
18983
18984 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18985
18986 PR target/81616
18987 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18988 * i386.h (TARGET_USE_GATHER): Define.
18989 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18990
18991 2018-01-10 Martin Liska <mliska@suse.cz>
18992
18993 PR bootstrap/82831
18994 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18995 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18996 partitioning.
18997 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18998 CLEANUP_NO_PARTITIONING is not set.
18999
19000 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19001
19002 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19003 for vectors, as a partial revert of r254296.
19004 * rtl.h (const_vec_p): Delete.
19005 (const_vec_duplicate_p): Don't test for vector CONSTs.
19006 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19007 * expmed.c (make_tree): Likewise.
19008
19009 Revert:
19010 * common.md (E, F): Use CONSTANT_P instead of checking for
19011 CONST_VECTOR.
19012 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19013 checking for CONST_VECTOR.
19014
19015 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19016
19017 PR middle-end/83575
19018 * predict.c (force_edge_cold): Handle in more sane way edges
19019 with no prediction.
19020
19021 2018-01-09 Carl Love <cel@us.ibm.com>
19022
19023 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19024 V4SI, V4SF types.
19025 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19026 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19027 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19028 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19029 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19030 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19031 * config/rs6000/rs6000-protos.h: Add extern defition for
19032 rs6000_generate_float2_double_code.
19033 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19034 function.
19035 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19036 (float2_v2df): Add define_expand.
19037
19038 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19039
19040 PR target/83628
19041 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19042 op_mode in the force_to_mode call.
19043
19044 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19045
19046 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19047 instead of checking each element individually.
19048 (aarch64_evpc_uzp): Likewise.
19049 (aarch64_evpc_zip): Likewise.
19050 (aarch64_evpc_ext): Likewise.
19051 (aarch64_evpc_rev): Likewise.
19052 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19053 instead of checking each element individually. Return true without
19054 generating rtl if
19055 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19056 whether all selected elements come from the same input, instead of
19057 checking each element individually. Remove calls to gen_rtx_REG,
19058 start_sequence and end_sequence and instead assert that no rtl is
19059 generated.
19060
19061 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19062
19063 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19064 order of HIGH and CONST checks.
19065
19066 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19067
19068 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19069 if the destination isn't an SSA_NAME.
19070
19071 2018-01-09 Richard Biener <rguenther@suse.de>
19072
19073 PR tree-optimization/83668
19074 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19075 move prologue...
19076 (canonicalize_loop_form): ... here, renamed from ...
19077 (canonicalize_loop_closed_ssa_form): ... this and amended to
19078 swap successor edges for loop exit blocks to make us use
19079 the RPO order we need for initial schedule generation.
19080
19081 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19082
19083 PR tree-optimization/64811
19084 * match.pd: When optimizing comparisons with Inf, avoid
19085 introducing or losing exceptions from comparisons with NaN.
19086
19087 2018-01-09 Martin Liska <mliska@suse.cz>
19088
19089 PR sanitizer/82517
19090 * asan.c (shadow_mem_size): Add gcc_assert.
19091
19092 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19093
19094 Don't save registers in main().
19095
19096 PR target/83738
19097 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19098 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19099 * config/avr/avr.c (avr_set_current_function): Don't error if
19100 naked, OS_task or OS_main are specified at the same time.
19101 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19102 OS_main.
19103 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19104 attribute.
19105 * common/config/avr/avr-common.c (avr_option_optimization_table):
19106 Switch on -mmain-is-OS_task for optimizing compilations.
19107
19108 2018-01-09 Richard Biener <rguenther@suse.de>
19109
19110 PR tree-optimization/83572
19111 * graphite.c: Include cfganal.h.
19112 (graphite_transform_loops): Connect infinite loops to exit
19113 and remove fake edges at the end.
19114
19115 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19116
19117 * ipa-inline.c (edge_badness): Revert accidental checkin.
19118
19119 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19120
19121 PR ipa/80763
19122 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19123 symbols; not inline clones.
19124
19125 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19126
19127 PR target/83507
19128 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19129 hard registers. Formatting fixes.
19130
19131 PR preprocessor/83722
19132 * gcc.c (try_generate_repro): Pass
19133 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19134 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19135 do_report_bug.
19136
19137 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19138 Kito Cheng <kito.cheng@gmail.com>
19139
19140 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19141 (riscv_leaf_function_p): Delete.
19142 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19143
19144 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19145
19146 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19147 function.
19148 (do_ifelse): New function.
19149 (do_isel): New function.
19150 (do_sub3): New function.
19151 (do_add3): New function.
19152 (do_load_mask_compare): New function.
19153 (do_overlap_load_compare): New function.
19154 (expand_compare_loop): New function.
19155 (expand_block_compare): Call expand_compare_loop() when appropriate.
19156 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19157 option description.
19158 (-mblock-compare-inline-loop-limit): New option.
19159
19160 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19161
19162 PR target/83677
19163 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19164 Reverse order of second and third operands in first alternative.
19165 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19166 of first and second elements in UNSPEC_VPERMR vector.
19167 (altivec_expand_vec_perm_le): Likewise.
19168
19169 2018-01-08 Jeff Law <law@redhat.com>
19170
19171 PR rtl-optimizatin/81308
19172 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19173 (process_switch): If group_case_labels makes a change, then set
19174 cfg_altered.
19175 (pass_convert_switch::execute): If a switch is converted, then
19176 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19177
19178 PR rtl-optimization/81308
19179 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19180 splitting insns.
19181
19182 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19183
19184 PR target/83663 - Revert r255946
19185 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19186 generation for cases where splatting a value is not useful.
19187 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19188 across a vec_duplicate and a paradoxical subreg forming a vector
19189 mode to a vec_concat.
19190
19191 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19192
19193 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19194 -march=armv8.3-a variants.
19195 * config/arm/t-multilib: Likewise.
19196 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19197
19198 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19199
19200 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19201 to generate rtl.
19202 (cceq_ior_compare_complement): Give it a name so I can use it, and
19203 change boolean_or_operator predicate to boolean_operator so it can
19204 be used to generate a crand.
19205 (eqne): New code iterator.
19206 (bd/bd_neg): New code_attrs.
19207 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19208 a single define_insn.
19209 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19210 decrement (bdnzt/bdnzf/bdzt/bdzf).
19211 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19212 with the new names of the branch decrement patterns, and added the
19213 names of the branch decrement conditional patterns.
19214
19215 2018-01-08 Richard Biener <rguenther@suse.de>
19216
19217 PR tree-optimization/83563
19218 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19219 cache.
19220
19221 2018-01-08 Richard Biener <rguenther@suse.de>
19222
19223 PR middle-end/83713
19224 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19225
19226 2018-01-08 Richard Biener <rguenther@suse.de>
19227
19228 PR tree-optimization/83685
19229 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19230 references to abnormals.
19231
19232 2018-01-08 Richard Biener <rguenther@suse.de>
19233
19234 PR lto/83719
19235 * dwarf2out.c (output_indirect_strings): Handle empty
19236 skeleton_debug_str_hash.
19237 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19238
19239 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19240
19241 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19242 (emit_store_direct): Likewise.
19243 (arc_trampoline_adjust_address): Likewise.
19244 (arc_asm_trampoline_template): New function.
19245 (arc_initialize_trampoline): Use asm_trampoline_template.
19246 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19247 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19248 * config/arc/arc.md (flush_icache): Delete pattern.
19249
19250 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19251
19252 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19253 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19254 munaligned-access.
19255
19256 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19257
19258 PR target/83681
19259 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19260 by not USED_FOR_TARGET.
19261 (make_pass_resolve_sw_modes): Likewise.
19262
19263 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19264
19265 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19266 USED_FOR_TARGET.
19267
19268 2018-01-08 Richard Biener <rguenther@suse.de>
19269
19270 PR middle-end/83580
19271 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19272
19273 2018-01-08 Richard Biener <rguenther@suse.de>
19274
19275 PR middle-end/83517
19276 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19277
19278 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19279
19280 PR middle-end/81897
19281 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19282 basic blocks with a small number of successors.
19283 (convert_control_dep_chain_into_preds): Improve handling of
19284 forwarder blocks.
19285 (dump_predicates): Split apart into...
19286 (dump_pred_chain): ...here...
19287 (dump_pred_info): ...and here.
19288 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19289 (can_chain_union_be_invalidated_p): Improve check for invalidation
19290 of paths.
19291 (uninit_uses_cannot_happen): Avoid unnecessary if
19292 convert_control_dep_chain_into_preds yielded nothing.
19293
19294 2018-01-06 Martin Sebor <msebor@redhat.com>
19295
19296 PR tree-optimization/83640
19297 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19298 subtracting negative offset from size.
19299 (builtin_access::overlap): Adjust offset bounds of the access to fall
19300 within the size of the object if possible.
19301
19302 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19303
19304 PR rtl-optimization/83699
19305 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19306 extract_bit_field_as_subreg to cases in which the extracted
19307 value is also a vector.
19308
19309 * lra-constraints.c (process_alt_operands): Test for the equivalence
19310 substitutions when detecting a possible reload cycle.
19311
19312 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19313
19314 PR debug/83480
19315 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19316 by default if flag_selective_schedling{,2}. Formatting fixes.
19317
19318 PR rtl-optimization/83682
19319 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19320 if it has non-VECTOR_MODE element mode.
19321 (vec_duplicate_p): Likewise.
19322
19323 PR middle-end/83694
19324 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19325 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19326
19327 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19328
19329 PR target/83604
19330 * config/i386/i386-builtin.def
19331 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19332 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19333 Require also OPTION_MASK_ISA_AVX512F in addition to
19334 OPTION_MASK_ISA_GFNI.
19335 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19336 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19337 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19338 to OPTION_MASK_ISA_GFNI.
19339 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19340 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19341 OPTION_MASK_ISA_AVX512BW.
19342 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19343 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19344 addition to OPTION_MASK_ISA_GFNI.
19345 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19346 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19347 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19348 to OPTION_MASK_ISA_GFNI.
19349 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19350 a requirement for all ISAs rather than any of them with a few
19351 exceptions.
19352 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19353 processing.
19354 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19355 bitmasks to be enabled with 3 exceptions, instead of requiring any
19356 enabled ISA with lots of exceptions.
19357 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19358 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19359 Change avx512bw in isa attribute to avx512f.
19360 * config/i386/sgxintrin.h: Add license boilerplate.
19361 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19362 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19363 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19364 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19365 defined.
19366 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19367 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19368 temporarily sse2 rather than sse if not enabled already.
19369
19370 PR target/83604
19371 * config/i386/sse.md (VI248_VLBW): Rename to ...
19372 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19373 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19374 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19375 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19376 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19377 mode iterator instead of VI248_VLBW.
19378
19379 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19380
19381 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19382 (record_modified): Skip clobbers; add debug output.
19383 (param_change_prob): Use sreal frequencies.
19384
19385 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19386
19387 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19388 punt for user-aligned variables.
19389
19390 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19391
19392 * tree-chrec.c (chrec_contains_symbols): Return true for
19393 POLY_INT_CST.
19394
19395 2018-01-05 Sudakshina Das <sudi.das@arm.com>
19396
19397 PR target/82439
19398 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19399 of (x|y) == x for BICS pattern.
19400
19401 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19402
19403 PR tree-optimization/83605
19404 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19405 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19406 can throw.
19407
19408 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
19409
19410 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19411 * config/epiphany/rtems.h: New file.
19412
19413 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19414 Uros Bizjak <ubizjak@gmail.com>
19415
19416 PR target/83554
19417 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19418 QIreg_operand instead of register_operand predicate.
19419 * config/i386/i386.c (ix86_rop_should_change_byte_p,
19420 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19421 comments instead of -fmitigate[-_]rop.
19422
19423 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19424
19425 PR bootstrap/81926
19426 * cgraphunit.c (symbol_table::compile): Switch to text_section
19427 before calling assembly_start debug hook.
19428 * run-rtl-passes.c (run_rtl_passes): Likewise.
19429 Include output.h.
19430
19431 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19432
19433 * tree-vrp.c (extract_range_from_binary_expr_1): Check
19434 range_int_cst_p rather than !symbolic_range_p before calling
19435 extract_range_from_multiplicative_op_1.
19436
19437 2018-01-04 Jeff Law <law@redhat.com>
19438
19439 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19440 redundant test in assertion.
19441
19442 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19443
19444 * doc/rtl.texi: Document machine_mode wrapper classes.
19445
19446 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19447
19448 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19449 using tree_to_uhwi.
19450
19451 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19452
19453 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19454 the VEC_PERM_EXPR fold to fail.
19455
19456 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19457
19458 PR debug/83585
19459 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19460 to switched_sections.
19461
19462 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19463
19464 PR target/83680
19465 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19466 test for d.testing.
19467
19468 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
19469
19470 PR target/83387
19471 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19472 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19473
19474 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19475
19476 PR debug/83666
19477 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19478 is BLKmode and bitpos not zero or mode change is needed.
19479
19480 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19481
19482 PR target/83675
19483 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19484 TARGET_VIS2.
19485
19486 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
19487
19488 PR target/83628
19489 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19490 instead of MULT rtx. Update all corresponding splitters.
19491 (*saddl_se): Ditto.
19492 (*ssub<modesuffix>): Ditto.
19493 (*ssubl_se): Ditto.
19494 (*cmp_sadd_di): Update split patterns.
19495 (*cmp_sadd_si): Ditto.
19496 (*cmp_sadd_sidi): Ditto.
19497 (*cmp_ssub_di): Ditto.
19498 (*cmp_ssub_si): Ditto.
19499 (*cmp_ssub_sidi): Ditto.
19500 * config/alpha/predicates.md (const23_operand): New predicate.
19501 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19502 Look for ASHIFT, not MULT inner operand.
19503 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19504
19505 2018-01-04 Martin Liska <mliska@suse.cz>
19506
19507 PR gcov-profile/83669
19508 * gcov.c (output_intermediate_file): Add version to intermediate
19509 gcov file.
19510 * doc/gcov.texi: Document new field 'version' in intermediate
19511 file format. Fix location of '-k' option of gcov command.
19512
19513 2018-01-04 Martin Liska <mliska@suse.cz>
19514
19515 PR ipa/82352
19516 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19517
19518 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19519
19520 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19521
19522 2018-01-03 Martin Sebor <msebor@redhat.com>
19523
19524 PR tree-optimization/83655
19525 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19526 checking calls with invalid arguments.
19527
19528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19529
19530 * tree-vect-stmts.c (vect_get_store_rhs): New function.
19531 (vectorizable_mask_load_store): Delete.
19532 (vectorizable_call): Return false for masked loads and stores.
19533 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
19534 instead of gimple_assign_rhs1.
19535 (vectorizable_load): Handle IFN_MASK_LOAD.
19536 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19537
19538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19539
19540 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19541 split out from..,
19542 (vectorizable_mask_load_store): ...here.
19543 (vectorizable_load): ...and here.
19544
19545 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19546
19547 * tree-vect-stmts.c (vect_build_all_ones_mask)
19548 (vect_build_zero_merge_argument): New functions, split out from...
19549 (vectorizable_load): ...here.
19550
19551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19552
19553 * tree-vect-stmts.c (vect_check_store_rhs): New function,
19554 split out from...
19555 (vectorizable_mask_load_store): ...here.
19556 (vectorizable_store): ...and here.
19557
19558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19559
19560 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19561 split out from...
19562 (vectorizable_mask_load_store): ...here.
19563
19564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19565
19566 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19567 (vect_model_store_cost): Take a vec_load_store_type instead of a
19568 vect_def_type.
19569 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19570 (vect_model_store_cost): Take a vec_load_store_type instead of a
19571 vect_def_type.
19572 (vectorizable_mask_load_store): Update accordingly.
19573 (vectorizable_store): Likewise.
19574 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19575
19576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19577
19578 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19579 IFN_MASK_LOAD calls here rather than...
19580 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19581
19582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19583 Alan Hayward <alan.hayward@arm.com>
19584 David Sherwood <david.sherwood@arm.com>
19585
19586 * expmed.c (extract_bit_field_1): For vector extracts,
19587 fall back to extract_bit_field_as_subreg if vec_extract
19588 isn't available.
19589
19590 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19591 Alan Hayward <alan.hayward@arm.com>
19592 David Sherwood <david.sherwood@arm.com>
19593
19594 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19595 they are variable or constant sized.
19596 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19597 slots for constant-sized data.
19598
19599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19600 Alan Hayward <alan.hayward@arm.com>
19601 David Sherwood <david.sherwood@arm.com>
19602
19603 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19604 handling COND_EXPRs with boolean comparisons, try to find a better
19605 basis for the mask type than the boolean itself.
19606
19607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19608
19609 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19610 is calculated and how it can be overridden.
19611 * genmodes.c (max_bitsize_mode_any_mode): New variable.
19612 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19613 if defined.
19614 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19615 if nonzero.
19616
19617 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19618 Alan Hayward <alan.hayward@arm.com>
19619 David Sherwood <david.sherwood@arm.com>
19620
19621 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19622 Remove the mode argument.
19623 (aarch64_simd_valid_immediate): Remove the mode and inverse
19624 arguments.
19625 * config/aarch64/iterators.md (bitsize): New iterator.
19626 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19627 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19628 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19629 aarch64_simd_valid_immediate.
19630 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19631 (aarch64_reg_or_bic_imm): Likewise.
19632 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19633 with an insn_type enum and msl with a modifier_type enum.
19634 Replace element_width with a scalar_mode. Change the shift
19635 to unsigned int. Add constructors for scalar_float_mode and
19636 scalar_int_mode elements.
19637 (aarch64_vect_float_const_representable_p): Delete.
19638 (aarch64_can_const_movi_rtx_p)
19639 (aarch64_simd_scalar_immediate_valid_for_move)
19640 (aarch64_simd_make_constant): Update call to
19641 aarch64_simd_valid_immediate.
19642 (aarch64_advsimd_valid_immediate_hs): New function.
19643 (aarch64_advsimd_valid_immediate): Likewise.
19644 (aarch64_simd_valid_immediate): Remove mode and inverse
19645 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19646 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19647 and aarch64_float_const_representable_p on the result.
19648 (aarch64_output_simd_mov_immediate): Remove mode argument.
19649 Update call to aarch64_simd_valid_immediate and use of
19650 simd_immediate_info.
19651 (aarch64_output_scalar_simd_mov_immediate): Update call
19652 accordingly.
19653
19654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19655 Alan Hayward <alan.hayward@arm.com>
19656 David Sherwood <david.sherwood@arm.com>
19657
19658 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19659 (mode_nunits): Likewise CONST_MODE_NUNITS.
19660 * machmode.def (ADJUST_NUNITS): Document.
19661 * genmodes.c (mode_data::need_nunits_adj): New field.
19662 (blank_mode): Update accordingly.
19663 (adj_nunits): New variable.
19664 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19665 parameter.
19666 (emit_mode_size_inline): Set need_bytesize_adj for all modes
19667 listed in adj_nunits.
19668 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19669 listed in adj_nunits. Don't emit case statements for such modes.
19670 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19671 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
19672 nothing if adj_nunits is nonnull.
19673 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19674 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19675 (emit_mode_fbit): Update use of print_maybe_const_decl.
19676 (emit_move_size): Likewise. Treat the array as non-const
19677 if adj_nunits.
19678 (emit_mode_adjustments): Handle adj_nunits.
19679
19680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19681
19682 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19683 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19684 (VECTOR_MODES): Use it.
19685 (make_vector_modes): Take the prefix as an argument.
19686
19687 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19688 Alan Hayward <alan.hayward@arm.com>
19689 David Sherwood <david.sherwood@arm.com>
19690
19691 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19692 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19693 for MODE_VECTOR_BOOL.
19694 * machmode.def (VECTOR_BOOL_MODE): Document.
19695 * genmodes.c (VECTOR_BOOL_MODE): New macro.
19696 (make_vector_bool_mode): New function.
19697 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19698 MODE_VECTOR_BOOL.
19699 * lto-streamer-in.c (lto_input_mode_table): Likewise.
19700 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19701 Likewise.
19702 * stor-layout.c (int_mode_for_mode): Likewise.
19703 * tree.c (build_vector_type_for_mode): Likewise.
19704 * varasm.c (output_constant_pool_2): Likewise.
19705 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19706 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
19707 for MODE_VECTOR_BOOL.
19708 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19709 of mode class checks.
19710 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19711 instead of a list of mode class checks.
19712 (expand_vector_scalar_condition): Likewise.
19713 (type_for_widest_vector_mode): Handle BImode as an inner mode.
19714
19715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19716 Alan Hayward <alan.hayward@arm.com>
19717 David Sherwood <david.sherwood@arm.com>
19718
19719 * machmode.h (mode_size): Change from unsigned short to
19720 poly_uint16_pod.
19721 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19722 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19723 or if measurement_type is not polynomial.
19724 (fixed_size_mode::includes_p): Check for constant-sized modes.
19725 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19726 return a poly_uint16 rather than an unsigned short.
19727 (emit_mode_size): Change the type of mode_size from unsigned short
19728 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
19729 (emit_mode_adjustments): Cope with polynomial vector sizes.
19730 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19731 for GET_MODE_SIZE.
19732 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19733 for GET_MODE_SIZE.
19734 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19735 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19736 * caller-save.c (setup_save_areas): Likewise.
19737 (replace_reg_with_saved_mem): Likewise.
19738 * calls.c (emit_library_call_value_1): Likewise.
19739 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19740 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19741 (gen_lowpart_for_combine): Likewise.
19742 * convert.c (convert_to_integer_1): Likewise.
19743 * cse.c (equiv_constant, cse_insn): Likewise.
19744 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19745 (cselib_subst_to_values): Likewise.
19746 * dce.c (word_dce_process_block): Likewise.
19747 * df-problems.c (df_word_lr_mark_ref): Likewise.
19748 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19749 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19750 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19751 (rtl_for_decl_location): Likewise.
19752 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19753 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19754 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19755 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19756 (expand_expr_real_1): Likewise.
19757 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19758 (pad_below): Likewise.
19759 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19760 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19761 * ira.c (get_subreg_tracking_sizes): Likewise.
19762 * ira-build.c (ira_create_allocno_objects): Likewise.
19763 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19764 (ira_sort_regnos_for_alter_reg): Likewise.
19765 * ira-costs.c (record_operand_costs): Likewise.
19766 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19767 (resolve_simple_move): Likewise.
19768 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19769 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19770 (lra_constraints): Likewise.
19771 (CONST_POOL_OK_P): Reject variable-sized modes.
19772 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19773 (add_pseudo_to_slot, lra_spill): Likewise.
19774 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19775 * optabs-query.c (get_best_extraction_insn): Likewise.
19776 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19777 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19778 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19779 * recog.c (offsettable_address_addr_space_p): Likewise.
19780 * regcprop.c (maybe_mode_change): Likewise.
19781 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19782 * regrename.c (build_def_use): Likewise.
19783 * regstat.c (dump_reg_info): Likewise.
19784 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19785 (find_reloads, find_reloads_subreg_address): Likewise.
19786 * reload1.c (eliminate_regs_1): Likewise.
19787 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19788 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19789 (simplify_binary_operation_1, simplify_subreg): Likewise.
19790 * targhooks.c (default_function_arg_padding): Likewise.
19791 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19792 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19793 (verify_gimple_assign_ternary): Likewise.
19794 * tree-inline.c (estimate_move_cost): Likewise.
19795 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19796 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19797 (get_address_cost_ainc): Likewise.
19798 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19799 (vect_supportable_dr_alignment): Likewise.
19800 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19801 (vectorizable_reduction): Likewise.
19802 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19803 (vectorizable_operation, vectorizable_load): Likewise.
19804 * tree.c (build_same_sized_truth_vector_type): Likewise.
19805 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19806 * var-tracking.c (emit_note_insn_var_location): Likewise.
19807 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19808 (ADDR_VEC_ALIGN): Likewise.
19809
19810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19811 Alan Hayward <alan.hayward@arm.com>
19812 David Sherwood <david.sherwood@arm.com>
19813
19814 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19815 unsigned short.
19816 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19817 or if measurement_type is polynomial.
19818 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19819 * combine.c (make_extraction): Likewise.
19820 * dse.c (find_shift_sequence): Likewise.
19821 * dwarf2out.c (mem_loc_descriptor): Likewise.
19822 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19823 (extract_bit_field, extract_low_bits): Likewise.
19824 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19825 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19826 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19827 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19828 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19829 * reload.c (find_reloads): Likewise.
19830 * reload1.c (alter_reg): Likewise.
19831 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19832 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19833 * tree-if-conv.c (predicate_mem_writes): Likewise.
19834 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19835 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19836 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19837 * valtrack.c (dead_debug_insert_temp): Likewise.
19838 * varasm.c (mergeable_constant_section): Likewise.
19839 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19840
19841 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19842 Alan Hayward <alan.hayward@arm.com>
19843 David Sherwood <david.sherwood@arm.com>
19844
19845 * expr.c (expand_assignment): Cope with polynomial mode sizes
19846 when assigning to a CONCAT.
19847
19848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19849 Alan Hayward <alan.hayward@arm.com>
19850 David Sherwood <david.sherwood@arm.com>
19851
19852 * machmode.h (mode_precision): Change from unsigned short to
19853 poly_uint16_pod.
19854 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19855 short.
19856 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19857 or if measurement_type is not polynomial.
19858 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19859 in which the mode is already known to be a scalar_int_mode.
19860 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19861 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19862 initializer.
19863 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19864 for GET_MODE_PRECISION.
19865 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19866 for GET_MODE_PRECISION.
19867 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19868 as polynomial.
19869 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19870 (expand_field_assignment, make_extraction): Likewise.
19871 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19872 (get_last_value): Likewise.
19873 * convert.c (convert_to_integer_1): Likewise.
19874 * cse.c (cse_insn): Likewise.
19875 * expr.c (expand_expr_real_1): Likewise.
19876 * lra-constraints.c (simplify_operand_subreg): Likewise.
19877 * optabs-query.c (can_atomic_load_p): Likewise.
19878 * optabs.c (expand_atomic_load): Likewise.
19879 (expand_atomic_store): Likewise.
19880 * ree.c (combine_reaching_defs): Likewise.
19881 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19882 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19883 * tree.h (type_has_mode_precision_p): Likewise.
19884 * ubsan.c (instrument_si_overflow): Likewise.
19885
19886 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19887 Alan Hayward <alan.hayward@arm.com>
19888 David Sherwood <david.sherwood@arm.com>
19889
19890 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19891 polynomial numbers of units.
19892 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19893 (valid_vector_subparts_p): New function.
19894 (build_vector_type): Remove temporary shim and take the number
19895 of units as a poly_uint64 rather than an int.
19896 (build_opaque_vector_type): Take the number of units as a
19897 poly_uint64 rather than an int.
19898 * tree.c (build_vector_from_ctor): Handle polynomial
19899 TYPE_VECTOR_SUBPARTS.
19900 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19901 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19902 (build_vector_from_val): If the number of units is variable,
19903 use build_vec_duplicate_cst for constant operands and
19904 VEC_DUPLICATE_EXPR otherwise.
19905 (make_vector_type): Remove temporary is_constant ().
19906 (build_vector_type, build_opaque_vector_type): Take the number of
19907 units as a poly_uint64 rather than an int.
19908 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19909 VECTOR_CST_NELTS.
19910 * cfgexpand.c (expand_debug_expr): Likewise.
19911 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19912 (store_constructor, expand_expr_real_1): Likewise.
19913 (const_scalar_mask_from_tree): Likewise.
19914 * fold-const-call.c (fold_const_reduction): Likewise.
19915 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19916 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19917 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19918 (fold_relational_const): Likewise.
19919 (native_interpret_vector): Likewise. Change the size from an
19920 int to an unsigned int.
19921 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19922 TYPE_VECTOR_SUBPARTS.
19923 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19924 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19925 duplicating a non-constant operand into a variable-length vector.
19926 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19927 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19928 * ipa-icf.c (sem_variable::equals): Likewise.
19929 * match.pd: Likewise.
19930 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19931 * print-tree.c (print_node): Likewise.
19932 * stor-layout.c (layout_type): Likewise.
19933 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19934 * tree-cfg.c (verify_gimple_comparison): Likewise.
19935 (verify_gimple_assign_binary): Likewise.
19936 (verify_gimple_assign_ternary): Likewise.
19937 (verify_gimple_assign_single): Likewise.
19938 * tree-pretty-print.c (dump_generic_node): Likewise.
19939 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19940 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19941 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19942 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19943 (vect_shift_permute_load_chain): Likewise.
19944 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19945 (expand_vector_condition, optimize_vector_constructor): Likewise.
19946 (lower_vec_perm, get_compute_type): Likewise.
19947 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19948 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19949 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19950 (vect_recog_mask_conversion_pattern): Likewise.
19951 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19952 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19953 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19954 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19955 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19956 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19957 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19958 (supportable_widening_operation): Likewise.
19959 (supportable_narrowing_operation): Likewise.
19960 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19961 Likewise.
19962 * varasm.c (output_constant): Likewise.
19963
19964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19965 Alan Hayward <alan.hayward@arm.com>
19966 David Sherwood <david.sherwood@arm.com>
19967
19968 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19969 so that both the length == 3 and length != 3 cases set up their
19970 own permute vectors. Add comments explaining why we know the
19971 number of elements is constant.
19972 (vect_permute_load_chain): Likewise.
19973
19974 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19975 Alan Hayward <alan.hayward@arm.com>
19976 David Sherwood <david.sherwood@arm.com>
19977
19978 * machmode.h (mode_nunits): Change from unsigned char to
19979 poly_uint16_pod.
19980 (ONLY_FIXED_SIZE_MODES): New macro.
19981 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19982 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19983 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19984 New typedefs.
19985 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19986 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19987 or if measurement_type is not polynomial.
19988 * genmodes.c (ZERO_COEFFS): New macro.
19989 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19990 poly_uint16.
19991 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19992 Use ZERO_COEFFS when emitting initializers.
19993 * data-streamer.h (bp_pack_poly_value): New function.
19994 (bp_unpack_poly_value): Likewise.
19995 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19996 for GET_MODE_NUNITS.
19997 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19998 for GET_MODE_NUNITS.
19999 * tree.c (make_vector_type): Remove temporary shim and make
20000 the real function take the number of units as a poly_uint64
20001 rather than an int.
20002 (build_vector_type_for_mode): Handle polynomial nunits.
20003 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20004 * emit-rtl.c (const_vec_series_p_1): Likewise.
20005 (gen_rtx_CONST_VECTOR): Likewise.
20006 * fold-const.c (test_vec_duplicate_folding): Likewise.
20007 * genrecog.c (validate_pattern): Likewise.
20008 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20009 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20010 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20011 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20012 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20013 * rtlanal.c (subreg_get_info): Likewise.
20014 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20015 (vect_grouped_load_supported): Likewise.
20016 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20017 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20018 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20019 (simplify_const_unary_operation, simplify_binary_operation_1)
20020 (simplify_const_binary_operation, simplify_ternary_operation)
20021 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20022 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20023 instead of CONST_VECTOR_NUNITS.
20024 * varasm.c (output_constant_pool_2): Likewise.
20025 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20026 explicit-encoded elements in the XVEC for variable-length vectors.
20027
20028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20029
20030 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20031
20032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20033 Alan Hayward <alan.hayward@arm.com>
20034 David Sherwood <david.sherwood@arm.com>
20035
20036 * coretypes.h (fixed_size_mode): Declare.
20037 (fixed_size_mode_pod): New typedef.
20038 * builtins.h (target_builtins::x_apply_args_mode)
20039 (target_builtins::x_apply_result_mode): Change type to
20040 fixed_size_mode_pod.
20041 * builtins.c (apply_args_size, apply_result_size, result_vector)
20042 (expand_builtin_apply_args_1, expand_builtin_apply)
20043 (expand_builtin_return): Update accordingly.
20044
20045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20046
20047 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20048 * cselib.c (cselib_hash_rtx): Likewise.
20049 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20050 CONST_VECTOR encoding.
20051
20052 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20053 Jeff Law <law@redhat.com>
20054
20055 PR target/83641
20056 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20057 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20058 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20059 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20060
20061 PR target/83641
20062 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20063 explicitly probe *sp in a noreturn function if there were any callee
20064 register saves or frame pointer is needed.
20065
20066 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20067
20068 PR debug/83621
20069 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20070 BLKmode for ternary, binary or unary expressions.
20071
20072 PR debug/83645
20073 * var-tracking.c (delete_vta_debug_insn): New inline function.
20074 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20075 insns from get_insns () to NULL instead of each bb separately.
20076 Use delete_vta_debug_insn. No longer static.
20077 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20078 delete_vta_debug_insns callers.
20079 * rtl.h (delete_vta_debug_insns): Declare.
20080 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20081 instead of variable_tracking_main.
20082
20083 2018-01-03 Martin Sebor <msebor@redhat.com>
20084
20085 PR tree-optimization/83603
20086 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20087 arguments past the endof the argument list in functions declared
20088 without a prototype.
20089 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20090 Avoid checking when arguments are null.
20091
20092 2018-01-03 Martin Sebor <msebor@redhat.com>
20093
20094 PR c/83559
20095 * doc/extend.texi (attribute const): Fix a typo.
20096 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20097 issuing -Wsuggest-attribute for void functions.
20098
20099 2018-01-03 Martin Sebor <msebor@redhat.com>
20100
20101 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20102 offset_int::from instead of wide_int::to_shwi.
20103 (maybe_diag_overlap): Remove assertion.
20104 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20105 * gimple-ssa-sprintf.c (format_directive): Same.
20106 (parse_directive): Same.
20107 (sprintf_dom_walker::compute_format_length): Same.
20108 (try_substitute_return_value): Same.
20109
20110 2018-01-03 Jeff Law <law@redhat.com>
20111
20112 PR middle-end/83654
20113 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20114 non-constant residual for zero at runtime and avoid probing in
20115 that case. Reorganize code for trailing problem to mirror handling
20116 of the residual.
20117
20118 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20119
20120 PR tree-optimization/83501
20121 * tree-ssa-strlen.c (get_string_cst): New.
20122 (handle_char_store): Call get_string_cst.
20123
20124 2018-01-03 Martin Liska <mliska@suse.cz>
20125
20126 PR tree-optimization/83593
20127 * tree-ssa-strlen.c: Include tree-cfg.h.
20128 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20129 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20130 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20131 to false.
20132 (strlen_dom_walker::before_dom_children): Call
20133 gimple_purge_dead_eh_edges. Dump tranformation with details
20134 dump flags.
20135 (strlen_dom_walker::before_dom_children): Update call by adding
20136 new argument cleanup_eh.
20137 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20138
20139 2018-01-03 Martin Liska <mliska@suse.cz>
20140
20141 PR ipa/83549
20142 * cif-code.def (VARIADIC_THUNK): New enum value.
20143 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20144 thunks.
20145
20146 2018-01-03 Jan Beulich <jbeulich@suse.com>
20147
20148 * sse.md (mov<mode>_internal): Tighten condition for when to use
20149 vmovdqu<ssescalarsize> for TI and OI modes.
20150
20151 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20152
20153 Update copyright years.
20154
20155 2018-01-03 Martin Liska <mliska@suse.cz>
20156
20157 PR ipa/83594
20158 * ipa-visibility.c (function_and_variable_visibility): Skip
20159 functions with noipa attribure.
20160
20161 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20162
20163 * gcc.c (process_command): Update copyright notice dates.
20164 * gcov-dump.c (print_version): Ditto.
20165 * gcov.c (print_version): Ditto.
20166 * gcov-tool.c (print_version): Ditto.
20167 * gengtype.c (create_file): Ditto.
20168 * doc/cpp.texi: Bump @copying's copyright year.
20169 * doc/cppinternals.texi: Ditto.
20170 * doc/gcc.texi: Ditto.
20171 * doc/gccint.texi: Ditto.
20172 * doc/gcov.texi: Ditto.
20173 * doc/install.texi: Ditto.
20174 * doc/invoke.texi: Ditto.
20175
20176 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20177
20178 * vector-builder.h (vector_builder::m_full_nelts): Change from
20179 unsigned int to poly_uint64.
20180 (vector_builder::full_nelts): Update prototype accordingly.
20181 (vector_builder::new_vector): Likewise.
20182 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20183 (vector_builder::operator ==): Likewise.
20184 (vector_builder::finalize): Likewise.
20185 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20186 Take the number of elements as a poly_uint64 rather than an
20187 unsigned int.
20188 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20189 from unsigned int to poly_uint64.
20190 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20191 (vec_perm_indices::new_vector): Likewise.
20192 (vec_perm_indices::length): Likewise.
20193 (vec_perm_indices::nelts_per_input): Likewise.
20194 (vec_perm_indices::input_nelts): Likewise.
20195 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20196 number of elements per input as a poly_uint64 rather than an
20197 unsigned int. Use the original encoding for variable-length
20198 vectors, rather than clamping each individual element.
20199 For the second and subsequent elements in each pattern,
20200 clamp the step and base before clamping their sum.
20201 (vec_perm_indices::series_p): Handle polynomial element counts.
20202 (vec_perm_indices::all_in_range_p): Likewise.
20203 (vec_perm_indices_to_tree): Likewise.
20204 (vec_perm_indices_to_rtx): Likewise.
20205 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20206 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20207 (tree_vector_builder::new_binary_operation): Handle polynomial
20208 element counts. Return false if we need to know the number
20209 of elements at compile time.
20210 * fold-const.c (fold_vec_perm): Punt if the number of elements
20211 isn't known at compile time.
20212
20213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20214
20215 * vec-perm-indices.h (vec_perm_builder): Change element type
20216 from HOST_WIDE_INT to poly_int64.
20217 (vec_perm_indices::element_type): Update accordingly.
20218 (vec_perm_indices::clamp): Handle polynomial element_types.
20219 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20220 (vec_perm_indices::all_in_range_p): Likewise.
20221 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20222 than shwi trees.
20223 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20224 polynomial vec_perm_indices element types.
20225 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20226 * fold-const.c (fold_vec_perm): Likewise.
20227 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20228 * tree-vect-generic.c (lower_vec_perm): Likewise.
20229 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20230 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20231 element type to HOST_WIDE_INT.
20232
20233 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20234 Alan Hayward <alan.hayward@arm.com>
20235 David Sherwood <david.sherwood@arm.com>
20236
20237 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20238 rather than an int. Use plus_constant.
20239 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20240 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20241
20242 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20243 Alan Hayward <alan.hayward@arm.com>
20244 David Sherwood <david.sherwood@arm.com>
20245
20246 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20247 a HOST_WIDE_INT to a poly_int64.
20248
20249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20250 Alan Hayward <alan.hayward@arm.com>
20251 David Sherwood <david.sherwood@arm.com>
20252
20253 * calls.c (load_register_parameters): Cope with polynomial
20254 mode sizes. Require a constant size for BLKmode parameters
20255 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20256 forces a parameter to be padded at the lsb end in order to
20257 fill a complete number of words, require the parameter size
20258 to be ordered wrt UNITS_PER_WORD.
20259
20260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20261 Alan Hayward <alan.hayward@arm.com>
20262 David Sherwood <david.sherwood@arm.com>
20263
20264 * reload1.c (spill_stack_slot_width): Change element type
20265 from unsigned int to poly_uint64_pod.
20266 (alter_reg): Treat mode sizes as polynomial.
20267
20268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20269 Alan Hayward <alan.hayward@arm.com>
20270 David Sherwood <david.sherwood@arm.com>
20271
20272 * reload.c (complex_word_subreg_p): New function.
20273 (reload_inner_reg_of_subreg, push_reload): Use it.
20274
20275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20276 Alan Hayward <alan.hayward@arm.com>
20277 David Sherwood <david.sherwood@arm.com>
20278
20279 * lra-constraints.c (process_alt_operands): Reject matched
20280 operands whose sizes aren't ordered.
20281 (match_reload): Refer to this check here.
20282
20283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20284 Alan Hayward <alan.hayward@arm.com>
20285 David Sherwood <david.sherwood@arm.com>
20286
20287 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20288 that the mode size is in the set {1, 2, 4, 8, 16}.
20289
20290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20291 Alan Hayward <alan.hayward@arm.com>
20292 David Sherwood <david.sherwood@arm.com>
20293
20294 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20295 Use plus_constant instead of gen_rtx_PLUS.
20296
20297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20298 Alan Hayward <alan.hayward@arm.com>
20299 David Sherwood <david.sherwood@arm.com>
20300
20301 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20302 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20303 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20304 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20305 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20306 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20307 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20308 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20309 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20310 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20311 a poly_int64.
20312 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20313 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20314 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20315 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20316 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20317 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20318 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20319 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20320 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20321 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20322 function.
20323 * expr.c (emit_move_resolve_push): Treat the input and result
20324 of PUSH_ROUNDING as a poly_int64.
20325 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20326 (emit_push_insn): Likewise.
20327 * lra-eliminations.c (mark_not_eliminable): Likewise.
20328 * recog.c (push_operand): Likewise.
20329 * reload1.c (elimination_effects): Likewise.
20330 * rtlanal.c (nonzero_bits1): Likewise.
20331 * calls.c (store_one_arg): Likewise. Require the padding to be
20332 known at compile time.
20333
20334 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20335 Alan Hayward <alan.hayward@arm.com>
20336 David Sherwood <david.sherwood@arm.com>
20337
20338 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20339 Use plus_constant instead of gen_rtx_PLUS.
20340
20341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20342 Alan Hayward <alan.hayward@arm.com>
20343 David Sherwood <david.sherwood@arm.com>
20344
20345 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20346 rather than an int.
20347
20348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20349 Alan Hayward <alan.hayward@arm.com>
20350 David Sherwood <david.sherwood@arm.com>
20351
20352 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20353 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20354 via stack temporaries. Treat the mode size as polynomial too.
20355
20356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20357 Alan Hayward <alan.hayward@arm.com>
20358 David Sherwood <david.sherwood@arm.com>
20359
20360 * expr.c (expand_expr_real_2): When handling conversions involving
20361 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20362 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20363 as a poly_uint64 too.
20364
20365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20366 Alan Hayward <alan.hayward@arm.com>
20367 David Sherwood <david.sherwood@arm.com>
20368
20369 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20370
20371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20372 Alan Hayward <alan.hayward@arm.com>
20373 David Sherwood <david.sherwood@arm.com>
20374
20375 * combine.c (can_change_dest_mode): Handle polynomial
20376 REGMODE_NATURAL_SIZE.
20377 * expmed.c (store_bit_field_1): Likewise.
20378 * expr.c (store_constructor): Likewise.
20379 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20380 and polynomial REGMODE_NATURAL_SIZE.
20381 (gen_lowpart_common): Likewise.
20382 * reginfo.c (record_subregs_of_mode): Likewise.
20383 * rtlanal.c (read_modify_subreg_p): Likewise.
20384
20385 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20386 Alan Hayward <alan.hayward@arm.com>
20387 David Sherwood <david.sherwood@arm.com>
20388
20389 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20390 numbers of elements.
20391
20392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20393 Alan Hayward <alan.hayward@arm.com>
20394 David Sherwood <david.sherwood@arm.com>
20395
20396 * match.pd: Cope with polynomial numbers of vector elements.
20397
20398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20399 Alan Hayward <alan.hayward@arm.com>
20400 David Sherwood <david.sherwood@arm.com>
20401
20402 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20403 in a POINTER_PLUS_EXPR.
20404
20405 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20406 Alan Hayward <alan.hayward@arm.com>
20407 David Sherwood <david.sherwood@arm.com>
20408
20409 * omp-simd-clone.c (simd_clone_subparts): New function.
20410 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20411 (ipa_simd_modify_function_body): Likewise.
20412
20413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20414 Alan Hayward <alan.hayward@arm.com>
20415 David Sherwood <david.sherwood@arm.com>
20416
20417 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20418 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20419 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20420 (expand_vector_condition, vector_element): Likewise.
20421 (subparts_gt): New function.
20422 (get_compute_type): Use subparts_gt.
20423 (count_type_subparts): Delete.
20424 (expand_vector_operations_1): Use subparts_gt instead of
20425 count_type_subparts.
20426
20427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20428 Alan Hayward <alan.hayward@arm.com>
20429 David Sherwood <david.sherwood@arm.com>
20430
20431 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20432 (vect_compile_time_alias): ...this new function. Do the calculation
20433 on poly_ints rather than trees.
20434 (vect_prune_runtime_alias_test_list): Update call accordingly.
20435
20436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20437 Alan Hayward <alan.hayward@arm.com>
20438 David Sherwood <david.sherwood@arm.com>
20439
20440 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20441 numbers of units.
20442 (vect_schedule_slp_instance): Likewise.
20443
20444 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20445 Alan Hayward <alan.hayward@arm.com>
20446 David Sherwood <david.sherwood@arm.com>
20447
20448 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20449 constant and extern definitions for variable-length vectors.
20450 (vect_get_constant_vectors): Note that the number of units
20451 is known to be constant.
20452
20453 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20454 Alan Hayward <alan.hayward@arm.com>
20455 David Sherwood <david.sherwood@arm.com>
20456
20457 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20458 of units as polynomial. Choose between WIDE and NARROW based
20459 on multiple_p.
20460
20461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20462 Alan Hayward <alan.hayward@arm.com>
20463 David Sherwood <david.sherwood@arm.com>
20464
20465 * tree-vect-stmts.c (simd_clone_subparts): New function.
20466 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20467
20468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20469 Alan Hayward <alan.hayward@arm.com>
20470 David Sherwood <david.sherwood@arm.com>
20471
20472 * tree-vect-stmts.c (vectorizable_call): Treat the number of
20473 vectors as polynomial. Use build_index_vector for
20474 IFN_GOMP_SIMD_LANE.
20475
20476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20477 Alan Hayward <alan.hayward@arm.com>
20478 David Sherwood <david.sherwood@arm.com>
20479
20480 * tree-vect-stmts.c (get_load_store_type): Treat the number of
20481 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20482 for variable-length vectors.
20483 (vectorizable_mask_load_store): Treat the number of units as
20484 polynomial, asserting that it is constant if the condition has
20485 already been enforced.
20486 (vectorizable_store, vectorizable_load): Likewise.
20487
20488 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20489 Alan Hayward <alan.hayward@arm.com>
20490 David Sherwood <david.sherwood@arm.com>
20491
20492 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20493 of units as polynomial. Punt if we can't tell at compile time
20494 which vector contains the final result.
20495
20496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20497 Alan Hayward <alan.hayward@arm.com>
20498 David Sherwood <david.sherwood@arm.com>
20499
20500 * tree-vect-loop.c (vectorizable_induction): Treat the number
20501 of units as polynomial. Punt on SLP inductions. Use an integer
20502 VEC_SERIES_EXPR for variable-length integer reductions. Use a
20503 cast of such a series for variable-length floating-point
20504 reductions.
20505
20506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20507 Alan Hayward <alan.hayward@arm.com>
20508 David Sherwood <david.sherwood@arm.com>
20509
20510 * tree.h (build_index_vector): Declare.
20511 * tree.c (build_index_vector): New function.
20512 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20513 of units as polynomial, forcibly converting it to a constant if
20514 vectorizable_reduction has already enforced the condition.
20515 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
20516 to create a {1,2,3,...} vector.
20517 (vectorizable_reduction): Treat the number of units as polynomial.
20518 Choose vectype_in based on the largest scalar element size rather
20519 than the smallest number of units. Enforce the restrictions
20520 relied on above.
20521
20522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20523 Alan Hayward <alan.hayward@arm.com>
20524 David Sherwood <david.sherwood@arm.com>
20525
20526 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20527 number of units as polynomial.
20528
20529 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20530 Alan Hayward <alan.hayward@arm.com>
20531 David Sherwood <david.sherwood@arm.com>
20532
20533 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20534 * target.def (autovectorize_vector_sizes): Return the vector sizes
20535 by pointer, using vector_sizes rather than a bitmask.
20536 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20537 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20538 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20539 Likewise.
20540 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20541 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20542 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20543 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20544 * omp-general.c (omp_max_vf): Likewise.
20545 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20546 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20547 * tree-vect-loop.c (vect_analyze_loop): Likewise.
20548 * tree-vect-slp.c (vect_slp_bb): Likewise.
20549 * doc/tm.texi: Regenerate.
20550 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20551 to a poly_uint64.
20552 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20553 the vector size as a poly_uint64 rather than an unsigned int.
20554 (current_vector_size): Change from an unsigned int to a poly_uint64.
20555 (get_vectype_for_scalar_type): Update accordingly.
20556 * tree.h (build_truth_vector_type): Take the size and number of
20557 units as a poly_uint64 rather than an unsigned int.
20558 (build_vector_type): Add a temporary overload that takes
20559 the number of units as a poly_uint64 rather than an unsigned int.
20560 * tree.c (make_vector_type): Likewise.
20561 (build_truth_vector_type): Take the number of units as a poly_uint64
20562 rather than an unsigned int.
20563
20564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20565 Alan Hayward <alan.hayward@arm.com>
20566 David Sherwood <david.sherwood@arm.com>
20567
20568 * target.def (get_mask_mode): Take the number of units and length
20569 as poly_uint64s rather than unsigned ints.
20570 * targhooks.h (default_get_mask_mode): Update accordingly.
20571 * targhooks.c (default_get_mask_mode): Likewise.
20572 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20573 * doc/tm.texi: Regenerate.
20574
20575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20576 Alan Hayward <alan.hayward@arm.com>
20577 David Sherwood <david.sherwood@arm.com>
20578
20579 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20580 * omp-general.c (omp_max_vf): Likewise.
20581 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20582 (expand_omp_simd): Handle polynomial safelen.
20583 * omp-low.c (omplow_simd_context): Add a default constructor.
20584 (omplow_simd_context::max_vf): Change from int to poly_uint64.
20585 (lower_rec_simd_input_clauses): Update accordingly.
20586 (lower_rec_input_clauses): Likewise.
20587
20588 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20589 Alan Hayward <alan.hayward@arm.com>
20590 David Sherwood <david.sherwood@arm.com>
20591
20592 * tree-vectorizer.h (vect_nunits_for_cost): New function.
20593 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20594 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20595 (vect_analyze_slp_cost): Likewise.
20596 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20597 (vect_model_load_cost): Likewise.
20598
20599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20600 Alan Hayward <alan.hayward@arm.com>
20601 David Sherwood <david.sherwood@arm.com>
20602
20603 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20604 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20605 from an unsigned int * to a poly_uint64_pod *.
20606 (calculate_unrolling_factor): New function.
20607 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
20608
20609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20610 Alan Hayward <alan.hayward@arm.com>
20611 David Sherwood <david.sherwood@arm.com>
20612
20613 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20614 from an unsigned int to a poly_uint64.
20615 (_loop_vec_info::slp_unrolling_factor): Likewise.
20616 (_loop_vec_info::vectorization_factor): Change from an int
20617 to a poly_uint64.
20618 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20619 (vect_get_num_vectors): New function.
20620 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20621 (vect_get_num_copies): Use vect_get_num_vectors.
20622 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20623 to an unsigned int *.
20624 (vect_analyze_data_refs): Change min_vf from an int * to a
20625 poly_uint64 *.
20626 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20627 than an unsigned HOST_WIDE_INT.
20628 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20629 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20630 to an unsigned int *.
20631 (vect_analyze_data_ref_dependences): Likewise.
20632 (vect_compute_data_ref_alignment): Handle polynomial vf.
20633 (vect_enhance_data_refs_alignment): Likewise.
20634 (vect_prune_runtime_alias_test_list): Likewise.
20635 (vect_shift_permute_load_chain): Likewise.
20636 (vect_supportable_dr_alignment): Likewise.
20637 (dependence_distance_ge_vf): Take the vectorization factor as a
20638 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20639 (vect_analyze_data_refs): Change min_vf from an int * to a
20640 poly_uint64 *.
20641 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20642 vfm1 as a poly_uint64 rather than an int. Make the same change
20643 for the returned bound_scalar.
20644 (vect_gen_vector_loop_niters): Handle polynomial vf.
20645 (vect_do_peeling): Likewise. Update call to
20646 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20647 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20648 be constant.
20649 * tree-vect-loop.c (vect_determine_vectorization_factor)
20650 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20651 (vect_get_known_peeling_cost): Likewise.
20652 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20653 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20654 (vect_transform_loop): Likewise. Use the lowest possible VF when
20655 updating the upper bounds of the loop.
20656 (vect_min_worthwhile_factor): Make static. Return an unsigned int
20657 rather than an int.
20658 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20659 polynomial unroll factors.
20660 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20661 (vect_make_slp_decision): Likewise.
20662 (vect_supported_load_permutation_p): Likewise, and polynomial
20663 vf too.
20664 (vect_analyze_slp_cost): Handle polynomial vf.
20665 (vect_slp_analyze_node_operations): Likewise.
20666 (vect_slp_analyze_bb_1): Likewise.
20667 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20668 than an unsigned HOST_WIDE_INT.
20669 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20670 (vectorizable_load): Handle polynomial vf.
20671 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20672 a poly_uint64.
20673 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20674
20675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20676 Alan Hayward <alan.hayward@arm.com>
20677 David Sherwood <david.sherwood@arm.com>
20678
20679 * match.pd: Handle bit operations involving three constants
20680 and try to fold one pair.
20681
20682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20683
20684 * tree-vect-loop-manip.c: Include gimple-fold.h.
20685 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20686 niters_maybe_zero parameters. Handle other cases besides a step of 1.
20687 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20688 Add a path that uses a step of VF instead of 1, but disable it
20689 for now.
20690 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20691 and niters_no_overflow parameters. Update calls to
20692 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20693 Create a new SSA name if the latter choses to use a ste other
20694 than zero, and return it via niters_vector_mult_vf_var.
20695 * tree-vect-loop.c (vect_transform_loop): Update calls to
20696 vect_do_peeling, vect_gen_vector_loop_niters and
20697 slpeel_make_loop_iterate_ntimes.
20698 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20699 (vect_gen_vector_loop_niters): Update declarations after above changes.
20700
20701 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
20702
20703 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20704 128-bit round to integer instructions.
20705 (ceil<mode>2): Likewise.
20706 (btrunc<mode>2): Likewise.
20707 (round<mode>2): Likewise.
20708
20709 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20710
20711 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20712 unaligned VSX load/store on P8/P9.
20713 (expand_block_clear): Allow the use of unaligned VSX
20714 load/store on P8/P9.
20715
20716 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20717
20718 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20719 New function.
20720 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20721 swap associated with both a load and a store.
20722
20723 2018-01-02 Andrew Waterman <andrew@sifive.com>
20724
20725 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20726 * config/riscv/riscv.md (clear_cache): Use it.
20727
20728 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
20729
20730 * web.c: Remove out-of-date comment.
20731
20732 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20733
20734 * expr.c (fixup_args_size_notes): Check that any existing
20735 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20736 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20737 (emit_single_push_insn): ...here.
20738
20739 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20740
20741 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20742 (const_vector_encoded_nelts): New function.
20743 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20744 (const_vector_int_elt, const_vector_elt): Declare.
20745 * emit-rtl.c (const_vector_int_elt_1): New function.
20746 (const_vector_elt): Likewise.
20747 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20748 of CONST_VECTOR_ELT.
20749
20750 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20751
20752 * expr.c: Include rtx-vector-builder.h.
20753 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20754 directly on the tree encoding.
20755 (const_vector_from_tree): Likewise.
20756 * optabs.c: Include rtx-vector-builder.h.
20757 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20758 sequence of "u" values.
20759 * vec-perm-indices.c: Include rtx-vector-builder.h.
20760 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20761 directly on the vec_perm_indices encoding.
20762
20763 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20764
20765 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20766 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20767 * rtx-vector-builder.h: New file.
20768 * rtx-vector-builder.c: Likewise.
20769 * rtl.h (rtx_def::u2): Add a const_vector field.
20770 (CONST_VECTOR_NPATTERNS): New macro.
20771 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20772 (CONST_VECTOR_DUPLICATE_P): Likewise.
20773 (CONST_VECTOR_STEPPED_P): Likewise.
20774 (CONST_VECTOR_ENCODED_ELT): Likewise.
20775 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20776 (unwrap_const_vec_duplicate): Likewise.
20777 (const_vec_series_p): Check for a non-duplicated vector encoding.
20778 Say that the function only returns true for integer vectors.
20779 * emit-rtl.c: Include rtx-vector-builder.h.
20780 (gen_const_vec_duplicate_1): Delete.
20781 (gen_const_vector): Call gen_const_vec_duplicate instead of
20782 gen_const_vec_duplicate_1.
20783 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20784 (gen_const_vec_duplicate): Use rtx_vector_builder.
20785 (gen_const_vec_series): Likewise.
20786 (gen_rtx_CONST_VECTOR): Likewise.
20787 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20788 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20789 Build a new vector rather than modifying a CONST_VECTOR in-place.
20790 (handle_special_swappables): Update call accordingly.
20791 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20792 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20793 Build a new vector rather than modifying a CONST_VECTOR in-place.
20794 (handle_special_swappables): Update call accordingly.
20795
20796 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20797
20798 * simplify-rtx.c (simplify_const_binary_operation): Use
20799 CONST_VECTOR_ELT instead of XVECEXP.
20800
20801 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20802
20803 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20804 the selector elements to be different from the data elements
20805 if the selector is a VECTOR_CST.
20806 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20807 ssizetype for the selector.
20808
20809 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20810
20811 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20812 before testing each element individually.
20813 * tree-vect-generic.c (lower_vec_perm): Likewise.
20814
20815 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20816
20817 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20818 * selftest-run-tests.c (selftest::run_tests): Call it.
20819 * vector-builder.h (vector_builder::operator ==): New function.
20820 (vector_builder::operator !=): Likewise.
20821 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20822 (vec_perm_indices::all_from_input_p): New function.
20823 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20824 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20825 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20826 instead of reading the VECTOR_CST directly. Detect whether both
20827 vector inputs are the same before constructing the vec_perm_indices,
20828 and update the number of inputs argument accordingly. Use the
20829 utility functions added above. Only construct sel2 if we need to.
20830
20831 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20832
20833 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20834 the broadcast of the low byte.
20835 (expand_mult_highpart): Use an explicit encoding for the permutes.
20836 * optabs-query.c (can_mult_highpart_p): Likewise.
20837 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20838 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20839 (vectorizable_bswap): Likewise.
20840 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20841 explicit encoding for the power-of-2 permutes.
20842 (vect_permute_store_chain): Likewise.
20843 (vect_grouped_load_supported): Likewise.
20844 (vect_permute_load_chain): Likewise.
20845
20846 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20847
20848 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20849 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20850 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20851 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20852 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20853 (vect_gen_perm_mask_any): Likewise.
20854
20855 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20856
20857 * int-vector-builder.h: New file.
20858 * vec-perm-indices.h: Include int-vector-builder.h.
20859 (vec_perm_indices): Redefine as an int_vector_builder.
20860 (auto_vec_perm_indices): Delete.
20861 (vec_perm_builder): Redefine as a stand-alone class.
20862 (vec_perm_indices::vec_perm_indices): New function.
20863 (vec_perm_indices::clamp): Likewise.
20864 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20865 (vec_perm_indices::new_vector): New function.
20866 (vec_perm_indices::new_expanded_vector): Update for new
20867 vec_perm_indices class.
20868 (vec_perm_indices::rotate_inputs): New function.
20869 (vec_perm_indices::all_in_range_p): Operate directly on the
20870 encoded form, without computing elided elements.
20871 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20872 encoding. Update for new vec_perm_indices class.
20873 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20874 the given vec_perm_builder.
20875 (expand_vec_perm_var): Update vec_perm_builder constructor.
20876 (expand_mult_highpart): Use vec_perm_builder instead of
20877 auto_vec_perm_indices.
20878 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20879 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20880 or double series encoding as appropriate.
20881 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20882 vec_perm_indices instead of auto_vec_perm_indices.
20883 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20884 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20885 (vect_permute_store_chain): Likewise.
20886 (vect_grouped_load_supported): Likewise.
20887 (vect_permute_load_chain): Likewise.
20888 (vect_shift_permute_load_chain): Likewise.
20889 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20890 (vect_transform_slp_perm_load): Likewise.
20891 (vect_schedule_slp_instance): Likewise.
20892 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20893 (vectorizable_mask_load_store): Likewise.
20894 (vectorizable_bswap): Likewise.
20895 (vectorizable_store): Likewise.
20896 (vectorizable_load): Likewise.
20897 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20898 vec_perm_indices instead of auto_vec_perm_indices. Use
20899 tree_to_vec_perm_builder to read the vector from a tree.
20900 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20901 vec_perm_builder instead of a vec_perm_indices.
20902 (have_whole_vector_shift): Use vec_perm_builder and
20903 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20904 truncation to calc_vec_perm_mask_for_shift.
20905 (vect_create_epilog_for_reduction): Likewise.
20906 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20907 from auto_vec_perm_indices to vec_perm_indices.
20908 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20909 instead of changing individual elements.
20910 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20911 the vector in d.perm.
20912 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20913 from auto_vec_perm_indices to vec_perm_indices.
20914 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20915 instead of changing individual elements.
20916 (arm_vectorize_vec_perm_const): Use new_vector to install
20917 the vector in d.perm.
20918 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20919 Update vec_perm_builder constructor.
20920 (rs6000_expand_interleave): Likewise.
20921 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20922 (rs6000_expand_interleave): Likewise.
20923
20924 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20925
20926 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20927 to qimode could truncate the indices.
20928 * optabs.c (expand_vec_perm_var): Likewise.
20929
20930 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20931
20932 * Makefile.in (OBJS): Add vec-perm-indices.o.
20933 * vec-perm-indices.h: New file.
20934 * vec-perm-indices.c: Likewise.
20935 * target.h (vec_perm_indices): Replace with a forward class
20936 declaration.
20937 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20938 * optabs.h: Include vec-perm-indices.h.
20939 (expand_vec_perm): Delete.
20940 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20941 (expand_vec_perm_const): Declare.
20942 * target.def (vec_perm_const_ok): Replace with...
20943 (vec_perm_const): ...this new hook.
20944 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20945 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20946 * doc/tm.texi: Regenerate.
20947 * optabs.def (vec_perm_const): Delete.
20948 * doc/md.texi (vec_perm_const): Likewise.
20949 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20950 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20951 expand_vec_perm for constant permutation vectors. Assert that
20952 the mode of variable permutation vectors is the integer equivalent
20953 of the mode that is being permuted.
20954 * optabs-query.h (selector_fits_mode_p): Declare.
20955 * optabs-query.c: Include vec-perm-indices.h.
20956 (selector_fits_mode_p): New function.
20957 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20958 is defined, instead of checking whether the vec_perm_const_optab
20959 exists. Use targetm.vectorize.vec_perm_const instead of
20960 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20961 fit in the vector mode before using a variable permute.
20962 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20963 vec_perm_indices instead of an rtx.
20964 (expand_vec_perm): Replace with...
20965 (expand_vec_perm_const): ...this new function. Take the selector
20966 as a vec_perm_indices rather than an rtx. Also take the mode of
20967 the selector. Update call to shift_amt_for_vec_perm_mask.
20968 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20969 Use vec_perm_indices::new_expanded_vector to expand the original
20970 selector into bytes. Check whether the indices fit in the vector
20971 mode before using a variable permute.
20972 (expand_vec_perm_var): Make global.
20973 (expand_mult_highpart): Use expand_vec_perm_const.
20974 * fold-const.c: Includes vec-perm-indices.h.
20975 * tree-ssa-forwprop.c: Likewise.
20976 * tree-vect-data-refs.c: Likewise.
20977 * tree-vect-generic.c: Likewise.
20978 * tree-vect-loop.c: Likewise.
20979 * tree-vect-slp.c: Likewise.
20980 * tree-vect-stmts.c: Likewise.
20981 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20982 Delete.
20983 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20984 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20985 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20986 (aarch64_vectorize_vec_perm_const): ...this new function.
20987 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20988 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20989 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20990 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20991 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20992 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20993 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20994 into...
20995 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20996 check for NEON modes.
20997 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20998 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20999 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21000 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21001 into...
21002 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21003 the old VEC_PERM_CONST conditions.
21004 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21005 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21006 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21007 (ia64_vectorize_vec_perm_const_ok): Merge into...
21008 (ia64_vectorize_vec_perm_const): ...this new function.
21009 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21010 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21011 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21012 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21013 * config/mips/mips.c (mips_expand_vec_perm_const)
21014 (mips_vectorize_vec_perm_const_ok): Merge into...
21015 (mips_vectorize_vec_perm_const): ...this new function.
21016 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21017 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21018 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21019 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21020 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21021 (rs6000_expand_vec_perm_const): Delete.
21022 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21023 Delete.
21024 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21025 (altivec_expand_vec_perm_const_le): Take each operand individually.
21026 Operate on constant selectors rather than rtxes.
21027 (altivec_expand_vec_perm_const): Likewise. Update call to
21028 altivec_expand_vec_perm_const_le.
21029 (rs6000_expand_vec_perm_const): Delete.
21030 (rs6000_vectorize_vec_perm_const_ok): Delete.
21031 (rs6000_vectorize_vec_perm_const): New function.
21032 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21033 an element count and rtx array.
21034 (rs6000_expand_extract_even): Update call accordingly.
21035 (rs6000_expand_interleave): Likewise.
21036 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21037 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21038 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21039 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21040 (rs6000_expand_vec_perm_const): Delete.
21041 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21042 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21043 (altivec_expand_vec_perm_const_le): Take each operand individually.
21044 Operate on constant selectors rather than rtxes.
21045 (altivec_expand_vec_perm_const): Likewise. Update call to
21046 altivec_expand_vec_perm_const_le.
21047 (rs6000_expand_vec_perm_const): Delete.
21048 (rs6000_vectorize_vec_perm_const_ok): Delete.
21049 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21050 reference to the SPE evmerge intructions.
21051 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21052 an element count and rtx array.
21053 (rs6000_expand_extract_even): Update call accordingly.
21054 (rs6000_expand_interleave): Likewise.
21055 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21056 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21057 new function.
21058 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21059
21060 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21061
21062 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21063 vector mode and that that mode matches the mode of the data
21064 being permuted.
21065 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21066 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21067 directly using expand_vec_perm_1 when forcing selectors into
21068 registers.
21069 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21070
21071 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21072
21073 * optabs-query.h (can_vec_perm_p): Delete.
21074 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21075 * optabs-query.c (can_vec_perm_p): Split into...
21076 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21077 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21078 particular selector is valid.
21079 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21080 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21081 (vect_grouped_load_supported): Likewise.
21082 (vect_shift_permute_load_chain): Likewise.
21083 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21084 (vect_transform_slp_perm_load): Likewise.
21085 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21086 (vectorizable_bswap): Likewise.
21087 (vect_gen_perm_mask_checked): Likewise.
21088 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21089 implementations of variable permutation vectors into account
21090 when deciding which selector to use.
21091 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21092 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21093 with a false third argument.
21094 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21095 to test whether the constant selector is valid and can_vec_perm_var_p
21096 to test whether a variable selector is valid.
21097
21098 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21099
21100 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21101 * optabs-query.c (can_vec_perm_p): Likewise.
21102 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21103 instead of vec_perm_indices.
21104 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21105 (vect_gen_perm_mask_checked): Likewise,
21106 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21107 (vect_gen_perm_mask_checked): Likewise,
21108
21109 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21110
21111 * optabs-query.h (qimode_for_vec_perm): Declare.
21112 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21113 (qimode_for_vec_perm): ...this new function.
21114 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21115
21116 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21117
21118 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21119 does not have a conditional at the top.
21120
21121 2018-01-02 Richard Biener <rguenther@suse.de>
21122
21123 * ipa-inline.c (big_speedup_p): Fix expression.
21124
21125 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21126
21127 PR target/81616
21128 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21129 for generic 4->6.
21130
21131 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21132
21133 PR target/81616
21134 Generic tuning.
21135 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21136 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21137 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21138 cond_taken_branch_cost 3->4.
21139
21140 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21141
21142 PR tree-optimization/83581
21143 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21144 TODO_cleanup_cfg if any changes have been made.
21145
21146 PR middle-end/83608
21147 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21148 convert_modes if target mode has the right side, but different mode
21149 class.
21150
21151 PR middle-end/83609
21152 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21153 last argument when extracting from CONCAT. If either from_real or
21154 from_imag is NULL, use expansion through memory. If result is not
21155 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21156 the parts directly to inner mode, if even that fails, use expansion
21157 through memory.
21158
21159 PR middle-end/83623
21160 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21161 check for bswap in mode rather than HImode and use that in expand_unop
21162 too.
21163 \f
21164 Copyright (C) 2018 Free Software Foundation, Inc.
21165
21166 Copying and distribution of this file, with or without modification,
21167 are permitted in any medium without royalty provided the copyright
21168 notice and this notice are preserved.