re PR ipa/88586 (ICE: Segmentation fault (in free_lang_data_in_decl))
[gcc.git] / gcc / ChangeLog
1 2018-12-29 Jakub Jelinek <jakub@redhat.com>
2
3 PR ipa/88586
4 * omp-low.c (lower_omp_task_reductions): Set DECL_CONTEXT on field
5 and ifield. Update TYPE_ALIGN from alignment of field, ifield or
6 bfield.
7
8 2018-12-28 Uros Bizjak <ubizjak@gmail.com>
9
10 * config/i386/i386.h (ADDITIONAL_REGISTER_NAMES): Add
11 sil, dil, bpl and spl aliases.
12
13 2018-12-28 Martin Sebor <msebor@redhat.com>
14
15 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid
16 undesirable warning.
17
18 2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
19
20 * omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
21 code paths. Update for libgomp OpenACC entry points change.
22
23 2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
24 Julian Brown <julian@codesourcery.com>
25
26 * gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.
27
28 2018-12-27 Jan Hubicka <hubicka@ucw.cz>
29
30 * ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
31 (polymorphic_call_target_hasher::hash): Hash it.
32 (polymorphic_call_target_hasher::equal): Compare it.
33 (possible_polymorphic_call_targets): Set it.
34 * tree.c (free_lang_data): Rebuild type inheritance graph even on
35 non-LTO path.
36
37 2018-12-27 Martin Liska <mliska@suse.cz>
38
39 PR gcov-profile/88225
40 * gcov.c(source_info::get_functions_at_location):
41 Use newly added line_to_function_map.
42 (source_info::add_function): New.
43 (output_json_intermediate_file): Use a pointer return
44 type for get_functions_at_location.
45 (process_all_functions): Use add_function instead
46 of direct push to a s->functions container.
47 (release_structures): Release ident_to_fn.
48 (read_graph_file): Register function into ident_to_fn.
49 (read_count_file): Use the map.
50 (output_lines): Handle pointer return type of
51 get_functions_at_location.
52
53 2018-12-27 Martin Liska <mliska@suse.cz>
54
55 * builtins.c (expand_movstr): Compare with RETURN_BEGIN.
56 * expr.c (move_by_pieces): Likewise.
57 (store_by_pieces): Likewise.
58 (store_expr): Fix GNU coding style.
59
60 2018-12-26 Andrew Pinski <apinski@marvell.com>
61
62 * config/aarch64/aarch64-cores.def (octeontx): New.
63 (octeontx81): Likewise.
64 (octeontx83): Likewise.
65 * config/aarch64/aarch64-tune.md: Regenerate.
66 * doc/invoke.texi (AArch64 Options) [mtune]: Add octeontx, octeontx81
67 and octeontx83.
68
69 2018-12-24 Martin Sebor <msebor@redhat.com>
70
71 * gimple-fold.c (get_range_strlen_tree): Factored out of
72 get_range_strlen. Minor comment updates/additions. Assert
73 argument is not a simple SSA_NAME.
74 (get_range_strlen): Call get_range_strlen_tree as appropriate.
75 Minor comment updates/additions.
76
77 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
78
79 * ipa-devirt.c (dump_targets): Cap number of targets printed.
80 (dump_possible_polymorphic_call_targets): Add verbose parameter.
81 (ipa_devirt): Use it.
82 * ipa-utils.h (dump_possible_polymorphic_call_targets): Add verbose
83 parametrs.
84
85 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
86
87 PR lto/88140
88 * tree.c (fld_simplified_type): Temporarily disable array
89 simplification.
90
91 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
92
93 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
94 for method whose basetype was already reported.
95 * ipa-devirt.c (odr_type_violation_reported_p): New.
96 * ipa-utils.h (odr_type_violation_reported_p): Declare.
97
98 2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
99
100 * configure.ac (dwarf2_debug_line): Check for the debug_line
101 section using otool when there’s no objdump available.
102 * configure: Regenerate.
103
104 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
105
106 * ipa-utils.c (ipa_merge_profiles): Fix updating of fnsummary;
107 also handle rescaling of mismatched profiles.
108 * ipa-fnsummary.c (analyze_function): Handle speculative edges.
109
110 2018-12-23 Martin Sebor <msebor@redhat.com>
111 Jeff Law <law@redhat.com>
112
113 * builtins.h (c_strlen_data): Add new fields and comments.
114 * builtins.c (unterminated_array): Change field reference from
115 "len" to "minlen" in c_strlen_data instance.
116 * gimple-fold.c (get_range_strlen): Likewise.
117 * gimple-ssa-sprintf.c (get_string_length): Likewise.
118
119 * builtins.c (unterminated_array): Rename "data" to "lendata". Fix
120 a few comments.
121 (expand_builtin_strnlen, expand_builtin_stpcpy_1): Likewise.
122 (fold_builtin_strlen): Likewise.
123 * gimple-fold.c (get_range_strlen): Likewise. Also rename a couple
124 instances of "type" to "optype" and "arg" to "fld".
125
126 * builtins.c (unterminated_array): Use empty brace initialization
127 for c_strlen_data.
128 (c_strlen, expand_builtin_strnlen): Likewise.
129 (expand_builtin_stpcpy_1, fold_builtin_strlen): Likewise.
130 * gimple-fold.c (get_range_strlen): Likewise.
131 (gimple_fold_builtin_stpcpy): Likewise.
132 * gimple-ssa-sprintf.c (get_string_length): Likewise.
133
134 2018-12-23 Alan Modra <amodra@gmail.com>
135
136 PR 88346
137 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Correct %e message. Handle
138 -mcpu=rs64, not -mcpu=rs64a. Handle -mcpu=powerpc64 and -mcpu=titan.
139 * config/rs6000/driver-rs6000.c (asm_names): Similarly.
140 * config/rs6000/aix71.h (ASM_CPU_SPEC): Delete %e message. Handle
141 -mcpu=rs64, not -mcpu=rs64a.
142 * config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.
143
144 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
145
146 * lto-wrapper.c (tool_cleanup): Don’t report ficticious temp files.
147 (debug_objcopy): Improve temp filenames. Append the early
148 debug objects to the outfiles. Remove the phase prelinking the
149 early debug. Emit the early debug filenames for ld.
150
151 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
152
153 * config/i386/darwin.h (TARGET_ASM_OUTPUT_IDENT): New.
154
155 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
156
157 * collect2.c (maybe_run_lto_and_relink): Don’t say we have a temp file
158 unless we actually did some LTO.
159 (has_lto_section, is_lto_object_file): New.
160 (maybe_lto_object_file): Remove.
161 (scan_prog_file): Use is_lto_object_file() instead of scanning the
162 output of nm.
163
164 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
165
166 * collect2.c (main): Parse the output file early so we can make nicer
167 temp names. Respond to “-save-temps” in the GCC OPTIONS.
168 (maybe_unlink): Don’t print “[Leaving…”] for files we never created
169 and don’t exist.
170
171 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
172
173 * collect2.c (main): Combine flags from both the command line and
174 COLLECT_GCC_OPTIONS to determine the set in force
175
176 2018-12-21 Jan Hubicka <hubicka@ucw.cz>
177
178 * ipa-utils.c (ipa_merge_profiles): Recompute summaries.
179
180 2018-12-21 Jakub Jelinek <jakub@redhat.com>
181
182 PR middle-end/85594
183 PR middle-end/88553
184 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
185 if needed.
186 (expand_omp_for_generic): Don't clobber t temporary for ordered loops.
187
188 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
189
190 PR ipa/88561
191 * ipa-polymorphic-call.c
192 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
193 arguments of thunks correctly.
194 (ipa_polymorphic_call_context::get_dynamic_context): Be ready for
195 NULL instance pinter.
196 * lto-cgraph.c (lto_output_node): Always stream thunk info.
197
198 2018-12-21 Andreas Krebbel <krebbel@linux.ibm.com>
199
200 * config/s390/vector.md ("floatv2div2df2", "floatunsv2div2df2")
201 ("fix_truncv2dfv2di2", "fixuns_truncv2dfv2di2"): New pattern
202 definitions.
203
204 2018-12-21 Eric Botcazou <ebotcazou@adacore.com>
205
206 PR rtl-optimization/87727
207 * combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
208 again moves from leaf hard registers.
209
210 * final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.
211
212 2018-12-21 Jakub Jelinek <jakub@redhat.com>
213
214 PR target/88522
215 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
216 *avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
217 *avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
218 -masm=intel.
219 (gatherq_mode): Remove mode iterator.
220 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
221 of <xtg_mode>.
222 (*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
223 (*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
224 *avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
225
226 PR rtl-optimization/88563
227 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
228 and mode arguments to convert_modes. Likewise swap mode and word_mode
229 arguments. Handle both arguments with VOIDmode before convert_modes
230 of one of them. Formatting fixes.
231
232 2018-12-21 Uros Bizjak <ubizjak@gmail.com>
233
234 PR target/88556
235 * internal-fn.def (COSH): New.
236 (SINH): Ditto.
237 (TANH): Ditto.
238 * optabs.def (cosh_optab): New.
239 (sinh_optab): Ditto.
240 (tanh_optab): Ditto.
241 * config/i386/i386-protos.h (ix86_emit_i387_sinh): New prototype.
242 (ix86_emit_i387_cosh): Ditto.
243 (ix86_emit_i387_tanh): Ditto.
244 * config/i386/i386.c (ix86_emit_i387_sinh): New function.
245 (ix86_emit_i387_cosh): Ditto.
246 (ix86_emit_i387_tanh): Ditto.
247 * config/i386/i386.md (sinhxf2): New expander.
248 (sinh<mode>2): Ditto.
249 (coshxf2): Ditto.
250 (cosh<mode>2): Ditto.
251 (tanhxf2): Ditto.
252 (tanh<mode>2): Ditto.
253
254 2018-12-21 Jakub Jelinek <jakub@redhat.com>
255
256 PR target/88547
257 * config/i386/i386.c (ix86_expand_int_sse_cmp): Optimize
258 x > y ? 0 : -1 into min (x, y) == x ? -1 : 0.
259
260 2018-12-21 Jan Beulich <jbeulich@suse.com>
261
262 * config/i386/sse.md (vaesdec_<mode>, vaesdeclast_<mode>): Allow
263 memory input.
264
265 2018-12-21 Alexandre Oliva <oliva@adacore.com>
266
267 * config.gcc (tmake_file): Add name to tmake_file for
268 each @name in --with-multilib-list on arm-*-* targets.
269 * doc/install.texi (with-multilib-list): Document it.
270
271 2018-12-21 Jakub Jelinek <jakub@redhat.com>
272
273 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use
274 DR_TARGET_ALIGNMENT on dr_info rather than dr. Spelling fixes.
275
276 2018-12-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
277
278 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do
279 versioning for data accesses with misaligned step.
280
281 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
282
283 PR c/51628
284 * doc/invoke.texi: Document -Wno-address-of-packed-member.
285
286 2018-12-20 Vladimir Makarov <vmakarov@redhat.com>
287
288 PR target/88457
289 * ira-color.c (fast_allocation): Choose the best cost hard reg.
290
291 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
292
293 * config/aarch64/iterators.md (SVE_INT_UNARY, fp_int_op): Add abs.
294 (SVE_FP_UNARY): Sort.
295
296 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
297
298 * config/aarch64/aarch64-sve.md (*cond_<optab><mode>_4): Use
299 sve_fmla_op rather than sve_fmad_op for the movprfx alternative.
300
301 2018-12-20 Martin Jambor <mjambor@suse.cz>
302
303 PR ipa/88214
304 * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that
305 ptr is a pointer.
306
307 2018-12-20 Richard Biener <rguenther@suse.de>
308
309 PR tree-optimization/84362
310 * tree-ssa-loop-im.c: Include alias.h, builtins.h and tree-dfa.h.
311 (struct im_mem_ref): add ref_canonical flag.
312 (struct mem_ref_hasher): Use ao_ref as compare_type.
313 (mem_ref_hasher::equal): Adjust and add variant comparing ao_ref
314 parts.
315 (mem_ref_alloc): Take ao_ref parameter, initialize ref_canonical
316 member.
317 (gather_mem_refs_stmt): Set up ao_ref early and do the lookup
318 using it. If we have non-equal refs canonicalize the one
319 in the hashtable used for insertion.
320 (tree_ssa_lim_initialize): Adjust.
321
322 2018-12-20 Jakub Jelinek <jakub@redhat.com>
323
324 PR target/88547
325 * config/i386/i386.c (ix86_expand_sse_movcc): For maskcmp, try to
326 emit vpmovm2? instruction perhaps after knot?. Reorganize code
327 so that it doesn't have to test !maskcmp in almost every conditional.
328
329 2018-12-20 Alan Modra <amodra@gmail.com>
330
331 * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define.
332
333 2018-12-19 Andreas Tobler <andreast@gcc.gnu.org>
334
335 * config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on
336 aarch64*-*-freebsd*
337
338 2018-12-19 Uros Bizjak <ubizjak@gmail.com>
339
340 * config/i386/i386.md (SWI1248_AVX512BWDQ_64): Rename from
341 SWI1248_AVX512BWDQ2_64. Unconditionally enable HImode.
342 (*cmp<mode>_ccz_1): Emit kortest instead of ktest insn.
343 Use SWI1248_AVX512BWDQ_64 mode iterator and enable only for
344 TARGET_AVX512F.
345
346 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
347
348 * config/arm/elf.h: Update comment about condition that need to
349 match with libgcc/config/arm/lib1funcs.S to also include
350 libgcc/config/arm/t-arm.
351 * doc/sourcebuild.texi (output-exists, output-exists-not): Rename
352 subsubsection these directives are in to "Check for output files".
353 Move scan-symbol to that section and add to it new scan-symbol-not
354 directive.
355
356 2018-12-19 Tom de Vries <tdevries@suse.de>
357
358 * config/nvptx/nvptx.c (PTX_CTA_SIZE): Define.
359
360 2018-12-19 Tom de Vries <tdevries@suse.de>
361
362 * omp-offload.c (oacc_fn_attrib_level): Remove static.
363 * omp-offload.h (oacc_fn_attrib_level): Declare.
364
365 2018-12-19 Tom de Vries <tdevries@suse.de>
366
367 * omp-offload.c (oacc_get_default_dim): New function.
368 * omp-offload.h (oacc_get_default_dim): Declare.
369
370 2018-12-19 David Malcolm <dmalcolm@redhat.com>
371
372 PR c++/87504
373 * gcc-rich-location.c
374 (maybe_range_label_for_tree_type_mismatch::get_text): Move here from
375 c/c-typeck.c.
376 (binary_op_rich_location::binary_op_rich_location): New ctor.
377 (binary_op_rich_location::use_operator_loc_p): New function.
378 * gcc-rich-location.h
379 (class maybe_range_label_for_tree_type_mismatch)): Move here from
380 c/c-typeck.c.
381 (struct op_location_t): New forward decl.
382 (class binary_op_rich_location): New class.
383 * tree.h (struct op_location_t): New struct.
384
385 2018-12-19 David Malcolm <dmalcolm@redhat.com>
386
387 PR c++/43064
388 PR c++/43486
389 * convert.c: Include "selftest.h".
390 (preserve_any_location_wrapper): New function.
391 (convert_to_pointer_maybe_fold): Update to handle location
392 wrappers.
393 (convert_to_real_maybe_fold): Likewise.
394 (convert_to_integer_1): Strip expr when using TREE_OVERFLOW.
395 Handle location wrappers when checking for INTEGER_CST.
396 (convert_to_integer_maybe_fold): Update to handle location
397 wrappers.
398 (convert_to_complex_maybe_fold): Likewise.
399 (selftest::test_convert_to_integer_maybe_fold): New functions.
400 (selftest::convert_c_tests): New function.
401 * convert.h (preserve_any_location_wrapper): New decl.
402 * fold-const.c (size_binop_loc): Strip location wrappers when
403 using TREE_OVERFLOW.
404 (operand_equal_p): Strip any location wrappers.
405 (integer_valued_real_p): Strip any location wrapper.
406 * selftest-run-tests.c (selftest::run_tests): Call
407 selftest::convert_c_tests.
408 * selftest.h (selftest::convert_c_tests): New decl.
409 * tree.c (build_complex): Assert that REAL and IMAG are constants.
410 (integer_zerop): Look through location wrappers.
411 (integer_onep): Likewise.
412 (integer_each_onep): Likewise.
413 (integer_all_onesp): Likewise.
414 (integer_minus_onep): Likewise.
415 (integer_pow2p): Likewise.
416 (integer_nonzerop): Likewise.
417 (integer_truep): Likewise.
418 (fixed_zerop): Likewise.
419 (real_zerop): Likewise.
420 (real_onep): Likewise.
421 (real_minus_onep): Likewise.
422 (tree_int_cst_equal): Likewise.
423 (simple_cst_equal): Treat location wrappers with non-equal source
424 locations as being unequal.
425 (uniform_integer_cst_p): Look through location wrappers.
426 (maybe_wrap_with_location): Don't create wrappers if any
427 auto_suppress_location_wrappers are active.
428 (suppress_location_wrappers): New variable.
429 (selftest::test_predicates): New test.
430 (selftest::tree_c_tests): Call it.
431 * tree.h (CONSTANT_CLASS_OR_WRAPPER_P): New macro.
432 (suppress_location_wrappers): New decl.
433 (class auto_suppress_location_wrappers): New class.
434
435 2018-12-19 Paul A. Clarke <pc@us.ibm.com>
436
437 * config/rs6000/tmmintrin.h (_mm_hadds_epi16): Vector lanes swapped.
438 (_mm_hsub_epi32): Likewise.
439 (_mm_shuffle_epi8): Fix reversed interpretation of parameters.
440 (_mm_shuffle_pi8): Likewise.
441 (_mm_addubs_pi16): Likewise.
442
443 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
444
445 * config/arm/arm.h (TARGET_HARD_FLOAT): Restrict to TARGET_32BIT
446 targets.
447 * config/arm/arm.c (output_return_instruction): Only check
448 TARGET_HARD_FLOAT to decide whether FP instructions are available.
449
450 2018-12-19 Tom de Vries <tom@codesourcery.com>
451
452 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
453 dump files): Add offload-rtl.
454
455 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
456
457 PR target/88213
458 * config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
459 Require TARGET_POWERPC64.
460
461 2018-12-19 Richard Biener <rguenther@suse.de>
462
463 PR tree-optimization/88533
464 Revert
465 2018-04-30 Richard Biener <rguenther@suse.de>
466
467 PR tree-optimization/28364
468 PR tree-optimization/85275
469 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
470 copying first exit test.
471
472 * tree-ssa-loop-ch.c: Include tree-phinodes.h and
473 ssa-iterators.h.
474 (should_duplicate_loop_header_p): Track whether stmt compute
475 loop invariants or values based on IVs. Apart from the
476 original loop header only duplicate blocks with exit tests
477 that are based on IVs or invariants.
478
479 2018-12-19 Tom de Vries <tdevries@suse.de>
480
481 * config/nvptx/nvptx.c (nvptx_gen_shared_bcast, shared_prop_gen)
482 (nvptx_goacc_expand_accel_var): Use MAX and ROUND_UP.
483 (nvptx_assemble_value, nvptx_output_skip): Use MIN.
484 (nvptx_shared_propagate, nvptx_single, nvptx_expand_shared_addr): Use
485 MAX.
486
487 2018-12-19 Tom de Vries <tdevries@suse.de>
488
489 * config/nvptx/nvptx.c (nvptx_gen_wcast): Rename as
490 nvptx_gen_warp_bcast.
491 (nvptx_gen_wcast): Rename to nvptx_gen_shared_bcast, add bool
492 vector argument, and update call to nvptx_gen_shared_bcast.
493 (propagator_fn): Add bool argument.
494 (nvptx_propagate): New bool argument, pass bool argument to fn.
495 (vprop_gen): Rename to warp_prop_gen, update call to
496 nvptx_gen_warp_bcast.
497 (nvptx_vpropagate): Rename to nvptx_warp_propagate, update call to
498 nvptx_propagate.
499 (wprop_gen): Rename to shared_prop_gen, update call to
500 nvptx_gen_shared_bcast.
501 (nvptx_wpropagate): Rename to nvptx_shared_propagate, update call
502 to nvptx_propagate.
503 (nvptx_wsync): Rename to nvptx_cta_sync.
504 (nvptx_single): Update calls to nvptx_gen_warp_bcast,
505 nvptx_gen_shared_bcast and nvptx_cta_sync.
506 (nvptx_process_pars): Likewise.
507 (write_worker_buffer): Rename as write_shared_buffer.
508 (nvptx_file_end): Update calls to write_shared_buffer.
509 (nvptx_expand_worker_addr): Rename as nvptx_expand_shared_addr.
510 (nvptx_expand_builtin): Update call to nvptx_expand_shared_addr.
511 (nvptx_get_worker_red_addr): Rename as nvptx_get_shared_red_addr.
512 (nvptx_goacc_reduction_setup): Update call to
513 nvptx_get_shared_red_addr.
514 (nvptx_goacc_reduction_fini): Likewise.
515 (nvptx_goacc_reduction_teardown): Likewise.
516
517 2018-12-19 Tom de Vries <tdevries@suse.de>
518
519 * config/nvptx/nvptx.c (worker_bcast_size): Rename as
520 oacc_bcast_size.
521 (worker_bcast_align): Rename as oacc_bcast_align.
522 (worker_bcast_sym): Rename as oacc_bcast_sym.
523 (nvptx_option_override): Update usage of oacc_bcast_*.
524 (struct wcast_data_t): Rename as broadcast_data_t.
525 (nvptx_gen_wcast): Update type of data argument and usage of
526 oacc_bcast_align.
527 (wprop_gen): Update type of data_ and usage of oacc_bcast_align.
528 (nvptx_wpropagate): Update type of data and usage of
529 oacc_bcast_{sym,size}.
530 (nvptx_single): Update type of data and usage of oacc_bcast_size.
531 (nvptx_file_end): Update usage of oacc_bcast_{sym,align,size}.
532
533 2018-12-19 Tom de Vries <tdevries@suse.de>
534
535 * config/nvptx/nvptx.md (nvptx_barsync): Add and handle operand.
536 * config/nvptx/nvptx.c (nvptx_wsync): Update call to gen_nvptx_barsync.
537
538 2018-12-19 Tom de Vries <tdevries@suse.de>
539
540 * config/nvptx/nvptx.c (nvptx_single): Always pass false to
541 nvptx_wsync.
542 (nvptx_process_pars): Likewise.
543
544 2018-12-19 Tom de Vries <tdevries@suse.de>
545
546 * config/nvptx/nvptx.c (nvptx_previous_fndecl): Declare.
547 (nvptx_set_current_function): New function.
548 (TARGET_SET_CURRENT_FUNCTION): Define.
549
550 2018-12-19 Shaokun Zhang <zhangshaokun@hisilicon.com>
551
552 * config/aarch64/aarch64-cores.def (tsv110): Fix architecture. This
553 part is really Armv8.2 with some permitted Armv8.4 extensions.
554
555 2018-12-19 Jakub Jelinek <jakub@redhat.com>
556
557 PR target/88541
558 * config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
559 for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
560
561 2018-12-19 Alexandre Oliva <aoliva@redhat.com>
562
563 PR testsuite/86153
564 PR middle-end/83239
565 * vr-values.c
566 (vr_values::vrp_evaluate_conditional_warnv_with_ops): Extend
567 simplification of overflow tests to cover cases in which we
568 can determine the result of the comparison.
569
570 2018-12-19 Bin Cheng <bin.cheng@linux.alibaba.com>
571
572 * auto-profile.c (afdo_indirect_call): Skip generating histogram
573 value if we can't find cgraph_node for then indirected callee. Save
574 profile_id of the cgraph_node in histogram value's first counter.
575 * value-prof.c (gimple_value_profile_transformations): Don't skip
576 for flag_auto_profile.
577
578 2018-12-18 Vladimir Makarov <vmakarov@redhat.com>
579
580 PR rtl-optimization/87759
581 * lra-assigns.c (lra_split_hard_reg_for): Recalculate
582 non_reload_pseudos.
583
584 2018-12-18 Jakub Jelinek <jakub@redhat.com>
585
586 PR target/88464
587 * config/i386/i386-builtin-types.def
588 (VOID_FTYPE_PDOUBLE_QI_V8SI_V4DF_INT,
589 VOID_FTYPE_PFLOAT_QI_V4DI_V8SF_INT,
590 VOID_FTYPE_PLONGLONG_QI_V8SI_V4DI_INT,
591 VOID_FTYPE_PINT_QI_V4DI_V8SI_INT,
592 VOID_FTYPE_PDOUBLE_QI_V4SI_V2DF_INT,
593 VOID_FTYPE_PFLOAT_QI_V2DI_V4SF_INT,
594 VOID_FTYPE_PLONGLONG_QI_V4SI_V2DI_INT,
595 VOID_FTYPE_PINT_QI_V2DI_V4SI_INT): New builtin types.
596 * config/i386/i386.c (enum ix86_builtins): Add
597 IX86_BUILTIN_SCATTERALTSIV4DF, IX86_BUILTIN_SCATTERALTDIV8SF,
598 IX86_BUILTIN_SCATTERALTSIV4DI, IX86_BUILTIN_SCATTERALTDIV8SI,
599 IX86_BUILTIN_SCATTERALTSIV2DF, IX86_BUILTIN_SCATTERALTDIV4SF,
600 IX86_BUILTIN_SCATTERALTSIV2DI and IX86_BUILTIN_SCATTERALTDIV4SI.
601 (ix86_init_mmx_sse_builtins): Fix up names of IX86_BUILTIN_GATHERALT*,
602 IX86_BUILTIN_GATHER3ALT* and IX86_BUILTIN_SCATTERALT* builtins to
603 match the IX86_BUILTIN codes. Build IX86_BUILTIN_SCATTERALTSIV4DF,
604 IX86_BUILTIN_SCATTERALTDIV8SF, IX86_BUILTIN_SCATTERALTSIV4DI,
605 IX86_BUILTIN_SCATTERALTDIV8SI, IX86_BUILTIN_SCATTERALTSIV2DF,
606 IX86_BUILTIN_SCATTERALTDIV4SF, IX86_BUILTIN_SCATTERALTSIV2DI and
607 IX86_BUILTIN_SCATTERALTDIV4SI decls.
608 (ix86_vectorize_builtin_scatter): Expand those new builtins.
609
610 2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
611
612 * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
613 Describe when a typedef name can be used as the type specifier for
614 a vector type, and when it cannot.
615
616 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
617
618 * config/msp430/msp430.h: Define TARGET_VTABLE_ENTRY_ALIGN.
619
620 2018-12-18 Jakub Jelinek <jakub@redhat.com>
621
622 PR target/88513
623 PR target/88514
624 * optabs.def (vec_pack_sbool_trunc_optab, vec_unpacks_sbool_hi_optab,
625 vec_unpacks_sbool_lo_optab): New optabs.
626 * optabs.c (expand_widen_pattern_expr): Use vec_unpacks_sbool_*_optab
627 and pass additional argument if both input and target have the same
628 scalar mode of VECTOR_BOOLEAN_TYPE_P vectors.
629 * expr.c (expand_expr_real_2) <case VEC_PACK_TRUNC_EXPR>: Handle
630 VECTOR_BOOLEAN_TYPE_P pack where result has the same scalar mode
631 as the operands using vec_pack_sbool_trunc_optab.
632 * tree-vect-stmts.c (supportable_widening_operation): Use
633 vec_unpacks_sbool_{lo,hi}_optab for VECTOR_BOOLEAN_TYPE_P conversions
634 where both wider_vectype and vectype have the same scalar mode.
635 (supportable_narrowing_operation): Similarly use
636 vec_pack_sbool_trunc_optab if narrow_vectype and vectype have the same
637 scalar mode.
638 * config/i386/i386.c (ix86_get_builtin)
639 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Check for VECTOR_MODE_P
640 rather than non-VOIDmode.
641 * config/i386/sse.md (vec_pack_trunc_qi, vec_pack_trunc_<mode>):
642 Remove useless ()s around "register_operand", formatting fixes.
643 (vec_pack_sbool_trunc_qi, vec_unpacks_sbool_lo_qi,
644 vec_unpacks_sbool_hi_qi): New expanders.
645 * doc/md.texi (vec_pack_sbool_trunc_M, vec_unpacks_sbool_hi_M,
646 vec_unpacks_sbool_lo_M): Document.
647
648 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
649
650 * combine.c (update_rsp_from_reg_equal): Only look for the nonzero bits
651 of src in nonzero_bits_mode if the mode of src is MODE_INT and
652 HWI_COMPUTABLE.
653 (reg_nonzero_bits_for_combine): Add clarification to comment.
654
655 2018-12-18 Wei Xiao <wei3.xiao@intel.com>
656
657 * config/i386/driver-i386.c (host_detect_local_cpu): Detect cascadelake.
658 * config/i386/i386.c (fold_builtin_cpu): Handle cascadelake.
659 * doc/extend.texi: Add cascadelake.
660 2018-12-17 Peter Bergner <bergner@linux.ibm.com>
661
662 PR target/87870
663 * config/rs6000/vsx.md (nW): New mode iterator.
664 (vsx_mov<mode>_64bit): Use it. Remove redundant GPR 0/-1 alternative.
665 Update length attribute for (<??r>, <nW>) alternative.
666 (vsx_mov<mode>_32bit): Likewise.
667
668 2018-12-17 Tom de Vries <tdevries@suse.de>
669
670 * config/nvptx/nvptx.c (PTX_VECTOR_LENGTH, PTX_WORKER_LENGTH,
671 PTX_DEFAULT_RUNTIME_DIM): Move to the top of the file.
672
673 2018-12-17 Tom de Vries <tdevries@suse.de>
674
675 * config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
676 (nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.
677
678 2018-12-17 Tom de Vries <tdevries@suse.de>
679
680 * config/nvptx/nvptx.c (nvptx_single): Fix whitespace.
681 (nvptx_neuter_pars): Likewise.
682
683 2018-12-17 Tom de Vries <tdevries@suse.de>
684
685 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Work around Fortran
686 bug PR72741 by overriding dims parameter for routines.
687
688 2018-12-17 Tom de Vries <tdevries@suse.de>
689
690 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Rewrite using
691 predicate vars.
692
693 2018-12-17 Steve Ellcey <sellcey@cavium.com>
694
695 * config/aarch64/aarch64-protos.h (aarch64_use_simple_return_insn_p):
696 New prototype.
697 (aarch64_epilogue_uses): Ditto.
698 * config/aarch64/aarch64.c (aarch64_attribute_table): New array.
699 (aarch64_simd_decl_p): New function.
700 (aarch64_reg_save_mode): New function.
701 (aarch64_function_ok_for_sibcall): Check for simd calls.
702 (aarch64_layout_frame): Check for simd function.
703 (aarch64_gen_storewb_pair): Handle E_TFmode.
704 (aarch64_push_regs): Use aarch64_reg_save_mode to get mode.
705 (aarch64_gen_loadwb_pair): Handle E_TFmode.
706 (aarch64_pop_regs): Use aarch64_reg_save_mode to get mode.
707 (aarch64_gen_store_pair): Handle E_TFmode.
708 (aarch64_gen_load_pair): Ditto.
709 (aarch64_save_callee_saves): Handle different mode sizes.
710 (aarch64_restore_callee_saves): Ditto.
711 (aarch64_components_for_bb): Check for simd function.
712 (aarch64_epilogue_uses): New function.
713 (aarch64_process_components): Check for simd function.
714 (aarch64_expand_prologue): Ditto.
715 (aarch64_expand_epilogue): Ditto.
716 (aarch64_expand_call): Ditto.
717 (aarch64_use_simple_return_insn_p): New function.
718 (TARGET_ATTRIBUTE_TABLE): New define.
719 * config/aarch64/aarch64.h (EPILOGUE_USES): Redefine.
720 (FP_SIMD_SAVED_REGNUM_P): New macro.
721 * config/aarch64/aarch64.md (simple_return): New define_expand.
722 (load_pair_dw_tftf): New instruction.
723 (store_pair_dw_tftf): Ditto.
724 (loadwb_pair<TX:mode>_<P:mode>): Ditto.
725 (storewb_pair<TX:mode>_<P:mode>): Ditto.
726
727 2018-12-17 Uros Bizjak <ubizjak@gmail.com>
728
729 PR target/88502
730 * internal-fn.def (ACOSH): New.
731 (ASINH): Ditto.
732 (ATANH): Ditto.
733 * optabs.def (acosh_optab): New.
734 (asinh_optab): Ditto.
735 (atanh_optab): Ditto.
736 * config/i386/i386-protos.h (ix86_emit_i387_asinh): New prototype.
737 (ix86_emit_i387_acosh): Ditto.
738 (ix86_emit_i387_atanh): Ditto.
739 * config/i386/i386.c (ix86_emit_i387_asinh): New function.
740 (ix86_emit_i387_acosh): Ditto.
741 (ix86_emit_i387_atanh): Ditto.
742 * config/i386/i386.md (asinhxf2): New expander.
743 (asinh<mode>2): Ditto.
744 (acoshxf2): Ditto.
745 (acosh<mode>2): Ditto.
746 (atanhxf2): Ditto.
747 (atanh<mode>2): Ditto.
748
749 2018-12-17 David Edelsohn <dje.gcc@gmail.com>
750
751 * config.gcc (powerpc-ibm-aix6.*): Delete extra_headers.
752 (powerpc-ibm-aix7.1.*): Same.
753 (powerpc-ibm-aix[789].*): Same.
754
755 2018-12-17 H.J. Lu <hongjiu.lu@intel.com>
756
757 PR debug/79342
758 * dwarf2out.c (find_AT_string_in_table): Add insert argument
759 defaulting to INSERT and replace INSERT.
760 (find_AT_string): Likewise.
761 (output_macinfo_op): Pass NO_INSERT to find_AT_string.
762
763 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
764
765 * coverage.c (struct conts_entry): Add n_counts.
766 (remap_counts_file): Record number of ocunts.
767 (get_coverage_counts): Verify that counts match.
768 * coverage.h (get_coverage_counts): Update prototype.
769 * profile.c (get_exec_counts. compute_value_histograms): Add
770 n_counts parametrs.
771
772 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
773
774 PR rtl-optimization/88253
775 * combine.c (combine_simplify_rtx): Test for side-effects before
776 substituting by zero.
777
778 2018-12-17 Richard Sandiford <richard.sandiford@arm.com>
779
780 * doc/invoke.texi (-fversion-loops-for-strides): Document
781 (loop-versioning-group-size, loop-versioning-max-inner-insns)
782 (loop-versioning-max-outer-insns): Document new --params.
783 * Makefile.in (OBJS): Add gimple-loop-versioning.o.
784 * common.opt (fversion-loops-for-strides): New option.
785 * opts.c (default_options_table): Enable fversion-loops-for-strides
786 at -O3.
787 * params.def (PARAM_LOOP_VERSIONING_GROUP_SIZE)
788 (PARAM_LOOP_VERSIONING_MAX_INNER_INSNS)
789 (PARAM_LOOP_VERSIONING_MAX_OUTER_INSNS): New parameters.
790 * passes.def: Add pass_loop_versioning.
791 * timevar.def (TV_LOOP_VERSIONING): New time variable.
792 * tree-ssa-propagate.h
793 (substitute_and_fold_engine::substitute_and_fold): Add an optional
794 block parameter.
795 * tree-ssa-propagate.c
796 (substitute_and_fold_engine::substitute_and_fold): Likewise.
797 When passed, only walk blocks dominated by that block.
798 * tree-vrp.h (range_includes_p): Declare.
799 (range_includes_zero_p): Turn into an inline wrapper around
800 range_includes_p.
801 * tree-vrp.c (range_includes_p): New function, generalizing...
802 (range_includes_zero_p): ...this.
803 * tree-pass.h (make_pass_loop_versioning): Declare.
804 * gimple-loop-versioning.cc: New file.
805
806 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
807
808 * ipa-fnsummary.c (remap_edge_change_prob): Do not ICE when changes
809 are not streamed in.
810
811 2018-12-15 H.J. Lu <hongjiu.lu@intel.com>
812
813 PR target/88483
814 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Revert
815 reversion 267133.
816
817 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
818
819 * ipa-fnsummary.c (analyze_function_body): Do not loeak conds and
820 size_time_table.
821 (ipa_fn_summary_generate): Add prevails parameter; do not allocate
822 data when symbol is not prevailing.
823 (inline_read_section): Likewise.
824
825 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
826
827 * cgraph.h (cgraph_node): Add predicate prevailing_p.
828 (cgraph_edge): Add predicate possible_call_in_translation_unit_p.
829 * ipa-prop.c (ipa_write_jump_function): Optimize streaming of ADDR_EXPR.
830 (ipa_read_jump_function): Add prevails parameter; optimize streaming.
831 (ipa_read_edge_info): Break out from ...
832 (ipa_read_node_info): ... here; optimize streaming.
833 * cgraph.c (cgraph_edge::possibly_call_in_translation_unit_p): New
834 predicate.
835
836 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
837
838 * ipa-utils.c (ipa_merge_profiles): Do no merging when source function
839 has zero count.
840
841 2018-12-15 Jakub Jelinek <jakub@redhat.com>
842
843 PR tree-optimization/88464
844 PR target/88498
845 * tree-vect-stmts.c (vect_build_gather_load_calls): For NARROWING
846 and mask with integral masktype, don't try to permute mask vectors,
847 instead emit VEC_UNPACK_{LO,HI}_EXPR. Fix up NOP_EXPR operand.
848 (vectorizable_store): Handle masked scatters with decl and integral
849 mask type.
850 (permute_vec_elements): Allow scalar_dest to be NULL.
851 * config/i386/i386.c (ix86_get_builtin)
852 <case IX86_BUILTIN_GATHER3ALTDIV16SF>: Use lowpart_subreg for masks.
853 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Don't assume mask and src have
854 to be the same.
855
856 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
857
858 * ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
859 parameters.
860 (cgraph_build_static_cdtor): Update.
861 (build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
862 callsed.
863
864 2018-12-15 Alan Modra <amodra@gmail.com>
865
866 * config/rs6000/rs6000.c (generate_set_vrsave, rs6000_emit_savres_rtx),
867 (rs6000_emit_prologue, rs6000_call_aix, rs6000_call_sysv),
868 (rs6000_call_darwin_1): Use gen_hard_reg_clobber.
869
870 2018-12-15 Jakub Jelinek <jakub@redhat.com>
871
872 PR target/88489
873 * config/i386/sse.md (UNSPEC_SFIXUPIMM): New unspec enumerator.
874 (avx512f_sfixupimm<mode><mask_name><round_saeonly_name>): Use it
875 instead of UNSPEC_FIXUPIMM.
876
877 PR rtl-optimization/88478
878 * cselib.c (cselib_record_sets): Move sets[i].src_elt tests
879 after REG_P (dest) test.
880
881 2018-12-14 Martin Sebor <msebor@redhat.com>
882
883 PR tree-optimization/88372
884 * calls.c (maybe_warn_alloc_args_overflow): Handle function pointers.
885 * tree-object-size.c (alloc_object_size): Same. Simplify.
886 * doc/extend.texi (Object Size Checking): Update.
887 (Other Builtins): Add __builtin_object_size.
888 (Common Type Attributes): Add alloc_size.
889 (Common Variable Attributes): Ditto.
890
891 2018-12-14 Martin Sebor <msebor@redhat.com>
892
893 PR rtl-optimization/87096
894 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Avoid
895 folding calls whose bound may exceed INT_MAX. Diagnose bound ranges
896 that exceed the limit.
897
898 2018-12-14 Martin Sebor <msebor@redhat.com>
899
900 PR web/79738
901 * doc/extend.texi (attribute const, pure): Clarify.
902
903 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
904
905 * config/i386/i386.c (rest_of_insert_endbranch): Insert ENDBR
906 at the function entry only when -mmanual-endbr isn't used or
907 there is cf_check function attribute.
908 (ix86_attribute_table): Add cf_check.
909 * config/i386/i386.opt: Add -mmanual-endbr.
910 * doc/extend.texi: Document cf_check attribute.
911 * doc/invoke.texi: Document -mmanual-endbr.
912
913 2018-12-14 Thomas Schwinge <thomas@codesourcery.com>
914 Cesar Philippidis <cesar@codesourcery.com>
915
916 * omp-offload.c (inform_oacc_loop): New function.
917 (execute_oacc_device_lower): Use it to display loop parallelism.
918
919 2018-12-14 Jakub Jelinek <jakub@redhat.com>
920
921 PR c++/82294
922 PR c++/87436
923 * expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
924 * expr.c (categorize_ctor_elements_1): Likewise. Compute it like
925 p_nz_elts, except don't multiply it by mult. Adjust recursive call.
926 Fix up COMPLEX_CST handling.
927 (categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
928 it and pass it through to categorize_ctor_elements_1.
929 (mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
930 * gimplify.c (gimplify_init_constructor): Likewise. Don't force
931 ctor into readonly data section if num_unique_nonzero_elements is
932 smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
933 bytes.
934
935 2018-12-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
936
937 * config/arm/arm.md (arm_movdi): Split if -mslow-flash-data and
938 source is a constant that would be loaded by literal pool.
939 (movsf expander): Generate a no_literal_pool_sf_immediate insn if
940 -mslow-flash-data is present, targeting hardfloat ABI and source is a
941 float constant that cannot be loaded via vmov.
942 (movdf expander): Likewise but generate a no_literal_pool_df_immediate
943 insn.
944 (arm_movsf_soft_insn): Split if -mslow-flash-data and source is a
945 float constant that would be loaded by literal pool.
946 (softfloat constant movsf splitter): Splitter for the above case.
947 (movdf_soft_insn): Split if -mslow-flash-data and source is a float
948 constant that would be loaded by literal pool.
949 (softfloat constant movdf splitter): Splitter for the above case.
950 * config/arm/constraints.md (Pz): Document existing constraint.
951 (Ha): Define constraint.
952 (Tu): Likewise.
953 * config/arm/predicates.md (hard_sf_operand): New predicate.
954 (hard_df_operand): Likewise.
955 * config/arm/thumb2.md (thumb2_movsi_insn): Split if
956 -mslow-flash-data and constant would be loaded by literal pool.
957 * constant/arm/vfp.md (thumb2_movsi_vfp): Likewise and disable constant
958 load in VFP register.
959 (movdi_vfp): Likewise.
960 (thumb2_movsf_vfp): Use hard_sf_operand as predicate for source to
961 prevent match for a constant load if -mslow-flash-data and constant
962 cannot be loaded via vmov. Adapt constraint accordingly by
963 using Ha instead of E for generic floating-point constant load.
964 (thumb2_movdf_vfp): Likewise using hard_df_operand predicate instead.
965 (no_literal_pool_df_immediate): Add a clobber to use as the
966 intermediate general purpose register and also enable it after reload
967 but disable it constant is a valid FP constant. Add constraints and
968 generate a DI intermediate load rather than 2 SI loads.
969 (no_literal_pool_sf_immediate): Add a clobber to use as the
970 intermediate general purpose register and also enable it after
971 reload.
972
973 2018-12-14 Uros Bizjak <ubizjak@gmail.com>
974
975 PR target/88474
976 * internal-fn.def (HYPOT): New.
977 * optabs.def (hypot_optab): New.
978 * config/i386/i386.md (hypot<mode>3): New expander.
979
980 2018-12-14 Jeff Law <law@redhat.com>
981
982 * target.def (post_cfi_startproc): Fix text.
983
984 2018-12-14 Sam Tebbs <sam.tebbs@arm.com>
985
986 * doc/tm.texi (TARGET_ASM_POST_CFI_STARTPROC): Define.
987 * doc/tm.texi.in (TARGET_ASM_POST_CFI_STARTPROC): Define.
988 * dwarf2out.c (dwarf2out_do_cfi_startproc): Trigger the hook.
989 * hooks.c (hook_void_FILEptr_tree): Define.
990 * hooks.h (hook_void_FILEptr_tree): Define.
991 * target.def (post_cfi_startproc): Define.
992
993 2018-12-14 Tom de Vries <tdevries@suse.de>
994
995 * lto-cgraph.c (verify_node_partition): New function.
996 (input_overwrite_node, input_varpool_node): Use verify_node_partition.
997
998 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
999
1000 PR target/88483
1001 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
1002 use get_frame_size ().
1003
1004 2018-12-14 Andrew Stubbs <ams@codesourcery.com>
1005
1006 * gcc/lra-int.h (lra_register_new_scratch_op): Add third parameter.
1007 * gcc/lra-remat.c (update_scratch_ops): Pass icode to
1008 lra_register_new_scratch_op.
1009 * gcc/lra.c (struct sloc): Add icode field.
1010 (lra_register_new_scratch_op): Add icode parameter.
1011 Use icode to skip insns that have changed beyond recognition.
1012
1013 2018-12-14 Eric Botcazou <ebotcazou@adacore.com>
1014
1015 * dwarf2out.c (analyze_discr_in_predicate): Simplify.
1016 (analyze_variants_discr): Deal with naked boolean discriminants.
1017
1018 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
1019
1020 * config/arc/arc.c (arc_restore_callee_milli) Don't clobber off
1021 variable.
1022
1023 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
1024
1025 * config/arc/arc.h (reg_class): Add SIBCALL_REGS.
1026
1027 2018-12-14 Richard Biener <rguenther@suse.de>
1028
1029 * gimple-ssa-split-paths.c (is_feasible_trace): Remove
1030 duplicated code block.
1031
1032 2018-12-14 Alan Modra <amodra@gmail.com>
1033
1034 PR rtl-optimization/88311
1035 * config/rs6000/rs6000.c (rs6000_call_sysv): Do not mask cookie.
1036 (rs6000_sibcall_sysv): Likewise.
1037
1038 2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
1039
1040 PR rtl-optimization/88001
1041 * function.c (match_asm_constraints_1): Don't invalidly share RTL.
1042
1043 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
1044
1045 * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
1046 if autofdo counts are all zeros.
1047
1048 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
1049
1050 * auto-profile.c (afdo_indirect_call): Skip generating histogram
1051 value for internal call.
1052
1053 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
1054
1055 * auto-profile.c (AFDO_EINFO): New macro.
1056 (class edge_info): New class.
1057 (is_edge_annotated, set_edge_annotated): Delete.
1058 (afdo_propagate_edge, afdo_propagate_circuit, afdo_propagate): Remove
1059 parameter. Adjust edge count computation and annotation using class
1060 edge_info.
1061 (afdo_calculate_branch_prob, afdo_annotate_cfg): Likewise.
1062
1063 2018-12-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1064
1065 * ipa-cp.c (print_all_lattices): Skip cp clones.
1066
1067 * ipa-cp.c: Fix various comment typos.
1068
1069 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1070
1071 PR tree-optimization/88444
1072 * tree-inline.c (fold_marked_statements): Iterate up to
1073 last_basic_block_for_fn rather than n_basic_blocks_for_fn.
1074
1075 PR rtl-optimization/88470
1076 * cfgcleanup.c (outgoing_edges_match): If the function is
1077 shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
1078 edge to EXIT, return false.
1079
1080 2018-12-13 Martin Sebor <msebor@redhat.com>
1081
1082 * doc/extend.texi: Consistently use @code for const and volatile
1083 qualifiers, the true and false constants, and asm statements.
1084
1085 2018-12-13 Vladimir Makarov <vmakarov@redhat.com>
1086
1087 PR rtl-optimization/88414
1088 * lra-int.h (lra_asm_error_p): New.
1089 * lra-assigns.c (lra_assign): Check lra_asm_error_p for checking
1090 call crossed pseudo assignment correctness.
1091 (lra_split_hard_reg_for): Set up lra_asm_error_p.
1092 * lra-constraints.c (curr_insn_transform): Ditto.
1093 * lra.c (lra_asm_error_p): New.
1094 (lra): Reset lra_asm_error_p.
1095
1096 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1097
1098 PR rtl-optimization/88416
1099 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
1100 even if !AUTO_INC_DEC.
1101
1102 2018-12-13 David Edelsohn <dje.gcc@gmail.com>
1103
1104 * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is
1105 non-NULL.
1106 (rs6000_arg_partial_bytes): Same.
1107
1108 2018-12-13 Jason Merrill <jason@redhat.com>
1109
1110 * gdbinit.in (pp): New macro.
1111 (pbb): Remove.
1112
1113 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1114
1115 PR tree-optimization/88464
1116 * tree-vect-stmts.c (vect_build_gather_load_calls): Handle INTEGER_TYPE
1117 masktype if mask is non-NULL.
1118 (vectorizable_load): Don't reject masked gather loads if masktype
1119 in the decl is INTEGER_TYPE.
1120
1121 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
1122
1123 * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
1124 s390_vec_double_s64 instead of s390_vcdgb.
1125 (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
1126 s390_vcdlgb.
1127
1128 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
1129
1130 * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
1131 ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
1132 ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
1133
1134 2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1135
1136 * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
1137 behavior.
1138
1139 2018-12-13 Wei Xiao <wei3.xiao@intel.com>
1140
1141 * common/config/i386/i386-common.c (processor_names): Add cascadelake.
1142 (processor_alias_table): Add cascadelake.
1143 * config.gcc: Add -march=cascadelake.
1144 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1145 cascadelake.
1146 * config/i386/i386.c (Add m_CASCADELAKE): New.
1147 (processor_cost_table): Add cascadelake.
1148 (get_builtin_code_for_version): Handle cascadelake.
1149 * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New.
1150 (PTA_CASCADELAKE): Ditto.
1151 * doc/invoke.texi: Add -march=cascadelake.
1152
1153 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1154
1155 PR target/88465
1156 * config/i386/i386.md (*movdi_internal, *movsi_internal,
1157 *movhi_internal, *movqi_internal): Add alternative(s) to load
1158 0 or -1 into k registers using kxor or kxnoq instructions.
1159
1160 PR target/88461
1161 * config/i386/sse.md (VI1248_AVX512VLBW, AVX512ZEXTMASK): New
1162 mode iterators.
1163 (<avx512>_testm<mode>3<mask_scalar_merge_name>,
1164 <avx512>_testnm<mode>3<mask_scalar_merge_name>): Merge patterns
1165 with VI12_AVX512VL and VI48_AVX512VL iterators into ones with
1166 VI1248_AVX512VLBW iterator.
1167 (*<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext,
1168 *<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext_mask,
1169 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext,
1170 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext_mask): New
1171 define_insns.
1172
1173 PR target/88461
1174 * config/i386/i386.md (*zero_extendsidi2, zero_extend<mode>di2,
1175 *zero_extend<mode>si2, *zero_extendqihi2): Add =*k, *km alternatives.
1176
1177 2018-12-12 Tom de Vries <tdevries@suse.de>
1178 Jakub Jelinek <jakub@redhat.com>
1179
1180 * omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1181 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1182 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1183 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1184 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1185 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME): Fix up
1186 function types - remove one argument.
1187
1188 2018-12-12 Martin Sebor <msebor@redhat.com>
1189
1190 * doc/extend.texi (attribute copy): Fix typos.
1191
1192 2018-12-12 Martin Sebor <msebor@redhat.com>
1193
1194 * doc/extend.texi (Function Attributes): Clarify C++ aspects.
1195 (Variable Attributes): Same.
1196 (Type Attributes): Same.
1197
1198 2018-12-12 Olivier Hainque <hainque@adacore.com>
1199
1200 * config/aarch64/aarch64.c (aarch64_override_options): Once arch,
1201 cpu and tune were validated, insert SUBTARGET_OVERRIDE_OPTIONS if
1202 defined.
1203
1204 2018-12-12 Olivier Hainque <hainque@adacore.com>
1205
1206 * config/aarch64/aarch64.c (PROBE_STACK_FIRST_REG) : Redefine as
1207 R9_REGNUM instead of 9.
1208 (PROBE_STACK_SECOND_REG): Redefine as R10_REGNUM instead of 10.
1209
1210 2018-12-12 Eric Botcazou <ebotcazou@adacore.com>
1211
1212 PR target/86806
1213 * config/sparc/sparc.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1214 (speculation_barrier): New instruction for V9.
1215
1216 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
1217 Iain Sandoe <iain@sandoe.co.uk>
1218
1219 PR target/88343
1220 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
1221 unless it has been used.
1222 (first_reg_to_save): Remove dead code.
1223
1224 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1225
1226 * config/rs6000/rs6000-protos.h (rs6000_call_darwin): New.
1227 (rs6000_sibcall_darwin): New. (macho_call_template): Remove.
1228 * config/rs6000/rs6000.c (get_prev_label): Forward declaration.
1229 (rs6000_call_template_1): Handle Darwin.
1230 (macho_call_template): Remove.
1231 (rs6000_call_sysv): Remove handling for Darwin.
1232 (rs6000_call_darwin_1, rs6000_call_darwin): New
1233 (rs6000_sibcall_darwin): New.
1234 * config/rs6000/rs6000.md (define_expand “call”): Handle Darwin
1235 with its own expander. (define_expand “call_value”): Likewise.
1236 (define_expand “sibcall”): Likewise.
1237 (define_expand “sibcall_value”): Likewise.
1238 (call_nonlocal_sysv): Remove Darwin special-casing.
1239 (call_value_nonlocal_sysv): Likewise.
1240
1241 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1242
1243 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64): Remove.
1244 (call_nonlocal_darwin64): Remove.
1245 (call_value_indirect_nonlocal_darwin64): Remove.
1246 (call_value_nonlocal_darwin64): Remove.
1247 * config/rs6000/rs6000.c (rs6000_call_template_1): Handle Darwin with
1248 the same asm output as AIX/ELFv2. (rs6000_call_sysv): Preserve the
1249 CALL_LONG flag when needed for Darwin.
1250 * config/rs6000/rs6000.md (define expand “call”): Expand Darwin as
1251 per sysv.
1252 (define_expand “call_value”): Likewise.
1253 (define_expand “sibcall”): Likewise.
1254 (define_expand “sibcall_value”): Likewise.
1255 (call_indirect_nonlocal_sysv): Mark the clobber mode P.
1256 (call_nonlocal_sysv): Likewise.
1257 (call_nonlocal_sysv_secure): Likewise.
1258 (call_value_indirect_nonlocal_sysv): Likewise.
1259 (call_value_nonlocal_sysv): Likewise.
1260 (call_value_nonlocal_sysv_secure): Likewise.
1261 (call_local64): Mark the clobber DI.
1262 (call_value_local64): Likewise.
1263
1264 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1265
1266 PR tree-optimization/88444
1267 * tree-vrp.c (register_edge_assert_for_2): Only register assertions
1268 for conversions if rhs1 is a SSA_NAME.
1269
1270 2018-12-11 Dimitar Dimitrov <dimitar@dinux.eu>
1271
1272 * cfgexpand.c (asm_clobber_reg_is_valid): Also produce
1273 error when stack pointer is clobbered.
1274 (expand_asm_stmt): Refactor clobber check in separate function.
1275
1276 2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
1277
1278 * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
1279 accounting for STACK_BOUNDARY 128.
1280 (STACK_DYNAMIC_OFFSET): Likewise.
1281
1282 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1283
1284 PR target/88425
1285 * config/i386/i386.md (*x86_mov<SWI48:mode>cc_0_m1_neg_leu<SWI:mode>):
1286 New define_insn_and_split.
1287
1288 2018-12-11 Richard Biener <rguenther@suse.de>
1289
1290 PR middle-end/88448
1291 PR middle-end/88415
1292 * gimple.c (gimple_assign_set_rhs_with_ops): Revert previous
1293 change.
1294 * tree-complex.c (update_complex_assignment): Properly transfer
1295 or clean EH info around gimple_assign_set_rhs_with_ops.
1296
1297 2018-12-11 Richard Earnshaw <rearnsha@arm.com>
1298
1299 PR target/87369
1300 * config/aarch64/iterators.md (sizem1): Add sizes for SFmode and DFmode.
1301 (Vbtype): Add SFmode mapping.
1302 * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
1303 (copysign<GPF:mode>3): New expand pattern.
1304 (copysign<GPF:mode>3_insn): New insn pattern.
1305
1306 2018-12-11 Richard Biener <rguenther@suse.de>
1307
1308 * ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.
1309
1310 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR lto/86004
1313 * doc/sourcebuild.texi (lto_incremental): Document new effective
1314 target.
1315
1316 2018-12-11 Segher Boessenkool <segher@kernel.crashing.org>
1317
1318 PR target/88145
1319 * config/rs6000/rs6000.c (rs6000_expand_zeroop_builtin): Use
1320 rs6000_isa_flags instead of rs6000_isa_flags_explicit to decide
1321 whether soft float is enabled.
1322 (rs6000_expand_mtfsb_builtin): Ditto.
1323 (rs6000_expand_set_fpscr_rn_builtin): Ditto.
1324 (rs6000_expand_set_fpscr_drn_builtin): Ditto.
1325
1326 2018-12-10 Jeff Law <law@redhat.com>
1327
1328 PR tree-optimization/80520
1329 * gimple-ssa-split-paths.c (is_feasible_trace): Recognize half
1330 diamonds that are likely if convertable.
1331
1332 2018-12-10 Martin Sebor <msebor@redhat.com>
1333
1334 PR tree-optimization/86196
1335 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
1336 base size only of arrays.
1337
1338 2018-12-10 Segher Boessenkool <segher@kernel.crashing.org>
1339
1340 * config.gcc (Obsolete configurations): Delete powerpc*-*-*spe*.
1341 (Unsupported targets): Add powerpc*-*-*spe*.
1342 (powerpc*-*-*spe*): Delete.
1343 (powerpc-*-eabispe*): Delete.
1344 (powerpc-*-rtems*spe*): Delete.
1345 (powerpc*-*-linux*spe*): Delete.
1346 (powerpc*-*-linux*): Do not handle the linux*spe* targets.
1347 (powerpc-wrs-vxworks*spe): Delete.
1348 (with_cpu setting code): Delete powerpc*-*-*spe* handling.
1349 * config.host (target powerpc*-*-*spe*): Delete.
1350 * doc/invoke.texi (PowerPC SPE Options): Delete.
1351 (PowerPC SPE Options): Delete.
1352 * config/powerpcspe: Delete.
1353
1354 2018-12-10 Uros Bizjak <ubizjak@gmail.com>
1355
1356 PR target/88418
1357 * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
1358 check operand 1 with vector_operand predicate.
1359 (ix86_expand_sse_movcc): For vector modes, check op_true with
1360 vector_operand, not nonimmediate_operand.
1361
1362 2018-12-10 Richard Biener <rguenther@suse.de>
1363
1364 * tree-affine.c (tree_to_aff_combination): Remove unreachable
1365 MEM_REF case.
1366 (aff_combination_expand): Cache on SSA names, not possibly
1367 on conversion trees. Avoid expanding cases we do not handle.
1368
1369 2018-12-10 Richard Biener <rguenther@suse.de>
1370
1371 PR tree-optimization/88427
1372 * vr-values.c (vr_values::extract_range_from_phi_node):
1373 Handle symbolic ranges conservatively when trying to drop
1374 to Inf +- 1.
1375
1376 2018-12-10 Martin Jambor <mjambor@suse.cz>
1377
1378 PR ipa/88214
1379 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
1380 we check pointers against pointers.
1381
1382 2018-12-10 Richard Biener <rguenther@suse.de>
1383
1384 PR middle-end/88415
1385 * gimple.c (gimple_assign_set_rhs_with_ops): Transfer EH
1386 info to a newly allocated stmt.
1387
1388 2018-12-10 Jerome Lambourg <lambourg@adacore.com>
1389
1390 * config/vxworksae.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): Define.
1391
1392 2018-12-10 Fredrik Nyström <fredrik@lysator.liu.se>
1393
1394 PR bootstrap/65725
1395 * config/sol2.h: Only use libgcc-unwind.map if
1396 ENABLE_SHARED_LIBGCC.
1397
1398 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1399
1400 * auto-profile.c (afdo_calculate_branch_prob): Convert profile_count
1401 to afdo precision quality.
1402 (afdo_callsite_hot_enough_for_early_inline): Likewise.
1403 (afdo_annotate_cfg): Set profile_count for exit basic block.
1404
1405 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1406
1407 * auto-profile.c (string_table::get_index_by_decl)
1408 (function_instance::get_function_instance_by_decl): Avoid infinite
1409 recursion by using DECL_FROM_INLINE.
1410
1411 2018-12-09 John David Anglin <danglin@gcc.gnu.org>
1412
1413 * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define
1414 d_target_objs.
1415 * config/pa/pa-protos.h (pa_d_target_versions): New prototype.
1416 * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
1417 * config/pa/pa-d.c: New file.
1418 * config/pa/t-pa: New file.
1419
1420 2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
1421
1422 * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
1423 zero profile count.
1424
1425 2018-12-08 Jakub Jelinek <jakub@redhat.com>
1426
1427 PR fortran/88304
1428 * tree-nested.c (convert_local_reference_stmt): Handle clobbers where
1429 lhs is not a decl normally, don't call use_pointer_in_frame on that
1430 lhs.
1431
1432 2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
1433
1434 PR rtl-optimization/88390
1435 * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
1436 (cfi_row_equal_p): Compare it.
1437 (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
1438 If FAKE is false, set window_save of the current row.
1439 (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
1440 function with FAKE parameter set to true.
1441 <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
1442 (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
1443
1444 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
1445
1446 PR target/87496
1447 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
1448 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
1449 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
1450 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
1451 require -mlong-double-128.
1452
1453 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1454
1455 * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
1456 sve_width entry.
1457 (aarch64_parse_sve_width_string): Define.
1458
1459 2018-12-07 Jeff Law <law@redhat.com>
1460
1461 PR middle-end/87813
1462 * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
1463 m_update_global_ranges member. Add corresponding argument to ctor.
1464 * gimple-ssa-evrp-analyze.c
1465 (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
1466 initialize m_update_global_ranges.
1467 (evrp_range_analyzer::set_ssa_range_info): Assert that we are
1468 updating global ranges.
1469 (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
1470 update global ranges if explicitly requested.
1471 (evrp_range_analyzer::record_ranges_from_phis): Similarly.
1472 (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
1473 * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
1474 evrp_range_analyzer ctor.
1475 * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
1476 * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
1477
1478 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1479
1480 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
1481 Add SVE_NOT_IMPLEMENTED value.
1482 * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
1483 field.
1484 * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
1485 cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
1486 cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
1487 thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
1488 saphira_tunings, thunderx2t99_tunings, emag_tunings):
1489 Specify sve_width.
1490 (aarch64_estimated_poly_value): Define.
1491 (TARGET_ESTIMATED_POLY_VALUE): Define.
1492
1493 2018-12-07 Paul A. Clarke <pc@us.ibm.com>
1494
1495 PR target/88408
1496 * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
1497
1498 2018-12-07 Vladimir Makarov <vmakarov@redhat.com>
1499
1500 PR rtl-optimization/88349
1501 * ira-costs.c (record_operand_costs): Check bigger reg class on
1502 NO_REGS.
1503
1504 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1505
1506 * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
1507 Split the patterns after reload if we don't need the predicate
1508 operand.
1509 (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
1510
1511 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1512
1513 * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
1514 iterator.
1515 (sve_fp_op): Handle minus and mult.
1516 * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
1517 (*mul<mode>3): Split the patterns after reload if we don't
1518 need the predicate operand.
1519 (*post_ra_<sve_fp_op><mode>3): New pattern.
1520
1521 2018-12-07 Bin Cheng <bin.cheng@linux.alibaba.com>
1522
1523 * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
1524 return condition when *this is precise zero.
1525
1526 2018-12-07 Jakub Jelinek <jakub@redhat.com>
1527
1528 PR target/85593
1529 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
1530 for functions with naked attribute.
1531
1532 PR c/88367
1533 * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
1534 with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
1535 is non-NULL and offset is known to have most significant bit clear.
1536 * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
1537 of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
1538 most significant bit clear. If offset does have most significant bit
1539 set and -fno-delete-null-pointer-checks, don't return true even if
1540 the base pointer is non-NULL.
1541
1542 2018-12-06 Alexandre Oliva <aoliva@redhat.com>
1543
1544 * cselib.c (cselib_record_sets): Skip strict low part sets
1545 with NULL src_elt.
1546
1547 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1548
1549 PR target/88316
1550 * config/rs6000/smmintrin.h: New file.
1551 * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
1552
1553 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1554
1555 PR target/88316
1556 * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
1557 (_mm_unpacklo_pi8): Likewise.
1558 (_mm_mulhi_pi16): Likewise.
1559 (_mm_packs_pi16): Fix for big-endian. Use preferred API.
1560 (_mm_packs_pi32): Likewise.
1561 (_mm_packs_pu16): Likewise.
1562 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
1563 (_mm_cvtss_si64): Likewise.
1564 (_mm_cvtpi32x2_ps): Likewise.
1565 (_mm_shuffle_ps): Likewise.
1566 (_mm_movemask_pi8): Likewise.
1567 (_mm_mulhi_pu16): Likewise.
1568 (_mm_sad_pu8): Likewise.
1569 (_mm_sad_pu8): Likewise.
1570 (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
1571 (_mm_cvtpu8_ps): Likewise.
1572 (_mm_movemask_ps): Better #else case for big-endian (no functional
1573 change).
1574 (_mm_shuffle_pi16): Likewise.
1575 * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
1576 Better #else case for big-endian (no functional change).
1577 (_mm_movemask_epi8): Likewise.
1578 (_mm_shufflehi_epi16): Likewise.
1579 (_mm_shufflelo_epi16): Likewise.
1580 (_mm_shuffle_epi32): Likewise.
1581 (_mm_mul_epu32): Fix for big-endian.
1582 (_mm_bsrli_si128): Likewise.
1583 (_mm_cvtps_pd): Better #else case for big endian.
1584 (_mm_mulhi_epi16): Likewise.
1585 (_mm_mul_epu32): Likewise.
1586 (_mm_slli_si128): Likewise.
1587 (_mm_sll_epi16): Likewise.
1588 (_mm_sll_epi32): Likewise.
1589 (_mm_sra_epi16): Likewise.
1590 (_mm_sra_epi32): Likewise.
1591 (_mm_srl_epi16): Likewise.
1592 (_mm_srl_epi32): Likewise.
1593 (_mm_mulhi_epu16): Likewise.
1594 (_mm_sad_epu8): Likewise.
1595 * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
1596 (_mm_sub_ps): Likewise.
1597 * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
1598 * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
1599 macros consistently (no functional changes).
1600 (_mm_alignr_pi8): Likewise.
1601
1602 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1603
1604 PR c++/87380
1605 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
1606 default.
1607 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
1608
1609 2018-12-06 Vladimir Makarov <vmakarov@redhat.com>
1610
1611 PR target/88282
1612 * ira.c (ira_init_register_move_cost): Use info from
1613 hard_regno_mode_ok instead of contains_reg_of_mode.
1614 * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
1615 hard register class for some fixed hard registers.
1616
1617 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1618
1619 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
1620 (Size of an asm): Fix typo. Document asm inline.
1621 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
1622 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
1623 (gimple_asm_set_volatile): Fix typo.
1624 (gimple_asm_inline_p): New.
1625 (gimple_asm_set_inline): New.
1626 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
1627 tree to gimple.
1628 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
1629 gimple_asm_inline_p flag, too.
1630 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
1631 in an ASM_EXPR.
1632 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
1633 a minimum size for an asm.
1634 * tree.h (ASM_INLINE_P): New.
1635
1636 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1637
1638 PR inline-asm/55681
1639 * doc/extend.texi (Basic Asm): Update grammar.
1640 (Extended Asm): Update grammar.
1641
1642 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1643
1644 PR target/78444
1645 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
1646 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
1647 stack alignment in non-leaf functions.
1648
1649 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1650
1651 PR target/87598
1652 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
1653 call output_operand_lossage on VOIDmode CONST_INTs. After
1654 output_operand_lossage do return false.
1655
1656 2018-12-06 Richard Biener <rguenther@suse.de>
1657
1658 * df-problems.c (df_rd_local_compute): Use bitmap_release.
1659 (df_live_free): Likewise.
1660 (df_md_local_compute): Likewise.
1661 (df_md_free): Release df_md_scratch bitmap.
1662 * loop-invariant.c (calculate_loop_reg_pressure): Use
1663 bitmap_release.
1664 * sched-deps.c (true_dependency_cache, output_dependency_cache,
1665 anti_dependency_cache, control_dependency_cache,
1666 spec_dependency_cache): Use bitmap instead of bitmap_head *.
1667 * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
1668 dont_calc_deps as bitmap allocated from obstack not GC.
1669 (schedule_ebbs_finish): Use bitmap_release.
1670 * sched-rgn.c (schedule_insns): Initialize non-GTY
1671 not_in_df as bitmap allocated from obstack not GC.
1672 Use bitmap_release.
1673 * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
1674 (sel_region_init): Allocate forced_ebb_heads.
1675 (sel_region_finish): Free forced_ebb_heads.
1676
1677 2018-12-06 Richard Biener <rguenther@suse.de>
1678
1679 * bitmap.c (bitmap_head::crashme): Define.
1680 * bitmap.h (bitmap_head): Add constexpr default constructor
1681 poisoning the obstack member.
1682 (bitmap_head::crashme): Declare.
1683 (bitmap_release): New function clearing a bitmap and poisoning
1684 the obstack member.
1685 * gengtype.c (main): Make it recognize CONSTEXPR.
1686 * lra-constraints.c (lra_inheritance): Use bitmap_release
1687 instead of bitmap_clear.
1688 * ira.c (ira): Work around class-memaccess warning.
1689 * regrename.c (create_new_chain): Likewise.
1690
1691 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR tree-optimization/85726
1694 * generic-match-head.c (optimize_successive_divisions_p): New function.
1695 * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
1696 * match.pd: Don't combine successive divisions if they aren't exact
1697 and optimize_successive_divisions_p is false.
1698
1699 PR fortran/88304
1700 * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
1701 for non-local automatic decls.
1702
1703 2018-12-05 David Edelsohn <dje.gcc@gmail.com>
1704
1705 * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
1706 default.
1707
1708 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1709
1710 * dwarf2out.c (field_byte_offset): Remove
1711 #ifdef PCC_BITFIELD_TYPE_MATTERS check.
1712
1713 2018-12-05 Richard Biener <rguenther@suse.de>
1714 Martin Sebor <msebor@redhat.com>
1715
1716 PR c/87028
1717 * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
1718 SSA_NAME_VAR.
1719 * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
1720 * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
1721
1722 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
1723
1724 * configure.ac (gcc_cv_otool): Set.
1725 * configure: Regenerate.
1726
1727 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1728
1729 * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
1730 (GROUP_BITFIELDS_BY_ALIGN): Ditto.
1731
1732 2018-12-05 Richard Sandiford <richard.sandiford@arm.com>
1733
1734 PR tree-optimization/88064
1735 * tree-vect-patterns.c (vect_convert_input): Convert the result of
1736 an existing cast if it has the right width but the wrong sign.
1737 Do not test the signedness of the required result when
1738 considering whether to split an existing cast; instead split to
1739 a type with the same signedness as the source of the cast, then
1740 convert it to the opposite signedness where necessary.
1741 (vect_recog_over_widening_pattern): Handle sign changes between
1742 the final PLUS_EXPR and the RSHIFT_EXPR.
1743 (vect_recog_average_pattern): Use an unsigned operation when
1744 truncating an addition, subtraction or multiplication. Cast the
1745 result back to the "real" signedness before promoting.
1746
1747 2018-12-05 Richard Biener <rguenther@suse.de>
1748
1749 PR tree-optimization/86637
1750 * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
1751 vect_location at the end.
1752
1753 2018-12-05 Jakub Jelinek <jakub@redhat.com>
1754
1755 PR tree-optimization/87360
1756 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
1757 data dependencies, don't return false, just continue. Formatting
1758 fixes.
1759 (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
1760 fuse_loops): Formatting fixes.
1761
1762 PR sanitizer/88333
1763 * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
1764 aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
1765
1766 2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
1767
1768 * config.gcc (csky-*-linux-gnu*): Force .init_array support.
1769
1770 2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
1771
1772 * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
1773 aggregate handling on actual AIX, not on somewhat similar systems.
1774 (rs6000_arg_partial_bytes): Ditto.
1775
1776 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1777
1778 PR rtl-optimization/88317
1779 * lra-constraints.c (split_reg): Don't set up check_only_regs if
1780 we are outside the inheritance pass.
1781
1782 2018-12-04 Jan Hubicka <hubicka@ucw.cz>
1783
1784 * ipa-prop.c (jump_function_useful_p): New.
1785 (ipa_read_node_info): Do not allocated useless jump functions.
1786
1787 2018-12-04 David Malcolm <dmalcolm@redhat.com>
1788
1789 PR c/82967
1790 * spellcheck.c (selftest::test_suggestions): Add another assertion.
1791
1792 2018-12-04 Martin Sebor <msebor@redhat.com>
1793
1794 * doc/extend.texi (__builtin_has_attribute): Fix typo.
1795
1796 2018-12-04 Jakub Jelinek <jakub@redhat.com>
1797
1798 PR target/88188
1799 * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
1800 failures.
1801 (print_operand): Use REG_P instead of GET_CODE == REG.
1802 <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
1803 <case 't'>: Likewise. Remove GET_MODE check.
1804 * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
1805 return -1.
1806
1807 2018-12-04 Martin Sebor <msebor@redhat.com>
1808
1809 * doc/extend.texi (attribute aligned): Expand.
1810
1811 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
1812
1813 PR target/61976
1814 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
1815 in FPRs on AIX.
1816 (rs6000_arg_partial_bytes): Same.
1817
1818 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1819
1820 PR target/88282
1821 * ira-costs.c (exec): Try bigger class to use smaller register
1822 move cost.
1823
1824 2018-12-04 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1825
1826 PR ipa/88297
1827 * ipa-cp.c (create_specialized_node): Track clone counters by
1828 node assembler names.
1829 (ipcp_driver): Change type of clone_num_suffixes key to const char*.
1830
1831 2018-12-04 Richard Biener <rguenther@suse.de>
1832
1833 * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
1834 for epilogue vectorization.
1835
1836 2018-12-04 Richard Biener <rguenther@suse.de>
1837
1838 PR tree-optimization/88301
1839 * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
1840 issues in last commit.
1841
1842 2018-12-04 Richard Biener <rguenther@suse.de>
1843
1844 PR tree-optimization/88315
1845 * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
1846 and fix initialization vector for SAD and DOT_PROD SLP reductions.
1847
1848 2018-12-03 Sandra Loosemore <sandra@codesourcery.com>
1849
1850 PR c/59039
1851 * doc/extend.texi (Nonlocal gotos): New section.
1852
1853 2018-12-03 Uros Bizjak <ubizjak@gmail.com>
1854
1855 * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
1856 alternative to (v,vm,c).
1857
1858 2018-12-03 Segher Boessenkool <segher@kernel.crashing.org>
1859
1860 * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
1861 (powerpc*-*-linux*): Don't handle it here.
1862
1863 2018-12-03 Jeff Law <law@redhat.com>
1864
1865 * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
1866 warnings quiet.
1867
1868 * config/h8300/h8300.md (low byte masking peepholes): Only accept
1869 nonimmediate_operand for the to-be-masked operand.
1870
1871 2018-12-03 Richard Biener <rguenther@suse.de>
1872
1873 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1874 allow expected function-pointer cast re-instantiation.
1875
1876 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1877
1878 * common/config/s390/s390-common.c (s390_option_init_struct):
1879 Use section anchors by default.
1880 * config/s390/s390.c (s390_check_symref_alignment): Handle
1881 anchors.
1882 (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
1883 * output.h (assemble_align): Pass `align' as unsigned int, so
1884 that the value 0x80000000, which corresponds to `aligned(1 <<
1885 28)', would pass the `align > BITS_PER_UNIT' check.
1886 * varasm.c (assemble_align): Likewise.
1887
1888 2018-12-03 Julian Brown <julian@codesourcery.com>
1889
1890 * tree-pretty-print.c (dump_omp_clause): Make default case
1891 gcc_unreachable.
1892
1893 2018-12-03 Richard Biener <rguenther@suse.de>
1894
1895 PR tree-optimization/88301
1896 * tree-vrp.c (register_edge_assert_for_2): Handle conversions
1897 that do not change the value by registering the same assert
1898 for the operand.
1899
1900 2018-12-03 Richard Biener <rguenther@suse.de>
1901
1902 * tree-vect-loop.c (vect_transform_loop): Properly compute
1903 upper bound for the epilogue when doing epilogue vectorization.
1904
1905 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1906
1907 PR target/80080
1908 * cfgcleanup.c (class pass_postreload_jump): New pass.
1909 (pass_postreload_jump::execute): Likewise.
1910 (make_pass_postreload_jump): Likewise.
1911 * passes.def: Add pass_postreload_jump before
1912 pass_postreload_cse.
1913 * tree-pass.h (make_pass_postreload_jump): New pass.
1914
1915 2018-12-02 Uros Bizjak <ubizjak@gmail.com>
1916
1917 * config/i386/i386.c (inline_memory_move_cost): Correctly
1918 compute number of TFmode GPR moves.
1919
1920 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1921
1922 PR target/88278
1923 * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
1924
1925 2018-12-02 Jeff Law <law@redhat.com>
1926
1927 * config/h8300/h8300.md (call, call_value): Drop mode from
1928 operand containing number of bytes pushed.
1929 (call_insn, call_value_insn): Use mode iterator for number
1930 of bytes pushed operand. Make pattern name vary appropriately.
1931
1932 2018-12-02 Jan Hubicka <jh@suse.cz>
1933
1934 * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
1935 trust precise profiles.
1936
1937 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1938
1939 * tree-nested.c (convert_nonlocal_omp_clauses,
1940 convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
1941 OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
1942 (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
1943 Convert clauses for GIMPLE_OMP_TASKGROUP.
1944
1945 * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
1946 cancellation point with taskgroup clause inside of taskloop. Consider
1947 a taskloop construct without nogroup clause as implicit taskgroup for
1948 diagnostics if cancel/cancellation point with taskgroup clause is
1949 closely nested inside of taskgroup region.
1950
1951 PR sanitizer/88291
1952 * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
1953 to the start of the function.
1954 (asan_emit_stack_protection): When emitting clearing sequence for
1955 epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
1956 add last_size_aligned which is last_size padded to multiples of
1957 ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
1958 boundaries.
1959
1960 2018-12-01 Jakub Jelinek <jakub@redhat.com>
1961
1962 PR sanitizer/88289
1963 * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
1964 an off-by-one for BYTES_BIG_ENDIAN.
1965
1966 PR target/54589
1967 * combine.c (find_split_point): For invalid memory address
1968 nonobj + obj + const, if reg + obj + const is valid addressing
1969 mode, split at nonobj. Use if rather than else if for the
1970 fallback. Comment fixes.
1971
1972 2018-11-30 Indu Bhagat <indu.bhagat@oracle.com>
1973
1974 * coverage.c (get_coverage_counts): Use from_function_decl for precise
1975 function location.
1976 * profile-count.c (profile_count::dump): Add handling for precise
1977 profile quality.
1978 * profile.c (compute_branch_probabilities): Rely on exec_counts instead
1979 of profile_info to set profile_status of function.
1980 (branch_prob): Do not set profile_status of function based on
1981 profile_info. Done above based on exec_counts.
1982
1983 2018-11-30 Jakub Jelinek <jakub@redhat.com>
1984
1985 PR tree-optimization/88274
1986 * tree-ssa-reassoc.c (optimize_range_tests_xor,
1987 optimize_range_tests_diff): If type has smaller precision than
1988 corresponding mode or if it has non-standard min/max, compute
1989 everything in a standard type for the precision.
1990
1991 PR testsuite/85368
1992 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
1993 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
1994 --param logical-op-non-short-circuit is present, override
1995 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
1996 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
1997
1998 2018-11-30 Jeff Law <law@redhat.com>
1999
2000 * optabs.c (expand_binop): Use "machine_mode" rather than
2001 "enum machine mode" in most recent change.
2002
2003 2018-11-30 Wilco Dijkstra <wdijkstr@arm.com>
2004
2005 PR middle-end/64242
2006 * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
2007 the frame pointer.
2008 (expand_builtin_nonlocal_goto): Likewise.
2009
2010 2018-11-30 David Malcolm <dmalcolm@redhat.com>
2011
2012 * diagnostic-core.h (emit_diagnostic): New decl.
2013 * diagnostic.c (emit_diagnostic): New overload, taking a
2014 rich_location *.
2015
2016 2018-11-30 David Malcolm <dmalcolm@redhat.com>
2017
2018 * pretty-print.c (class selftest::test_pretty_printer): New
2019 subclass of pretty_printer.
2020 (selftest::test_prefixes_and_wrapping): New test.
2021 (selftest::pretty_print_c_tests): Call it.
2022
2023 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2024
2025 Minimize clone counter memory usage in create_virtual_clone.
2026 * cgraph.h (clone_function_name): Add a variant that takes a
2027 tree decl.
2028 * cgraph.h (cgraph_node::create_virtual_clone): Add a new
2029 argument: num_suffix.
2030 * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
2031 num_suffix to clone_function_name.
2032 (clone_function_name): Add a variant that takes a tree decl.
2033 * ipa-cp.c (create_specialized_node): Keep track of clone
2034 counters in clone_num_suffixes hash map.
2035 (ipcp_driver): Free the counter hash map.
2036 * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
2037 clone per function.
2038
2039 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2040 Make function assembly more independent.
2041
2042 This is achieved by having clone_function_name assign unique clone
2043 numbers for each function independently.
2044
2045 * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
2046 hash map.
2047 (clone_function_name_numbered): Use clone_fn_ids.
2048
2049 2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
2050
2051 PR rtl-optimization/88179
2052 * lra-constraints.c (address_eliminator::address_eliminator):
2053 Don't eleminate regs in illegitimate address.
2054
2055 2018-11-30 David Malcolm <dmalcolm@redhat.com>
2056
2057 PR preprocessor/88257
2058 * input.c (get_substring_ranges_for_loc): Fix indentation.
2059 Bulletproof against getting a different files back from
2060 linemap_resolve_location and expand_location_to_spelling_point.
2061
2062 2018-11-30 Alexander Monakov <amonakov@ispras.ru>
2063
2064 PR gcov-profile/88279
2065 * tree-profile.c (init_ic_make_global_vars): Call
2066 decl_default_tls_model for variable and not it's type.
2067
2068 2018-11-30 Sam Tebbs <sam.tebbs@arm.com>
2069
2070 * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
2071
2072 2018-11-30 Martin Liska <mliska@suse.cz>
2073
2074 PR sanitizer/81715
2075 * asan.c (asan_shadow_cst): Remove, partially transform
2076 into flush_redzone_payload.
2077 (RZ_BUFFER_SIZE): New.
2078 (struct asan_redzone_buffer): New.
2079 (asan_redzone_buffer::emit_redzone_byte): Likewise.
2080 (asan_redzone_buffer::flush_redzone_payload): Likewise.
2081 (asan_redzone_buffer::flush_if_full): Likewise.
2082 (asan_emit_stack_protection): Use asan_redzone_buffer class
2083 that is responsible for proper aligned stores and flushing
2084 of shadow memory payload.
2085 * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
2086 (asan_var_and_redzone_size): Likewise.
2087 * cfgexpand.c (expand_stack_vars): Use smaller alignment
2088 (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
2089 for automatic variables more compact.
2090
2091 2018-11-30 Alan Modra <amodra@gmail.com>
2092
2093 * config/rs6000/predicates.md (easy_fp_constant): Avoid long
2094 dependent insn sequences.
2095 * config/rs6000/rs6000.c (num_insns_constant): Support long
2096 double constants.
2097 * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
2098 length attribute.
2099
2100 2018-11-30 Alan Modra <amodra@gmail.com>
2101
2102 * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
2103 num_insns_constant_wide. Make static. Revise comment.
2104 (num_insns_constant_multi): New function.
2105 (num_insns_constant): Formatting. Correct CONST_WIDE_INT
2106 calculation. Simplify and extract code common to both
2107 CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
2108 const_double modes.
2109 * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
2110
2111 2018-11-30 Richard Biener <rguenther@suse.de>
2112
2113 PR tree-optimization/88274
2114 * tree-vrp.c (ranges_from_anti_range): Fix handling of
2115 TYPE_MIN/MAX_VALUE.
2116
2117 2018-11-29 Andi Kleen <ak@linux.intel.com>
2118
2119 * config/i386/i386.c (current_fentry_section): Add.
2120 (x86_function_profiler): Handle fentry section.
2121 (ix86_attribute_table): Add fentry section.
2122 * config/i386/i386.opt: Add -mfentry-section.
2123 * doc/extend.texi: Document fentry_section attribute.
2124 * doc/invoke.texi: Document -mfentry-section.
2125
2126 2018-11-29 Andi Kleen <ak@linux.intel.com>
2127
2128 * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
2129 (current_fentry_name): Add.
2130 (x86_function_profiler): Handle fentry_name attribute.
2131 (ix86_handle_fentry_name): Add.
2132 (ix86_attribute_table): Add fentry_name.
2133 * config/i386/i386.opt: Add -mfentry-name
2134 * doc/extend.texi: Document fentry_name.
2135 * doc/invoke.texi: Document minstrument-return.
2136
2137 2018-11-29 Andi Kleen <ak@linux.intel.com>
2138
2139 * config/i386/i386-opts.h (enum instrument_return): Add.
2140 * config/i386/i386.c (output_return_instrumentation): Add.
2141 (ix86_output_function_return): Call output_return_instrumentation.
2142 (ix86_output_call_insn): Call output_return_instrumentation.
2143 * config/i386/i386.opt: Add -minstrument-return=.
2144 * doc/invoke.texi (-minstrument-return): Document.
2145
2146 2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
2147
2148 PR target/87807
2149 * config/sparc/sparc-modes.def: Minor tweak.
2150 * config/sparc/sparc.c: Minor reordering.
2151 (sparc_pass_by_reference): Move around.
2152 (traverse_record_type): Change offset from HOST_WIDE_INT to int.
2153 (classify_registers): Likewise for bitpos.
2154 (function_arg_slotno): Remove dead test and tweak comments.
2155 <MODE_RANDOM>: Remove useless assertion and test whether the
2156 parameter is named in order to pass it in FP registers. Return
2157 the regno for floating-point vector types.
2158 (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
2159 (compute_fp_layout): Likewise.
2160 (count_registers): Likewise.
2161 (assign_int_registers): Likewise.
2162 (assign_fp_registers): Likewise.
2163 (assign_registers): Likewise.
2164 (function_arg_record_value): Change size from HOST_WIDE_INT to int
2165 and use CEIL_NWORDS to compute the number of registers.
2166 (function_arg_union_value): Minor tweaks.
2167 (function_arg_vector_value): Add slotno and named parameters, use
2168 CEIL_NWORDS to compute the number of registers.
2169 (sparc_function_arg_1): Rework handling of vector types. Change
2170 size from HOST_WIDE_INT to int.
2171 (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
2172 with vector types for the 64-bt ABI.
2173 (sparc_function_arg_advance): Likewise.
2174 (sparc_return_in_memory): Add reference to -fpcc-struct-return.
2175 (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
2176 (sparc_function_value_1): Rework handling of vector types. Change
2177 size from HOST_WIDE_INT to int.
2178
2179 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR target/88152
2182 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
2183 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
2184 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
2185 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
2186 *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
2187 define_insn_and_split patterns.
2188
2189 PR target/54700
2190 * config/i386/sse.md
2191 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2192 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2193 *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
2194 define_insn_and_split.
2195
2196 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2197
2198 PR target/87496
2199 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2200 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2201
2202 2018-11-29 Uros Bizjak <ubizjak@gmail.com>
2203
2204 * config/i386/i386.c (inline_memory_move_cost):
2205 Check "in" for 2 in MMX_CLASS_P case.
2206 * config/i386/mmx.md (*mov<mode>_internal): Correct
2207 TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
2208 alternatives in preferred_for_speed attribute calculation.
2209
2210 2018-11-29 Martin Sebor <msebor@redhat.com>
2211
2212 PR c/88172
2213 PR testsuite/88208
2214 * doc/extend.texi (attribute constructor): Clarify.
2215
2216 2018-11-29 Martin Liska <mliska@suse.cz>
2217
2218 PR middle-end/88246
2219 * builtins.c (expand_movstr): Fix thinko introduced
2220 when switching to the new enum.
2221
2222 2018-11-29 qing zhao <qing.zhao@oracle.com>
2223
2224 * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
2225 * common.opt: Add -flive-patching flag.
2226 * doc/invoke.texi: Document -flive-patching.
2227 * flag-types.h (enum live_patching_level): New enum.
2228 * ipa-inline.c (can_inline_edge_p): Disable external functions from
2229 inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
2230 * opts.c (control_options_for_live_patching): New function.
2231 (finish_options): Make flag_live_patching incompatible with flag_lto.
2232 Control IPA optimizations based on different levels of
2233 flag_live_patching.
2234
2235 2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
2236
2237 * match.pd (sinh (atanh (x))): New simplification rules.
2238 (cosh (atanh (x))): Likewise.
2239
2240 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2241
2242 PR target/54700
2243 * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
2244 (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
2245 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2246 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2247 *<sse4_1_avx2>_pblendvb_lt): New define_insns.
2248
2249 PR target/88152
2250 * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
2251 * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
2252 * match.pd (define_predicates): Add uniform_integer_cst_p.
2253 (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
2254 so that it works also for vector comparisons with uniform constants
2255 with INTEGER_CST element.
2256
2257 PR target/88234
2258 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
2259 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
2260 in unsigned_type_for instead of vector integral type where overflow
2261 doesn't wrap.
2262
2263 2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2264
2265 There can be at most one .resolver clone per function
2266 * config/rs6000/rs6000.c (make_resolver_func): Generate
2267 resolver symbol with clone_function_name instead of
2268 clone_function_name_numbered.
2269
2270 2018-11-29 Richard Biener <rguenther@suse.de>
2271
2272 PR tree-optimization/88243
2273 * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
2274 type of all pattern-sequence stmts to vect_internal_def.
2275
2276 2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
2277
2278 PR target/88224
2279 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
2280 (cortex-r7, cortex-r8): Update default and add new configuration.
2281 * doc/invoke.texi (armv7-r): Add two new vfp options.
2282 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
2283 support this option.
2284
2285 2018-11-29 Alan Modra <amodra@gmail.com>
2286
2287 * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
2288 double split for targets other than Darwin.
2289
2290 2018-11-29 Alan Modra <amodra@gmail.com>
2291
2292 * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
2293
2294 2018-11-29 Alan Modra <amodra@gmail.com>
2295
2296 * config/rs6000/predicates.md (easy_fp_constant): Remove code
2297 dealing with integers in const_double. Assert on unexpected
2298 modes. Delete superfluous ABI_V4 test.
2299 * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
2300 Don't call easy_fp_constant for Pmode.
2301 (rs6000_hash_constant): Remove code dealing with integers in
2302 const_double.
2303 (rs6000_legitimate_constant_p): Likewise.
2304 (output_toc): Formatting, use CONST_DOUBLE_P.
2305
2306 2018-11-29 Alan Modra <amodra@gmail.com>
2307
2308 * config/rs6000/constraints.md (G, H): Comment on purpose of
2309 constraint. Correct mode comments and "G" mode test.
2310 * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
2311 alternative handling "F". Add length attr. Formatting.
2312 (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
2313 alternative, and move "F" to separate alternative. Correct
2314 insn lengths.
2315
2316 2018-11-29 Alan Modra <amodra@gmail.com>
2317
2318 * config/rs6000/predicates.md (easy_vector_constant): Don't call
2319 easy_fp_constant.
2320
2321 2018-11-29 Alan Modra <amodra@gmail.com>
2322
2323 * config.in (HAVE_AS_PLTSEQ): Add.
2324 * config/rs6000/predicates.md (indirect_call_operand): New.
2325 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
2326 (rs6000_sibcall_sysv): Declare.
2327 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
2328 CALL_LONG for -fno-plt.
2329 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
2330 (rs6000_indirect_call_template_1): Emit .reloc directives for
2331 UNSPEC_PLTSEQ calls.
2332 (rs6000_pltseq_template): New function.
2333 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
2334 relocs supported by assembler. Move SYMBOL_REF test to callers.
2335 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
2336 insns in UNSPEC_PLTSEQ, preserving original func_desc.
2337 (rs6000_call_sysv): Likewise.
2338 (rs6000_sibcall_sysv): New function.
2339 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
2340 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
2341 UNSPEC_PLT16_LO): New.
2342 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
2343 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
2344 cookie in constraints. Test explicitly for flags in length attr.
2345 Handle unspec operand 1.
2346 (call_value_indirect_nonlocal_sysv): Likewise.
2347 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
2348 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
2349 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
2350 (sibcall_indirect_nonlocal_sysv): New pattern.
2351 (sibcall_value_indirect_nonlocal_sysv): Likewise.
2352 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
2353 call alternatives.
2354 * configure.ac: Check for gas plt sequence marker support.
2355 * configure: Regenerate.
2356
2357 2018-11-29 Alan Modra <amodra@gmail.com>
2358
2359 * config/rs6000/predicates.md (unspec_tls): New.
2360 * config/rs6000/rs6000-protos.h (rs6000_call_template),
2361 (rs6000_sibcall_template): Update prototype.
2362 (rs6000_longcall_ref): Delete.
2363 (rs6000_call_sysv): Declare.
2364 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
2365 (global_tlsarg): New variable.
2366 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
2367 handling.
2368 (print_operand): Extract UNSPEC_TLSGD address operand.
2369 (rs6000_call_template, rs6000_sibcall_template): Remove arg
2370 parameter, extract from second call operand instead.
2371 (rs6000_longcall_ref): Make static, localize vars.
2372 (rs6000_call_aix): Rename parameter to reflect new usage. Take
2373 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
2374 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
2375 tlsarg from global_tlsarg.
2376 (rs6000_call_sysv): New function.
2377 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
2378 rs6000_sibcall_template throughout.
2379 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
2380 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
2381 (tls_gdld_nomark): New insn.
2382 (tls_gd): Swap operand order. Simplify mode selection.
2383 (tls_gd_high, tls_gd_low): Swap operand order.
2384 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
2385 Simplify mode selection.
2386 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
2387 (call, call_value): Don't assert for second call operand.
2388 Use rs6000_call_sysv.
2389
2390 2018-11-29 Alan Modra <amodra@gmail.com>
2391
2392 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
2393 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
2394 (call_value_nonlocal_darwin64): Remove constraints from second call
2395 arg, the rounded_stack_size_rtx arg.
2396 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
2397 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
2398 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
2399 (call_value_local64, call_indirect_nonlocal_sysv),
2400 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
2401 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
2402 (call_value_nonlocal_sysv_secure, call_local_aix),
2403 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
2404 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
2405 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
2406 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
2407 (sibcall_value_aix): Likewise.
2408
2409 2018-11-29 Alan Modra <amodra@gmail.com>
2410
2411 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
2412 with P throughout except for call mems which should use SI.
2413 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
2414 attributes. Replace with bits, mode and ptrload respectively.
2415
2416 2018-11-29 Alan Modra <amodra@gmail.com>
2417
2418 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
2419 (rs6000_indirect_sibcall_template): Declare.
2420 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
2421 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
2422 New functions.
2423 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
2424 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
2425 (call_indirect_aix, call_value_indirect_aix): Use
2426 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
2427 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
2428 handle both speculation and non-speculation cases.
2429 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
2430 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
2431
2432 2018-11-29 Alan Modra <amodra@gmail.com>
2433
2434 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
2435 (rs6000_sibcall_template): Declare.
2436 (macho_call_template): Rename from output_call.
2437 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
2438 (rs6000_call_template, rs6000_sibcall_template): Likewise.
2439 (macho_call_template): Rename from output_call.
2440 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
2441 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
2442 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
2443 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
2444 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
2445 (call_value_nonlocal_aix): Use rs6000_call_template and update
2446 occurrences of output_call to macho_call_template.
2447 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
2448 (sibcall_value_aix): Use rs6000_sibcall_template.
2449
2450 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2451
2452 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
2453 we determine if unaligned vsx is ok.
2454
2455 2018-11-28 Jan Hubicka <jh@suse.cz>
2456
2457 * predict.c (determine_unlikely_bbs): Forward declare; also determine
2458 edges that are always known to be taken because it is only likely
2459 edge out of given BB.
2460 (tree_estimate_probability): Call before profile guessing to get bit
2461 of extra precision.
2462
2463 2018-11-28 Jan Hubicka <jh@suse.cz>
2464
2465 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
2466 profile_probability::always better.
2467
2468 2018-11-28 Jan Hubicka <jh@suse.cz>
2469
2470 * profile-count.h (profile_count::split): Give better result when
2471 splitting profile_probability::always.
2472
2473 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
2474
2475 PR target/88207
2476 * ira-costs.c (scan_one_insn): Process subregs when updating costs
2477 for pseudos and allocnos from insn.
2478
2479 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
2480
2481 * config/rs6000/aix72.h: Update to match aix71.h changes.
2482
2483 2018-11-28 Jeff Law <law@redhat.com>
2484
2485 * config/h8300/constraints.md: Add "C" constraint for call insns.
2486 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
2487 and define_insn pair. Move invalid call targets into a register in
2488 the expander and fix constraints in the matching pattern.
2489 * config/h8300/predicates.md (call_expander_operand): Renamed from
2490 call_insn_operand. Reject things we shouldn't be trying to handle.
2491 (call_insn_operand): New predicate for use by the call/call_value
2492 insns.
2493 (small_call_insn_operand): Update appropriately.
2494
2495 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2496
2497 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
2498 calls to strtok with strtok_r.
2499
2500 2018-11-28 Richard Biener <rguenther@suse.de>
2501
2502 PR tree-optimization/88223
2503 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
2504 over a stored-same value may-alias store make sure to consider
2505 partial overlaps which are valid when TBAA reasonings do not
2506 apply and byte-granular overlaps are possible at all.
2507
2508 2018-11-28 Richard Biener <rguenther@suse.de>
2509
2510 PR tree-optimization/88217
2511 * vr-values.c (vr_values::extract_range_from_phi_node): Make
2512 sure to handle results > +INF and < -INF correctly when
2513 trying to drop down to +INF - 1 or -INF + 1.
2514
2515 2018-11-28 Alan Modra <amodra@gmail.com>
2516
2517 * xcoffout.c (do_block): Signed/unsigned warning fix.
2518
2519 2018-11-28 Richard Biener <rguenther@suse.de>
2520
2521 PR tree-optimization/79351
2522 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
2523 empty CONSTRUCTORs ensure the store is at a constant position.
2524
2525 2018-11-28 Richard Biener <rguenther@suse.de>
2526
2527 PR tree-optimization/88229
2528 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
2529 is an INTEGER_CST before accessing it so.
2530
2531 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2532
2533 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
2534
2535 2018-11-28 Jakub Jelinek <jakub@redhat.com>
2536
2537 PR target/88189
2538 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
2539 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
2540 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
2541
2542 2018-11-27 Martin Liska <mliska@suse.cz>
2543
2544 * gcov.c (generate_results): Append current_working_directory
2545 only when exists.
2546
2547 2018-11-27 Mike Gulick <mgulick@mathworks.com>
2548
2549 PR preprocessor/83173
2550 * input.c (dump_location_info): Dump reason and included_from
2551 fields from line_map_ordinary struct. Fix indentation when
2552 location > 5 digits.
2553 * diagnostic-show-locus.c (num_digits, num_digits): Move to
2554 diagnostic.c to allow it to be utilized by input.c.
2555 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
2556 here.
2557 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
2558 * diagnostic.h (num_digits): Add extern definition.
2559
2560 2018-11-27 Fredrik Noring <noring@nocrew.org>
2561
2562 * config/mips/mips.c (mips_reorg_process_insns)
2563 (mips_option_override): Handle `-mfix-r5900'.
2564 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
2565 `mno-fix-r5900'.
2566 * config/mips/mips.opt (mfix-r5900): New option.
2567 * doc/invoke.texi: Document the `r5900' processor name, and
2568 `-mfix-r5900' and `-mno-fix-r5900' options.
2569
2570 2018-11-27 Jakub Jelinek <jakub@redhat.com>
2571
2572 PR target/88188
2573 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
2574 output_operand_lossage instead of gcc_assert.
2575 <case 't'>: Likewise.
2576 <case 'z'>: Likewise.
2577 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
2578
2579 2018-11-27 Jeff Law <law@redhat.com>
2580
2581 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
2582 in call to move_by_pieces.
2583
2584 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
2585 to move_by_pieces.
2586
2587 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
2588 call to move_by_pieces.
2589
2590 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
2591 in call to move_by_pieces.
2592
2593 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
2594 RETURN_BEGIN in call to move_by_pieces.
2595 (microblaze_expand_block_move): Likewise.
2596
2597 2018-11-27 Tamar Christina <tamar.christina@arm.com>
2598
2599 * doc/md.texi (xorsign): Document it.
2600
2601 2018-11-27 Martin Liska <mliska@suse.cz>
2602
2603 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
2604 * gcc.c (find_fortran_preinclude_file): New function
2605 to handle Fortran pre-include.
2606
2607 2018-11-27 Martin Liska <mliska@suse.cz>
2608
2609 * asan.c (asan_emit_stack_protection): Use new enum values
2610 instead of int constants.
2611 * builtins.c (expand_builtin_memory_copy_args): Replace int
2612 type with memop_ret enum type.
2613 (expand_builtin_mempcpy_args): Likewise.
2614 (expand_builtin_memcpy): Use new enum values
2615 instead of int constants. Likewise.
2616 (expand_builtin_mempcpy): Likewise.
2617 (expand_movstr): Likewise.
2618 (expand_builtin_strcpy_args): Likewise.
2619 (expand_builtin_stpcpy_1): Likewise.
2620 (expand_builtin_strncpy): Likewise.
2621 (expand_builtin_memset_args): Likewise.
2622 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
2623 (move_by_pieces_d::finish_retmode): ... this.
2624 (move_by_pieces): Change last argument type to memop_ret.
2625 (store_by_pieces): Use new enum values
2626 instead of int constants.
2627 (emit_block_move_hints): Likewise.
2628 (emit_push_insn): Likewise.
2629 (store_expr): Likewise.
2630 * expr.h (store_by_pieces): Change int to newly added enum
2631 type.
2632 * rtl.h (enum memop_ret): Define.
2633 (move_by_pieces): Use the enum type.
2634
2635 2018-11-27 Alan Modra <amodra@gmail.com>
2636
2637 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
2638 cpu here.
2639 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
2640 form. Error on missing -mcpu case.
2641 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
2642 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
2643 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
2644 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
2645 else if .. specs form. Error on missing -mcpu case. Don't output
2646 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
2647
2648 2018-11-26 David Malcolm <dmalcolm@redhat.com>
2649
2650 * dump-context.h (dump_context::dump_loc): Convert 1st param from
2651 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2652 const dump_location_t & to const dump_user_location_t &.
2653 (dump_context::dump_loc_immediate): Convert 2nd param from
2654 const dump_location_t & to const dump_user_location_t &.
2655 (dump_context::dump_gimple_stmt): Convert 1st param from
2656 dump_flags_t to const dump_metadata_t &.
2657 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2658 2nd param from const dump_location_t & to
2659 const dump_user_location_t &.
2660 (dump_context::dump_gimple_expr): Convert 1st param from
2661 dump_flags_t to const dump_metadata_t &.
2662 (dump_context::dump_gimple_expr_loc): Likewise; convert
2663 2nd param from const dump_location_t & to
2664 const dump_user_location_t &.
2665 (dump_context::dump_generic_expr): Convert 1st param from
2666 dump_flags_t to const dump_metadata_t &.
2667 (dump_context::dump_generic_expr_loc): Likewise; convert
2668 2nd param from const dump_location_t & to
2669 const dump_user_location_t &.
2670 (dump_context::dump_printf_va): Convert 1st param from
2671 dump_flags_t to const dump_metadata_t &.
2672 (dump_context::dump_printf_loc_va): Likewise; convert
2673 2nd param from const dump_location_t & to
2674 const dump_user_location_t &.
2675 (dump_context::dump_dec): Convert 1st param from
2676 dump_flags_t to const dump_metadata_t &.
2677 (dump_context::dump_symtab_node): Likewise.
2678 (dump_context::begin_scope): Split out 2nd param into
2679 user and impl locations.
2680 (dump_context::ensure_pending_optinfo): Add metadata param.
2681 (dump_context::begin_next_optinfo): Replace dump_location_t param
2682 with metadata and user location.
2683 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
2684 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2685 const dump_location_t & to const dump_user_location_t &.
2686 (dump_context::dump_loc_immediate): Convert 2nd param from
2687 const dump_location_t & to const dump_user_location_t &.
2688 (dump_context::dump_gimple_stmt): Convert 1st param from
2689 dump_flags_t to const dump_metadata_t &.
2690 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2691 2nd param from const dump_location_t & to
2692 const dump_user_location_t &.
2693 (dump_context::dump_gimple_expr): Convert 1st param from
2694 dump_flags_t to const dump_metadata_t &.
2695 (dump_context::dump_gimple_expr_loc): Likewise; convert
2696 2nd param from const dump_location_t & to
2697 const dump_user_location_t &.
2698 (dump_context::dump_generic_expr): Convert 1st param from
2699 dump_flags_t to const dump_metadata_t &.
2700 (dump_context::dump_generic_expr_loc): Likewise; convert
2701 2nd param from const dump_location_t & to
2702 const dump_user_location_t &.
2703 (dump_context::dump_printf_va): Convert 1st param from
2704 dump_flags_t to const dump_metadata_t &.
2705 (dump_context::dump_printf_loc_va): Likewise; convert
2706 2nd param from const dump_location_t & to
2707 const dump_user_location_t &.
2708 (dump_context::dump_dec): Convert 1st param from
2709 dump_flags_t to const dump_metadata_t &.
2710 (dump_context::dump_symtab_node): Likewise.
2711 (dump_context::begin_scope): Split out 2nd param into
2712 user and impl locations.
2713 (dump_context::ensure_pending_optinfo): Add metadata param.
2714 (dump_context::begin_next_optinfo): Replace dump_location_t param
2715 with metadata and user location.
2716 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2717 const dump_metadata_t &.
2718 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2719 const dump_location_t & to const dump_user_location_t &.
2720 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2721 const dump_metadata_t &.
2722 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2723 const dump_location_t & to const dump_user_location_t &.
2724 (dump_generic_expr): Convert 1st param from dump_flags_t to
2725 const dump_metadata_t &.
2726 (dump_generic_expr_loc): Likewise; convert 2nd param from
2727 const dump_location_t & to const dump_user_location_t &.
2728 (dump_printf): Convert 1st param from dump_flags_t to
2729 const dump_metadata_t &.
2730 (dump_printf_loc): Likewise; convert 2nd param from
2731 const dump_location_t & to const dump_user_location_t &.
2732 (dump_dec): Convert 1st param from dump_flags_t to
2733 const dump_metadata_t &.
2734 (dump_symtab_node): Likewise.
2735 (dump_begin_scope): Split out 2nd param into user and impl
2736 locations.
2737 (selftest::assert_impl_location_eq): New function.
2738 (ASSERT_IMPL_LOCATION_EQ): New macro.
2739 (selftest::test_impl_location): Update to use
2740 ASSERT_IMPL_LOCATION_EQ.
2741 (selftest::test_capture_of_dump_calls): Convert "loc" to
2742 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
2743 verifying line numbers of dump emissions.
2744 * dumpfile.h (class dump_metadata_t): New class.
2745 (dump_printf): Convert 1st param from dump_flags_t to
2746 const dump_metadata_t &.
2747 (dump_printf_loc): Likewise; convert 2nd param from
2748 const dump_location_t & to const dump_user_location_t &.
2749 (dump_generic_expr_loc): Likewise.
2750 (dump_generic_expr): Convert 1st param from dump_flags_t to
2751 const dump_metadata_t &.
2752 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2753 const dump_location_t & to const dump_user_location_t &.
2754 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2755 const dump_metadata_t &.
2756 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2757 const dump_location_t & to const dump_user_location_t &.
2758 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2759 const dump_metadata_t &.
2760 (dump_symtab_node): Likewise.
2761 (dump_dec): Likewise.
2762 (dump_begin_scope): Split out 2nd param into user and impl
2763 locations.
2764 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
2765 location and impl_location, and capture the impl_location.
2766 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
2767 * loop-unroll.c (report_unroll): Update for changes to
2768 dump_printf_loc and dump_printf.
2769 * opt-problem.cc (opt_problem::opt_problem): Update for change to
2770 dump_loc.
2771 * optinfo-emit-json.cc
2772 (selftest::test_building_json_from_dump_calls): Convert "loc" from
2773 dump_location_t to dump_user_location_t.
2774 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
2775 dump_loc_immediate.
2776 * profile.c (compute_branch_probabilities): Update for change to
2777 dump_printf_loc.
2778 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
2779 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
2780 dump_printf_loc.
2781
2782 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2783
2784 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
2785 and check_effective_target_ptr_eq_long.
2786
2787 2018-11-27 Alan Modra <amodra@gmail.com>
2788
2789 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
2790 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
2791 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
2792 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
2793 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
2794 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
2795 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2796 (ASM_APP_ON, ASM_APP_OFF): Don't define.
2797 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2798 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2799 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2800 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
2801 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2802 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2803 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
2804 (GNU_USER_TARGET_CRTN): Redefine.
2805 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
2806 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
2807 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
2808 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
2809 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
2810 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
2811 (LINK_EH_SPEC): Don't define.
2812
2813 2018-11-26 Martin Sebor <msebor@redhat.com>
2814
2815 PR 87756
2816 * expr.c (string_constant): Handle top-level decls of all character
2817 types and subobjects of narrow character type.
2818
2819 2018-11-27 Alan Modra <amodra@gmail.com>
2820
2821 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
2822 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
2823 GNU_USER_TARGET_OS_CPP_BUILTINS.
2824 (RS6000_ABI_NAME): Define.
2825 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
2826 GNU_USER_TARGET_OS_CPP_BUILTINS.
2827 (MUSL_DYNAMIC_LINKER32): Undef before defining.
2828 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
2829 (CHOOSE_DYNAMIC_LINKER): Don't define.
2830 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
2831 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
2832 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
2833 not already defined.
2834 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
2835 TARGET_OS_CPP_BUILTINS.
2836
2837 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2838
2839 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
2840
2841 2018-11-26 Jakub Jelinek <jakub@redhat.com>
2842
2843 PR target/88195
2844 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
2845 and !TARGET_64BIT, return NULL_TREE.
2846
2847 PR c++/86900
2848 * dwarf2out.c (secname_for_decl): For functions with
2849 DECL_SECTION_NAME if in_cold_section_p, try to return
2850 current_function_section's name if it is a named section.
2851
2852 2018-11-26 Maya Rashish <coypu@sdf.org>
2853
2854 PR target/58397
2855 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
2856 * config/x-netbsd: New file.
2857 * config/host-netbsd: New file.
2858
2859 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2860
2861 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
2862 Clarify documentation for check_effective_target_size32plus.
2863
2864 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2865
2866 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
2867 and modify expand_strncmp_vec_sequence.
2868 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
2869 (generate_6432_conversion): New function.
2870 (expand_block_compare): Add support for vsx.
2871 (expand_block_compare_gpr): New function.
2872 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
2873 default limit to 63 because of more compact vsx code.
2874
2875 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
2876
2877 PR target/88178
2878 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
2879 for registers for which no debug information can be generated.
2880 Use INVALID_REGNUM for non-existent registers.
2881 (dbx64_register_map): Ditto.
2882 (svr4_dbx_register_map): Ditto.
2883
2884 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
2885
2886 PR c/57182
2887 * doc/invoke.texi (Optimize Options): Document that
2888 -freorder-functions also uses "hot" and "cold" attributes.
2889
2890 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2891
2892 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
2893
2894 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2895
2896 * config/arm/types.md (mul64): Rename to...
2897 (widen_mul64): ... This.
2898 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
2899 * config/arm/cortex-a15.md: Likewise.
2900 * config/arm/cortex-a5.md: Likewise.
2901 * config/arm/cortex-a53.md: Likewise.
2902 * config/arm/cortex-a57.md: Likewise.
2903 * config/arm/cortex-a7.md: Likewise.
2904 * config/arm/cortex-m4.md: Likewise.
2905 * config/arm/exynos-m1.md: Likewise.
2906 * config/arm/marvell-pj4.md: Likewise.
2907 * config/arm/xgene1.md: Likewise.
2908
2909 2018-11-26 Richard Biener <rguenther@suse.de>
2910
2911 PR tree-optimization/88182
2912 * tree-vect-loop.c (vectorizable_reduction): Pick up single
2913 correct reduc_def_info.
2914 * tree-vect-slp.c (vect_analyze_slp_instance): Set
2915 STMT_VINFO_REDUC_DEF of the first stmt.
2916
2917 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2918
2919 * doc/invoke.texi: Document z14/arch12 -march option.
2920
2921 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2922
2923 PR c/57166
2924 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
2925 (Warning Options): Likewise.
2926
2927 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2928
2929 PR web/79738
2930 * doc/extend.texi (Common Function Attributes): Clarify that
2931 functions with "const" attribute can read const global variables.
2932
2933 2018-11-26 Alan Modra <amodra@gmail.com>
2934
2935 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
2936
2937 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2938
2939 PR other/54265
2940 * doc/extend.texi (Common Variable Attributes): Use preferred
2941 placement of type attributes in examples, plus whitespace fixes.
2942 (Type Attributes): Clarify why placement of attributes
2943 immediately after struct/union/enum keyword is preferred.
2944 (Common Type Attributes): Use preferred placement of type
2945 attributes in examples, plus more whitespace fixes.
2946
2947 2018-11-25 Paul Koning <ni1d@arrl.net>
2948
2949 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
2950
2951 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2952
2953 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
2954 attributes): Document d_runtime.
2955
2956 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
2957
2958 PR bootstrap/88157
2959 * ira-costs.c (record_operand_costs): Initiate register move cost
2960 for mode.
2961
2962 2018-11-23 Jeff Law <law@redhat.com>
2963
2964 PR rtl-optimization/87468
2965 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
2966 EDGE_IGNORE on all outgoing edges of the duplicate block.
2967
2968 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
2969
2970 PR bootstrap/88157
2971 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
2972 its mode does not fit to the original class.
2973
2974 2018-11-23 Martin Sebor <msebor@redhat.com>
2975
2976 PR tree-optimization/87756
2977 * expr.c (string_constant): Synthesize a string literal from
2978 the address of a constant character.
2979 * tree.c (build_string_literal): Add an argument.
2980 * tree.h (build_string_literal): Same.
2981
2982 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2983
2984 * config/aarch64/aarch64-cores.def: Define emag.
2985 * config/aarch64/aarch64-tune.md: Regenerated with emag.
2986 * config/aarch64/aarch64.c (emag_tunings): New struct.
2987 * doc/invoke.texi: Document mtune value.
2988
2989 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2990 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2991
2992 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
2993 for GCC 9.
2994 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
2995 prefetch tunings.
2996 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
2997 costs.
2998 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
2999 for XGene1.
3000
3001 2018-11-23 Richard Biener <rguenther@suse.de>
3002
3003 PR tree-optimization/88149
3004 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
3005 the case where there are two different def types for the
3006 same operand at different operand position in the same stmt.
3007
3008 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
3009
3010 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
3011 gen_atomic_compare_swap_1.
3012 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
3013 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
3014 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
3015 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
3016 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
3017 checks.
3018 * config/arm/arm.md (neon_vext<mode>),
3019 (neon_vrev64<mode>, neon_vrev32<mode>),
3020 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
3021 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
3022 before the pattern name.
3023 * config/arm/sync.md:
3024 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
3025 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
3026
3027 2018-11-23 Jakub Jelinek <jakub@redhat.com>
3028
3029 PR tree-optimization/86614
3030 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
3031 if TREE_NO_WARNING is set on ref.ref.
3032
3033 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
3034 Alan Coopersmith <alan.coopersmith@oracle.com>
3035
3036 PR c/53608
3037 * doc/extend.texi (Designated Inits): Clarify handling of multiple
3038 initializers for unions.
3039
3040 2018-11-22 Jan Hubicka <jh@suse.cz>
3041
3042 PR lto/88142
3043 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
3044 parameters; do not warn here.
3045 (odr_subtypes_equivalent_p): Likewise.
3046 (warn_odr): Fix typo.
3047 (warn_types_mismatch): Do not output confused warnings on integer types.
3048 (odr_types_equivalent_p): Update.
3049
3050 2018-11-22 Jakub Jelinek <jakub@redhat.com>
3051
3052 * config/i386/i386.c (ix86_option_override_internal,
3053 ix86_can_inline_p, classify_argument, construct_container,
3054 ix86_expand_prologue, ix86_expand_split_stack_prologue,
3055 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
3056 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
3057 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
3058 Formatting fixes.
3059
3060 * config/i386/i386.c (ix86_option_override_internal): For
3061 stack_protector_guard related options, use opts_set->x_ instead
3062 of global_options_set. and prefix options with opts->x_ . Move
3063 defaults for offset and reg into else block.
3064
3065 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
3066
3067 * config/i386/i386.c (ix86_check_avx_upper_register):
3068 Return true for all SSE registers with mode bitsize > 128.
3069
3070 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
3071
3072 PR rtl-optimization/87718
3073 * ira-costs.c: Remove trailing white-spaces.
3074 (record_operand_costs): Add a special treatment for moves
3075 involving a hard register.
3076
3077 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
3078
3079 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
3080 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
3081
3082 2018-11-22 Martin Liska <mliska@suse.cz>
3083
3084 * common/config/i386/i386-common.c (processor_names): Add
3085 static assert and add missing "znver2".
3086 (ix86_get_valid_option_values): Add checking assert for null
3087 values and add "native" value if feasible.
3088 * config/i386/i386.h: Do not declare size of processor_names.
3089 * common/config/i386/i386-common.c:
3090 * config/i386/i386.c: Add static assert for size
3091 of processor_cost_table.
3092
3093 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3094
3095 * target-insns.def (stack_protect_combined_set): Define new standard
3096 pattern name.
3097 (stack_protect_combined_test): Likewise.
3098 * cfgexpand.c (stack_protect_prologue): Try new
3099 stack_protect_combined_set pattern first.
3100 * function.c (stack_protect_epilogue): Try new
3101 stack_protect_combined_test pattern first.
3102 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
3103 parameters to control which register to use as PIC register and force
3104 reloading PIC register respectively. Insert in the stream of insns if
3105 possible.
3106 (legitimize_pic_address): Expose above new parameters in prototype and
3107 adapt recursive calls accordingly. Use pic_reg if non null instead of
3108 cached one.
3109 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
3110 (arm_legitimize_address): Adapt to new legitimize_pic_address
3111 prototype.
3112 (thumb_legitimize_address): Likewise.
3113 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
3114 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
3115 (thumb1_expand_prologue): Likewise.
3116 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
3117 change.
3118 (arm_load_pic_register): Likewise.
3119 * config/arm/predicated.md (guard_addr_operand): New predicate.
3120 (guard_operand): New predicate.
3121 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
3122 prototype change.
3123 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
3124 prototype change.
3125 (stack_protect_combined_set): New expander..
3126 (stack_protect_combined_set_insn): New insn_and_split pattern.
3127 (stack_protect_set_insn): New insn pattern.
3128 (stack_protect_combined_test): New expander.
3129 (stack_protect_combined_test_insn): New insn_and_split pattern.
3130 (arm_stack_protect_test_insn): New insn pattern.
3131 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
3132 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
3133 (UNSPEC_SP_TEST): Likewise.
3134 * doc/md.texi (stack_protect_combined_set): Document new standard
3135 pattern name.
3136 (stack_protect_set): Clarify that the operand for guard's address is
3137 legal.
3138 (stack_protect_combined_test): Document new standard pattern name.
3139 (stack_protect_test): Clarify that the operand for guard's address is
3140 legal.
3141
3142 2018-11-22 Richard Biener <rguenther@suse.de>
3143
3144 PR tree-optimization/88148
3145 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
3146 valueization callback parameter and handle it.
3147 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
3148 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
3149
3150 2018-11-22 Richard Biener <rguenther@suse.de>
3151
3152 PR lto/87229
3153 PR lto/88112
3154 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
3155 which can appear in size expressions.
3156 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
3157 CALL_EXPR_BY_DESCRIPTOR.
3158 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
3159 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
3160 CALL_EXPR_BY_DESCRIPTOR.
3161 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
3162
3163 Revert
3164 PR lto/87229
3165 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3166 sizepos values.
3167
3168 2018-11-22 Richard Biener <rguenther@suse.de>
3169
3170 PR tree-optimization/88069
3171 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
3172 apply to default defs.
3173
3174 2018-11-22 Jakub Jelinek <jakub@redhat.com>
3175
3176 PR target/85644
3177 PR target/86832
3178 * config/i386/i386.c (ix86_option_override_internal): Default
3179 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
3180 is defined.
3181 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
3182 stack_protect_test, stack_protect_test_<mode>): Use empty condition
3183 instead of TARGET_SSP_TLS_GUARD.
3184
3185 2018-11-22 Martin Liska <mliska@suse.cz>
3186
3187 PR sanitizer/88017
3188 * config/i386/i386.c (ix86_option_override_internal): Error
3189 about usage -mabi=ms and -fsanitize=thread.
3190
3191 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3192
3193 Revert the revert:
3194 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
3195
3196 Revert:
3197 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
3198
3199 * lra-spills.c (lra_final_code_change): Remove useless move insns.
3200
3201 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3202
3203 PR middle-end/88129
3204 * function.c (expand_function_end): Do not emit extra blockage insn.
3205
3206 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
3207
3208 PR target/85667
3209 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
3210 of FIRST_SSE_REG for 4 or 8 byte modes.
3211
3212 2018-11-21 Jan Hubicka <jh@suse.cz>
3213
3214 PR lto/87957
3215 * tree.c (fld_decl_context): Break out from ...
3216 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
3217 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
3218 (fld_incomplete_type_of): Build copy of TYP_DECL.
3219 * ipa-devirt.c (free_enum_values): Rename to ...
3220 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
3221 and TREE_TYPEs of TYPE_DECLs.
3222 (get_odr_type): Initialize odr_vtable_hash if needed.
3223
3224 2018-11-21 Alexandre Oliva <oliva@adacore.com>
3225
3226 * final.c (compute_discriminator): Declare. Renamed from...
3227 (maybe_set_discriminator): ... this. Set and return a local.
3228 (override_discriminator): New.
3229 (final_scan_insn_1): Set it.
3230 (notice_source_line): Adjust. Always set discriminator.
3231
3232 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3233
3234 PR target/87839
3235 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
3236 rIJ constraint for aarch64_plus_operand rather than rn.
3237
3238 2018-11-21 Renlin Li <renlin.li@arm.com>
3239
3240 PR middle-end/84877
3241 * explow.h (get_dynamic_stack_size): Declare it as external.
3242 * explow.c (record_new_stack_level): Remove function static attribute.
3243 * function.c (assign_stack_local_1): Dynamically align the stack slot
3244 addr for parameter copy on the stack.
3245
3246 2018-11-21 Richard Biener <rguenther@suse.de>
3247
3248 PR bootstrap/88133
3249 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
3250 * Makefile.in (bitmap.o-warn): Remove again.
3251
3252 2018-11-20 Jeff Law <law@redhat.com>
3253
3254 PR tree-optimization/88069
3255 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
3256 degenerate virtual PHIs.
3257
3258 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3259
3260 PR target/87317
3261 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
3262 nonimmediate_operand with register_operand.
3263 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
3264 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
3265 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
3266 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
3267 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
3268 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
3269 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
3270 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
3271 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
3272 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
3273 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
3274 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
3275 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
3276 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
3277 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
3278 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
3279 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
3280 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
3281 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
3282 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
3283 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
3284 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
3285 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
3286 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
3287 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
3288 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
3289 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
3290
3291 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3292
3293 * read-rtl.c (apply_subst_iterator): Handle define_split and
3294 define_insn_and_split.
3295
3296 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3297
3298 PR rtl-optimization/87817
3299 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
3300 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
3301 in the pattern to avoid triggering UB when operands[2] is zero.
3302 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
3303 (*tbm_bextri_<mode>): ... this.
3304
3305 2018-11-21 Tom de Vries <tdevries@suse.de>
3306
3307 PR driver/79855
3308 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
3309 period.
3310
3311 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
3312
3313 * configure.ac: Add check for Binutils to determine whether vector
3314 load/store alignments hints are being supported.
3315 * config.in: Regenerate.
3316 * configure: Regenerate.
3317 * config/s390/s390.c (print_operand): Support new output
3318 modifier A.
3319 * config/s390/s390.md ("movti"): Append alignment hint output
3320 using the new output modifier 'A'.
3321 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
3322 ("*vec_ti_to_v1ti"): Likewise.
3323
3324 2018-11-20 Martin Sebor <msebor@redhat.com>
3325
3326 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
3327
3328 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3329
3330 PR lto/84044
3331 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
3332 compare ENUM values.
3333
3334 2018-11-20 Jakub Jelinek <jakub@redhat.com>
3335
3336 PR tree-optimization/87895
3337 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
3338 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
3339 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
3340 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
3341 has any preds and always use EDGE_PRED (, 0).
3342
3343 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
3344
3345 PR target/88070
3346 * mode-switching.c (create_pre_exit): After reload, always split the
3347 fallthrough edge to the exit block.
3348
3349 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3350
3351 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
3352 * tree.c (build_array_type_1): Forward declare.
3353 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
3354 (fld_type_variant): Likewise.
3355 (fld_simplified_types): New hash.
3356 (fld_process_array_type): New function.
3357 (fld_incomplete_type_of): Handle array and enumeration types.
3358 (fld_simplified_type): Handle simplification of arrays.
3359 (free_lang_data): Allocate and free simplified types hash.
3360
3361 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3362
3363 PR lto/87957
3364 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
3365 when sybtype already violates ODR.
3366 (get_odr_type): Do not ICE when insert is false and type duplicate
3367 is not registered yet.
3368 (register_odr_type): Be sure to register subtypes first.
3369
3370 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
3371
3372 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
3373 DImode parts of the target operand.
3374
3375 2018-11-20 Nathan Sidwell <nathan@acm.org>
3376
3377 PR 87926
3378 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
3379
3380 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3381
3382 PR lto/87997
3383 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
3384 type checking to...
3385 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
3386
3387 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3388
3389 PR ipa/87706
3390 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
3391 * ipa.c (possible_inline_candidate_p): Break out from ..
3392 (process_references): ... here ; drop before_inlining_p;
3393 cleanup handling of alises.
3394 (walk_polymorphic_call_targets): Likewise.
3395 (symbol_table::remove_unreachable_nodes): Likewise.
3396 * passes.c (pass_data_ipa_remove_symbols): New structure.
3397 (pass_ipa_remove_symbols): New pass.
3398 (make_pass_ipa_remove_symbols): New function.
3399 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
3400 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
3401
3402 2018-11-20 Richard Biener <rguenther@suse.de>
3403
3404 * tree-vect-stmts.c (vectorizable_condition): Do not get
3405 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
3406 pointless vect_is_simple_use calls.
3407
3408 2018-11-20 Richard Biener <rguenther@suse.de>
3409
3410 PR tree-optimization/88074
3411 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
3412 backedges.
3413
3414 2018-11-20 Richard Biener <rguenther@suse.de>
3415
3416 PR tree-optimization/88069
3417 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
3418 virtual PHI arguments.
3419
3420 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
3421
3422 PR target/88083
3423 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
3424 involved.
3425 * rtl.h (contains_constant_pool_address_p): New function.
3426 * rtlanal.c (contains_constant_pool_address_p): Likewise.
3427
3428 2018-11-20 Richard Biener <rguenther@suse.de>
3429
3430 PR middle-end/83215
3431 * alias.c (component_uses_parent_alias_set_from): Remove
3432 alias-set zero and TYPE_TYPELESS_STORAGE case both already
3433 handled in other ways.
3434
3435 2018-11-20 Richard Biener <rguenther@suse.de>
3436
3437 PR tree-optimization/88087
3438 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
3439 call fntype.
3440 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
3441 call fntype.
3442
3443 2018-11-20 Richard Biener <rguenther@suse.de>
3444
3445 PR middle-end/88089
3446 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
3447
3448 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
3449
3450 PR lto/87957
3451 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
3452
3453 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
3454
3455 PR driver/50250
3456 * doc/invoke.texi (Link Options): Mention shared libraries
3457 in documentation for the -l option. Simplify discussion and
3458 point to the system linker documentation for details.
3459
3460 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
3461
3462 PR rtl-optimization/88033
3463 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
3464 to itself. Use HARD_REGISTER_NUM_P.
3465
3466 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3467
3468 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
3469 of the loop if vf is non-constant.
3470
3471 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3472
3473 PR tree-optimization/87025
3474 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
3475 immediately after creating the scope optinfo.
3476 (selftest::test_pr87025): New function.
3477 (selftest::dumpfile_c_tests): Call it.
3478 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
3479 that we're not popping the top-level records array.
3480 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
3481 not changing the kind of a "scope" optinfo.
3482
3483 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3484
3485 PR tree-optimization/87025
3486 * dump-context.h: Include "optinfo.h".
3487 (class optrecord_json_writer): New forward decl.
3488 (dump_context::forcibly_enable_optinfo_p): Delete.
3489 (dump_context::optinfo_enabled_p): New member function.
3490 (dump_context::optimization_records_enabled_p): New member
3491 function.
3492 (dump_context::set_json_writer): New member function.
3493 (dump_context::emit_optinfo): New member function.
3494 (dump_context::m_forcibly_enable_optinfo): Delete.
3495 (dump_context::m_json_writer): New member data.
3496 * dumpfile.c (dump_context::set_json_writer): New member function.
3497 (dump_context::finish_any_json_writer): New member function.
3498 (dump_context::end_scope): Replace call to
3499 optimization_records_maybe_pop_dump_scope with call to
3500 m_json_writer->pop_scope.
3501 (dump_context::optinfo_enabled_p): New member function.
3502 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
3503 to dump_context::emit_optinfo.
3504 (dump_context::emit_optinfo): New member function.
3505 (temp_dump_context::temp_dump_context): Replace
3506 m_forcibly_enable_optinfo with call to set_json_writer.
3507 (temp_dump_context::~temp_dump_context): Clean up any json writer.
3508 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
3509 optinfo-emit-json.h
3510 (the_json_writer): Delete.
3511 (optimization_records_start): Delete.
3512 (optimization_records_finish): Delete.
3513 (optimization_records_enabled_p): Delete, in favor of
3514 dump_context::optimization_records_enabled_p.
3515 (optimization_records_maybe_record_optinfo): Delete.
3516 (optimization_records_maybe_pop_dump_scope): Delete.
3517 * optinfo-emit-json.h: Include "json.h". Delete forward
3518 decl of opt_pass.
3519 (optimization_records_start): Delete.
3520 (optimization_records_finish): Delete.
3521 (optimization_records_enabled_p): Delete.
3522 (optimization_records_maybe_record_optinfo): Delete.
3523 (optimization_records_maybe_pop_dump_scope): Delete.
3524 (class optrecord_json_writer): Move here from
3525 optinfo-emit-json.cc.
3526 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
3527 to optinfo::emit with call to dump_context::emit_optinfo.
3528 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3529 (optinfo_enabled_p): Delete, in favor of
3530 dump_context::optinfo_enabled_p.
3531 (optinfo_wants_inlining_info_p): Update for conversion o
3532 optimization_records_enabled_p to a member function of
3533 dump_context.
3534 * optinfo.h (optinfo_enabled_p): Delete, in favor of
3535 dump_context::optinfo_enabled_p.
3536 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3537 * toplev.c: Include "dump-context.h".
3538 (compile_file): Replace call to optimization_records_finish with
3539 dump_context::finish_any_json_writer.
3540 (do_compile): Replace call to optimization_records_start with
3541 conditionally creating a optrecord_json_writer for the
3542 dump_context.
3543
3544 2018-11-19 Jakub Jelinek <jakub@redhat.com>
3545
3546 PR tree-optimization/88071
3547 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
3548 of false as last argument to gsi_remove.
3549 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
3550 false as last argument to gsi_replace.
3551
3552 PR debug/87039
3553 * omp-expand.c: Don't include debug.h.
3554 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
3555 from innermost outer parallel, task, teams or target that has a
3556 child_fn set, or, if there is no such outer region, use
3557 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
3558 whether a suitable BLOCK is found or not.
3559 (expand_parallel_call, expand_teams_call): Don't call
3560 adjust_context_and_scope here.
3561 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
3562 (expand_omp_taskreg, expand_omp_target): Likewise. Call
3563 adjust_context_and_scope.
3564 * dwarf2out.c (dwarf2out_early_global_decl): For
3565 decl_function_context recurse instead of calling dwarf2out_decl.
3566
3567 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
3568
3569 PR rtl-optimization/85925
3570 * rtl.h (word_register_operation_p): New predicate.
3571 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
3572 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
3573 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
3574 (num_sign_bit_copies1): Likewise.
3575
3576 2018-11-19 Richard Biener <rguenther@suse.de>
3577
3578 PR lto/87229
3579 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3580 sizepos values.
3581
3582 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
3583
3584 * compare-elim.c (struct comparison): Add not_in_a field.
3585 (is_not): New static function.
3586 (strip_not): Likewise.
3587 (conforming_compare): Handle a NOT in the first operand.
3588 (can_eliminate_compare): Likewise.
3589 (find_comparison_dom_walker::before_dom_children): Likewise.
3590 (try_eliminate_compare): Likewise.
3591 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
3592 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
3593
3594 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
3595
3596 * doc/extend.texi (Common Type Attributes): Fix typos.
3597
3598 2018-11-19 Martin Liska <mliska@suse.cz>
3599
3600 PR gcov-profile/88045
3601 * coverage.c (coverage_begin_function): Add assert.
3602
3603 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
3604
3605 PR other/40498
3606 * doc/extend.texi (Common Function Attributes): Document that
3607 no_instrument_function applies to -p and -pg, too.
3608 * doc/invoke.texi (Instrumentation Options): Add cross-references
3609 to docs for -p, -pg, and -finstrument-functions.
3610
3611 2018-11-18 Alan Modra <amodra@gmail.com>
3612
3613 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
3614 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
3615 (GNU_USER_TARGET_CRTN): Define.
3616 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
3617 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
3618
3619 2018-11-18 Alan Modra <amodra@gmail.com>
3620
3621 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
3622 !HAVE_LD_PIE variant.
3623 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
3624
3625 2018-11-17 Nick Clifton <nickc@redhat.com>
3626 Sandra Loosemore <sandra@codesourcery.com>
3627
3628 PR driver/31357
3629 * doc/invoke.texi (Overall Options): Document that --help and
3630 --help=<value> options cannot be combined.
3631
3632 2018-11-17 Jim Wilson <jimw@sifive.com>
3633
3634 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
3635 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
3636 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
3637 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
3638 to step2 if frame_pointer_needed and step1 is 0.
3639
3640 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3641
3642 PR c++/4225
3643 * doc/cpp.texi (System Headers): Add note about implicit
3644 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
3645
3646 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3647
3648 PR c++/4025
3649 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
3650 -fno-implicit-templates.
3651
3652 2018-11-17 Jakub Jelinek <jakub@redhat.com>
3653
3654 PR tree-optimization/87546
3655 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
3656 min_precision variable, initially set it to orig_precision, only does
3657 something if op_type's precision is <= min_precision and update
3658 min_precision whenever calling set_op.
3659
3660 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
3661
3662 PR ipa/87957
3663 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
3664
3665 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3666
3667 * doc/invoke.texi (Option Summary): Fix whitespace and line
3668 breaks in @gccoptlist environments.
3669 (Warning Options): Likewise.
3670 (Optimize Options): Likewise.
3671 (PowerPC SPE Options): Likewise.
3672 (RS/6000 and PowerPC Options): Likewise.
3673
3674 2018-11-16 Jeff Law <law@redhat.com>
3675
3676 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
3677 gcc_assert.
3678
3679 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3680
3681 PR middle-end/23197
3682 * doc/invoke.texi (Optimize Options): Update options enabled by
3683 fprofile-generate, -fprofile-use, and -fauto-profile.
3684
3685 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3686
3687 PR target/87927
3688 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
3689 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
3690 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
3691 the byte_op hook.
3692 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
3693 * targhooks.c (default_print_patchable_function_entry): Assert
3694 asm_int_op does not return a NULL string.
3695 * varasm.c (integer_asm_op): Return the op for a partial int type
3696 when the requested size does not correspond to an integer type.
3697 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
3698 * doc/tm.texi: Regenerate.
3699
3700 2018-11-12 Jason Merrill <jason@redhat.com>
3701
3702 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
3703
3704 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
3705
3706 * config/rs6000/constraints.md (wF constraint): Remove power9
3707 fusion documentation. Just document wF's use for power8 fusion.
3708 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
3709 (fusion_gpr_addis): Delete power9 fusion support. Change power8
3710 fusion support to require the upper 12 bits to be all 0's or all
3711 1's.
3712 (fusion_gpr_mem_load): Add comment.
3713 (fusion_addis_mem_combo_load): Remove power9 fusion support.
3714 (fusion_addis_mem_combo_store): Delete.
3715 (fusion_offsettable_mem_operand): Delete.
3716 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
3717 power8 fusion here.
3718 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
3719 (POWERPC_MASKS): Delete power9 fusion.
3720 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
3721 (fusion_p9_p): Delete.
3722 (expand_fusion_p9_load): Delete.
3723 (expand_fusion_p9_store): Delete.
3724 (emit_fusion_p9_load): Delete.
3725 (emit_fusion_p9_store): Delete.
3726 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
3727 fusion support.
3728 (rs6000_option_override_internal): Set power8 fusion based on
3729 whether we are tuning for power8. Delete power9 fusion support.
3730 (rs6000_opt_masks): Delete -mpower9-fusion switch.
3731 (emit_fusion_load): Rename emit_fusion_load_store to
3732 emit_fusion_load, and drop fusion store support. Update callers.
3733 (emit_fusion_load_store): Likewise.
3734 (emit_fusion_gpr_load): Likewise.
3735 (fusion_p9_p): Delete.
3736 (expand_fusion_p9_load): Delete.
3737 (expand_fusion_p9_store): Delete.
3738 (emit_fusion_p9_load): Delete.
3739 (emit_fusion_p9_store): Delete.
3740 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
3741 (GPR_FUSION): Delete.
3742 (FPR_FUSION): Delete.
3743 (power9 fusion peephole2s): Delete.
3744 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
3745 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
3746 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
3747 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
3748 (fusion_p9_<mode>_constant): Delete.
3749 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
3750 power9 fusion switch.
3751 * doc/md.texi (PowerPC constraints): Update wF constraint
3752 documentation for power8 fusion only.
3753
3754 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3755
3756 PR rtl-optimization/87475
3757 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
3758 CROSSING_JUMP_P insns.
3759 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
3760
3761 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
3762
3763 PR target/88051
3764 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
3765 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
3766 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
3767
3768 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3769
3770 PR middle-end/88032
3771 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
3772 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
3773
3774 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
3775
3776 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
3777 location_t parameter.
3778 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3779 (switch_decision_tree::do_jump_if_equal): Likewise.
3780 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
3781 of switch statement to emit_case_nodes.
3782 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
3783 set it on the newly built GIMPLE comparison statement.
3784 (switch_decision_tree::do_jump_if_equal): Likewise.
3785 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
3786 in calls to do_jump_if_equal as well as recursive calls.
3787
3788 2018-11-16 Andi Kleen <ak@linux.intel.com>
3789
3790 * config/i386/i386.md: Allow memory operands to ptwrite.
3791
3792 2018-11-16 Michael Matz <matz@suse.de>
3793
3794 * system.h (PRsa): New macro.
3795 (SIZE_AMOUNT): Cast number to uint64_t.
3796 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
3797 (pool_usage::dump_footer): Likewise and also use PRIu64.
3798 * bitmap.h (bitmap_usage::dump): Likewise.
3799 * ggc-common.c (ggc_usage::dump): Likewise.
3800 * ggc-page.c (ggc_print_statistics): Likewise.
3801 * input.c (dump_line_table_statistics): Likewise.
3802 * mem-stats.h (mem_usage::dump): Likewise.
3803 (mem_usage::dump_footer): Likewise.
3804 * rtl.c (dump_rtx_statistics): Likewise.
3805 * tree-cfg.c (dump_cfg_stats): Likewise.
3806 * tree-dfa.c (dump_dfa_stats): Likewise.
3807 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3808 * tree-ssanames (ssanames_print_statistics): Likewise.
3809 * vec.c (vec_usage::dump): Likewise.
3810 (vec_usage::dump_footer): Likewise.
3811
3812 2018-11-16 Richard Biener <rguenther@suse.de>
3813
3814 PR tree-optimization/88011
3815 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
3816 replacing set_value_range_to_undefined and
3817 set_value_range_to_varying with method calls.
3818
3819 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
3820
3821 * config/s390/s390.md
3822 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
3823 assembler.
3824 (*r<noxa>sbg_<mode>_sll): Likewise.
3825 (*r<noxa>sbg_<mode>_srl): Likewise.
3826 (*r<noxa>sbg_sidi_srl): New pattern.
3827
3828 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
3829
3830 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
3831 Default to TARGET_VXWORKS_RTP.
3832 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3833 of TARGET_VXWORKS_RTP.
3834 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3835 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
3836
3837 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3838
3839 PR c++/25759
3840 * doc/extend.texi (Common Type Attributes): Make it explicit
3841 that attribute "packed" can apply to C++ classes.
3842
3843 2018-11-15 Martin Sebor <msebor@redhat.com>
3844
3845 PR c++/87541
3846 PR c++/87542
3847 * tree.c (type_argument_type): New function.
3848 * tree.h (type_argument_type): Declare it.
3849 * gcc/doc/extend.texi (alloc_align): Update and clarify.
3850 (alloc_size, nonnull, sentinel): Same.
3851
3852 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
3853 Kwok Cheung Yeung <kcy@codesourcery.com>
3854
3855 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
3856 int_mode_for_size fails.
3857 (vectorizable_load): Likewise.
3858
3859 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3860
3861 * doc/ux.texi (Group logically-related diagnostics): Move
3862 discussion of auto_diagnostic_group into this new subsection.
3863 Give an example of where this grouping is used.
3864
3865 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3866
3867 PR other/19165
3868 * Makefile.in (OBJS): Move json.o to...
3869 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
3870 * common.opt (fdiagnostics-format=): New option.
3871 (diagnostics_output_format): New enum.
3872 * diagnostic-format-json.cc: New file.
3873 * diagnostic.c (default_diagnostic_final_cb): New function, taken
3874 from start of diagnostic_finish.
3875 (diagnostic_initialize): Initialize final_cb to
3876 default_diagnostic_final_cb.
3877 (diagnostic_finish): Move "being treated as errors" messages to
3878 default_diagnostic_final_cb. Call any final_cb.
3879 (default_diagnostic_finalizer): Add diagnostic_t param.
3880 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
3881 diagnostic_finalizer callback.
3882 * diagnostic.h (enum diagnostics_output_format): New enum.
3883 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
3884 (struct diagnostic_context): Add "final_cb".
3885 (default_diagnostic_finalizer): Add diagnostic_t param.
3886 (diagnostic_output_format_init): New decl.
3887 * doc/invoke.texi (-fdiagnostics-format): New option.
3888 * dwarf2out.c (gen_producer_string): Ignore
3889 OPT_fdiagnostics_format_.
3890 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
3891 * lto-wrapper.c (append_diag_options): Ignore it.
3892 * opts.c (common_handle_option): Handle it.
3893
3894 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3895
3896 PR tree-optimization/88015
3897 * graphite-isl-ast-to-gimple.c
3898 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
3899 for dump_enabled_p.
3900 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
3901
3902 2018-11-15 Richard Biener <rguenther@suse.de>
3903
3904 PR middle-end/88029
3905 * gimple.c (gimple_call_flags): Union flags from decl, type
3906 and call fntype.
3907 * trans-mem.c (is_tm_pure_call): Simplify.
3908
3909 2018-11-15 Richard Biener <rguenther@suse.de>
3910
3911 PR tree-optimization/88031
3912 * tree-vect-loop.c (vectorizable_reduction): Move check
3913 for multiple types earlier so we get the expected dump.
3914 Simplify calls to vectorizable_condition.
3915 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
3916 * tree-vect-stmts.c (vectorizable_condition): Instead of
3917 reduc_def and reduc_index take just a flag. Simplify
3918 code-generation now that we can rely on the defs being set up.
3919 (vectorizable_comparison): Remove unused argument.
3920
3921 2018-11-15 Richard Biener <rguenther@suse.de>
3922
3923 PR tree-optimization/88030
3924 * tree-complex.c (need_eh_cleanup): New global.
3925 (update_complex_assignment): Mark blocks that need EH update.
3926 (expand_complex_comparison): Likewise.
3927 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
3928 perform EH cleanup and schedule CFG cleanup if that did anything.
3929
3930 2018-11-15 Jakub Jelinek <jakub@redhat.com>
3931
3932 PR rtl-optimization/88018
3933 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
3934 on the presence of fallthru edge, rather than if it is a USE or not.
3935
3936 2018-11-15 Richard Biener <rguenther@suse.de>
3937
3938 PR middle-end/87917
3939 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
3940 analyze_subscript_affine_affine properly.
3941
3942 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
3943
3944 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
3945 (GLIBC_DYNAMIC_LINKER): Define.
3946 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
3947
3948 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3949
3950 PR tree-optimization/84648
3951 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
3952 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
3953 by calling adjust_cond_for_loop_until_wrap.
3954
3955 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3956
3957 PR other/56334
3958 * doc/extend.texi (Common Function Attributes): Clarify linker
3959 restrictions on "aligned" attribute.
3960 (Common Variable Attributes): Likewise. Mention that linker
3961 restrictions don't apply to stack-allocated variables.
3962
3963 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
3964
3965 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
3966 as an lvalue.
3967
3968 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3969
3970 PR lto/55102
3971 PR lto/56700
3972 * doc/invoke.texi (Optimize Options): Remove bad example about
3973 interaction between -flto and -O. Replace it with a note that
3974 you need to compile with -O and not just link. Copy-edit -flto
3975 discussion to reduce verbiage and improve flow.
3976
3977 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3978
3979 PR middle-end/59658
3980 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
3981 also suppress many optimizations. Alphabetize option lists for
3982 -O1, -O2, and -Os. Add list of options disabled with -Og, and
3983 correct documentation for those options to say that.
3984 * opts.c (default_options_table): Sort table by level and option
3985 name, to make it easier to correlate to the manual.
3986
3987 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
3988
3989 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
3990 printing of the names of segment registers.
3991
3992 2018-11-14 Nathan Sidwell <nathan@acm.org>
3993
3994 PR debug/88006
3995 PR debug/87462
3996 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
3997 type list.
3998
3999 2018-11-14 David Malcolm <dmalcolm@redhat.com>
4000
4001 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
4002
4003 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4004
4005 P1236R1 - Signed integers are two's complement
4006 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
4007
4008 PR bootstrap/86739
4009 * hash-map.h (hash_map::iterator::reference_pair): New class.
4010 (hash_map::iterator::operator*): Return it rather than std::pair.
4011
4012 2018-11-14 Jeff Law <law@redhat.com>
4013
4014 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
4015 iff the operand is a constant.
4016
4017 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
4018
4019 * gimple-ssa-evrp-analyze.c
4020 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
4021 ignore_equivs_equal_p to equal_p.
4022 * ipa-cp.c (meet_with_1): Use equal_p instead of
4023 ignore_equivs_equal_p.
4024 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
4025 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
4026 (value_range::operator==): Remove.
4027 (value_range::operator!=): Remove.
4028 (vrp_prop::visit_stmt): Use equal_p.
4029 * tree-vrp.h (value_range): Remove operator==, operator!=,
4030 ignore_equivs_equal_p.
4031 * vr-values.c (update_value_range): Use equal_p.
4032
4033 2018-11-14 Michael Matz <matz@suse.de>
4034
4035 PR middle-end/86575
4036 * gimplify.c (collect_fallthrough_labels): Add new argument,
4037 return location via that, don't modify statements.
4038 (warn_implicit_fallthrough_r): Adjust call, don't use
4039 statement location directly.
4040
4041 2018-11-14 Richard Biener <rguenther@suse.de>
4042
4043 PR middle-end/87985
4044 * tree-data-ref.c (split_constant_offset): Add wrapper
4045 allocating a cache hash-map.
4046 (split_constant_offset_1): Cache results of expanding
4047 expressions from SSA def stmts.
4048
4049 2018-11-14 Richard Biener <rguenther@suse.de>
4050
4051 PR middle-end/88021
4052 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
4053 to lambda_int.
4054 (lambda_vector_mult_const): Likewise.
4055 (lambda_matrix_right_hermite): Use lambda_int temporaries.
4056
4057 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
4058 Jackson Woodruff <jackson.woodruff@arm.com>
4059
4060 PR 71026/tree-optimization
4061 * match.pd: Simplify floating point comparisons.
4062
4063 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4064
4065 PR rtl-optimization/87817
4066 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
4067 last argument has low 8 bits clear, fold to 0.
4068
4069 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
4070
4071 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
4072 MAX_OFILE_ALIGNMENT as needed.
4073
4074 2018-11-14 Richard Biener <rguenther@suse.de>
4075
4076 PR tree-optimization/88019
4077 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
4078 COND_EXPR arguments to non-trapping overflow.
4079
4080 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
4081
4082 * config/arc/arc.h (reg_class): Reorder registers classes, remove
4083 unused register classes.
4084 (REG_CLASS_NAMES): Likewise.
4085 (REG_CLASS_CONTENTS): Likewise.
4086 (FIXED_REGISTERS): Make lp_count fixed.
4087 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
4088 (PROGRAM_COUNTER_REGNO): Remove.
4089 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
4090 register classes, use constants for register numbers, remove
4091 reg_class_contents references.
4092 (arc_process_double_reg_moves): Add asserts.
4093 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
4094 lra_in_progress predicate.
4095 (arc_init_reg_tables): Remove unused register classes.
4096 (arc_register_move_cost): Likewise.
4097 (arc_preferred_reload_class): Likewise.
4098 (hwloop_optimize): Update rtx patterns involving lp_count register.
4099 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
4100 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
4101 CHEAP_CORE_REGS. Former one will be used for LRA.
4102 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
4103 one will be used for LRA.
4104 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
4105 one will be used for LRA.
4106 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
4107 Former one will be used for LRA.
4108 ("f"): Delete constraint.
4109 ("k"): Likewise.
4110 ("e"): Likewise.
4111 ("l"): Change it from register constraint to constraint.
4112 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
4113 (movhi_insn): Likewise.
4114 (movsi_insn): Update pattern.
4115 (arc_lp): Likewise.
4116 (dbnz): Likewise.
4117 (stack_tie): Remove 'b' constraint letter.
4118 (R4_REG): Define.
4119 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
4120 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
4121 (R57_REG, R59_REG, PCL_REG): Likewise.
4122 (ILINK1_REGNUM): Renamed to ILINK1_REG.
4123 (ILINK2_REGNUM): Renamed to ILINK2_REG.
4124 (Rgp): Remove.
4125 (SP_REGS): Likewise.
4126 (Rcw): Remove unused reg classes.
4127 * config/arc/predicates.md (dest_reg_operand): Just default on
4128 register_operand predicate.
4129 (mpy_dest_reg_operand): Likewise.
4130 (move_dest_operand): Use macros instead of constants.
4131 * config/arc/arc.opt (mlra): Switch to lra as default.
4132
4133 2018-11-14 Richard Biener <rguenther@suse.de>
4134
4135 PR tree-optimization/87974
4136 * tree-vect-loop.c (vectorizable_reduction): When computing
4137 the vectorized reduction PHI vector type ignore constant
4138 and external defs.
4139
4140 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4141
4142 PR tree-optimization/87977
4143 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
4144 stmt, build a new one and replace the old one with it. Formatting fix.
4145 Call release_ssa_name (x) if !has_other_use and !delete_div.
4146 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
4147 verify lhs of stmt is still def.
4148
4149 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
4150
4151 PR rtl-optimization/87507
4152 * lower-subreg.c (operand_for_swap_move_operator): New function.
4153 (simple_move): Strip simple operators.
4154 (find_pseudo_copy): Likewise.
4155 (resolve_operand_for_swap_move_operator): New function.
4156 (resolve_simple_move): Strip simple operators and swap operands.
4157
4158 2018-11-13 Jakub Jelinek <jakub@redhat.com>
4159
4160 PR tree-optimization/87898
4161 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
4162 (ipa_simd_modify_function_body): Remove debug stmts where the first
4163 argument was changed into a non-decl.
4164
4165 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
4166
4167 PR rtl-optimization/87899
4168 * lra-lives.c (start_living): Update white space in comment.
4169 (enum point_type): New.
4170 (sparseset_contains_pseudos_p): New function.
4171 (update_pseudo_point): Likewise.
4172 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
4173 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
4174 handling. Move early exit after adding conflicts.
4175 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
4176 if regno is already live. Remove all handling of program points.
4177 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
4178 after adding conflicts. Remove all handling of program points and
4179 ignore_reg_for_conflicts.
4180 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
4181 and do not guard call to mark_pseudo_live.
4182 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
4183 and do not guard call to mark_pseudo_dead.
4184 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
4185 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
4186 Use new function update_pseudo_point. Handle register copies by
4187 removing the source register from the live set. Handle INOUT operands.
4188 Update to the next program point using the unused_set, dead_set and
4189 start_dying sets.
4190 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
4191
4192 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4193
4194 * builtins.c: Replace "source_location" with "location_t".
4195 * diagnostic-show-locus.c: Likewise.
4196 * diagnostic.c: Likewise.
4197 * dumpfile.c: Likewise.
4198 * gcc-rich-location.h: Likewise.
4199 * genmatch.c: Likewise.
4200 * gimple.h: Likewise.
4201 * gimplify.c: Likewise.
4202 * input.c: Likewise.
4203 * input.h: Likewise. Eliminate the typedef.
4204 * omp-expand.c: Likewise.
4205 * selftest.h: Likewise.
4206 * substring-locations.h (get_source_location_for_substring):
4207 Rename to...
4208 (get_location_within_string): ...this.
4209 * tree-cfg.c: Replace "source_location" with "location_t".
4210 * tree-cfgcleanup.c: Likewise.
4211 * tree-diagnostic.c: Likewise.
4212 * tree-into-ssa.c: Likewise.
4213 * tree-outof-ssa.c: Likewise.
4214 * tree-parloops.c: Likewise.
4215 * tree-phinodes.c: Likewise.
4216 * tree-phinodes.h: Likewise.
4217 * tree-ssa-loop-ivopts.c: Likewise.
4218 * tree-ssa-loop-manip.c: Likewise.
4219 * tree-ssa-phiopt.c: Likewise.
4220 * tree-ssa-phiprop.c: Likewise.
4221 * tree-ssa-threadupdate.c: Likewise.
4222 * tree-ssa.c: Likewise.
4223 * tree-ssa.h: Likewise.
4224 * tree-vect-loop-manip.c: Likewise.
4225
4226 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
4227
4228 * doc/extend.texi: Fix typo in the weakref description.
4229
4230 2018-11-13 Richard Biener <rguenther@suse.de>
4231
4232 PR tree-optimization/86991
4233 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
4234 group building until we have successfully detected the SLP
4235 reduction.
4236 (vect_is_simple_reduction): Remove fixup code here.
4237
4238 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4239
4240 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
4241 (dump_gimple_stmt): Use it.
4242 (dump_gimple_stmt_loc): Likewise.
4243 (dump_gimple_expr): Likewise.
4244 (dump_gimple_expr_loc): Likewise.
4245 (dump_generic_expr): Likewise.
4246 (dump_generic_expr_loc): Likewise.
4247 (dump_printf): Likewise.
4248 (dump_printf_loc): Likewise.
4249 (dump_dec): Likewise.
4250 (dump_dec): Likewise.
4251 (dump_hex): Likewise.
4252 (dump_symtab_node): Likewise.
4253 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
4254 Guard dump call with dump_enabled_p.
4255 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
4256 * graphite-optimize-isl.c (optimize_isl): Likewise.
4257 * graphite.c (graphite_transform_loops): Likewise.
4258 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
4259 * tree-parloops.c (parallelize_loops): Likewise.
4260 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
4261 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
4262 (vect_prune_runtime_alias_test_list): Likewise.
4263 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
4264 (vect_estimate_min_profitable_iters): Likewise.
4265 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
4266 (vect_build_slp_tree_2): Likewise.
4267 (vect_supported_load_permutation_p): Likewise.
4268 (vect_slp_analyze_operations): Likewise.
4269 (vect_slp_analyze_bb_1): Likewise.
4270 (vect_slp_bb): Likewise.
4271 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
4272 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
4273 (pass_slp_vectorize::execute): Likewise.
4274 (increase_alignment): Likewise.
4275
4276 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4277
4278 PR ipa/87955
4279 * ipa-inline.c (report_inline_failed_reason): Guard calls to
4280 cl_target_option_print_diff and cl_optimization_print_diff with
4281 if (dump_file).
4282
4283 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4284
4285 * doc/invoke.texi (-fsave-optimization-record): Note that the
4286 output is compressed.
4287 * optinfo-emit-json.cc: Include <zlib.h>.
4288 (optrecord_json_writer::write): Compress the output.
4289
4290 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
4291
4292 * tree-vrp.c (value_range_base::dump): Dump type.
4293 Do not use INF nomenclature for 1-bit types.
4294 (dump_value_range): Group all variants to common dumping code.
4295 (debug): New overloaded functions for value_ranges.
4296 (value_range_base::dump): Remove no argument version.
4297 (value_range::dump): Same.
4298
4299 2018-11-13 Richard Biener <rguenther@suse.de>
4300
4301 PR tree-optimization/87931
4302 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
4303 nested cycles we support to latch computations vectorizable_reduction
4304 handles.
4305
4306 2018-11-13 Martin Liska <mliska@suse.cz>
4307
4308 PR tree-optimization/87885
4309 * cfghooks.c (account_profile_record): Rename
4310 to ...
4311 (profile_record_check_consistency): ... this.
4312 Calculate missing num_mismatched_freq_in.
4313 (profile_record_account_profile): New function
4314 that calculates time and size of a function.
4315 * cfghooks.h (struct profile_record): Remove
4316 all tuples.
4317 (struct cfg_hooks): Remove after_pass flag.
4318 (account_profile_record): Rename to ...
4319 (profile_record_check_consistency): ... this.
4320 (profile_record_account_profile): New.
4321 * cfgrtl.c (rtl_account_profile_record): Remove
4322 after_pass flag.
4323 * passes.c (check_profile_consistency): Do only
4324 checking.
4325 (account_profile): Calculate size and time of
4326 function only.
4327 (pass_manager::dump_profile_report): Reformat
4328 output.
4329 (execute_one_ipa_transform_pass): Call
4330 consistency check before clean upand call account_profile
4331 after a clean up is done.
4332 (execute_one_pass): Call check_profile_consistency and
4333 account_profile instead of using after_pass flag..
4334 * tree-cfg.c (gimple_account_profile_record): Likewise.
4335
4336 2018-11-13 Martin Liska <mliska@suse.cz>
4337
4338 PR sanitizer/87930
4339 * config/i386/i386.c (ix86_option_override_internal): Error
4340 about usage -mabi=ms and -fsanitize={,kernel-}address.
4341
4342 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
4343
4344 * config/aarch64/aarch64.c
4345 (aarch64_vectorize_preferred_vector_alignment): Change return type to
4346 poly_uint64.
4347 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
4348 alignment being a poly int.
4349 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
4350 return type to poly_uint64.
4351 * target.def (default_preferred_vector_alignment): Likewise.
4352 * targhooks.c (default_preferred_vector_alignment): Likewise.
4353 * targhooks.h (default_preferred_vector_alignment): Likewise.
4354 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
4355 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
4356 poly int.
4357 (vect_update_misalignment_for_peel): Likewise.
4358 (vect_enhance_data_refs_alignment): Likewise.
4359 (vect_find_same_alignment_drs): Likewise.
4360 (vect_duplicate_ssa_name_ptr_info): Likewise.
4361 (vect_setup_realignment): Likewise.
4362 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4363 poly_uint64.
4364 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
4365 mask with a compile time variable vector alignment.
4366 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
4367 int.
4368 (vect_do_peeling): Exit early if vector alignment is not constant.
4369 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
4370 a poly int.
4371 (vectorizable_store): Likewise.
4372 (vectorizable_load): Likweise.
4373 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
4374 poly_uint64.
4375 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
4376 poly int.
4377 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4378 poly_uint64.
4379
4380 2018-11-13 Richard Biener <rguenther@suse.de>
4381
4382 PR tree-optimization/87962
4383 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
4384 detect outer reduction for disqualifying in-loop uses.
4385
4386 2018-11-13 Richard Biener <rguenther@suse.de>
4387
4388 PR tree-optimization/87967
4389 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
4390 for constants for the scalar loop.
4391
4392 2018-11-13 Alan Modra <amodra@gmail.com>
4393
4394 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
4395 integer constants when -mcmodel=medium.
4396
4397 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4398
4399 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
4400 * config/arc/elf.h (PROFILE_HOOK): Define.
4401 * config/arc/linux.h (PROFILE_HOOK): Likewise.
4402
4403 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4404
4405 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
4406 jump table data in the text section.
4407
4408 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4409
4410 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
4411 to fit the eh_return pattern.
4412 * config/arc/arc.md (eh_return): Define.
4413 (VUNSPEC_ARC_EH_RETURN): Likewise.
4414 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
4415 new implementation.
4416 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
4417
4418
4419 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4420
4421 * common/config/arc/arc-common.c (arc_option_optimization_table):
4422 Millicode optimization is default on for size optimizations.
4423 * config/arc/arc-protos.h (arc_check_multi): New function.
4424 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
4425 (ENTER_LEAVE_START_REG): Define.
4426 (ENTER_LEAVE_END_REG): Likewise.
4427 (arc_override_options): Disable millicode when long calls option
4428 is on.
4429 (arc_frame_info): Change it from int to bool.
4430 (arc_compute_frame_size): Clean up.
4431 (arc_save_restore): Remove.
4432 (frame_save_reg): New function.
4433 (frame_restore_reg): Likewise.
4434 (arc_enter_leave_p): Likewise.
4435 (arc_save_callee_saves): Likewise.
4436 (arc_restore_callee_saves): Likewise.
4437 (arc_save_callee_enter): Likewise.
4438 (arc_restore_callee_leave): Likewise.
4439 (arc_save_callee_milli): Likewise.
4440 (arc_restore_callee_milli): Likewise.
4441 (arc_expand_prologue): Reimplement to emit enter/leave
4442 instructions.
4443 (arc_expand_epilogue): Likewise.
4444 (arc_check_multi): New function.
4445 * config/arc/arc.md (push_multi_fp): New pattern.
4446 (push_multi_fp_blink): Likewise.
4447 (pop_multi_fp): Likewise.
4448 (pop_multi_fp_blink): Likewise.
4449 (pop_multi_fp_ret): Likewise.
4450 (pop_multi_fp_blink_ret): Likewise.
4451 * config/arc/arc.opt (mmillicode): Update option.
4452 (mcode-density-frame): New option.
4453 * config/arc/predicates.md (push_multi_operand): New predicate.
4454 (pop_multi_operand): Likewise.
4455 * doc/invoke.texi (ARC): Update ARC options information.
4456
4457
4458 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4459
4460 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
4461 * config/arc/arc.c (operands_ok_ldd_std): New function.
4462 (mem_ok_for_ldd_std): Likewise.
4463 (gen_operands_ldd_std): Likewise.
4464 * config/arc/arc.md: Add peephole2 rules for std/ldd.
4465
4466 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
4467
4468 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
4469 test on stack_usage_file.
4470 (lang_dependent_init): Do not open the .su file if generating LTO.
4471
4472 2018-11-13 Jakub Jelinek <jakub@redhat.com>
4473
4474 PR rtl-optimization/87918
4475 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
4476 simplify_gen_relational rather than simplify_gen_binary.
4477
4478 2018-11-13 Richard Biener <rguenther@suse.de>
4479
4480 * tree-ssanames.h (set_range_info): Use value_range_base.
4481 (get_range_info): Likewise.
4482 * tree-ssanames.c (set_range_info): Likewise.
4483 (get_range_info): Likewise.
4484 * tree-vrp.c (value_range_base::union_helper): Split
4485 out common parts of value_range[_base]::union_.
4486 (value_range_base::union_): Update.
4487 (value_range::union_): Likewise.
4488 (determine_value_range_1): Use value_range_base.
4489 (determine_value_range): Likewise.
4490 * tree-vrp.h (value_range_base::union_helper): Move ...
4491 (value_range::union_helper): ... from here.
4492
4493 2018-11-13 Alan Modra <amodra@gmail.com>
4494
4495 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
4496 offset for PRE_DEC.
4497 (rs6000_secondary_reload_gpr): Don't call find_replacement.
4498
4499 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
4500
4501 PR middle-end/59634
4502 * doc/invoke.texi (Optimize Options): Clarify that the
4503 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
4504 apply to data cache size.
4505
4506 2018-11-13 Alan Modra <amodra@gmail.com>
4507
4508 * config/rs6000/predicates.md (logical_const_operand),
4509 (logical_operand): Correct comment.
4510 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
4511
4512 2018-11-13 Alan Modra <amodra@gmail.com>
4513
4514 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
4515
4516 2018-11-13 Alan Modra <amodra@gmail.com>
4517
4518 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
4519 description.
4520 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
4521 covered by alternative.
4522 (movcc_internal1): Ignore h for register preference.
4523 (mov<mode>_hardfloat64): Likewise.
4524 (mov<mode>_softfloat): Ignore c, l, h for register preference.
4525
4526 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4527
4528 PR preprocessor/47823
4529 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
4530 documentation to...
4531 (Pragmas): ...here.
4532 * doc/extend.texi (Pragmas): Note additional pragmas documented
4533 in the CPP manual.
4534
4535 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4536
4537 PR middle-end/86677
4538 PR middle-end/87528
4539 * tree-scalar-evolution.c (expression_expensive_p): Make
4540 BUILTIN POPCOUNT as expensive when backend does not define it.
4541
4542 2018-11-12 Fredrik Noring <noring@nocrew.org>
4543
4544 * config.gcc: Update with-llsc defaults for MIPS r5900.
4545
4546 2018-11-12 Martin Liska <mliska@suse.cz>
4547
4548 PR gcov-profile/87442
4549 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
4550 options.
4551 * doc/invoke.texi: Document them.
4552 * tree-profile.c (parse_profile_filter): New.
4553 (parse_profile_file_filtering): Likewise.
4554 (release_profile_file_filtering): Likewise.
4555 (include_source_file_for_profile): Likewise.
4556 (tree_profiling): Filter source files based on the
4557 newly added options.
4558
4559 2018-11-12 Martin Liska <mliska@suse.cz>
4560
4561 PR target/87903
4562 * doc/extend.texi: Add missing values for __builtin_cpu_is and
4563 __builtin_cpu_supports for x86 target.
4564
4565 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4566
4567 PR middle-end/21110
4568 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
4569 have to be Pmode.
4570 (Arithmetic): Likewise for "lo_sum".
4571
4572 2018-11-12 Renlin Li <renlin.li@arm.com>
4573
4574 PR target/87815
4575 * dse.c (get_stored_val): Add check for compile-time constantness
4576 of gap.
4577
4578 2018-11-12 Sudakshina Das <sudi.das@arm.com>
4579
4580 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
4581 (ARMv8_5a): New fgroup.
4582 (armv8.5-a): New arch.
4583 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
4584 sb and predres.
4585 * config/arm/arm-tables.opt: Regenerate.
4586 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
4587 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
4588 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
4589 Add matching rules for -march=armv8.5-a and extensions.
4590 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
4591 Add sb and predres to all armv8-a except armv8.5-a.
4592
4593 2018-11-12 Richard Biener <rguenther@suse.de>
4594
4595 * tree-vrp.h (value_range[_base]::set): Make public. Provide
4596 overload for single value.
4597 (value_range[_base]::set_nonnull): New.
4598 (value_range[_base]::set_null): Likewise.
4599 (value_range): Document bitmap copying behavior, mark
4600 copy constructor and assignment operator deleted.
4601 (value_range::move): New.
4602 (value_range::set_and_canonicalize): Default bitmap to zero.
4603 (set_value_range_to_nonnull): Remove.
4604 (set_value_range_to_null): Likewise.
4605 (set_value_range): Likewise.
4606 (set_value_range_to_value): Likewise.
4607 (extract_range_from_unary_expr): Work on value_range_base.
4608 (extract_range_from_binary_expr_1): Likewise. Rename to...
4609 (extract_range_from_binary_expr): ... this.
4610 * tree-vrp.c (value_range::update): Clear equiv bitmap
4611 if required.
4612 (value_range::move): New, move equiv bitmap.
4613 (value_range_base::set_undefined): Avoid assignment.
4614 (value_range::set_undefined): Likewise.
4615 (value_range_base::set_varying): Likewise.
4616 (value_range::set_varying): Likewise.
4617 (set_value_range): Remove.
4618 (value_range_base::set): New overload for value.
4619 (value_range::set): Likewise.
4620 (set_value_range_to_nonnull): Remove.
4621 (value_range_base::set_nonnull): New.
4622 (value_range::set_nonnull): Likewise.
4623 (set_value_range_to_null): Remove.
4624 (value_range_base::set_null): New.
4625 (value_range::set_null): Likewise.
4626 (range_is_null): Work on value_range_base.
4627 (range_is_nonnull): Likewise.
4628 (ranges_from_anti_range): Likewise.
4629 (extract_range_into_wide_ints): Likewise.
4630 (extract_range_from_multiplicative_op): Likewise.
4631 (extract_range_from_binary_expr): Likewise. Update for API changes.
4632 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
4633 handling.
4634 (value_range::intersect_helper): Avoid copy and assignment.
4635 (value_range::union_helper): Likewise.
4636 (determine_value_range_1): Adjust.
4637 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
4638 Avoid assignment by using move.
4639 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
4640 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4641 Likewise.
4642 * tree-ssanames.c (get_range_info): Likewise.
4643 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
4644 * vr-values.c (vr_values::get_value_range): Adjust.
4645 (vr_values::update_value_range): Likewise.
4646 (symbolic_range_based_on_p): Work on value_range_base.
4647 (vr_values::extract_range_from_binary_expr): Use value_range_base.
4648 (vr_values::extract_range_from_unary_expr): Likewise.
4649 (vr_values::extract_range_from_cond_expr): Avoid assignment.
4650 (vr_values::extract_range_from_comparison): Adjust.
4651 (vr_values::check_for_binary_op_overflow): Use value_range_base.
4652 (vr_values::extract_range_basic): Adjust.
4653 (vr_values::adjust_range_with_scev): Likewise.
4654 (vr_values::vrp_visit_assignment_or_call): Likewise.
4655 (vr_values::get_vr_for_comparison): Change API to avoid
4656 assignment and copy construction.
4657 (vr_values::compare_name_with_value): Adjust accordingly.
4658 (vr_values::compare_names): Likewise.
4659 (vr_values::extract_range_from_phi_node): Avoid assignment and
4660 bogus in-place modify of equiv bitmap.
4661 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
4662 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
4663 for extract_range_from_unary_expr API change.
4664 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
4665
4666 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
4667
4668 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
4669
4670 2018-11-12 Richard Biener <rguenther@suse.de>
4671
4672 * tree-vrp.h (value_range_base::symbolic_p,
4673 value_range_base::constant_p, value_range_base::zero_p,
4674 value_range_base::singleton_p): Move from value_range.
4675 (value_range::dump): Add.
4676 * gimple-ssa-evrp-analyze.c
4677 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
4678 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
4679 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4680 Use set_varying.
4681 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
4682 (value_range::constant_p): Likewise.
4683 (value_range::singleton_p): Likewise.
4684 (value_range_base::dump): Add.
4685 (set_value_range_to_undefined): Remove.
4686 (set_value_range_to_varying): Likewise.
4687 (range_int_cst_p): Take value_range_base argument.
4688 (range_int_cst_singleton_p): Likewise.
4689 (value_range_constant_singleton): Likewise.
4690 (vrp_set_zero_nonzero_bits): Likewise.
4691 (extract_range_from_multiplicative_op): Use set_varying.
4692 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
4693 (extract_range_from_unary_expr): Likewise.
4694 (dump_value_range_base): Change to overload of dump_value_range.
4695 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
4696 (vrp_prop::visit_stmt): Likewise.
4697 (value_range::intersect_helper): Likewise.
4698 (value_range::union_helper): Likewise.
4699 (determine_value_range_1): Likewise.
4700
4701 2018-11-12 Richard Biener <rguenther@suse.de>
4702
4703 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
4704 (set_value_range_to_null): Likewise.
4705 * vr-values.c (vr_values::extract_range_from_comparison):
4706 Clear equiv for constant singleton ranges.
4707
4708 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
4709
4710 * config/i386/sse.md: Combine VFIXUPIMM* patterns
4711 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4712 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4713 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
4714 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4715 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4716 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
4717
4718 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4719
4720 PR c/69502
4721 * doc/extend.texi (Common Type Attributes): For the align type
4722 attribute, copy language about decreasing alignment from the
4723 corresponding variable attribute.
4724
4725 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4726
4727 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
4728 -frounding-math.
4729
4730 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4731
4732 PR c++/43105
4733 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
4734 -frtti and -fno-rtti code.
4735
4736 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4737
4738 PR c/26366
4739 * doc/extend.texi (Other Builtins): Document probability associated
4740 with __builtin_expect.
4741
4742 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
4743
4744 PR target/87928
4745 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
4746 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
4747 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
4748 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
4749
4750 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4751
4752 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
4753
4754 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4755
4756 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
4757
4758 2018-11-11 Richard Biener <rguenther@suse.de>
4759
4760 * tree-vrp.h (class value_range_base): New base class for
4761 value_range containing all but the m_equiv member.
4762 (dump_value_range_base): Add.
4763 (range_includes_zero_p): Work on value_range_base.
4764 * tree-vrp.c (value_range_base::set): Split out base handling
4765 from...
4766 (value_range::set): this.
4767 (value_range::set_equiv): New.
4768 (value_range_base::value_range_base): New constructors.
4769 (value_range_base::check): Split out base handling from...
4770 (value_range::check): this.
4771 (value_range::equal_p): Refactor in terms of
4772 ignore_equivs_equal_p which is now member of the base.
4773 (value_range_base::set_undefined): New.
4774 (value_range_base::set_varying): Likewise.
4775 (value_range_base::dump):Split out base handling from...
4776 (value_range::dump): this.
4777 (value_range_base::set_and_canonicalize): Split out base handling
4778 from...
4779 (value_range::set_and_canonicalize): this.
4780 (value_range_base::union_): New.
4781 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
4782 for m_vr.
4783 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
4784 instead of value_range everywhere.
4785 (ipcp_vr_lattice::print): Use dump_value_range_base.
4786 (ipcp_vr_lattice::meet_with): Adjust.
4787 (ipcp_vr_lattice::meet_with_1): Likewise.
4788 (ipa_vr_operation_and_type_effects): Likewise.
4789 (propagate_vr_across_jump_function): Likewise.
4790 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
4791 (ipa_get_value_range): Likewise.
4792 (ipa_set_jfunc_vr): Likewise.
4793 (ipa_compute_jump_functions_for_edge): Likewise.
4794
4795 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
4796
4797 PR middle-end/65703
4798 * doc/invoke.texi (Optimize Options): Add @opindex entries
4799 for the positive forms of -fno-xxx and -mno-xxx options
4800 that were lacking them.
4801
4802 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
4803
4804 * combine.c (make_more_copies): Only make an intermediate copy if the
4805 dest of a move is a pseudo.
4806
4807 2018-11-09 Maya Rashish <coypu@sdf.org>
4808
4809 PR target/87221
4810 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
4811 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
4812
4813 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
4814
4815 PR driver/41179
4816 PR middle-end/65703
4817 * doc/invoke.texi (Optimize Options): Clarify default behavior
4818 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
4819
4820 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
4821
4822 PR tree-optimization/87940
4823 * expr.c (string_constant): Don't strip NOPS in subexpressions.
4824 Fold PLUS_EXPR correctly.
4825
4826 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
4827
4828 PR target/87762
4829 * config/s390/s390.c (s390_safe_relative_long_p): New function.
4830 (annotate_constant_pool_refs): Skip insns which support
4831 relative addressing.
4832 (annotate_constant_pool_refs_1): New helper function.
4833 (find_constant_pool_ref): Skip insns which support relative
4834 addression.
4835 (find_constant_pool_ref_1): New helper function.
4836 (replace_constant_pool_ref): Skip insns which support
4837 relative addressing.
4838 (replace_constant_pool_ref_1): New helper function.
4839 (s390_mainpool_start): Adapt to the new signature.
4840 (s390_mainpool_finish): Likewise.
4841 (s390_chunkify_start): Likewise.
4842 (s390_chunkify_finish): Likewise.
4843 (pass_s390_early_mach::execute): Likewise.
4844 (s390_prologue_plus_offset): Likewise.
4845 (s390_emit_prologue): Likewise.
4846 (s390_emit_epilogue): Likewise.
4847
4848 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4849
4850 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
4851 but unsupported lastprivate with conditional modifier.
4852
4853 2018-11-09 Jeff Law <law@redhat.com>
4854
4855 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
4856 unused argument better. Add gcc_unreachable to silence warning.
4857
4858 2018-11-09 Martin Sebor <msebor@redhat.com>
4859
4860 PR middle-end/81824
4861 * attribs.c (has_attribute): New helper function.
4862 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
4863 * attribs.h (decls_mismatched_attributes): Declare.
4864 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
4865 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
4866 * common.opt (-Wattribute-alias): Take an argument.
4867 (-Wno-attribute-alias): New option.
4868 * doc/extend.texi (Common Function Attributes): Document copy.
4869 (Common Variable Attributes): Same.
4870 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
4871 (-Wattribute-alias): Document new option argument.
4872
4873 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4874
4875 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
4876 matching criteria. Remove unused array initializer.
4877
4878 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
4879 Jinsong Ji <jji@us.ibm.com>
4880
4881 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
4882 constraints by introducing a new temporary.
4883 (_mm_cvtss_si64): Likewise.
4884
4885 2018-11-09 Martin Liska <mliska@suse.cz>
4886
4887 * common.opt: Add -fipa-stack-alignment flag.
4888 * doc/invoke.texi: Document it.
4889 * final.c (rest_of_clean_state): Guard stack
4890 shrinking with flag.
4891
4892 2018-11-09 Martin Liska <mliska@suse.cz>
4893
4894 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
4895 to ...
4896 (ipa_discover_variable_flags): ... this.
4897 * common.opt: Come up with new flag -fipa-reference-addressable.
4898 * doc/invoke.texi: Document it.
4899 * ipa-reference.c (propagate): Call the renamed fn.
4900 * ipa-visibility.c (whole_program_function_and_variable_visibility):
4901 Likewise.
4902 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
4903 ...
4904 (ipa_discover_variable_flags): ... this. Discover
4905 non-addressable variables only with the newly added flag.
4906 * opts.c: Enable the newly added flag with -O1 and higher
4907 optimization level.
4908
4909 2018-11-09 David Malcolm <dmalcolm@redhat.com>
4910
4911 * json.cc (selftest::test_writing_literals): Fix comment.
4912
4913 2018-11-09 Martin Liska <mliska@suse.cz>
4914
4915 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
4916 string to a stack buffer.
4917 (aarch64_parse_cpu): Likewise.
4918 (aarch64_parse_tune): Likewise.
4919
4920 2018-11-09 Richard Biener <rguenther@suse.de>
4921
4922 PR tree-optimization/87953
4923 * tree-vect-loop.c (vectorizable_reduction): For analysis
4924 always pass ops[0] to vectorizable_condition.
4925
4926 2018-11-09 Stafford Horne <shorne@gmail.com>
4927 Richard Henderson <rth@twiddle.net>
4928 Joel Sherrill <joel@rtems.org>
4929
4930 * common/config/or1k/or1k-common.c: New file.
4931 * config/or1k/*: New.
4932 * config.gcc (or1k*-*-*): New.
4933 * configure.ac (or1k*-*-*): New test for openrisc tls.
4934 * configure: Regenerated.
4935 * doc/install.texi: Document OpenRISC triplets.
4936 * doc/invoke.texi: Document OpenRISC arguments.
4937 * doc/md.texi: Document OpenRISC.
4938
4939 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4940
4941 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
4942 (arm7tdmi-s): Delete CPU.
4943 (arm710t): Add aliases for arm720t and arm740t.
4944 (arm720t, arm740t): Delete CPUs.
4945 (arm920t): Add aliases for arm920, arm922t and arm940t.
4946 (arm920, arm922t, arm940t): Delete CPUs.
4947 (arm10tdmi): Add alias for arm1020t.
4948 (arm1020t): Delete CPU.
4949 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
4950 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
4951 (arm10e): Add aliases for arm1020e and arm1022e.
4952 (arm1020e, arm1022e): Delete CPU.
4953 * config/arm/arm.md (generic_sched): Remove entries that are now
4954 handled by aliases.
4955 (generic_vfp): Likewise.
4956 * config/arm/arm1020e.md: Simplify tuning selection based on alias
4957 changes.
4958 * config/arm/arm-tune.md: Regenerated.
4959 * config/arm/arm-tables.opt: Regenerated.
4960
4961 2018-11-09 Richard Biener <rguenther@suse.de>
4962
4963 PR tree-optimization/87621
4964 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
4965 op with only phi inputs.
4966 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
4967 (ch_base::copy_headers): Run CSE on copied loop headers.
4968 (pass_ch_vect::process_loop_p): Simplify.
4969
4970 2018-11-09 Alexandre Oliva <oliva@adacore.com>
4971
4972 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
4973 for non-w64 x86_64 biarch.
4974
4975 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
4976
4977 PR rtl-optimization/86438
4978 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
4979 of in_b for the compare if in_b is SET_DEST.
4980
4981 PR target/87793
4982 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
4983 non-toplevel UNSPEC.
4984
4985 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4986
4987 * tree-vrp.c (value_range::check): Do not access internals
4988 directly.
4989 (value_range::singleton_p): Same.
4990 (value_range::type): Same.
4991 (vrp_finalize): Use value_range API.
4992
4993 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4994
4995 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
4996
4997 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4998
4999 * vr-values.c (vr_values::get_value_range): Use value_range API
5000 instead of piecing together ranges.
5001 (vr_values::update_value_range): Same.
5002
5003 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
5004
5005 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
5006 of performing ad-hoc calculations.
5007 * tree-ssanames.c (set_range_info): New overloaded function
5008 accepting value_range &.
5009 (get_range_info): Same.
5010 * tree-ssanames.h (set_range_info_raw): Remove.
5011 (set_range_info): New prototype.
5012 (get_range_info): Same.
5013 * tree-vrp.h (value_range::null_p): Rename to zero_p.
5014 * tree-vrp.c (value_range::null_p): Same.
5015
5016 2018-11-09 Jan Hubicka <jh@suse.cz>
5017
5018 * tree.c (fld_type_variant_equal_p): Test user align flag.
5019 (flt_type_variant): Copy user align flag.
5020 (fld_incomplete_type_of): Clear it.
5021
5022 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5023
5024 * config/arm/neon.md (div<mode>3): New pattern.
5025
5026 2018-11-08 Andi Kleen <ak@linux.intel.com>
5027
5028 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
5029 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
5030 (ix86_handle_option): Handle OPT_mptwrite.
5031 * config/i386/cpuid.h (bit_PTWRITE): Add.
5032 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
5033 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
5034 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
5035 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
5036 (ix86_option_override_internal): Handle PTA_PTWRITE.
5037 (ix86_valid_target_attribute_inner_p): Define ptwrite.
5038 (def_builtin2): Force UINT64 to be 64bit only.
5039 * config/i386/i386.h (TARGET_PTWRITE): Add.
5040 (TARGET_PTWRITE_P): Add.
5041 (PTA_PTWRITE): Add.
5042 * config/i386/i386.md: Define ptwrite.
5043 * config/i386/i386.opt: Add -mptwrite.
5044 * config/i386/immintrin.h (_ptwrite64): Add.
5045 (_ptwrite32): Add
5046 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
5047 * doc/invoke.texi: Document -mptwrite.
5048
5049 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
5050
5051 PR rtl-optimization/87600
5052 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
5053 * lra-constraints.c (process_alt_operands): Skip illegal hard
5054 register usage. Prefer reloading non hard register operands.
5055
5056 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
5057
5058 PR other/36572
5059 * doc/invoke.texi (Optimize Options): Clarify default behavior
5060 for -fno-sched-interblock and -fno-sched-spec.
5061
5062 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
5063
5064 * collect2.c (linker_select): Add USE_LLD_LD.
5065 (ld_suffixes): Add ld.lld.
5066 (main): Handle -fuse-ld=lld.
5067 * common.opt (-fuse-ld=lld): New option.
5068 * doc/invoke.texi (-fuse-ld=lld): Document.
5069 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
5070
5071 2018-11-08 Paul Koning <ni1d@arrl.net>
5072
5073 * config/pdp11/constraints.md: Add "Z" series constraints for use
5074 with pre-dec and post-inc addressing.
5075 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
5076 (pdp11_expand_operands): Add int argument (word count).
5077 (pdp11_sp_frame_offset): Delete.
5078 (pdp11_cmp_length): New function.
5079 (pushpop_regeq): New function.
5080 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
5081 Add hook.
5082 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
5083 frame layout.
5084 (pdp11_initial_elimination_offset): Ditto.
5085 (pdp11_expand_operands): Add word count argument. Bugfixes.
5086 (output_move_multiple): Change how pointer adjustment is done.
5087 (pdp11_gen_int_label): Correct format.
5088 (output_ascii): Ditto.
5089 (pdp11_asm_output_var): Add code for DEC assembler case.
5090 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
5091 value.
5092 (legitimate_const_double_p): Ditto.
5093 (pdp11_register_move_cost): Adjust for new register classes.
5094 (pdp11_regno_reg_class): Ditto.
5095 (expand_block_move): Delete.
5096 (pushpop_regeq): New function.
5097 (pdp11_legitimate_address_p): Bugfix in check for constant
5098 offset.
5099 (pdp11_sp_frame_offset): Delete.
5100 (pdp11_reg_save_size): New helper function for new frame layout.
5101 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
5102 (pdp11_expand_shift): Bugfix in check for constant shift count.
5103 (pdp11_shift_length): Ditto.
5104 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
5105 (pdp11_cmp_length): New function.
5106 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
5107 some compile options.
5108 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
5109 (CALL_USED_REGISTERS): Ditto.
5110 (ELIMINABLE_REGS): Ditto.
5111 (REGISTER_NAMES): Ditto.
5112 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
5113 constraints.
5114 (REG_CLASS_NAMES): Ditto.
5115 (REG_CLASS_CONTENTS): Ditto. Also remove
5116 HARD_FRAME_POINTER_REGNUM.
5117 (CPU_REG_CLASS): New macro.
5118 (CLASS_MAX_NREGS): Adjust for new register classes.
5119 (FUNCTION_PROFILER): Make no-op.
5120 (may_call_alloca): Remove unused declaration.
5121 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
5122 (ASM_OUTPUT_SKIP): Fix format.
5123 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
5124 (HARD_FRAME_POINTER_REGNUM): Remove.
5125 (return): Delete.
5126 (*rts): Rename. Remove epilogue related checks.
5127 (cmpsi, cmpdi): New insn.
5128 (cbranch<mode>4): Change to apply to SI and DI modes as well.
5129 (mov<mode>): Change constraints to enforce that push/pop
5130 destination cannot use the same register as source.
5131 (*mov<mode><cc_cc>): Ditto.
5132 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
5133 at assembly output rather than as RTL expander.
5134 (zero_extendqihi2): Bugfix in check for same registers.
5135 (adddi3_nocc): Bugfix in check for constant operand.
5136 (addsi3_nocc): Ditto.
5137 (subdi3_nocc): Ditto.
5138 (subsi3_nocc): Ditto.
5139 (negdi2_nocc): Copy input to pdp11_expand_operands.
5140 (negsi2_nocc): Ditto.
5141 (bswap2_nocc): Ditto.
5142 * config/pdp11/pdp11.opt (mlra): Fix documentation.
5143 * config/pdp11/t-pdp11: Use -Os.
5144
5145 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
5146
5147 * config/arm/parsecpu.awk (/alias/): New parsing rule.
5148 (/begin cpu/): Check that the cpu name hasn't been previously defined.
5149 (gen_comm_data): Print out CPU alias tables.
5150 (check_cpu): Match aliases when checking the CPU name.
5151 * config/arm/arm-protos.h (cpu_alias): New structure.
5152 (cpu_option): Add entry for aliases.
5153 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
5154 strongarm1100 and strongarm1110.
5155 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
5156 (config/arm/arm-generic.md): Remove redundant references to
5157 strongarm110, strongarm1100 and strongarm1110.
5158 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
5159 Scan aliases for additional hints.
5160 (arm_parse_cpu_option_name): Also match a cpu name against the list
5161 of aliases.
5162 * config/arm/arm-tables.opt: Regenerated.
5163 * config/arm/arm-tune.md: Regenerated.
5164
5165 2018-11-08 Jakub Jelinek <jakub@redhat.com>
5166
5167 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
5168 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
5169 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5170 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
5171 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5172 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
5173 * gengtype.c (open_base_files): Add omp-general.h.
5174 * gimple.c (gimple_build_omp_critical):
5175 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
5176 gimple_omp_taskgroup_set_clauses.
5177 (gimple_build_omp_atomic_load): Add mo argument, call
5178 gimple_omp_atomic_set_memory_order.
5179 (gimple_build_omp_atomic_store): Likewise.
5180 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
5181 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
5182 instead of GSS_OMP.
5183 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
5184 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
5185 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
5186 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
5187 different value for GF_OMP_ATOMIC_NEED_VALUE.
5188 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
5189 comments.
5190 (struct gimple_statement_omp_single_layout): And remove here.
5191 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
5192 than gimple_statement_omp_single_layout.
5193 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
5194 GIMPLE_OMP_TEAMS.
5195 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
5196 (gimple_omp_subcode): Formatting fix.
5197 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
5198 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
5199 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
5200 gimple_omp_teams_host, gimple_omp_teams_set_host,
5201 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
5202 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
5203 gimple_omp_taskgroup_set_clauses): New inline functions.
5204 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
5205 (gimple_build_omp_atomic_store): Likewise.
5206 (gimple_omp_atomic_seq_cst_p): Remove.
5207 (gimple_omp_atomic_memory_order): New function.
5208 (gimple_omp_atomic_set_seq_cst): Remove.
5209 (gimple_omp_atomic_set_memory_order): New function.
5210 (gimple_build_omp_taskgroup): Add clauses argument.
5211 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
5212 (dump_gimple_omp_task): Print taskwait with depend clauses.
5213 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
5214 dump_omp_atomic_memory_order.
5215 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
5216 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
5217 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
5218 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
5219 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
5220 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
5221 ORT_UNTIED_TASKLOOP enumerators.
5222 (enum gimplify_defaultmap_kind): New.
5223 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
5224 target_map_pointers_as_0len_arrays members, add defaultmap.
5225 (new_omp_context): Initialize defaultmap member.
5226 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5227 (maybe_fold_stmt): Don't fold even in host teams regions.
5228 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
5229 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
5230 ctx->omp_firstprivatize_variable.
5231 (omp_add_variable): Don't add private/firstprivate for VLAs in
5232 ORT_TASKGROUP.
5233 (omp_default_clause): Print "taskloop" rather than "task" if
5234 ORT_*TASKLOOP.
5235 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5236 Handle new defaultmap clause kinds.
5237 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
5238 iterator to be lastprivate or private. Fix up diagnostics if linear
5239 is used on collapse>1 simd iterator.
5240 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5241 (gimplify_omp_depend): New function.
5242 (gimplify_scan_omp_clauses): Add shared clause on parallel for
5243 combined parallel master taskloop{, simd} if taskloop has
5244 firstprivate, lastprivate or reduction clause. Handle
5245 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
5246 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
5247 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
5248 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
5249 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
5250 lastprivate.
5251 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
5252 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
5253 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
5254 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5255 (gimplify_omp_task): Handle taskwait with depend clauses.
5256 (gimplify_omp_for): Add shared clause on parallel for combined
5257 parallel master taskloop{, simd} if taskloop has firstprivate,
5258 lastprivate or reduction clause. Use ORT_TASKLOOP or
5259 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
5260 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
5261 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
5262 __for_end and __for_range temporaries on OMP_PARALLEL for
5263 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
5264 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
5265 sandwiched in between two taskloops.
5266 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
5267 instead of ctx->omp_firstprivatize_variable.
5268 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
5269 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
5270 host teams, use gimplify_and_return_first etc. for body like
5271 for target or target data constructs, and at the end call
5272 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
5273 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
5274 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
5275 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
5276 gimple_omp_atomic_set_seq_cst calls.
5277 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
5278 case, handle taskgroup clauses.
5279 * lto-streamer-out.c (hash_tree): Handle
5280 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5281 * Makefile.in (GTFILES): Add omp-general.h.
5282 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
5283 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
5284 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
5285 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
5286 BUILT_IN_GOMP_LOOP_DOACROSS_START,
5287 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
5288 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5289 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
5290 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
5291 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
5292 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
5293 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
5294 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5295 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
5296 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
5297 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
5298 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
5299 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
5300 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
5301 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
5302 * omp-expand.c (workshare_safe_to_combine_p): Return false for
5303 non-worksharing loops.
5304 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
5305 (determine_parallel_type): Don't combine parallel with worksharing
5306 which has _reductemp_ clause.
5307 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
5308 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
5309 if there is nonmonotonic modifier or if there is no modifier and no
5310 ordered clause. For dynamic and guided schedule without monotonic
5311 and nonmonotonic modifier, default to nonmonotonic.
5312 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
5313 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
5314 task reductions.
5315 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
5316 there are any reduction clauses.
5317 (expand_taskwait_call): New function.
5318 (expand_teams_call): New function.
5319 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
5320 expand_teams_call for it. Formatting fix. Handle taskwait with
5321 depend clauses.
5322 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
5323 of worksharing loops with task reductions.
5324 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
5325 expansion of worksharing loops with task reductions.
5326 (expand_omp_sections): Handle expansion of sections with task
5327 reductions.
5328 (expand_omp_synch): For host teams call expand_omp_taskreg.
5329 (omp_memory_order_to_memmodel): New function.
5330 (expand_omp_atomic_load, expand_omp_atomic_store,
5331 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
5332 instead of gimple_omp_atomic_seq_cst_p.
5333 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
5334 depend clauses as a standalone directive.
5335 * omp-general.c (enum omp_requires): New variable.
5336 (omp_extract_for_data): Initialize have_reductemp member. Allow
5337 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
5338 GT_EXPR loops depending on incr sign. Formatting fixes.
5339 * omp-general.h (struct omp_for_data): Add have_reductemp member.
5340 (enum omp_requires): New enum.
5341 (omp_requires_mask): Declare.
5342 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
5343 Fix comment typos.
5344 * omp-low.c (struct omp_context): Add task_reductions and
5345 task_reduction_map fields.
5346 (is_host_teams_ctx): New function.
5347 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
5348 (use_pointer_for_field): Use is_global_var instead of
5349 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
5350 in outer contexts.
5351 (build_outer_var_ref): Ignore taskgroup outer contexts.
5352 (delete_omp_context): Release task_reductions and task_reduction_map.
5353 (scan_sharing_clauses): Don't add any fields for reduction clause on
5354 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
5355 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
5356 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
5357 Handle OMP_CLAUSE_NONTEMPORAL.
5358 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
5359 needed.
5360 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
5361 clauses with task modifier.
5362 (scan_omp_task): Handle taskwait with depend clauses.
5363 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
5364 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
5365 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
5366 (scan_omp_for): Fix comment formatting.
5367 (scan_omp_teams): Handle host teams constructs.
5368 (check_omp_nesting_restrictions): Allow teams with no outer
5369 OpenMP context. Adjust diagnostics for teams strictly nested into
5370 some explicit OpenMP construct other than target. Allow OpenMP atomics
5371 inside of simd regions.
5372 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
5373 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
5374 taskreg_nesting_level while scanning host teams construct.
5375 (task_reduction_read): New function.
5376 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
5377 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
5378 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
5379 second argument create_tmp_var if it is NULL. Don't ignore shared
5380 clauses in is_host_teams_ctx contexts. Handle
5381 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
5382 clauses.
5383 (lower_reduction_clauses): Ignore reduction clauses with task
5384 modifier. Remove second argument create_tmp_var if it is NULL.
5385 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
5386 (lower_send_clauses): Ignore reduction clauses with task modifier.
5387 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
5388 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
5389 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
5390 rely that it is the last stmt in body so far. Ignore outer taskgroup
5391 contexts.
5392 (omp_task_reductions_find_first, omp_task_reduction_iterate,
5393 lower_omp_task_reductions): New functions.
5394 (lower_omp_sections): Handle reduction clauses with taskgroup
5395 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
5396 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
5397 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
5398 modifiers.
5399 (lower_omp_taskgroup): Handle taskgroup reductions.
5400 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
5401 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
5402 (lower_depend_clauses): If there are any
5403 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5404 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
5405 seen, assume lowering is done already and return early. Set kind
5406 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
5407 (lower_omp_taskreg): Handle reduction clauses with task modifier on
5408 parallel construct. Handle reduction clause on taskloop construct.
5409 Handle taskwait with depend clauses.
5410 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
5411 for host teams constructs.
5412 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
5413 nontemporal and _reductemp_ clause entries.
5414 (omp_clause_code_name): Likewise.
5415 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
5416 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
5417 * tree-core.h (enum omp_clause_code): Add
5418 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
5419 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
5420 (struct tree_base): Add omp_atomic_memory_order field into union.
5421 Remove OMP_ATOMIC_SEQ_CST comment.
5422 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5423 and OMP_CLAUSE_DEPEND_DEPOBJ.
5424 (struct tree_omp_clause): Add subcode.defaultmap_kind.
5425 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
5426 OpenMP constructs with body and clauses operands.
5427 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
5428 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
5429 (OMP_TASKGROUP_CLAUSES): Define.
5430 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
5431 OMP_CLAUSE__LOOPTEMP_.
5432 (OMP_ATOMIC_SEQ_CST): Remove.
5433 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
5434 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
5435 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
5436 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
5437 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
5438 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
5439 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
5440 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
5441 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
5442 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
5443 Define.
5444 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
5445 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5446 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
5447 (convert_local_omp_clauses): Likewise. Remove useless test.
5448 * tree-parloops.c (create_call_for_reduction_1): Pass
5449 OMP_MEMORY_ORDER_RELAXED as new argument to
5450 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
5451 * tree-pretty-print.c (dump_omp_iterators): New function.
5452 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
5453 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
5454 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
5455 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
5456 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
5457 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
5458 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
5459 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
5460 (dump_omp_atomic_memory_order): New function.
5461 (dump_generic_node): Use it. Print taskgroup clauses. Print
5462 taskwait with depend clauses.
5463 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
5464 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
5465 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
5466 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
5467 write_ts_omp_clause_tree_pointers): Likewise.
5468
5469 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5470
5471 PR ipa/86395
5472 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
5473 "-missed", "-note", and "-all" sub-options.
5474 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
5475 API.
5476 (can_early_inline_edge_p): Likewise.
5477 (want_early_inline_function_p): Likewise.
5478 (want_inline_self_recursive_call_p): Likewise.
5479 (recursive_inlining): Likewise.
5480 (inline_small_functions): Likewise.
5481 (flatten_function): Likewise.
5482 (ipa_inline): Likewise.
5483 (inline_always_inline_functions): Likewise.
5484 (early_inline_small_functions): Likewise.
5485 (early_inliner): Likewise.
5486 * tree-inline.c (expand_call_inline): Likewise.
5487
5488 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5489
5490 * pretty-print.c (pp_format): Handle %f.
5491 (selftest::test_pp_format): Add test of %f.
5492 * pretty-print.h (pp_double): New macro.
5493
5494 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5495
5496 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
5497 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
5498 (dump_pretty_printer::decode_format): Implement "%C" for
5499 cgraph_node *.
5500 (selftest::test_capture_of_dump_calls): Rename "where" to
5501 "stmt_loc". Convert test_decl to a function decl and set its
5502 location. Add a symbol_table_test RAII instance and a
5503 cgraph_node, using it to test "%C" and dump_symtab_node.
5504
5505 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
5506
5507 PR middle-end/87916
5508 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
5509
5510 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5511
5512 * cgraph.c: Include "selftest.h".
5513 (saved_symtab): New variable.
5514 (selftest::symbol_table_test::symbol_table_test): New ctor.
5515 (selftest::symbol_table_test::~symbol_table_test): New dtor.
5516 (selftest::test_symbol_table_test): New test.
5517 (selftest::cgraph_c_tests): New.
5518 * cgraph.h (saved_symtab): New decl.
5519 (selftest::symbol_table_test): New class.
5520 * selftest-run-tests.c (selftest::run_tests): Call
5521 selftest::cgraph_c_tests.
5522 * selftest.h (selftest::cgraph_c_tests): New decl.
5523
5524 2018-11-08 Richard Biener <rguenther@suse.de>
5525
5526 * tree-data-ref.h (lambda_int): New typedef.
5527 (lambda_vector_gcd): Adjust.
5528 (lambda_vector_new): Likewise.
5529 (lambda_matrix_new): Likewise.
5530 * tree-data-ref.c (print_lambda_vector): Adjust.
5531
5532 2018-11-08 Richard Biener <rguenther@suse.de>
5533
5534 PR tree-optimization/87929
5535 * tree-complex.c (expand_complex_comparison): Clean EH.
5536
5537 2018-11-08 Martin Liska <mliska@suse.cz>
5538
5539 * doc/extend.texi: Reword.
5540 * predict.c (expr_expected_value_1): Likewise.
5541
5542 2018-11-08 Richard Biener <rguenther@suse.de>
5543
5544 PR tree-optimization/87913
5545 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
5546 of extreme values to ordered comparisons.
5547
5548 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5549
5550 PR middle-end/42726
5551 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
5552
5553 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5554
5555 * doc/invoke.texi: Remove leading dash from @opindex entries
5556 throughout the file.
5557
5558 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5559
5560 PR driver/80828
5561 * doc/invoke.texi (Option Summary): Add -e and --entry.
5562 (Link Options): Likewise.
5563
5564 2018-11-07 Nathan Sidwell <nathan@acm.org>
5565
5566 PR 87926
5567 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
5568 --disable-checking bootstrap.
5569
5570 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
5571
5572 * configure: Regenerated.
5573
5574 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5575
5576 PR c/87691
5577 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
5578 to the mode of the widest field iff the widest field has mode class
5579 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
5580 reference.
5581
5582 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
5583
5584 * common.opt: Add -Wattribute-warning.
5585 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
5586 * expr.c (expand_expr_real_1): Add new attribute to warning_at
5587 call to allow user configure behavior of "warning" attribute.
5588
5589 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
5590
5591 * target.def: Put @: after every vs., e.g., and i.e. where it is
5592 followed by whitespace.
5593 * doc/extend.texi: Ditto.
5594 * doc/fragments.texi: Ditto.
5595 * doc/gimple.texi: Ditto.
5596 * doc/implement-c.texi: Ditto.
5597 * doc/install.texi: Ditto.
5598 * doc/invoke.texi: Ditto.
5599 * doc/md.texi: Ditto.
5600 * doc/plugins.texi: Ditto.
5601 * doc/rtl.texi: Ditto.
5602 * doc/sourcebuild.texi: Ditto.
5603 * doc/tm.texi.in: Ditto.
5604 * doc/ux.texi: Ditto.
5605 * doc/tm.texi: Regenerate.
5606
5607 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5608
5609 * config/arm/arm-cpus.in (ares): New entry.
5610 * config/arm/arm-tables.opt: Regenerate.
5611 * config/arm/arm-tune.md: Likewise.
5612 * doc/invoke.texi (ARM Options): Document ares.
5613
5614 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5615
5616 * config/aarch64/aarch64-cores.def (ares): Define.
5617 * config/aarch64/aarch64-tune.md: Regenerate.
5618 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
5619
5620 2018-11-07 Jan Hubicka <jh@suse.cz>
5621
5622 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
5623 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
5624 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
5625 TYPE_DECL.
5626
5627 2018-11-07 Richard Biener <rguenther@suse.de>
5628
5629 PR tree-optimization/87914
5630 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
5631 of nested cycles.
5632 (vectorizable_reduction): Handle shifts and rotates by dispatching
5633 to vectorizable_shift.
5634 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
5635 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
5636 def cases.
5637 (vectorizable_shift): Export and handle being called as
5638 vect_nested_cycle.
5639 (vect_analyze_stmt): Call vectorizable_shift after
5640 vectorizable_reduction.
5641 * tree-vectorizer.h (vectorizable_shift): Declare.
5642
5643 2018-11-07 Jan Hubicka <jh@suse.cz>
5644
5645 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
5646 than const decls in TREE_VALUE of enum.
5647 (dump_type_inheritance_graph): Improve duplicate dumping.
5648 (free_enum_values): New.
5649 (build_type_inheritance_graph): Use it.
5650 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
5651 which are not main variants or not ODR types.
5652 (verify_type_variant): Expect variants to have no TYPE_VALUES.
5653
5654 2018-11-07 Richard Biener <rguenther@suse.de>
5655
5656 * ipa-inline.c (want_inline_small_function_p): Compute
5657 big_speedup_p lazily and last.
5658
5659 2018-11-07 Jan Hubicka <jh@suse.cz>
5660
5661 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
5662 building incomplete variant of complete type.
5663 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
5664 variant of complete type.
5665
5666 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5667
5668 * config/mips/mips.c: Fix typo in documentation of
5669 mips_loongson_ext2_prefetch_cookie.
5670 (mips_option_override): fix brain twister logical.
5671 * config/mips/mips.h: Fix typo in documentation of
5672 ISA_HAS_CTZ_CTO and define pattern.
5673 * config/mips/mips.md (prefetch): Hoist EXT2 above
5674 the 2EF/EXT block.
5675 (prefetch_indexed): Hoist EXT2 above the EXT block.
5676
5677 2018-11-07 Jan Hubicka <jh@suse.cz>
5678
5679 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
5680 return and parameter types of function and method types.
5681 (free_lang_data_in_cgraph): Update.
5682
5683 2018-11-07 Martin Liska <mliska@suse.cz>
5684
5685 PR rtl-optimization/87868
5686 * postreload-gcse.c (eliminate_partially_redundant_load): Set
5687 threshold to max_count if we would overflow.
5688 * profile-count.h: Make max_count a public constant.
5689
5690 2018-11-07 Martin Liska <mliska@suse.cz>
5691
5692 * mem-stats.h: Fix GNU coding style.
5693
5694 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5695
5696 * config/mips/gs264e.md: New.
5697 * config/mips/mips-cpus.def: Define gs264e.
5698 * config/mips/mips-tables.opt: Regenerate.
5699 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5700 gs264e.
5701 (mips_issue_rate): Add support for gs264e.
5702 (mips_multipass_dfa_lookahead): Likewise.
5703 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
5704 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
5705 (MIPS_ASE_MSA_SPEC): New.
5706 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
5707 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
5708 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
5709 * config/mips/mips.md: Include gs264e.md.
5710 (processor): Add gs264e.
5711 * config/mips/mips.opt (MSA): Use Mask instead of Var.
5712 * doc/invoke.texi: Add gs264e to supported architectures.
5713
5714 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5715
5716 * config/mips/gs464e.md: New.
5717 * config/mips/mips-cpus.def: Define gs464e.
5718 * config/mips/mips-tables.opt: Regenerate.
5719 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5720 gs464e.
5721 (mips_issue_rate): Add support for gs464e.
5722 (mips_multipass_dfa_lookahead): Likewise.
5723 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
5724 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
5725 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
5726 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
5727 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
5728 * config/mips/mips.md: Include gs464e.md.
5729 (processor): Add gs464e.
5730 * doc/invoke.texi: Add gs464e to supported architectures.
5731
5732 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5733
5734 * config/mips/loongson3a.md: Rename to ...
5735 * config/mips/gs464.md: ... here.
5736 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
5737 as an alias of gs464 processor.
5738 * config/mips/mips-tables.opt: Regenerate.
5739 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
5740 instead of PROCESSOR_LOONGSON_3A.
5741 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
5742 TUNE_LOONGSON_3A.
5743 (mips_option_override): Enable MMI and EXT for gs464.
5744 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
5745 Rename TUNE_LOONGSON_3A to TUNE_GS464.
5746 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
5747 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
5748 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
5749 TARGET_LOONGSON_3A.
5750 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
5751 (processor): Add gs464;
5752 * doc/invoke.texi: Add gs464 to supported architectures.
5753
5754 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5755
5756 * config/mips/mips-protos.h
5757 (mips_loongson_ext2_prefetch_cookie): New prototype.
5758 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
5759 (mips_option_override): Enable TARGET_LOONGSON_EXT when
5760 TARGET_LOONGSON_EXT2 is true.
5761 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
5762 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
5763 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
5764 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
5765 TARGET_LOONGSON_EXT2.
5766 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
5767 (define_insn "ctz<mode>2"): New insn pattern.
5768 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
5769 (define_insn "prefetch_indexed_<mode>"): Include
5770 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
5771 * config/mips/mips.opt (-mloongson-ext2): Add option.
5772 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
5773
5774 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5775
5776 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
5777 __mips_loongson_ext.
5778 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
5779 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
5780 -mloongson-ext.
5781 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
5782 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
5783 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
5784 instead of TARGET_LOONGSON_3A.
5785 * config/mips/mips.opt (-mloongson-ext): Add option.
5786 * gcc/doc/invoke.texi (-mloongson-ext): Document.
5787
5788 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5789
5790 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
5791 * config/mips/loongson.md: Move to ...
5792 * config/mips/loongson-mmi.md: here; Adjustment.
5793 * config/mips/loongson.h: Move to ...
5794 State as deprecated. Include loongson-mmiintrin.h for back
5795 compatibility and warning.
5796 * config/mips/loongson-mmiintrin.h: ... here.
5797 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
5798 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
5799 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5800 (mips_option_override): Make sure MMI use hard float;
5801 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
5802 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
5803 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
5804 TARGET_LOONGSON_VECTORS.
5805 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
5806 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
5807 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
5808 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
5809 -mloongson-mmi.
5810 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
5811 TARGET_LOONGSON_VECTORS.
5812 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
5813 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5814 (Loongson MMI patterns): Include loongson-mmi.md instead of
5815 loongson.md.
5816 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
5817 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
5818
5819 2018-11-07 Richard Biener <rguenther@suse.de>
5820
5821 PR lto/87906
5822 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
5823 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
5824
5825 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
5826
5827 PR rtl-optimization/87874
5828 * lra.c (lra_substitute_pseudo): Do not create a subreg for
5829 const wide ints.
5830
5831 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
5832
5833 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
5834 if not in indexed or indirect form.
5835 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
5836 (bswap<mode>2_store): Ditto.
5837
5838 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
5839
5840 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
5841 the UNSPEC.
5842
5843 2018-11-06 Richard Biener <rguenther@suse.de>
5844
5845 PR tree-optimization/86850
5846 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
5847 instead of src.m_vec.
5848
5849 2018-11-06 Jan Hubicka <jh@suse.cz>
5850
5851 * tree.c (fld_simplified_type_name): Break out form ...
5852 (free_lang_data_in_type): ... here.
5853 (fld_type_variant_equal_p): Use it.
5854
5855 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5856
5857 * config/default-d.c: Include memmodel.h.
5858
5859 * config/sol2-d.c: New file.
5860 * config/t-sol2 (sol2-d.o): New rule.
5861 * config.gcc <*-*-solaris2*>: Set d_target_objs,
5862 target_has_targetdm.
5863
5864 2018-11-06 Jan Hubicka <jh@suse.cz>
5865
5866 * tree.c (fld_type_variant): Also copy alignment; be sure that
5867 new variant is equal.
5868
5869 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
5870
5871 PR target/87762
5872 * config/s390/s390.md: Add relative_long attribute.
5873
5874 2018-11-06 Jan Hubicka <jh@suse.cz>
5875
5876 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
5877 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
5878 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
5879 stream TYPE_NEEDS_CONSTRUCTING.
5880 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
5881 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
5882
5883 2018-11-06 Richard Biener <rguenther@suse.de>
5884
5885 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
5886 dump-scope ...
5887 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
5888
5889 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5890
5891 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
5892 REG_CLASS_CONTENTS[GEN_REGS].
5893 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
5894
5895 2018-11-06 Jan Hubicka <jh@suse.cz>
5896
5897 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
5898
5899 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5900
5901 PR sanitizer/80953
5902 * config/sol2.h (ASAN_CC1_SPEC): Define.
5903 (LD_WHOLE_ARCHIVE_OPTION): Define.
5904 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
5905 (ASAN_REJECT_SPEC): Provide default.
5906 (LIBASAN_EARLY_SPEC): Define.
5907 (LIBTSAN_EARLY_SPEC): Define.
5908 (LIBLSAN_EARLY_SPEC): Define.
5909 * config/i386/sol2.h (CC1_SPEC): Redefine.
5910 (ASAN_REJECT_SPEC): Define.
5911
5912 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
5913 (TARGET_ASAN_SHADOW_OFFSET): Define.
5914 (sparc_asan_shadow_offset): New function.
5915 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
5916 (ASAN_REJECT_SPEC): Define.
5917
5918 2018-11-06 Jan Hubicka <jh@suse.cz>
5919
5920 * tree.c (fld_type_variant): Copy canonical type.
5921 (fld_incomplete_type_of): Check that canonical types looks sane;
5922 copy canonical type.
5923 (verify_type): Accept when incomplete type has complete canonical type.
5924
5925 2018-11-06 Jan Hubicka <jh@suse.cz>
5926
5927 * tree.c (free_lang_data): Reset overwite_assembler_name,
5928 print_xnode, print_decl, print_type and print_identifier of
5929 langhooks.
5930
5931 2018-11-06 Richard Biener <rguenther@suse.de>
5932
5933 PR tree-optimization/87889
5934 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
5935 Do nothing if old and new arg are the same
5936
5937 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
5938
5939 PR target/87723
5940 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
5941 attributes for operands 3 and 4.
5942
5943 2018-11-06 Richard Biener <rguenther@suse.de>
5944
5945 PR middle-end/18041
5946 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
5947 matching bitfield insertion.
5948
5949 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
5950
5951 * auto-inc-dec.c: Include valtrack.h. Improve comments.
5952 (reg_next_debug_use): New.
5953 (attempt_change): Propagate adjusted expression into affected
5954 debug insns.
5955 (merge_in_block): Track uses in debug insns.
5956 (pass_inc_dec::execute): Allocate and release
5957 reg_next_debug_use.
5958
5959 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
5960
5961 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
5962 (_mm512_fixupimm_round_pd): Update parameters and builtin.
5963 (_mm512_maskz_fixupimm_round_pd): Ditto.
5964 (_mm512_fixupimm_round_ps): Ditto.
5965 (_mm512_maskz_fixupimm_round_ps): Ditto.
5966 (_mm_fixupimm_round_sd): Ditto.
5967 (_mm_maskz_fixupimm_round_sd): Ditto.
5968 (_mm_fixupimm_round_ss): Ditto.
5969 (_mm_maskz_fixupimm_round_ss): Ditto.
5970 (_mm512_fixupimm_pd): Ditto.
5971 (_mm512_maskz_fixupimm_pd): Ditto.
5972 (_mm512_fixupimm_ps): Ditto.
5973 (_mm512_maskz_fixupimm_ps): Ditto.
5974 (_mm_fixupimm_sd): Ditto.
5975 (_mm_maskz_fixupimm_sd): Ditto.
5976 (_mm_fixupimm_ss): Ditto.
5977 (_mm_maskz_fixupimm_ss): Ditto.
5978 (_mm512_mask_fixupimm_round_pd): Update builtin.
5979 (_mm512_mask_fixupimm_round_ps): Ditto.
5980 (_mm_mask_fixupimm_round_sd): Ditto.
5981 (_mm_mask_fixupimm_round_ss): Ditto.
5982 (_mm512_mask_fixupimm_pd): Ditto.
5983 (_mm512_mask_fixupimm_ps): Ditto.
5984 (_mm_mask_fixupimm_sd): Ditto.
5985 (_mm_mask_fixupimm_ss): Ditto.
5986 * config/i386/avx512vlintrin.h:
5987 (_mm256_fixupimm_pd): Update parameters and builtin.
5988 (_mm256_maskz_fixupimm_pd): Ditto.
5989 (_mm256_fixupimm_ps): Ditto.
5990 (_mm256_maskz_fixupimm_ps): Ditto.
5991 (_mm_fixupimm_pd): Ditto.
5992 (_mm_maskz_fixupimm_pd): Ditto.
5993 (_mm_fixupimm_ps): Ditto.
5994 (_mm_maskz_fixupimm_ps): Ditto.
5995 (_mm256_mask_fixupimm_pd): Update builtin.
5996 (_mm256_mask_fixupimm_ps): Ditto.
5997 (_mm_mask_fixupimm_pd): Ditto.
5998 (_mm_mask_fixupimm_ps): Ditto.
5999 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
6000 * config/i386/i386-builtin.def: Update builtin definitions.
6001 * config/i386/i386.c: Handle new builtin types and remove useless ones.
6002 * config/i386/sse.md: Update VFIXUPIMM* patterns.
6003 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
6004 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
6005 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
6006 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
6007 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
6008 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
6009 * config/i386/subst.md:
6010 (round_saeonly_sd_mask_operand4): Add new subst_attr.
6011 (round_saeonly_sd_mask_op4): Ditto.
6012 (round_saeonly_expand_operand5): Ditto.
6013 (round_saeonly_expand): Update.
6014
6015 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
6016
6017 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
6018
6019 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
6020
6021 PR rtl-optimization/87871
6022 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
6023
6024 2018-11-05 Paul Koning <ni1d@arrl.net>
6025
6026 * doc/sourcebuild.texi (target attributes): Document new "inf"
6027 effective target keyword.
6028
6029 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
6030
6031 * config/s390/s390.c (s390_register_move_cost): Increase costs for
6032 moves involving the CC reg.
6033
6034 2018-11-05 Richard Biener <rguenther@suse.de>
6035
6036 PR tree-optimization/87873
6037 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
6038 argument.
6039 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
6040 * tree-vect-loop.c (vect_transform_loop): When splitting the
6041 loop exit also create forwarder PHIs for constants.
6042 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
6043 Handle constant to_arg, add extra checking we match up the correct
6044 PHIs.
6045
6046 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
6047
6048 * config/s390/s390.md: QImode and HImode for load on condition.
6049
6050 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
6051
6052 * config/s390/predicates.md: Fix typo.
6053 * config/s390/s390.md: Allow immediates for load on condition.
6054
6055 2018-11-05 Martin Liska <mliska@suse.cz>
6056
6057 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
6058 * bitmap.h (struct bitmap_usage): Likewise.
6059 * ggc-common.c (SCALE): Remove.
6060 (LABEL): Likewise.
6061 (struct ggc_usage): Use SIZE_AMOUNT. And update
6062 compare method.
6063 * ggc-page.c (SCALE): Remove.
6064 (STAT_LABEL): Remove.
6065 (ggc_print_statistics): Use SIZE_AMOUNT.
6066 * gimple.h (SCALE): Remove.
6067 (LABEL): Likewise.
6068 * input.c (ONE_K): Remove.
6069 (ONE_M): Likewise.
6070 (SCALE): Likewise.
6071 (STAT_LABEL): Likewise.
6072 (FORMAT_AMOUNT): Likewise.
6073 (dump_line_table_statistics): Use SIZE_AMOUNT.
6074 * mem-stats.h (struct mem_usage): Likewise.
6075 * rtl.c (dump_rtx_statistics): Likewise.
6076 (rtx_alloc_counts): Change type to size_t.
6077 (rtx_alloc_sizes): Likewise.
6078 (rtx_count_cmp): New.
6079 (dump_rtx_statistics): Sort first based on counts.
6080 * tree.c (tree_nodes_cmp): New.
6081 (tree_codes_cmp): New.
6082 (dump_tree_statistics): Sort first based on counts.
6083 * system.h (ONE_K): New.
6084 (ONE_M): Likewise.
6085 (SIZE_SCALE): Likewise.
6086 (SIZE_LABEL): Likewise.
6087 (SIZE_AMOUNT): Likewise.
6088 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
6089 * tree-dfa.c (dump_dfa_stats): Likewise.
6090 * tree-phinodes.c (phinodes_print_statistics): Likewise.
6091 * tree-ssanames.c (ssanames_print_statistics): Likewise.
6092 * tree.c (dump_tree_statistics): Likewise.
6093 * vec.c (struct vec_usage): Likewise.
6094 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
6095 trigger a -Werror=format-overflow with
6096 --enable-gather-detailed-stats.
6097
6098 2018-11-05 Martin Liska <mliska@suse.cz>
6099
6100 * mem-stats.h (mem_alloc_description::release_instance_overhead):
6101 Return T *.
6102 * vec.c (struct vec_usage): Register m_element_size.
6103 (vec_prefix::register_overhead): New arguments: elements and
6104 element_size.
6105 (vec_prefix::release_overhead): Subtract elements.
6106 * vec.h (struct vec_prefix): Change signature.
6107 (va_heap::reserve): Pass proper arguments.
6108 (va_heap::release): Likewise.
6109
6110 2018-11-05 Martin Liska <mliska@suse.cz>
6111
6112 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
6113 style.
6114 * vec.c: Likewise.
6115
6116 2018-11-05 Richard Biener <rguenther@suse.de>
6117
6118 * tree-scalar-evolution.h (final_value_replacement_loop): Update
6119 prototype.
6120 * tree-scalar-evolution.c (final_value_replacement_loop): Return
6121 whether anything was done.
6122 (scev_const_prop): Remove constant propagation part, fold
6123 remains into ...
6124 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
6125 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
6126 conditionally.
6127
6128 2018-11-05 Jakub Jelinek <jakub@redhat.com>
6129
6130 PR tree-optimization/87859
6131 * gimple-ssa-store-merging.c (struct merged_store_group): Add
6132 only_constants and first_nonmergeable_order members.
6133 (merged_store_group::merged_store_group): Initialize them.
6134 (merged_store_group::do_merge): Clear only_constants member if
6135 adding something other than INTEGER_CST store.
6136 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
6137 stores with order >= first_nonmergeable_order. Use
6138 merged_store->only_constants instead of always recomputing it.
6139 Set merged_store->first_nonmergeable_order if we've skipped any
6140 stores. Attempt to merge overlapping INTEGER_CST stores that
6141 we would otherwise skip.
6142
6143 PR sanitizer/87837
6144 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
6145
6146 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
6147
6148 PR target/87853
6149 * config/i386/emmintrin.h (__v16qs): New to cope with option
6150 -funsigned-char.
6151 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
6152 (_mm_cmplt_epi8): Likewise.
6153 (_mm_cmpgt_epi8): Likewise.
6154
6155 2018-11-05 Richard Biener <rguenther@suse.de>
6156
6157 PR rtl-optimization/87852
6158 * fwprop.c (use_killed_between): Only consider single-defs of the
6159 use whose definition statement dominates the use.
6160
6161 2018-11-05 Martin Liska <mliska@suse.cz>
6162
6163 PR web/87829
6164 * doc/invoke.texi: Remove options that are
6165 not disabled with -Os.
6166
6167 2018-11-05 Martin Liska <mliska@suse.cz>
6168
6169 PR c/87811
6170 * doc/extend.texi: Update constrain about the last argument
6171 of __builtin_expect_with_probability.
6172
6173 2018-11-05 Martin Liska <mliska@suse.cz>
6174
6175 PR c/87811
6176 * predict.c (expr_expected_value_1): Verify
6177 that last argument is a real constants and emit
6178 error.
6179
6180 2018-11-05 Martin Liska <mliska@suse.cz>
6181
6182 PR gcov-profile/77698
6183 * ipa-profile.c (ipa_profile): Adjust hotness threshold
6184 only in LTO mode.
6185
6186 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6187
6188 PR tree-optimization/86572
6189 * builtins.c (c_strlen): Handle negative offsets in a safe way.
6190
6191 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6192
6193 PR tree-optimization/87672
6194 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
6195 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
6196
6197 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
6198
6199 PR middle-end/58372
6200 * cfgexpand.c (pass_expand::execute): Move the call to
6201 finish_eh_generation in front of the call to expand_stack_alignment.
6202
6203 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
6204
6205 * common/config/i386/i386-common.c (processor_alias_table): Add
6206 znver2 entry.
6207 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
6208 (case ${target}): Add znver2.
6209 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
6210 -march=native recognize znver2 processors.
6211 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
6212 * config/i386/i386.c (m_znver2): New definition.
6213 (m_ZNVER): New definition.
6214 (m_AMD_MULTIPLE): Includes m_znver2.
6215 (processor_cost_table): Add znver2 entry.
6216 (processor_target_table): Add znver2 entry.
6217 (get_builtin_code_for_version): Set priority for
6218 PROCESSOR_ZNVER2.
6219 (processor_model): Add M_AMDFAM17H_ZNVER2.
6220 (arch_names_table): Ditto.
6221 (ix86_reassociation_width): Include znver2.
6222 * config/i386/i386.h (TARGET_znver2): New definition.
6223 (struct ix86_size_cost): Add TARGET_ZNVER2.
6224 (enum processor_type): Add PROCESSOR_ZNVER2.
6225 * config/i386/i386.md (define_attr "cpu"): Add znver2.
6226 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
6227 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
6228 (ix86_adjust_cost): Add znver2.
6229 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
6230 * gcc/doc/extend.texi: Add details about znver2.
6231 * gcc/doc/invoke.texi: Add details about znver2.
6232
6233 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
6234
6235 PR target/87079
6236
6237 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
6238 pattern.
6239
6240 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6241
6242 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
6243 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
6244
6245 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
6246
6247 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
6248 shrink-wrapping when -mtrack-speculation.
6249
6250 2018-11-02 Richard Biener <rguenther@suse.de>
6251
6252 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
6253 (pop_cost_one_pair): Do not free pair.
6254 (pop_best_coalesce): Likewise.
6255 (create_coalesce_list): Initialize obstack.
6256 (delete_coalesce_list): Free obstack.
6257 (find_coalesce_pair): Obstack-allocate coalesce pairs.
6258 (add_cost_one_coalesce): Likewise.
6259 (struct live_track): Remove bitmap pointer indirections.
6260 (new_live_track): Adjust.
6261 (delete_live_track): Likewise.
6262 (live_track_remove_partition): Likewise.
6263 (live_track_add_partition): Likewise.
6264 (live_track_live_p): Likewise.
6265 (live_track_process_def): Likewise.
6266 (live_track_clear_base_vars): Likewise.
6267
6268 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6269
6270 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
6271 * configure: Regenerate.
6272 * config.in: Regenerate.
6273 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
6274 HAVE_AS_REGISTER_PSEUDO_OP guard.
6275 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
6276 !HAVE_AS_REGISTER_PSEUDO_OP support.
6277 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
6278 guard.
6279
6280 2018-11-02 Richard Biener <rguenther@suse.de>
6281
6282 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
6283 with is_type_die.
6284
6285 2018-11-02 Richard Biener <rguenther@suse.de>
6286
6287 PR tree-optimization/87776
6288 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
6289 executable when iterating but running into rpo-vn-max-loop-depth
6290 and not eliding the iteration.
6291
6292 2018-11-30 Jan Hubicka <jh@suse.cz>
6293
6294 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
6295 TYPE_DECL.
6296
6297 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
6298
6299 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
6300 prototype.
6301 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
6302 Combine with rs6000_address_for_fpconvert.
6303 (rs6000_address_for_fpconvert): Combine with
6304 rs6000_force_indexed_or_indirect_mem.
6305 (rs6000_expand_vector_init): Change function call from
6306 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6307 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
6308 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6309 (floatsi<mode>2_lfiwax_mem): Ditto.
6310 (floatunssi<mode>2_lfiwzx): Ditto.
6311 (floatunssi<mode>2_lfiwzx_mem): Ditto.
6312 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
6313 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
6314 (fix_trunc<mode>si2_stfiwx): Ditto.
6315 (fixuns_trunc<mode>si2_stfiwx): Ditto.
6316 (float_<mode>si2_hw): Ditto.
6317 (floatuns_<mode>si2_hw): Ditto.
6318 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
6319 (vsx_splat_<mode>): Ditto.
6320
6321 2018-11-01 Joseph Myers <joseph@codesourcery.com>
6322
6323 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
6324 at end of assembler input text.
6325 * configure: Regenerate.
6326
6327 2018-11-01 Jakub Jelinek <jakub@redhat.com>
6328
6329 PR tree-optimization/87826
6330 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
6331 negative or larger or equal to type's precision.
6332
6333 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
6334
6335 * opts.c (default_options_table): Do not enable
6336 OPT_fdelayed_branch at -Og.
6337 * doc/invoke.texi (-fdelayed-branch): Document it.
6338
6339 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6340
6341 * optabs-libfuncs.c (build_libfunc_function_visibility):
6342 New, split out from...
6343 (build_libfunc_function): ... here.
6344 (init_one_libfunc_visibility): New, split out from ...
6345 (init_one_libfunc): ... here.
6346
6347 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
6348 scratch register need not be early-clobber. Document the reason
6349 why we cannot use ST<OP>.
6350
6351 2018-10-31 Joseph Myers <joseph@codesourcery.com>
6352
6353 PR bootstrap/82856
6354 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
6355 line for second argument of AC_DEFINE_UNQUOTED.
6356 * doc/install.texi (Tools/packages necessary for modifying GCC):
6357 Update to autoconf 2.69 and automake 1.15.1.
6358 * aclocal.m4, config.in, configure: Regenerate.
6359
6360 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
6361
6362 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
6363 initialization.
6364
6365 2018-10-31 Martin Liska <mliska@suse.cz>
6366
6367 PR driver/83193
6368 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
6369 Add new argument invalid_extension.
6370 (aarch64_get_all_extension_candidates): New function.
6371 (aarch64_rewrite_selected_cpu): Add NULL to function call.
6372 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
6373 new argument.
6374 (aarch64_get_all_extension_candidates): New function.
6375 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
6376 argument invalid_extension.
6377 (aarch64_parse_cpu): Likewise.
6378 (aarch64_print_hint_for_extensions): New function.
6379 (aarch64_validate_mcpu): Provide hint about invalid extension.
6380 (aarch64_validate_march): Likewise.
6381 (aarch64_handle_attr_arch): Pass new argument.
6382 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
6383 (aarch64_handle_attr_isa_flags): Likewise.
6384
6385 2018-10-31 Richard Biener <rguenther@suse.de>
6386
6387 PR middle-end/70359
6388 PR middle-end/86270
6389 * tree-outof-ssa.c (insert_backedge_copies): Restrict
6390 copy generation to useful cases. Place the copy before
6391 the definition of the backedge value when possible.
6392
6393 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6394
6395 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
6396 * config/arc/arc.c (arc_active_insn): New function.
6397 (check_store_cacheline_hazard): Likewise.
6398 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
6399 (arc_override_options): Disable delay slot scheduler for older
6400 A7.
6401 (arc_store_addr_hazard_p): New implementation, old one renamed to
6402 ...
6403 (arc_store_addr_hazard_internal_p): Renamed.
6404 (arc_reorg): Don't combine into brcc instructions which are part
6405 of hardware hazard solution.
6406 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
6407 (tune_arc700): Likewise.
6408 * config/arc/arc.opt (arc7xx): New tune value.
6409 * config/arc/arc700.md: Improve A7 scheduler.
6410
6411 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6412
6413 * config/arc/arc.c (arc_override_options): Remove
6414 TARGET_COMPACT_CASESI.
6415 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
6416 (CASE_VECTOR_MODE): Likewise.
6417 (CASE_VECTOR_PC_RELATIVE): Likewise.
6418 (CASE_VECTOR_SHORTEN_MODE): Likewise.
6419 (CASE_VECTOR_SHORTEN_MODE1): Delete.
6420 (ADDR_VEC_ALIGN): Update.
6421 (ASM_OUTPUT_CASE_LABEL): Undefine.
6422 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
6423 (TARGET_BI_BIH): Define.
6424 (DEFAULT_BRANCH_INDEX): Likewise.
6425 * config/arc/arc.md (casesi): Rework to accept BI/BIH
6426 instructions, remove compact_casesi use case.
6427 (casesi_compact_jump): Remove.
6428 (casesi_dispatch): New pattern.
6429 * config/arc/arc.opt: Add mbranch-index option. Deprecate
6430 compact_casesi option.
6431 * doc/invoke.texi: Document mbranch-index option.
6432
6433 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6434
6435 * config/arc/arc.c (arc_get_tp): Remove function.
6436 (arc_emit_call_tls_get_addr): Likewise.
6437 (arc_call_tls_get_addr): New function.
6438 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
6439 * config/arc/arc.md (tls_load_tp_soft): Remove.
6440 (tls_gd_get_addr): Likewise.
6441
6442 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6443
6444 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
6445 (mulsi3_600_lib): Remove pattern.
6446 (umulsi3_highpart_600_lib_le): Likewise.
6447 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
6448 (umulsidi3): Remove call to umulsidi3_600_lib.
6449 (umulsidi3_600_lib): Remove pattern.
6450 (peephole2): Remove peephole using the above deprecated patterns.
6451
6452 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6453
6454 PR target/87374
6455 * config/arm/arm.c (arm_option_check_internal): Disable the combined
6456 use of -mslow-flash-data and -mword-relocations.
6457 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
6458 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
6459 flag_pic.
6460 * doc/invoke.texi (-mword-relocations): Mention conflict with
6461 -mslow-flash-data.
6462 (-mslow-flash-data): Reciprocally.
6463
6464 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6465
6466 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
6467 16-byte modes held in GP registers to use an even regno.
6468
6469 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
6470 (aarch64_atomic_ldop_supported_p): Remove.
6471 (aarch64_gen_atomic_ldop): Remove.
6472 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
6473 Fully expand LSE operations here.
6474 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
6475 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
6476 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
6477 and use ATOMIC_LDOP instead; use register_operand for the input;
6478 drop the split and emit insns directly.
6479 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
6480 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
6481 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
6482
6483 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
6484 (aarch64_gen_atomic_ldop): Don't call it.
6485 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
6486 Use aarch64_reg_or_zero.
6487 (aarch64_atomic_exchange<ALLI>): Likewise.
6488 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
6489 operand 0; use aarch64_reg_or_zero for input; merge ...
6490 (@aarch64_atomic_swp<ALLI>): ... this and remove.
6491
6492 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
6493 (aarch64_split_compare_and_swap): Use it.
6494 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
6495 test oldval against the proper predicate.
6496 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
6497 Use nonmemory_operand for expected.
6498 (cas_short_expected_pred): New.
6499 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
6500 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
6501 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
6502 (aarch64_plushi_operand): New.
6503
6504 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
6505 Force oldval into the rval register for TARGET_LSE; emit the compare
6506 during initial expansion so that it may be deleted if unused.
6507 (aarch64_gen_atomic_cas): Remove.
6508 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
6509 Change =&r to +r for operand 0; use match_dup for operand 2;
6510 remove is_weak and mod_f operands as unused. Drop the split
6511 and merge with...
6512 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
6513 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
6514 (@aarch64_atomic_cas<GPI>): Similarly.
6515
6516 2018-10-31 Richard Biener <rguenther@suse.de>
6517
6518 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
6519 using ABSU_EXPR.
6520
6521 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6522
6523 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
6524 * config/aarch64/aarch64.md: Include saphira.md
6525 * config/aarch64/saphira.md: New file for pipeline description.
6526
6527 2018-10-30 Martin Sebor <msebor@redhat.com>
6528
6529 PR middle-end/87041
6530 * gimple-ssa-sprintf.c (format_directive): Use %G to include
6531 inlining context.
6532 (sprintf_dom_walker::compute_format_length):
6533 Avoid setting POSUNDER4K here.
6534 (get_destination_size): Handle null argument values.
6535 (get_user_idx_format): New function.
6536 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
6537 functions, including user-defined with attribute format printf.
6538 Use %G to include inlining context.
6539 Set POSUNDER4K here.
6540
6541 2018-10-30 Jan Hubicka <jh@suse.cz>
6542
6543 * params.def (lto-partitions): Bump from 32 to 128.
6544
6545 2018-10-30 Jan Hubicka <jh@suse.cz>
6546
6547 * tree.c
6548 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
6549 head in file.
6550 (free_lang_data_in_type): Forward declare.
6551 (fld_type_variant_equal_p): New function.
6552 (fld_type_variant): New function
6553 (fld_incomplete_types): New hash.
6554 (fld_incomplete_type_of): New function
6555 (fld_simplfied-type): New function.
6556 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
6557 (free_lang_data): Allocate and free fld_incomplete_type; update call
6558 of free_lang_data_in_decl.
6559
6560 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
6561
6562 * gcov.c (output_lines): Remove duplicate line.
6563
6564 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
6565
6566 * config/rs6000/rs6000.md (bswapdi2): Force address into register
6567 if not in indexed or indirect form.
6568 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
6569 (bswapdi2_store): Ditto.
6570 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
6571 helper function.
6572 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
6573 Prototype for helper function.
6574
6575 2018-10-30 Martin Sebor <msebor@redhat.com>
6576
6577 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
6578 (target, pragma GCC optimize, pragma GCC target): Ditto.
6579
6580 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
6581
6582 * doc/extend.texi: Fix prototype and description of
6583 __builtin_expect_with_probability.
6584
6585 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
6586
6587 * cgraph.h (clone_function_name_1): Replaced by new
6588 clone_function_name_numbered that takes name as string; for
6589 privatize_symbol_name_1 use only.
6590 (clone_function_name): Renamed to
6591 clone_function_name_numbered to be explicit about numbering.
6592 (clone_function_name): New two-argument function that does
6593 not number its output.
6594 (clone_function_name): New three-argument function that
6595 takes a number to append to its output.
6596 * cgraphclones.c (duplicate_thunk_for_node):
6597 (clone_function_name_1): Renamed.
6598 (clone_function_name_numbered): Two new functions.
6599 (clone_function_name): Improved documentation.
6600 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
6601 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
6602 * final.c (final_scan_insn_1): Use the new clone_function_name
6603 without numbering.
6604 * multiple_target.c (create_dispatcher_calls): Ditto.
6605 (create_target_clone): Ditto.
6606 * omp-expand.c (grid_expand_target_grid_body): Ditto.
6607 * omp-low.c (create_omp_child_function_name): Ditto.
6608 * omp-simd-clone.c (simd_clone_create): Ditto.
6609 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
6610 new clone_function_name without numbering.
6611
6612 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
6613
6614 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
6615 Assert that the allocation size is not zero.
6616
6617 2018-10-30 Richard Biener <rguenther@suse.de>
6618
6619 PR tree-optimization/87800
6620 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
6621 non-induction or reduction PHIs.
6622
6623 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org>
6624
6625 * config/aarch64/falkor-tag-collision-avoidance.c
6626 (execute_tag_collision_avoidance): Call df_note_add_problem.
6627
6628 2018-10-30 Martin Liska <mliska@suse.cz>
6629
6630 * doc/extend.texi: Fix typo in documentation
6631 of __builtin_expect_with_probability.
6632
6633 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6634
6635 PR c++/87721
6636 * input.c (get_substring_ranges_for_loc): Detect if
6637 linemap_resolve_location gives us a NULL map, and reject
6638 this case.
6639
6640 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
6641
6642 * config.gcc (xstormy16-*-elf): Set tm_d_file.
6643
6644 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6645 Martin Sebor <msebor@redhat.com>
6646 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6647
6648 * doc/ux.texi (Quoting): New subsection, adapted from material at
6649 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
6650 MartinSebor and ManuelLopezIbanez.
6651 (Fix-it hints): Note that fix-it hints shouldn't be marked for
6652 translation.
6653
6654 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
6655
6656 PR middle-end/87469
6657 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
6658 max value.
6659
6660 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6661
6662 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
6663
6664 2018-10-29 Paul Koning <ni1d@arrl.net>
6665
6666 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
6667
6668 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6669
6670 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
6671 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
6672 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
6673 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
6674 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
6675 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
6676 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
6677 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
6678 Change 'vector' to '__vector'.
6679 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
6680 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
6681 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
6682 _mm_avg_pu16): Likewise. And, whitespace corrections.
6683
6684 2018-10-29 Richard Biener <rguenther@suse.de>
6685
6686 PR tree-optimization/87785
6687 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
6688 internal defs.
6689
6690 2018-10-29 Olivier Hainque <hainque@adacore.com>
6691
6692 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
6693
6694 2018-10-29 Olivier Hainque <hainque@adacore.com>
6695
6696 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
6697 ports configuration macro, defaults to "gnu".
6698 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
6699 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
6700
6701 2018-10-29 Olivier Hainque <hainque@adacore.com>
6702
6703 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
6704
6705 2018-10-29 Richard Biener <rguenther@suse.de>
6706
6707 PR tree-optimization/87790
6708 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
6709 (vect_make_slp_decision): Adjust.
6710 (vect_slp_analyze_bb_1): Likewise.
6711 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
6712 edges.
6713
6714 2018-10-29 Richard Biener <rguenther@suse.de>
6715
6716 PR tree-optimization/87785
6717 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
6718 and processing.
6719 (vect_build_slp_tree): Likewise.
6720 (vect_gather_slp_loads): New function.
6721 (vect_analyze_slp_instance): Gather loads separately from the
6722 SLP tree build.
6723
6724 2018-10-29 Martin Liska <mliska@suse.cz>
6725
6726 * Makefile.in: Make dependency to json.o.
6727 * doc/gcov.texi: Document new JSON format, remove
6728 old intermediate format documentation.
6729 * gcov.c (struct function_info): Come up with m_name and
6730 m_demangled_name.
6731 (function_info::function_info): Initialize it.
6732 (function_info::~function_info): Release it.
6733 (main): Rename flag_intermediate_format to flag_json_format.
6734 (print_usage): Describe --json-format.
6735 (process_args): Set flag_json_format.
6736 (output_intermediate_line): Remove.
6737 (output_intermediate_json_line): Likewise.
6738 (get_gcov_intermediate_filename): Return new extension
6739 ".gcov.json.gz".
6740 (output_intermediate_file): Implement JSON emission.
6741 (output_json_intermediate_file): Implement JSON emission.
6742 (generate_results): Use ::get_name for function name.
6743 Handle JSON output file.
6744 (read_graph_file): Use ::get_name instead of cplus_demangle.
6745 (read_count_file): Likewise.
6746 (solve_flow_graph): Likewise.
6747 (add_line_counts): Likewise.
6748 (accumulate_line_counts): Use new flag_json_format.
6749 (output_function_details): Use ::get_name instead of cplus_demangle.
6750 (output_lines): Likewise.
6751 * json.cc (test_writing_literals): Add new tests.
6752 * json.h (class literal): Add new boolean constructor.
6753
6754 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
6755
6756 PR rtl-optimization/87701
6757 PR rtl-optimization/87780
6758 * combine.c (make_more_copies): Rewrite.
6759
6760 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
6761
6762 * doc/generic.texi (ABSU_EXPR): Document.
6763 * match.pd (absu(x)*absu(x) -> x*x): Handle.
6764 (absu(absu(X)) -> absu(X)): Likewise.
6765 (absu(-X) -> absu(X)): Likewise.
6766 (absu(X) where X is nonnegative -> X): Likewise.
6767
6768 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
6769
6770 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
6771 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
6772 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
6773 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
6774 (s-tm-texi): Also check timestamp on d-target.def.
6775 (generated_files): Add TM_D_H and d-target-hooks-def.h.
6776 (build/genhooks.o): Also depend on D_TARGET_DEF.
6777 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
6778 variables.
6779 * config/aarch64/aarch64-d.c: New file.
6780 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
6781 Define.
6782 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
6783 prototype.
6784 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
6785 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
6786 * config/arm/arm-d.c: New file.
6787 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
6788 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
6789 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6790 * config/arm/t-arm (arm-d.o): New rule.
6791 * config/default-d.c: New file.
6792 * config/glibc-d.c: New file.
6793 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6794 * config/i386/i386-d.c: New file.
6795 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
6796 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
6797 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6798 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
6799 * config/i386/t-i386 (i386-d.o): New rule.
6800 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6801 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6802 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
6803 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6804 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6805 * config/mips/mips-d.c: New file.
6806 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
6807 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
6808 * config/mips/t-mips (mips-d.o): New rule.
6809 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6810 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6811 * config/powerpcspe/powerpcspe-d.c: New file.
6812 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
6813 New prototype.
6814 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6815 Support GNU D by using 0 as the language type.
6816 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
6817 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
6818 * config/riscv/riscv-d.c: New file.
6819 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
6820 prototype.
6821 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
6822 * config/riscv/t-riscv (riscv-d.o): New rule.
6823 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6824 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6825 * config/rs6000/rs6000-d.c: New file.
6826 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
6827 prototype.
6828 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6829 Support GNU D by using 0 as the language type.
6830 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
6831 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
6832 * config/s390/s390-d.c: New file.
6833 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
6834 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
6835 * config/s390/t-s390 (s390-d.o): New rule.
6836 * config/sparc/sparc-d.c: New file.
6837 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
6838 prototype.
6839 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
6840 * config/sparc/t-sparc (sparc-d.o): New rule.
6841 * config/t-glibc (glibc-d.o): New rule.
6842 * configure: Regenerated.
6843 * configure.ac (tm_d_file): New variable.
6844 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
6845 * doc/contrib.texi (Contributors): Add self for the D frontend.
6846 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
6847 * doc/install.texi (Configuration): Mention libphobos as an option for
6848 --enable-shared. Mention d as an option for --enable-languages.
6849 (Testing): Mention check-d as a target.
6850 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
6851 name suffixes. Mention d as a -x option.
6852 * doc/sourcebuild.texi (Top Level): Mention libphobos.
6853 * doc/standards.texi (Standards): Add section on D language.
6854 * doc/tm.texi: Regenerated.
6855 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
6856 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
6857 * dwarf2out.c (is_dlang): New function.
6858 (gen_compile_unit_die): Use DW_LANG_D for D.
6859 (declare_in_namespace): Return module die for D, instead of adding
6860 extra declarations into the namespace.
6861 (gen_namespace_die): Generate DW_TAG_module for D.
6862 (gen_decl_die): Handle CONST_DECLSs for D.
6863 (dwarf2out_decl): Likewise.
6864 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
6865 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
6866 kinds of aggregates.
6867 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
6868 * genhooks.c: Include d/d-target.def.
6869
6870 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
6871
6872 PR target/85669
6873 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
6874 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
6875 (STACK_DYNAMIC_OFFSET): Likewise.
6876
6877 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
6878
6879 PR target/80024
6880 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
6881 error message.
6882
6883 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6884
6885 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
6886 return type and other typos.
6887
6888 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6889
6890 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
6891 a shorter sequence with fewer branches.
6892 (emit_final_str_compare_gpr): Ditto.
6893
6894 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6895
6896 * config/rs6000/tmmintrin.h: New file.
6897 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
6898
6899 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6900
6901 * config/rs6000/mmintrin.h: Enable 32bit compilation.
6902 * config/rs6000/xmmintrin.h: Likewise.
6903
6904 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6905
6906 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
6907
6908 2018-10-26 Richard Biener <rguenther@suse.de>
6909
6910 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
6911 and wrapper.
6912 (vect_mark_slp_stmts_relevant): Likewise.
6913 (vect_detect_hybrid_slp_stmts): Likewise.
6914 (vect_bb_slp_scalar_cost): Likewise.
6915 (vect_remove_slp_scalar_calls): Likewise.
6916
6917 2018-10-26 Jan Hubicka <jh@suse.cz>
6918
6919 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
6920 (warn_types_mismatch): Fix walk of DECL_NAME.
6921 (odr_types_equivalent_p): Fix overactive assert.
6922
6923 2018-10-26 Richard Biener <rguenther@suse.de>
6924
6925 PR tree-optimization/87105
6926 * tree-vectorizer.h (_slp_tree::refcnt): New member.
6927 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
6928 refcnt.
6929 (vect_create_new_slp_node): Initialize refcnt to one.
6930 (bst_traits): Move.
6931 (scalar_stmts_set_t, bst_fail): Remove.
6932 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
6933 (vect_build_slp_tree): Add bst_map argument and lookup
6934 already created SLP nodes.
6935 (vect_print_slp_tree): Handle a SLP graph, print SLP node
6936 addresses.
6937 (vect_slp_rearrange_stmts): Handle a SLP graph.
6938 (vect_analyze_slp_instance): Adjust and free SLP nodes from
6939 the CSE map. Fix indenting.
6940 (vect_schedule_slp_instance): Add short-cut.
6941
6942 2018-10-26 Martin Liska <mliska@suse.cz>
6943
6944 PR testsuite/86158
6945 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
6946 addr_expr and not with pointers.
6947
6948 2018-10-26 Jan Hubicka <jh@suse.cz>
6949
6950 * tree.c (free_lang_data_in_type): Only check main variants.
6951 * ipa-devirt.c (warn_odr): Make static.
6952 (types_same_for_odr): Drop strict variant.
6953 (types_odr_comparable): Likewise.
6954 (odr_or_derived_type_p): Look for main variants.
6955 (odr_name_hasher::equal): Cleanup comment.
6956 (odr_subtypes_equivalent): Add warn and warned arguments; check main
6957 variants.
6958 (type_variants_equivalent_p): break out from ...
6959 (odr_types_equivalent): ... here; go for main variants where needed.
6960 (warn_odr): ... here; turn static.
6961 (warn_types_mismatch): Compare mangled names of main variants.
6962 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
6963 (type_with_linkage_p): Sanity check that we look at main variant.
6964 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
6965 * tree.h (types_same_for_odr): Drop strict argument.
6966
6967 2018-10-26 Richard Biener <rguenther@suse.de>
6968
6969 PR tree-optimization/87746
6970 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
6971 Simplify and fix WRT strided store groups with size not
6972 equal to step in element count.
6973 (vect_analyze_group_access_1): Dump the whole group.
6974
6975 2018-10-25 Carl Love <cel@us.ibm.com>
6976
6977 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
6978 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
6979 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
6980 precicion entry for each overloaded builtin.
6981 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
6982 VSCEDPUO): Rename overloaded name.
6983 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
6984 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
6985 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
6986 define_expand for xscmpexqp instruction.
6987 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
6988
6989 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6990 Jinsong Ji <jji@us.ibm.com>
6991
6992 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
6993 function with vec_sl.
6994 (_mm_slli_epi32): Likewise.
6995 (_mm_slli_epi64): Likewise.
6996 (_mm_srai_epi16): Replace deprecated function with vec_sra.
6997 (_mm_srai_epi32): Likewise.
6998 (_mm_srli_epi16): Replace deprecated function with vec_sr.
6999 (_mm_srli_epi32): Likewise.
7000 (_mm_srli_epi64): Likewise.
7001 (_mm_sll_epi16): Replace deprecated function with vec_sl.
7002 (_mm_sll_epi32): Likewise.
7003 (_mm_sll_epi64): Likewise.
7004 (_mm_sra_epi16): Replace deprecated function with vec_sra.
7005 (_mm_sra_epi32): Likewise.
7006 (_mm_srl_epi16): Replace deprecated function with vec_sr.
7007 (_mm_srl_epi32): Likewise.
7008 (_mm_srl_epi64): Likewise.
7009
7010 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
7011 Jinsong Ji <jji@us.ibm.com>
7012
7013 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
7014 comparison operators with vec_cmp* for compatibility due to
7015 unfortunate history; clean up formatting and use types more
7016 appropriately.
7017 (_mm_sll_epi32): Likewise.
7018 (_mm_sll_epi64): Likewise.
7019 (_mm_srl_epi16): Likewise.
7020 (_mm_srl_epi32): Likewise.
7021 (_mm_srl_epi64): Likewise.
7022
7023 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
7024 Jinsong Ji <jji@us.ibm.com>
7025
7026 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
7027 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
7028 __vector __bool int. Use vec_cmpgt in preference to deprecated
7029 function vec_vcmpgtfp.
7030 (_mm_max_ps): Likewise.
7031
7032 2018-10-25 Jeff Law <law@redhat.com>
7033
7034 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
7035 if returning false.
7036
7037 2018-10-25 Martin Sebor <msebor@redhat.com>
7038
7039 * doc/extend.texi (aligned): Expand attribute description.
7040 (Alignment): Rename section. Discuss function arguments.
7041
7042 2018-10-25 Jan Hubicka <jh@suse.cz>
7043
7044 * ipa-devirt.c (main_odr_variant): Remove.
7045 (hash_odr_name, types_same_for_odr, types_odr_comparable,
7046 odr_name_hasher::equal, odr_subtypes_equivalent_p):
7047 Drop use of main_odr_variant.
7048 (add_type_duplicate): Silence confused warnings on integer types.
7049 (get_odr_type): Always look for main variant.
7050 (register_odr_type): Simplify.
7051
7052 2018-10-25 Richard Biener <rguenther@suse.de>
7053
7054 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
7055 Initialize ng to silence error with release checking bootstrap.
7056
7057 2018-10-25 Richard Biener <rguenther@suse.de>
7058
7059 * tree-if-conv.c: Include tree-ssa-sccvn.h.
7060 (tree_if_conversion): Run CSE on the if-converted loop body.
7061
7062 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
7063
7064 * config/s390/constraints.md (ZL): New constraint.
7065 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
7066 operands.
7067 * config/s390/s390.md (movdi_larl): Remove.
7068 (movdi_64): Add the LARL alternative.
7069
7070 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
7071
7072 PR bootstrap/87747
7073 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
7074 (RTX_CODE_HWINT_P): New macro.
7075 (rtx_code_size): Use RTX_CODE_HWINT_P ().
7076
7077 2018-10-25 Jan Hubicka <jh@suse.cz>
7078
7079 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
7080 is anonymous.
7081
7082 2018-10-25 Richard Biener <rguenther@suse.de>
7083
7084 PR tree-optimization/87665
7085 PR tree-optimization/87745
7086 * tree-vectorizer.h (get_earlier_stmt): Remove.
7087 (get_later_stmt): Pick up UID from the original non-pattern stmt.
7088
7089 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
7090
7091 * options.texi (Deprecated): Move list to Var section.
7092
7093 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
7094 Jinsong Ji <jji@us.ibm.com>
7095
7096 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
7097 __vector long to __vector long long.
7098 (_mm_cvtpd_ps): Likewise.
7099 (_mm_cvttpd_epi32): Likewise.
7100 (_mm_cvtpi32_pd): Likewise.
7101 (_mm_unpackhi_epi64): Likewise.
7102 (_mm_unpacklo_epi64): Likewise.
7103
7104 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
7105
7106 PR rtl-optimization/87720
7107 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
7108
7109 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
7110
7111 * gimple-ssa-isolate-paths.c
7112 (find_implicit_erroneous_behavior): Do not change code if the
7113 pass is running for warnings only.
7114 (find_explicit_erroneous_behavior): Likewise.
7115
7116 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
7117
7118 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
7119 Define as rs6000_mangle_decl_assembler_name.
7120 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
7121 long double to IEEE long double, switch the names of the long
7122 double built-in functions to be <func>f128 instead of <func>l.
7123
7124 2018-10-24 Martin Sebor <msebor@redhat.com>
7125
7126 * doc/extend.texi (nonnull): List no-argument form. Reference
7127 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
7128
7129 2018-10-24 Richard Biener <rguenther@suse.de>
7130
7131 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
7132
7133 2018-10-24 Martin Liska <mliska@suse.cz>
7134
7135 PR tree-optimization/84436
7136 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
7137 Remove.
7138 (switch_conversion::contains_linear_function_p): New.
7139 (switch_conversion::build_one_array): Support linear
7140 transformation on input.
7141 * tree-switch-conversion.h (struct switch_conversion): Add
7142 contains_linear_function_p declaration.
7143
7144 2018-10-24 Richard Biener <rguenther@suse.de>
7145
7146 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
7147 if its argument is CONSTANT_CLASS_P.
7148
7149 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
7150
7151 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
7152 it is wrong for forward declarations.
7153
7154 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
7155
7156 * config/s390/s390.c (s390_check_qrst_address): Add the missing
7157 SYMBOL_REF_P () check.
7158
7159 2018-10-24 Richard Biener <rguenther@suse.de>
7160
7161 PR tree-optimization/87105
7162 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
7163 dump classification.
7164 (vect_analyze_data_ref_accesses): Handle duplicate loads and
7165 stores by splitting the affected group after the fact.
7166 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
7167 fail the SLP build because of size constraints.
7168
7169 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7170
7171 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
7172 * configure: Regenerate.
7173 * config.in: Regenerate.
7174 * varasm.c (mergeable_string_section): Use readonly_data_section
7175 if linker doesn't support SHF_MERGE with alignment > 8.
7176 (mergeable_constant_section): Likewise.
7177
7178 2018-10-24 Richard Biener <rguenther@suse.de>
7179
7180 PR tree-optimization/84013
7181 * tree-ssa-structalias.c (struct msdi_data): New struct for
7182 marshalling data to walk_stmt_load_store_ops.
7183 (maybe_set_dependence_info): Refactor as callback for
7184 walk_stmt_load_store_ops.
7185 (compute_dependence_clique): Set restrict info on all stmt kinds.
7186
7187 2018-10-24 Martin Liska <mliska@suse.cz>
7188
7189 * cgraph.c (cgraph_node::dump):
7190 Remove reduntant dumps and make tp_first_run dump more compact.
7191
7192 2018-10-24 Richard Biener <rguenther@suse.de>
7193
7194 PR tree-optimization/87665
7195 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
7196 to reflect reality.
7197
7198 2018-10-12 Jeff Law <law@redhat.com>
7199
7200 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
7201 for H8/S.
7202
7203 2018-10-23 Richard Biener <rguenther@suse.de>
7204
7205 * tree-vrp.c (add_assert_info): Guard dump_printf with
7206 dump_enabled_p.
7207 * gimple-ssa-evrp-analyze.c
7208 (evrp_range_analyzer::record_ranges_from_incoming_edge):
7209 Use value_range::ignore_equivs_equal_p.
7210
7211 2018-10-23 Richard Biener <rguenther@suse.de>
7212
7213 PR tree-optimization/87105
7214 PR tree-optimization/87608
7215 * passes.def (pass_all_early_optimizations): Add early phi-opt
7216 after dce.
7217 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
7218 addition to debug stmts.
7219 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
7220 and abs replacement early.
7221 * tree-cfg.c (gimple_empty_block_p): Likewise.
7222
7223 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
7224
7225 PR target/86383
7226 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
7227 specified to configure.
7228 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
7229
7230 2018-10-23 Richard Biener <rguenther@suse.de>
7231
7232 PR tree-optimization/87700
7233 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
7234
7235 2018-10-23 Jakub Jelinek <jakub@redhat.com>
7236
7237 PR target/87674
7238 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
7239 second argument from __mmask16 to __mmask8.
7240 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
7241 _mm_mask_packs_epi32): Likewise.
7242 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
7243 Likewise.
7244 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
7245
7246 2018-10-23 Richard Biener <rguenther@suse.de>
7247
7248 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
7249
7250 2018-10-23 Richard Biener <rguenther@suse.de>
7251
7252 PR tree-optimization/86144
7253 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
7254 over simd attribute.
7255
7256 2018-10-23 Richard Biener <rguenther@suse.de>
7257
7258 PR tree-optimization/87693
7259 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
7260 the case we do not find the taken edge.
7261
7262 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
7263 Jinsong Ji <jji@us.ibm.com>
7264
7265 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
7266 (_mm_store_pd): Use unaligned vector type for pointer cast.
7267 (_mm_maskmoveu_si128): Likewise.
7268 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
7269 (_mm_store_ps): Use unaligned vector type for pointer cast.
7270
7271 2018-10-22 Paul Koning <ni1d@arrl.net>
7272
7273 * symtab.c (symtab_node::increase_alignment): Correct max
7274 alignment check.
7275
7276 2018-10-22 Yury Gribov <tetra2005@gmail.com>
7277
7278 PR tree-optimization/87633
7279 * match.pd: Do not generate unordered integer comparisons.
7280
7281 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7282
7283 PR rtl-optimization/87600
7284 * combine.c: Add include of expr.h.
7285 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
7286 register to a pseudo.
7287 (make_more_copies): New function, add a copy to a new pseudo after
7288 the moves from hard registers into pseudos.
7289 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
7290 later. Call make_more_copies.
7291
7292 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
7293
7294 * lra-constraints.c (process_alt_operands): New local array,
7295 matching_early_clobber. Check matching_early_clobber before
7296 decrementing reject, and set matching_early_clobber after.
7297
7298 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7299
7300 PR target/87598
7301 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
7302 call output_addr_const and hope for the best.
7303
7304 2018-10-22 Richard Biener <rguenther@suse.de>
7305
7306 * gimple-ssa-evrp-analyze.c
7307 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
7308 smarter about what ranges to use.
7309 * tree-vrp.c (add_assert_info): Dump here.
7310 (register_edge_assert_for_2): Instead of here at multiple but
7311 not all places.
7312
7313 * gcc.dg/tree-ssa/evrp12.c: New testcase.
7314 * gcc.dg/predict-6.c: Adjust.
7315 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
7316 * gcc.dg/tree-ssa/vrp02.c: Likewise.
7317 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
7318
7319 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
7320 Richard Biener <rguenther@suse.de>
7321
7322 * bitmap.h: Update data structure documentation, including a
7323 description of bitmap views as either linked-lists or splay trees.
7324 (struct bitmap_element_def): Update comments for splay tree bitmaps.
7325 (struct bitmap_head_def): Likewise.
7326 (bitmap_list_view, bitmap_tree_view): New prototypes.
7327 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
7328 tree_form fields.
7329 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
7330 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
7331 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
7332 released bitmap element here.
7333 (bitmap_element_free): Remove.
7334 (bitmap_elt_clear_from): Work on splay tree bitmaps.
7335 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
7336 this function similar ones such that linked-list bitmap implementation
7337 functions are grouped.
7338 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
7339 and moved for grouping.
7340 (bitmap_list_insert_element_after): Renamed from
7341 bitmap_elt_insert_after, and moved for grouping.
7342 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
7343 (bitmap_tree_link_left, bitmap_tree_link_right,
7344 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
7345 bitmap_tree_link_element, bitmap_tree_unlink_element,
7346 bitmap_tree_find_element): New functions for splay-tree bitmap
7347 implementation.
7348 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
7349 Renamed and moved, see above entries.
7350 (bitmap_tree_listify_from): New function to convert part of a splay
7351 tree bitmap to a linked-list bitmap.
7352 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
7353 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
7354 (bitmap_find_bit): Remove.
7355 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
7356 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
7357 Handle splay tree bitmaps.
7358 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
7359 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
7360 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
7361 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
7362 bitmap_intersect_compl_p, bitmap_ior_and_compl,
7363 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
7364 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
7365 corresponding changes to use linked-list specific bitmap_element
7366 manipulation functions as applicable for efficiency.
7367 (bitmap_tree_to_vec): New function.
7368 (debug_bitmap_elt_file): New function split out from ...
7369 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
7370 (bitmap_print): Likewise.
7371
7372 PR tree-optimization/63155
7373 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
7374 SSA edge worklists.
7375 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
7376 in tree-view.
7377
7378 2018-10-22 Martin Liska <mliska@suse.cz>
7379
7380 PR tree-optimization/87686
7381 Revert
7382 2018-08-29 Martin Liska <mliska@suse.cz>
7383
7384 * tree-switch-conversion.c (switch_conversion::expand):
7385 Strenghten assumption about gswitch statements.
7386
7387 2018-10-22 Martin Liska <mliska@suse.cz>
7388
7389 * ipa-icf.c (sem_item::compare_attributes): Remove.
7390 (sem_item::compare_referenced_symbol_properties): Use
7391 attribute_list_equal instead.
7392 (sem_function::equals_wpa): Likewise.
7393 * ipa-icf.h: Remove compare_attributes.
7394
7395 2018-10-22 Richard Biener <rguenther@suse.de>
7396
7397 PR middle-end/87682
7398 * mem-stats.h (mem_usage::operator==): Fix pasto.
7399
7400 2018-10-22 Richard Biener <rguenther@suse.de>
7401
7402 PR tree-optimization/87640
7403 * tree-vrp.c (set_value_range_with_overflow): Decompose
7404 incomplete result.
7405 (extract_range_from_binary_expr_1): Adjust.
7406
7407 2018-10-22 Martin Jambor <mjambor@suse.cz>
7408
7409 * tree-eh.h (stmt_could_throw_p): Add function parameter.
7410 (stmt_can_throw_external): Likewise.
7411 (stmt_can_throw_internal): Likewise.
7412 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
7413 (lower_eh_constructs_2): Likewise.
7414 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
7415 (stmt_can_throw_external): Likewise.
7416 (stmt_can_throw_internal): Likewise.
7417 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
7418 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
7419 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
7420 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
7421 (pass_lower_eh_dispatch::execute): Pass cfun to
7422 stmt_can_throw_external.
7423 (cleanup_empty_eh): Likewise.
7424 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
7425 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
7426 stmt_can_throw_external instead of pushing it to cfun.
7427 (symbol_table::create_edge): Likewise.
7428 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
7429 stmt_can_throw_internal.
7430 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
7431 to stmt_could_throw_p.
7432 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
7433 stmt_can_throw_internal.
7434 (pass_store_merging::execute): Likewise.
7435 * gimple-ssa-strength-reduction.c
7436 (find_candidates_dom_walker::before_dom_children): Pass cfun to
7437 stmt_could_throw_p.
7438 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
7439 stmt_can_throw_internal.
7440 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
7441 to stmt_can_throw_external.
7442 (check_stmt): Pass cfun to stmt_could_throw_p.
7443 (check_stmt): Pass cfun to stmt_can_throw_external.
7444 (pass_nothrow::execute): Likewise.
7445 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
7446 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
7447 stmt_can_throw_internal.
7448 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
7449 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
7450 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
7451 * tree-complex.c (expand_complex_libcall): Pass cfun to
7452 stmt_could_throw_p and to stmt_can_throw_internal.
7453 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
7454 * tree-inline.c (copy_edges_for_bb): Likewise.
7455 (maybe_move_debug_stmts_to_successors): Likewise.
7456 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
7457 stmt_could_throw_p.
7458 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
7459 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
7460 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
7461 stmt_can_throw_internal.
7462 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
7463 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
7464 stmt_could_throw_p.
7465 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
7466 stmt_can_throw_internal.
7467 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
7468 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
7469 stmt_could_throw_p.
7470 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
7471 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
7472 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7473 (convert_mult_to_fma_1): Likewise.
7474 (convert_to_divmod): Likewise.
7475 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
7476 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
7477 * tree-ssa-propagate.c
7478 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
7479 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
7480 (maybe_optimize_range_tests): Likewise.
7481 (linearize_expr_tree): Likewise.
7482 (reassociate_bb): Likewise.
7483 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7484 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
7485 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
7486 (handle_char_store): Likewise.
7487 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
7488 stmt_can_throw_internal.
7489 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
7490 stmt_could_throw_p.
7491 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7492 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
7493 (vectorizable_simd_clone_call): Likewise.
7494 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
7495 (gimple_stringop_fixed_value): Likewise.
7496
7497 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
7498
7499 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
7500 literal pool references.
7501 (s390_check_qrst_address): Adapt to the new behavior of
7502 s390_loadrelative_operand_p ().
7503
7504 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7505
7506 PR target/72782
7507 * config/i386/sse.md (*andnot<mode>3_bcst): New.
7508
7509 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7510
7511 PR target/72782
7512 * config/i386/sse.md (*<code><mode>3_bcst): New.
7513
7514 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7515
7516 PR target/72782
7517 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
7518 V4DI, V16SI and V8DI.
7519 (*sub<mode>3<mask_name>_bcst): New.
7520 (*add<mode>3<mask_name>_bcst): Likewise.
7521
7522 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
7523 Jinsong Ji <jji@us.ibm.com>
7524
7525 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
7526 __m64 with __vector unsigned long long for compatibility.
7527 (_mm_movemask_epi8): Likewise.
7528 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
7529 (_mm_cvttps_pi32): Likewise.
7530 (_mm_cvtpi32_ps): Likewise.
7531 (_mm_cvtps_pi16): Likewise.
7532 (_mm_loadh_pi): Likewise.
7533 (_mm_storeh_pi): Likewise.
7534 (_mm_movehl_ps): Likewise.
7535 (_mm_movelh_ps): Likewise.
7536 (_mm_loadl_pi): Likewise.
7537 (_mm_storel_pi): Likewise.
7538 (_mm_movemask_ps): Likewise.
7539 (_mm_shuffle_pi16): Likewise.
7540
7541 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7542
7543 PR target/72782
7544 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
7545 __builtin_ia32_vfnmsubpd512_mask.
7546 (_mm512_mask_fnmsub_round_pd): Likewise.
7547 (_mm512_fnmsub_pd): Likewise.
7548 (_mm512_mask_fnmsub_pd): Likewise.
7549 (_mm512_maskz_fnmsub_round_pd): Use
7550 __builtin_ia32_vfnmsubpd512_maskz.
7551 (_mm512_maskz_fnmsub_pd): Likewise.
7552 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
7553 (_mm512_mask_fnmsub_round_ps): Likewise.
7554 (_mm512_fnmsub_ps): Likewise.
7555 (_mm512_mask_fnmsub_ps): Likewise.
7556 (_mm512_maskz_fnmsub_round_ps): Use
7557 __builtin_ia32_vfnmsubps512_maskz.
7558 (_mm512_maskz_fnmsub_ps): Likewise.
7559 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
7560 __builtin_ia32_vfnmsubpd256_mask.
7561 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
7562 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7563 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
7564 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7565 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7566 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
7567 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
7568 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
7569 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
7570 __builtin_ia32_vfnmsubpd.
7571 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
7572 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
7573 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
7574 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
7575 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
7576 * config/i386/i386-builtin.def: Add
7577 __builtin_ia32_vfnmsubpd256_mask,
7578 __builtin_ia32_vfnmsubpd256_maskz,
7579 __builtin_ia32_vfnmsubpd128_mask,
7580 __builtin_ia32_vfnmsubpd128_maskz,
7581 __builtin_ia32_vfnmsubps256_mask,
7582 __builtin_ia32_vfnmsubps256_maskz,
7583 __builtin_ia32_vfnmsubps128_mask,
7584 __builtin_ia32_vfnmsubps128_maskz,
7585 __builtin_ia32_vfnmsubpd512_mask,
7586 __builtin_ia32_vfnmsubpd512_maskz,
7587 __builtin_ia32_vfnmsubps512_mask,
7588 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
7589 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
7590 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
7591 __builtin_ia32_vfnmsubpd256.
7592 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
7593 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
7594 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
7595 Likewise.
7596 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
7597 Likewise.
7598 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
7599 Likewise.
7600 (fmai_vmfnmsub_<mode><round_name>): Likewise.
7601
7602 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7603
7604 PR target/72782
7605 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
7606 __builtin_ia32_vfnmaddpd512_mask.
7607 (_mm512_mask_fnmadd_round_pd): Likewise.
7608 (_mm512_fnmadd_pd): Likewise.
7609 (_mm512_mask_fnmadd_pd): Likewise.
7610 (_mm512_maskz_fnmadd_round_pd): Use
7611 __builtin_ia32_vfnmaddpd512_maskz.
7612 (_mm512_maskz_fnmadd_pd): Likewise.
7613 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
7614 (_mm512_mask_fnmadd_round_ps): Likewise.
7615 (_mm512_fnmadd_ps): Likewise.
7616 (_mm512_mask_fnmadd_ps): Likewise.
7617 (_mm512_maskz_fnmadd_round_ps): Use
7618 __builtin_ia32_vfnmaddps512_maskz.
7619 (_mm512_maskz_fnmadd_ps): Likewise.
7620 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
7621 __builtin_ia32_vfnmaddpd256_mask.
7622 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
7623 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
7624 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
7625 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7626 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7627 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
7628 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
7629 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
7630 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
7631 __builtin_ia32_vfnmaddpd.
7632 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
7633 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
7634 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
7635 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
7636 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
7637 * config/i386/i386-builtin.def: Add
7638 __builtin_ia32_vfnmaddpd256_mask,
7639 __builtin_ia32_vfnmaddpd256_maskz,
7640 __builtin_ia32_vfnmaddpd128_mask,
7641 __builtin_ia32_vfnmaddpd128_maskz,
7642 __builtin_ia32_vfnmaddps256_mask,
7643 __builtin_ia32_vfnmaddps256_maskz,
7644 __builtin_ia32_vfnmaddps128_mask,
7645 __builtin_ia32_vfnmaddps128_maskz,
7646 __builtin_ia32_vfnmaddpd512_mask,
7647 __builtin_ia32_vfnmaddpd512_maskz,
7648 __builtin_ia32_vfnmaddps512_mask,
7649 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
7650 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
7651 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
7652 __builtin_ia32_vfnmaddpd256.
7653 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
7654 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
7655 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
7656 Likewise.
7657 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
7658 Likewise.
7659 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
7660 Likewise.
7661 (fmai_vmfnmadd_<mode><round_name>): Likewise.
7662
7663 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7664
7665 PR target/72782
7666 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
7667 __builtin_ia32_vfmsubpd512_mask.
7668 (_mm512_mask_fmsub_round_pd): Likewise.
7669 (_mm512_fmsub_pd): Likewise.
7670 (_mm512_mask_fmsub_pd): Likewise.
7671 (_mm512_maskz_fmsub_round_pd): Use
7672 __builtin_ia32_vfmsubpd512_maskz.
7673 (_mm512_maskz_fmsub_pd): Likewise.
7674 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
7675 (_mm512_mask_fmsub_round_ps): Likewise.
7676 (_mm512_fmsub_ps): Likewise.
7677 (_mm512_mask_fmsub_ps): Likewise.
7678 (_mm512_maskz_fmsub_round_ps): Use
7679 __builtin_ia32_vfmsubps512_maskz.
7680 (_mm512_maskz_fmsub_ps): Likewise.
7681 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
7682 __builtin_ia32_vfmsubpd256_mask.
7683 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
7684 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7685 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
7686 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7687 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7688 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
7689 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
7690 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
7691 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
7692 __builtin_ia32_vfmsubpd.
7693 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
7694 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
7695 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
7696 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
7697 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
7698 * config/i386/i386-builtin.def: Add
7699 __builtin_ia32_vfmsubpd256_mask,
7700 __builtin_ia32_vfmsubpd256_maskz,
7701 __builtin_ia32_vfmsubpd128_mask,
7702 __builtin_ia32_vfmsubpd128_maskz,
7703 __builtin_ia32_vfmsubps256_mask,
7704 __builtin_ia32_vfmsubps256_maskz,
7705 __builtin_ia32_vfmsubps128_mask,
7706 __builtin_ia32_vfmsubps128_maskz,
7707 __builtin_ia32_vfmsubpd512_mask,
7708 __builtin_ia32_vfmsubpd512_maskz,
7709 __builtin_ia32_vfmsubps512_mask,
7710 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
7711 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
7712 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
7713 __builtin_ia32_vfmsubpd256.
7714 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
7715 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
7716 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
7717 Likewise.
7718 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
7719 Likewise.
7720 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
7721 Likewise.
7722 (fmai_vmfmsub_<mode><round_name>): Likewise.
7723
7724 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7725
7726 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
7727 Remove plus. Renamed to ...
7728 (*sub<mode>3<mask_name>_bcst): This.
7729 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
7730 (*add<mode>3<mask_name>_bcst): This.
7731
7732 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7733
7734 PR target/72782
7735 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
7736
7737 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7738
7739 PR target/87662
7740 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
7741 (_mm_or_epi32): Likewise.
7742 (_mm256_xor_epi32): Likewise.
7743 (_mm_xor_epi32): Likewise.
7744 (_mm256_or_epi64): Likewise.
7745 (_mm_or_epi64): Likewise.
7746 (_mm256_xor_epi64): Likewise.
7747 (_mm_xor_epi64): Likewise.
7748
7749 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
7750
7751 PR target/72782
7752 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
7753
7754 2018-10-20 Jakub Jelinek <jakub@redhat.com>
7755
7756 PR middle-end/87647
7757 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
7758
7759 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
7760
7761 * doc/ux.texi: Move @section directly after @node.
7762
7763 2018-10-19 Jakub Jelinek <jakub@redhat.com>
7764
7765 PR middle-end/85488
7766 PR middle-end/87649
7767 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
7768 depend closely nested inside of loop with ordered clause with
7769 a parameter.
7770
7771 2018-10-19 David Malcolm <dmalcolm@redhat.com>
7772
7773 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
7774 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
7775 * doc/ux.texi: New file.
7776
7777 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
7778
7779 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
7780 be the first CR field allocated.
7781
7782 2018-10-19 Richard Biener <rguenther@suse.de>
7783
7784 PR target/87657
7785 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
7786 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
7787
7788 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7789
7790 PR target/72782
7791 * config/i386/sse.md
7792 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
7793 (*add<mode>3<mask_name>_bcst_2): Likewise.
7794
7795 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7796
7797 * config/i386/sse.md
7798 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7799 Replace nonimmediate_operand with register_operand.
7800 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7801 Likewise.
7802 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7803 Likewise.
7804
7805 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
7806
7807 PR rtl-optimization/87596
7808 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
7809 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
7810 for instructions in FROM..TO range.
7811
7812 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
7813
7814 * cfgexpand.c (expand_one_var): Use specific wording in error message
7815 for non-local frame variables.
7816 * stor-layout.c (layout_decl): Do not issue a warning for them.
7817
7818 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
7819
7820 * haifa-sched.c (priority): Add force_recompute parameter.
7821 (apply_replacement): Call priority () with force_recompute = true.
7822 (restore_pattern): Likewise.
7823
7824 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7825
7826 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
7827 HOST_BITS_PER_WIDE_INT.
7828 (test_vector_ops_duplicate): Likewise.
7829
7830 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7831
7832 PR target/72782
7833 * config/i386/sse.md (VF_AVX512): New.
7834 (avx512bcst): Likewise.
7835 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7836 Likewise.
7837 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7838 Likewise.
7839 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7840 Likewise.
7841
7842 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
7843
7844 * doc/invoke.texi (-dumpversion): Improve grammar.
7845 (-dumpfullversion): Make more consistent with -dumpversion.
7846
7847 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
7848
7849 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
7850 Set JUMP_LABEL to the jump insn.
7851 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
7852 Predict emitted jump and add label to jump insn.
7853
7854 2018-10-18 David Malcolm <dmalcolm@redhat.com>
7855
7856 PR tree-optimization/87562
7857 * input.c (get_substring_ranges_for_loc): Use
7858 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
7859 getting the linemap for the endpoint. Verify that it's either
7860 in the same linemap as the start point's spelling location, or
7861 at least in the same file.
7862
7863 2018-10-18 Richard Biener <rguenther@suse.de>
7864
7865 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
7866 feed width-specific load/store costs through ix86_vec_cost.
7867 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
7868 (k8_cost): Likewise.
7869 (bdver_cost): Likewise.
7870 (znver1_cost): Likewise.
7871 (btver1_cost): Likewise.
7872 (btver2_cost): Likewise.
7873
7874 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7875
7876 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
7877 to simplify subreg of vec_merge.
7878
7879 2018-10-18 Richard Biener <rguenther@suse.de>
7880
7881 * config/i386/i386.c: Fix costing of vector FMA.
7882
7883 2018-10-18 Richard Biener <rguenther@suse.de>
7884
7885 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
7886 and argument.
7887 (ix86_builtin_vectorization_cost): For vec_construct properly
7888 cost insertion into SSE regs.
7889 (...): Adjust calls to ix86_vec_cost.
7890
7891 2018-10-18 Richard Biener <rguenther@suse.de>
7892
7893 PR middle-end/87087
7894 Revert
7895 2018-02-07 Richard Biener <rguenther@suse.de>
7896
7897 PR tree-optimization/84204
7898 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7899 this place.
7900
7901 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7902
7903 PR target/87537
7904 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
7905 of vec_duplicate.
7906 (test_vector_ops_duplicate): Add test for a scalar subreg of a
7907 VEC_MERGE of a VEC_DUPLICATE.
7908
7909 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7910
7911 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
7912 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
7913 * doc/standards.texi (C Language): Document C2X.
7914 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
7915 (rl78_option_override): Handle "GNU C2X" language name.
7916
7917 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7918
7919 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
7920 Document C17 as published in 2018.
7921
7922 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
7923
7924 PR middle-end/87623
7925 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
7926 bail out if both sides do not have the same storage order.
7927
7928 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7929
7930 * bitmap.c (bitmap_head::dump): New.
7931 * bitmap.h (bitmap_head): Add dump().
7932 * gimple-ssa-evrp-analyze.c
7933 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
7934 (evrp_range_analyzer::set_ssa_range_info): Same.
7935 (evrp_range_analyzer::record_ranges_from_phis): Same.
7936 (evrp_range_analyzer::record_ranges_from_stmt): Same.
7937 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
7938 * gimple-ssa-sprintf.c (get_int_range): Same.
7939 (format_integer): Same.
7940 (sprintf_dom_walker::handle_gimple_call): Same.
7941 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
7942 (ipcp_vr_lattice::top_p): Same.
7943 (ipcp_vr_lattice::bottom_p): Same.
7944 (ipcp_vr_lattice::set_to_bottom): Same.
7945 (ipa_vr_operation_and_type_effects): Same.
7946 (propagate_vr_across_jump_function): Same.
7947 (ipcp_store_vr_results): Same.
7948 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
7949 (ipa_print_node_jump_functions_for_edge): Same.
7950 (ipa_get_value_range): Same.
7951 (ipa_compute_jump_functions_for_edge): Same.
7952 (ipa_write_jump_function): Same.
7953 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
7954 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
7955 Same.
7956 * vr-values.c (set_value_range_to_nonnegative): Same.
7957 (set_value_range_to_truthvalue): Same.
7958 (vr_values::get_value_range): Same.
7959 (vr_values::set_defs_to_varying): Same.
7960 (vr_values::update_value_range): Same.
7961 (symbolic_range_based_on_p): Same.
7962 (vr_values::op_with_boolean_value_range_p): Same.
7963 (vr_values::extract_range_for_var_from_comparison_expr): Same.
7964 (vr_values::extract_range_from_ssa_name): Same.
7965 (vr_values::extract_range_from_binary_expr): Same.
7966 (vr_values::extract_range_from_unary_expr): Same.
7967 (vr_values::extract_range_from_cond_expr): Same.
7968 (vr_values::extract_range_from_comparison): Same.
7969 (vr_values::check_for_binary_op_overflow): Same.
7970 (vr_values::extract_range_basic): Same.
7971 (vr_values::extract_range_from_assignment): Same.
7972 (compare_ranges): Same.
7973 (compare_range_with_value): Same.
7974 (vr_values::adjust_range_with_scev): Same.
7975 (vrp_valueize): Same.
7976 (vrp_valueize_1): Same.
7977 (vr_values::get_vr_for_comparison): Same.
7978 (vr_values::compare_name_with_value): Same.
7979 (vr_values::compare_names): Same.
7980 (vr_values::vrp_evaluate_conditional): Same.
7981 (find_case_label_ranges): Same.
7982 (vr_values::vrp_visit_switch_stmt): Same.
7983 (vr_values::extract_range_from_phi_node): Same.
7984 (vr_values::simplify_div_or_mod_using_ranges): Same.
7985 (vr_values::simplify_bit_ops_using_ranges): Same.
7986 (test_for_singularity): Same.
7987 (range_fits_type_p): Same.
7988 (vr_values::simplify_cond_using_ranges_1): Same.
7989 (vr_values::simplify_switch_using_ranges): Same.
7990 (vr_values::simplify_float_conversion_using_ranges): Same.
7991 (vr_values::two_valued_val_range_p): Same.
7992 (vr_values::add_equivalence): Move to value_range::equiv_add.
7993 * vr-values.h (vr_values::add_equivalence): Remove.
7994 (VR_INITIALIZER): Remove.
7995 * tree-vrp.c (value_range::set): New.
7996 (value_range::equiv_add): New.
7997 (value_range::value_range): New.
7998 (value_range::deep_copy): New.
7999 (value_range::check): New.
8000 (value_range::equal_p): New.
8001 (value_range::ignore_equivs_equal_p): New.
8002 (value_range::operator==): New.
8003 (value_range::operator!=): New.
8004 (value_range::symbolic_p): New.
8005 (value_range::numeric_p): New.
8006 (value_range::set_undefined): New.
8007 (value_range::set_varying): New.
8008 (value_range::may_contain_p): New.
8009 (value_range::equiv_clear): New.
8010 (value_range::singleton_p): New.
8011 (value_range::intersect): New.
8012 (value_range::dump): New.
8013 (value_range::set_and_canonicalize): New.
8014 (set_value_range): Adjust for value_range API.
8015 (set_value_range_to_undefined): Same.
8016 (set_value_range_to_varying): Same.
8017 (set_and_canonicalize_value_range): Same.
8018 (set_value_range_to_nonnull): Same.
8019 (set_value_range_to_null): Same.
8020 (range_is_null): Same.
8021 (range_is_nonnull): Same.
8022 (range_int_cst_p): Same.
8023 (range_int_cst_singleton_p): Same.
8024 (symbolic_range_p): Same.
8025 (range_includes_zero_p): Same.
8026 (value_range_constant_singleton): Same.
8027 (vrp_set_zero_nonzero_bits): Same.
8028 (ranges_from_anti_range): Same.
8029 (extract_range_into_wide_ints): Same.
8030 (extract_range_from_multiplicative_op): Same.
8031 (set_value_range_with_overflow): Same.
8032 (extract_range_from_binary_expr_1): Same.
8033 (extract_range_from_unary_expr): Same.
8034 (dump_value_range): Same.
8035 (debug_value_range): Same.
8036 (vrp_prop::check_array_ref): Same.
8037 (vrp_prop::check_mem_ref): Same.
8038 (vrp_prop::vrp_initialize): Same.
8039 (vrp_prop::visit_stmt): Same.
8040 (intersect_ranges): Same.
8041 (vrp_prop::visit_phi): Same.
8042 (vrp_prop::vrp_finalize): Same.
8043 (determine_value_range_1): Same.
8044 (determine_value_range): Same.
8045 (vrp_intersect_ranges_1): Rename to...
8046 (vrp_intersect_1): this.
8047 (vrp_intersect_ranges): Rename to...
8048 (value_range::intersect_helper): ...this.
8049 (vrp_meet_1): Rename to...
8050 (value_range::union_helper): ...this.
8051 (vrp_meet): Rename to...
8052 (value_range::union_): ...this.
8053 (copy_value_range): Remove.
8054 * tree-vrp.h (struct value_range): Rewrite into a proper class.
8055 (value_range::vrtype): New.
8056 (value_range::type): New.
8057 (value_range::equiv): New.
8058 (value_range::min): New.
8059 (value_range::max): New.
8060 (value_range::varying_p): New.
8061 (value_range::undefined_p): New.
8062 (value_range::null_p): New.
8063 (value_range::equiv_add): New.
8064 (copy_value_range): Remove.
8065
8066 2018-10-17 David Malcolm <dmalcolm@redhat.com>
8067
8068 * Makefile.in (SELFTEST_TARGETS): New.
8069 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
8070 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
8071 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
8072 c/Make-lang.in.
8073 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
8074 (selftest-c++-gdb, selftest-c++-valgrind): Move to
8075 cp/Make-lang.in.
8076 * configure: Regenerate.
8077 * configure.ac (selftest_languages): New.
8078
8079 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
8080
8081 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
8082 overflow wraps argument.
8083 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
8084 wide_int_range_multiplicative_op.
8085 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
8086 overflow wraps argument.
8087 (wide_int_range_multiplicative_op): Same.
8088 (wide_int_range_lshift): Same.
8089 (wide_int_range_div): Same.
8090 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
8091 (wide_int_range_lshift): Same.
8092 (wide_int_range_div): Same.
8093
8094 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
8095
8096 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
8097 use sign as argument.
8098 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
8099 wide_int_range_shift_undefined_p.
8100
8101 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8102
8103 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
8104 Rename to...
8105 (@despeculate_copy<ALLI_TI:mode>): ... This.
8106 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
8107 switch statement.
8108
8109 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8110
8111 * config.gcc: Obsolete *-*-solaris2.10*.
8112 * doc/install.texi (Specific, *-*-solaris2*): Document it.
8113
8114 2018-10-12 Jeff Law <law@redhat.com>
8115
8116 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
8117 reg + sym +- const_int addressing modes.
8118
8119 2018-10-15 David Malcolm <dmalcolm@redhat.com>
8120
8121 * common.opt (fdiagnostics-minimum-margin-width=): New option.
8122 * diagnostic-show-locus.c (layout::layout): Apply the minimum
8123 margin width.
8124 (layout::start_annotation_line): Only print up to 3 of the
8125 margin character, to avoid touching the left-hand side.
8126 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
8127 minimum margin width, as set by test_diagnostic_context's ctor.
8128 (selftest::test_fixit_insert_containing_newline): Likewise.
8129 (selftest::test_fixit_insert_containing_newline_2): Likewise.
8130 (selftest::test_line_numbers_multiline_range): Clear
8131 dc.min_margin_width.
8132 * diagnostic.c (diagnostic_initialize): Initialize
8133 min_margin_width.
8134 * diagnostic.h (struct diagnostic_context): Add field
8135 "min_margin_width".
8136 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
8137 * opts.c (common_handle_option): Handle
8138 OPT_fdiagnostics_minimum_margin_width_.
8139 * selftest-diagnostic.c
8140 (selftest::test_diagnostic_context::test_diagnostic_context):
8141 Initialize min_margin_width to 6.
8142 * toplev.c (general_init): Initialize global_dc->min_margin_width.
8143
8144 2018-10-15 David Malcolm <dmalcolm@redhat.com>
8145
8146 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
8147 Fix usage of "error_at_rich_loc" in the comment.
8148
8149 2018-10-15 Renlin Li <renlin.li@arm.com>
8150
8151 PR target/87563
8152 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
8153 if-conversioned loop when it contains ifn with types not
8154 supported by backend.
8155 * internal-fn.c (expand_direct_optab_fn): Add an assert.
8156 (direct_internal_fn_supported_p): New helper function.
8157 * internal-fn.h (direct_internal_fn_supported_p): Declare.
8158
8159 2018-10-15 Jakub Jelinek <jakub@redhat.com>
8160
8161 PR target/87572
8162 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8163 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8164 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8165
8166 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
8167
8168 PR tree-optimization/87022
8169 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
8170 bits in dist vector rather than the first one.
8171
8172 2018-10-15 Richard Biener <rguenther@suse.de>
8173
8174 PR middle-end/87610
8175 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
8176 (visit_loadstore): When a used restrict tag escaped verify that
8177 the points-to solution of "other" pointers do not include
8178 escaped.
8179 (compute_dependence_clique): If a used restrict tag escaped
8180 communicated that down to visit_loadstore.
8181
8182 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
8183
8184 * config/s390/s390.c (s390_expand_vec_init): Force vector element
8185 into reg if it isn't a general operand.
8186
8187 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8188
8189 PR target/87599
8190 * config/i386/sse.md (*vec_dupv2di): Add register source to
8191 movddup.
8192
8193 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8194
8195 PR target/87572
8196 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8197 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
8198 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8199 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8200
8201 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
8202
8203 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
8204 (notice_args_size): Set it in the current trace if no insn that can
8205 throw internally has been seen yet.
8206 (connect_traces): When connecting args_size between traces, allow the
8207 incoming values not to match if there is an insn setting it before the
8208 first insn that can throw internally; in that case, force the creation
8209 of a CFI note on this latter insn.
8210
8211 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
8212
8213 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
8214 the base class, because using the injected-class-name was not clearly
8215 specified until DR 176.
8216
8217 2018-10-12 Paul Koning <ni1d@arrl.net>
8218
8219 * config/pdp11/pdp11.md (doloop_end): New expander.
8220 (doloop_end_insn): renamed from "doloop_end".
8221 (addqi3): New pattern.
8222 (subqi3): New pattern.
8223 * config/pdp11/predicates.md (incdec_operand): New predicate.
8224
8225 2018-10-12 Yury Gribov <tetra2005@gmail.com>
8226
8227 PR middle-end/81376
8228 * real.c (format_helper::can_represent_integral_type_p): New function
8229 * real.h (format_helper::can_represent_integral_type_p): Ditto.
8230 * match.pd: New pattern.
8231
8232 2018-10-12 Alexandre Oliva <oliva@adacore.com>
8233
8234 * configure.ac: Introduce --enable-large-address-aware
8235 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
8236 * doc/install.texi: Document it.
8237 * configure, config.in: Rebuilt.
8238 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
8239 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
8240 (LINK_SPEC): Insert it.
8241 * config/i386/mingw-w64.h: Likewise.
8242
8243 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
8244
8245 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
8246
8247 PR rtl-optimization/87600
8248 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
8249
8250 2018-10-12 Paul Koning <ni1d@arrl.net>
8251
8252 * doc/md.texi (doloop_end): Document that the pattern code may
8253 need to check operand mode.
8254
8255 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
8256
8257 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
8258 to zero-extend between int and floating-point registers.
8259 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
8260 ldp into floating-point registers. Add type and arch attributes.
8261 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
8262 Use f_loads for type attribute.
8263
8264 2018-10-11 Martin Sebor <msebor@redhat.com>
8265
8266 * doc/extend.texi (attribute packed): Correct typos.
8267
8268 2018-10-11 Martin Sebor <msebor@redhat.com>
8269
8270 * doc/extend.texi (attribute flatten): Mention interaction with
8271 noinline.
8272
8273 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
8274
8275 PR target/87156
8276 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8277 Set new_decl virtual flag to zero.
8278
8279 2018-10-11 Martin Sebor <msebor@redhat.com>
8280
8281 PR middle-end/87593
8282 * doc/extend.texi (attribute format_arg): Discuss using multiple
8283 attributes on a single function.
8284
8285 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
8286
8287 PR tree-optimization/86829
8288 * match.pd (sin (atan (x))): New simplification rules.
8289 (cos (atan (x))): Likewise.
8290 * real.c (build_sinatan_real): New function.
8291 * real.h (build_sinatan_real): Prototype.
8292
8293 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
8294
8295 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
8296 function.
8297 (fold_mergeeo_helper): New helper function.
8298 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
8299 intrinsics. Correct some whitespace indentation issues.
8300
8301 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
8302
8303 PR target/87511
8304 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
8305 Use HOST_WIDE_INT_1U for shift.
8306
8307 2018-10-11 Doug Rupp <rupp@adacore.com>
8308 Olivier Hainque <hainque@adacore.com>
8309
8310 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
8311 Pass --relax to the linker for RTPs.
8312 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
8313
8314 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
8315 Jan Hubicka <jh@suse.cz>
8316 Martin Jambor <mjambor@suse.cz>
8317
8318 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
8319 the same elements are repeated rather than printing all of them.
8320 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
8321 "repeated" elements.
8322 * read-rtl-function.c (test_loading_repeat): New function.
8323 (read_rtl_function_c_tests): Call test_loading_repeat.
8324 * rtl-tests.c (test_dumping_repeat): New function.
8325 (rtl_tests_c_tests): Call test_dumping_repeat.
8326
8327 2018-10-11 Richard Biener <rguenther@suse.de>
8328
8329 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
8330 bdver?_cost): Unify to ...
8331 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
8332 * config/i386/i386.c (processor_cost_table): Adjust.
8333
8334 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
8335
8336 PR middle-end/87574
8337 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
8338 the thunk when expanding to GIMPLE.
8339
8340 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
8341
8342 PR bootstrap/87551
8343 * varasm.c (mergeable_string_section): Don't try to move zero-length
8344 strings to the merge section.
8345
8346 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
8347
8348 PR target/87573
8349 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
8350
8351 2018-10-10 Jakub Jelinek <jakub@redhat.com>
8352
8353 PR target/87550
8354 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
8355 to special_args set.
8356
8357 2018-10-10 Richard Biener <rguenther@suse.de>
8358
8359 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
8360 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
8361 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
8362 and recursing and pattern terminating the recursion on SSE
8363 vector width using ix86_expand_reduc.
8364 (reduc_sminmax_scal_<mode>): Split into part reducing to half
8365 width and recursing and SSE2 vector variant doing the final
8366 reduction with ix86_expand_reduc.
8367 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
8368 with terminating the recursion at AVX level, splitting that
8369 to SSE there.
8370
8371 2018-10-09 David Malcolm <dmalcolm@redhat.com>
8372
8373 * genmatch.c (error_cb): Rename to...
8374 (diagnostic_cb): ...this, converting int params to enums.
8375 (fatal_at): Update for renaming.
8376 (warning_at): Likewise.
8377 (main): Likewise.
8378 * input.c (selftest::ebcdic_execution_charset::apply):
8379 Update for renaming of...
8380 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
8381 to...
8382 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
8383 converting level and reason to enums.
8384 (class selftest::lexer_error_sink): Rename to...
8385 (class selftest::lexer_test_options): ...this, renaming field
8386 "m_errors" to "m_diagnostics".
8387 (selftest::lexer_test_options::apply): Update for renaming of...
8388 (selftest::lexer_test_options::on_error): ...this, renaming to...
8389 (selftest::lexer_test_options::on_diagnostic): ...this
8390 converting level and reason to enums.
8391 (selftest::test_lexer_string_locations_raw_string_unterminated):
8392 Update for renamings.
8393 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
8394 "reason".
8395
8396 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
8397
8398 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
8399 * config/rs6000/pmmintrin.h: New file.
8400
8401 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
8402
8403 PR tree-optimization/86659
8404 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
8405
8406 2018-10-09 Richard Biener <rguenther@suse.de>
8407
8408 PR tree-optimization/63155
8409 * tree-ssa-structalias.c: Include tree-ssa.h.
8410 (get_constraint_for_ssa_var): For undefs return nothing_id.
8411 (find_func_aliases): Cleanup PHI handling.
8412
8413 2018-10-09 Richard Biener <rguenther@suse.de>
8414
8415 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
8416 replacements.
8417
8418 2018-10-09 Martin Liska <mliska@suse.cz>
8419
8420 * asan.c (asan_emit_stack_protection): If a stack variable
8421 is located in a same file as current function, then emit
8422 line info into variable definition string.
8423
8424 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8425
8426 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
8427 information.
8428
8429 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8430
8431 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
8432 on the thunk.
8433
8434 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8435
8436 PR tree-optimization/86659
8437 * gimple-match.h (struct gimple_match_op): Add reverse field.
8438 (gimple_match_op::set_op): New overloaded method.
8439 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
8440 the REF_REVERSE_STORAGE_ORDER flag on the value.
8441 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
8442 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
8443
8444 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
8445
8446 PR middle-end/63155
8447 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
8448 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
8449
8450 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
8451
8452 PR target/87517
8453 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
8454 Defined with __builtin_ia32_vfmaddsubpd512_mask.
8455
8456 2018-10-08 Richard Biener <rguenther@suse.de>
8457
8458 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
8459 cost the same as AVX128 ones.
8460
8461 2018-10-08 Paul Koning <ni1d@arrl.net>
8462
8463 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
8464 (expand_block_move): New function.
8465 * config/pdp11/pdp11.c (output_block_move): Remove.
8466 (expand_block_move): New function.
8467 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
8468 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
8469 (*movmemhi1): Remove.
8470
8471 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
8472
8473 * config/s390/2827.md: Increase latencies for some FP instructions.
8474
8475 2018-10-08 Richard Biener <rguenther@suse.de>
8476
8477 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8478 Open a dump scope.
8479 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
8480 * tree-vectorizer.h (dump_stmt_cost): Adjust.
8481 (add_stmt_cost): Dump return value of the hook.
8482
8483 2018-10-08 Richard Biener <rguenther@suse.de>
8484
8485 PR tree-optimization/63155
8486 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
8487 (ssa_propagation_engine::ssa_propagate): Remove redundant
8488 bitmap bit clearing.
8489
8490 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
8491
8492 PR rtl-optimization/86939
8493 PR rtl-optimization/87479
8494 * ira.h (non_conflicting_reg_copy_p): New prototype.
8495 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
8496 (make_hard_regno_dead): Don't add conflicts for register
8497 ignore_reg_for_conflicts.
8498 (make_object_dead): Likewise.
8499 (non_conflicting_reg_copy_p): New function.
8500 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
8501 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
8502 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
8503 (make_hard_regno_dead): Don't add conflicts for register
8504 ignore_reg_for_conflicts. Remove special conflict handling of
8505 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
8506 check_pic_pseudo_p and update callers.
8507 (mark_pseudo_dead): Don't add conflicts for register
8508 ignore_reg_for_conflicts.
8509 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
8510
8511 2018-10-05 Andrew Waterman <andrew@sifive.com>
8512 Jim Wilson <jimw@sifive.com>
8513
8514 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
8515 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
8516 new pattern using HONOR_SNANS that emits one extra instruction.
8517
8518 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8519
8520 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
8521 patterns): Merge SI and DI patterns to a GPR pattern.
8522 (unnamed define_insn and define_split for record form of that): Merge
8523 to a single define_insn_and_split pattern.
8524
8525 2018-10-05 David Malcolm <dmalcolm@redhat.com>
8526
8527 PR c++/56856
8528 * input.c (expand_location_to_spelling_point): Add param "aspect"
8529 and use rather than hardcoding LOCATION_ASPECT_CARET.
8530 (get_substring_ranges_for_loc): Handle the case of a single token
8531 within a macro expansion.
8532 * input.h (expand_location_to_spelling_point): Add "aspect" param,
8533 defaulting to LOCATION_ASPECT_CARET.
8534
8535 2018-10-05 Paul Koning <ni1d@arrl.net>
8536
8537 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
8538 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
8539 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
8540 (pdp11_guard_type): New function.
8541
8542 2018-10-05 Paul Koning <ni1d@arrl.net>
8543
8544 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
8545 * config/pdp11/pdp11.opt (mfloat32): Remove.
8546 (mfloat64): Remove.
8547 * doc/invoke.texi (pdp11 -mfloat32): Remove:
8548 (pdp11 -mfloat64): Remove.
8549
8550 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8551
8552 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
8553 (*cmp<mode>_cc_i387): Ditto.
8554 (*cmpu<mode>_cc_i387): Ditto.
8555 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8556 * config/i386/i386.c (ix86_expand_fp_compare): Remove
8557 "scratch" argument.
8558 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
8559 Emit x86_sahf_1 pattern.
8560 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
8561 (ix86_expand_carry_flag_compare): Ditto.
8562
8563 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8564
8565 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
8566 to reg_or_0_operand. Add "C" constraint.
8567 (*cmpxf_cc_i387): Ditto.
8568 (*cmp<mode>_i387): Change operand 2 predicate
8569 to nonimm_or_0_operand. Add "C" constraint.
8570 (*cmp<mode>_cc_i387): Ditto.
8571 (*cmp<mode>_0_i387): Remove insn pattern.
8572 (*cmp<mode>_0_cc_i387): Ditto.
8573
8574 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8575
8576 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
8577 * config/i386/predicates.md (nonimm_or_0_operand): Rename
8578 from vector_move_operand. Update all uses.
8579
8580 2018-10-05 Martin Sebor <msebor@redhat.com>
8581
8582 PR tree-optimization/87490
8583 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
8584 consistently.
8585
8586 2018-10-05 Richard Biener <rguenther@suse.de>
8587
8588 PR tree-optimization/63155
8589 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
8590 vertical space in dumpfiles.
8591 * tree-ssa-propagate.h
8592 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
8593 * tree-ssa-propagate.c (cfg_blocks_back): New global.
8594 (ssa_edge_worklist_back): Likewise.
8595 (curr_order): Likewise.
8596 (cfg_blocks_get): Remove abstraction.
8597 (cfg_blocks_add): Likewise.
8598 (cfg_blocks_empty_p): Likewise.
8599 (add_ssa_edge): Add to current or next worklist based on
8600 RPO index.
8601 (add_control_edge): Likewise.
8602 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
8603 into ...
8604 (ssa_propagation_engine::ssa_propagate): ... here. Unify
8605 iteration from CFG and SSA edge worklist so we process
8606 everything in RPO order, prioritizing forward progress
8607 over iteration.
8608 (ssa_prop_init): Allocate new worklists, do not dump
8609 immediate uses.
8610 (ssa_prop_fini): Free new worklists.
8611
8612 2018-10-05 Richard Biener <rguenther@suse.de>
8613
8614 * tree-core.h (tree_block::abstract_flag): Remove.
8615 (tree_block::block_num): Make full 32bits.
8616 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
8617 * tree.h (BLOCK_ABSTRACT): Remove.
8618 * dwarf2out.c (gen_lexical_block_die): Remove dead code
8619 resulting from BLOCK_ABSTRACT being always false.
8620 (gen_inlined_subroutine_die): Likewise.
8621 (gen_block_die): Likewise.
8622 * tree.c (block_ultimate_origin): Likewise.
8623 * tree-pretty-print.c (dump_block_node): Remove code dealing
8624 with BLOCK_ABSTRACT.
8625 * tree-ssa-live.c (dump_scope_block): Likewise.
8626 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
8627 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
8628
8629 2018-10-05 Richard Biener <rguenther@suse.de>
8630
8631 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
8632 is asked for initialize mode to the component mode of the
8633 vector type.
8634
8635 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
8636
8637 PR target/87522
8638 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
8639 assembler for -mavx.
8640 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
8641
8642 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8643
8644 PR target/87509
8645 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
8646 RS6000_BTM_DFP.
8647 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
8648 to be DImode. When using mffscrn, force the operand to a register.
8649
8650 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
8651
8652 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
8653 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
8654 X87MODEF mode iterator.
8655 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
8656 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
8657 X87MODEF mode iterator.
8658
8659 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
8660
8661 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
8662 -Wno-prio-ctor-dtor.
8663
8664 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8665
8666 * Makefile.in (OBJS): Add opt-problem.o.
8667 * dump-context.h: Include "selftest.h.
8668 (selftest::temp_dump_context): New forward decl.
8669 (class dump_context): Make friend of class
8670 selftest::temp_dump_context.
8671 (dump_context::dump_loc_immediate): New decl.
8672 (class dump_pretty_printer): Move here from dumpfile.c.
8673 (class temp_dump_context): Move to namespace selftest.
8674 (temp_dump_context::temp_dump_context): Add param
8675 "forcibly_enable_dumping".
8676 (selftest::verify_dumped_text):
8677 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
8678 (selftest::verify_item):
8679 (ASSERT_IS_TEXT): Move here from dumpfile.c.
8680 (ASSERT_IS_TREE): Likewise.
8681 (ASSERT_IS_GIMPLE): Likewise.
8682 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
8683 to...
8684 (dump_context::dump_loc_immediate): ...this new function.
8685 (class dump_pretty_printer): Move to dump-context.h.
8686 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
8687 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
8688 (temp_dump_context::temp_dump_context): Move to "selftest"
8689 namespace. Add param "forcibly_enable_dumping", and use it to
8690 conditionalize the use of m_pp;
8691 (selftest::verify_dumped_text): Make non-static.
8692 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
8693 (selftest::verify_item): Make non-static.
8694 (ASSERT_IS_TEXT): Move to dump-context.h.
8695 (ASSERT_IS_TREE): Likewise.
8696 (ASSERT_IS_GIMPLE): Likewise.
8697 (selftest::test_capture_of_dump_calls): Pass "true" for new
8698 param of temp_dump_context.
8699 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
8700 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
8701 TDF_COMPARE_DEBUG.
8702 * opt-problem.cc: New file.
8703 * opt-problem.h: New file.
8704 * optinfo-emit-json.cc
8705 (selftest::test_building_json_from_dump_calls): Pass "true" for
8706 new param of temp_dump_context.
8707 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
8708 (optinfo::emit_for_opt_problem): New function.
8709 (optinfo::emit): Clarity which emit_item is used.
8710 * optinfo.h (optinfo::get_dump_location): New accessor.
8711 (optinfo::emit_for_opt_problem): New decl.
8712 (optinfo::emit): Make const.
8713 * selftest-run-tests.c (selftest::run_tests): Call
8714 selftest::opt_problem_cc_tests.
8715 * selftest.h (selftest::opt_problem_cc_tests): New decl.
8716 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
8717 bool to opt_result, converting fprintf messages to
8718 opt_result::failure_at calls. Add "stmt" param for use by the
8719 failure_at calls.
8720 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
8721 (runtime_alias_check_p): Convert return type from bool to
8722 opt_result, converting dump_printf calls to
8723 opt_result::failure_at, using the statement DDR_A for their
8724 location.
8725 (find_data_references_in_stmt): Convert return type from bool to
8726 opt_result, converting "return false" to opt_result::failure_at
8727 with a new message.
8728 * tree-data-ref.h: Include "opt-problem.h".
8729 (dr_analyze_innermost): Convert return type from bool to opt_result,
8730 and add a const gimple * param.
8731 (find_data_references_in_stmt): Convert return type from bool to
8732 opt_result.
8733 (runtime_alias_check_p): Likewise.
8734 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
8735 dr_analyze_innermost.
8736 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
8737 Convert return type from bool to opt_result, adding a message for
8738 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
8739 (vect_analyze_data_ref_dependence): Convert return type from bool
8740 to opt_result. Change sense of return type from "false"
8741 effectively meaning "no problems" to "false" meaning a problem,
8742 so that "return false" becomes "return opt_result::success".
8743 Convert "return true" calls to opt_result::failure_at, using
8744 the location of statement A rather than vect_location.
8745 (vect_analyze_data_ref_dependences): Convert return type from bool
8746 to opt_result.
8747 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
8748 calls to opt_result::failure_at, using the stmt location rather
8749 than vect_location.
8750 (vect_verify_datarefs_alignment): Convert return type from bool
8751 to opt_result.
8752 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
8753 into multiple more-tightly-scoped copies.
8754 (vect_analyze_data_refs_alignment): Convert return type from bool
8755 to opt_result.
8756 (vect_analyze_data_ref_accesses): Likewise, converting a
8757 "return false" to a "return opt_result::failure_at", adding a
8758 new message.
8759 (vect_prune_runtime_alias_test_list): Convert return type from
8760 bool to opt_result, converting dump_printf_loc to
8761 opt_result::failure_at. Add a %G to show the pertinent statement,
8762 and use the stmt's location rather than vect_location.
8763 (vect_find_stmt_data_reference): Convert return type from
8764 bool to opt_result, converting dump_printf_loc to
8765 opt_result::failure_at, using stmt's location.
8766 (vect_analyze_data_refs): Convert return type from bool to
8767 opt_result. Convert "return false" to "return
8768 opt_result::failure_at", adding messages as needed.
8769 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
8770 type from bool to opt_result.
8771 (vect_determine_vf_for_stmt): Likewise.
8772 (vect_determine_vectorization_factor): Likewise, converting
8773 dump_printf_loc to opt_result::failure_at, using location of phi
8774 rather than vect_location.
8775 (vect_analyze_loop_form_1): Convert return type from bool to
8776 opt_result, converting dump_printf_loc calls, retaining the use of
8777 vect_location.
8778 (vect_analyze_loop_form): Convert return type from loop_vec_info
8779 to opt_loop_vec_info.
8780 (vect_analyze_loop_operations): Convert return type from bool to
8781 opt_result, converting dump_printf_loc calls, using the location
8782 of phi/stmt rather than vect_location where available. Convert
8783 various "return false" to "return opt_result::failure_at" with
8784 "unsupported phi" messages.
8785 (vect_get_datarefs_in_loop): Convert return type from bool to
8786 opt_result. Add a message for the
8787 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
8788 (vect_analyze_loop_2): Convert return type from bool to
8789 opt_result. Ensure "ok" is set to a opt_result::failure_at before
8790 each "goto again;", adding new messages where needed.
8791 Add "unsupported grouped {store|load}" messages.
8792 (vect_analyze_loop): Convert return type from loop_vec_info to
8793 opt_loop_vec_info.
8794 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
8795 bool to opt_result.
8796 * tree-vect-stmts.c (process_use): Likewise, converting
8797 dump_printf_loc call and using stmt location, rather than
8798 vect_location.
8799 (vect_mark_stmts_to_be_vectorized): Likeise.
8800 (vect_analyze_stmt): Likewise, adding a %G.
8801 (vect_get_vector_types_for_stmt): Convert return type from bool to
8802 opt_result, converting dump_printf_loc calls and using stmt
8803 location, rather than vect_location.
8804 (vect_get_mask_type_for_stmt): Convert return type from tree to
8805 opt_tree, converting dump_printf_loc calls and using stmt location.
8806 * tree-vectorizer.c: Include "opt-problem.h.
8807 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
8808 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
8809 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
8810 enabled, use it to report at the top level "couldn't vectorize
8811 loop" followed by the problem.
8812 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
8813 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
8814 to opt_result.
8815 (vect_analyze_stmt): Likewise.
8816 (vect_get_vector_types_for_stmt): Likewise.
8817 (tree vect_get_mask_type_for_stmt): Likewise.
8818 (vect_analyze_data_ref_dependences): Likewise.
8819 (vect_enhance_data_refs_alignment): Likewise.
8820 (vect_analyze_data_refs_alignment): Likewise.
8821 (vect_verify_datarefs_alignment): Likewise.
8822 (vect_analyze_data_ref_accesses): Likewise.
8823 (vect_prune_runtime_alias_test_list): Likewise.
8824 (vect_find_stmt_data_reference): Likewise.
8825 (vect_analyze_data_refs): Likewise.
8826 (vect_analyze_loop): Convert return type from loop_vec_info to
8827 opt_loop_vec_info.
8828 (vect_analyze_loop_form): Likewise.
8829 (vect_analyze_slp): Convert return type from bool to opt_result.
8830
8831 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8832
8833 * doc/invoke.texi (-fopt-info): Document new "internals"
8834 sub-option.
8835 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
8836 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
8837 MSG_ALL_KINDS.
8838 (optinfo_verbosity_options): Add "internals".
8839 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
8840 (dump_context::apply_dump_filter_p): New member function.
8841 (dump_context::dump_loc): Use apply_dump_filter_p rather than
8842 explicitly masking the dump_kind.
8843 (dump_context::begin_scope): Increment the scope depth first. Use
8844 apply_dump_filter_p rather than explicitly masking the dump_kind.
8845 (dump_context::emit_item): Use apply_dump_filter_p rather than
8846 explicitly masking the dump_kind.
8847 (dump_dec): Likewise.
8848 (dump_hex): Likewise.
8849 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
8850 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
8851 (opt_info_switch_p): Update handling of default
8852 MSG_OPTIMIZED_LOCATIONS to cope with default of
8853 MSG_PRIORITY_USER_FACING.
8854 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
8855 masking the dump_kind.
8856 (selftest::test_capture_of_dump_calls): Update test_dump_context
8857 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
8858 than MSG_ALL. Generalize scope test to be run at all four
8859 combinations of with/without MSG_PRIORITY_USER_FACING and
8860 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
8861 for each of the two values.
8862 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
8863 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
8864 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
8865 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
8866 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
8867 with MSG_PRIORITY_*.
8868 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
8869 dump messages as MSG_PRIORITY_USER_FACING.
8870 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
8871 about the interaction with MSG_PRIORITY_*.
8872
8873 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
8874
8875 * varasm.c (output_constant): Add new parameter merge_strings.
8876 Make strings properly zero terminated in merge string sections.
8877 (mergeable_string_section): Don't fail if the last char is non-zero.
8878 (assemble_variable_contents): Handle merge string sections.
8879 (assemble_variable): Likewise.
8880 (assemble_constant_contents): Likewise.
8881 (output_constant_def_contents): Likewise.
8882 (output_constructor_array_range,
8883 output_constructor_regular_field): Adjust call to output_constant.
8884 (output_object_block): Adjust call to assemble_constant_contents
8885 and assemble_variable_contents.
8886
8887 2018-10-04 Martin Liska <mliska@suse.cz>
8888
8889 PR c/87483
8890 * cgraphunit.c (process_function_and_variable_attributes):
8891 Warn about a function with alias attribute and a body.
8892
8893 2018-10-04 Martin Liska <mliska@suse.cz>
8894
8895 PR ipa/82625
8896 * multiple_target.c (redirect_to_specific_clone): New function.
8897 (ipa_target_clone): Use it.
8898 * tree-inline.c: Fix comment.
8899
8900 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8901
8902 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
8903 fields.
8904 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
8905 (gcc::dump_manager::register_pass): New member function, adapted
8906 from loop body in gcc::pass_manager::register_pass, adding a
8907 call to update_dfi_for_opt_info.
8908 (gcc::dump_manager::opt_info_enable_passes): Store the
8909 -fopt-info options into the new fields. Move the loop
8910 bodies into...
8911 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
8912 function.
8913 * dumpfile.h (struct opt_pass): New forward decl.
8914 (gcc::dump_manager::register_pass): New decl.
8915 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
8916 (class gcc::dump_manager): Add fields "m_optgroup_flags",
8917 "m_optinfo_flags", and "m_optinfo_filename".
8918 * passes.c (gcc::pass_manager::register_pass): Move all of the
8919 dump-handling code to gcc::dump_manager::register_pass.
8920
8921 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
8922
8923 PR rtl-optimization/87466
8924 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
8925 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
8926 * doc/tm.texi: Regenerate.
8927 * ira-lives.c (process_bb_node_lives): Use the new target hook.
8928 * lra-lives.c (process_bb_lives): Likewise.
8929 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
8930 Define.
8931
8932 2018-10-04 Tamar Christina <tamar.christina@arm.com>
8933
8934 * params.c (add_params): Fix initialization.
8935
8936 2018-10-04 Martin Liska <mliska@suse.cz>
8937
8938 PR gcov-profile/84107
8939 * tree-profile.c (init_ic_make_global_vars):
8940 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
8941 Come up with new ic_tuple* variables. Emit
8942 __gcov_indirect_call{,_topn} variables.
8943 (gimple_gen_ic_profiler): Access the variable
8944 and emit gimple.
8945 (gimple_gen_ic_func_profiler): Access
8946 __gcov_indirect_call.callee field.
8947 (gimple_init_gcov_profiler): Use ptr_type_node.
8948 * value-prof.c (gimple_ic): Use ptr_type_node.
8949
8950 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8951
8952 PR tree-optimization/85787
8953 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
8954 malloc_candidate_p into this function and add support for
8955 detecting multiple phis.
8956 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
8957
8958 2018-10-04 Martin Liska <mliska@suse.cz>
8959
8960 PR ipa/87491
8961 * ipa-inline.c (inline_to_all_callers_1):
8962 Call ultimate_alias_target for node being inlined.
8963
8964 2018-10-03 Jeff Law <law@redhat.com>
8965
8966 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
8967 target's wchar_t.
8968 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
8969 * tree.h (get_typenode_from_name): Prototype.
8970
8971 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
8972
8973 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
8974 Change operand 2 predicate to nonimmediate_operand.
8975 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8976
8977 2018-10-03 Martin Sebor <msebor@redhat.com>
8978 Jeff Law <law@redhat.com>
8979
8980 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
8981 initialize it.
8982 (get_string_length): Detect unterminated arrays.
8983 (format_string): Same.
8984 (format_directive): Warn about unterminated arrays.
8985 (handle_gimple_call): Mark statements with no_warning as needed.
8986
8987 2018-10-03 Jim Wilson <jimw@sifive.com>
8988
8989 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
8990 also define __riscv_abi_rve. Delete trailing white space.
8991
8992 2018-10-03 Paul Koning <ni1d@arrl.net>
8993
8994 Enable LRA register allocator for PDP11.
8995 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
8996 (R): Likewise.
8997 (D): Likewise.
8998 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
8999 * config/pdp11/pdp11.opt (-mlra): New option.
9000 * doc/invoke.texi (PDP-11 Options): Document -mlra.
9001
9002 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
9003
9004 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
9005 (*<absneg:code>extend<mode>xf2): Ditto.
9006
9007 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
9008
9009 PR tree-optimization/87415
9010 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
9011 precision fields.
9012
9013 2018-10-02 Jeff Law <law@redhat.com>
9014
9015 * gimple-fold.c (get_range_strlen): Only set *nonstr when
9016 an unterminated string is discovered. Bubble up range
9017 even for unterminated strings.
9018 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
9019 indicates the string was not terminated via NONSTR.
9020
9021 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
9022
9023 * tree-vrp.c (extract_range_from_unary_expr): Special case all
9024 pointer conversions.
9025 Do not do anything special for anti-ranges.
9026
9027 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
9028
9029 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
9030 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
9031
9032 2018-10-03 Martin Liska <mliska@suse.cz>
9033
9034 PR gcov-profile/86109
9035 * coverage.c (coverage_begin_function): Do not
9036 mark lambdas as artificial.
9037 * tree-core.h (struct GTY): Remove tm_clone_flag
9038 and introduce new lambda_function.
9039 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
9040
9041 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
9042
9043 PR target/87474
9044 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
9045 P8_VECTOR and VSX are enabled.
9046
9047 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
9048
9049 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
9050 0x3907 as CPU model number.
9051
9052 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
9053
9054 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
9055 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
9056 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
9057 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
9058 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
9059 * config/s390/s390.md: Likewise. Rename also the cpu attribute
9060 value from arch12 to z14.
9061
9062 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
9063
9064 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
9065 (isinfxf2): Ditto.
9066 (isinf<mode>2): Ditto.
9067
9068 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
9069
9070 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
9071 before emitting fxam. Perform calculations in XFmode.
9072
9073 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
9074
9075 * match.pd (((X /[ex] A) +- B) * A): New transformation.
9076
9077 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
9078
9079 PR middle-end/87319
9080 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
9081 * tree.c (signed_or_unsigned_type_for): Handle complex.
9082
9083 2018-10-02 Jeff Law <law@redhat.com>
9084
9085 * gimple-fold.c (get_range_strlen): Remove dead code.
9086
9087 2018-10-02 Martin Sebor <msebor@redhat.com>
9088 Jeff Law <law@redhat.com>
9089
9090 * builtins.c (unterminated_array): Add new arguments.
9091 If argument is not terminated, bubble up size and exact
9092 state to callers.
9093 (expand_builtin_strnlen): Detect, avoid expanding
9094 and diagnose unterminated arrays.
9095 (c_strlen): Fill in offset of start of unterminated strings.
9096 * builtins.h (unterminated_array): Update prototype.
9097
9098 2018-10-02 Richard Biener <rguenther@suse.de>
9099
9100 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
9101 of haddv4df, first reduce to SSE width and exploit the fact
9102 that we only need element zero with the reduction result.
9103 (reduc_plus_scal_v2df): Likewise.
9104
9105 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
9106
9107 * dojump.h (do_jump): Delete.
9108 (do_jump_1): Likewise.
9109 (split_comparison): Move around.
9110 * dojump.c (do_jump): Make static.
9111 (do_jump_1): Likewise.
9112 (jumpifnot): Move around.
9113 (jumpifnot_1): Likewise.
9114 (jumpif): Likewise.
9115 (jumpif_1): Likewise.
9116 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
9117
9118 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
9119
9120 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
9121 insns in the delay slot and add_insn_after for the jump insn.
9122
9123 2018-10-02 Richard Biener <rguenther@suse.de>
9124
9125 * tree-inline.c (expand_call_inline): Use the location of
9126 the callee declaration for the inline-entry marker.
9127 * final.c (notice_source_line): Remove special-casing of
9128 NOTE_INSN_INLINE_ENTRY.
9129
9130 2018-10-01 Carl Love <cel@us.ibm.com>
9131
9132 PR 69431
9133 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
9134 (__builtin_mtfsb0): New.
9135 (__builtin_mtfsb1): New.
9136 ( __builtin_set_fpscr_rn): New.
9137 (__builtin_set_fpscr_drn): New.
9138 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
9139 (rs6000_expand_set_fpscr_rn_builtin): Add.
9140 (rs6000_expand_set_fpscr_drn_builtin): Add.
9141 (rs6000_expand_builtin): Add case statement entries for
9142 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
9143 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
9144 RS6000_BUILTIN_MFFSL.
9145 (rs6000_init_builtins): Add ftype initialization and def_builtin
9146 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
9147 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
9148 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
9149 rs6000_mffscdrn): Add define_insn.
9150 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
9151 * doc/extend.texi: Add documentation for the builtins.
9152
9153 2018-10-01 Richard Biener <rguenther@suse.de>
9154
9155 PR tree-optimization/87465
9156 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
9157 causing branch miscounts.
9158
9159 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9160
9161 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
9162 aarch64_option_default_param): New.
9163 (params.h): Include.
9164 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
9165 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
9166 stack-clash protection validation code.
9167
9168 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9169
9170 * params.c (validate_param): New.
9171 (add_params): Use it.
9172 (set_param_value): Refactor param validation into validate_param.
9173 (diagnostic.h): Include.
9174 * diagnostic.h (diagnostic_ready_p): New.
9175
9176 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9177
9178 * params.c (set_param_value):
9179 Add index of parameter being validated.
9180 * common/common-target.def (option_validate_param): New.
9181 * common/common-targhooks.h (default_option_validate_param): New.
9182 * common/common-targhooks.c (default_option_validate_param): New.
9183 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
9184 * doc/tm.texi: Regenerate.
9185
9186 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9187
9188 PR target/86486
9189 * config/aarch64/aarch64.c (aarch64_override_options_internal):
9190 Add validation for stack-clash parameters and set defaults.
9191
9192 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9193
9194 PR target/86486
9195 * configure.ac: Add stack-clash-protection-guard-size.
9196 * doc/install.texi: Document it.
9197 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
9198 * params.def: Update comment for guard-size.
9199 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
9200 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
9201 * configure: Regenerate.
9202
9203 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9204
9205 PR target/86486
9206 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
9207 STACK_DYNAMIC_OFFSET): New.
9208 * config/aarch64/aarch64.c (aarch64_layout_frame):
9209 Update outgoing args size.
9210 (aarch64_stack_clash_protection_alloca_probe_range,
9211 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9212
9213 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9214
9215 PR target/86486
9216 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
9217 probe ranges.
9218 * target.def (stack_clash_protection_alloca_probe_range): New.
9219 (stack_clash_protection_final_dynamic_probe): Remove.
9220 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
9221 (default_stack_clash_protection_final_dynamic_probe): Remove.
9222 * targhooks.c: Likewise.
9223 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9224 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
9225 * doc/tm.texi: Regenerate.
9226
9227 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9228
9229 PR target/86486
9230 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
9231 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
9232 aarch64_clamp_to_uimm12_shift): New.
9233 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
9234 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
9235
9236 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9237
9238 PR target/86486
9239 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
9240
9241 2018-10-01 Jeff Law <law@redhat.com>
9242 Richard Sandiford <richard.sandiford@linaro.org>
9243 Tamar Christina <tamar.christina@arm.com>
9244
9245 PR target/86486
9246 * config/aarch64/aarch64.md
9247 (probe_stack_range): Add k (SP) constraint.
9248 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
9249 STACK_CLASH_MAX_UNROLL_PAGES): New.
9250 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
9251 stack probes for stack clash.
9252 (aarch64_allocate_and_probe_stack_space): New.
9253 (aarch64_expand_prologue): Use it.
9254 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
9255 (aarch64_sub_sp): Add emit_move_imm optional param.
9256
9257 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
9258
9259 PR tree-optimization/87261
9260 * match.pd: Remove trailing whitespace.
9261 Add (x & y) | ~(x | y) -> ~(x ^ y),
9262 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
9263
9264 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9265
9266 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
9267 constraints.
9268 (ashlsi3_insn): Update instruction constraints.
9269 (ashrsi3_insn): Likewise.
9270 (rotrsi3): Likewise.
9271 (add_shift): Likewise.
9272 * config/arc/constraints.md (Csz): New 32 bit constraint. It
9273 avoids placing in the limm field small constants which, otherwise,
9274 could end into a small instruction.
9275
9276 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9277
9278 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
9279 destination register is not odd-even.
9280 (umaddsidi4_split): Likewise.
9281
9282 2018-10-01 Richard Biener <rguenther@suse.de>
9283
9284 * tree-inline.c (expand_call_inline): Store origin of fn
9285 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
9286 * tree.c (block_ultimate_origin): Simplify and do some
9287 checking.
9288
9289 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
9290
9291 * config/i386/mmx.md (EMMS): New int iterator.
9292 (emms): New int attribute.
9293 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
9294 EMMS int iterator. Explicitly declare clobbers.
9295 (mmx_emms): Remove expander.
9296 (mmx_femms): Ditto.
9297 * config/i386/predicates.md (emms_operation): Remove predicate.
9298 (vzeroall_pattern): New predicate.
9299 (vzeroupper_pattern): Rename from vzeroupper_operation.
9300 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
9301 vzeroupper_pattern and vzeroall_pattern predicates.
9302
9303 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
9304
9305 PR rtl-optimization/86939
9306 * ira-lives.c (make_hard_regno_born): Rename from this...
9307 (make_hard_regno_live): ... to this. Remove update to conflict
9308 information. Update function comment.
9309 (make_hard_regno_dead): Add conflict information update. Update
9310 function comment.
9311 (make_object_born): Rename from this...
9312 (make_object_live): ... to this. Remove update to conflict information.
9313 Update function comment.
9314 (make_object_dead): Add conflict information update. Update function
9315 comment.
9316 (mark_pseudo_regno_live): Call make_object_live.
9317 (mark_pseudo_regno_subword_live): Likewise.
9318 (mark_hard_reg_dead): Update function comment.
9319 (mark_hard_reg_live): Call make_hard_regno_live.
9320 (process_bb_node_lives): Likewise.
9321 * lra-lives.c (make_hard_regno_born): Rename from this...
9322 (make_hard_regno_live): ... to this. Remove update to conflict
9323 information. Remove now uneeded check_pic_pseudo_p argument.
9324 Update function comment.
9325 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
9326 to conflict information. Update function comment.
9327 (mark_pseudo_live): Remove update to conflict information. Update
9328 function comment.
9329 (mark_pseudo_dead): Add conflict information update.
9330 (mark_regno_live): Call make_hard_regno_live.
9331 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
9332 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
9333
9334 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
9335
9336 PR target/87370
9337 * config/i386/i386.c (construct_container): Use TImode for
9338 BLKmode values in 2 integer registers.
9339
9340 2018-09-29 Jeff Law <law@redhat.com>
9341
9342 * builtins.c (unterminated_array): Pass in c_strlen_data * to
9343 c_strlen rather than just a tree *.
9344 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
9345 Update recursive calls appropriately. If caller did not provide a
9346 suitable data pointer, create a local one. When a non-terminated
9347 string is discovered, bubble up information about the string via the
9348 c_strlen_data object.
9349 * builtins.h (c_strlen): Update prototype.
9350 (c_strlen_data): New structure.
9351 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
9352 For a type 2 call, if c_strlen indicates a non-terminated string
9353 use the length of the non-terminated string.
9354 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
9355
9356 2018-09-29 Jakub Jelinek <jakub@redhat.com>
9357
9358 PR target/87467
9359 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
9360 __m512d type for __A argument rather than __m512.
9361
9362 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
9363
9364 * match.pd (simple_comparison): Don't optimize if either operand is
9365 a function pointer when target needs function pointer canonicalization.
9366
9367 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9368
9369 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
9370 power5 .. power9 to remove indirection.
9371 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
9372 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
9373 ASM_CPU_476_SPEC): Delete.
9374 (ASM_CPU_SPEC): Adjust.
9375 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
9376 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
9377
9378 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9379
9380 * config.in: Delete HAVE_AS_DCI.
9381 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
9382 * config/rs6000/rs6000.h: Ditto.
9383 * configure.ac: Delete HAVE_AS_DCI.
9384 * configure: Regenerate.
9385
9386 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9387
9388 * config.in (HAVE_AS_LWSYNC): Delete.
9389 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9390 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
9391 do it as a .long .
9392 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9393 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
9394 as a .long .
9395 * configure.ac: Delete HAVE_AS_LWSYNC.
9396 * configure: Regenerate.
9397
9398 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9399 Pierre-Marie de Rodat <derodat@adacore.com>
9400
9401 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
9402 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
9403 (cgraph_node::create_thunk): Add indirect_offset parameter.
9404 (thunk_adjust): Likewise.
9405 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
9406 and initialize the corresponding field with it.
9407 (cgraph_node::dump): Dump indirect_offset field.
9408 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
9409 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
9410 (thunk_adjust): Add indirect_offset parameter and deal with it.
9411 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
9412 pass it to thunk_adjust. Do not call the target hook if it's non-zero
9413 or if the thunk is external or local. Fix formatting. Do not chain
9414 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
9415 if any, in the GIMPLE representation.
9416 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
9417 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
9418 (input_node): Read indirect_offset field.
9419 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
9420 call to thunk_adjust.
9421 * tree-nested.c (struct nesting_info): Add thunk_p field.
9422 (create_nesting_tree): Set it.
9423 (convert_all_function_calls): Copy static chain from targets to thunks.
9424 (finalize_nesting_tree_1): Return early for thunks.
9425 (unnest_nesting_tree_1): Do not finalize thunks.
9426 (gimplify_all_functions): Do not gimplify thunks.
9427
9428 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9429
9430 * opt-suggestions.c (option_proposer::build_option_suggestions):
9431 Release "option_values".
9432
9433 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9434
9435 * coverage.c (get_coverage_counts): Convert problem-reporting dump
9436 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
9437 * dumpfile.c (kind_as_string): New function.
9438 (dump_loc): Rather than a hardcoded prefix of "note: ", use
9439 kind_as_string to vary the prefix based on dump_kind.
9440 (selftest::test_capture_of_dump_calls): Update for above.
9441
9442 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9443
9444 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
9445 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
9446
9447 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9448
9449 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
9450 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
9451 INVALID_REGNUM instead of FPSR_REG.
9452 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
9453 * config/i386/i386.md: Update comment of FP compares.
9454 (fldenv): Do not clobber FPSR_REG.
9455
9456 2018-09-28 Richard Biener <rguenther@suse.de>
9457
9458 * tree.h (BLOCK_ORIGIN): New.
9459 * omp-expand.c (grid_expand_target_grid_body): Assign
9460 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
9461 * tree-inline.c (remap_block): Likewise.
9462 * auto-profile.c (get_function_decl_from_block): Simplify
9463 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
9464 * langhooks.c (lhd_print_error_function): Likewise.
9465 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
9466 Likewise.
9467 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9468 * tree.c (block_nonartificial_location): Likewise.
9469 (block_ultimate_origin): Likewise.
9470 * tree-pretty-print.c (percent_K_format): Likewise. Remove
9471 no longer needed LTO case.
9472
9473 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
9474 Jan Hubicka <jh@suse.cz>
9475 Martin Jambor <mjambor@suse.cz>
9476
9477 * simplify-rtx.c (simplify_merge_mask): New function.
9478 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
9479 same masks are used in op1 or op2.
9480 (test_vec_merge): New function.
9481 (test_vector_ops): Call test_vec_merge.
9482
9483 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9484
9485 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
9486 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
9487 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
9488 (cypress_costs): Set it.
9489 (supersparc_costs): Likewise.
9490 (hypersparc_costs): Likewise.
9491 (leon_cost): Likewise.
9492 (leon3_costs): Likewise.
9493 (sparclet_costs): Likewise.
9494 (ultrasparc_costs): Likewise.
9495 (ultrasparc_costs): Likewise.
9496 (niagara_costs): Likewise.
9497 (niagara2_costs): Likewise.
9498 (niagara3_costs): Likewise.
9499 (niagara4_costs): Likewise.
9500 (niagara7_costs): Likewise.
9501 (m8_costs): Likewise.
9502 (TARGET_CAN_FOLLOW_JUMP): Define.
9503 (pass_work_around_errata::gate): Minor tweak.
9504 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
9505 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
9506 Automaitcally clear MASK_FSMULD mask for V7 processors.
9507 (sparc_can_follow_jump): New static function.
9508 (output_ubranch): Deal with CROSSING_JUMP_P.
9509 (sparc_use_sched_lookahead): Rewrite using switch statement.
9510 (sparc_issue_rate): Reorder.
9511 (sparc_branch_cost): New function.
9512
9513 2018-09-27 Martin Sebor <msebor@redhat.com>
9514
9515 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
9516 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
9517 (int_fits_type_p): Same.
9518
9519 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
9520
9521 * config/i386/i386.md (FPCR_REG): Remove.
9522 (UNSPEC_FLDCW): Remove.
9523 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
9524 (x86_fldcw_1): Remove insn pattern.
9525 (fnstenv): Do not clobber FPCR_REG.
9526 (fldenv): Ditto.
9527 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
9528 (CALL_USED_REGISTERS): Ditto.
9529 (REG_ALLOC_ORDER): Ditto.
9530 (REG_CLASS_CONTENTS): Ditto.
9531 (HI_REGISTER_NAMES): Ditto.
9532 (ADDITIONAL_REGISTER_NAMES): Use defines instead
9533 of numerical constants.
9534 * config/i386/i386.c (regclass_map): Remove fpsr register.
9535 (dbx_register_map): Ditto.
9536 (dbx64_register_map): Ditto.
9537 (svr4_dbx_register_map): Ditto.
9538 (print_reg): Do not handle FPCR_REG.
9539
9540 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
9541
9542 PR target/87149
9543 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
9544 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
9545 Delete, always treat as true.
9546 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9547 Ditto. Simplify remaining code.
9548 * config/powerpcspe/powerpcspe.h: Ditto.
9549 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
9550 Simplify remaining code.
9551 (rs6000_expand_builtin): Ditto.
9552 * config/rs6000/rs6000.h: Ditto.
9553 * configure.ac: Ditto.
9554 * configure: Regenerate.
9555
9556 2018-09-27 Martin Liska <mliska@suse.cz>
9557
9558 * coverage.c (get_coverage_counts): Revert the formatting
9559 of missing profile opt info.
9560
9561 2018-09-27 Richard Biener <rguenther@suse.de>
9562
9563 PR debug/37801
9564 PR debug/87440
9565 * dwarf2out.c (set_block_origin_self): Do not mark outermost
9566 block as we do not output that.
9567 (gen_inlined_subroutine_die): Elide the originally outermost
9568 block, matching what we do for concrete instances.
9569 (decls_for_scope): Add parameter specifying whether to recurse
9570 to subblocks.
9571
9572 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
9573 Tom de Vries <tom@codesourcery.com>
9574
9575 PR 82089
9576
9577 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
9578 STORE_FLAG_VALUE == 1.
9579
9580 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
9581
9582 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
9583 constant definitions.
9584 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
9585 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
9586 ("speculation_barrier"): New expander definition.
9587
9588 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
9589
9590 PR gcov-profile/86957
9591 * common.opt: New warning option -Wmissing-profile.
9592 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
9593 * doc/invoke.texi: Document -Wmissing-profile.
9594
9595 2018-09-26 Jim Wilson <jimw@sifive.com>
9596
9597 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
9598 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
9599
9600 2018-09-26 Martin Sebor <msebor@redhat.com>
9601
9602 * tree.c (zerop): Change return type to bool.
9603 (integer_zerop, integer_onep, integer_each_onep): Same.
9604 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9605 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9606 (real_onep, real_minus_onep, chain_index): Same.
9607 (print_type_hash_statistics, type_list_equal): Same.
9608 * tree.h (zerop): Same.
9609 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
9610 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9611 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9612 (real_onep, real_minus_onep, chain_index): Same.
9613 (print_type_hash_statistics, type_list_equal): Same.
9614
9615 2018-09-26 Jim Wilson <jimw@sifive.com>
9616
9617 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
9618
9619 2018-09-26 Jakub Jelinek <jakub@redhat.com>
9620
9621 PR target/87414
9622 * config/i386/i386.c: Include debug.h and dwarf2out.h.
9623 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
9624 call.
9625
9626 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
9627
9628 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
9629
9630 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9631
9632 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
9633 and FP_SECOND_SSE_REGS.
9634 (REG_CLASS_NAMES): Ditto.
9635 (REG_CLASS_CONTENTS): Ditto.
9636 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
9637 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
9638 (ix86_preferred_output_reload_class): Ditto.
9639 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
9640 clobber constraint to "=&f".
9641 (fix_truncdi_i387): Ditto.
9642 (lrintxfdi2): Ditto.
9643 (fistdi2_<rounding>): Ditto.
9644 (fpremxf4_i387): Change "=u" constraint to "=f".
9645 (fprem1xf4_i387): Ditto.
9646 (sincosxf3): Ditto.
9647 (fptanxf4_i387): Ditto.
9648 (fxtractxf3_i387): Ditto.
9649 (fscalexf4_i387): Ditto.
9650 (atan2xf3): Change "u" constraint to "f".
9651 (fyl2xxf3_i387): Ditto.
9652 (fyl2xp1xf3_i387): Ditto.
9653
9654 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9655
9656 PR target/87439
9657 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
9658 for removed I387_MASK_PM entity.
9659
9660
9661 2018-09-26 Jeff Law <law@redhat.com>
9662 Revert
9663 2018-09-26 Alexey Neyman <stilor@att.net>
9664
9665 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9666 headers are no longer pulled in by <isl/val.h>.
9667
9668 2018-09-26 Richard Biener <rguenther@suse.de>
9669
9670 PR debug/87443
9671 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
9672 or concrete instance DIE to the tree. Create abstract origin
9673 attributes also for concrete instances.
9674
9675 2018-09-26 Alexey Neyman <stilor@att.net>
9676
9677 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9678 headers are no longer pulled in by <isl/val.h>.
9679
9680 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
9681
9682 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
9683 Use new helper functions.
9684 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
9685 Use new helper functions.
9686 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
9687 aarch_mm_needs_release): New declarations.
9688 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
9689 aarch_mm_needs_release): New.
9690
9691 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
9692
9693 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
9694 (arm32_output_mi_thunk): Deal with long calls.
9695
9696 2018-09-26 Richard Biener <rguenther@suse.de>
9697
9698 PR debug/87428
9699 PR debug/87362
9700 * tree-inline.c (expand_call_inline): When the location
9701 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
9702 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
9703 the inserted BLOCK to make inlined_function_outer_scope_p
9704 recognize it.
9705 * dwarf2out.c (add_call_src_coords_attributes): Do not add
9706 coords for reserved locations.
9707
9708 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9709
9710 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
9711 (*call_indirect_nonlocal_sysv<mode>): Ditto.
9712 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
9713 (*sibcall_nonlocal_sysv<mode>): Ditto.
9714 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
9715 (<bd>_<mode>): Ditto.
9716 (<bd>tf_<mode>): Ditto.
9717
9718 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9719
9720 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
9721 control string as a list of templates instead of as C code.
9722 (*altivec_movti): Ditto.
9723 * config/rs6000/darwin.md (movdf_low_di): Ditto.
9724
9725 2018-09-25 Jim Wilson <jimw@sifive.com>
9726
9727 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
9728 when target symbol is weak.
9729
9730 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
9731
9732 PR c/87387
9733 * builtins.c (unterminated_array): Simplify.
9734 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
9735 where pointer arithmetic is safe.
9736
9737 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9738
9739 PR target/86987
9740 * config/rs6000/altivec.md (altivec_vspltb): Use
9741 const_0_to_15_operand instead of u5bit_cint_operand.
9742 (*altivec_vspltb_internal): Ditto.
9743 (altivec_vspltb_direct): Ditto.
9744 (altivec_vsplth): Use const_0_to_7_operand instead of
9745 u5bit_cint_operand.
9746 (*altivec_vsplth_internal): Ditto.
9747 (altivec_vsplth_direct): Ditto.
9748 (altivec_vspltw): Use const_0_to_3_operand instead of
9749 u5bit_cint_operand.
9750 (*altivec_vspltw_internal): Ditto.
9751 (altivec_vspltw_direct): Ditto.
9752 (altivec_vspltsf): Ditto.
9753 (*altivec_vspltsf_internal): Ditto.
9754 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
9755 various splats with the proper size immediate. Reorder the various
9756 cases by ascending size of immediate, and put all such together.
9757
9758 2018-09-25 Richard Biener <rguenther@suse.de>
9759
9760 PR debug/83941
9761 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
9762 GC-ification.
9763 (maybe_create_die_with_external_ref): Do not create
9764 DW_TAG_imported_unit here.
9765 (add_abstract_origin_attribute): Handle external BLOCK refs.
9766 (dwarf2out_abstract_function): Simplify LTO case.
9767 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
9768 rather than using maybe_create_die_with_external_ref.
9769
9770 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
9771
9772 PR target/71278
9773 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
9774 (frndintxf2_mask_pm_i387): Ditto.
9775 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
9776 Enable for !flag_trapping_math.
9777 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
9778 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
9779 Change operand 1 predicate to nonimmediate_operand.
9780 (attr "i387_cw"): Remove mask_pm.
9781 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
9782 (enum ix86_entity): Remove I387_MASK_PM.
9783 * config/i386/i386.c (ix86_i387_mode_needed): Do not
9784 handle I387_MASK_PM.
9785 (ix86_mode_needed): Ditto.
9786 (ix86_mode_after): Ditto.
9787 (ix86_mode_entry): Ditto.
9788 (ix86_mode_exit): Ditto.
9789 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
9790
9791 2018-09-25 Jakub Jelinek <jakub@redhat.com>
9792
9793 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
9794 to_update_switch_stmts to vNULL instead of calling create on them
9795 immediately.
9796
9797 2018-09-25 Richard Biener <rguenther@suse.de>
9798
9799 PR tree-optimization/87402
9800 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
9801 (visit_phi): Re-instantiate handling of supposed to be VARYING
9802 but non-VARYING backedge value.
9803
9804 2018-09-25 Richard Biener <rguenther@suse.de>
9805
9806 PR debug/83941
9807 * dwarf2out.c (struct sym_off_pair): New.
9808 (external_die_map): New global.
9809 (lookup_decl_die): When in LTO create DIEs lazily from the
9810 external_die_map.
9811 (lookup_block_die): New function, create DIEs lazily in LTO.
9812 (equate_block_to_die): New function.
9813 (dwarf2out_die_ref_for_decl): During WPA get the association
9814 from the external DIE map.
9815 (dwarf2out_register_external_die): Record mapping into the
9816 external DIE map.
9817 (maybe_create_die_with_external_ref): New function split out from
9818 DIE generation part of old dwarf2out_register_external_die.
9819 (add_abstract_origin_attribute): Do not return the DIE. When
9820 in LTO reference externals directly.
9821 (dwarf2out_abstract_function): When in LTO ignore calls for
9822 decls with external DIEs (already present abstract instances).
9823 (gen_call_site_die): Adjust.
9824 (add_high_low_attributes): Likewise.
9825 (gen_lexical_block_die): Likewise.
9826 (gen_inlined_subroutine_die): Likewie.
9827 (gen_block_die): Likewise.
9828 (dwarf2out_inline_entry): Likewise.
9829 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
9830 DIEs.
9831
9832 2018-09-25 Martin Liska <mliska@suse.cz>
9833
9834 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
9835 integers and not by a float value.
9836
9837 2018-09-25 Martin Liska <mliska@suse.cz>
9838
9839 PR fortran/87394
9840 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
9841 instead of NULL.
9842 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
9843 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
9844 * godump.c (go_format_type): Remove extra parenthesis.
9845
9846 2018-09-25 Martin Liska <mliska@suse.cz>
9847
9848 * alias.c (set_dest_equal_p): Remove unused function.
9849 * config/i386/i386.c (def_builtin_pure2): Likewise.
9850 * diagnostic-show-locus.c (class layout): Remove
9851 unused field.
9852 (layout::layout): Likewise here.
9853 * dump-context.h (class temp_dump_context): Likewise.
9854 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
9855 (add_AT_loclistsptr): Likewise.
9856 (add_AT_offset): Likewise.
9857 (get_AT_hi_pc): Likewise.
9858 (is_comdat_die): Likewise.
9859 (type_is_enum): Likewise.
9860 (ceiling): Likewise.
9861 (add_AT_vms_delta): Likewise.
9862 (is_class_die): Likewise.
9863 * edit-context.c (class line_event): Remove unused field.
9864 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
9865 unused function.
9866 * ipa-cp.c (ipa_get_vr_lat): Likewise.
9867 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
9868 (ok_for_base_p_nonstrict): Likewise.
9869 * tree-chrec.c (is_not_constant_evolution): Likewise.
9870 (chrec_fold_poly_cst): Likewise.
9871 * tree-if-conv.c (has_pred_critical_p): Likewise.
9872 * tree-ssa-coalesce.c (print_exprs): Likewise.
9873 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
9874 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
9875 * tree-vrp.c (value_ranges_intersect_p): Likewise.
9876 (value_range_nonnegative_p): Likewise.
9877
9878 2018-09-25 Martin Liska <mliska@suse.cz>
9879
9880 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
9881 Do not handle "GNU Pascal".
9882 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
9883 Likewise.
9884 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
9885 from documentation. Likewise.
9886 * dbxout.c (dbxout_range_type): Likewise.
9887 * doc/cpp.texi: Likewise.
9888 * doc/extend.texi: Likewise.
9889 * doc/frontends.texi: Likewise.
9890 * doc/invoke.texi: Remove Pascal entry.
9891 * tree.def (CLEANUP_POINT_EXPR): Likewise.
9892 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
9893
9894 2018-09-25 Martin Liska <mliska@suse.cz>
9895
9896 PR middle-end/86078
9897 * doc/invoke.texi: Document all parameters and remove default
9898 of the parameters.
9899
9900 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
9901
9902 PR bootstrap/87417
9903 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
9904 contains HOST_WIDE_INTs when computing its size.
9905
9906 2018-09-24 Jim Wilson <jimw@sifive.com>
9907
9908 PR target/87391
9909 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
9910 not TARGET_RVE.
9911 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
9912
9913 2018-09-24 Andrew Pinski <apinski@marvell.com>
9914
9915 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
9916 access prev before checking it for NULLness in the
9917 AARCH64_FUSE_CMP_BRANCH case.
9918
9919 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
9920
9921 PR target/82699
9922 * config/i386/i386.c (rest_of_insert_endbranch): Set
9923 endbr_queued_at_entrance to true and don't insert ENDBR if
9924 x86_function_profiler will be called.
9925 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
9926 is true.
9927 * config/i386/i386.h (machine_function): Add
9928 endbr_queued_at_entrance.
9929
9930 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9931
9932 * genattrtab.c (mk_attr_alt): Use alternative_mask.
9933 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
9934 types.
9935 (check_attr_test): Use alternative_mask.
9936 (get_attr_value): Likewise.
9937 (compute_alternative_mask): Use alternative_mask and XWINT.
9938 (make_alternative_compare): Use alternative_mask.
9939 (attr_alt_subset_p): Use XWINT.
9940 (attr_alt_subset_of_compl_p): Likewise.
9941 (attr_alt_intersection): Use alternative_mask and XWINT.
9942 (attr_alt_union): Likewise.
9943 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
9944 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
9945 (simplify_test_exp): Use alternative_mask and XWINT.
9946 (write_test_expr): Use alternative_mask and XWINT, adjust bit
9947 number calculation to support 64 bits. Generate code that
9948 checks 64-bit masks.
9949 (main): Use alternative_mask.
9950 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
9951
9952 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9953
9954 PR target/80080
9955 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
9956 RETURN+USE when returning via %r14.
9957
9958 2018-09-24 Martin Liska <mliska@suse.cz>
9959
9960 * gcov.c (output_lines): Print colorization legend
9961 for both flag_use_colors and flag_use_hotness_colors.
9962 Reword the help.
9963
9964 2018-09-24 Martin Liska <mliska@suse.cz>
9965
9966 * coverage.c (get_coverage_counts): Use warning_at
9967 with current_function_decl location. Use %qD in warning
9968 message.
9969
9970 2018-09-24 Martin Liska <mliska@suse.cz>
9971
9972 * memory-block.h (memory_block_pool::release): Annotate with
9973 valgrind that the memory is not accessible.
9974
9975 2018-09-24 Martin Liska <mliska@suse.cz>
9976
9977 PR sanitizer/85774
9978 * asan.c: Make asan_handled_variables extern.
9979 * asan.h: Likewise.
9980 * cfgexpand.c (expand_stack_vars): Make sure
9981 a representative is unpoison if another
9982 variable in the partition is handled by
9983 use-after-scope sanitization.
9984
9985 2018-09-24 Richard Biener <rguenther@suse.de>
9986
9987 PR tree-optimization/63155
9988 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
9989 the worklist when the edge of the respective argument isn't
9990 executable.
9991
9992 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9993
9994 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
9995 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
9996 (MASK_CLASS_P): Update for rename.
9997 (MAYBE_MASK_CLASS_P): Ditto.
9998 (REG_CLASS_NAMES): Update.
9999 (REG_CLASS_CONTENT): Update.
10000 * config/i386/i386.c (regclass_map): Update for MASK_REG
10001 and ALL_MASK_REGS rename.
10002 * config/i386/constraints.md (Yk): Update for rename.
10003 (k): Ditto.
10004
10005 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
10006
10007 * config/i386/i386.h (enum reg_class): Remove
10008 EVEX_SSE_REGS and MOD4_SSE_REGS.
10009 (REG_CLASS_NAMES): Update.
10010 (REG_CLASS_CONTENT): Update.
10011 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
10012 registers as ALL_SSE_REGS.
10013 (ix86_additional_allocno_class_p): Remove.
10014 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
10015 (ix86_register_priority): Lower priority of EVEX SSE registers.
10016 Use IN_RANGE macro where appropriate.
10017 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
10018 AVX-5124VNNIW checks.
10019 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
10020 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
10021 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
10022 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
10023 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
10024 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
10025 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
10026 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
10027 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
10028 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
10029 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
10030 * config/i386/constraints.md (Yh): Remove.
10031
10032 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
10033
10034 * config/i386/i386.c (regclass_map): Declare integer REX registers
10035 as GENERAL_REGS.
10036
10037 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
10038
10039 * doc/service.texi (Service): Switch the fsf.org link to https.
10040
10041 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
10042
10043 PR target/86798
10044 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10045 Define to speculation_safe_value_not_needed.
10046
10047 2018-09-21 Florian Weimer <fweimer@redhat.com>
10048
10049 PR middle-end/81035
10050 * doc/extend.texi (Common Function Attributes): Mention that
10051 noreturn suppresses tail call optimization.
10052
10053 2018-09-21 Jeff Law <law@redhat.com>
10054
10055 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
10056 vr_values::cleanup_edges_and_switches.
10057 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
10058 vr_values class.
10059 (identify_jump_threads): Remove EDGE_IGNORE handling.
10060 (execute_vrp): Move handling of to_remove_edges and
10061 to_update_switch_stmts into vr_values class member functions.
10062 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
10063 (to_update_switch_stmts): Likewise.
10064 * vr-values.c: Include cfghooks.h.
10065 (vr_values::vr_values): Initialize to_remove_edges and
10066 to_update_switch_stmts.
10067 (vr_values::~vr_values): Verify to_remove_edges and
10068 to_update_switch_stmts are empty.
10069 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
10070 (vr_values::cleanup_edges_and_switches): New member function.
10071 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
10072 function. Add new data members.
10073
10074 2018-09-21 David Malcolm <dmalcolm@redhat.com>
10075
10076 PR tree-optimization/87309
10077 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
10078 calls with pflags and alt_flags.
10079 (selftest::test_capture_of_dump_calls): Add test of interaction of
10080 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
10081
10082 2018-09-21 Olivier Hainque <hainque@adacore.com>
10083
10084 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
10085
10086 2018-09-21 Olivier Hainque <hainque@adacore.com>
10087
10088 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
10089
10090 2018-09-21 Olivier Hainque <hainque@adacore.com>
10091
10092 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
10093 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
10094 (VXWORKS_LIBS_RTP): Minor reordering.
10095
10096 2018-09-21 Olivier Hainque <hainque@adacore.com>
10097
10098 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
10099 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
10100
10101 2018-09-21 Olivier Hainque <hainque@adacore.com>
10102
10103 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
10104 (PTRDIFF_TYPE): Likewise.
10105
10106 2018-09-21 Olivier Hainque <hainque@adacore.com>
10107
10108 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
10109 triplet, similar to support for VxWorks7.
10110 * config/vxworks-dummy.h: Provide a default definition
10111 of TARGET_VXWORKS64 to 0.
10112
10113 2018-09-21 Olivier Hainque <hainque@adacore.com>
10114
10115 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
10116 * config/vxworks-dummy.h: here.
10117
10118 2018-09-21 Olivier Hainque <hainque@adacore.com>
10119
10120 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
10121
10122 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
10123 Bo Zhou <zbo.zhou@hisilicon.com>
10124
10125 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
10126 * config/aarch64/aarch64-tune.md: Regenerated.
10127 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
10128 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
10129 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
10130
10131 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
10132 Julian Brown <julian@codesourcery.com>
10133
10134 * builtins.c (get_builtin_sync_mem): Handle address spaces.
10135
10136 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
10137
10138 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
10139 if the call takes a static chain.
10140
10141 2018-09-21 Martin Liska <mliska@suse.cz>
10142
10143 * auto-profile.c (autofdo_source_profile::read): Do not
10144 set sum_all.
10145 (read_profile): Do not add working sets.
10146 (read_autofdo_file): Remove sum_all.
10147 (afdo_callsite_hot_enough_for_early_inline): Remove const
10148 qualifier.
10149 * coverage.c (struct counts_entry): Remove gcov_summary.
10150 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
10151 do not support GCOV_TAG_PROGRAM_SUMMARY.
10152 (get_coverage_counts): Remove summary and expected
10153 arguments.
10154 * coverage.h (get_coverage_counts): Likewise.
10155 * doc/gcov-dump.texi: Remove -w option.
10156 * gcov-dump.c (dump_working_sets): Remove.
10157 (main): Do not support '-w' option.
10158 (print_usage): Likewise.
10159 (tag_summary): Likewise.
10160 * gcov-io.c (gcov_write_summary): Do not dump
10161 histogram.
10162 (gcov_read_summary): Likewise.
10163 (gcov_histo_index): Remove.
10164 (gcov_histogram_merge): Likewise.
10165 (compute_working_sets): Likewise.
10166 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
10167 it not obsolete.
10168 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
10169 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
10170 (GCOV_HISTOGRAM_SIZE): Remove.
10171 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
10172 (struct gcov_summary): Simplify rapidly just
10173 to runs and sum_max fields.
10174 (gcov_histo_index): Remove.
10175 (NUM_GCOV_WORKING_SETS): Likewise.
10176 (compute_working_sets): Likewise.
10177 * gcov-tool.c (print_overlap_usage_message): Remove
10178 trailing empty line.
10179 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
10180 (output_lines): Remove program related line.
10181 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
10182 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
10183 histogram.
10184 (input_profile_summary): Do not read it.
10185 (merge_profile_summaries): And do not merge it.
10186 (input_symtab): Do not call removed function.
10187 * modulo-sched.c (sms_schedule): Do not print sum_max.
10188 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
10189 removed when histogram method was invented.
10190 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
10191 mode.
10192 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
10193 GCOV coding style.
10194 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
10195 and dump selected value.
10196 * profile.c (add_working_set): Remove.
10197 (get_working_sets): Likewise.
10198 (find_working_set): Likewise.
10199 (get_exec_counts): Do not work with working sets.
10200 (read_profile_edge_counts): Do not inform as sum_max is removed.
10201 (compute_branch_probabilities): Likewise.
10202 (compute_value_histograms): Remove argument for call of
10203 get_coverage_counts.
10204 * profile.h: Do not make gcov_summary const.
10205
10206 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
10207
10208 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
10209
10210 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
10211
10212 PR tree-optimization/86990
10213 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
10214 Check that the entire merged store group is made of constants only for
10215 overlapping stores.
10216
10217 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
10218
10219 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
10220 (VTABLE_VERIFICATION_SPEC): Likewise.
10221 (SANITIZER_EARLY_SPEC): Likewise.
10222 (SANITIZER_SPEC): Likewise.
10223 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
10224 * doc/invoke.texi (Link Options): Document -r.
10225
10226 2018-09-20 Richard Biener <rguenther@suse.de>
10227
10228 PR middle-end/87054
10229 * gimplify.c (gimplify_expr): Retain alignment of
10230 addressable lvalue in dereference.
10231
10232 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
10233
10234 PR bootstrap/87013
10235 * configure.ac: Check for .loc is_stmt support.
10236 * configure, config.in: Rebuilt.
10237 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
10238 if not supported.
10239
10240 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10241
10242 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
10243 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
10244 -misel=no.
10245
10246 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10247
10248 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10249 VECTOR_OTHER.
10250 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
10251 case VECTOR_OTHER.
10252
10253 2018-09-20 Marek Polacek <polacek@redhat.com>
10254
10255 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
10256
10257 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10258
10259 PR tree-optimization/87288
10260 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
10261 into account when determining PEELING_FOR_NITERS.
10262
10263 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10264
10265 PR tree-optimization/86877
10266 * tree-vect-loop.c (vect_analyze_loop_2): Call
10267 vect_verify_datarefs_alignment.
10268
10269 2018-09-19 Marek Polacek <polacek@redhat.com>
10270
10271 * doc/invoke.texi: Document -Wclass-conversion.
10272
10273 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
10274
10275 * config/pa/pa.c (pa_adjust_priority): Delete.
10276 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
10277
10278 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
10279 (atomic_storehi): Likewise.
10280 (atomic_storesi): Likewise.
10281 (atomic_loaddi): Restore compare and swap exchange loop code.
10282
10283 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
10284
10285 PR rtl-optimization/86902
10286 * combine.c (try_combine): When changing the CC mode used, don't change
10287 an unrelated mode in other_insn to that new CC mode.
10288
10289 2018-09-19 David Malcolm <dmalcolm@redhat.com>
10290
10291 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
10292 with %T in place of calls to dump_generic_expr.
10293 (prune_runtime_alias_test_list): Likewise.
10294 (create_runtime_alias_checks): Likewise.
10295 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
10296 (vect_analyze_data_ref_dependence): Likewise.
10297 (vect_slp_analyze_data_ref_dependence): Likewise.
10298 (vect_record_base_alignment): Likewise. Use %G in place of call
10299 to dump_gimple_stmt.
10300 (vect_compute_data_ref_alignment): Likewise.
10301 (verify_data_ref_alignment): Likewise.
10302 (vect_find_same_alignment_drs): Likewise.
10303 (vect_analyze_group_access_1): Likewise.
10304 (vect_analyze_data_ref_accesses): Likewise.
10305 (dependence_distance_ge_vf): Likewise.
10306 (dump_lower_bound): Likewise.
10307 (vect_prune_runtime_alias_test_list): Likewise.
10308 (vect_find_stmt_data_reference): Likewise.
10309 (vect_analyze_data_refs): Likewise.
10310 (vect_create_addr_base_for_vector_ref): Likewise.
10311 (vect_create_data_ref_ptr): Likewise.
10312 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
10313 (vect_can_advance_ivs_p): Likewise.
10314 (vect_update_ivs_after_vectorizer): Likewise.
10315 (vect_gen_prolog_loop_niters): Likewise.
10316 (vect_prepare_for_masked_peels): Likewise.
10317 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10318 (vect_determine_vectorization_factor): Likewise.
10319 (vect_is_simple_iv_evolution): Likewise.
10320 (vect_analyze_scalar_cycles_1): Likewise.
10321 (vect_analyze_loop_operations): Likewise.
10322 (report_vect_op): Likewise.
10323 (vect_is_slp_reduction): Likewise.
10324 (check_reduction_path): Likewise.
10325 (vect_is_simple_reduction): Likewise.
10326 (vect_create_epilog_for_reduction): Likewise.
10327 (vect_finalize_reduction:): Likewise.
10328 (vectorizable_induction): Likewise.
10329 (vect_transform_loop_stmt): Likewise.
10330 (vect_transform_loop): Likewise.
10331 (optimize_mask_stores): Likewise.
10332 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
10333 (vect_split_statement): Likewise.
10334 (vect_recog_over_widening_pattern): Likewise.
10335 (vect_recog_average_pattern): Likewise.
10336 (vect_determine_min_output_precision_1): Likewise.
10337 (vect_determine_precisions_from_range): Likewise.
10338 (vect_determine_precisions_from_users): Likewise.
10339 (vect_mark_pattern_stmts): Likewise.
10340 (vect_pattern_recog_1): Likewise.
10341 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10342 (vect_record_max_nunits): Likewise.
10343 (vect_build_slp_tree_1): Likewise.
10344 (vect_build_slp_tree_2): Likewise.
10345 (vect_print_slp_tree): Likewise.
10346 (vect_analyze_slp_instance): Likewise.
10347 (vect_detect_hybrid_slp_stmts): Likewise.
10348 (vect_detect_hybrid_slp_1): Likewise.
10349 (vect_slp_analyze_operations): Likewise.
10350 (vect_slp_analyze_bb_1): Likewise.
10351 (vect_transform_slp_perm_load): Likewise.
10352 (vect_schedule_slp_instance): Likewise.
10353 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10354 (vect_mark_stmts_to_be_vectorized): Likewise.
10355 (vect_init_vector_1): Likewise.
10356 (vect_get_vec_def_for_operand): Likewise.
10357 (vect_finish_stmt_generation_1): Likewise.
10358 (vect_check_load_store_mask): Likewise.
10359 (vectorizable_call): Likewise.
10360 (vectorizable_conversion): Likewise.
10361 (vectorizable_operation): Likewise.
10362 (vectorizable_load): Likewise.
10363 (vect_analyze_stmt): Likewise.
10364 (vect_is_simple_use): Likewise.
10365 (vect_get_vector_types_for_stmt): Likewise.
10366 (vect_get_mask_type_for_stmt): Likewise.
10367 * tree-vectorizer.c (increase_alignment): Likewise.
10368
10369 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
10370
10371 * doc/rtl.texi: Adjust vec_select description.
10372 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
10373 non-constant selectors.
10374
10375 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
10376
10377 * config/aarch64/aarch64-protos.h
10378 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
10379 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
10380 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
10381 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
10382 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
10383 (AARCH64_FL_PROFILE): Move index so flags are ordered.
10384 (AARCH64_ISA_RCPC8_4): New flag.
10385 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
10386 to aarch64_offset_9bit_signed_unscaled_p.
10387 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
10388 and use stlur.
10389 * config/aarch64/constraints.md (Ust): New constraint.
10390 * config/aarch64/predicates.md.
10391 (aarch64_9bit_offset_memory_operand): New predicate.
10392 (aarch64_rcpc_memory_operand): New predicate.
10393
10394 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
10395
10396 PR rtl-optimization/87361
10397 * rtlanal.c (nonzero_bits1): Revert accidental change.
10398
10399 2018-09-19 Richard Biener <rguenther@suse.de>
10400
10401 PR tree-optimization/87349
10402 PR tree-optimization/87342
10403 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
10404
10405 2018-09-18 Marek Polacek <polacek@redhat.com>
10406
10407 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
10408 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
10409
10410 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10411
10412 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
10413
10414 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10415
10416 PR rtl-optimization/86882
10417 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
10418
10419 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
10420
10421 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
10422 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
10423
10424 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
10425
10426 PR other/87353
10427 * doc/invoke.texi (Link Options): Fix formatting and grammar.
10428
10429 2018-09-18 Richard Biener <rguenther@suse.de>
10430
10431 PR middle-end/63155
10432 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
10433 (compute_samebase_partition_bases): Likewise.
10434 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
10435 (gimple_can_coalesce_p): Simplify.
10436
10437 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
10438
10439 Handle a library implementation of ffs calling __builtin_ffs.
10440 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
10441 (mmix_init_libfuncs): New function: make __builtin_ffs expand
10442 to __ffsdi2.
10443
10444 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10445
10446 * diagnostic-show-locus.c (class layout_range): Add field
10447 "m_original_idx".
10448 (layout_range::layout_range): Add "original_idx" param and use it
10449 to initialize new field.
10450 (make_range): Use 0 for original_idx.
10451 (layout::layout): Pass in index to calls to
10452 maybe_add_location_range.
10453 (layout::maybe_add_location_range): Add param "original_idx" and
10454 pass it on to layout_range.
10455 (layout::print_any_labels): Pass on range->m_original_idx to
10456 get_text call.
10457 (gcc_rich_location::add_location_if_nearby): Use 0 for
10458 original_idx.
10459 * gcc-rich-location.h (text_range_label::get_text): Update for new
10460 param.
10461 (range_label_for_type_mismatch::get_text): Likewise.
10462
10463 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10464
10465 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
10466
10467 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10468
10469 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
10470 format_string_diagnostic_t.
10471 (fmtwarn_n): Likewise.
10472 * substring-locations.c
10473 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
10474 (format_warning_n_va): Convert to...
10475 (format_string_diagnostic_t::emit_warning_n_va): ...this.
10476 (format_warning_va): Convert to...
10477 (format_string_diagnostic_t::emit_warning_va): ...this.
10478 (format_warning_at_substring): Convert to...
10479 (format_string_diagnostic_t::emit_warning): ...this.
10480 (format_warning_at_substring_n): Convert to...
10481 (format_string_diagnostic_t::emit_warning_n): ...this.
10482 * substring-locations.h (class format_string_diagnostic_t): New
10483 class.
10484 (format_warning_va): Convert to
10485 format_string_diagnostic_t::emit_warning_va.
10486 (format_warning_n_va): Convert to
10487 format_string_diagnostic_t::emit_warning_n_va.
10488 (format_warning_at_substring): Convert to
10489 format_string_diagnostic_t::emit_warning.
10490 (format_warning_at_substring_n): Convert to
10491 format_string_diagnostic_t::emit_warning_n.
10492
10493 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
10494 Bernd Schmidt <bernds_cb1@t-online.de>
10495
10496 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
10497 SImode args.
10498
10499 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10500
10501 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
10502 operand 0 predicate to nonimmediate operand.
10503 (rint<mode>2_frndint): Remove insn pattern.
10504 (rint<mode>2): Change operand 1 predicate to general_operand.
10505 Extend operand 1 to XFmode and generate rintxf2 insn.
10506 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
10507 Do not use X87MODEF mode macro.
10508 (frndintxf2_<rounding>_i387): Rename from
10509 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
10510 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
10511 to XFmode and generate significandxf3 insn.
10512
10513 2018-09-17 Richard Biener <rguenther@suse.de>
10514
10515 PR tree-optimization/87328
10516 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
10517 visiting unexecutable backedges when not iterating.
10518 (do_rpo_vn): Mark all edges not executable even when not
10519 iterating.
10520
10521 2018-09-17 Martin Jambor <mjambor@suse.cz>
10522
10523 PR c/63886
10524 * doc/invoke.texi (Warning Options): Likewise.
10525
10526 2018-09-17 Richard Biener <rguenther@suse.de>
10527
10528 PR tree-optimization/87301
10529 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
10530 clean EH info from leftover copy assignments.
10531
10532 2018-09-17 Martin Liska <mliska@suse.cz>
10533
10534 PR gcov-profile/85871
10535 * gcov.c (output_intermediate_file): Fix out of bounds
10536 access.
10537
10538 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
10539
10540 * config/arc/arc.c: Object attributes for core4 not reflected
10541 correctly.
10542 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
10543 core3).
10544
10545 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
10546
10547 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
10548
10549 2018-09-17 Martin Liska <mliska@suse.cz>
10550
10551 * doc/gcov.texi: Document new option --use-hotness-colors.
10552 * gcov.c (struct source_info): Declare new field.
10553 (source_info::source_info): Set default for maximum_count.
10554 (print_usage): Add new -q option.
10555 (process_args): Process it.
10556 (accumulate_line_info): Save src->maximum_count.
10557 (output_line_beginning): Make color line number if
10558 flag_use_hotness_colors is set.
10559 (output_line_details): Pass default argument value.
10560 (output_lines): Pass src->maximum_count.
10561
10562 2018-09-17 Martin Liska <mliska@suse.cz>
10563
10564 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
10565 Use processor_names table.
10566 * config/i386/i386.c (ix86_default_align): Use
10567 processor_cost_table for alignment values.
10568 (ix86_option_override_internal): Use processor_names.
10569 (ix86_function_specific_print): Likewise.
10570 * config/i386/i386.h (struct processor_costs):
10571 Add alignment values.
10572 (struct ptt): Remove and replace with const char *.
10573 * config/i386/x86-tune-costs.h (struct processor_costs):
10574 Declare default alignments for all costs.
10575
10576 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
10577
10578 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
10579 symbolics or VR_VARYING ranges for ABS_EXPR.
10580 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
10581 when range will wrap.
10582
10583 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
10584
10585 PR middle-end/86864
10586 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
10587 before and after a JUMP_TABLE_DATA.
10588
10589 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
10590
10591 PR middle-end/87188
10592 * dojump.c (do_compare_and_jump): Canonicalize function pointers
10593 when one operand is a function pointer. Use POINTER_TYPE_P and
10594 FUNC_OR_METHOD_TYPE_P.
10595 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
10596 * fold-const.c (build_range_check): Likewise.
10597 * match.pd (simple_comparison): Likewise.
10598
10599 2018-09-14 David Malcolm <dmalcolm@redhat.com>
10600
10601 PR c/82967
10602 * spellcheck.c (get_edit_distance_cutoff): New function.
10603 (selftest::test_edit_distance_unit_test_oneway): Rename to...
10604 (selftest::test_get_edit_distance_one_way): ...this.
10605 (selftest::test_get_edit_distance_unit): Rename to...
10606 (selftest::test_get_edit_distance_both_ways): ...this.
10607 (selftest::test_edit_distances): Move tests to this new function,
10608 and test some more pairs of strings. Update for above renaming.
10609 (selftest::get_old_cutoff): New function.
10610 (selftest::test_get_edit_distance_cutoff): New function.
10611 (selftest::assert_suggested_for): New function.
10612 (ASSERT_SUGGESTED_FOR): New macro.
10613 (selftest::assert_not_suggested_for): New function.
10614 (ASSERT_NOT_SUGGESTED_FOR): New macro.
10615 (selftest::test_suggestions): New function.
10616 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
10617 tests to selftest::test_edit_distances and call it. Add calls to
10618 selftest::test_get_edit_distance_cutoff and
10619 selftest::test_suggestions.
10620 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
10621 (best_match::consider): Replace hard-coded cutoff calculation with
10622 a call to...
10623 (best_match::get_cutoff): New declaration.
10624 (best_match::get_best_meaningful_candidate): Likewise.
10625
10626 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10627
10628 * builtins.c (fold_builtin_strlen): Remove TODO comment.
10629
10630 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10631
10632 revert:
10633 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10634
10635 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10636 terminated string literal.
10637
10638 2018-09-14 Martin Sebor <msebor@redhat.com>
10639
10640 * builtins.c (unterminated_array): Handle ARRAY_REF.
10641 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
10642 * builtins.h (unterminated_array): Declare extern.
10643 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
10644 arrays.
10645 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
10646 calls.
10647
10648 2018-09-14 Martin Sebor <msebor@redhat.com>
10649 Jeff Law <law@redhat.com>
10650
10651 * builtins.c (unterminated_array): New.
10652 (expand_builtin_strcpy): Adjust.
10653 (expand_builtin_strcpy_args): Detect unterminated arrays.
10654 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
10655 unterminated arrays.
10656 * gimple-fold.h (get_maxval_strlen): Add argument.
10657 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
10658
10659 * gimple-fold.c (get_range_strlen): Add argument.
10660 (get_maxval_strlen): Adjust.
10661 * gimple-fold.h (get_range_strlen): Add argument.
10662
10663 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
10664
10665 * config/i386/movdirintrin.h: Fix copyright year.
10666
10667 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
10668
10669 * reg-stack.c: Include regs.h.
10670 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
10671 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
10672 FIRST_STACK_REG, not DFmode.
10673 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
10674 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
10675 (change stack): Default register mode to the reg_raw_mode of
10676 FIRST_STACK_REG, not DFmode.
10677 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
10678 (*swapxf): Rename from swapxf.
10679
10680 2018-09-14 Carl Love <cel@us.ibm.com>
10681
10682 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
10683 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
10684
10685 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
10686
10687 PR target/87224
10688 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
10689 alternatives.
10690
10691 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
10692
10693 PR target/85628
10694 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
10695
10696 2018-09-14 Jason Merrill <jason@redhat.com>
10697
10698 Fix --enable-gather-detailed-mem-stats.
10699 * hash-table.c (hash_table_usage): Change from variable to function.
10700 * hash-table.h: Adjust.
10701 * Makefile.in: Add missing dependencies on hash-table.h.
10702
10703 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10704
10705 PR tree-optimization/87259
10706 PR lto/87283
10707 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
10708 execute_cse_reciprocals_1 has tried transforming.
10709
10710 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
10711
10712 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
10713 VR_VARYING for PLUS/MINUS_EXPR.
10714
10715 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
10716
10717 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
10718 formatting.
10719
10720 2018-09-14 Richard Biener <rguenther@suse.de>
10721
10722 PR middle-end/63155
10723 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
10724 bits for the merged partition.
10725
10726 2018-09-13 Martin Sebor <msebor@redhat.com>
10727 Bernd Edlinger <bernd.edlinger@hotmail.de>
10728
10729 * builtins.h (c_srlen): Add argument.
10730 * builtins.c (warn_string_no_nul): New function.
10731 (c_strlen): Add argument and use it. Update recursive calls.
10732 Pass DECL argument to string_constant to get info on non
10733 terminated strings. Update *NONSTR as needed.
10734 (fold_builtin_strlen): Add argument to calls to c_strlen.
10735 Warn for unterminated arrays.
10736 (warn_string_no_null): Add prototype.
10737 * expr.c (string_constant): Update arguments. Update recursive
10738 calls appropriately. Detect missing NUL terminator and outermost
10739 declaration its missing in.
10740 Improve checks for arrays with nonzero lower bound or elements
10741 that are not a single byte. Simplify offset computation.
10742 Simplify checks for non-NUL terminated strings.
10743 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
10744 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
10745
10746 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
10747
10748 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
10749 correctly.
10750 * fold-const.c (c_getstr): Fix function comment. Remove unused third
10751 argument. Fix range checks.
10752 * fold-const.h (c_getstr): Adjust protoype.
10753 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
10754 string is constant but contains no NUL byte.
10755
10756 * expr.c (string_constant): Adjust function comment.
10757 Remove bogus check for zero termination.
10758
10759 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
10760
10761 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
10762 (get_constant_size): Don't make STRING_CSTs larger than they are.
10763 (check_string_literal): New check function for STRING_CSTs.
10764 (output_constant): Use it.
10765
10766 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
10767
10768 PR target/86812
10769 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
10770
10771 2018-09-13 Richard Biener <rguenther@suse.de>
10772
10773 PR tree-optimization/87263
10774 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
10775 (struct unwind_state): Add max_rpo field.
10776 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
10777 Compute max_rpo, the max RPO number a block can be backwards reached
10778 from. Re-write non-iterating mode to a RPO ordered worklist approach,
10779 separating it from the iterating mode.
10780
10781 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10782
10783 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
10784 (rfs_decision): New scheduling decision.
10785
10786 2018-09-13 Richard Biener <rguenther@suse.de>
10787
10788 PR bootstrap/87134
10789 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
10790 (vn_nary_op_insert_pieces_predicated): Do not write useless
10791 valid_dominated_by_p entry outside of the allocated storage.
10792
10793 2018-09-13 Omar Sandoval <osandov@osandov.com>
10794 Tom de Vries <tdevries@suse.de>
10795
10796 PR debug/86985
10797 * dwarf2out.c (is_c): New function.
10798 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
10799
10800 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
10801
10802 PR target/85628
10803 * config/aarch64/aarch64.md (*aarch64_bfxil):
10804 Define.
10805 * config/aarch64/constraints.md (Ulc): Define.
10806 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
10807 Define.
10808 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
10809 New function.
10810
10811 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10812
10813 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
10814 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
10815 aarch64_layout_frame call.
10816 (aarch64_expand_epilogue): Likewise.
10817 (aarch64_initial_elimination_offset): Likewise.
10818 (aarch64_get_separate_components): Likewise.
10819 (aarch64_use_return_insn_p): Likewise.
10820 (aarch64_layout_frame): Remove unneeded check.
10821
10822 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10823
10824 * configure.ac: Only append
10825 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
10826 gcc_config_arguments if it was never reconfigured or last reconfigure
10827 was with different arguments.
10828 * configure: Regenerated.
10829
10830 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10831 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10832
10833 PR middle-end/87290
10834 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
10835 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
10836
10837 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10838
10839 PR tree-optimization/87287
10840 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
10841 X % C == 0 to X % (unsigned) C == 0 optimization to ...
10842 * match.pd (X % C == 0): ... here. New optimization.
10843
10844 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10845
10846 PR middle-end/82853
10847 * expr.h (maybe_optimize_mod_cmp): Declare.
10848 * expr.c (mod_inv): New function.
10849 (maybe_optimize_mod_cmp): New function.
10850 (do_store_flag): Use it.
10851 * cfgexpand.c (expand_gimple_cond): Likewise.
10852
10853 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
10854 Julian Brown <julian@codesourcery.com>
10855
10856 PR middle-end/86336
10857 * gimplify.c (gimplify_scan_omp_clauses): Set
10858 target_firstprivatize_array_bases in OpenACC parallel and kernels
10859 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
10860 OpenACC data regions.
10861
10862 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
10863
10864 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
10865 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
10866
10867 2018-09-12 Richard Biener <rguenther@suse.de>
10868
10869 PR tree-optimization/87280
10870 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
10871 edge but unreachable target.
10872 (do_rpo_vn): For conservatively handling a PHI only mark
10873 the backedge executable but not the block reachable.
10874
10875 2018-09-12 Richard Biener <rguenther@suse.de>
10876
10877 PR tree-optimization/87266
10878 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
10879 visited blocks.
10880
10881 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
10882
10883 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
10884 constants.
10885 ("trunc<BFP:mode><DFP_ALL:mode>2")
10886 ("trunc<DFP_ALL:mode><BFP:mode>2")
10887 ("extend<BFP:mode><DFP_ALL:mode>2")
10888 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
10889 according to the target operand type.
10890
10891 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10892 Andreas Krebbel <krebbel@linux.ibm.com>
10893
10894 PR tree-optimization/86844
10895 * gimple-ssa-store-merging.c
10896 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
10897 there are any overlapping stores in between them, make sure they are
10898 also coalesced or we give up completely.
10899
10900 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10901
10902 PR middle-end/87248
10903 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
10904 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
10905
10906 2018-09-12 Tom de Vries <tdevries@suse.de>
10907
10908 * common.opt (gdescribe-dies): Add option.
10909 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
10910 attribute for artifical and nameless decls.
10911 (dwarf2out_register_external_die): Add description attribute to
10912 external reference die.
10913 (add_desc_attribute): New functions.
10914 (gen_subprogram_die): Add description attribute to
10915 DW_TAG_call_site_parameter.
10916 * tree-pretty-print.c (print_generic_expr_to_str): New function.
10917 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
10918 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
10919 -gno-describe-dies.
10920 (@item -gdescribe-dies): Add.
10921
10922 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10923
10924 * tree-vrp.c (vrp_shift_undefined_p): Remove.
10925 (extract_range_from_binary_expr_1: Call
10926 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
10927 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
10928 depend on sign.
10929
10930 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10931
10932 * gimple-ssa-warn-alloca.c
10933 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
10934 field for ALLOCA_BOUND_*_LARGE.
10935
10936 2018-09-11 Nathan Sidwell <nathan@acm.org>
10937
10938 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
10939
10940 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10941
10942 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
10943 for clobbers. Remove obsolete comment.
10944
10945 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10946
10947 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
10948 mpxchk, mpxld and mpxst types.
10949 (define_attr length_immediate): Remove all processing of mpx types.
10950 (define_attr prefix_0f): Ditto.
10951 (define_attr memory): Ditto.
10952
10953 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10954
10955 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
10956 (log<mode>2): Change operand 1 predicate to general_operand.
10957 Extend operand 1 to XFmode and generate logxf3 insn.
10958 (log10<mode>2): Change operand 1 predicate to general_operand.
10959 Extend operand 1 to XFmode and generate log10xf3 insn.
10960 (log2<mode>2): Change operand 1 predicate to general_operand.
10961 Extend operand 1 to XFmode and generate log2xf3 insn.
10962 (fyl2xp1_extend<mode>xf3_i387): Remove.
10963 (log1p<mode>2): Change operand 1 predicate to general_operand.
10964 Extend operand 1 to XFmode and generate log1pxf3 insn.
10965 (fxtract_extend<mode>xf3_i387): Remove.
10966 (logb<mode>2): Change operand 1 predicate to general_operand.
10967 Extend operand 1 to XFmode and generate logbxf3 insn.
10968 (ilogb<mode>2): Change operand 1 predicate to general_operand.
10969 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
10970 (significand<mode>2): Change operand 1 predicate to general_operand.
10971 Extend operand 1 to XFmode and generate significandxf3 insn.
10972
10973 2018-09-11 Nathan Sidwell <nathan@acm.org>
10974
10975 * gcc.c (perror_with_name, pfatal_with_name): Delete.
10976 (load_specs): Use fatal_error.
10977 (DELETE_IF_ORDINARY, process_command): Use error.
10978 (execute, run_attempt): Use fatal_error.
10979
10980 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
10981
10982 * diagnostic-core.h (sorry_at): New prototype.
10983 * diagnostic.c (sorry_at): New function.
10984
10985 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
10986
10987 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
10988 by zero as VR_UNDEFINED.
10989
10990 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
10991
10992 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
10993 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
10994 (<sincos>mode2): New expander.
10995 (sincos_extend<mode>xf3_i387): Remove insn pattern.
10996 (sincos -> sin, cos splitters): Remove splitter patterns.
10997 (sincos<mode>3): Change operand 2 predicate to general_operand.
10998 Extend operand 2 to XFmode and generate sincosxf3 insn.
10999 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
11000 Change operand 3 predicate to const1_operand.
11001 (fptan_extend<mode>xf4_i387): Remove insn pattern.
11002 (tanxf2): Update operands in the call to fptanxf4_i387.
11003 (tan<mode>2): Change operand 1 predicate to general_operand.
11004 Extend operand 1 to XFmode and generate tanxf3 insn.
11005 (atan2xf3): Rename from *fpatanxf3_i387.
11006 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
11007 (atan2xf3): Remove expander.
11008 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
11009 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
11010 (atan<mode>2): Change operand 1 predicate to general_operand.
11011 Extend operand 1 to XFmode and generate atanxf3 insn.
11012
11013 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
11014
11015 * config/i386/i386.md (x87/SSE constant load splitter): Use
11016 memory_operand instead of nonimmediate_operand for input operand
11017 predicate.
11018
11019 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
11020
11021 * config/i386/i386.md (float partial SSE register stall splitter): Move
11022 splitter near its instruction pattern.
11023 (float_extend partial SSE register stall splitter): Ditto.
11024 (float_truncate partial SSE register stall splitter): Ditto.
11025
11026 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
11027
11028 PR target/86794
11029 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11030 to speculation_safe_value_not_needed.
11031
11032 PR target/85666
11033 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
11034 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
11035 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
11036 leaf_function_p, instead use has_hard_reg_initial_val.
11037
11038 2018-09-09 Nathan Sidwell <nathan@acm.org>
11039
11040 * gcc.h (pfatal_with_name): Don't declare here.
11041 * gcc.c (pfatal_with_name): Make static.
11042
11043 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
11044
11045 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
11046 earlyclobber.
11047
11048 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
11049
11050 PR rtl-optimization/85458
11051 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
11052 priority hook to reduce the priority of EXPR.
11053
11054 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
11055
11056 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
11057 DImode for x87 on 32bit targets. Conditionally disable x87 modes
11058 with X87_ENABLE_FLOAT. Remove preparation code.
11059 (*float<SWI48:mode><MODEF:mode>2): Rename from
11060 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
11061 math using "enabled" attribute.
11062 (*floatdi<MODEF:mode>2_i387): Rename from
11063 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
11064 enable for 32bit targets only.
11065 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
11066 splitter.
11067 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
11068 as operand 1 predicate. Rewrite as define_insn_and_split.
11069 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
11070
11071 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
11072
11073 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
11074 to fallthru to FLOAT case.
11075
11076 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
11077
11078 PR target/86731
11079 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
11080 around folding of vec_sl to handle out of range shift values.
11081
11082 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
11083
11084 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
11085 Update callers to gen_fix_trunc<mode>_i387_fisttp
11086 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
11087 nonimmediate_operand.
11088 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
11089 and corresponding splitters.
11090 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
11091 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
11092 (fix_truncdi_i387_with_temp): Remove insn pattern
11093 and corresponding splitters.
11094 (fix_trunc<mode>_i387): Change operand 0 predicate to
11095 nonimmediate_operand.
11096 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
11097 and corresponding splitters.
11098 (*fistdi2_1): Remove.
11099 (fistdi2): Ditto.
11100 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
11101 (lrintxfdi2): Remove expander. Reimplement as define_insn.
11102 (*fist<mode>2_1): Remove.
11103 (fist<mode>2): Ditto.
11104 (fist<mode>2_with_temp): Remove insn pattern and corresponding
11105 splitters.
11106 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
11107 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
11108 (fistdi2_<rounding>): Change operand 0 predicate to
11109 nonimmediate_operand.
11110 (fistdi2_<rounding>_with_temp): Remove insn pattern
11111 and corresponding splitters.
11112 (fist<mode>2_<rounding>): Change operand 0 predicate to
11113 nonimmediate_operand.
11114 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
11115 and corresponding splitters.
11116
11117 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
11118
11119 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
11120
11121 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
11122 the init value.
11123
11124 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
11125
11126 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
11127 early gimple folding of vec_splat().
11128 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
11129 * gimple-fold.h: Add an extern define for tree_vec_extract().
11130
11131 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
11132
11133 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
11134 wrappers around TREE_TYPE comparisons.
11135
11136 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11137
11138 PR target/80080
11139 * config/s390/predicates.md: Add nonsym_memory_operand.
11140 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
11141 contains a SYMBOL_REF, load it into an intermediate pseudo.
11142 (s390_emit_compare_and_swap): Legitimize operand.
11143 * config/s390/s390.md: Use the new nonsym_memory_operand
11144 with UNSPECV_CAS patterns.
11145
11146 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11147
11148 PR target/80080
11149 * config/s390/s390-passes.def: New file.
11150 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
11151 declaration.
11152 (make_pass_s390_early_mach): Add declaration.
11153 * config/s390/s390.c (make_pass_s390_early_mach):
11154 (s390_option_override): Remove dynamic registration.
11155 * config/s390/t-s390: Add s390-passes.def.
11156
11157 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11158
11159 * config/s390/s390.c (s390_decompose_constant_pool_ref):
11160 Remove UNSPEC_LTREL_BASE check.
11161 (annotate_constant_pool_refs): Likewise.
11162 (find_constant_pool_ref): Likewise.
11163 (find_ltrel_base): Removed.
11164 (replace_ltrel_base): Removed.
11165 (s390_mainpool_finish): Remove replace_ltrel_base call.
11166 (s390_chunkify_start): Remove pending LTREL_BASE logic.
11167 (s390_chunkify_finish): Remove replace_ltrel_base call.
11168 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
11169
11170 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
11171
11172 PR target/86779
11173 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11174 to speculation_safe_value_not_needed.
11175
11176 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
11177 Bernd Schmidt <bernds_cb1@t-online.de>
11178
11179 * config/nvptx/nvptx-opts.h: New file.
11180 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
11181 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
11182 (ASM_SPEC): Define.
11183 (TARGET_SM35): New macro.
11184 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
11185 correct predicate.
11186 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
11187 values.
11188 (misa=): New option.
11189 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
11190
11191 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
11192
11193 * config/i386/i386.md (truncdfsf2): Remove expander.
11194 (truncdfsf2_with_temp): Ditto.
11195 (truncxf<mode>2): Ditto.
11196 (*truncdfsf_fast_mixed): Remove insn pattern.
11197 (*truncdfsf_fast_i387): Ditto.
11198 (*truncdfsf_mixed): Ditto.
11199 (*truncdfsf_i387): Ditto.
11200 (*truncdfsf2_i387_1): Ditto.
11201 (*truncxfsf2_mixed): Ditto.
11202 (*truncxfdf2_mixed): Ditto.
11203 (*truncxf<mode>2_i387_noop): Ditto. Update callers
11204 to call gen_truncxf<mode>2 instead.
11205 (*truncxf<mode>2_i387): Remove.
11206 (reg->reg splitters): Remove splitter pattern.
11207 (reg->mem splitters): Ditto.
11208
11209 (truncdfsf2): New insn pattern.
11210 (truncxf<mode>2): Ditto.
11211
11212 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11213
11214 * tree-ssa-math-opts.c (is_mult_by): New function.
11215 (is_square_of): Use the above.
11216 (optimize_recip_sqrt): New function.
11217 (pass_cse_reciprocals::execute): Use the above.
11218
11219 2018-09-05 Richard Biener <rguenther@suse.de>
11220
11221 PR bootstrap/87134
11222 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
11223 to zero-init the emplaced vec.
11224
11225 2018-09-05 Martin Liska <mliska@suse.cz>
11226
11227 PR tree-optimization/87205
11228 * tree-switch-conversion.c (pass_lower_switch::execute):
11229 Group cases for switch statements.
11230
11231 2018-09-05 Richard Biener <rguenther@suse.de>
11232
11233 PR tree-optimization/87217
11234 * tree-ssa-sccvn.c (vuse_valueize): New.
11235 (vn_reference_lookup_pieces): Use it.
11236 (vn_reference_lookup): Likewise.
11237
11238 2018-09-05 Nathan Sidwell <nathan@acm.org>
11239
11240 PR c++/87137
11241 * stor-layout.c (place_field): Scan forwards to check last
11242 bitfield when ms_bitfield_placement is in effect.
11243
11244 2018-09-05 Richard Biener <rguenther@suse.de>
11245
11246 PR bootstrap/87225
11247 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
11248 return.
11249
11250 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
11251 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11252
11253 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
11254 * config.gcc (extra_objs): Build it.
11255 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
11256 Likewise.
11257 * config/aarch64/aarch64-passes.def
11258 (pass_tag_collision_avoidance): New pass.
11259 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
11260 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
11261 (aarch64_classify_address): Remove static qualifier.
11262 (aarch64_address_info, aarch64_address_type): Move to...
11263 * config/aarch64/aarch64-protos.h: ... here.
11264 (make_pass_tag_collision_avoidance): New function.
11265 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
11266 New tuning flag.
11267
11268 2018-09-05 Martin Liska <mliska@suse.cz>
11269
11270 * doc/gcov.texi: Update documentation of humar
11271 readable mode.
11272 * gcov.c (format_count): Print one decimal place, it provides
11273 more fine number of situations like '1G' vs. '1.4G'.
11274
11275 2018-09-05 Martin Liska <mliska@suse.cz>
11276
11277 PR target/87164
11278 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
11279 * optc-gen.awk: Allow 'Var' for Deprecated options in order
11280 to generate a MASK value.
11281
11282 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
11283
11284 PR debug/86593
11285 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
11286 if frame pointer isn't used.
11287 (compute_frame_pointer_to_fb_displacement): Likewise.
11288
11289 2018-09-04 Jakub Jelinek <jakub@redhat.com>
11290
11291 PR target/87198
11292 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
11293 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
11294 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
11295 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
11296 and OPTION_MASK_ISA_XSAVEC_UNSET.
11297
11298 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
11299
11300 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
11301 XOR operations in NAND case.
11302
11303 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11304
11305 * wide-int-range.cc (wide_int_range_convert): New.
11306 * wide-int-range.h (wide_int_range_convert): New.
11307 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
11308 code into wide_int_range_convert.
11309 (extract_range_into_wide_ints): Do not munge anti range constants
11310 into the entire domain. Just return the range back.
11311
11312 2018-09-04 Martin Liska <mliska@suse.cz>
11313
11314 * genmatch.c (output_line_directive): Add new argument
11315 fnargs.
11316 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
11317
11318 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11319
11320 * doc/invoke.texi (Option Summary): Add whitespace.
11321
11322 * doc/invoke.texi (Option Summary): Add -Waligned-new.
11323
11324 2018-09-04 Richard Biener <rguenther@suse.de>
11325
11326 PR tree-optimization/87211
11327 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
11328 backedge value we're supposed to treat as VARYING also number
11329 the PHI to VARYING in case it got a different value-number already.
11330
11331 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11332
11333 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
11334 (extract_range_from_binary_expr_1): Do not call
11335 vrp_can_optimize_bit_op.
11336 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
11337 static.
11338 (wide_int_range_get_mask_and_bounds): New.
11339 (wide_int_range_optimize_bit_op): New.
11340 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
11341 (wide_int_range_bit_and): Same.
11342 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
11343 (wide_int_range_optimize_bit_op): New.
11344 (wide_int_range_get_mask_and_bounds): New.
11345
11346 2018-09-04 Richard Biener <rguenther@suse.de>
11347
11348 PR tree-optimization/87176
11349 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
11350 variable. When value-numbering a virtual PHI node make sure
11351 to not value-number to the backedge value.
11352
11353 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11354
11355 * doc/extend.texi (Long Long, Hex Floats): Document support for
11356 long long and hex floats in more recent versions of ISO C++.
11357
11358 2018-09-03 Richard Biener <rguenther@suse.de>
11359
11360 PR tree-optimization/87177
11361 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
11362 cleanup.
11363
11364 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11365
11366 * bb-reorder.c (edge_order): Convert to C-qsort-style
11367 tri-state comparator.
11368 (reorder_basic_blocks_simple): Change std::stable_sort to
11369 gcc_stablesort.
11370
11371 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11372
11373 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
11374 tri-state comparator.
11375 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
11376
11377 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11378
11379 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
11380 (mergesort): ... here as maximum count for using netsort.
11381 (gcc_qsort): Set nlim to 3 if stable sort is requested.
11382 (gcc_stablesort): New.
11383 * system.h (gcc_stablesort): Declare.
11384
11385 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11386
11387 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
11388 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
11389 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
11390
11391 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
11392
11393 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
11394 lxsdx and stxsdx alternatives.
11395 (*mov<mode>_hardfloat64): Ditto.
11396 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
11397
11398 2018-09-03 Richard Biener <rguenther@suse.de>
11399
11400 PR tree-optimization/87200
11401 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
11402 simplify result.
11403
11404 2018-09-03 Martin Liska <mliska@suse.cz>
11405
11406 PR tree-optimization/87201
11407 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11408 Fix parenthesis in an expression.
11409
11410 2018-09-03 Richard Biener <rguenther@suse.de>
11411
11412 PR tree-optimization/87197
11413 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
11414 visited. CSE the VN_INFO hashtable lookup.
11415
11416 PR tree-optimization/87169
11417 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
11418 iterating make sure there's no extra backedges from irreducible
11419 regions feeding the header. Mark the destination block
11420 executable.
11421
11422 2018-09-03 Martin Liska <mliska@suse.cz>
11423
11424 PR driver/83193
11425 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
11426 * common/common-targhooks.c (default_get_valid_option_values):
11427 New function.
11428 * common/common-targhooks.h (default_get_valid_option_values):
11429 Likewise.
11430 * common/config/i386/i386-common.c: Move processor_target_table
11431 from i386.c.
11432 (ix86_get_valid_option_values): New function.
11433 (TARGET_GET_VALID_OPTION_VALUES): New macro.
11434 * config/i386/i386.c (struct ptt): Move to i386-common.c.
11435 (PTA_*): Move all defined masks into i386-common.c.
11436 (ix86_function_specific_restore): Use new processor_cost_table.
11437 * config/i386/i386.h (struct ptt): Moved from i386.c.
11438 (struct pta): Likewise.
11439 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
11440 * doc/tm.texi.in: Likewise.
11441 * opt-suggestions.c (option_proposer::suggest_option):
11442 Pass prefix to build_option_suggestions.
11443 (option_proposer::get_completions): Likewise.
11444 (option_proposer::build_option_suggestions): Use the new target
11445 hook.
11446 * opts.c (struct option_help_tuple): New struct.
11447 (print_filtered_help): Use the new target hook.
11448
11449 2018-09-03 Martin Liska <mliska@suse.cz>
11450
11451 PR middle-end/59521
11452 * predict.c (set_even_probabilities): Add likely_edges
11453 argument and handle cases where we have precisely one
11454 likely edge.
11455 (combine_predictions_for_bb): Catch also likely_edges.
11456 (tree_predict_by_opcode): Handle gswitch statements.
11457 * tree-cfg.h (find_case_label_for_value): New declaration.
11458 (find_taken_edge_switch_expr): Likewise.
11459 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11460 Find pivot in decision tree based on probabily, not by number of
11461 nodes.
11462
11463 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
11464
11465 * doc/standards.texi (Standards): Update Objective-C reference.
11466
11467 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11468
11469 * doc/install.texi (Prerequisites): Update link for MPC.
11470
11471 2018-09-01 Michael Matz <matz@suse.de>
11472
11473 PR tree-optimization/87074
11474 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
11475 PHIs for outer-loop uses.
11476
11477 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11478
11479 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
11480 * doc/invoke.texi (C Dialect Options): Ditto.
11481
11482 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11483
11484 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
11485
11486 2018-08-31 Richard Biener <rguenther@suse.de>
11487
11488 PR tree-optimization/87168
11489 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
11490 (rpo_elim::eliminate_avail): When OP was not visited it must
11491 be available.
11492
11493 2018-08-31 David Malcolm <dmalcolm@redhat.com>
11494
11495 * tree-vrp.c (copy_value_range): Convert param "from" from
11496 "value_range *" to "const value_range *".
11497 (range_is_null): Likewise for param "vr".
11498 (range_int_cst_p): Likewise.
11499 (range_int_cst_singleton_p): Likewise.
11500 (symbolic_range_p): Likewise.
11501 (value_ranges_intersect_p): Likewise for both params.
11502 (value_range_nonnegative_p): Likewise for param "vr".
11503 (value_range_constant_singleton): Likewise.
11504 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
11505 (extract_range_into_wide_ints): Likewise for param "vr".
11506 (extract_range_from_multiplicative_op): Likewise for params "vr0"
11507 and "vr1".
11508 (vrp_can_optimize_bit_op): Likewise.
11509 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
11510 "vr1_".
11511 (extract_range_from_unary_expr): Likewise.
11512 (debug_value_range): Likewise for param "vr".
11513 (value_range::dump): Add "const" qualifier.
11514 (vrp_prop::check_array_ref): Convert local "vr" from
11515 "value_range *" to "const value_range *".
11516 (vrp_prop::check_mem_ref): Likewise.
11517 (vrp_prop::visit_stmt): Likewise for local "old_vr".
11518 (vrp_intersect_ranges_1): Likewise for param "vr_1".
11519 (vrp_intersect_ranges): Likewise.
11520 (simplify_stmt_for_jump_threading): Likewise for local "vr".
11521 (vrp_prop::vrp_finalize): Likewise.
11522 * tree-vrp.h (value_range::dump): Add "const" qualifier.
11523 (vrp_intersect_ranges): Add "const" qualifier to params as above.
11524 (extract_range_from_unary_expr): Likewise.
11525 (value_range_constant_singleton): Likewise.
11526 (symbolic_range_p): Likewise.
11527 (copy_value_range): Likewise.
11528 (extract_range_from_binary_expr_1): Likewise.
11529 (range_int_cst_p): Likewise.
11530 (vrp_set_zero_nonzero_bits): Likewise.
11531 (range_int_cst_singleton_p): Likewise.
11532
11533 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
11534
11535 * config/aarch64/arm_neon.h (vabsd_s64): New.
11536 (vnegd_s64): Likewise.
11537
11538 2018-08-31 Martin Jambor <mjambor@suse.cz>
11539
11540 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
11541
11542 2018-08-31 Martin Liska <mliska@suse.cz>
11543
11544 * ipa-icf.c (sem_item::add_type): Use
11545 sem_item::m_type_hash_cache.
11546 * ipa-icf.h: Move the cache from sem_item_optimizer
11547 to sem_item.
11548
11549 2018-08-31 Nathan Sidwell <nathan@acm.org>
11550
11551 * doc/extend.texi (Backwards Compatibility): Remove implicit
11552 extern C leeway of () being (...).
11553
11554 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11555
11556 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
11557
11558 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
11559
11560 PR target/86684
11561 PR target/87149
11562 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
11563
11564 2018-08-31 Jakub Jelinek <jakub@redhat.com>
11565
11566 PR middle-end/87138
11567 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
11568 gen_int_mode. Formatting fixes.
11569
11570 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
11571
11572 * target.def (custom_function_descriptors): Improve documentation.
11573 * doc/tm.texi.in (Trampolines): Expand discussion of function
11574 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
11575 beginning of the section.
11576 * doc/tm.texi: Regenerated.
11577
11578 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
11579
11580 * cfg.h (class auto_edge_flag): Spell out the template-id of the
11581 base class in the initializer list. This is a workaround for
11582 building with older GCC.
11583 (class auto_bb_flag): Likewise.
11584
11585 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
11586
11587 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
11588 (altivec_vcmpequ<VI_char>_p): Remove star.
11589 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
11590 vector load modes.
11591 (expand_strncmp_vec_sequence): New function.
11592 (emit_final_str_compare_vec): New function.
11593 (expand_strn_compare): Add support for vector strncmp.
11594 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
11595 length specification to bytes.
11596 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
11597 (vcmpnezb_p): New pattern.
11598 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
11599 for option -mstring-compare-inline-limit.
11600
11601 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
11602
11603 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
11604 (PTA_SKYLAKE): Add PTA_AES.
11605 (PTA_GOLDMONT): Likewise.
11606
11607 2018-08-29 Jan Hubicka <jh@suse.cz>
11608
11609 PR lto/86517
11610 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
11611 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
11612
11613 2018-08-29 Jan Hubicka <jh@suse.cz>
11614
11615 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
11616 TYPE_STUB_DECL.
11617 (hash_tree): Do not visit TYPE_STUB_DECL.
11618 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
11619 stream TYPE_STUB_DECL.
11620 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
11621 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
11622 after free_lang_data.
11623 (type_in_anonymous_namespace_p): Likewise.
11624
11625 2018-08-29 Jan Hubicka <jh@suse.cz>
11626
11627 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11628 comment that it has to be even number.
11629 (class sreal): Change m_sig type to int32_t.
11630 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11631 int64_t for temporary calculations.
11632 (sreal_verify_basics): Drop one bit from minimum and maximum.
11633
11634 2018-08-30 Richard Biener <rguenther@suse.de>
11635
11636 PR tree-optimization/87147
11637 * tree-ssa-sccvn.c (SSA_VISITED): New function.
11638 (visit_phi): When the degenerate result is from the backedge and
11639 we didn't visit its definition yet drop to VARYING.
11640 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
11641
11642 2018-08-29 Jan Hubicka <jh@suse.cz>
11643
11644 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
11645 DECL_VINDEX.
11646 (hash_tree): Likewise.
11647
11648 2018-08-29 Jan Hubicka <jh@suse.cz>
11649
11650 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
11651 and TYPE_NEXT_REF_TO.
11652
11653 2018-08-29 Jan Hubicka <jh@suse.cz>
11654
11655 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11656 comment that it has to be even number.
11657 (class sreal): Change m_sig type to int32_t.
11658 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11659 int64_t for temporary calculations.
11660 (sreal_verify_basics): Drop one bit from minimum and maximum.
11661
11662 2018-08-30 Tamar Christina <tamar.christina@arm.com>
11663
11664 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
11665
11666 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
11667
11668 PR middle-end/86995
11669 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
11670 if to_add is negative.
11671
11672 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
11673
11674 PR middle-end/87053
11675 * builtins.c (c_strlen): Improve range checks.
11676
11677 2018-08-29 Martin Sebor <msebor@redhat.com>
11678 Jeff Law <law@redhat.com>
11679
11680 PR tree-optimization/86714
11681 PR tree-optimization/86711
11682 * builtins.c (c_strlen): Add arguments to call to string_constant.
11683 * expr.c (string_constant): Add argument. Detect missing nul
11684 terminator and outermost declaration it's missing in.
11685 * expr.h (string_constant): Add argument.
11686 * fold-const.c (read_from_constant_string): Add arguments to call to
11687 string_constant.
11688 (c_getstr): Likewise.
11689 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
11690 to string_constant.
11691 * tree-ssa-strlen.c (get_stridx): Likewise.
11692
11693 2018-08-29 Jan Hubicka <jh@suse.cz>
11694
11695 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
11696 Do not stream DECL_VINDEX.
11697 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
11698 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
11699 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
11700
11701 2018-08-29 Richard Biener <rguenther@suse.de>
11702
11703 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
11704 virtual operands that are not default defs to honor region
11705 boundaries.
11706 (rpo_vn_valueize): Remove ineffective code here.
11707
11708 2018-08-29 Richard Biener <rguenther@suse.de>
11709
11710 PR tree-optimization/87132
11711 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
11712 when skipping defs reachable over backedges.
11713
11714 2018-08-29 Richard Biener <rguenther@suse.de>
11715
11716 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
11717 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
11718 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
11719 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
11720 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
11721 (vn_reference_lookup_3): Remove use of const_parms.
11722 (free_rpo_vn): Do not free const_parms.
11723 (do_rpo_vn): Do not call init_const_parms.
11724 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
11725 SSA_NAME_POINTS_TO_READONLY_MEMORY.
11726 (call_may_clobber_ref_p_1): Likewise.
11727
11728 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
11729
11730 PR other/86726
11731 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
11732 (-O): Ditto.
11733 (-ftree-scev-cprop): Document.
11734
11735 2018-08-29 Jan Hubicka <jh@suse.cz>
11736
11737 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
11738 parameters.
11739 (sreal constructor): Update.
11740 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
11741 sreal:operator/): Update.
11742
11743 2018-08-29 Martin Liska <mliska@suse.cz>
11744
11745 * tree-switch-conversion.c (switch_conversion::expand):
11746 Strenghten assumption about gswitch statements.
11747
11748 2018-08-29 Richard Biener <rguenther@suse.de>
11749
11750 PR tree-optimization/87117
11751 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
11752 re-value-number released SSA VDEFs.
11753
11754 2018-08-29 Richard Biener <rguenther@suse.de>
11755
11756 PR tree-optimization/87126
11757 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
11758
11759 2018-08-28 Jim Wilson <jimw@sifive.com>
11760
11761 * config/riscv/pic.md: Rewrite.
11762 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
11763 invalid address.
11764 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
11765 (SOFTF, default_load, softload, softstore): New.
11766
11767 2018-08-28 Jeff Law <law@redhat.com>
11768
11769 * fold-const.c (fold_binary_loc): Remove recently added assert.
11770
11771 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
11772
11773 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
11774 to OP parmeter of generated function.
11775
11776 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
11777
11778 PR tree-optimization/87009
11779 * match.pd: Add boolean optimizations.
11780
11781 2018-08-28 Martin Sebor <msebor@redhat.com>
11782
11783 PR middle-end/86631
11784 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
11785 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
11786 (pass_walloca::gate): Use it.
11787 (alloca_call_type): Same.
11788 (pass_walloca::execute): Same.
11789 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
11790
11791 2018-08-28 David Malcolm <dmalcolm@redhat.com>
11792
11793 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
11794 GCC_VERSION for usage of "__gcc_dump_printf__" format from
11795 >= 3005 to >= 9000.
11796
11797 2018-08-28 Richard Biener <rguenther@suse.de>
11798
11799 PR tree-optimization/87124
11800 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
11801 constants before looking up avail.
11802
11803 2018-08-28 Jakub Jelinek <jakub@redhat.com>
11804
11805 PR middle-end/87099
11806 * calls.c (maybe_warn_nonstring_arg): Punt early if
11807 warn_stringop_overflow is zero. Don't call get_range_strlen
11808 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
11809 Swap comparison operands to have constants on rhs. Only use
11810 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
11811 increment lenrng[0].
11812
11813 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
11814
11815 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
11816 use of tree_to_shwi. Remove duplicated test for the size being
11817 a whole number of bytes.
11818
11819 2018-08-28 Richard Biener <rguenther@suse.de>
11820
11821 PR tree-optimization/87117
11822 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
11823 Handle removed stmt without LHS (GIMPLE_NOP).
11824
11825 2018-08-28 Richard Biener <rguenther@suse.de>
11826
11827 PR tree-optimization/87117
11828 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
11829 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
11830
11831 2018-08-28 Richard Biener <rguenther@suse.de>
11832
11833 PR tree-optimization/87117
11834 * tree-ssa-pre.c (compute_avail): Do not make expressions
11835 with predicated values available.
11836 (get_expr_value_id): Assert we do not run into predicated value
11837 expressions.
11838
11839 2018-08-28 Richard Biener <rguenther@suse.de>
11840
11841 PR tree-optimization/87117
11842 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
11843 get virtual operands.
11844 (get_expr_operands): Handle STRING_CST like other decls.
11845
11846 2018-08-28 Martin Liska <mliska@suse.cz>
11847
11848 * tree.h: Update documentation of fndecl_built_in_p
11849 functions.
11850
11851
11852 2018-08-27 Jeff Law <law@redhat.com>
11853 PR tree-optimization/87110
11854 * tree-ssa-dse.c (compute_trims): Handle non-constant
11855 TYPE_SIZE_UNIT.
11856
11857 2018-08-27 Martin Sebor <msebor@redhat.com>
11858
11859 PR tree-optimization/86914
11860 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
11861
11862 2018-08-27 Martin Sebor <msebor@redhat.com>
11863
11864 PR tree-optimization/87112
11865 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
11866 the type of the bound argument.
11867
11868 2018-08-27 Jeff Law <law@redhat.com>
11869
11870 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
11871 type does not have a TYPE_SIZE_UNIT.
11872
11873 2018-08-27 Steve Ellcey <sellcey@cavium.com>
11874
11875 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
11876 with include of backend.h.
11877
11878 2018-08-27 Richard Biener <rguenther@suse.de>
11879
11880 PR tree-optimization/86927
11881 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
11882 use const cond reduction code.
11883
11884 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
11885
11886 PR tree-optimization/85758
11887 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
11888
11889 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11890
11891 PR c++/87091
11892 * diagnostic-show-locus.c (class layout_range): Update for
11893 conversion of show_caret_p to a tri-state.
11894 (layout_range::layout_range): Likewise.
11895 (make_range): Likewise.
11896 (layout::maybe_add_location_range): Likewise.
11897 (layout::should_print_annotation_line_p): Don't show annotation
11898 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
11899 (layout::get_state_at_point): Update for conversion of
11900 show_caret_p to a tri-state. Bail out early for
11901 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
11902 underlining or source colorization.
11903 (gcc_rich_location::add_location_if_nearby): Update for conversion
11904 of show_caret_p to a tri-state.
11905 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
11906 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
11907 Likewise.
11908 (selftest::test_one_liner_labels): Likewise.
11909 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
11910 conversion of show_caret_p to a tri-state.
11911 * pretty-print.c (text_info::set_location): Likewise.
11912 * pretty-print.h (text_info::set_location): Likewise.
11913 * substring-locations.c (format_warning_n_va): Likewise.
11914 * tree-diagnostic.c (default_tree_printer): Likewise.
11915 * tree-pretty-print.c (newline_and_indent): Likewise.
11916
11917 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11918
11919 PR c++/87091
11920 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
11921 line above for line-insertion fix-it hints.
11922 (selftest::test_fixit_insert_containing_newline): Update the
11923 expected results, and add a test with line-numbering enabled.
11924
11925 2018-08-27 Martin Liska <mliska@suse.cz>
11926
11927 PR sanitizer/86962
11928 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
11929 params with DECL_HAS_VALUE_EXPR_P.
11930
11931 2018-08-27 Martin Liska <mliska@suse.cz>
11932
11933 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
11934 selected expansion strategy.
11935
11936 2018-08-27 Martin Liska <mliska@suse.cz>
11937
11938 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
11939 * builtins.c (is_builtin_fn): Likewise.
11940 * attribs.c (diag_attr_exclusions): Use new function
11941 fndecl_built_in_p and remove check for FUNCTION_DECL if
11942 possible.
11943 (builtin_mathfn_code): Likewise.
11944 (fold_builtin_expect): Likewise.
11945 (fold_call_expr): Likewise.
11946 (fold_builtin_call_array): Likewise.
11947 (fold_call_stmt): Likewise.
11948 (set_builtin_user_assembler_name): Likewise.
11949 (is_simple_builtin): Likewise.
11950 * calls.c (gimple_alloca_call_p): Likewise.
11951 (maybe_warn_nonstring_arg): Likewise.
11952 * cfgexpand.c (expand_call_stmt): Likewise.
11953 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
11954 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
11955 (cgraph_node::verify_node): Likewise.
11956 * cgraphclones.c (build_function_decl_skip_args): Likewise.
11957 (cgraph_node::create_clone): Likewise.
11958 * config/arm/arm.c (arm_insert_attributes): Likewise.
11959 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
11960 * dse.c (scan_insn): Likewise.
11961 * expr.c (expand_expr_real_1): Likewise.
11962 * fold-const.c (operand_equal_p): Likewise.
11963 (fold_binary_loc): Likewise.
11964 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
11965 * gimple-low.c (lower_stmt): Likewise.
11966 * gimple-pretty-print.c (dump_gimple_call): Likewise.
11967 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
11968 Likewise.
11969 * gimple.c (gimple_build_call_from_tree): Likewise.
11970 (gimple_call_builtin_p): Likewise.
11971 (gimple_call_combined_fn): Likewise.
11972 * gimplify.c (gimplify_call_expr): Likewise.
11973 (gimple_boolify): Likewise.
11974 (gimplify_modify_expr): Likewise.
11975 (gimplify_addr_expr): Likewise.
11976 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
11977 * ipa-cp.c (determine_versionability): Likewise.
11978 * ipa-fnsummary.c (compute_fn_summary): Likewise.
11979 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
11980 * ipa-split.c (visit_bb): Likewise.
11981 (split_function): Likewise.
11982 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
11983 * lto-cgraph.c (input_node): Likewise.
11984 * lto-streamer-out.c (write_symbol): Likewise.
11985 * omp-low.c (setjmp_or_longjmp_p): Likewise.
11986 (lower_omp_1): Likewise.
11987 * predict.c (strip_predict_hints): Likewise.
11988 * print-tree.c (print_node): Likewise.
11989 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
11990 * trans-mem.c (is_tm_irrevocable): Likewise.
11991 (is_tm_load): Likewise.
11992 (is_tm_simple_load): Likewise.
11993 (is_tm_store): Likewise.
11994 (is_tm_simple_store): Likewise.
11995 (is_tm_abort): Likewise.
11996 (tm_region_init_1): Likewise.
11997 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
11998 * tree-cfg.c (verify_gimple_call): Likewise.
11999 (move_stmt_r): Likewise.
12000 (stmt_can_terminate_bb_p): Likewise.
12001 * tree-eh.c (lower_eh_constructs_2): Likewise.
12002 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
12003 * tree-inline.c (remap_gimple_stmt): Likewise.
12004 (copy_bb): Likewise.
12005 (estimate_num_insns): Likewise.
12006 (fold_marked_statements): Likewise.
12007 * tree-sra.c (scan_function): Likewise.
12008 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
12009 (optimize_stack_restore): Likewise.
12010 (pass_fold_builtins::execute): Likewise.
12011 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
12012 (mark_all_reaching_defs_necessary_1): Likewise.
12013 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
12014 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
12015 (pass_forwprop::execute): Likewise.
12016 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12017 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
12018 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
12019 * tree-ssa-strlen.c (get_string_length): Likewise.
12020 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
12021 (find_func_aliases_for_call): Likewise.
12022 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
12023 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
12024 * tree-tailcall.c (find_tail_calls): Likewise.
12025 * tree.c (need_assembler_name_p): Likewise.
12026 (free_lang_data_in_decl): Likewise.
12027 (get_call_combined_fn): Likewise.
12028 * ubsan.c (is_ubsan_builtin_p): Likewise.
12029 * varasm.c (incorporeal_function_p): Likewise.
12030 * tree.h (DECL_BUILT_IN): Remove and replace with
12031 fndecl_built_in_p.
12032 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
12033 (fndecl_built_in_p): New.
12034
12035 2018-08-27 Martin Liska <mliska@suse.cz>
12036
12037 PR tree-optimization/86847
12038 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
12039 Dump also subtree probability.
12040 (switch_decision_tree::do_jump_if_equal): New function.
12041 (switch_decision_tree::emit_case_nodes): Handle special
12042 situations in balanced tree that can be emitted much simpler.
12043 Fix calculation of probabilities that happen in tree expansion.
12044 * tree-switch-conversion.h (struct cluster): Add
12045 is_single_value_p.
12046 (struct simple_cluster): Likewise.
12047 (struct case_tree_node): Add new function has_child.
12048 (do_jump_if_equal): New.
12049
12050 2018-08-27 Martin Liska <mliska@suse.cz>
12051
12052 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
12053 Add new argument to bit_test_cluster constructor.
12054 (bit_test_cluster::emit): Set bits really number of values
12055 handlel by a test.
12056 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
12057 probability argument.
12058 * tree-switch-conversion.h (struct bit_test_cluster):
12059 Add m_handles_entire_switch.
12060
12061 2018-08-27 Martin Liska <mliska@suse.cz>
12062
12063 PR tree-optimization/86702
12064 * tree-switch-conversion.c (jump_table_cluster::emit):
12065 Make probabilities even for values in jump table
12066 according to number of cases handled.
12067 (switch_decision_tree::compute_cases_per_edge): Pass
12068 argument to reset_out_edges_aux function.
12069 (switch_decision_tree::analyze_switch_statement): Likewise.
12070 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
12071 Make it static.
12072
12073 2018-08-27 Martin Liska <mliska@suse.cz>
12074
12075 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
12076 cfun argument explicitly.
12077 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
12078 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
12079 function gimple_switch_default_bb.
12080 (convert_switch_statements):
12081 (expand_builtins):
12082 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
12083 * stmt.c (label_to_block_fn): Use label_to_block and pass
12084 cfun argument explicitly and use gimple_switch_label_bb.
12085 (expand_case): Likewise.
12086 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
12087 cfun argument explicitly. Likewise.
12088 (make_edges_bb): Likewise.
12089 (make_cond_expr_edges): Likewise.
12090 (get_cases_for_edge): Likewise.
12091 (make_gimple_switch_edges): Likewise.
12092 (label_to_block_fn): Likewise.
12093 (label_to_block): Likewise.
12094 (make_goto_expr_edges): Likewise.
12095 (make_gimple_asm_edges): Likewise.
12096 (main_block_label): Likewise.
12097 (group_case_labels_stmt): Likewise.
12098 (find_taken_edge_computed_goto): Likewise.
12099 (find_taken_edge_switch_expr): Likewise.
12100 (gimple_verify_flow_info): Likewise.
12101 (gimple_redirect_edge_and_branch): Likewise.
12102 (gimple_switch_label_bb): New function.
12103 (gimple_switch_default_bb): Likewise.
12104 (gimple_switch_edge): Likewise.
12105 (gimple_switch_default_edge): Likewise.
12106 * tree-cfg.h (label_to_block_fn): Remove and replace ...
12107 (label_to_block): ... with this.
12108 (gimple_switch_label_bb): New.
12109 (gimple_switch_default_bb): Likewise.
12110 (gimple_switch_edge): Likewise.
12111 (gimple_switch_default_edge): Likewise.
12112 * tree-cfgcleanup.c (convert_single_case_switch): Use
12113 new gimple functions and pass new argument to label_to_block.
12114 (cleanup_control_flow_bb):
12115 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
12116 cfun argument explicitly.
12117 (make_eh_edges): Likewise.
12118 (redirect_eh_dispatch_edge): Likewise.
12119 (lower_resx): Likewise.
12120 (lower_eh_dispatch): Likewise.
12121 (maybe_remove_unreachable_handlers): Likewise.
12122 (unsplit_eh): Likewise.
12123 (cleanup_empty_eh): Likewise.
12124 (verify_eh_edges): Likewise.
12125 (verify_eh_dispatch_edge): Likewise.
12126 * tree-ssa-dom.c (record_edge_info): Likewise.
12127 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
12128 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
12129 (thread_through_normal_block): Likewise.
12130 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
12131 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
12132 * tree-switch-conversion.c (switch_conversion::collect): Use new
12133 gimple functions.
12134 (switch_conversion::check_final_bb): Likewise.
12135 (switch_conversion::gather_default_values): Pass new argument
12136 to label_to_block.
12137 (switch_conversion::build_constructors): Likewise.
12138 (switch_decision_tree::compute_cases_per_edge): Use new
12139 gimple_switch_edge function.
12140 (switch_decision_tree::analyze_switch_statement): Pass new argument
12141 to label_to_block.
12142 (switch_decision_tree::try_switch_expansion): Use
12143 gimple_switch_default_edge.
12144 * tree-vrp.c (find_switch_asserts): Pass new argument
12145 to label_to_block.
12146 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
12147 (vr_values::simplify_switch_using_ranges): Likewise.
12148
12149 2018-08-27 Richard Biener <rguenther@suse.de>
12150
12151 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
12152 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
12153
12154 * tree-ssa-sccvn.h (struct vn_pval): New structure.
12155 (struct vn_nary_op_s): Add unwind_to member. Add
12156 predicated_values flag and put result into a union together
12157 with a linked list of vn_pval.
12158 (struct vn_ssa_aux): Add name member to make maintaining
12159 a map of SSA name to vn_ssa_aux possible. Remove no longer
12160 needed info, dfsnum, low, visited, on_sccstack, use_processed
12161 and range_info_anti_range_p members.
12162 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
12163 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
12164 New functions.
12165 (vn_valueize): New global.
12166 (vn_context_bb): Likewise.
12167 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
12168 VN_INFO_PTR_INFO): Remove.
12169 * tree-ssa-sccvn.c: ... (rewrite)
12170 (pass_fre::execute): For -O2+ initialize loops and run
12171 RPO VN in optimistic mode (iterating). For -O1 and -Og
12172 run RPO VN in non-optimistic mode.
12173 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
12174 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
12175 * doc/invoke.texi (sccvn-max-scc-size): Remove.
12176 (rpo-vn-max-loop-depth): Document.
12177 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
12178 when valuezing the VUSE signals we walked out of the region.
12179 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
12180 (phi_translate): Set VN context block to use for availability
12181 lookup.
12182 (compute_avail): Likewise.
12183 (pre_valueize): New function.
12184 (pass_pre::execute): Adjust to the RPO VN API.
12185
12186 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
12187 (propagate_constants_for_unrolling): Remove.
12188 (tree_unroll_loops_completely): Perform value-numbering
12189 on the unrolled bodies loop parent.
12190
12191 2018-08-27 Richard Biener <rguenther@suse.de>
12192
12193 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
12194 for partial antic compute.
12195
12196 2018-08-27 Jakub Jelinek <jakub@redhat.com>
12197
12198 PR rtl-optimization/87065
12199 * combine.c (simplify_if_then_else): Formatting fix.
12200 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
12201 check.
12202 (known_cond): Don't return const_true_rtx for vector modes. Use
12203 CONST0_RTX instead of const0_rtx. Formatting fixes.
12204
12205 2018-08-27 Martin Liska <mliska@suse.cz>
12206
12207 PR gcov-profile/87069
12208 * gcov.c (process_file): Record files already processed
12209 and warn about a file being processed multiple times.
12210
12211 2018-08-27 Martin Liska <mliska@suse.cz>
12212
12213 PR driver/83193
12214 * config/aarch64/aarch64.c (aarch64_override_options_internal):
12215 Set default values for x_aarch64_*_string strings.
12216 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
12217 prefix. For -mabi do not print '=ABI' in help and use
12218 <option_value> format for -msve-vector-bits and -moverride
12219 options.
12220
12221 2018-08-26 Jeff Law <law@redhat.com>
12222
12223 * config/mips/frame-header-opt.c: Include "backend.h" rather than
12224 "cfg.h"
12225
12226 2018-08-26 Marek Polacek <polacek@redhat.com>
12227
12228 PR c++/87029, Implement -Wredundant-move.
12229 * doc/invoke.texi: Document -Wredundant-move.
12230
12231 2018-08-25 Martin Sebor <msebor@redhat.com>
12232
12233 PR tree-optimization/87059
12234 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
12235 to the same type as the other.
12236 * fold-const.c (fold_binary_loc): Assert expectation.
12237
12238 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
12239
12240 * config/darwin.c (machopic_legitimize_pic_address): Clean up
12241 extraneous parentheses, dead code section and formatting.
12242
12243 2018-08-24 David Malcolm <dmalcolm@redhat.com>
12244
12245 PR c++/87091
12246 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
12247 wide enough for jumps in the line-numbering to be visible.
12248 (layout::print_gap_in_line_numbering): New member function.
12249 (layout::calculate_line_spans): When using line numbering, merge
12250 line spans that are only 1 line apart.
12251 (diagnostic_show_locus): When printing line numbers, show gaps in
12252 line numbering directly, rather than printing headers.
12253 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
12254 line-numbering with multiple line spans.
12255 (selftest::test_fixit_insert_containing_newline_2): Add test of
12256 line-numbering, in which the spans are close enough to be merged.
12257
12258 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12259
12260 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
12261 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
12262 * tree-vrp.c (range_is_nonnull): Remove.
12263 (range_includes_zero_p): Accept value_range instead of min/max.
12264 (extract_range_from_binary_expr_1): Do not early bail on
12265 POINTER_PLUS_EXPR.
12266 Use range_includes_zero_p instead of range_is_nonnull.
12267 (extract_range_from_unary_expr): Use range_includes_zero_p instead
12268 of range_is_nonnull.
12269 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
12270 special case VR_ANTI_RANGE.
12271 (vrp_finalize): Same.
12272 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
12273 instead of min/max.
12274 (range_is_nonnull): Remove.
12275 * vr-values.c (vrp_stmt_computes_nonzero): Use
12276 range_includes_zero_p instead of range_is_nonnull.
12277 (extract_range_basic): Pass value_range to range_includes_zero_p
12278 instead of range_is_nonnull.
12279
12280 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
12281
12282 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
12283 * emit-rtl.h (rtl_data): Remove return_bnd.
12284 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
12285 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
12286 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
12287 (POINTER_BOUNDS_MODE): Remove definition.
12288 (make_pointer_bounds_mode): Remove.
12289 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
12290 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
12291 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
12292 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
12293 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
12294 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
12295 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
12296
12297 * config/i386/i386-modes.def (BND32, BND64): Remove.
12298 * config/i386/i386.c (dbx_register_map): Remove bound registers.
12299 (dbx64_register_map): Ditto.
12300 (svr4_dbx_register_map): Ditto.
12301 (indirect_thunk_bnd_needed): Remove.
12302 (indirect_thunks_bnd_used): Ditto.
12303 (indirect_return_bnd_needed): Ditto.
12304 (indirect_return_via_cx_bnd): Ditto.
12305 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
12306 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
12307 (output_indirect_thunk): Ditto. Remove need_prefix argument.
12308 (output_indirect_thunk_function): Remove handling of
12309 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
12310 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
12311 (ix86_save_reg): Remove handling of crtl->return_bnd.
12312 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
12313 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
12314 and UNSPEC_BNDLX_ADDR.
12315 (ix86_output_indirect_branch_via_reg): Remove handling of
12316 indirect_thunk_prefix_bnd.
12317 (ix86_output_indirect_branch_via_push): Ditto.
12318 (ix86_output_function_return): Ditto.
12319 (ix86_output_indirect_function_return): Ditto.
12320 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
12321 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
12322 (CALL_USED_REGISTERS): Ditto.
12323 (REG_ALLOC_ORDER): Update for removal of bound registers.
12324 (HI_REGISTER_NAMES): Ditto.
12325 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
12326 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
12327 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
12328 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
12329 (FIRST_PSEUDO_REG): Update.
12330 (BND): Remove mode iterator.
12331 * config/i386/predicates.md (bnd_mem_operator): Remove.
12332
12333 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12334
12335 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
12336 vectors.
12337
12338 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12339
12340 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
12341 the case in which the permute needs only a single element and
12342 repeats for every vector of the result. Extend that case to
12343 handle variable-length vectors.
12344 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12345
12346 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
12347
12348 PR debug/79342
12349 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
12350 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
12351
12352 2018-08-24 Richard Biener <rguenther@suse.de>
12353
12354 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
12355 bb_flags_allocated members.
12356 (auto_flag): New RAII class for allocating flags.
12357 (auto_edge_flag): New RAII class for allocating edge flags.
12358 (auto_bb_flag): New RAII class for allocating bb flags.
12359 * cfgloop.c (verify_loop_structure): Allocate temporary edge
12360 flag dynamically.
12361 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
12362 in favor of temporarily allocated BB flag.
12363 * hsa-brig.c: Re-order includes.
12364 * hsa-dump.c: Likewise.
12365 * hsa-regalloc.c: Likewise.
12366 * print-rtl.c: Likewise.
12367 * profile-count.c: Likewise.
12368
12369 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
12370
12371 PR target/86989
12372 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
12373 the TOC register.
12374
12375 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12376
12377 PR 87073/bootstrap
12378 * wide-int-range.cc (wide_int_range_div): Do not ignore result
12379 from wide_int_range_multiplicative_op.
12380
12381 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12382
12383 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
12384 "permutaion".
12385
12386 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
12387
12388 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
12389 to 'expanded'.
12390
12391 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
12392
12393 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
12394 full GENERIC expression used for replacement.
12395
12396 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
12397
12398 * tree-vrp.c (abs_extent_range): Remove.
12399 (extract_range_into_wide_ints): Pass wide ints by reference.
12400 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
12401 Pass wide ints by reference in all calls to
12402 extract_range_into_wide_ints.
12403 * wide-int-range.cc (wide_int_range_div): New.
12404 * wide-int-range.h (wide_int_range_div): New.
12405 (wide_int_range_includes_zero_p): New.
12406 (wide_int_range_zero_p): New.
12407
12408 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
12409
12410 * config/aarch64/aarch64.md (arches): New enum.
12411 (arch): New enum attr.
12412 (arch_enabled): New attr.
12413 (enabled): Now uses arch_enabled only.
12414 (simd, sve, fp16): Removed attribute.
12415 (fp): Attr now defined in terms of 'arch'.
12416 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
12417 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
12418 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
12419 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
12420 attributes into 'arch'.
12421 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
12422 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
12423 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
12424 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
12425 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
12426 'simd' attribute into 'arch'.
12427 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
12428 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
12429 Convert use of 'fp' attribute to 'arch'.
12430 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
12431 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
12432 into 'arch'.
12433 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
12434 (different modes) Merge 'fp' and 'simd' into 'arch'.
12435 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
12436 'simd' into 'arch'.
12437
12438 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
12439
12440 PR rtl-optimization/87026
12441 * expmed.c (canonicalize_comparison): If we can no longer create
12442 pseudoregisters, don't.
12443
12444 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
12445
12446 PR target/86951
12447 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
12448 prototype.
12449 * config/arm/arm.c (speculation_barrier_libfunc): New static
12450 variable.
12451 (arm_init_libfuncs): Initialize it.
12452 (arm_emit_speculation_barrier): New function.
12453 * config/arm/arm.md (speculation_barrier): Call
12454 arm_emit_speculation_barrier for architectures that do not have
12455 DSB or ISB.
12456 (speculation_barrier_insn): Only match on Armv7 or later.
12457
12458 2018-08-23 Richard Biener <rguenther@suse.de>
12459
12460 PR middle-end/87024
12461 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
12462 calls.
12463
12464 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12465
12466 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
12467 of single-vector TBLs.
12468 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
12469 one input is given.
12470
12471 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12472
12473 PR target/85910
12474 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
12475 aarch64_evpc_tbl guard.
12476
12477 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
12478
12479 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
12480 behaviour.
12481
12482 2018-08-22 Martin Sebor <msebor@redhat.com>
12483
12484 PR middle-end/87052
12485 * tree-pretty-print.c (pretty_print_string): Add argument.
12486 (dump_generic_node): Call to pretty_print_string with string size.
12487
12488 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
12489
12490 PR rtl-optimization/86771
12491 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
12492 of two SETs into those two SETs, one to be placed at i2, if that SETs
12493 destination is modified between i2 and i3.
12494
12495 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12496
12497 PR tree-optimization/86725
12498 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
12499 function.
12500 (vect_analyze_scalar_cycles_1): Check it.
12501
12502 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12503
12504 PR tree-optimization/86725
12505 * tree-vect-loop.c (vect_is_simple_reduction): When treating
12506 an outer loop phi as a double reduction, make sure that the
12507 single user of the phi result is an inner loop phi.
12508
12509 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12510
12511 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
12512 grouped stores with gaps to a strided group.
12513
12514 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12515
12516 * tree-vect-stmts.c (get_group_load_store_type)
12517 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
12518 first statement in a group.
12519
12520 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12521
12522 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
12523 the sequence used in gcc/gcc.c.
12524
12525 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12526
12527 PR other/704
12528 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
12529 building it.
12530
12531 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12532
12533 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
12534 Darwin10-specific unwinder-shim.
12535 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
12536 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
12537 New to cater for Darwin10 Rosetta.
12538
12539 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12540
12541 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
12542 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
12543
12544 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12545
12546 PR bootstrap/81033
12547 PR target/81733
12548 PR target/52795
12549 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
12550 (dwarf2out_switch_text_section): Generate a local label for the
12551 second function sub-section and apply it as the second FDE start
12552 label.
12553 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
12554 second sub-section start.
12555
12556 2018-08-22 Richard Biener <rguenther@suse.de>
12557
12558 PR tree-optimization/86988
12559 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
12560
12561 2018-08-22 Richard Biener <rguenther@suse.de>
12562
12563 PR tree-optimization/86945
12564 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
12565
12566 2018-08-22 Alexandre Oliva <oliva@adacore.com>
12567
12568 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
12569 a comment about how uses of r2 for .sdata2 come about.
12570
12571 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
12572
12573 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
12574
12575 2018-08-21 Marek Polacek <polacek@redhat.com>
12576
12577 PR c++/86981, Implement -Wpessimizing-move.
12578 * doc/invoke.texi: Document -Wpessimizing-move.
12579
12580 2018-08-21 Jan Hubicka <jh@suse.cz>
12581
12582 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
12583 * tree.h (is_redundant_typedef): Remove.
12584 * dwarf2out.c (is_redundant_typedef): Turn into static function.
12585
12586 2018-08-21 Jan Hubicka <jh@suse.cz>
12587
12588 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
12589 when possible.
12590
12591 2018-08-21 Tamar Christina <tamar.christina@arm.com>
12592
12593 * expmed.c (extract_low_bits): Reject invalid subregs early.
12594
12595 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12596
12597 PR middle-end/86121
12598 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
12599 behaviour.
12600
12601 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12602
12603 * config/vxworks.h: Guard vxworks_asm_out_constructor and
12604 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
12605 * config/vxworks.c: Likewise.
12606
12607 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12608
12609 * config/vxworks.c: Set targetm.have_ctors_dtors
12610 if HAVE_INITFINI_ARRAY_SUPPORT.
12611 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
12612 if HAVE_INITFINI_ARRAY_SUPPORT.
12613
12614 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12615
12616 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
12617 default search path for VxWorks < 7.
12618
12619 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12620
12621 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
12622 (get_format_string): Refer to c_getstr.
12623
12624 2018-08-21 Tom de Vries <tdevries@suse.de>
12625
12626 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12627 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12628 (debuginfo_early_stop): Declare.
12629 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12630 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12631 (debuginfo_early_stop): New function.
12632 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
12633 and debuginfo_early_stop.
12634 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
12635 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
12636 (general_init): Call debuginfo_early_init.
12637 (finalize): Call debuginfo_fini.
12638 (do_compile): Call debuginfo_init.
12639 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
12640 -fdump-early-debug.
12641 (@item -fdump-debug, @item -fdump-earlydebug): Add.
12642
12643 2018-08-21 Tom de Vries <tdevries@suse.de>
12644
12645 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
12646 flag_dump_noaddr and flag_dump_unnumbered.
12647
12648 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
12649
12650 * wide-int-range.cc (wide_int_range_abs): New.
12651 (wide_int_range_order_set): Rename from wide_int_range_min_max.
12652 * wide-int-range.h (wide_int_range_abs): New.
12653 (wide_int_range_min_max): New.
12654 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
12655 case to call wide_int_range_abs.
12656 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
12657 (extract_range_from_abs_expr): Delete.
12658
12659 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
12660
12661 PR target/87033
12662 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
12663 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
12664 for indexed loads.
12665
12666 2018-08-20 Nathan Sidwell <nathan@acm.org>
12667 Jeff Law <law@redhat.com>
12668
12669 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
12670 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
12671
12672 2018-08-20 David Malcolm <dmalcolm@redhat.com>
12673
12674 PR other/84889
12675 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
12676 (decl_attributes): Likewise.
12677 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
12678 instance.
12679 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12680 * diagnostic-core.h (class auto_diagnostic_group): New class.
12681 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
12682 (diagnostic_report_diagnostic): Handle the first diagnostics within
12683 a group.
12684 (emit_diagnostic): Add auto_diagnostic_group instance.
12685 (inform): Likewise.
12686 (inform_n): Likewise.
12687 (warning): Likewise.
12688 (warning_at): Likewise.
12689 (warning_n): Likewise.
12690 (pedwarn): Likewise.
12691 (permerror): Likewise.
12692 (error): Likewise.
12693 (error_n): Likewise.
12694 (error_at): Likewise.
12695 (sorry): Likewise.
12696 (fatal_error): Likewise.
12697 (internal_error): Likewise.
12698 (internal_error_no_backtrace): Likewise.
12699 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
12700 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
12701 * diagnostic.h (struct diagnostic_context): Add fields
12702 "diagnostic_group_nesting_depth",
12703 "diagnostic_group_emission_count", "begin_group_cb",
12704 "end_group_cb".
12705 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
12706 Add auto_diagnostic_group instance(s).
12707 (find_explicit_erroneous_behavior): Likewise.
12708 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
12709 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
12710 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
12711 (gimplify_va_arg_expr): Likewise.
12712 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
12713 (HSA_SORRY_AT): Likewise.
12714 * ipa-devirt.c (compare_virtual_tables): Likewise.
12715 (warn_odr): Likewise.
12716 * multiple_target.c (expand_target_clones): Likewise.
12717 * opts-common.c (cmdline_handle_error): Likewise.
12718 * reginfo.c (globalize_reg): Likewise.
12719 * substring-locations.c (format_warning_n_va): Likewise.
12720 * tree-inline.c (expand_call_inline): Likewise.
12721 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
12722 * tree-ssa-loop-niter.c
12723 (do_warn_aggressive_loop_optimizations): Likewise.
12724 * tree-ssa-uninit.c (warn_uninit): Likewise.
12725 * tree.c (warn_deprecated_use): Likewise.
12726
12727 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
12728
12729 PR target/87014
12730 * config/i386/i386.md (eh_return): Always update EH return
12731 address in word_mode.
12732
12733 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
12734
12735 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
12736 TARGET_SPLIT_COMPLEX_ARG is defined.
12737
12738 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12739
12740 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
12741
12742 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12743
12744 PR target/86984
12745 * expr.c (expand_assignment): Assert that bitpos is positive.
12746 (store_field): Likewise
12747 (expand_expr_real_1): Make sure that bitpos is positive.
12748 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
12749 integer overflow.
12750
12751 2018-08-20 Nathan Sidwell <nathan@acm.org>
12752
12753 * Makefile.in (CPP_ID_DATA_H): Delete.
12754 (CPP_INTERNAL_H): Don't add it.
12755 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
12756 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
12757
12758 2018-08-20 Richard Biener <rguenther@suse.de>
12759
12760 PR tree-optimization/78655
12761 * tree-vrp.c (extract_range_from_binary_expr_1): Make
12762 pointer + offset nonnull if either operand is nonnull work.
12763
12764 2018-08-20 Tom de Vries <tdevries@suse.de>
12765
12766 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
12767 unless the referenced die describes the added property using
12768 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
12769 Otherwise, add a DW_AT_location to the referenced die.
12770
12771 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
12772
12773 PR target/86994
12774 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
12775 register_operand when calling ix86_set_reg_reg_cost.
12776 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
12777 Set *total to 0 for operands that satisfy x86_64_immediate_operand
12778 predicate and to 1 otherwise.
12779
12780 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
12781
12782 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
12783 emit a diagnostic that it is not supported and reset the option.
12784 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
12785 supported and consume the option. (ASM_FINAL_SPEC): New.
12786
12787 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12788
12789 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
12790 a sentence.
12791
12792 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
12793
12794 C-SKY port: Documentation
12795
12796 * doc/extend.texi (C-SKY Function Attributes): New section.
12797 * doc/invoke.texi (Option Summary): Add C-SKY options.
12798 (C-SKY Options): New section.
12799 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
12800
12801 2018-08-17 Jojo <jijie_rong@c-sky.com>
12802 Huibin Wang <huibin_wang@c-sky.com>
12803 Sandra Loosemore <sandra@codesourcery.com>
12804 Chung-Lin Tang <cltang@codesourcery.com>
12805
12806 C-SKY port: Backend implementation
12807
12808 * config/csky/*: New.
12809 * common/config/csky/*: New.
12810
12811 2018-08-17 Jojo <jijie_rong@c-sky.com>
12812 Huibin Wang <huibin_wang@c-sky.com>
12813 Sandra Loosemore <sandra@codesourcery.com>
12814 Chung-Lin Tang <cltang@codesourcery.com>
12815 Andrew Jenner <andrew@codesourcery.com>
12816
12817 C-SKY port: Configury
12818
12819 * config.gcc (csky-*-*): New.
12820 * configure.ac: Add csky to targets for dwarf2 debug_line support.
12821 * configure: Regenerated.
12822
12823 2018-08-17 David Malcolm <dmalcolm@redhat.com>
12824
12825 * dump-context.h: Include "dumpfile.h".
12826 (dump_context::dump_printf_va): Convert final param from va_list
12827 to va_list *. Convert from ATTRIBUTE_PRINTF to
12828 ATTRIBUTE_GCC_DUMP_PRINTF.
12829 (dump_context::dump_printf_loc_va): Likewise.
12830 * dumpfile.c: Include "stringpool.h".
12831 (make_item_for_dump_printf_va): Delete.
12832 (make_item_for_dump_printf): Delete.
12833 (class dump_pretty_printer): New class.
12834 (dump_pretty_printer::dump_pretty_printer): New ctor.
12835 (dump_pretty_printer::emit_items): New member function.
12836 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
12837 function.
12838 (dump_pretty_printer::emit_item): New member function.
12839 (dump_pretty_printer::stash_item): New member function.
12840 (dump_pretty_printer::format_decoder_cb): New member function.
12841 (dump_pretty_printer::decode_format): New member function.
12842 (dump_context::dump_printf_va): Reimplement in terms of
12843 dump_pretty_printer.
12844 (dump_context::dump_printf_loc_va): Convert final param from va_list
12845 to va_list *.
12846 (dump_context::begin_scope): Reimplement call to
12847 make_item_for_dump_printf.
12848 (dump_printf): Update for change to dump_printf_va.
12849 (dump_printf_loc): Likewise.
12850 (selftest::test_capture_of_dump_calls): Convert "stmt" from
12851 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
12852 with %T, %E, and %G.
12853 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
12854 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
12855 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
12856 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
12857 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
12858 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
12859 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
12860 within a dump_printf_loc call to "%wu".
12861 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
12862 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
12863 missing space after "=".
12864 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
12865 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
12866 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
12867 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
12868 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
12869 duplicate "vectorized" from message.
12870
12871 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
12872
12873 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
12874 polyNxK_t element's TYPE_STRING_FLAG.
12875
12876 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12877
12878 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
12879 (they were unnamed before). Fix comments.
12880
12881 2018-08-17 Nathan Sidwell <nathan@acm.org>
12882
12883 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
12884
12885 2018-08-17 Richard Biener <rguenther@suse.de>
12886
12887 PR tree-optimization/86841
12888 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
12889
12890 2018-08-17 Martin Liska <mliska@suse.cz>
12891
12892 * common.opt: Remove Warn, Init and Report for options with
12893 Ignore/Deprecated flag. Warning is done automatically for
12894 Deprecated flags.
12895 * config/i386/i386.opt: Likewise.
12896 * config/ia64/ia64.opt: Likewise.
12897 * config/rs6000/rs6000.opt: Likewise.
12898 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
12899 Remove usage of flag_check_pointer_bounds.
12900 * lto-wrapper.c (merge_and_complain): Do not handle
12901 OPT_fcheck_pointer_bounds.
12902 (append_compiler_options): Likewise.
12903 * opt-functions.awk: Do not handle Deprecated.
12904 * optc-gen.awk: Check that Var, Report and Init are not
12905 used for an option with Ignore/Deprecated flag.
12906 * opts-common.c (decode_cmdline_option): Do not report
12907 CL_ERR_DEPRECATED.
12908 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
12909 options.
12910 * opts.h (struct cl_option): Remove cl_deprecated flag.
12911 (CL_ERR_DEPRECATED): Remove error enum value.
12912
12913 2018-08-17 Richard Biener <rguenther@suse.de>
12914
12915 PR middle-end/86505
12916 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
12917 across a va-arg-pack using call adjust its return value accordingly.
12918
12919 2018-08-16 Martin Sebor <msebor@redhat.com>
12920
12921 PR tree-optimization/86853
12922 * gimple-ssa-sprintf.c (struct format_result): Rename member.
12923 (struct fmtresult): Add member and initialize it in ctors.
12924 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
12925 (format_string): Handle %S the same as %ls. Set MAYFAIL.
12926 (format_directive): Set POSUNDER4K when MAYFAIL is set.
12927 (parse_directive): Handle %C same as %c.
12928 (sprintf_dom_walker::compute_format_length): Adjust.
12929 (is_call_safe): Adjust.
12930
12931 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12932
12933 * builtins.c (c_strlen): Add new parameter eltsize. Use it
12934 for determining how to count the elements.
12935 * builtins.h (c_strlen): Adjust prototype.
12936 * expr.c (string_constant): Add new parameter mem_size.
12937 Set *mem_size appropriately.
12938 * expr.h (string_constant): Adjust protoype.
12939 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
12940 * gimple-fold.h (get_range_strlen): Adjust prototype.
12941 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
12942 (format_string): Call get_string_length with eltsize.
12943
12944 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12945
12946 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
12947 to emit the span, rather than setting it as the prefix.
12948
12949 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12950
12951 * diagnostic-show-locus.c (layout::start_annotation_line): Add
12952 "margin_char" parameter, defaulting to space. Use it in place
12953 of pp_space for the initial part of the margin.
12954 (layout::print_leading_fixits): Use '+' when filling the margin
12955 of line-insertion fix-it hints.
12956
12957 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12958
12959 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
12960 Delete.
12961
12962 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12963
12964 * config/rs6000/altivec.md: Don't set length attribute to the default
12965 value.
12966 * config/rs6000/darwin.md: Ditto.
12967 * config/rs6000/dfp.md: Ditto.
12968 * config/rs6000/htm.md: Ditto.
12969 * config/rs6000/rs6000.md: Ditto.
12970 * config/rs6000/sync.md: Ditto.
12971 * config/rs6000/vsx.md: Ditto.
12972
12973 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12974
12975 * config/rs6000/altivec.md: Don't set length attribute to the default
12976 value, for branch instructions.
12977 * config/rs6000/darwin.md: Ditto.
12978 * config/rs6000/rs6000.md: Ditto.
12979
12980 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12981
12982 * config/rs6000/rs6000.md (length): Always define as const_int 4.
12983 (unnamed conditional branch define_insn): Set length to 4 or 8
12984 depending on offset.
12985 (<bd>_<mode>): Similar, for alternative 0.
12986 (<bd>tf_<mode>): Ditto.
12987
12988 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12989
12990 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
12991
12992 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
12993
12994 * doc/rtl.texi: Replace old RTX class names with new names.
12995
12996
12997 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
12998
12999 * expmed.h (canonicalize_comparison): New declaration.
13000 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
13001 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
13002 * optabs.c (prepare_cmp_insn): Likewise.
13003 * rtl.h (unsigned_condition_p): New function which checks if a
13004 comparison operator is unsigned.
13005
13006 2018-08-16 Nathan Sidwell <nathan@acm.org>
13007
13008 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
13009 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
13010
13011 2018-08-16 Tamar Christina <tamar.christina@arm.com>
13012
13013 PR target/84711
13014 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
13015 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
13016 (mov<mov>): ..this and enable unconditionally.
13017
13018 2018-08-16 Tamar Christina <tamar.christina@arm.com>
13019
13020 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
13021
13022 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
13023
13024 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
13025 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
13026 "Common" with "Target".
13027
13028 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
13029
13030 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
13031 * doc/invoke.texi (mmitigate-rop): Remove.
13032 * config/i386/i386.c: Do not include "regrename.h".
13033 (ix86_rop_should_change_byte_p, reg_encoded_number)
13034 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
13035 Remove.
13036 (ix86_reorg): Remove call to ix86_mitigate_rop.
13037 * config/i386/i386.md (attr "modrm_class"): Remove.
13038 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
13039 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
13040 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
13041
13042 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
13043
13044 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
13045 allow folding of mergeh() and mergel() for the float and double types.
13046 (fold_mergehl_helper): Rework to handle building a permute tree
13047 for float vectors.
13048
13049 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
13050
13051 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
13052 for TARGET_SSE.
13053
13054 2018-08-15 David Malcolm <dmalcolm@redhat.com>
13055
13056 * common.opt (fdiagnostics-show-labels): New option.
13057 * diagnostic-show-locus.c (class layout_range): Add field
13058 "m_label".
13059 (class layout): Add field "m_show_labels_p".
13060 (layout_range::layout_range): Add param "label" and use it to
13061 initialize m_label.
13062 (make_range): Pass in NULL for new "label" param of layout_range's
13063 ctor.
13064 (layout::layout): Initialize m_show_labels_p.
13065 (layout::maybe_add_location_range): Pass in loc_range->m_label
13066 when constructing layout_range instances.
13067 (struct line_label): New struct.
13068 (layout::print_any_labels): New member function.
13069 (layout::print_line): Call it if label-printing is enabled.
13070 (selftest::test_one_liner_labels): New test.
13071 (selftest::test_diagnostic_show_locus_one_liner): Call it.
13072 * diagnostic.c (diagnostic_initialize): Initialize
13073 context->show_labels_p.
13074 * diagnostic.h (struct diagnostic_context): Add field
13075 "show_labels_p".
13076 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
13077 -fno-diagnostics-show-labels.
13078 * dwarf2out.c (gen_producer_string): Add
13079 OPT_fdiagnostics_show_labels to the ignored options.
13080 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
13081 param.
13082 (gcc_rich_location::maybe_add_expr): Likewise.
13083 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
13084 label" param, defaulting to NULL.
13085 (gcc_rich_location::add_expr): Add "label" param.
13086 (gcc_rich_location::maybe_add_expr): Likewise.
13087 (class text_range_label): New class.
13088 (class range_label_for_type_mismatch): New class.
13089 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
13090 of format_warning_va.
13091 (fmtwarn_n): Likewise for new params of format_warning_n_va.
13092 * lto-wrapper.c (merge_and_complain): Add
13093 OPT_fdiagnostics_show_labels to the "pick one setting" options.
13094 (append_compiler_options): Likewise to the dropped options.
13095 (append_diag_options): Likewise to the passed-on options.
13096 * opts.c (common_handle_option): Handle the new option.
13097 * selftest-diagnostic.c
13098 (test_diagnostic_context::test_diagnostic_context): Enable
13099 show_labels_p.
13100 * substring-locations.c: Include "gcc-rich-location.h".
13101 (format_warning_n_va): Add "fmt_label" and "param_label" params
13102 and use them as appropriate.
13103 (format_warning_va): Add "fmt_label" and "param_label" params,
13104 passing them on to format_warning_n_va.
13105 (format_warning_at_substring): Likewise.
13106 (format_warning_at_substring_n): Likewise.
13107 * substring-locations.h (format_warning_va): Add "fmt_label" and
13108 "param_label" params.
13109 (format_warning_n_va): Likewise.
13110 (format_warning_at_substring): Likewise.
13111 (format_warning_at_substring_n): Likewise.
13112 * toplev.c (general_init): Initialize global_dc->show_labels_p.
13113
13114 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
13115
13116 PR testsuite/86519
13117 * builtins.c (expand_builtin_memcmp): Do not expand the call
13118 when overflow is detected.
13119
13120 2018-08-15 Martin Sebor <msebor@redhat.com>
13121
13122 PR tree-optimization/71625
13123 * config/aarch64/aarch64-builtins.c
13124 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
13125
13126 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
13127
13128 * config/s390/s390.c (s390_reorg): Remove loop.
13129
13130 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
13131
13132 * config/darwin.c
13133 (darwin_function_switched_text_sections): Delete.
13134 * gcc/config/darwin.h
13135 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
13136
13137 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
13138
13139 PR target/81685
13140 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
13141 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
13142 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
13143
13144 2018-08-15 Martin Liska <mliska@suse.cz>
13145
13146 PR tree-optimization/86925
13147 * predict.c (expr_expected_value_1): When taking
13148 later predictor, assign also probability.
13149 Use fold_build2_initializer_loc in order to fold
13150 the expression in -frounding-math.
13151
13152 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
13153
13154 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
13155 patterns.
13156 (expand_vec_perm_1): Try the new method.
13157
13158 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
13159
13160 PR target/86547
13161 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
13162 Check whether lra_live_max_point is 0 before dividing.
13163
13164 2018-08-14 Martin Sebor <msebor@redhat.com>
13165
13166 PR tree-optimization/86650
13167 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
13168 (vrp_prop::check_mem_ref): Same.
13169
13170 2018-08-13 Liu Hao <lh_mouse@126.com>
13171
13172 * pretty-print.c (eat_esc_sequence): Swap the foreground and
13173 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
13174 and clear it thereafter, as it only works for DBCS.
13175
13176 2018-08-13 Liu Hao <lh_mouse@126.com>
13177
13178 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
13179 handle returned by _get_osf_handle().
13180
13181 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13182
13183 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
13184 for folding vec_perm.
13185
13186 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13187
13188 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
13189 Add support for gimple-folding of vec_pack() and vec_unpack()
13190 intrinsics.
13191
13192 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13193
13194 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
13195 vec_xst variants to the list.
13196 (rs6000_gimple_fold_builtin): Add support for folding unaligned
13197 vector loads and stores.
13198
13199 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
13200
13201 * config.gcc (rs6000-ibm-aix4.x): Delete.
13202 (rs6000-ibm-aix5.1): Delete.
13203 (rs6000-ibm-aix5.2): Delete.
13204 (rs6000-ibm-aix5.3): Delete.
13205 * config/rs6000/aix43.h: Delete.
13206 * config/rs6000/aix51.h: Delete.
13207 * config/rs6000/aix52.h: Delete.
13208 * config/rs6000/t-aix43: Delete.
13209
13210 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
13211
13212 * config/s390/s390.c (s390_decompose_constant_pool_ref):
13213 New function.
13214 (s390_decompose_address): Factor out constant pool ref
13215 decomposition.
13216
13217 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13218
13219 * config/nds32/nds32-predicates.c
13220 (nds32_can_use_bclr_p): Change return type as bool.
13221 (nds32_can_use_bset_p): Ditto.
13222 (nds32_can_use_btgl_p): Ditto.
13223 (nds32_can_use_bitci_p): Ditto.
13224 * config/nds32/nds32-protos.h
13225 (nds32_can_use_bclr_p): Change declaration.
13226 (nds32_can_use_bset_p): Ditto.
13227 (nds32_can_use_btgl_p): Ditto.
13228 (nds32_can_use_bitci_p): Ditto.
13229
13230 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13231
13232 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
13233 Support -msched-prolog-epilog option.
13234 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
13235
13236 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13237
13238 * common/config/nds32/nds32-common.c
13239 (nds32_option_optimization_table): Enalbe -malways-align.
13240
13241 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13242
13243 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
13244 extra_headers.
13245 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
13246 OPT_misr_secure_ case.
13247 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
13248 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
13249 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
13250 secure attribute.
13251 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
13252 (nds32_isr_info): New field security_level.
13253 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
13254 * config/nds32/nds32.md (return_internal): Consider critical attribute.
13255 * config/nds32/nds32.opt (misr-secure): New option.
13256 * config/nds32/nds32_init.inc: New file.
13257 * config/nds32/nds32_isr.h: New file.
13258
13259 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
13260
13261 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
13262 Update comment for atomic instructions.
13263 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
13264 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
13265 Remove.
13266 (atomic_loaddi): Revise fence expansion to only emit fence prior to
13267 load for __ATOMIC_SEQ_CST model.
13268 (atomic_loaddi_1): Remove float register target.
13269 (atomic_storedi): Handle CONST_INT values.
13270 (atomic_storedi_1): Remove float register source. Add special case
13271 for zero value.
13272 (memory_barrier): New expander and insn.
13273
13274 2018-08-11 Jakub Jelinek <jakub@redhat.com>
13275
13276 PR tree-optimization/86835
13277 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
13278 new_stmt after def_gsi, make sure to insert new_square_stmt after
13279 that stmt, not 2 stmts before it.
13280
13281 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
13282
13283 PR target/82418
13284 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
13285 instead of SWI48.
13286
13287 2018-08-10 Martin Liska <mliska@suse.cz>
13288
13289 PR target/83610
13290 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
13291 function type.
13292 * builtins.c (expand_builtin_expect_with_probability):
13293 New function.
13294 (expand_builtin_expect_with_probability): New function.
13295 (build_builtin_expect_predicate): Add new argumnet probability
13296 for BUILT_IN_EXPECT_WITH_PROBABILITY.
13297 (fold_builtin_expect):
13298 (fold_builtin_2):
13299 (fold_builtin_3):
13300 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
13301 * builtins.h (fold_builtin_expect): Set new argument.
13302 * doc/extend.texi: Document __builtin_expect_with_probability.
13303 * doc/invoke.texi: Likewise.
13304 * gimple-fold.c (gimple_fold_call): Pass new argument.
13305 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
13306 also BUILT_IN_EXPECT_WITH_PROBABILITY.
13307 * predict.c (get_predictor_value): New function.
13308 (expr_expected_value): Add new argument probability. Assume
13309 that predictor and probability are always non-null.
13310 (expr_expected_value_1): Likewise. For __builtin_expect and
13311 __builtin_expect_with_probability set probability. Handle
13312 combination in binary expressions.
13313 (tree_predict_by_opcode): Simplify code by simply calling
13314 get_predictor_value.
13315 (pass_strip_predict_hints::execute): Add handling of
13316 BUILT_IN_EXPECT_WITH_PROBABILITY.
13317 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
13318 new predictor.
13319 * tree.h (DECL_BUILT_IN_P): New function.
13320
13321 2018-08-10 Martin Liska <mliska@suse.cz>
13322
13323 PR tree-optimization/85799
13324 * passes.def: Add argument for pass_strip_predict_hints.
13325 * predict.c (class pass_strip_predict_hints): Add new argument
13326 early_p.
13327 (strip_predictor_early): New function.
13328 (pass_strip_predict_hints::execute): Call the function to
13329 strip predictors.
13330 (strip_predict_hints): New function.
13331 * predict.def: Fix comment.
13332
13333 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
13334
13335 * Makefile.in: Clarify which tm.texi to copy over to assert the
13336 right to grant a GFDL license for all.
13337
13338 2018-08-09 Jeff Law <law@redhat.com>
13339
13340 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
13341 unused variable.
13342
13343 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
13344
13345 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
13346 prototype.
13347
13348 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13349
13350 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
13351 reductions for variable-length vectors.
13352
13353 2018-08-09 David Malcolm <dmalcolm@redhat.com>
13354
13355 PR other/84889
13356 * common.opt (fdiagnostics-show-line-numbers): New option.
13357 * diagnostic-show-locus.c (class layout): Add fields
13358 "m_show_line_numbers_p" and "m_linenum_width";
13359 (num_digits): New function.
13360 (test_num_digits): New function.
13361 (layout::layout): Initialize new fields. Update m_x_offset
13362 logic to handle any left margin.
13363 (layout::print_source_line): Print line number when requested.
13364 (layout::start_annotation_line): New member function.
13365 (layout::print_annotation_line): Call it.
13366 (layout::print_leading_fixits): Likewise.
13367 (layout::print_trailing_fixits): Likewise. Update calls to
13368 move_to_column for new parameter.
13369 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
13370 it to potentially call start_annotation_line.
13371 (layout::show_ruler): Call start_annotation_line.
13372 (selftest::test_line_numbers_multiline_range): New selftest.
13373 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
13374 and selftest::test_line_numbers_multiline_range.
13375 * diagnostic.c (diagnostic_initialize): Initialize
13376 show_line_numbers_p.
13377 * diagnostic.h (struct diagnostic_context): Add field
13378 "show_line_numbers_p".
13379 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
13380 -fno-diagnostics-show-line-numbers.
13381 * dwarf2out.c (gen_producer_string): Add
13382 OPT_fdiagnostics_show_line_numbers to the ignored options.
13383 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
13384 one setting" options.
13385 (append_compiler_options): Likewise to the dropped options.
13386 (append_diag_options): Likewise to the passed-on options.
13387 * opts.c (common_handle_option): Handle the new option.
13388 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
13389
13390 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
13391
13392 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
13393 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
13394 third argument of type "const signed char" to descriptions of
13395 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
13396 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
13397 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
13398 __builtin_bcdsub_ov functions.
13399
13400 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13401
13402 PR tree-optimization/86858
13403 * tree-vect-loop.c (vect_is_simple_reduction): Restore
13404 flow_bb_inside_loop_p calls.
13405
13406 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13407
13408 PR tree-optimization/86871
13409 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
13410 instead of gimple_assign_lhs.
13411
13412 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
13413
13414 PR target/86887
13415 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
13416 register constraint to operand 0.
13417 (add<mode>3_carryinC): Likewise.
13418 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
13419
13420 2018-08-09 Martin Liska <mliska@suse.cz>
13421
13422 PR c/86895
13423 * common.opt: Remove extra line.
13424
13425 2018-08-09 Martin Liska <mliska@suse.cz>
13426
13427 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
13428 at the end of a line, make first letter capital and end up
13429 a sentence with a dot.
13430 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
13431 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
13432 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
13433 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
13434 (PARAM_MAX_ISL_OPERATIONS): Likewise.
13435 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
13436 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
13437 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
13438 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
13439 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
13440 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
13441 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
13442 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
13443 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
13444 (PARAM_TREE_REASSOC_WIDTH): Likewise.
13445 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
13446 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
13447 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
13448
13449 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
13450
13451 PR target/84332
13452 * config/s390/s390.c (s390_option_override_internal): Reduce the
13453 stack-clash-protection-probe-interval param if it would be too big
13454 for z900.
13455
13456 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
13457
13458 PR target/46179
13459 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
13460 * config/m68k/m68k.c (handle_move_double): Don't call
13461 m68k_final_prescan_insn.
13462 (m68k_adjust_decorated_operand): Renamed from
13463 m68k_final_prescan_insn, remove first and third operand and
13464 simplify.
13465 (print_operand): Call it.
13466 (print_operand_address): Call it.
13467
13468 2018-08-08 Nathan Sidwell <nathan@acm.org>
13469
13470 * diagnostic.c (diagnostic_report_current_module): Use
13471 linemap_included_from & linemap_included_from_linemap.
13472
13473 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
13474
13475 * config/aarch64/aarch64-cores.def: Add phecda core.
13476 * config/aarch64/aarch64-tune.md: Regenerate.
13477 * doc/invoke.texi: Add phecda core.
13478
13479 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13480
13481 PR target/85295
13482 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
13483 definitions.
13484 * config/s390/s390.md ("movti"): Add more alternatives for
13485 constant to GPR copies.
13486
13487 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13488
13489 * config/s390/s390.c: Fix whitespace damage throughout the file.
13490 * config/s390/s390.h: Likewise.
13491 * config/s390/tpf.h: Likewise.
13492
13493 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13494
13495 * config/s390/s390.c (s390_loadrelative_operand_p):
13496 Remove TARGET_CPU_ZARCH usages.
13497 (s390_rtx_costs): Likewise.
13498 (s390_legitimate_constant_p): Likewise.
13499 (s390_cannot_force_const_mem): Likewise.
13500 (legitimate_reload_constant_p): Likewise.
13501 (s390_preferred_reload_class): Likewise.
13502 (legitimize_pic_address): Likewise.
13503 (legitimize_tls_address): Likewise.
13504 (s390_split_branches): Removed.
13505 (s390_add_execute): Removed.
13506 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
13507 (s390_mainpool_start): Likewise.
13508 (s390_mainpool_finish): Likewise.
13509 (s390_mainpool_cancel): Removed.
13510 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
13511 (s390_chunkify_cancel): Likewise.
13512 (s390_return_addr_rtx): Likewise.
13513 (s390_register_info): Remove split_branches_pending_p uages.
13514 (s390_optimize_register_info): Likewise.
13515 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
13516 split_branches_pending_p usages.
13517 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
13518 (s390_load_got): Likewise.
13519 (s390_expand_split_stack_prologue): Likewise.
13520 (output_asm_nops): Likewise.
13521 (s390_function_profiler): Likewise.
13522 (s390_emit_call): Likewise.
13523 (s390_conditional_register_usage): Likewise.
13524 (s390_optimize_prologue): Likewise.
13525 (s390_reorg): Remove TARGET_CPU_ZARCH and
13526 split_branches_pending_p usages.
13527 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
13528 usages.
13529 (s390_output_indirect_thunk_function): Likewise.
13530 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
13531 (TARGET_CPU_ZARCH_P): Removed.
13532 (struct machine_function): Remove split_branches_pending_p.
13533 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
13534
13535 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13536
13537 * common/config/s390/s390-common.c (processor_flags_table):
13538 Remove flags.
13539 * config.gcc: Remove with_arch/with_tune support.
13540 * config/s390/2064.md: Remove cpu attribute comparisons.
13541 * config/s390/driver-native.c (s390_host_detect_local_cpu):
13542 Remove MTN.
13543 * config/s390/linux.h (ASM_SPEC):
13544 Remove -march support.
13545 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
13546 Use a table to get an arch level.
13547 * config/s390/s390-opts.h (enum processor_type):
13548 Remove enum values.
13549 * config/s390/s390.c
13550 (processor_table): Remove entries, add arch_level values.
13551 (s390_issue_rate): Remove cases.
13552 (s390_option_override): Adjust
13553 s390_option_override_internal() call.
13554 (s390_option_override_internal): Remove deprecation warning.
13555 (s390_valid_target_attribute_tree): Adjust
13556 s390_option_override_internal() call.
13557 * config/s390/s390.h (struct s390_processor):
13558 Share with s390-c.c, add arch_level field.
13559 * config/s390/s390.md:
13560 Remove occurrences in cpu attribute.
13561 * config/s390/s390.opt: Remove -march/-mtune support.
13562 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
13563 * doc/invoke.texi: Remove deprecation warning.
13564
13565 2018-08-08 Luis Machado <luis.machado@linaro.org>
13566
13567 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
13568 global.
13569 (qdf24xx_tunings): Set vector cost structure to
13570 qdf24xx_vector_cost.
13571
13572 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
13573 <register_sextend>: Set to 3.
13574
13575 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
13576
13577 PR target/86838
13578 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
13579 * config/aarch64/aarch64-simd.md
13580 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
13581 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
13582 (aarch64_frecpx<mode>): ...this new pattern.
13583 * config/aarch64/aarch64-simd-builtins.def: Remove comment
13584 about aarch64_frecp<FRECP:frecp_suffix><mode>.
13585
13586 2018-08-07 Martin Liska <mliska@suse.cz>
13587
13588 PR middle-end/83023
13589 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
13590 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
13591 * predict.def (PRED_MALLOC_NONNULL): New predictor.
13592 * doc/extend.texi: Document that malloc attribute adds
13593 hit to compiler.
13594
13595 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
13596
13597 PR target/86785
13598 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13599 Define to speculation_safe_value_not_needed.
13600
13601 2018-08-06 Jeff Law <law@redhat.com>
13602
13603 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
13604 the vr_values instance to cprop_into_stmt.
13605 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
13606 (cprop_operand): Also query EVRP to determine if OP is a constant.
13607
13608 2018-08-06 Nathan Sidwell <nathan@acm.org>
13609
13610 * diagnostic.c (diagnostic_report_current_module): Reroll
13611 included-at loop. Translate text.
13612
13613 2018-08-06 David Malcolm <dmalcolm@redhat.com>
13614
13615 * function-tests.c (selftest::test_expansion_to_rtl): Call
13616 free_after_compilation.
13617
13618 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13619
13620 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
13621
13622 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
13623
13624 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
13625 loops with memory block operations from getting unrolled.
13626
13627 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
13628
13629 PR target/86807
13630 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13631 Define to speculation_safe_value_not_needed.
13632
13633 2018-08-06 Jeff Law <law@redhat.com>
13634
13635 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
13636 assert.
13637
13638 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13639
13640 PR target/86662
13641 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
13642 with all enabled __intN types.
13643
13644 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
13645
13646 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13647
13648 * alias.c (record_set): Check for clobber high.
13649 * cfgexpand.c (expand_gimple_stmt): Likewise.
13650 * combine-stack-adj.c (single_set_for_csa): Likewise.
13651 * combine.c (find_single_use_1): Likewise.
13652 (set_nonzero_bits_and_sign_copies): Likewise.
13653 (get_combine_src_dest): Likewise.
13654 (is_parallel_of_n_reg_sets): Likewise.
13655 (try_combine): Likewise.
13656 (record_dead_and_set_regs_1): Likewise.
13657 (reg_dead_at_p_1): Likewise.
13658 (reg_dead_at_p): Likewise.
13659 * dce.c (deletable_insn_p): Likewise.
13660 (mark_nonreg_stores_1): Likewise.
13661 (mark_nonreg_stores_2): Likewise.
13662 * df-scan.c (df_find_hard_reg_defs): Likewise.
13663 (df_uses_record): Likewise.
13664 (df_get_call_refs): Likewise.
13665 * dwarf2out.c (mem_loc_descriptor): Likewise.
13666 * haifa-sched.c (haifa_classify_rtx): Likewise.
13667 * ira-build.c (create_insn_allocnos): Likewise.
13668 * ira-costs.c (scan_one_insn): Likewise.
13669 * ira.c (equiv_init_movable_p): Likewise.
13670 (rtx_moveable_p): Likewise.
13671 (interesting_dest_for_shprep): Likewise.
13672 * jump.c (mark_jump_label_1): Likewise.
13673 * postreload-gcse.c (record_opr_changes): Likewise.
13674 * postreload.c (reload_cse_simplify): Likewise.
13675 (struct reg_use): Add source expr.
13676 (reload_combine): Check for clobber high.
13677 (reload_combine_note_use): Likewise.
13678 (reload_cse_move2add): Likewise.
13679 (move2add_note_store): Likewise.
13680 * print-rtl.c (print_pattern): Likewise.
13681 * recog.c (decode_asm_operands): Likewise.
13682 (store_data_bypass_p): Likewise.
13683 (if_test_bypass_p): Likewise.
13684 * regcprop.c (kill_clobbered_value): Likewise.
13685 (kill_set_value): Likewise.
13686 * reginfo.c (reg_scan_mark_refs): Likewise.
13687 * reload1.c (maybe_fix_stack_asms): Likewise.
13688 (eliminate_regs_1): Likewise.
13689 (elimination_effects): Likewise.
13690 (mark_not_eliminable): Likewise.
13691 (scan_paradoxical_subregs): Likewise.
13692 (forget_old_reloads_1): Likewise.
13693 * reorg.c (find_end_label): Likewise.
13694 (try_merge_delay_insns): Likewise.
13695 (redundant_insn): Likewise.
13696 (own_thread_p): Likewise.
13697 (fill_simple_delay_slots): Likewise.
13698 (fill_slots_from_thread): Likewise.
13699 (dbr_schedule): Likewise.
13700 * resource.c (update_live_status): Likewise.
13701 (mark_referenced_resources): Likewise.
13702 (mark_set_resources): Likewise.
13703 * rtl.c (copy_rtx): Likewise.
13704 * rtlanal.c (reg_referenced_p): Likewise.
13705 (single_set_2): Likewise.
13706 (noop_move_p): Likewise.
13707 (note_stores): Likewise.
13708 * sched-deps.c (sched_analyze_reg): Likewise.
13709 (sched_analyze_insn): Likewise.
13710
13711 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13712
13713 * cse.c (invalidate_reg): New function extracted from...
13714 (invalidate): ...here.
13715 (canonicalize_insn): Check for clobber high.
13716 (invalidate_from_clobbers): invalidate clobber highs.
13717 (invalidate_from_sets_and_clobbers): Likewise.
13718 (count_reg_usage): Check for clobber high.
13719 (insn_live_p): Likewise.
13720 * cselib.c (cselib_expand_value_rtx_1):Likewise.
13721 (cselib_invalidate_regno): Check for clobber in setter.
13722 (cselib_invalidate_rtx): Pass through setter.
13723 (cselib_invalidate_rtx_note_stores):
13724 (cselib_process_insn): Check for clobber high.
13725 * cselib.h (cselib_invalidate_rtx): Add operand.
13726
13727 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13728
13729 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
13730 (mark_not_eliminable): Likewise.
13731 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
13732 * lra-lives.c (process_bb_lives): Check for clobber high.
13733 * lra.c (new_insn_reg): Remember clobber highs.
13734 (collect_non_operand_hard_regs): Check for clobber high.
13735 (lra_set_insn_recog_data): Likewise.
13736 (add_regs_to_insn_regno_info): Likewise.
13737 (lra_update_insn_regno_info): Likewise.
13738
13739 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13740
13741 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
13742 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
13743
13744 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13745
13746 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
13747 (copy_insn_1): Likewise.
13748 (gen_hard_reg_clobber_high): New gen function.
13749 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
13750 * genemit.c (gen_exp): Likewise.
13751 (gen_emit_seq): Pass through info.
13752 (gen_insn): Check for CLOBBER_HIGH.
13753 (gen_expand): Pass through info.
13754 (gen_split): Likewise.
13755 (output_add_clobbers): Likewise.
13756 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
13757 (remove_clobbers): Likewise.
13758 * rtl.h (gen_hard_reg_clobber_high): New declaration.
13759
13760 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13761
13762 * doc/rtl.texi (clobber_high): Add.
13763 (parallel): Add in clobber high
13764 * rtl.c (rtl_check_failed_code3): Add function.
13765 * rtl.def (CLOBBER_HIGH): Add expression.
13766 * rtl.h (RTL_CHECKC3): Add macro.
13767 (rtl_check_failed_code3): Add declaration.
13768 (XC3EXP): Add macro.
13769
13770 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
13771
13772 PR target/86386
13773 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
13774 cfun->machine->max_used_stack_alignment if needed.
13775
13776 2018-08-04 Martin Sebor <msebor@redhat.com>
13777
13778 PR tree-optimization/86571
13779 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
13780 NaN output to 4.
13781
13782 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
13783
13784 PR target/86799
13785 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13786 Define.
13787
13788 2018-08-03 Jeff Law <law@redhat.com>
13789
13790 PR target/86795
13791 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13792 Define to speculation_safe_value_not_needed.
13793
13794 2018-08-03 David Malcolm <dmalcolm@redhat.com>
13795
13796 * doc/gcov.texi (-x): Remove duplicate "to".
13797 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
13798 (-Wif-not-aligned): Remove duplicate "is".
13799 (-flto): Remove duplicate "the".
13800 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
13801 duplicate "v5.00.b".
13802 (MSP430 Options): Remove duplicate "and" from the description
13803 of "-mgprel-sec=regexp".
13804 (x86 Options): Remove duplicate copies of "vmldLog102" and
13805 vmlsLog104 from description of "-mveclibabi=type".
13806
13807 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
13808
13809 * internal-fn.h (first_commutative_argument): Declare.
13810 * internal-fn.c (first_commutative_argument): New function.
13811 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
13812 restrictions for pattern statements. Use first_commutative_argument
13813 to look for commutative operands in calls to internal functions.
13814
13815 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
13816
13817 * Makefile.in (wide-int-range.o): New.
13818 * tree-vrp.c: Move all the wide_int_* functions to...
13819 * wide-int-range.cc: ...here.
13820 * tree-vrp.h: Move all the wide_int_* prototypes to...
13821 * wide-int-range.h: ...here.
13822
13823 2018-08-03 Tom de Vries <tdevries@suse.de>
13824
13825 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
13826 UI_NONE.
13827 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
13828 * except.c (output_function_exception_table): Do early exit if
13829 targetm_common.except_unwind_info (&global_options) == UI_NONE.
13830
13831 2018-08-03 Martin Liska <mliska@suse.cz>
13832
13833 * predict.c (dump_prediction): Change to 2 digits
13834 in fraction part.
13835
13836 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
13837
13838 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
13839 neon_dup_q to...
13840 (falkor_am_1_gtov_gtov): ... a new insn reservation.
13841
13842 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
13843
13844 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
13845 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
13846 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
13847 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
13848 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
13849
13850 2018-08-02 David Malcolm <dmalcolm@redhat.com>
13851
13852 * diagnostic-show-locus.c (diagnostic_show_locus): Use
13853 pp_take_prefix when saving the existing prefix.
13854 * diagnostic.c (diagnostic_append_note): Likewise.
13855 * langhooks.c (lhd_print_error_function): Likewise.
13856 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
13857 param's type. Free the existing prefix.
13858 (pp_take_prefix): New function.
13859 (pretty_printer::pretty_printer): Drop the prefix parameter.
13860 Rename the length parameter to match the comment.
13861 (pretty_printer::~pretty_printer): Free the prefix.
13862 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
13863 parameter.
13864 (struct pretty_printer): Drop the "const" from "prefix" field's
13865 type and clarify memory management.
13866 (pp_set_prefix): Drop the "const" from the 2nd param.
13867 (pp_take_prefix): New decl.
13868
13869 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
13870
13871 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
13872 for word_mode_ok here instead of passing as argument.
13873 (expand_block_compare): Change select_block_compare_mode() call.
13874 (expand_strncmp_gpr_sequence): New function.
13875 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
13876
13877 2018-08-02 Jeff Law <law@redhat.com>
13878
13879 PR target/86790
13880 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13881 Define to speculation_safe_value_not_needed.
13882
13883 PR target/86784
13884 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13885 Define to speculation_safe_value_not_needed.
13886
13887 2018-08-02 Tom de Vries <tdevries@suse.de>
13888
13889 PR target/86660
13890 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
13891 function. Return UI_TARGET unconditionally.
13892 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
13893 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
13894
13895 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13896
13897 * genemit.c (print_overload_test): Fix typo.
13898
13899 2018-08-02 Richard Biener <rguenther@suse.de>
13900
13901 PR tree-optimization/86816
13902 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
13903 which checks for value availability before querying it.
13904 (gvn_uses_equal): Use it.
13905 (same_succ_hash): Likewise.
13906 (gimple_equal_p): Likewise.
13907
13908 2018-08-02 Nick Clifton <nickc@redhat.com>
13909
13910 PR target/86813
13911 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13912 Define to speculation_safe_value_not_needed.
13913
13914 PR target/86810
13915 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13916 Define to speculation_safe_value_not_needed.
13917
13918 PR target/86810
13919 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13920 Define to speculation_safe_value_not_needed.
13921
13922 PR target/86803
13923 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13924 Define to speculation_safe_value_not_needed.
13925
13926 PR target/86797
13927 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13928 Define to speculation_safe_value_not_needed.
13929
13930 PR target/86791
13931 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13932 Define to speculation_safe_value_not_needed.
13933
13934 PR target/86789
13935 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13936 Define to speculation_safe_value_not_needed.
13937
13938 PR target/86787
13939 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13940 Define to speculation_safe_value_not_needed.
13941
13942 PR target/86782
13943 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
13944 speculation_safe_value_not_needed.
13945
13946 PR target/86781
13947 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
13948 to speculation_safe_value_not_needed.
13949
13950 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13951
13952 * doc/md.texi: Expand the documentation of instruction names
13953 to mention port-local uses. Document '@' in pattern names.
13954 * read-md.h (overloaded_instance, overloaded_name): New structs.
13955 (mapping): Declare.
13956 (md_reader::handle_overloaded_name): New member function.
13957 (md_reader::get_overloads): Likewise.
13958 (md_reader::m_first_overload): New member variable.
13959 (md_reader::m_next_overload_ptr): Likewise.
13960 (md_reader::m_overloads_htab): Likewise.
13961 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
13962 m_next_overload_ptr and m_overloads_htab.
13963 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
13964 (get_mode_token, get_code_token, get_int_token): New functions.
13965 (map_attr_string): Add an optional argument that passes back
13966 the associated iterator.
13967 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
13968 (md_reader::handle_overloaded_name, add_overload_instance): New
13969 functions.
13970 (apply_iterators): Handle '@' names. Report an error if '@'
13971 is used without iterators.
13972 (initialize_iterators): Initialize the new iterator_group fields.
13973 * genopinit.c (handle_overloaded_code_for)
13974 (handle_overloaded_gen): New functions.
13975 (main): Use them to print declarations of maybe_code_for_* and
13976 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
13977 * genemit.c (print_overload_arguments, print_overload_test)
13978 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
13979 (main): Use it to print definitions of maybe_code_for_* and
13980 maybe_gen_* functions.
13981 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
13982 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
13983 instead of explicit mode checks.
13984 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
13985 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
13986 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
13987 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
13988 (aarch64_expand_compare_and_swap): Likewise
13989 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
13990 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
13991 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
13992 (aarch64_constant_pool_reload_icode): Delete.
13993 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
13994 instead of aarch64_constant_pool_reload_icode. Use
13995 code_for_aarch64_reload_mov instead of explicit mode checks.
13996 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
13997 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
13998 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
13999 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
14000 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
14001 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
14002 (aarch64_atomic_load_op_code): Delete.
14003 (aarch64_emit_atomic_load_op): Likewise.
14004 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
14005 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
14006 instead of aarch64_emit_atomic_load_op.
14007 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
14008 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
14009 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
14010 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
14011 character before the pattern name.
14012 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
14013 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
14014 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
14015 (aarch64_frecps<mode>): Likewise.
14016 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
14017 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
14018 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
14019 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
14020 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
14021
14022 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
14023
14024 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
14025 Allow HFmode constants if TARGET_FP_F16INST.
14026
14027 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
14028
14029 PR target/86014
14030 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
14031 No longer check last store for clobber of address register.
14032
14033 2018-08-02 Martin Liska <mliska@suse.cz>
14034
14035 PR gcov-profile/86817
14036 * gcov.c (process_all_functions): New function.
14037 (main): Call it.
14038 (process_file): Move functions processing to
14039 process_all_functions.
14040
14041 2018-08-02 David Malcolm <dmalcolm@redhat.com>
14042
14043 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
14044 "const" to the "gimple *" and "rtx_insn *" parameters.
14045 * dumpfile.h (dump_user_location_t::dump_user_location_t):
14046 Likewise.
14047 (dump_location_t::dump_location_t): Likewise.
14048
14049 2018-08-01 Martin Sebor <msebor@redhat.com>
14050
14051 PR tree-optimization/86650
14052 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
14053 rather than a "gcall *". Directly pass the data of interest
14054 to percent_K_format, rather than building a temporary CALL_EXPR
14055 to hold it.
14056 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
14057 (gimple_fold_builtin_strncat): Adjust.
14058 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
14059 gcall* argument with gimple*.
14060 * gimple-ssa-warn-restrict.c (check_call): Same.
14061 (wrestrict_dom_walker::before_dom_children): Same.
14062 (builtin_access::builtin_access): Same.
14063 (check_bounds_or_overlap): Same
14064 (maybe_diag_overlap): Same.
14065 (maybe_diag_offset_bounds): Same.
14066 * tree-diagnostic.c (default_tree_printer): Move usage of
14067 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
14068 to this callsite.
14069 * tree-pretty-print.c (percent_K_format): Add argument.
14070 * tree-pretty-print.h: Add argument.
14071 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
14072 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
14073 (maybe_diag_stxncpy_trunc): Same.
14074 (handle_builtin_stxncpy): Same.
14075 (handle_builtin_strcat): Same.
14076
14077 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14078
14079 * match.pd: Optimise pointer range checks.
14080
14081 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14082
14083 PR tree-optimization/86758
14084 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
14085 to remove pattern statements.
14086
14087 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14088
14089 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
14090 result of dfs_enumerate_from when constructing stmt_vec_infos,
14091 instead of additionally calling get_loop_body.
14092
14093 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14094
14095 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
14096 parameter.
14097 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
14098 When creating an iv, assert that the step is not known to be zero.
14099 (vect_setup_realignment): Update call accordingly.
14100 * tree-vect-stmts.c (vectorizable_store): Likewise.
14101 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
14102
14103 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14104
14105 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
14106 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
14107 (vectorizable_reduction): Likewise.
14108 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14109 (vect_detect_hybrid_slp_stmts): Likewise.
14110 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
14111
14112 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
14113
14114 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
14115 (wide_int_set_zero_nonzero_bits): ...this.
14116 (zero_nonzero_bits_from_vr): Rename to...
14117 (vrp_set_zero_nonzero_bits): ...this.
14118 (extract_range_from_multiplicative_op_1): Abstract wide int
14119 code...
14120 (wide_int_range_multiplicative_op): ...here.
14121 (extract_range_from_binary_expr_1): Extract wide int binary
14122 operations into their own functions.
14123 (wide_int_range_lshift): New.
14124 (wide_int_range_can_optimize_bit_op): New.
14125 (wide_int_range_shift_undefined_p): New.
14126 (wide_int_range_bit_xor): New.
14127 (wide_int_range_bit_ior): New.
14128 (wide_int_range_bit_and): New.
14129 (wide_int_range_trunc_mod): New.
14130 (extract_range_into_wide_ints): New.
14131 (vrp_shift_undefined_p): New.
14132 (extract_range_from_multiplicative_op): New.
14133 (vrp_can_optimize_bit_op): New.
14134 * tree-vrp.h (value_range::dump): New.
14135 (wide_int_range_multiplicative_op): New.
14136 (wide_int_range_lshift):New.
14137 (wide_int_range_shift_undefined_p): New.
14138 (wide_int_range_bit_xor): New.
14139 (wide_int_range_bit_ior): New.
14140 (wide_int_range_bit_and): New.
14141 (wide_int_range_trunc_mod): New.
14142 (zero_nonzero_bits_from_bounds): Rename to...
14143 (wide_int_set_zero_nonzero_bits): ...this.
14144 (zero_nonzero_bits_from_vr): Rename to...
14145 (vrp_set_zero_nonzero_bits): ...this.
14146 (range_easy_mask_min_max): Rename to...
14147 (wide_int_range_can_optimize_bit_op): this.
14148 * vr-values.c (simplify_bit_ops_using_ranges): Rename
14149 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
14150
14151 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14152
14153 * tree-vectorizer.h (vect_orig_stmt): New function.
14154 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
14155 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
14156 (vect_create_epilog_for_reduction): Likewise.
14157 (vectorizable_live_operation): Likewise.
14158 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
14159 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
14160 * tree-vect-stmts.c (vectorizable_call): Likewise.
14161 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
14162
14163 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14164
14165 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
14166 argument.
14167 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
14168 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
14169 (vect_transform_loop): Likewise.
14170 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14171
14172 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14173
14174 * tree-vectorizer.h (vect_schedule_slp): Return void.
14175 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14176 (vect_schedule_slp): Likewise.
14177
14178 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14179
14180 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
14181 argument.
14182 (vect_transform_loop): Update calls accordingly. Schedule SLP
14183 instances before the main loop, if any exist.
14184
14185 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14186
14187 PR tree-optimization/86749
14188 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
14189 If the lhs is used in a COND_EXPR, check that it is being used
14190 as the "then" or "else" value.
14191
14192 2018-08-01 Tom de Vries <tdevries@suse.de>
14193
14194 PR target/86800
14195 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
14196 speculation_safe_value_not_needed.
14197
14198 2018-08-01 Richard Biener <rguenther@suse.de>
14199
14200 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
14201 as base and offset.
14202
14203 2018-08-01 Martin Liska <mliska@suse.cz>
14204
14205 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
14206 format how successful transformation is dumped.
14207 (gimple_mod_pow2_value_transform): Likewise.
14208 (gimple_mod_subtract_transform): Likewise.
14209 (gimple_stringops_transform): Likewise.
14210
14211 2018-08-01 Martin Liska <mliska@suse.cz>
14212
14213 PR value-prof/35543
14214 * value-prof.c (interesting_stringop_to_profile_p):
14215 Simplify the code and add BUILT_IN_MEMMOVE.
14216 (gimple_stringops_transform): Likewise.
14217
14218 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
14219
14220 * config/aarch64/aarch64-simd.md
14221 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
14222 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
14223 use GPI iterator instead of SI mode.
14224
14225 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14226
14227 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
14228 rs6000_speculation_barrier.
14229 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
14230 new barrier pattern name.
14231
14232 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14233
14234 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
14235 (speculation_barrier): New insn.
14236
14237 2018-08-01 Richard Biener <rguenther@suse.de>
14238
14239 PR bootstrap/86724
14240 * graphite.h: Include isl/id.h and isl/space.h to allow build
14241 with ISL 0.20.
14242
14243 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
14244
14245 PR target/86651
14246 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14247 mode for COFF targets.
14248 * defaults.h (TARGET_COFF): Define.
14249 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
14250 TARGET_COFF): Define.
14251 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
14252 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
14253 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
14254
14255 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14256
14257 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
14258 * gimple-streamer-out.c (output_bb): Save it.
14259 * lto-streamer-in.c (input_struct_function_base): Restore
14260 instance discriminator if available. Create map on demand.
14261 * lto-streamer-out.c (output_struct_function_base): Save it if
14262 available.
14263 * final.c (decl_to_instance_map): Document LTO strategy.
14264
14265 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14266 Olivier Hainque <hainque@adacore.com>
14267
14268 * debug.h (decl_to_instance_map_t): New type.
14269 (decl_to_instance_map): Declare.
14270 (maybe_create_decl_to_instance_map): New inline function.
14271 * final.c (bb_discriminator, last_bb_discriminator): New statics,
14272 to track basic block discriminators.
14273 (final_start_function_1): Initialize them.
14274 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
14275 bb_discriminator.
14276 (decl_to_instance_map): New variable.
14277 (map_decl_to_instance, maybe_set_discriminator): New functions.
14278 (notice_source_line): Set discriminator.
14279
14280 2018-07-31 Ian Lance Taylor <iant@golang.org>
14281
14282 * targhooks.c (default_have_speculation_safe_value): Add
14283 ATTRIBUTE_UNUSED.
14284
14285 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14286
14287 * dump-context.h: Include "pretty-print.h".
14288 (dump_context::refresh_dumps_are_enabled): New decl.
14289 (dump_context::emit_item): New decl.
14290 (class dump_context): Add fields "m_test_pp" and
14291 "m_test_pp_flags".
14292 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14293 (temp_dump_context::get_dumped_text): New decl.
14294 (class temp_dump_context): Add field "m_pp".
14295 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
14296 (dump_context::refresh_dumps_are_enabled): ...and add a test for
14297 m_test_pp.
14298 (set_dump_file): Update for above change.
14299 (set_alt_dump_file): Likewise.
14300 (dump_loc): New overload, taking a pretty_printer *.
14301 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
14302 to any test pretty-printer.
14303 (make_item_for_dump_gimple_stmt): New function, adapted from
14304 optinfo::add_gimple_stmt.
14305 (dump_context::dump_gimple_stmt): Call it, and use the result,
14306 eliminating the direct usage of dump_file and alt_dump_file in
14307 favor of indirectly using them via emit_item.
14308 (make_item_for_dump_gimple_expr): New function, adapted from
14309 optinfo::add_gimple_expr.
14310 (dump_context::dump_gimple_expr): Call it, and use the result,
14311 eliminating the direct usage of dump_file and alt_dump_file in
14312 favor of indirectly using them via emit_item.
14313 (make_item_for_dump_generic_expr): New function, adapted from
14314 optinfo::add_tree.
14315 (dump_context::dump_generic_expr): Call it, and use the result,
14316 eliminating the direct usage of dump_file and alt_dump_file in
14317 favor of indirectly using them via emit_item.
14318 (make_item_for_dump_printf_va): New function, adapted from
14319 optinfo::add_printf_va.
14320 (make_item_for_dump_printf): New function.
14321 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
14322 and use the result, eliminating the direct usage of dump_file and
14323 alt_dump_file in favor of indirectly using them via emit_item.
14324 (make_item_for_dump_dec): New function.
14325 (dump_context::dump_dec): Call it, and use the result,
14326 eliminating the direct usage of dump_file and alt_dump_file in
14327 favor of indirectly using them via emit_item.
14328 (make_item_for_dump_symtab_node): New function, adapted from
14329 optinfo::add_symtab_node.
14330 (dump_context::dump_symtab_node): Call it, and use the result,
14331 eliminating the direct usage of dump_file and alt_dump_file in
14332 favor of indirectly using them via emit_item.
14333 (dump_context::begin_scope): Reimplement, avoiding direct usage
14334 of dump_file and alt_dump_file in favor of indirectly using them
14335 via emit_item.
14336 (dump_context::emit_item): New member function.
14337 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14338 Set up test pretty-printer on the underlying context. Call
14339 refresh_dumps_are_enabled.
14340 (temp_dump_context::~temp_dump_context): Call
14341 refresh_dumps_are_enabled.
14342 (temp_dump_context::get_dumped_text): New member function.
14343 (selftest::verify_dumped_text): New function.
14344 (ASSERT_DUMPED_TEXT_EQ): New macro.
14345 (selftest::test_capture_of_dump_calls): Run all tests twice, with
14346 and then without optinfo enabled. Add uses of
14347 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
14348 * dumpfile.h: Update comment for the dump_* API.
14349 * optinfo-emit-json.cc
14350 (selftest::test_building_json_from_dump_calls): Update for new
14351 param for temp_dump_context ctor.
14352 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
14353 and "m_owned" field.
14354 (optinfo_item::~optinfo_item): Likewise.
14355 (optinfo::add_item): New member function.
14356 (optinfo::emit): Update comment.
14357 (optinfo::add_string): Delete.
14358 (optinfo::add_printf): Delete.
14359 (optinfo::add_printf_va): Delete.
14360 (optinfo::add_gimple_stmt): Delete.
14361 (optinfo::add_gimple_expr): Delete.
14362 (optinfo::add_tree): Delete.
14363 (optinfo::add_symtab_node): Delete.
14364 (optinfo::add_dec): Delete.
14365 * optinfo.h (class dump_context): New forward decl.
14366 (optinfo::add_item): New decl.
14367 (optinfo::add_string): Delete.
14368 (optinfo::add_printf): Delete.
14369 (optinfo::add_printf_va): Delete.
14370 (optinfo::add_gimple_stmt): Delete.
14371 (optinfo::add_gimple_expr): Delete.
14372 (optinfo::add_tree): Delete.
14373 (optinfo::add_symtab_node): Delete.
14374 (optinfo::add_dec): Delete.
14375 (optinfo::add_poly_int): Delete.
14376 (optinfo_item::optinfo_item): Remove "owned" param.
14377 (class optinfo_item): Remove field "m_owned".
14378
14379 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14380
14381 PR middle-end/86705
14382 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
14383 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
14384 requested variable alignment.
14385 (expand_one_ssa_partition): Likewise.
14386 (expand_one_var): Likewise.
14387
14388 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14389
14390 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
14391 to speculation_safe_value_not_needed.
14392
14393 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14394
14395 * targhooks.h (speculation_safe_value_not_needed): New prototype.
14396 * targhooks.c (speculation_safe_value_not_needed): New function.
14397 * target.def (have_speculation_safe_value): Update documentation.
14398 * doc/tm.texi: Regenerated.
14399
14400 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14401
14402 * config/aarch64/iterators.md (ALLI_TI): New iterator.
14403 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
14404 expand.
14405 (despeculate_copy<ALLI:mode>_insn): New insn.
14406 (despeculate_copyti_insn): New insn.
14407 (despeculate_simple<ALLI:mode>): New insn
14408 (despeculate_simpleti): New insn.
14409 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
14410 function.
14411 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
14412 aarch64_speculation_safe_value.
14413 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
14414
14415 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14416
14417 * config/aarch64/aarch64-speculation.cc: New file.
14418 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
14419 before pass_reorder_blocks.
14420 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
14421 prototype.
14422 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
14423 X14 and X15 when tracking speculation.
14424 * config/aarch64/aarch64.md (register name constants): Add
14425 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
14426 (unspec): Add UNSPEC_SPECULATION_TRACKER.
14427 (speculation_barrier): New insn attribute.
14428 (cmp<mode>): Allow SP in comparisons.
14429 (speculation_tracker): New insn.
14430 (speculation_barrier): Add speculation_barrier attribute.
14431 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
14432 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
14433 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
14434
14435 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14436
14437 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
14438 aarch64_track_speculation is true.
14439 (tb<optab><mode>1): Likewise.
14440 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
14441 generate CB[N]Z when tracking speculation.
14442 (aarch64_split_compare_and_swap): Likewise.
14443 (aarch64_split_atomic_op): Likewise.
14444
14445 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14446
14447 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
14448
14449 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14450
14451 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
14452 (speculation_barrier): New insn.
14453
14454 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14455
14456 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
14457 * config/arm/arm.md (speculation_barrier): New expand.
14458 (speculation_barrier_insn): New pattern.
14459
14460 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14461
14462 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
14463 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
14464 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
14465 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
14466 list.
14467 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
14468 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
14469 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
14470 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
14471 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
14472 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
14473 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
14474 * builtins.c (expand_speculation_safe_value): New function.
14475 (expand_builtin): Call it.
14476 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
14477 * doc/extend.texi: Document __builtin_speculation_safe_value.
14478 * doc/md.texi: Document "speculation_barrier" pattern.
14479 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
14480 TARGET_HAVE_SPECULATION_SAFE_VALUE.
14481 * doc/tm.texi: Regenerated.
14482 * target.def (have_speculation_safe_value, speculation_safe_value): New
14483 hooks.
14484 * targhooks.c (default_have_speculation_safe_value): New function.
14485 (default_speculation_safe_value): New function.
14486 * targhooks.h (default_have_speculation_safe_value): Add prototype.
14487 (default_speculation_safe_value): Add prototype.
14488
14489 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14490
14491 * dump-context.h (dump_context::dump_loc): New decl.
14492 * dumpfile.c (dump_context::dump_loc): New member function.
14493 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
14494 and dump_gimple_stmt.
14495 (dump_context::dump_gimple_expr_loc): Likewise, using
14496 dump_gimple_expr.
14497 (dump_context::dump_generic_expr_loc): Likewise, using
14498 dump_generic_expr.
14499 (dump_context::dump_printf_loc_va): Likewise, using
14500 dump_printf_va.
14501 (dump_context::begin_scope): Explicitly using the global function
14502 "dump_loc", rather than the member function.
14503
14504 2018-07-31 Martin Sebor <msebor@redhat.com>
14505
14506 PR tree-optimization/86741
14507 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
14508
14509 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
14510
14511 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
14512 depend on whether prefetch instructions will be emitted or not.
14513 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
14514 will be emitted or not.
14515 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
14516 (TARGET_SETMEM_PFD): New macros.
14517
14518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14519
14520 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
14521 (NULL_STMT_VEC_INFO): Delete.
14522 (stmt_vec_info::operator*): Likewise.
14523 (stmt_vec_info::operator gimple *): Likewise.
14524 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
14525 of NULL_STMT_VEC_INFO.
14526 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14527 (vect_reassociating_reduction_p): Likewise.
14528 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
14529 (vectorizable_store): Likewise.
14530 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
14531 (vec_info::free_stmt_vec_infos): Likewise.
14532
14533 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14534
14535 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
14536 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
14537
14538 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14539
14540 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
14541 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14542 (vec_info::free_stmt_vec_info): New private member functions.
14543 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
14544 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
14545 * tree-parloops.c (gather_scalar_reductions): Remove calls to
14546 set_stmt_vec_info_vec and free_stmt_vec_infos.
14547 * tree-vect-loop.c (_loop_vec_info): Remove call to
14548 set_stmt_vec_info_vec.
14549 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
14550 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
14551 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
14552 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14553 (vec_info::free_stmt_vec_info): ...these new functions. Remove
14554 assignments in {vec_info::,}new_stmt_vec_info that are redundant
14555 with the clearing in the xcalloc.
14556 (stmt_vec_info_vec): Delete.
14557 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
14558 (vectorize_loops): Likewise.
14559 (vec_info::~vec_info): Remove argument from call to
14560 free_stmt_vec_infos.
14561 (vec_info::add_stmt): Remove vinfo argument from call to
14562 new_stmt_vec_info.
14563
14564 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14565
14566 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
14567 rather than a gimple stmt.
14568 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
14569 information for pattern statements when passed the original
14570 statement; instead wait to be passed the pattern statement itself.
14571 Don't call set_vinfo_for_stmt here.
14572 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
14573 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
14574 stmt_vec_infos here.
14575 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
14576 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
14577 stmt_vec_infos entry.
14578
14579 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14580
14581 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
14582 * tree-vectorizer.c (vec_info::replace_stmt): New function.
14583 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
14584 * tree-vect-stmts.c (vectorizable_call): Likewise.
14585 (vectorizable_simd_clone_call): Likewise.
14586
14587 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14588
14589 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
14590 * tree-vectorizer.c (vec_info::remove_stmt): New function.
14591 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
14592 * tree-vect-loop.c (vect_transform_loop): Likewise.
14593 * tree-vect-slp.c (vect_schedule_slp): Likewise.
14594 * tree-vect-stmts.c (vect_remove_stores): Likewise.
14595
14596 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14597
14598 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
14599 (vect_dr_stmt): Delete.
14600 * tree-vectorizer.c (vec_info::lookup_dr): New function.
14601 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
14602 of DR_VECT_AUX.
14603 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14604 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
14605 (vect_verify_datarefs_alignment, vect_peeling_supportable)
14606 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14607 (vect_analyze_data_refs): Likewise.
14608 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
14609 argument.
14610 (vect_find_same_alignment_drs): Likewise.
14611 (vect_slp_analyze_node_dependences): Update calls accordingly.
14612 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14613 instead of DR_VECT_AUX.
14614 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
14615 of a vector data references. Use vec_info::lookup_dr instead of
14616 DR_VECT_AUX.
14617 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
14618 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14619 instead of DR_VECT_AUX.
14620
14621 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14622
14623 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
14624 dr_vec_info.
14625 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14626 accordingly.
14627 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14628 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14629 (vect_gen_prolog_loop_niters): Likewise.
14630
14631 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14632
14633 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
14634 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
14635 (vect_known_alignment_in_bytes, vect_dr_behavior)
14636 (vect_get_scalar_dr_size): Take references as dr_vec_infos
14637 instead of data_references. Update calls to other routines for
14638 which the same change has been made.
14639 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
14640 dr_vec_infos instead of stmt_vec_infos.
14641 (vect_analyze_data_ref_dependence): Update call accordingly.
14642 (vect_slp_analyze_data_ref_dependence)
14643 (vect_record_base_alignments): Use DR_VECT_AUX.
14644 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
14645 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
14646 (vector_alignment_reachable_p, vect_get_data_access_cost)
14647 (vect_peeling_supportable, vect_analyze_group_access_1)
14648 (vect_analyze_group_access, vect_analyze_data_ref_access)
14649 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
14650 (vect_compile_time_alias, vect_small_gap_p)
14651 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
14652 (vect_supportable_dr_alignment): Take references as dr_vec_infos
14653 instead of data_references. Update calls to other routines for
14654 which the same change has been made.
14655 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
14656 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
14657 (vect_slp_analyze_and_verify_node_alignment)
14658 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14659 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14660 (vect_setup_realignment): Use dr_vec_infos. Update calls after
14661 above changes.
14662 (_vect_peel_info::dr): Replace with...
14663 (_vect_peel_info::dr_info): ...this new field.
14664 (vect_peeling_hash_get_most_frequent)
14665 (vect_peeling_hash_choose_best_peeling): Update accordingly.
14666 (vect_peeling_hash_get_lowest_cost):
14667 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
14668 routines for which the same change has been made.
14669 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
14670 data_reference.
14671 * tree-vect-loop-manip.c (get_misalign_in_elems)
14672 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
14673 above changes.
14674 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14675 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
14676 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
14677 (get_group_load_store_type, get_negative_load_store_type)
14678 (vect_get_data_ptr_increment, vectorizable_store)
14679 (vectorizable_load): Likewise.
14680 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
14681 Update calls to other routines for which the same change has been made.
14682
14683 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14684
14685 * tree-vectorizer.h (vec_info::move_dr): New member function.
14686 (dataref_aux): Rename to...
14687 (dr_vec_info): ...this and add "dr" and "stmt" fields.
14688 (_stmt_vec_info::dr_aux): Update accordingly.
14689 (_stmt_vec_info::data_ref_info): Delete.
14690 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
14691 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
14692 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
14693 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
14694 of data_ref.
14695 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
14696 (STMT_VINFO_DR_INFO): New macro.
14697 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
14698 (set_dr_misalignment): Update after rename of dataref_aux.
14699 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
14700 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
14701 initialization of STMT_VINFO_DATA_REF.
14702 * tree-vectorizer.c (vec_info::move_dr): New function.
14703 * tree-vect-patterns.c (vect_recog_bool_pattern)
14704 (vect_recog_mask_conversion_pattern)
14705 (vect_recog_gather_scatter_pattern): Use it.
14706 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
14707 the "dr" and "stmt" fields of dr_vec_info instead of
14708 STMT_VINFO_DATA_REF.
14709
14710 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14711
14712 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
14713 (is_pattern_stmt_p): Use it.
14714 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
14715 on pattern statements.
14716
14717 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14718
14719 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
14720 original stmt as a stmt_vec_info rather than a gimple stmt.
14721 (vect_pattern_recog_1): Take the statement directly as a
14722 stmt_vec_info, rather than via a gimple_stmt_iterator.
14723 Update call to vect_mark_pattern_stmts.
14724 (vect_pattern_recog): Update calls accordingly.
14725
14726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14727
14728 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
14729 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
14730 a vect_def_type for the first argument.
14731 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
14732 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
14733 operand if it isn't defined by a vectorized statement.
14734 (vect_build_gather_load_calls): Remove the mask_dt argument and
14735 update calls to vect_get_vec_def_for_stmt_copy.
14736 (vectorizable_bswap): Likewise the dt argument.
14737 (vectorizable_call): Update calls to vectorizable_bswap and
14738 vect_get_vec_def_for_stmt_copy.
14739 (vectorizable_simd_clone_call, vectorizable_assignment)
14740 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
14741 (vectorizable_comparison): Update calls to
14742 vect_get_vec_def_for_stmt_copy.
14743 (vectorizable_store): Likewise. Remove now-unnecessary calls to
14744 vect_is_simple_use.
14745 (vect_get_loop_based_defs): Remove dt argument and update call
14746 to vect_get_vec_def_for_stmt_copy.
14747 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
14748 and vect_get_vec_def_for_stmt_copy.
14749 (vectorizable_load): Update calls to vect_build_gather_load_calls
14750 and vect_get_vec_def_for_stmt_copy.
14751 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14752 (vectorizable_reduction, vectorizable_live_operation): Update calls
14753 to vect_get_vec_def_for_stmt_copy.
14754
14755 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14756
14757 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
14758 and gimple stmt arguments with a stmt_vec_info.
14759 (vect_record_base_alignments): Update calls accordingly.
14760 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
14761 and gimple stmt arguments with a stmt_vec_info.
14762 (vect_build_slp_tree_1): Remove vinfo argument and update call
14763 to vect_record_max_nunits.
14764 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
14765 and vect_record_max_nunits.
14766
14767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14768
14769 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
14770 file and take a stmt_vec_info instead of a gimple stmt.
14771 (supportable_widening_operation, vect_finish_replace_stmt)
14772 (vect_finish_stmt_generation, vect_get_store_rhs)
14773 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
14774 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
14775 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
14776 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
14777 (vect_create_data_ref_ptr, bump_vector_ptr)
14778 (vect_permute_store_chain, vect_setup_realignment)
14779 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
14780 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
14781 (vectorizable_reduction, vectorizable_induction)
14782 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
14783 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
14784 than gimple stmts as arguments.
14785 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
14786 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
14787 (can_group_stmts_p, vect_check_gather_scatter)
14788 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14789 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
14790 (vect_permute_load_chain, vect_shift_permute_load_chain)
14791 (vect_transform_grouped_load)
14792 (vect_record_grouped_load_vectors): Likewise.
14793 * tree-vect-loop.c (vect_fixup_reduc_chain)
14794 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
14795 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
14796 (vectorizable_reduction, vectorizable_induction)
14797 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
14798 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
14799 (vect_get_load_store_mask): Likewise.
14800 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
14801 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
14802 * tree-vect-stmts.c (vect_mark_relevant)
14803 (is_simple_and_all_uses_invariant)
14804 (exist_non_indexing_operands_for_use_p, process_use)
14805 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
14806 (vect_get_vec_def_for_operand, vect_get_vec_defs)
14807 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
14808 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
14809 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
14810 (get_negative_load_store_type, get_load_store_type)
14811 (vect_check_load_store_mask, vect_check_store_rhs)
14812 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
14813 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14814 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14815 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14816 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
14817 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
14818 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
14819 (supportable_widening_operation): Likewise.
14820
14821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14822
14823 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
14824 a stmt_vec_info instead of a gcall.
14825 (vect_check_gather_scatter): Update call accordingly.
14826 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
14827 of a gphi.
14828 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
14829 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
14830 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
14831 instead of a gimple stmt.
14832 (vect_transform_loop): Update calls accordingly.
14833 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
14834 stmt_vec_infos instead of gimple stmts.
14835 (vect_analyze_slp_instance): Update use accordingly.
14836 * tree-vect-stmts.c (read_vector_array, write_vector_array)
14837 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
14838 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
14839 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
14840 (vect_gen_widened_results_half, vect_get_loop_based_defs)
14841 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
14842 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
14843 down to subroutines.
14844
14845 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14846
14847 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
14848 of the worklist from a vector of gimple stmts to a vector of
14849 stmt_vec_infos.
14850 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14851 (vect_mark_stmts_to_be_vectorized): Likewise
14852
14853 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14854
14855 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
14856 statement before passing it to vect_analyze_stmt.
14857 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
14858 the chain of phi vector definitions. Track the exit phi via its
14859 stmt_vec_info.
14860 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
14861 STMT_VINFO_REDUC_DEF.
14862 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
14863 stmt_vec_infos to handle the statement chains.
14864 (vect_get_slp_defs): Record the first statement in the node
14865 using a stmt_vec_info.
14866 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
14867 statements here and pass their stmt_vec_info down to subroutines.
14868 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
14869 down to vect_finish_stmt_generation.
14870 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
14871 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
14872 stmt_vec_infos to subroutines.
14873 (vect_remove_stores): Use stmt_vec_infos to handle the statement
14874 chains.
14875
14876 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14877
14878 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
14879 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
14880 (vect_permute_store_chain, vect_setup_realignment)
14881 (vect_permute_load_chain, vect_shift_permute_load_chain)
14882 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
14883 stmts internally, and when passing values to other vectorizer routines.
14884 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14885 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
14886 (vect_analyze_loop_operations, get_initial_def_for_reduction)
14887 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
14888 (vectorizable_reduction, vectorizable_induction)
14889 (vectorizable_live_operation, vect_transform_loop_stmt)
14890 (vect_transform_loop): Likewise.
14891 * tree-vect-patterns.c (vect_reassociating_reduction_p)
14892 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
14893 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
14894 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14895 (vect_slp_analyze_node_operations_1): Likewise.
14896 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14897 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
14898 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
14899 (vect_finish_stmt_generation_1, get_group_load_store_type)
14900 (get_load_store_type, vect_build_gather_load_calls)
14901 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14902 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14903 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14904 (vectorizable_store, vectorizable_load, vectorizable_condition)
14905 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
14906 (supportable_widening_operation): Likewise.
14907 (vect_get_vector_types_for_stmt): Likewise.
14908 * tree-vectorizer.h (vect_dr_behavior): Likewise.
14909
14910 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14911
14912 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14913 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
14914 (vect_permute_store_chain, vect_permute_load_chain)
14915 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
14916 repeated stmt_vec_info lookups.
14917 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14918 (vect_update_ivs_after_vectorizer): Likewise.
14919 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
14920 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
14921 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
14922 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14923 (vect_bb_slp_scalar_cost): Likewise.
14924 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
14925
14926 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14927
14928 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
14929 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
14930 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
14931 to get gassigns and gcalls, rather than operating on generc gimple
14932 stmts.
14933 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
14934 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
14935 (vectorizable_load, vect_analyze_stmt): Likewise.
14936 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
14937
14938 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14939
14940 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
14941 return stmt_vec_infos rather than gimple stmts. Do not accept
14942 null arguments.
14943 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
14944 of a gimple stmt.
14945 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
14946 Update use of get_later_stmt.
14947 (vect_get_constant_vectors): Update call accordingly.
14948 (vect_schedule_slp_instance): Likewise
14949 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
14950 (vect_slp_analyze_instance_dependence): Likewise.
14951 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
14952
14953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14954
14955 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
14956 (stmt_info_for_cost::stmt_info): ...this new field.
14957 (add_stmt_costs): Update accordingly.
14958 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
14959 (vect_get_known_peeling_cost): Likewise.
14960 (vect_estimate_min_profitable_iters): Likewise.
14961 * tree-vect-stmts.c (record_stmt_cost): Likewise.
14962
14963 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14964
14965 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
14966 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14967 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14968 accordingly.
14969 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
14970
14971 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14972
14973 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
14974 a gimple stmt to a stmt_vec_info.
14975 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
14976
14977 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14978
14979 * tree-vectorizer.h (vec_info::grouped_stores): Change from
14980 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14981 (_loop_vec_info::reduction_chains): Likewise.
14982 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
14983 accordingly.
14984 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14985
14986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14987
14988 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
14989 a gimple stmt to a stmt_vec_info.
14990 (_stmt_vec_info::next_element): Likewise.
14991 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
14992 (vect_slp_analyze_and_verify_node_alignment)
14993 (vect_analyze_group_access_1, vect_analyze_group_access)
14994 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
14995 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
14996 (vect_supportable_dr_alignment): Update accordingly.
14997 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
14998 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
14999 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
15000 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15001 * tree-vect-slp.c (vect_build_slp_tree_1)
15002 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
15003 (vect_split_slp_store_group, vect_analyze_slp_instance)
15004 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
15005 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
15006 (get_group_load_store_type, get_load_store_type)
15007 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
15008 (vect_transform_stmt, vect_remove_stores): Likewise.
15009
15010 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15011
15012 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
15013 than a gimple stmt.
15014 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15015 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
15016 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
15017 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
15018 (vector_alignment_reachable_p, vect_get_data_access_cost)
15019 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
15020 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
15021 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
15022 (vect_analyze_group_access_1, vect_analyze_group_access)
15023 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
15024 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
15025 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
15026 result of vect_dr_stmt and use the stmt_vec_info instead of
15027 the associated gimple stmt.
15028 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15029 (vect_gen_prolog_loop_niters): Likewise.
15030 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15031
15032 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15033
15034 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
15035 to a vec<stmt_vec_info>.
15036 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
15037 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
15038 vec<stmt_vec_info>.
15039 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
15040 to a vec<stmt_vec_info>.
15041 (bst_traits::value_type, bst_traits::value_type): Likewise.
15042 (bst_traits::hash): Update accordingly.
15043 (vect_get_and_check_slp_defs): Change the stmts parameter from
15044 a vec<gimple *> to a vec<stmt_vec_info>.
15045 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
15046 (vect_build_slp_tree): Likewise.
15047 (vect_build_slp_tree_2): Likewise. Update uses of
15048 SLP_TREE_SCALAR_STMTS.
15049 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
15050 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
15051 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
15052 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
15053 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
15054 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
15055 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
15056 (vect_get_constant_vectors, vect_get_slp_defs)
15057 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
15058 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
15059 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
15060 instead of gimple stmts.
15061 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
15062 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
15063 (vect_slp_analyze_instance_dependence): Update uses of
15064 SLP_TREE_SCALAR_STMTS.
15065 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15066 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
15067 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
15068 (get_initial_defs_for_reduction): Likewise.
15069 (vect_create_epilog_for_reduction): Likewise.
15070 (vectorize_fold_left_reduction): Likewise.
15071 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
15072 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
15073 (can_vectorize_live_stmts): Likewise.
15074
15075 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15076
15077 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
15078 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
15079 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
15080 than gimple stmts.
15081 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
15082 of a gimple stmt.
15083 (gather_scalar_reductions): Update after above interface changes.
15084 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
15085 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
15086 than gimple stmts.
15087 (vect_force_simple_reduction): Likewise.
15088 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
15089 LOOP_VINFO_REDUCTIONS.
15090 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
15091
15092 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15093
15094 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
15095 a gimple stmt to a stmt_vec_info.
15096 * tree-vect-loop.c (vect_active_double_reduction_p)
15097 (vect_force_simple_reduction, vectorizable_reduction): Update
15098 accordingly.
15099
15100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15101
15102 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
15103 vec<gimple *> to a vec<stmt_vec_info>.
15104 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
15105 the reduction_phis argument from a vec<gimple *> to a
15106 vec<stmt_vec_info>.
15107 (vectorizable_reduction): Likewise the phis local variable that
15108 is passed to vect_create_epilog_for_reduction. Update for new type
15109 of SLP_TREE_VEC_STMTS.
15110 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
15111 (vectorizable_live_operation): Likewise.
15112 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
15113 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
15114
15115 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15116
15117 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
15118 a gimple stmt to a stmt_vec_info.
15119 (vectorizable_condition, vectorizable_live_operation)
15120 (vectorizable_reduction, vectorizable_induction): Pass back the
15121 vectorized statement as a stmt_vec_info.
15122 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
15123 use of STMT_VINFO_VEC_STMT.
15124 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
15125 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
15126 as stmt_vec_infos rather than gimple stmts.
15127 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
15128 to a stmt_vec_info.
15129 (vectorizable_live_operation): Likewise.
15130 (vectorizable_reduction, vectorizable_induction): Likewise,
15131 updating use of STMT_VINFO_VEC_STMT.
15132 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
15133 of STMT_VINFO_VEC_STMT.
15134 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
15135 (vectorizable_simd_clone_call, vectorizable_conversion)
15136 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
15137 (vectorizable_store, vectorizable_load, vectorizable_condition)
15138 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
15139 from a gimple stmt to a stmt_vec_info.
15140 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
15141 pointer to a stmt_vec_info to the vectorizable_* routines.
15142
15143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15144
15145 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
15146 a gimple stmt to a stmt_vec_info.
15147 (is_pattern_stmt_p): Update accordingly.
15148 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
15149 (vect_record_grouped_load_vectors): Likewise.
15150 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
15151 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
15152 (vect_model_reduction_cost): Likewise.
15153 (vect_create_epilog_for_reduction): Likewise.
15154 (vectorizable_reduction, vectorizable_induction): Likewise.
15155 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15156 Return the stmt_vec_info for the pattern statement.
15157 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
15158 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
15159 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
15160 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
15161 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
15162 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
15163 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
15164 (free_stmt_vec_info, vect_is_simple_use): Likewise.
15165
15166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15167
15168 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
15169 (vect_finish_stmt_generation): Likewise.
15170 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15171 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
15172 (vect_build_gather_load_calls): Use the return value of the above
15173 functions instead of a separate call to vinfo_for_stmt. Use narrow
15174 scopes for the input gimple stmt and wider scopes for the associated
15175 stmt_vec_info. Use vec_info::lookup_def when setting these
15176 stmt_vec_infos from an SSA_NAME definition.
15177 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
15178 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
15179 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
15180 (vectorizable_store, vectorizable_load, vectorizable_condition)
15181 (vectorizable_comparison): Likewise.
15182 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
15183 (vectorizable_reduction): Likewise.
15184
15185 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15186
15187 * tree-vectorizer.h (vect_is_simple_use): Add an optional
15188 stmt_vec_info * parameter before the optional gimple **.
15189 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15190 (process_use, vect_get_vec_def_for_operand_1): Update callers.
15191 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
15192 * tree-vect-loop.c (vectorizable_reduction): Likewise.
15193 (vectorizable_live_operation): Likewise.
15194 * tree-vect-patterns.c (type_conversion_p): Likewise.
15195 (vect_look_through_possible_promotion): Likewise.
15196 (vect_recog_rotate_pattern): Likewise.
15197 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15198
15199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15200
15201 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
15202 a typedef to a wrapper class.
15203 (NULL_STMT_VEC_INFO): New macro.
15204 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
15205 (stmt_vec_info::operator*): New function.
15206 (stmt_vec_info::operator gimple *): Likewise.
15207 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
15208 (add_stmt_costs): Likewise.
15209 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
15210 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
15211 (vect_get_known_peeling_cost): Likewise.
15212 (vect_estimate_min_profitable_iters): Likewise.
15213 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15214 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
15215 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
15216 (vectorizable_store, free_stmt_vec_infos): Likewise.
15217 (new_stmt_vec_info): Change return type of xcalloc to
15218 _stmt_vec_info *.
15219
15220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15221
15222 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
15223 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
15224 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
15225 a single_imm_use-based sequence.
15226 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
15227
15228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15229
15230 * tree-vectorizer.h (vec_info::lookup_def): Declare.
15231 * tree-vectorizer.c (vec_info::lookup_def): New function.
15232 * tree-vect-patterns.c (vect_get_internal_def): Use it.
15233 (vect_widened_op_tree): Likewise.
15234 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15235 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
15236 (vectorizable_reduction): Likewise.
15237 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
15238 of a gimple *.
15239 (vect_is_slp_reduction): Update calls accordingly. Use
15240 vec_info::lookup_def.
15241 (vect_is_simple_reduction): Likewise
15242 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
15243
15244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15245
15246 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
15247 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
15248 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
15249 of vinfo_for_stmt.
15250 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
15251 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
15252 (vect_update_vf_for_slp, vect_analyze_loop_operations)
15253 (vect_is_slp_reduction, vectorizable_induction)
15254 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
15255 * tree-vect-patterns.c (vect_init_pattern_stmt):
15256 (vect_determine_min_output_precision_1, vect_determine_precisions)
15257 (vect_pattern_recog): Likewise.
15258 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
15259 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
15260 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
15261 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
15262 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
15263 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
15264 info field from a loop to a loop_vec_info.
15265
15266 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15267
15268 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
15269 (vec_info::add_stmt): Declare.
15270 * tree-vectorizer.c (vec_info::add_stmt): New function.
15271 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
15272 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
15273 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
15274 (vectorizable_induction): Likewise.
15275 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
15276 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15277 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
15278 (vectorizable_load): Likewise.
15279 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15280 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
15281 (vect_recog_gather_scatter_pattern): Likewise.
15282 (append_pattern_def_seq): Likewise. Remove a check that is
15283 performed by add_stmt itself.
15284
15285 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15286
15287 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
15288 which make_ssa_name was called with new_stmt before new_stmt
15289 had been created.
15290
15291 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15292
15293 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
15294 split out from...
15295 (vect_is_slp_reduction): ...here...
15296 (vect_is_simple_reduction): ...and here. Remove repetition of tests
15297 that are already known to be false.
15298
15299 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15300
15301 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
15302 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
15303 STMT_VINFO_NUM_SLP_USES when it's true.
15304 (vect_free_slp_instance): Add a final_p parameter and pass it to
15305 vect_free_slp_tree.
15306 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
15307 (vect_analyze_slp_instance): Likewise.
15308 (vect_slp_analyze_operations): Likewise.
15309 (vect_slp_analyze_bb_1): Likewise.
15310 * tree-vectorizer.c (vec_info): Likewise.
15311 * tree-vect-loop.c (vect_transform_loop): Likewise.
15312
15313 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15314
15315 * tree-vect-loop.c (vectorizable_reduction): Assert that the
15316 function is not called for second and subsequent members of
15317 a reduction group.
15318
15319 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15320
15321 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
15322 cases for nested loops from here to ...
15323 (vect_create_epilog_for_reduction): ...here. Only call
15324 vect_is_simple_use for inner-loop reductions.
15325
15326 2018-07-31 Martin Liska <mliska@suse.cz>
15327
15328 PR gcov-profile/85338
15329 PR gcov-profile/85350
15330 PR gcov-profile/85372
15331 * profile.c (struct location_triplet): New.
15332 (struct location_triplet_hash): Likewise.
15333 (output_location): Do not output a BB that
15334 is already recorded for a line.
15335 (branch_prob): Use streamed_locations.
15336
15337 2018-07-31 Martin Liska <mliska@suse.cz>
15338
15339 PR gcov-profile/85370
15340 * coverage.c (coverage_begin_function): Do not mark target
15341 clones as artificial functions.
15342
15343 2018-07-31 Martin Liska <mliska@suse.cz>
15344
15345 PR gcov-profile/83813
15346 PR gcov-profile/84758
15347 PR gcov-profile/85217
15348 PR gcov-profile/85332
15349 * profile.c (branch_prob): Do not record GOTO expressions
15350 for GIMPLE statements which locations are already streamed.
15351
15352 2018-07-31 Olivier Hainque <hainque@adacore.com>
15353
15354 * gcc.c (handle_spec_function): Accept a soft_matched_part
15355 argument, as do_spec_1. Pass it down to ...
15356 (eval_spec_function): Accept a soft_matched_part argument,
15357 and pass it down to ...
15358 (do_spec_2): Accept a soft_matched_part argument, and pass
15359 it down to do_spec_1.
15360 (do_spec_1): Pass soft_matched_part to handle_spec_function.
15361 (handle_braces): Update call to handle_spec_function.
15362 (driver::set_up_specs): Update calls to do_spec_2.
15363 (compare_debug_dump_opt_spec_function): Likewise.
15364 (compare_debug_self_opt_spec_function): Likewise.
15365
15366 2018-07-31 Olivier Hainque <hainque@adacore.com>
15367
15368 * common.opt (nolibc): New option.
15369 * doc/invoke.texi (Link Options): Document it.
15370 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
15371 * config/alpha/linux.h: Likewise.
15372 * config/arc/elf.h: Likewise.
15373 * config/arm/uclinux-elf.h: Likewise.
15374 * config/arm/unknown-elf.h: Likewise.
15375 * config/avr/avrlibc.h: Likewise.
15376 * config/bfin/bfin.h: Likewise.
15377 * config/bfin/linux.h: Likewise.
15378 * config/bfin/uclinux.h: Likewise.
15379 * config/darwin.h: Likewise.
15380 * config/darwin10.h: Likewise.
15381 * config/darwin12.h: Likewise.
15382 * config/gnu-user.h: Likewise.
15383 * config/lm32/uclinux-elf.h: Likewise.
15384 * config/pa/pa-hpux11.h: Likewise.
15385 * config/pa/pa64-hpux.h: Likewise.
15386 * config/sparc/sparc.h: Likewise.
15387
15388 2018-07-31 Olivier Hainque <hainque@adacore.com>
15389
15390 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
15391 undefined variables.
15392
15393 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15394
15395 PR target/86640
15396 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
15397 instead of GEN_INT.
15398
15399 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
15400
15401 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
15402 terminated string literal.
15403
15404 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15405
15406 PR rtl-optimization/85160
15407 * combine.c (is_just_move): New function.
15408 (try_combine): Allow combining two instructions into two if neither of
15409 the original instructions was a move.
15410
15411 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
15412
15413 PR target/86673
15414 * doc/extend.texi (Global Register Variables): Discourage use of type
15415 qualifiers.
15416 (Local Register Variables): Likewise.
15417
15418 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
15419
15420 PR tree-optimization/86506
15421 * hwint.h (ceil_log2): Resync with hwint.c implementation.
15422
15423 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
15424
15425 PR target/86547
15426 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
15427 hard_regno, make sure no insn between `from` and `to` clobbers it.
15428
15429 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
15430 Tom de Vries <tdevries@suse.de>
15431
15432 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
15433 (PTX_DEFAULT_RUNTIME_DIM): ... this.
15434 (nvptx_goacc_validate_dims): Set default worker and gang dims to
15435 PTX_DEFAULT_RUNTIME_DIM.
15436 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
15437
15438 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
15439
15440 * config/pa/pa.c (pa_output_addr_vec): Align address table.
15441 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
15442 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
15443
15444 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
15445
15446 * config/rs6000/constraints.md (wG constraint): Delete, no longer
15447 used.
15448 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
15449 predicate to reflect toc fusion has been deleted.
15450 (toc_fusion_mem_raw): Delete, no longer used.
15451 (toc_fusion_mem_wrapped): Likewise.
15452 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
15453 fusion mask bit.
15454 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
15455 Delete, no longer used.
15456 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
15457 meant to be used for toc fusion.
15458 (rs6000_debug_print_mode): Delete toc fusion debugging.
15459 (rs6000_debug_reg_global): Likewise.
15460 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
15461 fusion and secondary reload support that were never used.
15462 (rs6000_option_override_internal): Delete TOC fusion, that was only
15463 partially defined, and it did not work unless you also used the
15464 -mcmodel= switch.
15465 (rs6000_legitimate_address_p): Delete TOC fusion support.
15466 (rs6000_opt_masks): Likewise.
15467 (fusion_wrap_memory_address): Delete function, no longer used.
15468 (fusion_split_address); Delete TOC fusion support.
15469 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
15470 longer used with toc fusion being deleted.
15471 (TARGET_TOC_FUSION_FP): Likewise.
15472 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
15473 UNSPEC.
15474 (toc fusion spliter): Delete TOC fusion support.
15475 (toc_fusionload_<mode>): Likewise.
15476 (toc_fusionload_di): Likewise.
15477 (fusion_gpr_load_<mode>): Delete generator function, this insn no
15478 longer needs to be named. Rename predicate to delete TOC fusion.
15479 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15480 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15481 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15482 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15483 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
15484
15485 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
15486
15487 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
15488 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
15489 __int128 in built-in function prototypes.
15490 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
15491 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
15492
15493 2018-07-27 Martin Sebor <msebor@redhat.com>
15494
15495 PR tree-optimization/86696
15496 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
15497 types, including enums.
15498 (handle_char_store): Be prepared for the above function to fail.
15499
15500 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
15501
15502 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
15503 when optimization level is lower than 2 or optimize for size.
15504
15505 2018-07-26 Martin Sebor <msebor@redhat.com>
15506
15507 PR tree-optimization/86043
15508 PR tree-optimization/86042
15509 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
15510 (get_string_cst_length): Rename...
15511 (get_min_string_length): ...to this. Add argument.
15512 (handle_char_store): Extend to handle multi-character stores by
15513 MEM_REF.
15514 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
15515 * tree.h (initializer_zerop): Add argument.
15516
15517 2018-07-26 Jakub Jelinek <jakub@redhat.com>
15518
15519 PR middle-end/86660
15520 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
15521 declare target to variables if they have always,{to,from,tofrom} map
15522 kinds.
15523
15524 2018-07-26 Martin Liska <mliska@suse.cz>
15525
15526 PR lto/86548
15527 * lto-wrapper.c: Add linker_output as prefix
15528 for ltrans_output_file.
15529
15530 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
15531
15532 PR rtl-optimization/85805
15533 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
15534 value for hard registers if that was written in the same mode.
15535
15536 2018-07-26 Martin Liska <mliska@suse.cz>
15537
15538 PR gcov-profile/86536
15539 * gcov.c (format_gcov): Use printf format %.*f directly
15540 and do not handle special values.
15541
15542 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15543
15544 * common/config/arc/arc-common.c (arc_option_optimization_table):
15545 Update default optimizations for size.
15546
15547 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15548
15549 * config/arc/arc.md (movsf_insn): Add short instruction selection.
15550 * config/arc/constraints.md (CfZ): New constraint.
15551 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
15552 (subsf3_fpu): Likewise.
15553 (cmpsf_fpu): Likewise.
15554 (cmpsf_fpu_uneq): Likewise.
15555
15556 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15557
15558 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
15559 accesses as well.
15560 (arc_is_uncached_mem_p): uncached applies to both the variable and
15561 the pointer.
15562
15563 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15564
15565 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
15566 register names.
15567
15568 2018-07-25 David Malcolm <dmalcolm@redhat.com>
15569
15570 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
15571 field "m_scopes" from vec to auto_vec.
15572
15573 2018-07-25 Martin Liska <mliska@suse.cz>
15574
15575 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
15576 return type.
15577
15578 2018-07-25 Richard Biener <rguenther@suse.de>
15579
15580 PR debug/86654
15581 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
15582 special wrt context_die late.
15583 (gen_subprogram_die): Re-use DIEs in local scope.
15584
15585 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
15586
15587 PR tree-optimization/86644
15588 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
15589
15590 2018-07-25 Martin Liska <mliska@suse.cz>
15591
15592 PR middle-end/86645
15593 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
15594 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
15595
15596 2018-07-25 Martin Liska <mliska@suse.cz>
15597
15598 PR sanitizer/79635
15599 * params.def: Explain ASan abbreviation and provide
15600 a documentation link.
15601
15602 2018-07-24 Martin Sebor <msebor@redhat.com>
15603
15604 PR tree-optimization/86622
15605 PR tree-optimization/86532
15606 * builtins.h (string_length): Declare.
15607 * builtins.c (c_strlen): Correct handling of non-constant offsets.
15608 (check_access): Be prepared for non-constant length ranges.
15609 (string_length): Make extern.
15610 * expr.c (string_constant): Only handle the minor non-constant
15611 array index. Use string_constant to compute the length of
15612 a generic string constant.
15613
15614 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
15615
15616 PR tree-optimization/86618
15617 * tree-vect-stmts.c (vectorizable_call): Don't take the address
15618 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
15619
15620 2018-07-24 David Malcolm <dmalcolm@redhat.com>
15621
15622 PR tree-optimization/86636
15623 * json.cc (json::object::set): Fix comment. Add assertions.
15624 (json::array::append): Move here from json.h. Add comment and an
15625 assertion.
15626 (json::string::string): Likewise.
15627 * json.h (json::array::append): Move to json.cc.
15628 (json::string::string): Likewise.
15629 * optinfo-emit-json.cc
15630 (optrecord_json_writer::impl_location_to_json): Assert that we
15631 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
15632 wrapper around it. Expand the location once, rather than three
15633 times.
15634 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
15635 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
15636 wrappers.
15637 (optrecord_json_writer::optinfo_to_json): Likewise, in four
15638 places. Fix some overlong lines.
15639
15640 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
15641
15642 * config/aarch64/aarch64-simd.md
15643 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
15644 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
15645 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
15646 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
15647 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
15648 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
15649 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
15650 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
15651 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
15652
15653 2018-07-24 Jakub Jelinek <jakub@redhat.com>
15654
15655 PR middle-end/86627
15656 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
15657 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
15658 and abs_d == d, do the power of two handling if profitable.
15659
15660 2018-07-24 Richard Biener <rguenther@suse.de>
15661
15662 * match.pd: Add BIT_FIELD_REF canonicalizations.
15663
15664 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15665
15666 PR c/86617
15667 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
15668
15669 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15670
15671 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
15672 terminated STRING_CST object.
15673
15674 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15675
15676 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
15677
15678 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15679
15680 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
15681 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
15682 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
15683 the elements into a register.
15684 (rs6000_split_v4si_init_di_reg): Delete.
15685 (rs6000_split_v4si_init): Delete.
15686 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
15687 (vsx_init_v4si): Rewrite as a define_expand.
15688
15689 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15690
15691 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
15692 zero_extend argument from memory): New.
15693
15694 2018-07-22 Martin Sebor <msebor@redhat.com>
15695
15696 PR bootstrap/86621
15697 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
15698 diagnosing calls with unknown arguments unless -Walloca-larger-than
15699 is restricted to less than PTRDIFF_MAX bytes.
15700
15701 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
15702
15703 * doc/gcov.texi (Invoking Gcov): Editorial changes.
15704
15705 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15706
15707 * pretty-print.c (text_info::set_location): Remove redundant
15708 "line_table" parameter from call to rich_location::set_range.
15709
15710 2018-07-20 Martin Sebor <msebor@redhat.com>
15711
15712 PR middle-end/82063
15713 * builtins.c (expand_builtin_alloca): Adjust.
15714 * calls.c (alloc_max_size): Simplify.
15715 * cgraphunit.c (cgraph_node::expand): Adjust.
15716 * common.opt (larger_than_size, warn_frame_larger_than): Remove
15717 variables.
15718 (frame_larger_than_size): Same.
15719 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
15720 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
15721 Initialize.
15722 * doc/invoke.texi (GCC Command Options): Document option arguments.
15723 Explain byte-size arguments and suffixes.
15724 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
15725 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
15726 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
15727 * doc/options.texi (UInteger): Expand.
15728 (Host_Wide_Int, ByteSize): Document new properties.
15729 * final.c (final_start_function_1): Include sizes in an error message.
15730 * function.c (frame_offset_overflow): Same.
15731 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
15732 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
15733 Diagnose unbounded alloca calls only for limits of less than
15734 PTRDIFF_MAX.
15735 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
15736 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
15737 for alloca(0).
15738 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
15739 only for limits of less than PTRDIFF_MAX.
15740 * langhooks-def.h (lhd_handle_option): Change function argument
15741 to HOST_WIDE_INT.
15742 * langhooks.c (lhd_handle_option): Same.
15743 * langhooks.h (handle_option): Same.
15744 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
15745 ByteSize flags.
15746 (var_type, var_type_struct): Same.
15747 (var_set): Handle ByteSize flag.
15748 * optc-gen.awk: Add comments to output to ease debugging. Make
15749 use of HOST_WIDE_INT where appropriate.
15750 * opts-gen-save.awk: Use %lx to format unsigned long.
15751 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
15752 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
15753 arguments. Parse bytes-size suffixes.
15754 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
15755 (enum_value_to_arg): Same.
15756 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
15757 (handle_option): Adjust.
15758 (generate_option): Change function argument to HOST_WIDE_INT.
15759 (cmdline_handle_error): Adjust.
15760 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
15761 (set_option): Change function argument to HOST_WIDE_INT.
15762 (option_enabled): Handle cl_host_wide_int.
15763 (get_option_state): Handle CLVC_SIZE.
15764 (control_warning_option): Same.
15765 * opts.c (common_handle_option): Change function argument to
15766 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
15767 OPT_Wvla_larger_than_.
15768 * opts.h (enum cl_var_type): Add an enumerator.
15769 * stor-layout.c (layout_decl): Print a more meaningful warning.
15770 * toplev.c (output_stack_usage): Adjust.
15771
15772 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
15773
15774 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
15775 call to inline_expand_builtin_string_cmp.
15776 (expand_builtin_strcmp): Likewise.
15777 (expand_builtin_strncmp): Likewise.
15778 (inline_string_cmp): Delete the last parameter, change char_type_node
15779 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
15780 two operands.
15781 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
15782 the inlining expansion on target where the type of the call has same or
15783 narrower precision than unsigned char.
15784
15785 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15786
15787 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
15788 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
15789 * common.opt (fsave-optimization-record): New option.
15790 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
15791 * doc/invoke.texi (-fsave-optimization-record): New option.
15792 * dumpfile.c: Include "optinfo-emit-json.h".
15793 (struct kv_pair): Move to coretypes.h.
15794 (optgroup_options): Make non-static.
15795 (dump_context::end_scope): Call
15796 optimization_records_maybe_pop_dump_scope.
15797 * dumpfile.h (optgroup_options): New decl.
15798 * json.cc: New file.
15799 * json.h: New file.
15800 * optinfo-emit-json.cc: New file.
15801 * optinfo-emit-json.h: New file.
15802 * optinfo.cc: Include "optinfo-emit-json.h".
15803 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
15804 (optinfo_enabled_p): Check optimization_records_enabled_p.
15805 (optinfo_wants_inlining_info_p): Likewise.
15806 * optinfo.h: Update comment.
15807 * profile-count.c (profile_quality_as_string): New function.
15808 * profile-count.h (profile_quality_as_string): New decl.
15809 (profile_count::quality): New accessor.
15810 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
15811 and optinfo_emit_json_cc_tests.
15812 * selftest.h (selftest::json_cc_tests): New decl.
15813 (selftest::optinfo_emit_json_cc_tests): New decl.
15814 * toplev.c: Include "optinfo-emit-json.h".
15815 (compile_file): Call optimization_records_finish.
15816 (do_compile): Call optimization_records_start.
15817 * tree-ssa-live.c: Include optinfo.h.
15818 (remove_unused_scope_block_p): Retain inlining information if
15819 optinfo_wants_inlining_info_p returns true.
15820
15821 2018-07-20 Richard Biener <rguenther@suse.de>
15822
15823 PR debug/86585
15824 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
15825 to cover -flto-partition=none.
15826
15827 2018-07-20 Martin Liska <mliska@suse.cz>
15828
15829 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
15830 (get_decl_source_range): Remove unused function.
15831
15832 2018-07-20 Richard Biener <rguenther@suse.de>
15833
15834 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
15835 (struct vn_phi_s): Likewise.
15836 (struct vn_reference_s): Likewise.
15837 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
15838 for searching the slot of an entry known to be in the hash itself.
15839 (vn_phi_hasher::equal): Likewise.
15840 (vn_reference_hasher::equal): Likewise.
15841 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
15842 globals.
15843 (optimistic_info, current_info): Remove, keeping only valid_info.
15844 (vn_reference_lookup_1): Remove fallback lookup.
15845 (vn_reference_lookup_2): Likewise.
15846 (vn_nary_op_lookup_1): Likewise.
15847 (vn_phi_lookup): Likewise.
15848 (vn_nary_build_or_lookup_1): Make sure to not chain the built
15849 hash element.
15850 (vn_reference_insert): Adjust, chain the inserted hash element
15851 at last_inserted_ref.
15852 (vn_reference_insert_pieces): Likewise.
15853 (visit_reference_op_call): Likewise.
15854 (vn_nary_op_insert_into): Chain the inserted hash element at
15855 last_inserted_nary.
15856 (vn_nary_op_insert_pieces): Adjust.
15857 (vn_nary_op_insert): Likewise.
15858 (vn_nary_op_insert_stmt): Likewise.
15859 (vn_phi_insert): Adjust, chain the inserted hash element at
15860 last_inserted_phi.
15861 (process_scc): Remove clearing and copying the optimistic
15862 table. Instead remove elements inserted during an optimistic
15863 iteration from the single table we maintain.
15864 (init_scc_vn): Adjust.
15865 (free_scc_vn): Likewise.
15866 (sccvn_dom_walker::record_cond): Likewise.
15867 (sccvn_dom_walker::after_dom_children): Likewise.
15868
15869 2018-07-19 Martin Sebor <msebor@redhat.com>
15870
15871 PR tree-optimization/84047
15872 PR tree-optimization/83776
15873 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
15874 (check_array_bounds): Call it.
15875
15876 2018-07-19 Martin Sebor <msebor@redhat.com>
15877
15878 * align.h (align_flags): Use member initialization.
15879
15880 2018-07-19 David Malcolm <dmalcolm@redhat.com>
15881
15882 * Makefile.in (OBJS): Add optinfo.o.
15883 * coretypes.h (class symtab_node): New forward decl.
15884 (struct cgraph_node): New forward decl.
15885 (class varpool_node): New forward decl.
15886 * dump-context.h: New file.
15887 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
15888 "tree-pass.h".
15889 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
15890 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
15891 (set_alt_dump_file): Likewise.
15892 (dump_context::~dump_context): New dtor.
15893 (dump_gimple_stmt): Move implementation to...
15894 (dump_context::dump_gimple_stmt): ...this new member function.
15895 Add the stmt to any pending optinfo, creating one if need be.
15896 (dump_gimple_stmt_loc): Move implementation to...
15897 (dump_context::dump_gimple_stmt_loc): ...this new member function.
15898 Start a new optinfo and add the stmt to it.
15899 (dump_gimple_expr): Move implementation to...
15900 (dump_context::dump_gimple_expr): ...this new member function.
15901 Add the stmt to any pending optinfo, creating one if need be.
15902 (dump_gimple_expr_loc): Move implementation to...
15903 (dump_context::dump_gimple_expr_loc): ...this new member function.
15904 Start a new optinfo and add the stmt to it.
15905 (dump_generic_expr): Move implementation to...
15906 (dump_context::dump_generic_expr): ...this new member function.
15907 Add the tree to any pending optinfo, creating one if need be.
15908 (dump_generic_expr_loc): Move implementation to...
15909 (dump_context::dump_generic_expr_loc): ...this new member
15910 function. Add the tree to any pending optinfo, creating one if
15911 need be.
15912 (dump_printf): Move implementation to...
15913 (dump_context::dump_printf_va): ...this new member function. Add
15914 the text to any pending optinfo, creating one if need be.
15915 (dump_printf_loc): Move implementation to...
15916 (dump_context::dump_printf_loc_va): ...this new member function.
15917 Start a new optinfo and add the stmt to it.
15918 (dump_dec): Move implementation to...
15919 (dump_context::dump_dec): ...this new member function. Add the
15920 value to any pending optinfo, creating one if need be.
15921 (dump_context::dump_symtab_node): New member function.
15922 (dump_context::get_scope_depth): New member function.
15923 (dump_context::begin_scope): New member function.
15924 (dump_context::end_scope): New member function.
15925 (dump_context::ensure_pending_optinfo): New member function.
15926 (dump_context::begin_next_optinfo): New member function.
15927 (dump_context::end_any_optinfo): New member function.
15928 (dump_context::s_current): New global.
15929 (dump_context::s_default): New global.
15930 (dump_scope_depth): Delete global.
15931 (dumpfile_ensure_any_optinfo_are_flushed): New function.
15932 (dump_symtab_node): New function.
15933 (get_dump_scope_depth): Reimplement in terms of dump_context.
15934 (dump_begin_scope): Likewise.
15935 (dump_end_scope): Likewise.
15936 (selftest::temp_dump_context::temp_dump_context): New ctor.
15937 (selftest::temp_dump_context::~temp_dump_context): New dtor.
15938 (selftest::verify_item): New function.
15939 (ASSERT_IS_TEXT): New macro.
15940 (ASSERT_IS_TREE): New macro.
15941 (ASSERT_IS_GIMPLE): New macro.
15942 (selftest::test_capture_of_dump_calls): New test.
15943 (selftest::dumpfile_c_tests): Call it.
15944 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
15945 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
15946 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
15947 descriptive comment.
15948 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
15949 (dump_node, dump_bb): Move these unrelated decls.
15950 (class dump_manager): Add leading comment.
15951 * optinfo.cc: New file.
15952 * optinfo.h: New file.
15953
15954 2018-07-19 Michael Collison <michael.collison@arm.com>
15955 Richard Henderson <rth@redhat.com>
15956
15957 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
15958 (subti): Handle op1 zero.
15959 (subvti4, usub4ti4): New.
15960 (*sub<GPI>3_compare1_imm): New.
15961 (sub<GPI>3_carryinCV): New.
15962 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
15963 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
15964
15965 2018-07-19 Michael Collison <michael.collison@arm.com>
15966 Richard Henderson <rth@redhat.com>
15967
15968 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
15969 (addti3): Create simpler code if low part is already known to be 0.
15970 (addvti4, uaddvti4): New.
15971 (*add<GPI>3_compareC_cconly_imm): New.
15972 (*add<GPI>3_compareC_cconly): New.
15973 (*add<GPI>3_compareC_imm): New.
15974 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
15975 handle constants within this pattern..
15976 (*add<GPI>3_compareV_cconly_imm): New.
15977 (*add<GPI>3_compareV_cconly): New.
15978 (*add<GPI>3_compareV_imm): New.
15979 (add<GPI>3_compareV): New.
15980 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
15981 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
15982 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
15983 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
15984 with 'comparison' operator.
15985 (*add<GPI>3_compareV_cconly_imm): Ditto.
15986 (*add<GPI>3_compareV_cconly): Ditto.
15987 (*add<GPI>3_compareV_imm): Ditto.
15988 (add<GPI>3_compareV): Ditto.
15989 (add<mode>3_carryinC): Ditto.
15990 (*add<mode>3_carryinC_zero): Ditto.
15991 (*add<mode>3_carryinC): Ditto.
15992 (add<mode>3_carryinV): Ditto.
15993 (*add<mode>3_carryinV_zero): Ditto.
15994 (*add<mode>3_carryinV): Ditto.
15995
15996 2018-07-19 Michael Collison <michael.collison@arm.com>
15997 Richard Henderson <rth@redhat.com>
15998
15999 * config/aarch64/aarch64-modes.def (CC_V): New.
16000 * config/aarch64/aarch64-protos.h
16001 (aarch64_addti_scratch_regs): Declare
16002 (aarch64_subvti_scratch_regs): Declare.
16003 (aarch64_expand_subvti): Declare.
16004 (aarch64_gen_unlikely_cbranch): Declare
16005 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
16006 for signed overflow using CC_Vmode.
16007 (aarch64_get_condition_code_1): Handle CC_Vmode.
16008 (aarch64_gen_unlikely_cbranch): New function.
16009 (aarch64_addti_scratch_regs): New function.
16010 (aarch64_subvti_scratch_regs): New function.
16011 (aarch64_expand_subvti): New function.
16012
16013 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
16014
16015 * config/aarch64/aarch64-option-extensions.def: New entry for profile
16016 extension.
16017 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
16018 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
16019 extension.
16020
16021 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
16022
16023 PR target/83009
16024 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16025 address check not strict.
16026
16027 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
16028
16029 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
16030 Umq with Umn.
16031 (store_pair_lanes<mode>): Likewise.
16032 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
16033 enum value 'ADDR_QUERY_LDP_STP_N'.
16034 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
16035 (aarch64_print_address_internal): Add declaration.
16036 (aarch64_print_ldpstp_address): Remove.
16037 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
16038 (aarch64_print_operand): Change printing of 'y'.
16039 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
16040 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
16041 'true' rather than '1'.
16042 * config/aarch64/constraints.md (Uml): Likewise.
16043 (Uml): Rename to Umn.
16044 (Umq): Remove.
16045
16046 2018-07-19 Richard Biener <rguenther@suse.de>
16047
16048 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
16049 a trailing array.
16050 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
16051 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
16052 (vn_reference_hasher): Likewise.
16053 (struct vn_tables_s): Remove obstack and alloc-pool members.
16054 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
16055 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
16056 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
16057 (vn_reference_insert_pieces): Likewise.
16058 (alloc_vn_nary_op_noinit): Adjust.
16059 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
16060 (vn_phi_eq): Adjust.
16061 (shared_lookup_phiargs): Remove.
16062 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
16063 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
16064 (visit_reference_op_call): Likewise.
16065 (copy_nary, copy_phi, copy_reference): Remove.
16066 (process_scc): Rewind the obstack when iterating. Do not
16067 copy the elements to valid_info but just move them from one
16068 hashtable to the other.
16069 (allocate_vn_table): Adjust.
16070 (free_vn_table): Likewise.
16071 (init_scc_vn): Likewise.
16072 (free_scc_vn): Likewise.
16073
16074 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
16075
16076 PR target/86560
16077 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
16078 indirect_return as function type attribute.
16079 (ix86_attribute_table): Change indirect_return to function
16080 type attribute.
16081 * doc/extend.texi: Update indirect_return attribute.
16082
16083 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
16084
16085 * wide-int.h (widest2_int): New.
16086 * gimple-fold.c (arith_overflowed_p): Use it.
16087 * tree.h (widest2_int_cst): New.
16088 * tree-vrp.c (wide_int_binop_overflow): Rename from
16089 vrp_int_const_binop.
16090 Rewrite to work on trees.
16091 (extract_range_from_multiplicative_op_1): Abstract code to...
16092 (wide_int_range_min_max): ...here.
16093 (wide_int_range_cross_product): ...and here.
16094 (extract_range_from_binary_expr_1): Abstract overflow code to...
16095 (wide_int_range_mult_wrapping): ...here.
16096 * tree-vrp.h (wide_int_range_cross_product): New.
16097 (wide_int_range_mult_wrapping): New.
16098
16099 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
16100 Julia Koval <julia.koval@intel.com>
16101
16102 * config/i386/x86-tune-costs.h (skylake_memcpy,
16103 skylake_memset): Replace rep_prefix with unrolling for size 512.
16104
16105 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
16106
16107 PR middle-end/86544
16108 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
16109 comparision with EQ_EXPR in last stmt.
16110
16111 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
16112
16113 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
16114 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
16115 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
16116 previously known as "PowerPC AltiVec Built-in Functions". Move
16117 some material to new subsubsections "PowerPC AltiVec Built-in
16118 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
16119 ISA 2.07".
16120 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
16121 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
16122 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
16123 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
16124
16125 2018-07-18 Richard Biener <rguenther@suse.de>
16126
16127 PR tree-optimization/86557
16128 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
16129 EXACT_DIV_EXPR.
16130
16131 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
16132
16133 * config/s390/s390.c (s390_function_profiler): Generate CFI.
16134
16135 2018-07-17 Jeff Law <law@redhat.com>
16136
16137 * config/arm/arm.c (get_label_padding): Update for recent
16138 changes to label_to_alignment.
16139
16140 PR tree-optimization/86010
16141 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
16142
16143 * config/mips/mips.c (vr4130_align_insns): Update for recent
16144 changes to label_to_alignment.
16145
16146 * config/frv/frv.c (frv_label_align): Update for recent changes
16147 to label_to_alignment.
16148
16149 * config/nios2/nios2.c (nios2_label_align): Update for recent
16150 changes which dropped ALIGN_LABELS_LOG.
16151
16152 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
16153
16154 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
16155 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
16156
16157 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
16158
16159 * config/arc/arc.c (arc_label_align): Use align_labels instead of
16160 deprecated align_labels_log.
16161
16162 2018-07-17 Richard Biener <rguenther@suse.de>
16163
16164 PR lto/86456
16165 * dwarf2out.c (init_sections_and_labels): Always generate
16166 a debug_line_str_section for early LTO debug.
16167 (dwarf2out_finish): Reset debug_line_str_hash output early.
16168 Bump counter for extra dwarf5 .debug_loc labels to not conflict
16169 with fat LTO part.
16170 (dwarf2out_early_finish): Output debug_line_str.
16171
16172 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16173
16174 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
16175 index register on z196 or later.
16176
16177 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16178
16179 * config/s390/s390.c (s390_default_align): Set default function
16180 alignment to 16.
16181 (s390_override_options_after_change): Call s390_default align.
16182 (s390_option_override_internal): Call s390_default_align.
16183 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
16184
16185 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16186
16187 PR middle-end/86542
16188 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
16189 to _looptemp_ clauses, other than the first two.
16190
16191 2018-07-17 Martin Liska <mliska@suse.cz>
16192
16193 * opts.c: Do not enable OPT_falign_* for -Os.
16194
16195 2018-07-17 Martin Liska <mliska@suse.cz>
16196
16197 * align.h (MAX_CODE_ALIGN): New.
16198 (MAX_CODE_ALIGN_VALUE): New.
16199 * common/config/i386/i386-common.c (ix86_handle_option):
16200 (MAX_CODE_ALIGN): Moved to align.h.
16201 * final.c (MAX_CODE_ALIGN): Likewise.
16202 * opts.c (parse_and_check_align_values):
16203 (MAX_CODE_ALIGN): Likewise.
16204 (MAX_CODE_ALIGN_VALUE): Likewise.
16205
16206 2018-07-17 Martin Liska <mliska@suse.cz>
16207
16208 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
16209 in order to fulfil coding style.
16210 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
16211 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16212 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
16213 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
16214 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
16215 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
16216 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
16217 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
16218 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16219
16220 2018-07-17 Martin Liska <mliska@suse.cz>
16221
16222 * align.h: New file.
16223 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
16224 directly.
16225 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
16226 align_flags of label_to_alignment.
16227 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
16228 align_flags class.
16229 * config/m68k/m68k.c: Do not use removed align_labels_value and
16230 align_loops_value.
16231 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
16232 (LOOP_ALIGN): Likewise.
16233 (LABEL_ALIGN): Likewise.
16234 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16235 Remove not used macro.
16236 (rs6000_loop_align): Change return type to align_flags.
16237 (rs6000_loop_align_max_skip): Remove.
16238 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
16239 Change return type to align_flags.
16240 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16241 Remove not used macro.
16242 (rs6000_loop_align): Change return type to align_flags.
16243 (rs6000_loop_align_max_skip): Remove.
16244 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
16245 * config/rx/rx-protos.h (rx_align_for_label): Make it
16246 static function.
16247 * config/rx/rx.c (rx_align_for_label): Change return type
16248 to align_flags.
16249 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
16250 macro definitions.
16251 into align_flags class.
16252 (LABEL_ALIGN): Likewise.
16253 (LOOP_ALIGN): Likewise.
16254 * config/s390/s390.c (s390_label_align): Use align_flags
16255 class member.
16256 (s390_asm_output_function_label): Likewise.
16257 * config/sh/sh.c (sh_override_options_after_change):
16258 Use align_flags class directly without macros.
16259 (find_barrier): Likewise.
16260 (barrier_align): Likewise.
16261 (sh_loop_align): Likewise.
16262 * config/spu/spu.c (spu_option_override):
16263 Use align_flags_tuple::get_value instead of removed macros.
16264 (spu_sched_init): Likewise.
16265 * config/spu/spu.h (GTY): Likewise.
16266 * config/visium/visium.c (visium_option_override):
16267 Set "8" as default secondary alignment.
16268 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
16269 in order to guarantee secondary alignment of 8.
16270 * coretypes.h: Include align.h header file.
16271 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
16272 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
16273 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
16274 * doc/tm.texi.in: Likewise.
16275 * final.c (struct label_alignment): Remove not used structure.
16276 (LABEL_ALIGN): Change type to align_flags.
16277 (LOOP_ALIGN): Likewise.
16278 (JUMP_ALIGN): Likewise.
16279 (default_loop_align_max_skip): Remove.
16280 (default_label_align_max_skip): Likewise.
16281 (default_jump_align_max_skip): Likewise.
16282 (default_label_align_after_barrier_max_skip):
16283 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
16284 (LABEL_TO_MAX_SKIP): Remove.
16285 (label_to_alignment): Return align_flags type instead of integer.
16286 (label_to_max_skip): Remove.
16287 (align_fuzz): Use align_flags type.
16288 (compute_alignments): Use align_flags type and use align_flags::max
16289 to combine multiple alignments.
16290 (grow_label_align): Grow vec instead of C array.
16291 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
16292 (shorten_branches): Use align_flags type and use align_flags::max
16293 to combine multiple alignments.
16294 (final_scan_insn_1): Remove usage of secondary alignment that comes
16295 from label alignment, but instead use proper secondary alignment
16296 which is computed in grow_label_align.
16297 * flags.h (struct align_flags_tuple): Move to align.h.
16298 (struct align_flags): Likewise.
16299 (state_align_loops): Rename to align_loops.
16300 (state_align_jumps): Rename to align_jumps.
16301 (state_align_labels): Rename to align_labels.
16302 (state_align_functions): Rename to align_functions.
16303 (align_loops_log): Remove.
16304 (align_jumps_log): Remove.
16305 (align_labels_log): Remove.
16306 (align_functions_log): Remove.
16307 (align_loops_max_skip): Remove.
16308 (align_jumps_max_skip): Remove.
16309 (align_labels_max_skip): Remove.
16310 (align_functions_max_skip): Remove.
16311 (align_loops_value): Remove.
16312 (align_jumps_value): Remove.
16313 (align_labels_value): Remove.
16314 (align_functions_value): Remove.
16315 * output.h (label_to_alignment): Change return type to align_flags.
16316 (label_to_max_skip): Remove.
16317 * target.def: Remove loop_align_max_skip, label_align_max_skip,
16318 jump_align_max_skip macros.
16319 * targhooks.h (default_loop_align_max_skip): Remove.
16320 (default_label_align_max_skip): Likewise.
16321 (default_jump_align_max_skip): Likewise.
16322 (default_label_align_after_barrier_max_skip): Remove.
16323 * toplev.c (read_log_maxskip): Use ::normalize function.
16324 (parse_N_M): Remove not used argument and also call ::normalize.
16325 (parse_alignment_opts): Do not pass unused arguments.
16326 * varasm.c (assemble_start_function): Use directly align_functions
16327 instead of removed macros.
16328 * system.h: Do not poison removed macros.
16329
16330 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16331
16332 PR middle-end/86539
16333 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
16334 and cond temporaries don't have reference type if iterator has
16335 pointer type. For init use &for_pre_body instead of pre_p if
16336 for_pre_body is non-empty.
16337
16338 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16339
16340 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
16341 double-double modes to SFmode directly directly.
16342 (trunc<mode>sf2_fprs): Delete.
16343
16344 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16345
16346 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
16347 for conversions between IFmode and the decimal floating point modes.
16348 (init_float128_ieee): Use the correct names for conversions between
16349 KFmode and the decimal floating point modes.
16350
16351 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16352
16353 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
16354 for the conversions between TDmode and IFmode.
16355 (init_float128_ieee): Use more correct names for the conversions
16356 between TDmode and KFmode.
16357
16358 2018-07-16 Jakub Jelinek <jakub@redhat.com>
16359
16360 PR tree-optimization/86526
16361 * builtins.c (expand_builtin_memcmp): Formatting fixes.
16362 (inline_expand_builtin_string_cmp): Likewise.
16363 (inline_string_cmp): Likewise. Use c_readstr instead of
16364 builtin_memcpy_read_str. Add unit_mode temporary.
16365
16366 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
16367
16368 PR middle-end/86528
16369 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
16370 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
16371
16372 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16373
16374 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
16375 Alphabetize prototypes of built-in functions, separating out
16376 built-in functions that are listed in this section but should be
16377 described elsewhere.
16378
16379 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
16380
16381 PR target/86511
16382 * expmed.c (emit_store_flag): Do not emit setcc followed by a
16383 conditional move when trapping comparison was split to a
16384 non-trapping one (and vice versa).
16385
16386 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16387
16388 * config/s390/s390.c (s390_function_profiler): Generate nops
16389 instead of profiler call sequences.
16390 * config/s390/s390.opt: Add the new option.
16391
16392 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16393
16394 * config/s390/s390.c (s390_function_profiler): Generate
16395 __mcount_loc section.
16396 * config/s390/s390.opt: Add the new option.
16397
16398 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16399
16400 * common.opt: Add the new warning.
16401 * config/s390/s390.c (s390_function_profiler): Emit "brasl
16402 %r0,__fentry__" when -mfentry is specified.
16403 (s390_option_override_internal): Disallow -mfentry for 31-bit
16404 CPUs.
16405 * config/s390/s390.opt: Add the new option.
16406
16407 2018-07-16 Richard Biener <rguenther@suse.de>
16408
16409 PR lto/86523
16410 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
16411 for function-local FUNCTION_DECL and RESULT_DECL immediately.
16412
16413 2018-07-16 Martin Liska <mliska@suse.cz>
16414
16415 PR ipa/86529
16416 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
16417 to ::get_create.
16418
16419 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16420
16421 * config/arc/arcHS.md: Update ARCHS scheduling rules.
16422
16423 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16424
16425 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
16426 for ARCHS4x.
16427 * config/arc/arc-cpus.def (hs4x): New cpu.
16428 (hs4xd): Likewise.
16429 * config/arc/arc-tables.opt: Regenerate.
16430 * config/arc/arc.c (arc_sched_issue_rate): New function.
16431 (TARGET_SCHED_ISSUE_RATE): Define.
16432 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
16433 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
16434 fpu_cvt.
16435 (attr tune): Add ARCHS4x tune values.
16436 (attr tune_dspmpy): Define.
16437 (*tst): Correct instruction type.
16438 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
16439 * config/arc/arcHS4x.md: New file.
16440 * config/arc/fpu.md: Update instruction type attributes.
16441 * config/arc/t-multilib: Regenerate.
16442
16443 2018-07-16 Tom de Vries <tdevries@suse.de>
16444
16445 PR debug/86455
16446 * var-tracking.c (vt_initialize): Fix pre_dec handling.
16447
16448 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16449
16450 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
16451 early clobber.
16452
16453 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
16454
16455 PR tree-optimization/86514
16456 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
16457 conversion to a boolean type from a type with greater precision.
16458
16459 2018-07-16 Tom de Vries <tdevries@suse.de>
16460
16461 * var-tracking.c (vt_initialize): Print adjusted insn slim if
16462 dump_flags request TDF_SLIM.
16463
16464 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
16465
16466 * fold-const.c (int_const_binop_1): Abstract...
16467 (wide_int_binop): ...wide int code here.
16468 (poly_int_binop): ...poly int code here.
16469 Abstract the rest of int_const_binop_1 into int_const_binop.
16470 * fold-const.h (wide_int_binop): New.
16471 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
16472 Remove useless PLUS/MINUS_EXPR case.
16473 (zero_nonzero_bits_from_vr): Move wide int code...
16474 (zero_nonzero_bits_from_bounds): ...here.
16475 (extract_range_from_binary_expr_1): Move mask optimization code...
16476 (range_easy_mask_min_max): ...here.
16477 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
16478 (range_easy_mask_min_max): New.
16479
16480 2018-07-15 Jeff Law <law@redhat.com>
16481
16482 PR target/85993
16483 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
16484 block.
16485
16486 2018-07-14 Jim Wilson <jimw@sifive.com>
16487
16488 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
16489
16490 2018-07-14 Paul Koning <ni1d@arrl.net>
16491
16492 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
16493
16494 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
16495
16496 * lto-streamer-out.c (copy_function_or_variable): Dump info about
16497 copying section.
16498
16499 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
16500 Steve Munroe <munroesj52@gmail.com>
16501
16502 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
16503 (_mm_andnot_si128): Likewise.
16504 (_mm_or_si128): Likewise.
16505 (_mm_xor_si128): Likewise.
16506
16507 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
16508
16509 PR middle-end/78809
16510 * builtins.c (expand_builtin_memcmp): Inline the calls first
16511 when result_eq is false.
16512 (expand_builtin_strcmp): Inline the calls first.
16513 (expand_builtin_strncmp): Likewise.
16514 (inline_string_cmp): New routine. Expand a string compare
16515 call by using a sequence of char comparison.
16516 (inline_expand_builtin_string_cmp): New routine. Inline expansion
16517 a call to str(n)cmp/memcmp.
16518 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
16519 New option.
16520 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
16521
16522 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
16523
16524 * config/arm/driver-arm.c: Include arm-native.h.
16525 (host_detect_local_cpu): Use auto-generated data tables.
16526 (vendors, arm_cpu_table): Delete. Move part information to ...
16527 * config/arm/arm-cpus.in: ... here.
16528 * config/arm/parsecpu.awk (gen_native): New function.
16529 (vendor, part): New CPU fields.
16530 (END): Add support for building the native CPU detection tables.
16531 * config/arm/t-arm (arm-native.h): Add build rule.
16532 (driver-arm.o): Add dependency on arm-native.h.
16533
16534 2018-07-13 Richard Biener <rguenther@suse.de>
16535
16536 PR middle-end/85974
16537 * match.pd (addr1 - addr2): Allow either of the operand to
16538 have a conversion.
16539
16540 2018-07-13 Tom de Vries <tdevries@suse.de>
16541
16542 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
16543 in remap_ssa_name.
16544
16545 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
16546
16547 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
16548 arrays instead of numbered variables.
16549
16550 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
16551
16552 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
16553 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
16554
16555 2018-07-13 Richard Biener <rguenther@suse.de>
16556
16557 PR debug/86452
16558 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
16559 instead of get_context_die.
16560
16561 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
16562 Richard Biener <rguenther@suse.de>
16563
16564 PR middle-end/86489
16565 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
16566 that the loop latch destination where phi is defined.
16567
16568 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
16569
16570 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
16571 (riscv_expand_epilogue): Add assertion to check interrupt mode.
16572 (riscv_set_current_function): Extract getting interrupt type to new
16573 function.
16574 (riscv_get_interrupt_type): New function.
16575 (riscv_merge_decl_attributes): New function, checking interrupt type is
16576 same.
16577 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
16578
16579 2018-07-12 Paul Koning <ni1d@arrl.net>
16580
16581 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
16582 directive.
16583
16584 2018-07-12 Paul Koning <ni1d@arrl.net>
16585
16586 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
16587 zero reference, add doloop_end instead.
16588 * doc/md.texi (decrement_and_branch_until_zero): Remove.
16589 (Looping patterns): Remove decrement_and_branch_until_zero. Add
16590 detail for doloop_end.
16591
16592 2018-07-12 Martin Sebor <msebor@redhat.com>
16593
16594 PR c/86453
16595 * attribs.c (decl_attributes): Reject conflicting attributes before
16596 calling attribute handlers.
16597
16598 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16599
16600 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
16601 parameter.
16602 (gcc::dump_manager::get_dump_file_name): likewise.
16603 (dump_begin): Likewise.
16604 * dumpfile.h (dump_begin): Update prototype.
16605 (gcc::dump_manager::get_dump_file_name,
16606 gcc::dump_manager::get_dump_file_name): Update prototype.
16607
16608 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16609
16610 * internal-fn.h (vectorizable_internal_fn_p): New function.
16611 * tree-vect-slp.c (compatible_calls_p): Likewise.
16612 (vect_build_slp_tree_1): Remove nops argument. Handle calls
16613 to internal functions.
16614 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
16615
16616 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16617
16618 * fold-const.h (inverse_conditions_p): Declare.
16619 * fold-const.c (inverse_conditions_p): New function.
16620 * match.pd: Use inverse_conditions_p. Add folds of view_converts
16621 that test the inverse condition of a conditional internal function.
16622 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
16623 * internal-fn.c (internal_fn_mask_index): Handle conditional
16624 internal functions.
16625 (vectorized_internal_fn_supported_p): New function.
16626 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
16627 (any_pred_load_store): Replace with...
16628 (need_to_predicate): ...this new variable.
16629 (redundant_ssa_names): New variable.
16630 (ifcvt_can_use_mask_load_store): Move initial checks to...
16631 (ifcvt_can_predicate): ...this new function. Handle tree codes
16632 for which a conditional internal function exists.
16633 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
16634 instead of ifcvt_can_use_mask_load_store. Update after variable
16635 name change.
16636 (predicate_load_or_store): New function, split out from
16637 predicate_mem_writes.
16638 (check_redundant_cond_expr): New function.
16639 (value_available_p): Likewise.
16640 (predicate_rhs_code): Likewise.
16641 (predicate_mem_writes): Rename to...
16642 (predicate_statements): ...this. Use predicate_load_or_store
16643 and predicate_rhs_code.
16644 (combine_blocks, tree_if_conversion): Update after above name changes.
16645 (ifcvt_local_dce): Handle redundant_ssa_names.
16646 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
16647 general conditional functions.
16648 * tree-vect-stmts.c (vectorizable_call): Likewise.
16649
16650 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16651 Alan Hayward <alan.hayward@arm.com>
16652 David Sherwood <david.sherwood@arm.com>
16653
16654 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
16655 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
16656 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
16657 plus and minus and convert them into IFN_COND_FMA-based sequences.
16658 (convert_mult_to_fma): Handle conditional plus and minus.
16659
16660 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16661
16662 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
16663 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
16664 (cond_fnms_optab): New optabs.
16665 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
16666 internal functions.
16667 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
16668 * internal-fn.h (get_conditional_internal_fn): Declare.
16669 (get_unconditional_internal_fn): Likewise.
16670 * internal-fn.c (cond_ternary_direct): New macro.
16671 (expand_cond_ternary_optab_fn): Likewise.
16672 (direct_cond_ternary_optab_supported_p): Likewise.
16673 (FOR_EACH_COND_FN_PAIR): Likewise.
16674 (get_conditional_internal_fn): New function.
16675 (get_unconditional_internal_fn): Likewise.
16676 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
16677 (gimple_match_op::gimple_match_op): Add a new overload for 5
16678 operands.
16679 (gimple_match_op::set_op): Likewise.
16680 (gimple_resimplify5): Declare.
16681 * genmatch.c (decision_tree::gen): Generate simplifications for
16682 5 operands.
16683 * gimple-match-head.c (gimple_simplify): Define an overload for
16684 5 operands. Handle calls with 5 arguments in the top-level overload.
16685 (convert_conditional_op): Handle conversions from unconditional
16686 internal functions to conditional ones.
16687 (gimple_resimplify5): New function.
16688 (build_call_internal): Pass a fifth operand.
16689 (maybe_push_res_to_seq): Likewise.
16690 (try_conditional_simplification): Try converting conditional
16691 internal functions to unconditional internal functions.
16692 Handle 3-operand unconditional forms.
16693 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
16694 Define ternary equivalents of the current rules for binary conditional
16695 internal functions.
16696 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
16697 ternary operations.
16698 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
16699 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
16700 (optab): Handle them.
16701 (SVE_COND_FP_TERNARY): New int iterator.
16702 (sve_fmla_op, sve_fmad_op): New int attributes.
16703 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
16704 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
16705 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
16706
16707 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16708
16709 * target.def (preferred_else_value): New target hook.
16710 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
16711 * doc/tm.texi: Regenerate.
16712 * targhooks.h (default_preferred_else_value): Declare.
16713 * targhooks.c (default_preferred_else_value): New function.
16714 * internal-fn.h (conditional_internal_fn_code): Declare.
16715 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
16716 (get_conditional_internal_fn): Use it.
16717 (conditional_internal_fn_code): New function.
16718 * gimple-match.h (gimple_match_cond): New struct.
16719 (gimple_match_op): Add a cond member function.
16720 (gimple_match_op::gimple_match_op): Update all forms to take a
16721 gimple_match_cond.
16722 * genmatch.c (expr::gen_transform): Use the same condition as res_op
16723 for the suboperation, but don't specify a particular else_value.
16724 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
16725 (visit_nary_op, visit_reference_op_load): Pass
16726 gimple_match_cond::UNCOND to the gimple_match_op constructor.
16727 * gimple-match-head.c: Include tree-eh.h
16728 (convert_conditional_op): New function.
16729 (maybe_resimplify_conditional_op): Likewise.
16730 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
16731 (gimple_resimplify2): Likewise.
16732 (gimple_resimplify3): Likewise.
16733 (gimple_resimplify4): Likewise.
16734 (maybe_push_res_to_seq): Return null for conditional operations.
16735 (try_conditional_simplification): New function.
16736 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
16737 constructor.
16738 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
16739 IFN_COND_* call.
16740 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
16741 function.
16742 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
16743
16744 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16745
16746 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16747 DECL_FCONTEXT
16748 (hash_tree): Do not hash DECL_FCONTEXT
16749 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
16750 Do not stream DECL_FCONTEXT.
16751 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
16752 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
16753
16754 2018-07-12 Richard Biener <rguenther@suse.de>
16755
16756 PR debug/86462
16757 * dwarf2out.c (gen_block_die): Only output blocks when they have
16758 at least one !DECL_IGNORED_P variable.
16759
16760 2018-07-12 Richard Biener <rguenther@suse.de>
16761
16762 PR target/84829
16763 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
16764 Remove -mieee-fp handling.
16765
16766 2018-07-12 Richard Biener <rguenther@suse.de>
16767
16768 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
16769 left-over from last patch.
16770
16771 2018-07-12 Jakub Jelinek <jakub@redhat.com>
16772
16773 PR tree-optimization/86492
16774 * gimple-ssa-store-merging.c
16775 (imm_store_chain_info::coalesce_immediate_stores): Call
16776 check_no_overlap even for the merge_overlapping case. Formatting fix.
16777
16778 2018-07-12 Richard Biener <rguenther@suse.de>
16779
16780 PR middle-end/86479
16781 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
16782 move possibly trapping operations into the conditional.
16783
16784 2018-07-12 Richard Biener <rguenther@suse.de>
16785
16786 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
16787 (vn_lookup_simplify_result): Remove recursion limit applied
16788 here.
16789 (vn_nary_build_or_lookup_1): Adjust.
16790 (try_to_simplify): Likewise.
16791 * gimple-match-head.c (gimple_resimplify1): Instead apply one
16792 here.
16793 (gimple_resimplify2): Likewise.
16794 (gimple_resimplify3): Likewise.
16795 (gimple_resimplify4): Likewise.
16796
16797 2018-07-11 Jakub Jelinek <jakub@redhat.com>
16798
16799 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
16800 Use __mmask64 type instead of __mmask8 for __M argument.
16801 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
16802 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
16803 __U argument.
16804 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
16805 __mmask16 for __M argument.
16806 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
16807 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
16808 to __mmask16 instead of __mmask8.
16809 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
16810 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
16811 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
16812 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
16813 instead of __mmask16 for __U argument.
16814 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
16815 __mmask16 instead of __mmask8 for __U argument.
16816 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
16817 __U argument.
16818 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
16819 __mmask16.
16820 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
16821 argument.
16822 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
16823 __U argument.
16824 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
16825 __mmask16.
16826 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
16827 of __mmask16.
16828 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
16829 __U argument.
16830 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
16831 __U argument.
16832 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
16833 __U argument.
16834 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
16835 __U argument.
16836 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
16837 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
16838 return type as well as __M argument type and all casts from __mmask8
16839 to __mmask32.
16840 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
16841 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
16842 return type as well as __M argument type and all casts from __mmask8
16843 to __mmask16.
16844 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
16845 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
16846 return type as well as __M argument type and all casts from __mmask8
16847 to __mmask32.
16848 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
16849 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
16850 return type as well as __M argument type and all casts from __mmask8
16851 to __mmask16.
16852 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
16853 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
16854 __mmask16.
16855
16856 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
16857
16858 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
16859 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
16860 for __U argument.
16861
16862 2018-07-11 Paul Koning <ni1d@arrl.net>
16863
16864 * doc/md.texi (define_subst): Document how multiple occurrences of
16865 the same argument in the replacement pattern are handled.
16866
16867 2018-07-11 Paul Koning <ni1d@arrl.net>
16868
16869 * doc/extend.texi (Common Variable Attributes): Move "mode" into
16870 alphabetical order.
16871 (Common Type Attributes): Add "mode" attribute.
16872
16873 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
16874
16875 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
16876 stream DECL_ORIGINAL_TYPE.
16877 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
16878 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
16879 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
16880 Do not walk original type.
16881 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
16882 external decls.
16883 (write_ts_decl_non_common_tree_pointers): Do not stream
16884 DECL_ORIGINAL_TYPE
16885 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
16886 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
16887
16888 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16889
16890 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
16891 thread twice from the same starting edge.
16892
16893 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16894
16895 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
16896 * gimple.c (gimple_call_nonnull_result_p): ...here...
16897 (gimple_call_nonnull_arg): ...and here.
16898 * gimple.h (gimple_call_nonnull_result_p): New.
16899 (gimple_call_nonnull_arg): New.
16900
16901 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
16902
16903 * config/arm/arm-cpus.in: Move information from fpu field of each
16904 cpu definition to the isa field.
16905 * config/arm/parsecpu.awk (fpu): Delete match rule.
16906 (gen_comm_data): Don't add bits from the CPU's FPU entry.
16907
16908 2018-07-11 Richard Biener <rguenther@suse.de>
16909
16910 PR debug/86457
16911 * dwarf2out.c (init_sections_and_labels): Use
16912 output_asm_line_debug_info consistently.
16913 (dwarf2out_early_finish): Likewise.
16914 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
16915 type units.
16916
16917 2018-07-11 Richard Biener <rguenther@suse.de>
16918
16919 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
16920 Rework father_bb setting in a way to avoid propagating constants
16921 multiple times on a loop body.
16922
16923 2018-07-10 Mark Wielaard <mark@klomp.org>
16924
16925 PR debug/86459
16926 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
16927
16928 2018-07-10 Richard Biener <rguenther@suse.de>
16929
16930 * hash-map.h (hash_map::iterator::operator*): Return
16931 references to key and value.
16932
16933 2018-07-10 Jakub Jelinek <jakub@redhat.com>
16934
16935 PR c++/86443
16936 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
16937 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
16938 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
16939 (gimplify_omp_for): For composite loops, move outer
16940 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
16941 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
16942 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
16943 TREE_LIST for both the original class iterator and the "last" helper
16944 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
16945 loop, remember has_decl_expr from outer composite loops for the
16946 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
16947
16948 2018-07-09 Martin Sebor <msebor@redhat.com>
16949
16950 PR middle-end/77357
16951 PR middle-end/86428
16952 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
16953 accessing implicitly initialized array elements.
16954 * expr.c (string_constant): Handle string initializers of
16955 character arrays within aggregates.
16956 * gimple-fold.c (fold_array_ctor_reference): Add argument.
16957 Store element offset. As a special case, handle zero size.
16958 (fold_nonarray_ctor_reference): Same.
16959 (fold_ctor_reference): Add argument. Store subobject offset.
16960 * gimple-fold.h (fold_ctor_reference): Add argument.
16961
16962 2018-07-09 Paul Koning <ni1d@arrl.net>
16963
16964 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
16965 (pdp11_insn_cost): New function.
16966 (pdp11_md_asm_adjust): New function.
16967 (TARGET_INVALID_WITHIN_DOLOOP): Define.
16968 (pdp11_rtx_costs): Update to match machine better.
16969 (output_addr_const_pdp11): Correct format mismatch warnings.
16970 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
16971 * config/pdp11/pdp11.md: General change to add base_cost and/or
16972 length attributes for use by new pdp11_insn_cost function.
16973 (MIN_BRANCH): Correct definition.
16974 (MIN_SOB): Ditto.
16975 (doloop_end): Use standard pattern name for looping pattern.
16976 (doloop_end_nocc): New.
16977 (movsf): Add another constraint alternative.
16978 (zero_extendqihi2): Add constraint alternatives for not in place
16979 extend.
16980 (zero_extendhisi2): Remove.
16981 (shift patterns): Add CC handling variants.
16982 (bswaphi2): New.
16983 (bswapsi2): New.
16984 (rothi3): New.
16985 (define_peephole2): New peephole to recognize mov that sets CC for
16986 subsequent test.
16987
16988 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16989
16990 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
16991 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
16992 wi::add.
16993
16994 2018-07-09 Jakub Jelinek <jakub@redhat.com>
16995
16996 PR c/86420
16997 * real.c (real_nextafter): Return true if result is denormal.
16998
16999 2018-07-09 Martin Liska <mliska@suse.cz>
17000
17001 * common.opt: Add back wrongly removed attribute.
17002
17003 2018-07-09 Richard Biener <rguenther@suse.de>
17004
17005 PR debug/86413
17006 * dwarf2out.c (gen_block_die): For an early generated DIE
17007 always output high/low PC attributes.
17008
17009 2018-07-09 Tom de Vries <tdevries@suse.de>
17010
17011 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
17012 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
17013 onto VAR_DECL with abstract origin.
17014
17015 2018-07-07 Jim Wilson <jimw@sifive.com>
17016
17017 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
17018
17019 2018-07-07 Tom de Vries <tdevries@suse.de>
17020
17021 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
17022
17023 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
17024
17025 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
17026 overflow_type.
17027 (combine_bound): Use wide-int overflow calculation instead of
17028 rolling our own.
17029 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
17030 overflow_type.
17031 * fold-const.c (int_const_binop_2): Same.
17032 (extract_muldiv_1): Same.
17033 (fold_div_compare): Same.
17034 (fold_abs_const): Same.
17035 * match.pd: Same.
17036 * poly-int.h (add): Same.
17037 (sub): Same.
17038 (neg): Same.
17039 (mul): Same.
17040 * predict.c (predict_iv_comparison): Same.
17041 * profile-count.c (slow_safe_scale_64bit): Same.
17042 * simplify-rtx.c (simplify_const_binary_operation): Same.
17043 * tree-chrec.c (tree_fold_binomial): Same.
17044 * tree-data-ref.c (split_constant_offset_1): Same.
17045 * tree-if-conv.c (idx_within_array_bound): Same.
17046 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
17047 * tree-ssa-phiopt.c (minmax_replacement): Same.
17048 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
17049 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
17050 * vr-values.c (vr_values::adjust_range_with_scev): Same.
17051 * wide-int.cc (wi::add_large): Same.
17052 (wi::mul_internal): Same.
17053 (wi::sub_large): Same.
17054 (wi::divmod_internal): Same.
17055 * wide-int.h: Change overflow type to overflow_type for neg, add,
17056 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
17057 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
17058 mul_internal, divmod_internal.
17059 (overflow_type): New enum.
17060 (accumulate_overflow): New.
17061
17062 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
17063
17064 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
17065 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
17066
17067 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
17068
17069 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
17070 argument is checked for zero before entering loop, avoid checking again.
17071
17072 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
17073
17074 * gimplify.h (generic_expr_could_trap_p): Set as global function.
17075 * gimplify.h (generic_expr_could_trap_p): Likwise.
17076 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
17077
17078 2018-07-06 Jakub Jelinek <jakub@redhat.com>
17079
17080 PR tree-optimization/86401
17081 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
17082 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
17083 (fold_bit_and_mask): ... here. New helper function for match.pd.
17084 * fold-const.h (fold_bit_and_mask): Declare.
17085 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
17086
17087 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
17088
17089 PR target/86324
17090 * target.def (translate_mode_attribute): New hook.
17091 * targhooks.h (default_translate_mode_attribute): Declare.
17092 * targhooks.c (default_translate_mode_attribute): New function.
17093 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
17094 * doc/tm.texi: Regenerate.
17095 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
17096 (rs6000_translate_mode_attribute): New function.
17097
17098 2018-07-06 Paul Koning <ni1d@arrl.net>
17099
17100 * doc/md.texi (define_split): Document DONE and FAIL.
17101 (define_peephole2): Ditto.
17102
17103 2018-07-05 Jeff Law <law@redhat.com>
17104
17105 PR tree-optimization/86010
17106 * tree-ssa-dse.c (compute_trims): More aggressively trim at
17107 both the head and tail of mem* and str* calls.
17108
17109 2018-07-05 Jim Wilson <jimw@sifive.com>
17110
17111 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
17112
17113 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
17114
17115 * config/aarch64/aarch64-simd.md: correct flags text for
17116 MIN_EXPR replacement.
17117
17118 2018-07-05 James Clarke <jrtc27@jrtc27.com>
17119
17120 * configure: Regenerated.
17121
17122 2018-07-05 Carl Love <cel@us.ibm.com>
17123
17124 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
17125 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
17126 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
17127 VSX_BUILTIN_DOUBLEL_V4SF.
17128
17129 2018-07-05 Martin Sebor <msebor@redhat.com>
17130
17131 PR c++/86400
17132 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
17133 than its domain to compute its the upper bound of a char array.
17134
17135 2018-07-05 Nathan Sidwell <nathan@acm.org>
17136
17137 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
17138 * doc/cpp.texi: Update comment.
17139 * doc/tm.texi: Rebuilt.
17140 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
17141 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
17142 * doc/extend.texi (Backwards Compatibility): Clarify it is system
17143 headers affected by extern "C".
17144 * system.h: Poison NO_IMPLICIT_EXTERN_C.
17145 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
17146 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
17147 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
17148 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
17149 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
17150 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
17151 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
17152 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
17153 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
17154 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
17155 config/sparc/sp64-elf.h, config/spu/spu.h,
17156 config/stormy16/stormy16.h, config/v850/v850.h,
17157 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
17158 define NO_IMPLICIT_EXTERN_C.
17159 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
17160
17161 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17162
17163 PR target/84711
17164 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17165 instead of GET_MODE_SIZE when comparing Units.
17166
17167 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17168
17169 PR target/84711
17170 * rtlanal.c (set_noop_p): Constrain on mode change,
17171 include hard-reg-set.h
17172
17173 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17174
17175 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
17176
17177 2018-07-05 Jakub Jelinek <jakub@redhat.com>
17178
17179 Revert
17180 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17181
17182 PR sanitizer/84250
17183 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17184 libasan.
17185 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17186
17187 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17188
17189 PR sanitizer/84250
17190 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17191 libasan.
17192 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17193
17194 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
17195
17196 PR middle-end/86380
17197 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
17198
17199 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
17200
17201 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
17202 neg_*_op* variables.
17203
17204 2018-07-04 Martin Liska <mliska@suse.cz>
17205
17206 * tree-switch-conversion.c: Define
17207 max_ratio_for_speed and max_ratio_for_size constants.
17208
17209 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17210 Martin Liska <mliska@suse.cz>
17211
17212 PR middle-end/66240
17213 PR target/45996
17214 PR c/84100
17215 * common.opt: Rename align options with 'str_' prefix.
17216 * common/config/i386/i386-common.c (set_malign_value): New
17217 function.
17218 (ix86_handle_option): Use it to set -falign-* options/
17219 * config/aarch64/aarch64-protos.h (struct tune_params): Change
17220 type from int to string.
17221 * config/aarch64/aarch64.c: Update default values from int
17222 to string.
17223 * config/alpha/alpha.c (alpha_override_options_after_change):
17224 Likewise.
17225 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
17226 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17227 max skip conditionally.
17228 * config/i386/freebsd.h (SUBALIGN_LOG): New.
17229 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17230 max skip conditionally.
17231 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17232 max skip conditionally.
17233 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
17234 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17235 max skip conditionally.
17236 * config/i386/i386.c (struct ptt): Change type from int to
17237 string.
17238 (ix86_default_align): Set default values.
17239 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
17240 max skip conditionally.
17241 * config/i386/iamcu.h (SUBALIGN_LOG): New.
17242 (ASM_OUTPUT_MAX_SKIP_ALIGN):
17243 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
17244 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17245 max skip conditionally.
17246 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
17247 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
17248 * config/i386/x86-64.h (SUBALIGN_LOG): New.
17249 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17250 max skip conditionally.
17251 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17252 * config/ia64/ia64.c (ia64_option_override): Set default values
17253 for alignment options.
17254 * config/m68k/m68k.c: Handle new str_align_* options.
17255 * config/mips/mips.c (mips_set_compression_mode): Change
17256 type of constants.
17257 (mips_option_override): Set default values for options.
17258 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
17259 Likewise.
17260 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17261 Likewise.
17262 * config/rx/rx.c (rx_option_override): Likewise.
17263 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
17264 (LABEL_ALIGN): Use align_labels_log.
17265 (LOOP_ALIGN): Use align_loops_align.
17266 * config/s390/s390.c (s390_asm_output_function_label): Use new
17267 macros.
17268 * config/sh/sh.c (sh_override_options_after_change):
17269 Change type of constants.
17270 * config/spu/spu.c (spu_sched_init): Likewise.
17271 * config/sparc/sparc.c (sparc_option_override): Set default
17272 values for options.
17273 * config/visium/visium.c (visium_option_override): Likewise.
17274 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
17275 emit p2align format with last argument if it's not needed.
17276 * doc/invoke.texi: Document extended format of -falign-*.
17277 * final.c: Use align_labels alignment.
17278 * flags.h (struct target_flag_state): Change type to use
17279 align_flags.
17280 (struct align_flags_tuple): New.
17281 (struct align_flags): Likewise.
17282 (align_loops_log): Redefine macro to use new types.
17283 (align_loops_max_skip): Redefine macro to use new types.
17284 (align_jumps_log): Redefine macro to use new types.
17285 (align_jumps_max_skip): Redefine macro to use new types.
17286 (align_labels_log): Redefine macro to use new types.
17287 (align_labels_max_skip): Redefine macro to use new types.
17288 (align_functions_log): Redefine macro to use new types.
17289 (align_loops): Redefine macro to use new types.
17290 (align_jumps): Redefine macro to use new types.
17291 (align_labels): Redefine macro to use new types.
17292 (align_functions): Redefine macro to use new types.
17293 (align_functions_max_skip): Redefine macro to use new types.
17294 (align_loops_value): New macro.
17295 (align_jumps_value): New macro.
17296 (align_labels_value): New macro.
17297 (align_functions_value): New macro.
17298 * function.c (invoke_set_current_function_hook): Propagate
17299 alignment values from flags to global variables default in
17300 topleev.h.
17301 * ipa-icf.c (sem_function::equals_wpa): Use
17302 cl_optimization_option_eq instead of memcmp.
17303 * lto-streamer.h (cl_optimization_stream_out): Support streaming
17304 of string types.
17305 (cl_optimization_stream_in): Likewise.
17306 * optc-save-gen.awk: Support strings in cl_optimization.
17307 * opth-gen.awk: Likewise.
17308 * opts.c (finish_options): Remove error checking of invalid
17309 value ranges.
17310 (MAX_CODE_ALIGN): Remove.
17311 (MAX_CODE_ALIGN_VALUE): Likewise.
17312 (parse_and_check_align_values): New function.
17313 (check_alignment_argument): Likewise.
17314 (common_handle_option): Use check_alignment_argument.
17315 * opts.h (parse_and_check_align_values): Declare.
17316 * toplev.c (init_alignments): Remove.
17317 (read_log_maxskip): New.
17318 (parse_N_M): Likewise.
17319 (parse_alignment_opts): Likewise.
17320 (backend_init_target): Remove usage of init_alignments.
17321 * toplev.h (parse_alignment_opts): Declare.
17322 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
17323 argument.
17324 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
17325 * tree.c (cl_option_hasher::equal): New.
17326 * varasm.c: Use new global macros.
17327
17328 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17329
17330 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
17331 Use a simpler align directive also if MAXSKIP = ALIGN-1.
17332 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17333 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17334 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17335 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17336 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
17337 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
17338 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
17339 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17340 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17341 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17342 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17343
17344 2018-07-04 Martin Liska <mliska@suse.cz>
17345 Jonathan Wakely <jwakely@redhat.com>
17346
17347 * coverage.c: Use correct type.
17348 * doc/invoke.texi: Language correction.
17349
17350 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
17351
17352 PR target/85620
17353 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
17354 ENDBRANCH for non-tail call which may return via indirect branch.
17355 * doc/extend.texi: Document indirect_return attribute.
17356
17357 2018-07-03 Martin Sebor <msebor@redhat.com>
17358
17359 PR tree-optimization/86274
17360 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
17361 precondition.
17362 (format_floating): Correct handling of infinities and NaNs.
17363
17364 2018-07-03 Martin Sebor <msebor@redhat.com>
17365
17366 * print-tree.c (print_real_cst): New function.
17367 (print_node_brief): Call it.
17368 (print_node): Ditto.
17369
17370 2018-07-03 Jeff Law <law@redhat.com>
17371
17372 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
17373 into a single pattern.
17374
17375 * config/h8300/h8300.md (ors code_iterator): New.
17376 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
17377 a single pattern and single splitter.
17378 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
17379 (iorqi3_1, xorqi3_1): Likewise.
17380 (iorqi3, xorqi3 expanders): Similarly.
17381
17382 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
17383 (movmd_internal) into a single pattern using the P mode iterator.
17384 (movmd splitters): Similarly.
17385 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
17386 (movsd splitters): Similarly.
17387
17388 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
17389 ADDB, ADDW and ADDL into a single ADD attribute which selects the
17390 right table based on the size of the operand.
17391 * config/h8300/h8300.md (length_table): Corresponding changes. All
17392 references to "addb", "addw" and "addl" changed to "add".
17393 (btst patterns): Merge two variants into a single pattern.
17394 (tstqi, tsthi): Likewise.
17395 (addhi3_incdec, addsi3_incdec): Likewise.
17396 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
17397 (mulhi3, mulsi3): Likewise.
17398 (udivhi3, udivsi3): Likewise.
17399 (divhi3, divsi3): Likewise.
17400 (andorqi3, andorhi3, andorsi3): Likewise.
17401
17402 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
17403
17404 PR target/85694
17405 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
17406 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
17407
17408 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17409
17410 PR tree-optimization/85694
17411 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
17412 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
17413 UNSPEC_URHADD.
17414 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
17415 (<u>avg<mode>3_ceil): New patterns.
17416
17417 2018-07-03 David Malcolm <dmalcolm@redhat.com>
17418
17419 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
17420 scan-tree-dump directive.
17421 * gcc.dg/vect/slp-perm-2.c: Likewise.
17422 * gcc.dg/vect/slp-perm-3.c: Likewise.
17423 * gcc.dg/vect/slp-perm-5.c: Likewise.
17424 * gcc.dg/vect/slp-perm-6.c: Likewise.
17425 * gcc.dg/vect/slp-perm-7.c: Likewise.
17426 * gcc.dg/vect/slp-perm-8.c: Likewise.
17427
17428 2018-07-03 Marek Polacek <polacek@redhat.com>
17429
17430 PR middle-end/86202
17431 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
17432
17433 2018-07-03 Richard Biener <rguenther@suse.de>
17434
17435 PR ipa/86389
17436 * tree-ssa-structalias.c (find_func_clobbers): Properly
17437 handle indirect calls.
17438
17439 2018-07-03 Jeff Law <law@redhat.com>
17440
17441 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
17442 (shifts): New code iterator.
17443 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
17444 expander. Fix HImode handling on H8/SX.
17445 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
17446 (subqi3, subhi3, subsi3 expanders): Likewise.
17447 (andqi3, andhi3, andsi3 expanders): Likewise.
17448 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
17449 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
17450 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
17451 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
17452 (zero_extendqihi2, zero_extendqisi2): Likewise.
17453 (extendqihi2, extendqisi2): Likewise.
17454 (rotlqi3, rotlhi3, rotlsi3): Likewise.
17455 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
17456 (rotlqi3_1, rotlhi3_1): Likewise.
17457 (logicalhi3_sn, logicalsi3_sn): Likewise.
17458 (logicalhi3, logicalsi3): Likewise.
17459
17460 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17461
17462 * tree-vect-patterns.c (vect_recog_rotate_pattern)
17463 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17464 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
17465 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
17466 type to append_pattern_def_seq instead of creating a stmt_vec_info
17467 directly.
17468 (build_mask_conversion): Likewise. Remove vinfo argument.
17469 (vect_add_conversion_to_patterm): Likewise, renaming to...
17470 (vect_add_conversion_to_pattern): ...this.
17471 (vect_recog_mask_conversion_pattern): Update call to
17472 build_mask_conversion. Pass the vector type to
17473 append_pattern_def_seq here too.
17474 (vect_recog_gather_scatter_pattern): Update call to
17475 vect_add_conversion_to_pattern.
17476
17477 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17478
17479 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
17480 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17481 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
17482 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
17483 STMT_VINFO_PATTERN_DEF_SEQ to null here.
17484 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
17485 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
17486 append_pattern_def_seq instead of new_pattern_def_seq.
17487 (vect_recog_divmod_pattern): Do both of the above.
17488 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
17489 is null.
17490
17491 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17492
17493 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
17494 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
17495 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
17496 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
17497 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
17498 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17499 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
17500 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17501 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17502 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
17503 parameter with a single stmt_vec_info.
17504 (vect_recog_func_ptr): Likewise.
17505 (vect_recog_gather_scatter_pattern): Likewise, folding in...
17506 (vect_try_gather_scatter_pattern): ...this.
17507 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
17508 the stmt_vec_info of the statement to be matched. Don't clear
17509 STMT_VINFO_RELATED_STMT.
17510 (vect_pattern_recog): Update call accordingly.
17511
17512 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17513
17514 PR tree-optimization/85694
17515 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
17516 (uavgM3_ceil): Document new optabs.
17517 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
17518 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
17519 functions.
17520 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
17521 (savg_ceil_optab): New optabs.
17522 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
17523 (vect_vect_recog_func_ptrs): Add it.
17524 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
17525 constant directly from the associated lhs.
17526
17527 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17528
17529 * tree-vect-patterns.c (vect_split_statement): New function.
17530 (vect_convert_input): Use it to try to split an existing cast.
17531
17532 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17533
17534 * poly-int.h (print_hex): New function.
17535 * dumpfile.h (dump_dec, dump_hex): Declare.
17536 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
17537 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
17538 min_input_precision, operation_precision and operation_sign.
17539 * tree-vect-patterns.c (vect_get_range_info): New function.
17540 (vect_same_loop_or_bb_p, vect_single_imm_use)
17541 (vect_operation_fits_smaller_type): Delete.
17542 (vect_look_through_possible_promotion): Add an optional
17543 single_use_p parameter.
17544 (vect_recog_over_widening_pattern): Rewrite to use new
17545 stmt_vec_info infomration. Handle one operation at a time.
17546 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
17547 (vect_truncatable_operation_p, vect_set_operation_type)
17548 (vect_set_min_input_precision): New functions.
17549 (vect_determine_min_output_precision_1): Likewise.
17550 (vect_determine_min_output_precision): Likewise.
17551 (vect_determine_precisions_from_range): Likewise.
17552 (vect_determine_precisions_from_users): Likewise.
17553 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
17554 (vect_vect_recog_func_ptrs): Put over_widening first.
17555 Add cast_forwprop.
17556 (vect_pattern_recog): Call vect_determine_precisions.
17557
17558 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17559
17560 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
17561 statements that have been replaced by further pattern statements.
17562 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
17563
17564 2018-07-03 Richard Biener <rguenther@suse.de>
17565
17566 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
17567 always set *dt. Dump vectype in vectype overload.
17568 * dumpfile.h (dump_gimple_expr): New function.
17569 (dump_gimple_expr_loc): Likewise.
17570 * dumpfile.c (dump_gimple_expr): New function.
17571 (dump_gimple_expr_loc): Likewise.
17572
17573 2018-07-02 Jeff Law <law@redhat.com>
17574
17575 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
17576 the H8/300, H8/300H and H8/S variants into a single pattern.
17577 (movhi_h8300, movqi_h8300hs): Similarly.
17578 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
17579 (QHI mode iterator): New.
17580
17581 * config/h8300/h8300.md: Remove trailing whitespace.
17582
17583 2018-07-02 Jim Wilson <jimw@sifive.com>
17584
17585 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
17586 instead of emit_insn for interrupt returns.
17587 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
17588 (riscv_sret, riscv_uret): Likewise.
17589
17590 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17591
17592 * pretty-print.c (selftest::test_pp_format): Move save and restore
17593 of quotes to class auto_fix_quotes, and add an instance.
17594 * selftest.c: Include "intl.h".
17595 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
17596 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
17597 * selftest.h (selftest::auto_fix_quotes): New class.
17598
17599 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
17600
17601 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
17602 (aarch64_sve_prepare_conditional_op): Remove.
17603 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
17604 Allow aarch64_simd_reg_or_zero as select operand; remove
17605 the aarch64_sve_prepare_conditional_op call.
17606 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
17607 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17608 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
17609 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
17610 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
17611 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
17612 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
17613 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
17614 and a splitters to match all of the *_any patterns.
17615 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
17616
17617 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
17618 (SVE_COND_FP_BINARY_REV): Remove.
17619 (sve_int_op_rev, sve_fp_op_rev): New.
17620 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
17621 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
17622 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
17623 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
17624 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
17625 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
17626 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
17627 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
17628 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
17629
17630 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
17631 Remove match_dup 1 from the inner unspec.
17632 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17633
17634 * config/aarch64/aarch64.md (movprfx): New attr.
17635 (length): Default movprfx to 8.
17636 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
17637 (*madd<SVE_I>, *msub<SVE_I): Likewise.
17638 (*<su>mul<SVE_I>3_highpart): Likewise.
17639 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
17640 (*v<ASHIFT><SVE_I>3): Likewise.
17641 (*<su><MAXMIN><SVE_I>3): Likewise.
17642 (*<su><MAXMIN><SVE_F>3): Likewise.
17643 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
17644 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
17645 (*div<SVE_F>4): Likewise.
17646
17647 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
17648
17649 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
17650 in dump string.
17651
17652 2018-07-02 Richard Biener <rguenther@suse.de>
17653
17654 PR tree-optimization/86363
17655 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
17656 memset argument refers to a non-variable address.
17657
17658 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17659
17660 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
17661 {PLUS,MINUS}_EXPR code to...
17662 (adjust_symbolic_bound): ...here,
17663 (combine_bound): ...here,
17664 (set_value_range_with_overflow): ...and here.
17665
17666 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17667
17668 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
17669 code...
17670 (extract_range_from_abs_expr): ...here.
17671
17672 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
17673
17674 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
17675 -fno-omit-frame-pointer when not optimizing.
17676
17677 2018-07-02 Martin Liska <mliska@suse.cz>
17678
17679 PR ipa/86279
17680 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
17681 (propagate_nothrow): Likewise.
17682
17683 2018-07-02 Martin Liska <mliska@suse.cz>
17684
17685 PR ipa/86323
17686 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
17687
17688 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17689
17690 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
17691 function in r262149, changing "loc" param from source_location to
17692 const dump_location_t &.
17693 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
17694 declaration, as above.
17695
17696 2018-07-01 Paul Koning <ni1d@arrl.net>
17697
17698 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
17699 -munit-asm, -mgnu-asm, -mdec-asm.
17700 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
17701 (pdp11_output_labelref): New.
17702 (pdp11_output_def): New.
17703 (pdp11_output_addr_vec_elt): New.
17704 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
17705 %# and %@ format codes.
17706 (pdp11_option_override): New.
17707 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
17708 (pdp11_output_ident): New.
17709 (pdp11_asm_named_section): New.
17710 (pdp11_asm_init_sections): New.
17711 (pdp11_file_start): New.
17712 (pdp11_file_end): New.
17713 (output_ascii): Use .ascii/.asciz for -mdec-asm.
17714 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
17715 %o, like %c but octal.
17716 (pdp11_option_override): New.
17717 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
17718 -mdec-asm.
17719 (DATA_SECTION_ASM_OP): Ditto.
17720 (READONLY_DATA_SECTION_ASM_OP): New.
17721 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
17722 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
17723 (ASM_OUTPUT_LABELREF): Ditto.
17724 (ASM_OUTPUT_DEF): Ditto.
17725 (ASM_OUTPUT_EXTERNAL): New.
17726 (ASM_OUTPUT_SOURCE_FILENAME): New.
17727 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
17728 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
17729 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
17730 %# and %@ format codes.
17731 * config/pdp11/pdp11.opt (mgnu-asm): New.
17732 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
17733 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
17734 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
17735
17736 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
17737
17738 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
17739 dereferencing path[] beyond its length.
17740 (debug_path): New.
17741 (debug_all_paths): New.
17742 (rewire_first_differing_edge): New.
17743 (adjust_paths_after_duplication): New.
17744 (duplicate_thread_path): Call adjust_paths_after_duplication.
17745 Add new argument.
17746 (thread_through_all_blocks): Add new argument to
17747 duplicate_thread_path.
17748
17749 2018-06-30 Jim Wilson <jimw@sifive.com>
17750
17751 * config/riscv/predicates.md (p2m1_shift_operand): New.
17752 (high_mask_shift_operand): New.
17753 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
17754 pattern using p2m1_shift_operand.
17755 (lshsi3_zero_extend_3+2): New combiner pattern using
17756 high_mask_shift_operand.
17757
17758 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17759
17760 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
17761 split out from...
17762 (vect_recog_rotate_pattern): ...here.
17763 (vect_convert_input): Try to insert casts of invariants in the
17764 preheader.
17765 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
17766 preheader to be empty.
17767
17768 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17769
17770 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
17771 vector type. If given, install it in the new statement's
17772 STMT_VINFO_VECTYPE.
17773 (vect_element_precision): New function.
17774 (vect_unpromoted_value): New struct.
17775 (vect_unpromoted_value::vect_unpromoted_value): New function.
17776 (vect_unpromoted_value::set_op): Likewise.
17777 (vect_look_through_possible_promotion): Likewise.
17778 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
17779 (vect_widened_op_tree, vect_convert_input): Likewise.
17780 (vect_convert_inputs, vect_convert_output): Likewise.
17781 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
17782 to handle the optional cast of the multiplication result and
17783 vect_widened_op_tree to detect the widened multiplication itself.
17784 Do not require the input and output of promotion casts to have
17785 the same sign, but base the signedness of the operation on the
17786 input rather than the result. If the pattern includes two
17787 promotions, check that those promotions have the same sign.
17788 Do not restrict the MULT_EXPR handling to a double-width result;
17789 handle quadruple-width results and wider. Use vect_convert_inputs
17790 to convert the inputs to the common type.
17791 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
17792 to handle the optional cast of the ABS result. Also allow a sign
17793 change or a sign extension between the ABS and MINUS.
17794 Use vect_widened_op_tree to detect the widened subtraction and use
17795 vect_convert_inputs to convert the inputs to the common type.
17796 (vect_handle_widen_op_by_const): Delete.
17797 (vect_recog_widen_op_pattern): New function.
17798 (vect_recog_widen_mult_pattern): Use it.
17799 (vect_recog_widen_shift_pattern): Likewise.
17800 (vect_recog_widen_sum_pattern): Use
17801 vect_look_through_possible_promotion to handle the promoted
17802 PLUS_EXPR operand.
17803
17804 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17805
17806 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
17807 the containing gimple_seq *.
17808 * gimple-iterator.h (gsi_for_stmt): Declare it.
17809 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
17810 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
17811 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17812 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17813 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
17814 checks.
17815 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
17816 split out from...
17817 (vect_mark_pattern_stmts): ...here. Handle cases in which the
17818 statement being replaced is part of an existing pattern
17819 definition sequence, inserting the new pattern statements before
17820 the original one.
17821 (vect_pattern_recog_1): Don't return a bool. If the statement
17822 is already part of a pattern, instead apply pattern matching
17823 to the pattern definition statements. Don't clear the
17824 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
17825 (vect_pattern_recog): Don't break after the first match;
17826 continue processing the pattern definition statements instead.
17827 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
17828
17829 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17830
17831 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17832 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17833 (vect_recog_widen_sum_pattern): Use it.
17834
17835 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17836
17837 * tree-vect-loop.c (vectorizable_reduction): Assert that the
17838 phi is not a pattern statement and has not been replaced by
17839 a pattern statement.
17840 * tree-vect-patterns.c (type_conversion_p): Don't check
17841 STMT_VINFO_IN_PATTERN_P.
17842 (vect_recog_vector_vector_shift_pattern): Likewise.
17843 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
17844 the pattern statement rather than the original statement; check
17845 directly for a WIDEN_MULT_EXPR here.
17846 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
17847 vect_is_simple_use to return the pattern statement rather
17848 than the original statement; use is_pattern_stmt_p to check
17849 for such a pattern statement.
17850 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
17851 to return the pattern statement rather than the original statement;
17852 don't do the same transformation here.
17853 (vect_is_simple_use): If the defining statement has been replaced
17854 by a pattern statement, return the pattern statement instead.
17855 Remove the corresponding (local) transformation from the vectype
17856 overload.
17857
17858 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17859
17860 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
17861 end and default to null.
17862 * tree-vect-loop.c (vect_create_epilog_for_reduction)
17863 (vectorizable_reduction): Update calls accordingly, dropping the
17864 gimple ** argument if the passed-back statement isn't needed.
17865 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
17866 (vect_recog_rotate_pattern): Likewise.
17867 (vect_recog_mask_conversion_pattern): Likewise.
17868 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
17869 (vect_mask_constant_operand_p): Likewise.
17870 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
17871 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
17872 (get_group_load_store_type, get_load_store_type): Likewise.
17873 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
17874 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
17875 (vectorizable_conversion, vectorizable_assignment): Likewise.
17876 (vectorizable_shift, vectorizable_operation): Likewise.
17877 (vectorizable_store, vect_is_simple_cond): Likewise.
17878 (vectorizable_condition, vectorizable_comparison): Likewise.
17879 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
17880 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
17881 and move it to the end. Cope with null def_stmt_outs.
17882
17883 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
17884
17885 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
17886
17887 2018-06-29 Jeff Law <law@redhat.com>
17888
17889 * config/v850/v850.c (v850_legitimate_address_p): Handle large
17890 displacements for TARGET_V850E2V3 and newer.
17891 (TARGET_LRA_P): Remove. Defaults to LRA now.
17892 * config/v850/v850.md (sign23byte_load): Remove.
17893 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
17894 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
17895
17896 2018-06-29 Martin Liska <mliska@suse.cz>
17897
17898 PR lto/85759
17899 * coverage.c (coverage_init): Mangle full path name.
17900 * doc/invoke.texi: Document the change.
17901 * gcov-io.c (mangle_path): New.
17902 * gcov-io.h (mangle_path): Likewise.
17903 * gcov.c (mangle_name): Use mangle_path for path mangling.
17904
17905 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17906
17907 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
17908 if starting source register is not even.
17909
17910 2018-06-29 Martin Liska <mliska@suse.cz>
17911
17912 PR tree-optimization/86263
17913 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
17914 Make edge redirection.
17915
17916 2018-06-29 David Malcolm <dmalcolm@redhat.com>
17917
17918 * dumpfile.c (dump_loc): Add indentation based on scope depth.
17919 (dump_scope_depth): New variable.
17920 (get_dump_scope_depth): New function.
17921 (dump_begin_scope): New function.
17922 (dump_end_scope): New function.
17923 * dumpfile.h (get_dump_scope_depth): New declaration.
17924 (dump_begin_scope): New declaration.
17925 (dump_end_scope): New declaration.
17926 (class auto_dump_scope): New class.
17927 (AUTO_DUMP_SCOPE): New macro.
17928 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
17929 AUTO_DUMP_SCOPE.
17930
17931 2018-06-29 Richard Biener <rguenther@suse.de>
17932
17933 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
17934 compute_all_dependences succeeds.
17935 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
17936 exceed --param loop-max-datarefs-for-datadeps.
17937
17938 2018-06-29 Jakub Jelinek <jakub@redhat.com>
17939
17940 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
17941
17942 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
17943
17944 PR target/86348
17945 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
17946 alternative 0 in preferred_for_speed attribute.
17947
17948 2018-06-28 Paul Koning <ni1d@arrl.net>
17949
17950 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
17951 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
17952 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
17953 * config/pdp11/pdp11.md: Correct "length" attribute calculation
17954 for shift insn patterns.
17955
17956 2018-06-28 David Malcolm <dmalcolm@redhat.com>
17957
17958 * cgraph.c (cgraph_node::get_body): Replace assignments to
17959 "dump_file" with calls to set_dump_file.
17960 * dumpfile.c (alt_dump_file): Make static, and group with...
17961 (alt_flags): ...this definition.
17962 (dumps_are_enabled): New variable.
17963 (refresh_dumps_are_enabled): New function.
17964 (set_dump_file): New function.
17965 (set_alt_dump_file): New function.
17966 (gcc::dump_manager::dump_start): Replace assignments to
17967 "dump_file" and "alt_dump_file" with calls to set_dump_file and
17968 set_alt_dump_file.
17969 (gcc::dump_manager::dump_finish): Likewise.
17970 * dumpfile.h (alt_dump_file): Delete decl.
17971 (dumps_are_enabled): New variable decl.
17972 (set_dump_file): New function decl.
17973 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
17974 global.
17975 * tree-nested.c (lower_nested_functions): Replace assignments to
17976 "dump_file" with calls to set_dump_file.
17977
17978 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
17979
17980 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
17981 goto_locus of each outgoing edge of each basic block.
17982
17983 2018-06-28 Richard Biener <rguenther@suse.de>
17984
17985 * dwarf2out.c (decl_scope_table): Remove.
17986 (push_decl_scope): Likewise.
17987 (pop_decl_scope): Likewise.
17988 (gen_type_die_for_member): Do not call push/pop_decl_scope.
17989 (gen_struct_or_union_type_die): Likewise.
17990 (gen_tagged_type_die): Likewise.
17991 (dwarf2out_init): Do not initialize decl_scope_table.
17992 (dwarf2out_c_finalize): Do not free it.
17993
17994 2018-06-28 Richard Biener <rguenther@suse.de>
17995
17996 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
17997 deciding whether to not re-use a DIE.
17998
17999 2018-06-28 Richard Biener <rguenther@suse.de>
18000
18001 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
18002 DW_AT_abstract_origin attribute.
18003
18004 2018-06-28 Martin Liska <mliska@suse.cz>
18005
18006 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
18007 Use newly introduced constants.
18008 * tree-switch-conversion.h (struct jump_table_cluster):
18009 Define max_ratio_for_size and max_ratio_for_speed.
18010
18011 2018-06-28 Martin Liska <mliska@suse.cz>
18012
18013 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18014 Add new checking assert to catch invalid state.
18015 (jump_table_cluster::can_be_handled): Handle single case
18016 clusters.
18017 (jump_table_cluster::is_beneficial): Bail out for such case.
18018 (bit_test_cluster::find_bit_tests):
18019 Add new checking assert to catch invalid state.
18020 (bit_test_cluster::can_be_handled): Handle single case
18021 clusters.
18022 (bit_test_cluster::is_beneficial): Bail out for such case.
18023 (switch_decision_tree::analyze_switch_statement):
18024 Fix comment.
18025
18026 2018-06-28 Martin Liska <mliska@suse.cz>
18027
18028 * common.opt: Introduce -completion option.
18029 * gcc.c (driver_handle_option): Handle it.
18030 (driver::main): Print completions if completion
18031 is set.
18032 * opt-suggestions.c (option_proposer::get_completions):
18033 New function.
18034 (option_proposer::suggest_completion): Likewise.
18035 (option_proposer::find_param_completions): Likewise.
18036 (verify_autocompletions): Likewise.
18037 (test_completion_valid_options): Likewise.
18038 (test_completion_valid_params): Likewise.
18039 (in_completion_p): Likewise.
18040 (empty_completion_p): Likewise.
18041 (test_completion_partial_match): Likewise.
18042 (test_completion_garbage): Likewise.
18043 (opt_proposer_c_tests): Likewise.
18044 * opt-suggestions.h: Declare new functions.
18045 * opts.c (common_handle_option): Handle OPT__completion_.
18046 * selftest-run-tests.c (selftest::run_tests): Add
18047 opt_proposer_c_tests.
18048 * selftest.c (assert_str_startswith): New.
18049 * selftest.h (assert_str_startswith): Likewise.
18050 (opt_proposer_c_tests): New.
18051 (ASSERT_STR_STARTSWITH): Likewise.
18052
18053 2018-06-28 Martin Liska <mliska@suse.cz>
18054
18055 * Makefile.in: Add opt-suggestions.o.
18056 * gcc-main.c: Include opt-suggestions.h.
18057 * gcc.c (driver::driver): Likewise.
18058 (driver::~driver): Remove m_option_suggestions.
18059 (driver::build_option_suggestions): Moved to option_proposer.
18060 (driver::suggest_option): Likewise.
18061 (driver::handle_unrecognized_options): Use option_proposer.
18062 * gcc.h (class driver): Add new memver m_option_proposer.
18063 * opt-suggestions.c: New file.
18064 * opt-suggestions.h: New file.
18065
18066 2018-06-28 Martin Liska <mliska@suse.cz>
18067
18068 * vec.h (class auto_string_vec): New (moved from auto_argvec).
18069 (auto_string_vec::~auto_string_vec): Likewise.
18070
18071 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
18072
18073 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
18074 prevent_decl_creation_for_types fields up and add reset_location field.
18075 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
18076 statement if id->reset_location is true.
18077 (copy_edges_for_bb): Do not set goto_locus on the new edges if
18078 id->reset_location is true.
18079 (copy_phis_for_bb): Force input_location on the arguments if
18080 id->reset_location is true.
18081 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
18082 is set on the function to be inlined.
18083
18084 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
18085
18086 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
18087
18088 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
18089
18090 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
18091 registers for Pmode.
18092 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
18093 hard registers for the clobbered pseudo.
18094
18095 2018-06-27 Paul Koning <ni1d@arrl.net>
18096
18097 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
18098 mutually exclusive options.
18099 * config/pdp11/constraints.md (h): New constraint.
18100 (O): Update definition to match shift code generation.
18101 (D): New constraint.
18102 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
18103 (CCFP): Remove.
18104 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
18105 function.
18106 (output_jump): Change arguments.
18107 (pdp11_fixed_cc_regs): New function.
18108 (pdp11_cc_mode): Ditto.
18109 (pdp11_expand_shift): Ditto.
18110 (pdp11_assemble_shift): Ditto.
18111 (pdp11_small_shift): Ditto.
18112 (pdp11_branch_cost): Remove.
18113 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
18114 from output.
18115 (pdp11_register_move_cost): Update for CC registers.
18116 (pdp11_rtx_costs): Add case for LSHIFTRT.
18117 (pdp11_output_jump): Add CCNZ mode conditional branches.
18118 (notice_update_cc_on_set): Remove.
18119 (pdp11_cc_mode): New function.
18120 (simple_memory_operand): Correct pre/post decrement case.
18121 (no_side_effect_operand): New function.
18122 (pdp11_regno_reg_class): Add CC_REGS class.
18123 (pdp11_fixed_cc_regs): New function.
18124 (pdp11_small_shift): New function.
18125 (pdp11_expand_shift): New function to expand shift insns.
18126 (pdp11_assemble_shift): New function to output shifts.
18127 (pdp11_branch_cost): Remove.
18128 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
18129 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
18130 (WCHAR_TYPE): Ditto.
18131 (PTRDIFF_TYPE): Ditto.
18132 (ADJUST_INSN_LENGTH): New macro.
18133 (FIXED_REGISTERS): Add CC registers.
18134 (CALL_USED_REGISTERS): Ditto.
18135 (reg_class): Ditto.
18136 (REG_CLASS_NAMES): Ditto.
18137 (REG_CLASS_CONTENTS): Ditto.
18138 (SELECT_CC_MODE): Use new function.
18139 (TARGET_FLAGS_REGNUM): New macro.
18140 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
18141 (cc0_reg_rtx): Remove.
18142 (CC_STATUS_MDEP): Remove.
18143 (CC_STATUS_MDEFP_INIT): Remove.
18144 (CC_IN_FPU): Remove.
18145 (NOTICE_UPDATE_CC): Remove.
18146 (REGISTER_NAMES): Add CC registers.
18147 (BRANCH_COST): Change to constant 1.
18148 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
18149 handling.
18150 * config/pdp11/pdp11.opt (mbcopy): Remove.
18151 (mbcopy-builtin): Remove.
18152 (mbranch-cheap): Remove.
18153 (mbranch-expensive): Remove.
18154 * config/pdp11/predicates.md (expand_shift_operand): Update to
18155 match shift code generation.
18156 (ccnz_operator): New predicate.
18157 * doc/invoke.texi (PDP-11 Options): Remove deleted options
18158 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
18159 Remove non-existent option -mabshi, -mno-abshi. Document mutually
18160 exclusive options.
18161 * doc/md.texi (PDP-11): Document new D and h constraints. Update
18162 description of O constraint.
18163
18164 2018-06-27 Jeff Law <law@redhat.com>
18165 Austin Law <austinklaw@gmail.com>
18166
18167 * config/v850/v850.md (addsi3_set_flags): New pattern.
18168 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
18169 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
18170 (zero_extendhisi2_v850_set_flags): Likewise.
18171 (zero_extendqisi2_v850_set_flags): Likewise.
18172 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
18173 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
18174 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
18175
18176 * config/v850/v850-protos.h (notice_update_cc): Remove.
18177 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
18178 (v850_print_operand): Handle 'D' and "d".
18179 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
18180 Add handling of arithmetic/logical operations compared against zero.
18181 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
18182 Do not look at v850_compare_op, instead get mode from last argument.
18183 (v850_gen_compare): Remove
18184 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
18185 after reload for prologue insns.
18186 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
18187 patterns.
18188 (construct_save_jarl): Likewise.
18189 (TARGET_FLAGS_REGNUM): Define.
18190 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
18191 (NOTICE_UPDATE_CC): Remove.
18192 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
18193 than cc0. Conditionalize on reload_completed.
18194 (cmpsi_insn, setfcc_insn): Likewise.
18195 (tst1 splitter): Turn into define_and_split which sets the flags
18196 after reload.
18197 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
18198 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
18199 (cstoresf4, cstoredf4): Clobber the flags.
18200 (cmpsi, cmpsf, cmpdf): Remove expanders.
18201 (setf_insn): Remove pattern.
18202 (addsi3): Turn into define_and_split which clobbers the flags after
18203 reload and a suitable pattern (addsi3_clobber_flags) for use after
18204 reload.
18205 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
18206 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
18207 (ashrsi3, ashrsi3_v850e2): Likewise.
18208 (bins): Clobber the flags.
18209 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
18210 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
18211 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
18212 (call_value_internal_short, call_value_internal_long): Likewise.
18213 (callt_save_interrupt, callt_return_interrupt): Likewise.
18214 (save_interrupt, return_interrupt): Likewise.
18215 (callt_save_all_interrupt, save_all_interrupt): Likewise.
18216 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
18217 (restore_all_interrupt, _restore_all_interrupt): Likewise.
18218 (All FP comparisons): Only allow after reload has completed.
18219 (trfsr): Likewise.
18220 (divh, divhu): Tweak output template.
18221 (branch_z_normal, branch_z_invert): Remove
18222 (branch_nz_normal, branch_nz_invert): Likewise.
18223 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
18224
18225 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
18226 * config/v850/v850.c (notice_update_cc): Remove.
18227 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
18228 (CC_NO_CARRY): Likewise.
18229 (NOTICE_UPDATE_CC): Define to nothing.
18230 * config/v850/v850.md: Remove block comment on cc0 handling
18231 Remove "cc" attribute from all patterns. Remove cc_status handling
18232 from all patterns. Minor formatting fixes.
18233
18234 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18235
18236 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
18237 (cortex-a76.cortex-a55): Likewise.
18238 * config/aarch64/aarch64-tune.md: Regenerate.
18239 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
18240 cortex-a76.cortex-a55.
18241
18242 2018-06-27 Jeff Law <law@redhat.com>
18243
18244 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
18245 (MULTILIB_DIRNAMES): Similarly.
18246
18247 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
18248
18249 * gimple.h (gimple_return_retbnd): Delete.
18250 (gimple_return_set_retbnd): Likewise.
18251 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
18252 gimple_return_set_retbnd.
18253 * gimple-pretty-print.c (dump_gimple_return): Remove call to
18254 gimple_return_retbnd and adjust.
18255 * tree-inline.h (struct copy_body_data): Remove retbnd field.
18256 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
18257 Explicitly return NULL in a couple more cases. Move assertion
18258 on debug statements and remove unreachable code.
18259 (reset_debug_binding): Do not test id->retbnd.
18260 (expand_call_inline): Do not set it.
18261
18262 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
18263
18264 * configure.ac: Add --disable-gcov option.
18265 * configure: Regenerate.
18266 * Makefile.in: Honour @enable_gcov@.
18267 * doc/install.texi: Document --disable-gcov.
18268
18269 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18270
18271 * config/arm/arm-cpus.in (cortex-a76): New entry.
18272 (cortex-a76.cortex-a55): Likewise.
18273 * config/arm/arm-tables.opt: Regenerate.
18274 * config/arm/arm-tune.md: Likewise.
18275 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
18276 * doc/invoke.texi (ARM Options): Document cortex-a76 and
18277 cortex-a76.cortex-a55.
18278
18279 2018-06-27 Tamar Christina <tamar.christina@arm.com>
18280
18281 PR target/85769
18282 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
18283
18284 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
18285
18286 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
18287 comment.
18288 (EPILOGUE_USES): Likewise.
18289
18290 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
18291
18292 * tree-inline.c (remap_location): New function extracted from...
18293 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
18294 (copy_phis_for_bb): ...here. Call remap_location.
18295 (copy_cfg_body): Adjust call to copy_edges_for_bb.
18296
18297 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
18298
18299 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
18300 unaligned vsx for 16B memset.
18301
18302 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
18303
18304 PR target/86285
18305 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
18306 ieee128_float_type_node to long_double_type_node unless
18307 TARGET_LONG_DOUBLE_128 is set.
18308
18309 2018-06-26 David Malcolm <dmalcolm@redhat.com>
18310
18311 * cfgloop.c (get_loop_location): Convert return type from
18312 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
18313 by implicit construction from rtx_insn *, and using
18314 dump_user_location_t::from_function_decl for the fallback case.
18315 * cfgloop.h (get_loop_location): Convert return type from
18316 location_t to dump_user_location_t.
18317 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
18318 dump_printf_loc to pass in a dump_location_t rather than a
18319 location_t, via the gimple stmt.
18320 * coverage.c (get_coverage_counts): Update calls to
18321 dump_printf_loc to pass in dump_location_t rather than a
18322 location_t.
18323 * doc/optinfo.texi (Dump types): Convert example of
18324 dump_printf_loc from taking "locus" to taking "insn". Update
18325 description of the "_loc" calls to cover dump_location_t.
18326 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
18327 "selftest.h".
18328 (dump_user_location_t::dump_user_location_t): New constructors,
18329 from gimple *stmt and rtx_insn *.
18330 (dump_user_location_t::from_function_decl): New function.
18331 (dump_loc): Make static.
18332 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
18333 const dump_location_t &.
18334 (dump_generic_expr_loc): Delete.
18335 (dump_printf_loc): Convert param "loc" from location_t to
18336 const dump_location_t &.
18337 (selftest::test_impl_location): New function.
18338 (selftest::dumpfile_c_tests): New function.
18339 * dumpfile.h: Include "profile-count.h".
18340 (class dump_user_location_t): New class.
18341 (struct dump_impl_location_t): New struct.
18342 (class dump_location_t): New class.
18343 (dump_printf_loc): Convert 2nd param from source_location to
18344 const dump_location_t &.
18345 (dump_generic_expr_loc): Delete.
18346 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
18347 const dump_location_t &.
18348 * gimple-fold.c (fold_gimple_assign): Update call to
18349 dump_printf_loc to pass in a dump_location_t rather than a
18350 location_t, via the gimple stmt.
18351 (gimple_fold_call): Likewise.
18352 * gimple-loop-interchange.cc
18353 (loop_cand::analyze_iloop_reduction_var): Update for change to
18354 check_reduction_path.
18355 (tree_loop_interchange::interchange): Update for change to
18356 find_loop_location.
18357 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
18358 change in return-type of find_loop_location.
18359 (graphite_regenerate_ast_isl): Likewise.
18360 * graphite-optimize-isl.c (optimize_isl): Likewise.
18361 * graphite.c (graphite_transform_loops): Likewise.
18362 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
18363 pass in a dump_location_t rather than a location_t, via the
18364 gimple stmt.
18365 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18366 * ipa.c (walk_polymorphic_call_targets): Likewise.
18367 * loop-unroll.c (report_unroll): Convert "locus" param from
18368 location_t to dump_location_t.
18369 (decide_unrolling): Update for change to get_loop_location's
18370 return type.
18371 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
18372 location_t to dump_user_location_t.
18373 (grid_find_single_omp_among_assignments_1): Updates calls to
18374 dump_printf_loc to pass in a dump_location_t rather than a
18375 location_t, via the gimple stmt.
18376 (grid_parallel_clauses_gridifiable): Convert "tloc" from
18377 location_t to dump_location_t. Updates calls to dump_printf_loc
18378 to pass in a dump_location_t rather than a location_t, via the
18379 gimple stmt.
18380 (grid_inner_loop_gridifiable_p): Likewise.
18381 (grid_dist_follows_simple_pattern): Likewise.
18382 (grid_gfor_follows_tiling_pattern): Likewise.
18383 (grid_target_follows_gridifiable_pattern): Likewise.
18384 (grid_attempt_target_gridification): Convert initialization
18385 of local "grid" from memset to zero-initialization; FIXME: does
18386 this require C++11? Update call to dump_printf_loc to pass in a
18387 optinfo_location rather than a location_t, via the gimple stmt.
18388 * profile.c (read_profile_edge_counts): Updates call to
18389 dump_printf_loc to pass in a dump_location_t rather than a
18390 location_t
18391 (compute_branch_probabilities): Likewise.
18392 * selftest-run-tests.c (selftest::run_tests): Call
18393 dumpfile_c_tests.
18394 * selftest.h (dumpfile_c_tests): New decl.
18395 * tree-loop-distribution.c (pass_loop_distribution::execute):
18396 Update for change in return type of find_loop_location.
18397 * tree-parloops.c (parallelize_loops): Likewise.
18398 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
18399 "locus" from location_t to dump_user_location_t.
18400 (canonicalize_loop_induction_variables): Likewise.
18401 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
18402 for change in return type of find_loop_location.
18403 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
18404 to dump_printf_loc to pass in a dump_location_t rather than a
18405 location_t, via the stmt.
18406 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
18407 Likewise.
18408 * tree-vect-loop-manip.c (find_loop_location): Convert return
18409 type from source_location to dump_user_location_t.
18410 (vect_do_peeling): Update for above change.
18411 (vect_loop_versioning): Update for change in type of
18412 vect_location.
18413 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
18414 from location_t to dump_user_location_t.
18415 (vect_estimate_min_profitable_iters): Update for change in type
18416 of vect_location.
18417 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
18418 location_t to dump_location_t.
18419 (vect_slp_bb): Update for change in type of vect_location.
18420 * tree-vectorizer.c (vect_location): Convert from source_location
18421 to dump_user_location_t.
18422 (try_vectorize_loop_1): Update for change in vect_location's type.
18423 (vectorize_loops): Likewise.
18424 (increase_alignment): Likewise.
18425 * tree-vectorizer.h (vect_location): Convert from source_location
18426 to dump_user_location_t.
18427 (find_loop_location): Convert return type from source_location to
18428 dump_user_location_t.
18429 (check_reduction_path): Convert 1st param from location_t to
18430 dump_user_location_t.
18431 * value-prof.c (check_counter): Update call to dump_printf_loc to
18432 pass in a dump_user_location_t rather than a location_t; update
18433 call to error_at for change in type of "locus".
18434 (check_ic_target): Update call to dump_printf_loc to
18435 pass in a dump_user_location_t rather than a location_t, via the
18436 call_stmt.
18437
18438 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
18439
18440 * config/s390/s390.h (enum processor_flags): Do not use
18441 default tune parameter when -march was specified.
18442
18443 2018-06-26 Jakub Jelinek <jakub@redhat.com>
18444
18445 PR target/86314
18446 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
18447 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
18448 operands.
18449
18450 2018-06-26 Richard Biener <rguenther@suse.de>
18451
18452 PR tree-optimization/86287
18453 PR bootstrap/86316
18454 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
18455 (vect_analyze_loop): Initialize n_stmts.
18456
18457 2018-06-26 Richard Biener <rguenther@suse.de>
18458
18459 PR middle-end/86271
18460 * fold-const.c (fold_convertible_p): Pointer extension
18461 isn't valid.
18462
18463 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
18464
18465 PR debug/86064
18466 * dwarf2out.c (loc_list_has_views): Adjust comments.
18467 (dw_loc_list): Split single cross-partition range with
18468 nonzero locview.
18469
18470 2018-06-25 Jeff Law <law@redhat.com>
18471
18472 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
18473 on -mbig-switch by default.
18474
18475 * config/v850/predicates.md (const_float_1_operand): Fix match_code
18476 test.
18477 (const_float_0_operand): Remove unused predicate.
18478 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
18479 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
18480 (recipsf2): New expander. Original pattern now called
18481 (recipsf2_insn).
18482 (recipdf2, recipdf2_insn): Similarly.
18483 (rsqrtsf2, rsqrtsf2_insn): Similarly
18484 (rsqrtdf2, rsqrtdf2_insn): Similarly
18485
18486 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
18487
18488 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
18489 Simplify logic for FreeBSD (twice).
18490
18491 2018-06-25 Martin Sebor <msebor@redhat.com>
18492
18493 PR tree-optimization/86204
18494 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
18495 a strnlen result if it's less than the length of the string.
18496
18497 2018-06-25 Martin Sebor <msebor@redhat.com>
18498
18499 PR tree-optimization/85700
18500 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
18501 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
18502 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
18503
18504 2018-06-25 Martin Sebor <msebor@redhat.com>
18505
18506 * doc/extend.texi (Zero-length arrays): Update and clarify.
18507
18508 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
18509
18510 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
18511 added IEEE/IBM long double multilib support on PowerPC little
18512 endian Linux systems.
18513 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
18514 (MULTILIB_DEFAULTS): Likewise.
18515 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18516 Likewise.
18517 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
18518 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
18519 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
18520
18521 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
18522
18523 PR middle-end/86311
18524 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
18525 (REORDER_45): Likewise.
18526
18527 2018-06-25 Jeff Law <law@redhat.com>
18528
18529 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
18530 dividend to 32 bits. Adjust length.
18531 (udivmodhi4): Cleanup output template. Fix length.
18532
18533 2018-06-25 Carl Love <cel@us.ibm.com>
18534
18535 * config/rs6000/vsx.md: Change word selector to prefered location.
18536
18537 2018-06-25 Richard Biener <rguenther@suse.de>
18538
18539 PR tree-optimization/86304
18540 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
18541 epilogue-if-converted loops as well.
18542
18543 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
18544
18545 * lto-section-out.c (lto_begin_section): Do not print section
18546 name for noaddr and unnumbered dumps.
18547
18548 2018-06-25 Richard Biener <rguenther@suse.de>
18549
18550 * tree-vectorizer.h (struct vec_info_shared): New structure
18551 with parts split out from struct vec_info and loop_nest from
18552 struct _loop_vec_info.
18553 (struct vec_info): Adjust accordingly.
18554 (struct _loop_vec_info): Likewise.
18555 (LOOP_VINFO_LOOP_NEST): Adjust.
18556 (LOOP_VINFO_DATAREFS): Likewise.
18557 (LOOP_VINFO_DDRS): Likewise.
18558 (struct _bb_vec_info): Likewise.
18559 (BB_VINFO_DATAREFS): Likewise.
18560 (BB_VINFO_DDRS): Likewise.
18561 (struct _stmt_vec_info): Add dr_aux member.
18562 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
18563 (DR_MISALIGNMENT_UNINITIALIZED): New.
18564 (set_dr_misalignment): Adjust.
18565 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
18566 (vect_analyze_loop): Adjust prototype.
18567 (vect_analyze_loop_form): Likewise.
18568 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
18569 Compute dependences lazily.
18570 (vect_record_base_alignments): Use shared datarefs/ddrs.
18571 (vect_verify_datarefs_alignment): Likewise.
18572 (vect_analyze_data_refs_alignment): Likewise.
18573 (vect_analyze_data_ref_accesses): Likewise.
18574 (vect_analyze_data_refs): Likewise.
18575 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
18576 constructor parameter for shared part.
18577 (vect_analyze_loop_form): Pass in shared part and adjust.
18578 (vect_analyze_loop_2): Pass in storage for the number of
18579 stmts. Move loop nest finding to the caller. Compute
18580 datarefs lazily.
18581 (vect_analyze_loop): Pass in shared part.
18582 (vect_transform_loop): Verify shared datarefs are unchanged.
18583 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
18584 constructor parameter for shared part.
18585 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
18586 (vect_slp_bb): Verify shared datarefs are unchanged before
18587 transform.
18588 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
18589 change.
18590 (new_stmt_vec_info): Initialize DR_AUX misalignment to
18591 DR_MISALIGNMENT_UNINITIALIZED.
18592 * tree-vectorizer.c (vec_info::vec_info): Add constructor
18593 parameter for shared part.
18594 (vec_info::~vec_info): Adjust.
18595 (vec_info_shared::vec_info_shared): New.
18596 (vec_info_shared::~vec_info_shared): Likewise.
18597 (vec_info_shared::save_datarefs): Likewise.
18598 (vec_info_shared::check_datarefs): Likewise.
18599 (try_vectorize_loop_1): Construct shared part live for analyses
18600 of a single loop for multiple vector sizes.
18601 * tree-parloops.c (gather_scalar_reductions): Adjust.
18602
18603 2018-06-25 Richard Biener <rguenther@suse.de>
18604
18605 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
18606 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
18607 (vect_analyze_data_refs): Remove similar code from here and
18608 simplify accordingly.
18609
18610 2018-06-25 Richard Biener <rguenther@suse.de>
18611
18612 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
18613 for reverse storage order accesses rather than asserting
18614 they cannot happen here.
18615
18616 2018-06-25 Tom de Vries <tdevries@suse.de>
18617
18618 PR debug/86257
18619 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
18620 Use data16 instead of .byte for insn prefix.
18621
18622 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
18623
18624 PR C++/86082
18625 * parser.c (make_char_string_pack): Pass this literal chars
18626 through cpp_interpret_string.
18627 (cp_parser_userdef_numeric_literal): Check the result of
18628 make_char_string_pack.
18629
18630 2018-06-24 Maya Rashish <coypu@sdf.org>
18631
18632 * ginclude/stddef.h: Simplify conditions around avoiding
18633 re-definition of __size_t.
18634
18635 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18636
18637 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
18638 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
18639
18640 2018-06-22 Maya Rashish <coypu@sdf.org>
18641
18642 * doc/invoke.texi (mno-fancy-math-387): Update for changes
18643 made to OpenBSD and NetBSD through the years.
18644
18645 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18646
18647 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18648 behavior of vec_pack (vector double, vector double) to match
18649 behavior of vec_float2 (vector double, vector double).
18650
18651 2018-06-22 Olivier Hainque <hainque@adacore.com>
18652
18653 * gimplify.c (gimplify_function_tree): Prevent creation
18654 of a trampoline for the address of the current function
18655 passed to entry/exit instrumentation hooks.
18656
18657 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
18658
18659 PR target/86222
18660 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
18661 correctly.
18662
18663 2018-06-22 Martin Liska <mliska@suse.cz>
18664
18665 PR tree-optimization/86263
18666 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18667 Bail out if is_enabled is false.
18668 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
18669 New declaration.
18670 (jump_table_cluster::is_enabled): New function.
18671
18672 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18673
18674 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
18675 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
18676 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
18677 (lto_input_ts_binfo_tree_pointers): Likewise.
18678 * tree-streamer-out.c (streamer_write_tree_bitfields,
18679 write_ts_binfo_tree_pointers): Likewise.
18680 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
18681
18682 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18683
18684 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
18685
18686 2018-06-22 Martin Liska <mliska@suse.cz>
18687
18688 * symbol-summary.h (get): Make it pure and inline move
18689 functionality from ::get function.
18690 (get): Remove and inline into ::get and ::get_create.
18691 (get_create): Move code from ::get function.
18692
18693 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18694
18695 PR target/85994
18696 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
18697 -x assembler-with-cpp.
18698
18699 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18700
18701 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
18702 _FILE_OFFSET_BITS=64 for C++.
18703
18704 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
18705
18706 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
18707 conversion insn that shows up when pr85657-3.c is compiled using
18708 IEEE 128-bit long double.
18709 (neg<mode>2_internal): Use the correct mode to check whether the
18710 mode is IBM extended.
18711 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
18712 multiply and divide external functions from being created more
18713 than once.
18714
18715 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18716
18717 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
18718 functions.
18719 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
18720 the edge can be forwarded.
18721 (cfg_layout_merge_blocks): Likewise.
18722
18723 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18724
18725 * except.c (finish_eh_generation): Commit edge insertions only after
18726 the EH edges have been redirected from post-landing to landing pads.
18727
18728 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18729
18730 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
18731 create_tmp_var_for to create the FRAME decl.
18732 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
18733
18734 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18735
18736 * tree-inline.c (copy_edges_for_bb): Minor tweak.
18737 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
18738 debug statement when resetting its value.
18739 (expand_call_inline): Copy the locus of the call onto the assignment
18740 of the return value, if any. Use local variable in more cases.
18741
18742 2018-06-21 Martin Liska <mliska@suse.cz>
18743
18744 * ipa-pure-const.c (propagate_nothrow): Use
18745 funct_state_summaries->get.
18746 (dump_malloc_lattice): Likewise.
18747 (propagate_malloc): Likewise.
18748
18749 2018-06-21 Richard Biener <rguenther@suse.de>
18750
18751 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
18752 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
18753 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
18754 comment.
18755 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
18756 BLOCK_ABSTRACT_ORIGIN unconditionally.
18757
18758 2018-06-21 David Malcolm <dmalcolm@redhat.com>
18759
18760 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
18761 deleting it.
18762 * ipa-reference.c (ipa_reference_c_finalize): Delete
18763 ipa_ref_opt_sum_summaries and set it to NULL.
18764
18765 2018-06-21 Tom de Vries <tdevries@suse.de>
18766
18767 PR tree-optimization/85859
18768 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
18769 test with comment from bb_no_side_effects_p.
18770
18771 2018-06-21 Richard Biener <rguenther@suse.de>
18772
18773 PR tree-optimization/86232
18774 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
18775 max for constant niter.
18776
18777 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18778
18779 * config/aarch64/aarch64-simd.md
18780 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
18781
18782 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18783
18784 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
18785 Make opernads of the unspec commutative.
18786
18787 2018-06-21 Richard Biener <rguenther@suse.de>
18788
18789 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
18790 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
18791 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
18792 (vect_analyze_data_ref_dependence): Re-order checks to deal with
18793 NULL DR_STEP.
18794 (vect_record_base_alignments): Do not record base alignment
18795 for gathers or scatters.
18796 (vect_compute_data_ref_alignment): Drop return value that is always
18797 true. Bail out early for gathers or scatters.
18798 (vect_enhance_data_refs_alignment): Bail out early for gathers
18799 or scatters.
18800 (vect_find_same_alignment_drs): Likewise.
18801 (vect_analyze_data_refs_alignment): Remove dead code.
18802 (vect_slp_analyze_and_verify_node_alignment): Likewise.
18803 (vect_analyze_data_refs): For possible gathers or scatters do
18804 not create an alternate DR, just check their possible validity
18805 and mark them. Adjust DECL_NONALIASED handling to not rely
18806 on DR_BASE_ADDRESS.
18807 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
18808 update inits of gathers or scatters.
18809 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
18810 Also copy gather/scatter flag to pattern vinfo.
18811
18812 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
18813
18814 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18815 behavior of vec_packsu (vector unsigned long long, vector unsigned
18816 long long) to match behavior of vec_packs with same signature.
18817
18818 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
18819 Thomas Schwinge <thomas@codesourcery.com>
18820 Cesar Philippidis <cesar@codesourcery.com>
18821
18822 * gimplify.c (gimplify_scan_omp_clauses): Add support for
18823 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18824 (gimplify_adjust_omp_clauses): Likewise.
18825 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
18826 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
18827 (gimplify_omp_target_update): Update handling of acc update and
18828 enter/exit data.
18829 * omp-low.c (install_var_field): Remove unused parameter
18830 base_pointers_restrict.
18831 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
18832 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
18833 FINALIZE}
18834 (omp_target_base_pointers_restrict_p): Delete.
18835 (scan_omp_target): Update call to scan_sharing_clauses.
18836 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
18837 FINALIZE}.
18838 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
18839 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18840 (convert_local_omp_clauses): Likewise.
18841 * tree-pretty-print.c (dump_omp_clause): Likewise.
18842 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
18843 FINALIZE}.
18844 (omp_clause_code_name): Likewise.
18845
18846 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18847
18848 PR debug/86194
18849 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
18850 be narrowed.
18851
18852 PR tree-optimization/86231
18853 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
18854 anti-range don't overwrite *vr0min before using it to compute *vr0max.
18855
18856 2018-06-20 Tom de Vries <tdevries@suse.de>
18857
18858 PR tree-optimization/86097
18859 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
18860 iv type if signedness of iv type is not the same as that of *nit.
18861
18862 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18863
18864 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
18865 EDGE_EH edges, verify they are all EDGE_EH.
18866
18867 2018-06-20 Maya Rashish <coypu@sdf.org>
18868
18869 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
18870
18871 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18872
18873 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
18874 * config/aarch64/aarch64.c (xgene1_tunings): Add
18875 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
18876 (aarch64_mode_valid_for_sched_fusion_p):
18877 Allow 16-byte modes.
18878 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
18879 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
18880 128-bit modes.
18881 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
18882 New pattern.
18883 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
18884 * config/aarch64/iterators.md (VQ2): New mode iterator.
18885
18886 2018-06-20 Martin Liska <mliska@suse.cz>
18887
18888 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
18889 Change default ratio from 10 to 8.
18890
18891 2018-06-20 Martin Liska <mliska@suse.cz>
18892
18893 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18894 New.
18895 (bit_test_cluster::find_bit_tests): Likewise.
18896 (switch_decision_tree::analyze_switch_statement): Find clusters.
18897 * tree-switch-conversion.h (struct jump_table_cluster): Document
18898 hierarchy.
18899
18900 2018-06-20 Martin Liska <mliska@suse.cz>
18901
18902 * tree-switch-conversion.c (switch_conversion::collect):
18903 Record m_uniq property.
18904 (switch_conversion::expand): Bail out for special conditions.
18905 (group_cluster::~group_cluster): New.
18906 (group_cluster::group_cluster): Likewise.
18907 (group_cluster::dump): Likewise.
18908 (jump_table_cluster::emit): New.
18909 (switch_decision_tree::fix_phi_operands_for_edges): New.
18910 (struct case_node): Remove struct.
18911 (jump_table_cluster::can_be_handled): New.
18912 (case_values_threshold): Moved to header.
18913 (reset_out_edges_aux): Likewise.
18914 (jump_table_cluster::is_beneficial): New.
18915 (bit_test_cluster::can_be_handled): Likewise.
18916 (add_case_node): Remove.
18917 (bit_test_cluster::is_beneficial): New.
18918 (case_bit_test::cmp): New.
18919 (bit_test_cluster::emit): New.
18920 (expand_switch_as_decision_tree_p): Remove.
18921 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
18922 (fix_phi_operands_for_edge): Likewise.
18923 (switch_decision_tree::analyze_switch_statement): New.
18924 (compute_cases_per_edge): Move ...
18925 (switch_decision_tree::compute_cases_per_edge): ... here.
18926 (try_switch_expansion): Likewise.
18927 (switch_decision_tree::try_switch_expansion): Likewise.
18928 (record_phi_operand_mapping): Likewise.
18929 (switch_decision_tree::record_phi_operand_mapping): Likewise.
18930 (emit_case_decision_tree): Likewise.
18931 (switch_decision_tree::emit): Likewise.
18932 (balance_case_nodes): Likewise.
18933 (switch_decision_tree::balance_case_nodes): Likewise.
18934 (dump_case_nodes): Likewise.
18935 (switch_decision_tree::dump_case_nodes): Likewise.
18936 (emit_jump): Likewise.
18937 (switch_decision_tree::emit_jump): Likewise.
18938 (emit_cmp_and_jump_insns): Likewise.
18939 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
18940 (emit_case_nodes): Likewise.
18941 (switch_decision_tree::emit_case_nodes): Likewise.
18942 (conditional_probability): Remove.
18943 * tree-switch-conversion.h (enum cluster_type): New.
18944 (PRINT_CASE): New.
18945 (struct cluster): Likewise.
18946 (cluster::cluster): Likewise.
18947 (struct simple_cluster): Likewise.
18948 (simple_cluster::simple_cluster): Likewise.
18949 (struct group_cluster): Likewise.
18950 (struct jump_table_cluster): Likewise.
18951 (struct bit_test_cluster): Likewise.
18952 (struct min_cluster_item): Likewise.
18953 (struct case_tree_node): Likewise.
18954 (case_tree_node::case_tree_node): Likewise.
18955 (jump_table_cluster::case_values_threshold): Likewise.
18956 (struct case_bit_test): Likewise.
18957 (struct switch_decision_tree): Likewise.
18958 (struct switch_conversion): Likewise.
18959 (switch_decision_tree::reset_out_edges_aux): Likewise.
18960
18961 2018-06-20 Martin Liska <mliska@suse.cz>
18962
18963 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
18964 (hoist_edge_and_branch_if_true): Likewise.
18965 (expand_switch_using_bit_tests_p): Likewise.
18966 (struct case_bit_test): Likewise.
18967 (case_bit_test_cmp): Likewise.
18968 (emit_case_bit_tests): Likewise.
18969 (switch_conversion::switch_conversion): New class.
18970 (struct switch_conv_info): Remove old struct.
18971 (collect_switch_conv_info): More to ...
18972 (switch_conversion::collect): ... this.
18973 (check_range): Likewise.
18974 (switch_conversion::check_range): Likewise.
18975 (check_all_empty_except_final): Likewise.
18976 (switch_conversion::check_all_empty_except_final): Likewise.
18977 (check_final_bb): Likewise.
18978 (switch_conversion::check_final_bb): Likewise.
18979 (create_temp_arrays): Likewise.
18980 (switch_conversion::create_temp_arrays): Likewise.
18981 (free_temp_arrays): Likewise.
18982 (gather_default_values): Likewise.
18983 (switch_conversion::gather_default_values): Likewise.
18984 (build_constructors): Likewise.
18985 (switch_conversion::build_constructors): Likewise.
18986 (constructor_contains_same_values_p): Likewise.
18987 (switch_conversion::contains_same_values_p): Likewise.
18988 (array_value_type): Likewise.
18989 (switch_conversion::array_value_type): Likewise.
18990 (build_one_array): Likewise.
18991 (switch_conversion::build_one_array): Likewise.
18992 (build_arrays): Likewise.
18993 (switch_conversion::build_arrays): Likewise.
18994 (gen_def_assigns): Likewise.
18995 (switch_conversion::gen_def_assigns): Likewise.
18996 (prune_bbs): Likewise.
18997 (switch_conversion::prune_bbs): Likewise.
18998 (fix_phi_nodes): Likewise.
18999 (switch_conversion::fix_phi_nodes): Likewise.
19000 (gen_inbound_check): Likewise.
19001 (switch_conversion::gen_inbound_check): Likewise.
19002 (process_switch): Use the newly created class.
19003 (switch_conversion::expand): New.
19004 (switch_conversion::~switch_conversion): New.
19005 * tree-switch-conversion.h: New file.
19006
19007 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19008
19009 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
19010 tree-vect-patterns.c.
19011 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
19012 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
19013 (vect_recog_sad_pattern): Likewise.
19014 (vect_recog_widen_sum_pattern): Likewise.
19015 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
19016 (vect_recog_widen_shift_pattern): Remove the type_in argument.
19017 (vect_recog_rotate_pattern): Likewise.
19018 (vect_recog_mult_pattern): Likewise.
19019 (vect_recog_vector_vector_shift_pattern): Likewise.
19020 (vect_recog_divmod_pattern): Likewise.
19021 (vect_recog_mixed_size_cond_pattern): Likewise.
19022 (vect_recog_bool_pattern): Likewise.
19023 (vect_recog_mask_conversion_pattern): Likewise.
19024 (vect_try_gather_scatter_pattern): Likewise.
19025 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
19026 (vect_recog_over_widening_pattern): Likewise.
19027 (vect_recog_gather_scatter_pattern): Likewise.
19028 (vect_recog_func_ptr): Move from tree-vectorizer.h
19029 (vect_vect_recog_func_ptrs): Move further down the file.
19030 (vect_recog_func): Likewise. Remove the third argument.
19031 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
19032 (vect_pattern_recog_1): Expect the pattern function to do any
19033 necessary target tests. Also expect it to provide a vector type.
19034 Remove the type_in handling.
19035
19036 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19037
19038 * tree-vect-patterns.c (vect_pattern_detected): New function.
19039 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
19040 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
19041 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
19042 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
19043 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
19044 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
19045 (vect_recog_mask_conversion_pattern)
19046 (vect_try_gather_scatter_pattern): Likewise.
19047
19048 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19049
19050 * tree-vect-patterns.c (vect_get_internal_def): New function.
19051 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
19052 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
19053 (search_type_for_mask_1): Use it.
19054
19055 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19056
19057 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
19058 redundant WIDEN_SUM_EXPR handling.
19059 (vect_recog_sad_pattern): Likewise.
19060
19061 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19062
19063 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
19064 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
19065 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
19066 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
19067 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
19068
19069 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19070
19071 * tree-vect-stmts.c (vectorizable_call): Make sure that we
19072 use the stmt_vec_info of the original bb statement for the
19073 new zero assignment, even if the call is part of a pattern.
19074
19075 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19076
19077 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
19078 that the sequence is attached to the original statement rather
19079 than the pattern statement.
19080 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
19081 PATTERN_DEF_SEQ from the original statement rather than
19082 the main pattern statement.
19083 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
19084 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
19085 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
19086
19087 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
19088
19089 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
19090 definition statements before the early exit for statements that aren't
19091 live or relevant.
19092 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
19093 split out from...
19094 (vect_transform_loop): ...here. Process pattern definition
19095 statements without first checking whether the main pattern
19096 statement is live or relevant.
19097
19098 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
19099
19100 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
19101 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
19102
19103 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
19104
19105 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
19106 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
19107 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
19108 (expand_block_compare): Change select_block_compare_mode call.
19109 (expand_strncmp_align_check): Use new functions, fix comment.
19110 (emit_final_str_compare_gpr): New function.
19111 (expand_strn_compare): Refactor and clean up code.
19112 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
19113
19114 2018-06-19 Tony Reix <tony.reix@atos.com>
19115 Damien Bergamini <damien.bergamini@atos.com>
19116 David Edelsohn <dje.gcc@gmail.com>
19117
19118 * collect2.c (static_obj): New variable.
19119 (static_libs): New variable.
19120 (is_in_list): Uncomment declaration.
19121 (main): Track AIX libraries linked statically.
19122 (is_in_list): Uncomment definition.
19123 (scan_prog_file): Don't add AIX shared libraries initializer
19124 to constructor list if linking statically.
19125
19126 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
19127
19128 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
19129 constant.
19130 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
19131
19132 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
19133
19134 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
19135 blocks.
19136
19137 2018-06-19 Martin Liska <mliska@suse.cz>
19138
19139 * config/i386/i386.c (ix86_can_inline_p): Do not use
19140 ipa_fn_summaries::get_create.
19141 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
19142 get.
19143 (devirtualization_time_bonus): Likewise.
19144 (ipcp_propagate_stage): Likewise.
19145 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
19146 (edge_set_predicate): Likewise.
19147 (evaluate_conditions_for_known_args): Likewise.
19148 (evaluate_properties_for_edge): Likewise.
19149 (ipa_call_summary::reset): Tranform to ...
19150 (ipa_call_summary::~ipa_call_summary): ... this.
19151 (ipa_fn_summary::reset): Transform to ...
19152 (ipa_fn_summary::~ipa_fn_summary): ... this.
19153 (ipa_fn_summary_t::remove): Rename to ...
19154 (ipa_fn_summary_t::remove_callees): ... this.
19155 (ipa_fn_summary_t::duplicate): Use placement new
19156 instead of memory copy.
19157 (ipa_call_summary_t::duplicate): Likewise.
19158 (ipa_call_summary_t::remove): Remove.
19159 (dump_ipa_call_summary): Change get_create to get.
19160 (ipa_dump_fn_summary): Dump only when summary exists.
19161 (analyze_function_body): Use symbol_summary::get instead
19162 of get_create.
19163 (compute_fn_summary): Likewise.
19164 (estimate_edge_devirt_benefit): Likewise.
19165 (estimate_edge_size_and_time): Likewise.
19166 (inline_update_callee_summaries): Likewise.
19167 (remap_edge_change_prob): Likewise.
19168 (remap_edge_summaries): Likewise.
19169 (ipa_merge_fn_summary_after_inlining): Likewise.
19170 (write_ipa_call_summary): Likewise.
19171 (ipa_fn_summary_write): Likewise.
19172 (ipa_free_fn_summary): Likewise.
19173 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
19174 (struct ipa_call_summary): Likewise.
19175 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
19176 of get_create.
19177 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
19178 (estimate_size_after_inlining): Likewise.
19179 (estimate_growth): Likewise.
19180 (growth_likely_positive): Likewise.
19181 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
19182 (inline_call): Likewise.
19183 * ipa-inline.c (caller_growth_limits): Likewise.
19184 (can_inline_edge_p): Likewise.
19185 (can_inline_edge_by_limits_p): Likewise.
19186 (compute_uninlined_call_time): Likewise.
19187 (compute_inlined_call_time): Likewise.
19188 (want_inline_small_function_p): Likewise.
19189 (edge_badness): Likewise.
19190 (update_caller_keys): Likewise.
19191 (update_callee_keys): Likewise.
19192 (inline_small_functions): Likewise.
19193 (inline_to_all_callers_1): Likewise.
19194 (dump_overall_stats): Likewise.
19195 (early_inline_small_functions): Likewise.
19196 (early_inliner): Likewise.
19197 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
19198 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
19199 * ipa-pure-const.c (malloc_candidate_p): Likewise.
19200 * ipa-split.c (execute_split_functions): Likewise.
19201 * symbol-summary.h: Likewise.
19202 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
19203
19204 2018-06-19 Richard Biener <rguenther@suse.de>
19205
19206 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
19207 (vectorize_loops): ... here. Fix dbgcnt handling.
19208 (try_vectorize_loop): Wrap try_vectorize_loop_1.
19209
19210 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
19211
19212 PR target/86197
19213 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
19214 ieee128 argument takes up only one (vector) register, not two (floating
19215 point) registers.
19216
19217 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
19218
19219 * gimplify.c (gimplify_init_constructor): Really never clear for an
19220 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
19221
19222 2018-06-19 Richard Biener <rguenther@suse.de>
19223
19224 PR tree-optimization/86179
19225 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
19226 after failed recognition.
19227
19228 2018-06-18 Martin Sebor <msebor@redhat.com>
19229
19230 PR middle-end/85602
19231 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
19232 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
19233 Handle integer subtraction.
19234 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
19235 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
19236
19237 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19238
19239 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
19240 param from rtx to rtx_insn *.
19241 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
19242 param.
19243 (frv_ifcvt_modify_insn): Likwise.
19244 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
19245 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
19246 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
19247 as_a <rtx_insn *> cast to local "unprotected_region" once
19248 it's been established that it's not NULL or pc_rtx.
19249 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
19250 param "sethi" from rtx to rtx_insn *.
19251 (nds32_group_float_insns): Likewise for param "insn".
19252 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
19253 param.
19254 (vax_output_int_subtract): Likewise.
19255 * config/vax/vax.c (vax_output_int_add): Likewise for param
19256 "insn".
19257 (vax_output_int_subtract): Likewise.
19258 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
19259 (emit_pattern_after): Likewise for param "after".
19260 (emit_insn_after): Likewise.
19261 (emit_jump_insn_after): Likewise.
19262 (emit_call_insn_after): Likewise.
19263 (emit_debug_insn_after): Likewise.
19264 (emit_pattern_before): Likewise for param "before".
19265 (emit_insn_before): Likewise.
19266 (emit_jump_insn_before): Likewise.
19267 * final.c (get_insn_template): Likewise for param "insn", removing
19268 a cast.
19269 * output.h (get_insn_template): Likewise for 2nd param.
19270 * rtl.h (emit_insn_before): Likewise.
19271 (emit_jump_insn_before): Likewise.
19272 (emit_debug_insn_before_noloc): Likewise.
19273 (emit_insn_after): Likewise.
19274 (emit_jump_insn_after): Likewise.
19275 (emit_call_insn_after): Likewise.
19276 (emit_debug_insn_after): Likewise.
19277 (set_insn_deleted): Likewise for param.
19278
19279 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
19280
19281 PR target/85358
19282 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
19283 floating point modes, so that IFmode is numerically greater than
19284 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
19285 to declare the ordering. This prevents IFmode from being
19286 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
19287 machine. Include rs6000-modes.h to share the fractional values
19288 between genmodes* and the rest of the compiler.
19289 (IFmode): Likewise.
19290 (KFmode): Likewise.
19291 (TFmode): Likewise.
19292 * config/rs6000/rs6000-modes.h: New file.
19293 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
19294 meaning of rs6000_long_double_size so that 126..128 selects an
19295 appropriate 128-bit floating point type.
19296 (rs6000_option_override_internal): Likewise.
19297 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
19298 (TARGET_LONG_DOUBLE_128): Change the meaning of
19299 rs6000_long_double_size so that 126..128 selects an appropriate
19300 128-bit floating point type.
19301 (LONG_DOUBLE_TYPE_SIZE): Update comment.
19302 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
19303 source and destination to match the standard usage.
19304 (truncifkf2): Likewise.
19305 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
19306 ISA 2.07 to use an explicit clobber, instead of passing in a
19307 temporary.
19308 (copysign<mode>3_soft): Likewise.
19309
19310 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19311
19312 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
19313 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
19314 (vect_slp_analyze_instance_dependence): Likewise.
19315 (vect_enhance_data_refs_alignment): Likewise.
19316 (vect_analyze_data_refs_alignment): Likewise.
19317 (vect_slp_analyze_and_verify_instance_alignment
19318 (vect_analyze_data_ref_accesses): Likewise.
19319 (vect_prune_runtime_alias_test_list): Likewise.
19320 (vect_analyze_data_refs): Likewise.
19321 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
19322 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19323 (vect_analyze_scalar_cycles_1): Likewise.
19324 (vect_get_loop_niters): Likewise.
19325 (vect_analyze_loop_form_1): Likewise.
19326 (vect_update_vf_for_slp): Likewise.
19327 (vect_analyze_loop_operations): Likewise.
19328 (vect_analyze_loop): Likewise.
19329 (vectorizable_induction): Likewise.
19330 (vect_transform_loop): Likewise.
19331 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
19332 * tree-vect-slp.c (vect_analyze_slp): Likewise.
19333 (vect_make_slp_decision): Likewise.
19334 (vect_detect_hybrid_slp): Likewise.
19335 (vect_slp_analyze_operations): Likewise.
19336 (vect_slp_bb): Likewise.
19337 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
19338 (vectorizable_bswap): Likewise.
19339 (vectorizable_call): Likewise.
19340 (vectorizable_simd_clone_call): Likewise.
19341 (vectorizable_conversion): Likewise.
19342 (vectorizable_assignment): Likewise.
19343 (vectorizable_shift): Likewise.
19344 (vectorizable_operation): Likewise.
19345 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
19346
19347 2018-06-18 Martin Sebor <msebor@redhat.com>
19348
19349 PR tree-optimization/81384
19350 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
19351 * builtins.c (expand_builtin_strnlen): New function.
19352 (expand_builtin): Call it.
19353 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
19354 * builtins.def (BUILT_IN_STRNLEN): New.
19355 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
19356 Warn for bounds in excess of maximum object size.
19357 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
19358 single-value ranges. Handle strnlen.
19359 (handle_builtin_strlen): Handle strnlen.
19360 (strlen_check_and_optimize_stmt): Same.
19361 * doc/extend.texi (Other Builtins): Document strnlen.
19362
19363 2018-06-18 Maya Rashish <coypu@sdf.org>
19364
19365 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
19366 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
19367 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
19368
19369 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
19370 here to ...
19371 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
19372
19373 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19374
19375 * tree.c (escaped_string::escape): Replace cast to char * by
19376 const_cast<char *> (unescaped).
19377
19378 2018-06-18 Nick Clifton <nickc@redhat.com>
19379
19380 PR 84195
19381 * tree.c (escaped_string): New class. Converts an unescaped
19382 string into its escaped equivalent.
19383 (warn_deprecated_use): Use the new class to convert the
19384 deprecation message, if present.
19385 (test_escaped_strings): New self test.
19386 (test_c_tests): Add test_escaped_strings.
19387 * doc/extend.texi (deprecated): Add a note that the
19388 deprecation message is affected by the -fmessage-length
19389 option, and that control characters will be escaped.
19390 (#pragma GCC error): Document this pragma.
19391 (#pragma GCC warning): Likewise.
19392 * doc/invoke.texi (-fmessage-length): Document this option's
19393 effect on the #warning and #error preprocessor directives and
19394 the deprecated attribute.
19395
19396 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
19397
19398 * tree.c (decl_value_expr_lookup): Revert latest change.
19399 (decl_value_expr_insert): Likewise.
19400
19401 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
19402
19403 * gimplify.c (nonlocal_vlas): Delete.
19404 (nonlocal_vla_vars): Likewise.
19405 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
19406 referenced VLAs.
19407 (gimplify_body): Do not create and destroy nonlocal_vlas.
19408 * tree-nested.c: Include diagnostic.h.
19409 (use_pointer_in_frame): Tweak.
19410 (lookup_field_for_decl): Add assertion and declare the transformation.
19411 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
19412 internal error when the reference is in a wrong context. Do not
19413 create a debug decl by default.
19414 (note_nonlocal_block_vlas): Delete.
19415 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
19416 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
19417 create a debug decl by default.
19418 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
19419 call is in a wrong context.
19420 (fixup_vla_decls): New function.
19421 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
19422 debug variables were created.
19423 * tree.c (decl_value_expr_lookup): Add checking assertion.
19424 (decl_value_expr_insert): Likewise.
19425
19426 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19427
19428 PR middle-end/82479
19429 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
19430 * tree-scalar-evolution.c (interpret_expr): Likewise.
19431 (expression_expensive_p): Likewise.
19432 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
19433 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
19434 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
19435 (ssa_defined_by_minus_one_stmt_p): New.
19436
19437 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19438
19439 PR middle-end/64946
19440 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
19441 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
19442 * dojump.c (do_jump): Likewise.
19443 * expr.c (expand_expr_real_2): Check operand type's sign.
19444 * fold-const.c (const_unop): Handle ABSU_EXPR.
19445 (fold_abs_const): Likewise.
19446 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
19447 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
19448 (strip_sign_op_1): Likesise.
19449 * match.pd: Add new pattern to generate ABSU_EXPR.
19450 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
19451 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19452 * tree-eh.c (operation_could_trap_helper_p): Likewise.
19453 * tree-inline.c (estimate_operator_cost): Likewise.
19454 * tree-pretty-print.c (dump_generic_node): Likewise.
19455 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
19456 * tree.def (ABSU_EXPR): New.
19457
19458 2018-06-16 Jakub Jelinek <jakub@redhat.com>
19459
19460 PR middle-end/86095
19461 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
19462 documented as preserved for backward compatibility only.
19463 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
19464
19465 PR rtl-optimization/86108
19466 * bb-reorder.c (create_forwarder_block): Renamed to ...
19467 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
19468 jump from new landing pad to the second part.
19469 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
19470 Adjust callers.
19471
19472 2018-06-15 Jakub Jelinek <jakub@redhat.com>
19473
19474 PR middle-end/85878
19475 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
19476 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
19477 Only call store_expr for halves if the mode is the same.
19478
19479 PR middle-end/86123
19480 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
19481 Fix up comment formatting.
19482
19483 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
19484
19485 * typed-splay-tree.h (typed_splay_tree::remove): New function.
19486 (typed_splay_tree::closure,
19487 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
19488 (typed_splay_tree::typed_splay_tree,
19489 typed_splay_tree::operator =): Declared private.
19490 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
19491 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
19492 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
19493 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
19494 typed_splay_tree::splay_tree_splay,
19495 typed_splay_tree::splay_tree_foreach_helper,
19496 typed_splay_tree::splay_tree_insert,
19497 typed_splay_tree::splay_tree_remove,
19498 typed_splay_tree::splay_tree_lookup,
19499 typed_splay_tree::splay_tree_predecessor,
19500 typed_splay_tree::splay_tree_successor,
19501 typed_splay_tree::splay_tree_min,
19502 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
19503 (typed_splay_tree::root, typed_splay_tree::comp,
19504 typed_splay_tree::delete_key,
19505 typed_splay_tree::delete_value): New data members.
19506 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
19507 typed_splay_tree::remove.
19508
19509 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
19510
19511 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
19512 -mginv and -mno-ginv to the assembler.
19513 * config/mips/mips.opt (-mcrc): New option.
19514 (-mginv): Likewise.
19515 * doc/invoke.text (-mcrc): Document.
19516 (-mginv): Likewise.
19517
19518 2018-06-15 Nick Clifton <nickc@redhat.com>
19519
19520 PR 84195
19521 * tree.c (escaped_string): New class. Converts an unescaped
19522 string into its escaped equivalent.
19523 (warn_deprecated_use): Use the new class to convert the
19524 deprecation message, if present.
19525 (test_escaped_strings): New self test.
19526 (test_c_tests): Add test_escaped_strings.
19527 * doc/extend.texi (deprecated): Add a note that the
19528 deprecation message is affected by the -fmessage-length
19529 option, and that control characters will be escaped.
19530 (#pragma GCC error): Document this pragma.
19531 (#pragma GCC warning): Likewise.
19532 * doc/invoke.texi (-fmessage-length): Document this option's
19533 effect on the #warning and #error preprocessor directives and
19534 the deprecated attribute.
19535
19536 2018-06-15 Richard Biener <rguenther@suse.de>
19537
19538 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
19539 here, also noting vector size used.
19540 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
19541 size used in MSG_OPTIMIZED_LOCATIONS dump.
19542 (pass_slp_vectorize::execute): Adjust.
19543
19544 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
19545
19546 PR target/85968
19547 * config/arc/arc.c (arc_return_address_register): Fix
19548 if-condition.
19549
19550 2018-06-15 Richard Biener <rguenther@suse.de>
19551
19552 PR middle-end/86159
19553 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
19554 leave useless conversion stripping to force_gimple_operand_gsi.
19555 (gimplify_build2): Likewise.
19556 (gimplify_build1): Likewise.
19557
19558 2018-06-15 Richard Biener <rguenther@suse.de>
19559
19560 PR middle-end/86076
19561 * tree-cfg.c (move_stmt_op): unshare invariant addresses
19562 before adjusting their block.
19563
19564 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
19565
19566 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
19567 multilibs for *-*-rtems*.
19568 * config/riscv/t-rtems: New file.
19569
19570 2018-06-14 Jakub Jelinek <jakub@redhat.com>
19571
19572 PR middle-end/86122
19573 * match.pd ((A +- CST1) +- CST2): Punt if last resort
19574 unsigned_type_for returns NULL.
19575
19576 PR target/85945
19577 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
19578 subregs of multi-word pseudos unless the float mode has word size.
19579
19580 2018-06-14 Richard Biener <rguenther@suse.de>
19581
19582 PR middle-end/86139
19583 * tree-vect-generic.c (build_word_mode_vector_type): Remove
19584 duplicate and harmful type_hash_canon.
19585 * tree.c (type_hash_canon): Assert we didn't find ourselves.
19586
19587 2018-06-14 Richard Biener <rguenther@suse.de>
19588
19589 PR ipa/86124
19590 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
19591 NULL cgraph_node.
19592
19593 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
19594
19595 * config/rtems.h (STDINT_LONG32): Define.
19596
19597 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
19598 Prachi Godbole <prachi.godbole@imgtec.com>
19599
19600 * config/mips/mips-cpus.def: Define P6600.
19601 * config/mips/mips-tables.opt: Regenerate.
19602 * config/mips/mips.c (mips_ucbranch_type): New enum.
19603 (mips_rtx_cost_data): Add support for P6600.
19604 (mips_issue_rate): Likewise.
19605 (mips_multipass_dfa_lookahead): Likewise.
19606 (mips_avoid_hazard): Likewise.
19607 (mips_reorg_process_insns): Likewise.
19608 (mips_classify_branch_p6600): New function.
19609 * config/mips/mips.h (TUNE_P6600): New define.
19610 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
19611 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
19612 * config/mips/mips.md: Include p6600.md.
19613 (processor): Add p6600.
19614 * config/mips/p6600.md: New file.
19615 * doc/invoke.texi: Add p6600 to supported architectures.
19616
19617 2018-06-13 Martin Sebor <msebor@redhat.com>
19618
19619 PR tree-optimization/86114
19620 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
19621 of integer types.
19622 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
19623
19624 2018-06-13 Richard Biener <rguenther@suse.de>
19625
19626 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
19627 Properly set vector type of the intermediate stmt.
19628 * tree-vect-stmts.c (vectorizable_operation): The destination
19629 var always has vectype_out type.
19630
19631 2018-06-13 Jeff Law <law@redhat.com>
19632
19633 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
19634 integer 0 for argument to print_rtl_with_bb.
19635 (rl78_reorg): Likewise.
19636
19637 2018-06-13 David Malcolm <dmalcolm@redhat.com>
19638
19639 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
19640 from rtx to rtx_insn *.
19641 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
19642 "label".
19643 (add_sched_insns_for_speculation): Likewise for local "target",
19644 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19645 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
19646 from rtx_insn ** to rtx_code_label **.
19647 (reorg_emit_nops): Likewise.
19648 (c6x_reorg): Likewise for local "call_labels".
19649 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
19650 rtx to rtx_insn *.
19651 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
19652 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
19653 the loops over LABEL_REFS.
19654 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
19655 braf_label.
19656 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19657 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
19658 (split_branches): Strengthen local "olabel" from rtx to
19659 rtx_insn *, adding a safe_as_a cast.
19660 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
19661 to "rtx_insn *".
19662 (add_insn_after): Likewise for first two params.
19663 (add_insn_before): Likewise.
19664 (remove_insn): Likewise for param.
19665 (emit_pattern_before_noloc): Likewise for second and third params.
19666 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
19667 (emit_call_insn_before_noloc): Likewise.
19668 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
19669 to "rtx_insn *".
19670 (emit_barrier_before): Likewise.
19671 (emit_label_before): Strengthen "label" param from "rtx" to
19672 "rtx_code_label *". Strengthen "before" param from "rtx" to
19673 "rtx_insn *".
19674 (emit_insn_after_1): Strengthen "after" param from "rtx" to
19675 "rtx_insn *".
19676 (emit_pattern_after_noloc): Likewise.
19677 (emit_insn_after_noloc): Likewise.
19678 (emit_jump_insn_after_noloc): Likewise.
19679 (emit_call_insn_after_noloc): Likewise.
19680 (emit_debug_insn_after_noloc): Likewise.
19681 (emit_barrier_after): Likewise.
19682 (emit_label_after): Likewise for both params.
19683 (emit_pattern_after_setloc): Likewise for "after" param. Convert
19684 "loc" param from "int" to "location_t".
19685 (emit_insn_after_setloc): Likewise.
19686 (emit_jump_insn_after_setloc): Likewise.
19687 (emit_call_insn_after_setloc): Likewise.
19688 (emit_debug_insn_after_setloc): Likewise.
19689 (emit_pattern_before_setloc): Likewise for "before" param. Convert
19690 "loc" param from "int" to "location_t".
19691 (emit_pattern_before): Convert NULL_RTX to NULL.
19692 (emit_insn_before_setloc): Convert "loc" param from "int" to
19693 "location_t".
19694 (emit_jump_insn_before_setloc): Likewise.
19695 (emit_call_insn_before_setloc): Likewise.
19696 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
19697 rtx_insn *. Convert "loc" param from "int" to "location_t".
19698 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
19699 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
19700 Convert 3rd param from "int" to "location_t".
19701 (emit_barrier_before, emit_barrier_after, next_real_insn):
19702 Strengthen param from rtx to rtx_insn *.
19703 (emit_label_before): Strengthen 1st param from "rtx" to
19704 "rtx_code_label *". Strengthen 2nd param from "rtx" to
19705 "rtx_insn *".
19706 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
19707 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
19708 Strengthen 2nd param from "rtx" to "rtx_insn *".
19709 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
19710 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
19711 Likewise. Convert 3rd param from "int" to "location_t".
19712 (emit_label_after): Strengthen 1st param from "rtx" to
19713 "rtx_code_label *".
19714 (next_real_insn, remove_insn): Strengthen param from "rtx" to
19715 "rtx_insn *".
19716 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
19717 from "rtx" to "rtx_insn *".
19718
19719 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
19720
19721 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
19722 bodies streamed in with -Q.
19723 * dumpfile.c (dump_files): Add lto-stream-out dump file.
19724 * dumpfile.h (tree_dump_index): Add lto_stream_out.
19725 * gimple-streamer-out.c: Include gimple-pretty-print.h
19726 (output_bb): Dump stmts streamed.
19727 * lto-section-out.c: Include print-tree.h
19728 (lto_begin_section): Dump sections created.
19729 (lto_output_decl_index): Dump decl encoded.
19730 * lto-streamer-out.c: Include print-tree.h
19731 (create_output_block): Dump output block created.
19732 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
19733 (output_function): Dump function output.
19734 (output_constructor): Dump constructor streamed.
19735 (write_global_stream): Output indexes encoded.
19736 (produce_asm_for_decls): Dump streams encoded.
19737 * lto-streamer.c (streamer_dump_file): New global var.
19738 * lto-streamer.h (streamer_dump_file): Declare.
19739 * passes.c (ipa_write_summaries): Initialize streamer dump.
19740 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
19741 in.
19742
19743 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
19744
19745 PR target/86048
19746 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
19747 offsets for register save directives. Emit a second batch of save
19748 directives, if need be, when the function accesses prior frames.
19749
19750 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19751
19752 * config/arc/fpu.md (fmasf4): Force operand to register.
19753 (fnmasf4): Likewise.
19754
19755 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19756
19757 * config/arc/arc-protos.h (arc_pad_return): Remove.
19758 * config/arc/arc.c (machine_function): Remove force_short_suffix
19759 and size_reason.
19760 (arc_print_operand): Adjust printing of '&'.
19761 (arc_verify_short): Remove conditional printing of short suffix.
19762 (arc_final_prescan_insn): Remove reference to size_reason.
19763 (pad_return): New function.
19764 (arc_reorg): Call pad_return.
19765 (arc_pad_return): Remove.
19766 (arc_init_machine_status): Remove reference to force_short_suffix.
19767 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
19768 (attr length): When attribute iscompact is true force to 2
19769 regardless; in the case of maybe check if we want to force the
19770 instruction to have 4 bytes length.
19771 (nopv): Change it to generate 4 byte long nop as well.
19772 (blockage): New pattern.
19773 (simple_return): Remove call to arc_pad_return.
19774 (p_return_i): Likewise.
19775
19776 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19777
19778 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
19779
19780 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19781
19782 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
19783 ARC cores.
19784
19785 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19786
19787 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
19788 for ARC700 and ARCv2.
19789
19790 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
19791
19792 PR target/86076
19793 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
19794 operands[2] instead of operands[1].
19795
19796
19797 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19798
19799 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
19800 case, check whether the outer register overlaps an unallocatable
19801 register, not just whether it fits the required class.
19802
19803 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19804
19805 * poly-int.h (can_div_trunc_p): Add new overload in which all values
19806 are poly_ints.
19807 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
19808 (memrefs_conflict_p): Likewise.
19809 (init_alias_analysis): Likewise.
19810 * cfgexpand.c (expand_debug_expr): Likewise.
19811 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
19812 * cse.c (fold_rtx): Likewise.
19813 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
19814 * expr.c (emit_block_move_hints): Likewise.
19815 (clear_storage_hints, push_block, emit_push_insn): Likewise.
19816 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
19817 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
19818 (emit_group_store): Likewise.
19819 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
19820 to read the PRE/POST_MODIFY increment.
19821 * calls.c (store_one_arg): Use strip_offset.
19822 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
19823 poly_int_rtx_p.
19824 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
19825 by a VEC_SELECT.
19826 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
19827 (simplify_binary_operation_1): Extend CONST_INT handling to
19828 poly_int_rtx_p.
19829 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
19830 than a HOST_WIDE_INT.
19831 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
19832 poly_int64.
19833 (adjust_mems, add_stores): Update accodingly.
19834 (vt_canonicalize_addr): Track polynomial offsets.
19835 (emit_note_insn_var_location): Likewise.
19836 (vt_add_function_parameter): Likewise.
19837 (vt_initialize): Likewise.
19838
19839 2018-06-12 Jeff Law <law@redhat.com>
19840
19841 * config.gcc (alpha*-*-freebsd*): Remove.
19842 * config/alpha/freebsd.h: Remove.
19843
19844 2018-06-12 David Malcolm <dmalcolm@redhat.com>
19845
19846 PR other/69968
19847 * spellcheck-tree.c (levenshtein_distance): Rename to...
19848 (get_edit_distance): ...this, and update for underlying renaming.
19849 * spellcheck-tree.h (levenshtein_distance): Rename to...
19850 (get_edit_distance): ...this.
19851 * spellcheck.c (levenshtein_distance): Rename to...
19852 (get_edit_distance): ...this. Convert from Levenshtein distance
19853 to Damerau-Levenshtein distance by supporting transpositions of
19854 adjacent characters. Rename "v1" to "v_next" and "v0" to
19855 "v_one_ago".
19856 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
19857 (selftest::test_edit_distance_unit_test_oneway): ...this, and
19858 update for underlying renaming.
19859 (selftest::levenshtein_distance_unit_test): Rename to...
19860 (selftest::test_get_edit_distance_unit): ...this, and update for
19861 underlying renaming.
19862 (selftest::test_find_closest_string): Add example from PR 69968
19863 where transposition helps
19864 (selftest::test_metric_conditions): Update for renaming.
19865 (selftest::test_metric_conditions): Likewise.
19866 (selftest::spellcheck_c_tests): Likewise.
19867 * spellcheck.h (levenshtein_distance): Rename both overloads to...
19868 (get_edit_distance): ...this.
19869 (best_match::consider): Update for renaming.
19870
19871 2018-06-12 Martin Sebor <msebor@redhat.com>
19872
19873 PR tree-optimization/85259
19874 * builtins.c (compute_objsize): Handle constant offsets.
19875 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
19876 true iff a warning has been issued.
19877 * gimple.h (gimple_nonartificial_location): New function.
19878 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
19879 gimple_nonartificial_location and handle -Wno-system-headers.
19880 (handle_builtin_stxncpy): Same.
19881
19882 2018-06-12 Martin Sebor <msebor@redhat.com>
19883
19884 PR c/85931
19885 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
19886
19887 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
19888
19889 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19890 BUILTIN_VEC_XST entries for pointer to double and long long.
19891
19892 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
19893
19894 PR target/85990
19895 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19896 Update comments.
19897 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19898 Likewise.
19899
19900 2018-06-12 Martin Liska <mliska@suse.cz>
19901
19902 * doc/options.texi: Document IntegerRange.
19903
19904 2018-06-12 Martin Liska <mliska@suse.cz>
19905
19906 * config/i386/i386.opt: Make MPX-related options as Deprecated.
19907 * opt-functions.awk: Handle Deprecated flag.
19908 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
19909 and report error.
19910 (read_cmdline_option): Report warning for a deprecated option.
19911 * opts.h (struct cl_option): Add new field cl_deprecated.
19912 (CL_ERR_DEPRECATED): New.
19913
19914 2018-06-12 Martin Liska <mliska@suse.cz>
19915
19916 * doc/options.texi: Document Deprecated option flag.
19917
19918 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19919
19920 * config/arc/arc-arch.h (arc_extras): New enum.
19921 (arc_cpu_t):Add field extra.
19922 (arc_cpu_types): Consider the extras.
19923 * config/arc/arc-cpus.def: Add extras info.
19924 * config/arc/arc-opts.h (processor_type): Consider extra field.
19925 * config/arc/arc.c (arc_override_options): Handle extra field.
19926
19927 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19928
19929 * config/arc/arc-arch.h: Update ARC_OPTX macro.
19930 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
19931 field.
19932 * config/arc/arc.c (arc_init): Update pic warning.
19933 (irq_range): Update irq range parsing warnings.
19934 (arc_override_options): Update various warning messages.
19935 (arc_handle_aux_attribute): Likewise.
19936
19937 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
19938
19939 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
19940
19941 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19942
19943 * doc/sourcebuild.texi: Document usage of line number 0 in verify
19944 compiler messages directives.
19945
19946 2018-06-12 Matthew Fortune <mfortune@gmail.com>
19947
19948 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
19949 * config/mips/mips-tables.opt: Regenerate.
19950 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
19951 mips64r6.
19952 * doc/invoke.texi: Document -march=i6500.
19953
19954 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
19955
19956 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
19957 (i6400_gpmul): Add cpu_unit.
19958 (i6400_gpdiv): Likewise.
19959 (i6400_msa_add_d): Update reservations.
19960 (i6400_msa_int_add) Likewise.
19961 (i6400_msa_short_logic3) Likewise.
19962 (i6400_msa_short_logic2) Likewise.
19963 (i6400_msa_short_logic) Likewise.
19964 (i6400_msa_move) Likewise.
19965 (i6400_msa_cmp) Likewise.
19966 (i6400_msa_short_float2) Likewise.
19967 (i6400_msa_div_d) Likewise.
19968 (i6400_msa_long_logic1) Likewise.
19969 (i6400_msa_long_logic2) Likewise.
19970 (i6400_msa_mult) Likewise.
19971 (i6400_msa_long_float2) Likewise.
19972 (i6400_msa_long_float4) Likewise.
19973 (i6400_msa_long_float5) Likewise.
19974 (i6400_msa_long_float8) Likewise.
19975 (i6400_fpu_fadd): Include frint type.
19976 (i6400_fpu_store): New define_insn_reservation.
19977 (i6400_fpu_load): Likewise.
19978 (i6400_fpu_move): Likewise.
19979 (i6400_fpu_fcmp): Likewise.
19980 (i6400_fpu_fmadd): Likewise.
19981 (i6400_int_mult): Include imul3nc type and update reservation.
19982 (i6400_int_div): Include idiv3 type and update reservation.
19983 (i6400_int_load): Update to check type not move_type.
19984 (i6400_int_store): Likewise.
19985 (i6400_int_prefetch): Set zero latency.
19986
19987 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
19988
19989 * gcc.c: Document new %@{...} sequence.
19990 (LINK_COMMAND_SPEC): Use it for the -L switches.
19991 (cpp_unique_options): Use it for the -I switches.
19992 (at_file_argbuf): New global variable.
19993 (in_at_file): Likewise.
19994 (alloc_args): Create at_file_argbuf.
19995 (clear_args): Truncate at_file_argbuf.
19996 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
19997 (open_at_file): New function.
19998 (close_at_file): Likewise.
19999 (create_at_file): Delete.
20000 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
20001 <'o'>: Likewise.
20002 <'@'>: New case.
20003 (validate_switches_from_spec): Deal with %@{...} sequence.
20004 (validate_switches): Likewise.
20005 (driver::finalize): Call clear_args.
20006
20007 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
20008
20009 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
20010
20011 2018-06-11 Martin Sebor <msebor@redhat.com>
20012
20013 * doc/invoke.texi (-Wall): List -Wc++17-compat.
20014 (Wno-class-memaccess): Add @opindex.
20015 (Wno-templates, Wno-multiple-inheritance): Same.
20016 (Wno-virtual-inheritance, Wno-namespaces): Same.
20017 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
20018 (Wno-format-overflow, Wno-format-truncation): Same.
20019 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
20020 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
20021 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
20022 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
20023 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
20024 (Wno-misspelled-isr): Same.
20025
20026 2018-06-11 Martin Sebor <msebor@redhat.com>
20027
20028 * PR tree-optimization/86083
20029 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
20030
20031 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
20032
20033 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
20034
20035 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
20036
20037 PR target/85755
20038 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
20039 on the correct operand.
20040 (*movdi_internal64): Ditto.
20041
20042 2018-06-11 Martin Liska <mliska@suse.cz>
20043
20044 PR tree-optimization/86089
20045 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
20046
20047 2018-06-11 Julia Koval <julia.koval@intel.com>
20048
20049 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
20050 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
20051 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
20052
20053 2018-06-11 Olivier Hainque <hainque@adacore.com>
20054
20055 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
20056 for Ada with strict dwarf2.
20057
20058 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
20059
20060 PR target/85755
20061 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
20062 addresses.
20063
20064 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
20065
20066 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
20067
20068 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
20069
20070 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
20071 TARGET_ELF.
20072
20073 2018-06-08 Martin Liska <mliska@suse.cz>
20074
20075 * tree-cfg.h (debug_function): Fix argument type to match
20076 implementation.
20077
20078 2018-06-08 Martin Liska <mliska@suse.cz>
20079
20080 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
20081 Remove usage of MPX-related (and removed) fields.
20082 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
20083
20084 2018-06-08 David Malcolm <dmalcolm@redhat.com>
20085
20086 * cfg.c (debug): Use TDF_NONE rather than 0.
20087 * cfghooks.c (debug): Likewise.
20088 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
20089 (struct dump_option_value_info): Convert to...
20090 (struct kv_pair): ...this template type.
20091 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
20092 rather than 0.
20093 (optinfo_verbosity_options): Likewise.
20094 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
20095 OPTGROUP_NONE.
20096 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
20097 than int for "optgroup_flags" param.
20098 (dump_generic_expr_loc): Use dump_flags_t rather than int for
20099 "dump_kind" param.
20100 (dump_dec): Likewise.
20101 (dump_finish): Use TDF_NONE rather than 0.
20102 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
20103 rather than int for "optgroup_flags" param. Use TDF_NONE rather
20104 than 0. Update for change to option_ptr.
20105 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
20106 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
20107 0. Update for changes to optinfo_verbosity_options and
20108 optgroup_options.
20109 (opt_info_switch_p): Convert optgroup_flags from int to
20110 optgroup_flags_t.
20111 (dump_basic_block): Use dump_flags_t rather than int
20112 for "dump_kind" param.
20113 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
20114 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
20115 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
20116 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
20117 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
20118 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
20119 TDF_NONE): Convert from macros to...
20120 (enum dump_flag): ...this new enum.
20121 (dump_flags_t): Update to use enum.
20122 (operator|, operator&, operator~, operator|=, operator&=):
20123 Implement for dump_flags_t.
20124 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
20125 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
20126 Convert from macros to...
20127 (enum optgroup_flag): ...this new enum.
20128 (optgroup_flags_t): New typedef.
20129 (operator|, operator|=): Implement for optgroup_flags_t.
20130 (struct dump_file_info): Convert field "alt_flags" to
20131 dump_flags_t. Convert field "optgroup_flags" to
20132 optgroup_flags_t.
20133 (dump_basic_block): Use dump_flags_t rather than int for param.
20134 (dump_generic_expr_loc): Likewise.
20135 (dump_dec): Likewise.
20136 (dump_register): Convert param "optgroup_flags" to
20137 optgroup_flags_t.
20138 (opt_info_enable_passes): Likewise.
20139 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
20140 than 0.
20141 * gimple-pretty-print.c (debug): Likewise.
20142 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
20143 (merged_store_group::apply_stores): Likewise.
20144 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
20145 * gimple.c (verify_gimple_pp): Likewise.
20146 * graphite-poly.c (print_pbb_body): Likewise.
20147 * passes.c (pass_manager::register_one_dump_file): Convert
20148 local "optgroup_flags" to optgroup_flags_t.
20149 * print-tree.c (print_node): Use TDF_NONE rather than 0.
20150 (debug): Likewise.
20151 (debug_body): Likewise.
20152 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
20153 to optgroup_flags_t.
20154 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
20155 than 0.
20156 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
20157 (convert_mult_to_fma): Likewise.
20158 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
20159 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
20160 * tree-vect-data-refs.c (dump_lower_bound): Convert param
20161 "dump_kind" to dump_flags_t.
20162
20163 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20164
20165 * config/rs6000/rs6000.c (min, max): Delete.
20166
20167 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20168
20169 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
20170 -mabi=spe and -mabi=no-spe.
20171
20172 2018-06-08 Martin Liska <mliska@suse.cz>
20173
20174 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
20175 where we expect an existing summary.
20176
20177 2018-06-08 Martin Liska <mliska@suse.cz>
20178
20179 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
20180 * ipa-inline.h (estimate_edge_growth): Likewise.
20181
20182 2018-06-08 Martin Liska <mliska@suse.cz>
20183
20184 * cgraph.c (function_version_hasher::hash): Use
20185 cgraph_node::get_uid ().
20186 (function_version_hasher::equal):
20187 * cgraph.h (cgraph_node::get_uid): New method.
20188 * ipa-inline.c (update_caller_keys): Use
20189 cgraph_node::get_uid ().
20190 (update_callee_keys): Likewise.
20191 * ipa-utils.c (searchc): Likewise.
20192 (ipa_reduced_postorder): Likewise.
20193 * lto-cgraph.c (input_node): Likewise.
20194 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
20195 * symbol-summary.h (symtab_insertion): Likewise.
20196 (symtab_removal): Likewise.
20197 (symtab_duplication): Likewise.
20198 * tree-pretty-print.c (dump_function_header): Likewise.
20199 * tree-sra.c (convert_callers_for_node): Likewise.
20200
20201 2018-06-08 Martin Liska <mliska@suse.cz>
20202
20203 * cgraph.c (symbol_table::create_edge): Always assign a new
20204 unique number.
20205 (symbol_table::free_edge): Do not recycle numbers.
20206 * cgraph.h (cgraph_edge::get): New method.
20207 * symbol-summary.h (symtab_removal): Use it.
20208 (symtab_duplication): Likewise.
20209 (call_summary::hashable_uid): Remove.
20210
20211 2018-06-08 Martin Liska <mliska@suse.cz>
20212
20213 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
20214 (initialize_growth_caches): Remove.
20215 (free_growth_caches): Likewise.
20216 (do_estimate_edge_time): Use edge_growth_cache.
20217 (do_estimate_edge_size): Likewise.
20218 (do_estimate_edge_hints): Likewise.
20219 * ipa-inline.c (reset_edge_caches): Likewise.
20220 (recursive_inlining): Likewise.
20221 (inline_small_functions): Likewise.
20222 * ipa-inline.h (initialize_growth_caches): Remove.
20223 (estimate_edge_size): Likewise.
20224 (estimate_edge_time): Likewise.
20225 (estimate_edge_hints): Likewise.
20226 (reset_edge_growth_cache): Likewise.
20227 * symbol-summary.h (call_summary::remove): New method.
20228
20229 2018-06-08 Martin Liska <mliska@suse.cz>
20230
20231 * ipa-cp.c (class edge_clone_summary): New summary.
20232 (grow_edge_clone_vectors): Remove.
20233 (ipcp_edge_duplication_hook): Remove.
20234 (class edge_clone_summary_t): New call_summary class.
20235 (ipcp_edge_removal_hook): Remove.
20236 (edge_clone_summary_t::duplicate): New function.
20237 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
20238 (create_specialized_node): Likewise.
20239 (ipcp_driver): Initialize edge_clone_summaries and do not
20240 register hooks.
20241
20242 2018-06-08 Martin Liska <mliska@suse.cz>
20243
20244 * symbol-summary.h (get): New function.
20245 (call_summary::m_initialize_when_cloning): New class member.
20246
20247 2018-06-08 Martin Liska <mliska@suse.cz>
20248
20249 * cgraph.c (cgraph_node::remove): Do not recycle uid.
20250 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
20251 (symbol_table::allocate_cgraph_symbol): Do not set uid.
20252 * passes.c (uid_hash_t): Record removed_nodes by their uids.
20253 (remove_cgraph_node_from_order): Use the removed_nodes set.
20254 (do_per_function_toporder): Likwise.
20255 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
20256 instead of summary_uid.
20257 (symtab_removal): Likewise.
20258 (symtab_duplication): Likewise.
20259
20260 2018-06-08 Martin Liska <mliska@suse.cz>
20261
20262 * ipa-cp.c (ipcp_store_bits_results): Use
20263 ipcp_transformation_sum.
20264 (ipcp_store_vr_results): Likewise.
20265 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
20266 to ...
20267 (ipcp_transformation_initialize): ... this.
20268 (ipa_set_node_agg_value_chain):
20269 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
20270 (write_ipcp_transformation_info): Likewise.
20271 (read_ipcp_transformation_info): Likewise.
20272 (ipcp_update_bits): Likewise.
20273 (ipcp_update_vr): Likewise.
20274 (ipcp_transform_function): Likewise.
20275 * ipa-prop.h: Rename ipcp_transformation_summary to
20276 ipcp_transformation.
20277 (class ipcp_transformation_t): New function summary.
20278 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
20279 (ipa_get_agg_replacements_for_node): Likewise.
20280
20281 2018-06-08 Martin Liska <mliska@suse.cz>
20282
20283 * ipa-pure-const.c (struct funct_state_d): Do it class instead
20284 of struct.
20285 (class funct_state_summary_t): New function_summary class.
20286 (has_function_state): Remove.
20287 (get_function_state): Likewise.
20288 (set_function_state): Likewise.
20289 (add_new_function): Likewise.
20290 (funct_state_summary_t::insert): New function.
20291 (duplicate_node_data): Remove.
20292 (remove_node_data): Remove.
20293 (funct_state_summary_t::duplicate): New function.
20294 (register_hooks): Create new funct_state_summaries.
20295 (pure_const_generate_summary): Use it.
20296 (pure_const_write_summary): Likewise.
20297 (pure_const_read_summary): Likewise.
20298 (propagate_pure_const): Likewise.
20299 (propagate_nothrow): Likewise.
20300 (dump_malloc_lattice): Likewise.
20301 (propagate_malloc): Likewise.
20302 (execute): Do not register hooks, just remove summary
20303 instead.
20304 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
20305 constructor.
20306
20307 2018-06-08 Martin Liska <mliska@suse.cz>
20308
20309 * ipa-reference.c (remove_node_data): Remove.
20310 (duplicate_node_data): Likewise.
20311 (class ipa_ref_var_info_summary_t): New class.
20312 (class ipa_ref_opt_summary_t): Likewise.
20313 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
20314 (get_reference_optimization_summary): Use
20315 ipa_ref_opt_sum_summaries.
20316 (set_reference_vars_info): Remove.
20317 (set_reference_optimization_summary): Likewise.
20318 (ipa_init): Create summaries.
20319 (init_function_info): Use function summary.
20320 (ipa_ref_opt_summary_t::duplicate): New function.
20321 (ipa_ref_opt_summary_t::remove): New function.
20322 (get_read_write_all_from_node): Fix GNU coding style.
20323 (propagate): Use function summary.
20324 (write_node_summary_p): Fix GNU coding style.
20325 (stream_out_bitmap): Likewise.
20326 (ipa_reference_read_optimization_summary): Use function summary.
20327 (ipa_reference_c_finalize): Do not release hooks.
20328
20329 2018-06-08 Martin Liska <mliska@suse.cz>
20330
20331 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
20332 (analyze_function_body): Extract multiple calls of get_create.
20333 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20334 * ipa-inline.c (recursive_inlining): Use ::get method.
20335 * ipa-inline.h (estimate_edge_growth): Likewise.
20336
20337 2018-06-08 Martin Liska <mliska@suse.cz>
20338
20339 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
20340 HSA_INVALID.
20341 (hsa_function_summary::hsa_function_summary): Use the new enum
20342 value.
20343 (hsa_gpu_implementation_p): Use hsa_summaries::get.
20344 * hsa-gen.c (hsa_get_host_function): Likewise.
20345 (get_brig_function_name): Likewise.
20346 * ipa-hsa.c (process_hsa_functions): Likewise.
20347 (ipa_hsa_write_summary): Likewise.
20348 * symbol-summary.h (symtab_duplication): Use ::get function/
20349 (get): New function.
20350
20351 2018-06-08 Martin Liska <mliska@suse.cz>
20352
20353 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
20354 of get.
20355 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
20356 (hsa_register_kernel): Likewise.
20357 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
20358 * hsa-gen.c (hsa_get_host_function): Likewise.
20359 (get_brig_function_name): Likewise.
20360 (generate_hsa): Likewise.
20361 (pass_gen_hsail::execute): Likewise.
20362 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
20363 (devirtualization_time_bonus): Likewise.
20364 (ipcp_propagate_stage): Likewise.
20365 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
20366 (edge_set_predicate): Likewise.
20367 (evaluate_conditions_for_known_args): Likewise.
20368 (evaluate_properties_for_edge): Likewise.
20369 (ipa_fn_summary::reset): Likewise.
20370 (ipa_fn_summary_t::duplicate): Likewise.
20371 (dump_ipa_call_summary): Likewise.
20372 (ipa_dump_fn_summary): Likewise.
20373 (analyze_function_body): Likewise.
20374 (compute_fn_summary): Likewise.
20375 (estimate_edge_devirt_benefit): Likewise.
20376 (estimate_edge_size_and_time): Likewise.
20377 (estimate_calls_size_and_time): Likewise.
20378 (estimate_node_size_and_time): Likewise.
20379 (inline_update_callee_summaries): Likewise.
20380 (remap_edge_change_prob): Likewise.
20381 (remap_edge_summaries): Likewise.
20382 (ipa_merge_fn_summary_after_inlining): Likewise.
20383 (ipa_update_overall_fn_summary): Likewise.
20384 (read_ipa_call_summary): Likewise.
20385 (inline_read_section): Likewise.
20386 (write_ipa_call_summary): Likewise.
20387 (ipa_fn_summary_write): Likewise.
20388 (ipa_free_fn_summary): Likewise.
20389 * ipa-hsa.c (process_hsa_functions): Likewise.
20390 (ipa_hsa_write_summary): Likewise.
20391 (ipa_hsa_read_section): Likewise.
20392 * ipa-icf.c (sem_function::merge): Likewise.
20393 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20394 (do_estimate_edge_time): Likewise.
20395 (estimate_size_after_inlining): Likewise.
20396 (estimate_growth): Likewise.
20397 (growth_likely_positive): Likewise.
20398 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
20399 (inline_call): Likewise.
20400 * ipa-inline.c (caller_growth_limits): Likewise.
20401 (can_inline_edge_p): Likewise.
20402 (can_inline_edge_by_limits_p): Likewise.
20403 (compute_uninlined_call_time): Likewise.
20404 (compute_inlined_call_time): Likewise.
20405 (want_inline_small_function_p): Likewise.
20406 (edge_badness): Likewise.
20407 (update_caller_keys): Likewise.
20408 (update_callee_keys): Likewise.
20409 (recursive_inlining): Likewise.
20410 (inline_small_functions): Likewise.
20411 (inline_to_all_callers_1): Likewise.
20412 (dump_overall_stats): Likewise.
20413 (early_inline_small_functions): Likewise.
20414 (early_inliner): Likewise.
20415 * ipa-inline.h (estimate_edge_growth): Likewise.
20416 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
20417 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
20418 * ipa-prop.h (IPA_NODE_REF): Likewise.
20419 (IPA_EDGE_REF): Likewise.
20420 * ipa-pure-const.c (malloc_candidate_p): Likewise.
20421 (propagate_malloc): Likewise.
20422 * ipa-split.c (execute_split_functions): Likewise.
20423 * symbol-summary.h: Rename get to get_create.
20424 (get): Likewise.
20425 (get_create): Likewise.
20426 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
20427
20428 2018-06-08 Martin Liska <mliska@suse.cz>
20429
20430 * symbol-summary.h (release): Move definition out of class
20431 declaration.
20432 (symtab_removal): Likewise.
20433 (symtab_duplication): Likewise.
20434
20435 2018-06-08 Martin Liska <mliska@suse.cz>
20436
20437 * symbol-summary.h (function_summary): Move constructor
20438 implementation out of class declaration.
20439 (release): Likewise.
20440 (symtab_insertion): Likewise.
20441 (symtab_removal): Likewise.
20442 (symtab_duplication): Likewise.
20443 (get): Likewise.
20444
20445 2018-06-08 Martin Liska <mliska@suse.cz>
20446
20447 * Makefile.in: Remove support for MPX (macros, related functions,
20448 fields in cgraph_node, ...).
20449 * builtin-types.def (BT_BND): Likewise.
20450 (BT_FN_BND_CONST_PTR): Likewise.
20451 (BT_FN_CONST_PTR_BND): Likewise.
20452 (BT_FN_VOID_PTR_BND): Likewise.
20453 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
20454 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
20455 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
20456 (expand_builtin_mempcpy_with_bounds): Likewise.
20457 (expand_builtin_memset_with_bounds): Likewise.
20458 (expand_builtin_memset_args): Likewise.
20459 (std_expand_builtin_va_start): Likewise.
20460 (expand_builtin): Likewise.
20461 (expand_builtin_with_bounds): Likewise.
20462 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
20463 (DEF_LIB_BUILTIN_CHKP): Likewise.
20464 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
20465 (DEF_CHKP_BUILTIN): Likewise.
20466 (BUILT_IN_MEMCPY): Likewise.
20467 (BUILT_IN_MEMMOVE): Likewise.
20468 (BUILT_IN_MEMPCPY): Likewise.
20469 (BUILT_IN_MEMSET): Likewise.
20470 (BUILT_IN_STPCPY): Likewise.
20471 (BUILT_IN_STRCAT): Likewise.
20472 (BUILT_IN_STRCHR): Likewise.
20473 (BUILT_IN_STRCPY): Likewise.
20474 (BUILT_IN_STRLEN): Likewise.
20475 (BUILT_IN_MEMCPY_CHK): Likewise.
20476 (BUILT_IN_MEMMOVE_CHK): Likewise.
20477 (BUILT_IN_MEMPCPY_CHK): Likewise.
20478 (BUILT_IN_MEMSET_CHK): Likewise.
20479 (BUILT_IN_STPCPY_CHK): Likewise.
20480 (BUILT_IN_STRCAT_CHK): Likewise.
20481 (BUILT_IN_STRCPY_CHK): Likewise.
20482 * calls.c (store_bounds): Likewise.
20483 (emit_call_1): Likewise.
20484 (special_function_p): Likewise.
20485 (maybe_warn_nonstring_arg): Likewise.
20486 (initialize_argument_information): Likewise.
20487 (finalize_must_preallocate): Likewise.
20488 (compute_argument_addresses): Likewise.
20489 (expand_call): Likewise.
20490 * cfgexpand.c (expand_call_stmt): Likewise.
20491 (expand_return): Likewise.
20492 (expand_gimple_stmt_1): Likewise.
20493 (pass_expand::execute): Likewise.
20494 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
20495 (cgraph_node::remove): Likewise.
20496 (cgraph_node::dump): Likewise.
20497 (cgraph_node::verify_node): Likewise.
20498 * cgraph.h (chkp_function_instrumented_p): Likewise.
20499 (symtab_node::get_alias_target): Likewise.
20500 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
20501 (cgraph_local_p): Likewise.
20502 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
20503 (cgraph_edge::rebuild_references): Likewise.
20504 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
20505 (walk_polymorphic_call_targets): Likewise.
20506 (cgraph_node::expand_thunk): Likewise.
20507 (symbol_table::output_weakrefs): Likewise.
20508 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
20509 (ix86_handle_option): Likewise.
20510 * config/i386/constraints.md: Likewise.
20511 * config/i386/i386-builtin-types.def (BND): Likewise.
20512 (VOID): Likewise.
20513 (PVOID): Likewise.
20514 (ULONG): Likewise.
20515 * config/i386/i386-builtin.def (BDESC_END): Likewise.
20516 (BDESC_FIRST): Likewise.
20517 (BDESC): Likewise.
20518 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
20519 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
20520 * config/i386/i386.c (enum reg_class): Likewise.
20521 (ix86_target_string): Likewise.
20522 (ix86_option_override_internal): Likewise.
20523 (ix86_conditional_register_usage): Likewise.
20524 (ix86_valid_target_attribute_inner_p): Likewise.
20525 (ix86_set_indirect_branch_type): Likewise.
20526 (ix86_set_current_function): Likewise.
20527 (ix86_function_arg_regno_p): Likewise.
20528 (init_cumulative_args): Likewise.
20529 (ix86_function_arg_advance): Likewise.
20530 (ix86_function_arg): Likewise.
20531 (ix86_pass_by_reference): Likewise.
20532 (ix86_function_value_regno_p): Likewise.
20533 (ix86_function_value_1): Likewise.
20534 (ix86_function_value_bounds): Likewise.
20535 (ix86_return_in_memory): Likewise.
20536 (ix86_setup_incoming_vararg_bounds): Likewise.
20537 (ix86_va_start): Likewise.
20538 (indirect_thunk_need_prefix): Likewise.
20539 (print_reg): Likewise.
20540 (ix86_print_operand): Likewise.
20541 (ix86_expand_call): Likewise.
20542 (ix86_output_function_return): Likewise.
20543 (reg_encoded_number): Likewise.
20544 (BDESC_VERIFYS): Likewise.
20545 (ix86_init_mpx_builtins): Likewise.
20546 (ix86_init_builtins): Likewise.
20547 (ix86_emit_cmove): Likewise.
20548 (ix86_emit_move_max): Likewise.
20549 (ix86_expand_builtin): Likewise.
20550 (ix86_builtin_mpx_function): Likewise.
20551 (ix86_get_arg_address_for_bt): Likewise.
20552 (ix86_load_bounds): Likewise.
20553 (ix86_store_bounds): Likewise.
20554 (ix86_load_returned_bounds): Likewise.
20555 (ix86_store_returned_bounds): Likewise.
20556 (ix86_class_likely_spilled_p): Likewise.
20557 (ix86_hard_regno_mode_ok): Likewise.
20558 (x86_order_regs_for_local_alloc): Likewise.
20559 (ix86_mitigate_rop): Likewise.
20560 (ix86_bnd_prefixed_insn_p): Likewise.
20561 (ix86_mpx_bound_mode): Likewise.
20562 (ix86_make_bounds_constant): Likewise.
20563 (ix86_initialize_bounds): Likewise.
20564 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
20565 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
20566 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
20567 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
20568 (TARGET_CHKP_BOUND_MODE): Likewise.
20569 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
20570 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
20571 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
20572 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
20573 * config/i386/i386.h (TARGET_MPX): Likewise.
20574 (TARGET_MPX_P): Likewise.
20575 (VALID_BND_REG_MODE): Likewise.
20576 (FIRST_BND_REG): Likewise.
20577 (LAST_BND_REG): Likewise.
20578 (enum reg_class): Likewise.
20579 (BND_REG_P): Likewise.
20580 (BND_REGNO_P): Likewise.
20581 (BNDmode): Likewise.
20582 (ADJUST_INSN_LENGTH): Likewise.
20583 * config/i386/i386.md: Likewise.
20584 * config/i386/i386.opt: Likewise.
20585 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
20586 (defined): Likewise.
20587 (LINK_MPX): Likewise.
20588 (MPX_SPEC): Likewise.
20589 (LIBMPX_SPEC): Likewise.
20590 (LIBMPXWRAPPERS_SPEC): Likewise.
20591 (CHKP_SPEC): Likewise.
20592 * config/i386/predicates.md: Likewise.
20593 * dbxout.c (dbxout_type): Likewise.
20594 * doc/extend.texi: Likewise.
20595 * doc/invoke.texi: Likewise.
20596 * doc/md.texi: Likewise.
20597 * doc/tm.texi: Likewise.
20598 * doc/tm.texi.in: Likewise.
20599 * dwarf2out.c (is_base_type): Likewise.
20600 (gen_formal_types_die): Likewise.
20601 (gen_subprogram_die): Likewise.
20602 (gen_type_die_with_usage): Likewise.
20603 (gen_decl_die): Likewise.
20604 (dwarf2out_late_global_decl): Likewise.
20605 * expr.c (expand_assignment): Likewise.
20606 (emit_storent_insn): Likewise.
20607 (store_expr_with_bounds): Likewise.
20608 (store_expr): Likewise.
20609 (expand_expr_real_1): Likewise.
20610 * expr.h (store_expr_with_bounds): Likewise.
20611 * function.c (use_register_for_decl): Likewise.
20612 (struct bounds_parm_data): Likewise.
20613 (assign_parms_augmented_arg_list): Likewise.
20614 (assign_parm_find_entry_rtl): Likewise.
20615 (assign_parm_is_stack_parm): Likewise.
20616 (assign_parm_load_bounds): Likewise.
20617 (assign_bounds): Likewise.
20618 (assign_parms): Likewise.
20619 (expand_function_start): Likewise.
20620 * gcc.c (CHKP_SPEC): Likewise.
20621 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
20622 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
20623 (wrestrict_dom_walker::check_call): Likewise.
20624 * gimple.c (gimple_build_call_from_tree): Likewise.
20625 * gimple.h (enum gf_mask): Likewise.
20626 (gimple_call_with_bounds_p): Likewise.
20627 (gimple_call_set_with_bounds): Likewise.
20628 * gimplify.c (gimplify_init_constructor): Likewise.
20629 * ipa-cp.c (initialize_node_lattices): Likewise.
20630 (propagate_constants_across_call): Likewise.
20631 (find_more_scalar_values_for_callers_subset): Likewise.
20632 * ipa-hsa.c (process_hsa_functions): Likewise.
20633 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
20634 * ipa-icf.c (sem_function::merge): Likewise.
20635 * ipa-inline.c (early_inliner): Likewise.
20636 * ipa-pure-const.c (warn_function_noreturn): Likewise.
20637 (warn_function_cold): Likewise.
20638 (propagate_pure_const): Likewise.
20639 * ipa-ref.h (enum GTY): Likewise.
20640 * ipa-split.c (find_retbnd): Likewise.
20641 (consider_split): Likewise.
20642 (split_function): Likewise.
20643 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
20644 * ipa.c (walk_polymorphic_call_targets): Likewise.
20645 (symbol_table::remove_unreachable_nodes): Likewise.
20646 (process_references): Likewise.
20647 (cgraph_build_static_cdtor_1): Likewise.
20648 * lto-cgraph.c (lto_output_node): Likewise.
20649 (output_refs): Likewise.
20650 (compute_ltrans_boundary): Likewise.
20651 (input_overwrite_node): Likewise.
20652 (input_node): Likewise.
20653 (input_cgraph_1): Likewise.
20654 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
20655 * passes.c (pass_manager::execute_early_local_passes): Likewise.
20656 (class pass_chkp_instrumentation_passes): Likewise.
20657 (make_pass_chkp_instrumentation_passes): Likewise.
20658 * passes.def: Likewise.
20659 * rtl.h (struct GTY): Likewise.
20660 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
20661 * stor-layout.c (layout_type): Likewise.
20662 * symtab.c: Likewise.
20663 * target.def: Likewise.
20664 * targhooks.c (default_chkp_bound_type): Likewise.
20665 (default_chkp_bound_mode): Likewise.
20666 (default_builtin_chkp_function): Likewise.
20667 (default_chkp_function_value_bounds): Likewise.
20668 (default_chkp_make_bounds_constant): Likewise.
20669 (default_chkp_initialize_bounds): Likewise.
20670 * targhooks.h (default_chkp_bound_type): Likewise.
20671 (default_chkp_bound_mode): Likewise.
20672 (default_builtin_chkp_function): Likewise.
20673 (default_chkp_function_value_bounds): Likewise.
20674 (default_chkp_make_bounds_constant): Likewise.
20675 (default_chkp_initialize_bounds): Likewise.
20676 * toplev.c (compile_file): Likewise.
20677 (process_options): Likewise.
20678 * tree-core.h (DEF_BUILTIN): Likewise.
20679 (DEF_BUILTIN_CHKP): Likewise.
20680 * tree-inline.c (declare_return_variable): Likewise.
20681 (remap_gimple_stmt): Likewise.
20682 (copy_bb): Likewise.
20683 (initialize_inlined_parameters): Likewise.
20684 (expand_call_inline): Likewise.
20685 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
20686 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
20687 (make_pass_ipa_chkp_produce_thunks): Likewise.
20688 (make_pass_chkp): Likewise.
20689 (make_pass_chkp_opt): Likewise.
20690 (make_pass_chkp_instrumentation_passes): Likewise.
20691 * tree-pretty-print.c (dump_generic_node): Likewise.
20692 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
20693 * tree-ssa-dce.c (propagate_necessity): Likewise.
20694 (eliminate_unnecessary_stmts): Likewise.
20695 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
20696 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
20697 * tree-ssa-sccvn.h: Likewise.
20698 * tree-ssa-strlen.c (get_string_length): Likewise.
20699 (valid_builtin_call): Likewise.
20700 (adjust_last_stmt): Likewise.
20701 (handle_builtin_strchr): Likewise.
20702 (handle_builtin_strcpy): Likewise.
20703 (handle_builtin_stxncpy): Likewise.
20704 (handle_builtin_memcpy): Likewise.
20705 (handle_builtin_strcat): Likewise.
20706 (strlen_check_and_optimize_stmt): Likewise.
20707 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
20708 * tree-streamer-in.c: Likewise.
20709 * tree-streamer.c (record_common_node): Likewise.
20710 * tree.c (tree_code_size): Likewise.
20711 (wide_int_to_tree_1): Likewise.
20712 (type_contains_placeholder_1): Likewise.
20713 (build_common_tree_nodes): Likewise.
20714 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
20715 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
20716 (POINTER_BOUNDS_P): Likewise.
20717 (BOUNDED_TYPE_P): Likewise.
20718 (BOUNDED_P): Likewise.
20719 (CALL_WITH_BOUNDS_P): Likewise.
20720 (pointer_bounds_type_node): Likewise.
20721 * value-prof.c (gimple_ic): Likewise.
20722 * var-tracking.c (vt_add_function_parameters): Likewise.
20723 * varasm.c (make_decl_rtl): Likewise.
20724 (assemble_start_function): Likewise.
20725 (output_constant): Likewise.
20726 (maybe_assemble_visibility): Likewise.
20727 * varpool.c (ctor_for_folding): Likewise.
20728 * chkp-builtins.def: Remove.
20729 * ipa-chkp.c: Remove.
20730 * ipa-chkp.h: Remove.
20731 * rtl-chkp.c: Remove.
20732 * rtl-chkp.h: Remove.
20733 * tree-chkp-opt.c: Remove.
20734 * tree-chkp.c: Remove.
20735 * tree-chkp.h: Remove.
20736
20737 2018-06-07 Carl Love <cel@us.ibm.com>
20738
20739 * config/rs6000/vsx.md (vextract_fp_from_shorth,
20740 vextract_fp_from_shortl): Add BE support.
20741
20742 2018-06-07 Paul Koning <ni1d@arrl.net>
20743
20744 * compare-elim.c (try_merge_compare): Don't merge compare if
20745 address contains a side effect.
20746 (try_eliminate_compare): Likewise.
20747
20748 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
20749
20750 * config.gcc: Support "tremont".
20751 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
20752 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20753 PROCESSOR_TREMONT.
20754 * config/i386/i386.c (m_TREMONT): Define.
20755 (processor_target_table): Add "tremont".
20756 (PTA_TREMONT): Define.
20757 (ix86_lea_outperforms): Add TARGET_TREMONT.
20758 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
20759 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
20760 and M_INTEL_GOLDMONT_PLUS.
20761 (fold_builtin_cpu): Add "tremont".
20762 (ix86_add_stmt_cost): Add TARGET_TREMONT.
20763 (ix86_option_override_internal): Add "tremont".
20764 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
20765 (processor_type): Add PROCESSOR_TREMONT.
20766 * config/i386/x86-tune.def: Add m_TREMONT.
20767 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
20768
20769 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20770
20771 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
20772 symbol defined for msp430i* devices to be lower case.
20773
20774 2018-06-07 Richard Biener <rguenther@suse.de>
20775
20776 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
20777 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
20778 Properly wrap signed arithmetic if overflow wraps.
20779
20780 2018-06-07 Jakub Jelinek <jakub@redhat.com>
20781
20782 PR tree-optimization/69615
20783 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
20784 of a cast from a same precision integral SSA_NAME in a bb dominated
20785 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
20786 cast to utype if rhs2 has already a compatible type.
20787
20788 2018-06-07 Richard Biener <rguenther@suse.de>
20789
20790 PR tree-optimization/85935
20791 * graphite-scop-detection.c (find_params_in_bb): Analyze
20792 condition operands with respect to the correct loop. Assert
20793 the analysis doesn't fail.
20794
20795 2018-06-04 Carl Love <cel@us.ibm.com>
20796
20797 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
20798 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
20799 as it is slightly cheaper.
20800 (first_match_or_eos_index_<mode>):
20801 Calculate index using natural element order.
20802 (first_match_index_<mode>):
20803 Calculate index using natural element order.
20804 (first_match_or_eos_index_<mode>):
20805 Calculate index using natural order.
20806 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
20807 for BE and LE modes.
20808 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
20809 P9V_BUILTIN_VCLZLSBB_V16QI.
20810 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
20811 specific.
20812
20813 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20814
20815 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
20816 indentation and line wrap for many prototypes. Add missing
20817 @smallexample directives around block of prototypes for vec_xl and
20818 vec_xst.
20819
20820 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
20821
20822 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
20823 track if we pass or return IEEE 128-bit floating point.
20824 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
20825 C++ mangling that is compatible with GCC 8.1.
20826 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
20827 (init_cumulative_args): Note if we pass or return IEEE 128-bit
20828 floating point types.
20829 (rs6000_function_arg_advance_1): Likewise.
20830 (rs6000_mangle_type): Optionally generate mangled names that match
20831 what GCC 8.1 generated for IEEE 128-bit floating point types.
20832 (rs6000_globalize_decl_name): If we have an external function that
20833 passes or returns IEEE 128-bit types, generate a weak reference
20834 from the mangled name used in GCC 8.1 to the current mangled
20835 name.
20836 (rs6000_init_builtins): Make __ibm128 use the long double type if
20837 long double is IBM extended double. Make __float128 use the long
20838 double type if long double is IEEE 128-bit.
20839
20840 PR target/85657
20841 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
20842 macro for __ibm128 built-in functions.
20843 (PACK_IF): Add __ibm128 pack/unpack functions.
20844 (UNPACK_IF): Likewise.
20845 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
20846 enable long double built-in functions if long double is IEEE
20847 128-bit floating point.
20848 (rs6000_invalid_builtin): Update long double built-in function
20849 error message.
20850 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
20851 functions, adjust the built-in function to use the long double
20852 built-in function if __ibm128 and long double are the same type.
20853 * doc/extend.texi (PowerPC builtins): Update documention for
20854 __builtin_{,un}pack_longdouble. Add documentation for
20855 __builtin_{,un}pack_ibm128.
20856
20857 2018-06-06 Jim Wilson <jimw@sifive.com>
20858
20859 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
20860 (struct machine_function): New field interrupt_mode.
20861 (riscv_handle_type_attribute): New function. Add forward declaration.
20862 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
20863 (riscv_expand_epilogue): Check interrupt_mode field.
20864 (riscv_set_current_function): Check interrupt attribute args and
20865 set interrupt_mode field.
20866 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
20867 (riscv_sret, riscv_uret): New.
20868 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
20869 new arguments to interrupt attribute.
20870
20871 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
20872
20873 PR target/63177
20874 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
20875 Don't handle -mcpu=power8 if -mpower9-vector is also used.
20876
20877 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20878
20879 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
20880 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
20881 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
20882 several redundant entries.
20883
20884 2018-06-06 David Malcolm <dmalcolm@redhat.com>
20885
20886 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
20887 type from "rtx" to "rtx_insn *".
20888 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
20889 for local "call_insn", removing cast.
20890 (ix86_expand_call): Likewise, introducing a "call_insn" local.
20891
20892 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
20893
20894 PR tree-optimization/86066
20895 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
20896 for BIT_INSERT_EXPR stores.
20897
20898 2018-06-06 Richard Biener <rguenther@suse.de>
20899
20900 PR tree-optimization/86062
20901 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20902 component refs ontop
20903 of to be offsetted base.
20904
20905 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20906
20907 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
20908 to be static and remove check on interrupt attribute name.
20909
20910 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
20911
20912 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20913 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
20914
20915 2018-06-05 Steve Ellcey <sellcey@cavium.com>
20916
20917 PR target/79924
20918 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
20919 second argument.
20920 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
20921 Remove second argument, change how error is called.
20922 (aarch64_layout_arg): Remove second argument from
20923 aarch64_err_no_fpadvsimd call.
20924 (aarch64_init_cumulative_args): Ditto.
20925 (aarch64_gimplify_va_arg_expr): Ditto.
20926 * config/aarch64/aarch64.md (mov<mode>): Ditto.
20927
20928 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
20929
20930 * config/i386/i386.md (simple_return_indirect_internal): New expander.
20931 (*simple_return_indirect_internal<mode>): Rename from
20932 simple_return_indirect_internal. Use W mode iterator.
20933 (rstorssp): New expander.
20934 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
20935 (clrssbsy): New expander.
20936 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
20937
20938 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
20939
20940 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
20941 __typeof__.
20942 (cmse_check_pointed_object): Likewise.
20943
20944 2018-06-05 Martin Liska <mliska@suse.cz>
20945
20946 PR gcov-profile/47618
20947 * doc/invoke.texi: Document how -fprofile-dir format
20948 is extended.
20949
20950 2018-06-05 Richard Biener <rguenther@suse.de>
20951
20952 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
20953 removal pretend DOM info isn't available so we do not update
20954 it and only remove edges, not dominated blocks. Actually free
20955 DOM info in case we removed something. Remove unreachable blocks.
20956 (mfb_keep_latches): Work with either DOM info or marked backedges.
20957 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
20958 first. Mark backedges if DOM info isn't available.
20959 (Re-)compute DOM info after cleanup_control_flow_pre.
20960
20961 2018-06-05 Richard Biener <rguenther@suse.de>
20962
20963 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
20964 (locus_discrim_hasher::hash): Adjust.
20965 (locus_discrim_hasher::equal): Likewise.
20966 (next_discriminator_for_locus): Work on line directly.
20967 (same_line_p): Pass in expanded locus1 as well.
20968 (assign_discriminators): Avoid redundant location expansions.
20969
20970 2018-06-05 Richard Biener <rguenther@suse.de>
20971
20972 PR tree-optimization/86046
20973 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
20974 if required after clearing TREE_ADDRESSABLE.
20975
20976 2018-06-05 Richard Biener <rguenther@suse.de>
20977
20978 PR tree-optimization/86047
20979 * tree-ssa-loop.c (for_each_index): Glob handling of all
20980 decls and constants and really handle all of them.
20981
20982 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20983
20984 PR target/81497
20985 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
20986 qualifier_void_pointer and qualifier_const_void_pointer.
20987 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
20988 (arm_init_builtins): Handle the above.
20989 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
20990 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
20991 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
20992 void intrinsics.
20993
20994 2018-06-05 Martin Liska <mliska@suse.cz>
20995
20996 * auto-profile.c (read_autofdo_file): Do not use
20997 gcov_ctr_summary struct.
20998 (afdo_callsite_hot_enough_for_early_inline): Likewise.
20999 * coverage.c (struct counts_entry): Likewise.
21000 (read_counts_file): Read just single summary entry.
21001 (get_coverage_counts): Use gcov_summary struct.
21002 * coverage.h (get_coverage_counts): Likewise.
21003 * gcov-dump.c (dump_working_sets): Likewise.
21004 (tag_summary): Dump just single summary.
21005 * gcov-io.c (gcov_write_summary): Write just histogram
21006 summary.
21007 (gcov_read_summary): Read just single summary.
21008 (compute_working_sets): Use gcov_summary struct.
21009 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
21010 of GCOV_COUNTERS_SUMMABLE.
21011 (GCOV_COUNTERS_SUMMABLE): Remove.
21012 (GCOV_FIRST_VALUE_COUNTER): Replace with
21013 GCOV_COUNTER_V_INTERVAL.
21014 (struct gcov_ctr_summary): Remove.
21015 (struct gcov_summary): Directly use fields of former
21016 gcov_ctr_summary.
21017 (compute_working_sets): Use gcov_summary struct.
21018 * gcov.c (read_count_file): Do not use ctrs fields.
21019 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
21020 struct.
21021 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
21022 struct.
21023 * profile.c: Likewise.
21024 * profile.h: Likewise.
21025
21026 2018-06-05 Martin Liska <mliska@suse.cz>
21027
21028 PR gcov-profile/84846
21029 * gcov.c (output_lines): Print working directory only
21030 in intermediate format.
21031
21032 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
21033
21034 * config/s390/s390-builtin-types.def: Add void function type.
21035 * config/s390/s390-builtins.def: Use the function type for the
21036 tbeginc builtin.
21037
21038 2018-06-04 Jim Wilson <jimw@sifive.com>
21039
21040 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
21041 to int.
21042 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
21043 and maybe_eh_return. Change regno to unsigned int. Use new args to
21044 handle EH_RETURN_DATA_REGNO registers properly.
21045 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
21046 (riscv_expand_epilogue): Update comment. Change argument name and
21047 type. Update code to use new name and type. Pass new args to
21048 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
21049 EXCEPTION_RETURN.
21050 * config/riscv/riscv.md (NORMAL_RETURN): New.
21051 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
21052 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
21053 (eh_return): Call gen_eh_return_internal and emit barrier.
21054 (eh_return_internal): Call riscv_expand_epilogue.
21055
21056 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
21057
21058 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
21059 bit_insertion field and declare can_be_merged_into method.
21060 (merged_store_group::can_be_merged_into): New method.
21061 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
21062 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
21063 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
21064
21065 2018-06-04 Richard Biener <rguenther@suse.de>
21066
21067 PR tree-optimization/85955
21068 * builtins.c (fold_builtin_sincos): Convert pointers to
21069 destination to appropriate type before dereferencing.
21070
21071 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
21072
21073 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
21074
21075 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
21076
21077 * expr.c (expand_expr_real_1): Force the operand into memory if
21078 its TYPE_MODE is BLKmode and if there is no integer mode for
21079 the number of bits being extracted.
21080
21081 2018-06-04 Jakub Jelinek <jakub@redhat.com>
21082
21083 PR target/85832
21084 PR target/86036
21085 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
21086 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
21087
21088 2018-06-04 Richard Biener <rguenther@suse.de>
21089
21090 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
21091 (cleanup_tree_cfg_noloop): ... single caller. Do
21092 start_recording_case_labels later.
21093
21094 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
21095
21096 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
21097 to _IMMINTRIN_H_INCLUDED.
21098 * config/i386/pconfigintrin.h: Ditto.
21099 * config/i386/waitpkgintrin.h: Ditto.
21100 * config/i386/immintrin.h: Add includes for sgxintrin.h,
21101 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
21102 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
21103 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
21104 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
21105 waitpkgintrin.h and cldemoteintrin.h.
21106
21107 2018-06-04 Richard Biener <rguenther@suse.de>
21108
21109 PR tree-optimization/86038
21110 * tracer.c (find_best_successor): Check probability for
21111 being initialized, bail out if not.
21112
21113 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
21114
21115 PR target/86003
21116 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
21117 of bits to ignore when comparing architectures.
21118
21119 2018-06-04 Jakub Jelinek <jakub@redhat.com>
21120
21121 PR tree-optimization/69615
21122 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
21123 maximum or minimum of the type, try to merge it also as if
21124 range1 is + [-, x - 1] or + [x + 1, -].
21125
21126 PR c++/86025
21127 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
21128
21129 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
21130
21131 PR tree-optimization/86034
21132 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
21133 the unsigned bitfield type in a bit insertion sequence if it does not
21134 have a larger precision than the bitfield size.
21135 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
21136
21137 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
21138
21139 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
21140
21141 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
21142
21143 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
21144 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
21145 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
21146 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
21147
21148 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
21149
21150 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
21151 Disable -fdelete-null-pointer-checks for ELF toolchain.
21152
21153 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
21154 Kito Cheng <kito.cheng@gmail.com>
21155
21156 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
21157 (nds32le-*-*, nds32be-*-*): Integrate checking process.
21158 (nds32*-*-*): Add glibc and uclibc conditions.
21159 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
21160 (TARGET_EXCEPT_UNWIND_INFO): Define.
21161 * config/nds32/elf.h: New file.
21162 * config/nds32/linux.h: New file.
21163 * config/nds32/nds32-elf.opt: New file.
21164 * config/nds32/nds32-linux.opt: New file.
21165 * config/nds32/nds32-fp-as-gp.c
21166 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
21167 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
21168 TARGET_LINUX_ABI.
21169 (nds32_asm_file_end): Ditto.
21170 (nds32_print_operand): Ditto.
21171 (nds32_insert_attributes): Ditto.
21172 (nds32_init_libfuncs): New function.
21173 (TARGET_HAVE_TLS): Define.
21174 (TARGET_INIT_LIBFUNCS): Define.
21175 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
21176 spec content.
21177 (TARGET_ELF): Apply different mcmodel setting.
21178 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
21179 been migrated into elf.h and linux.h files.
21180 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
21181 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
21182 (mcmodel): The content has been migrated into nds32-elf.opt and
21183 nds32-linux.opt files.
21184 * config/nds32/t-elf: New file.
21185 * config/nds32/t-linux: New file.
21186
21187 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
21188 Shiva Chen <shiva0217@gmail.com>
21189
21190 * config/nds32/constants.md (unspec_volatile_element): Add
21191 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
21192 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
21193 optimization.
21194 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
21195 (make_pass_nds32_fp_as_gp): Declare.
21196 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
21197 optmization pass.
21198 (nds32_asm_function_end_prologue): Remove unused asm output.
21199 (nds32_asm_function_begin_epilogue): Remove unused asm output.
21200 (nds32_asm_file_start): Output necessary fp_as_gp information.
21201 (nds32_option_override): Adjust register usage.
21202 (nds32_expand_prologue): Consider fp_as_gp situation.
21203 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
21204 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
21205 (epilogue): Ditto.
21206 (return): Ditto.
21207 (simple_return): Ditto.
21208 (omit_fp_begin): Output special directive for fp_as_gp.
21209 (omit_fp_end): Output special directive for fp_as_gp.
21210 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
21211 mforbid-fp-as-gp): New options.
21212
21213 2018-06-01 Mark Wielaard <mark@klomp.org>
21214
21215 * dwarf2out.c (dwarf2out_finish): Remove generation of
21216 DW_AT_loclists_base.
21217
21218 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
21219
21220 * gimple-ssa-store-merging.c: Include gimple-fold.h.
21221 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
21222 (struct merged_store_group): Add bit_insertion field.
21223 (dump_char_array): Use standard hexadecimal format.
21224 (merged_store_group::merged_store_group): Set bit_insertion to false.
21225 (merged_store_group::apply_stores): Use optimal buffer size. Deal
21226 with BIT_INSERT_EXPR stores. Move up code updating the mask and
21227 also print the mask in the dump file.
21228 (pass_store_merging::gate): Minor tweak.
21229 (imm_store_chain_info::coalesce_immediate): Fix wrong association
21230 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
21231 stores with INTEGER_CST stores.
21232 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
21233 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
21234 and use it throughout. Generate bit insertion sequences if need be.
21235 (pass_store_merging::process_store): Remove redundant condition.
21236 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
21237
21238 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
21239
21240 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
21241 the 128-bit floating point types. Fix function comment.
21242
21243 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21244
21245 * config/aarch64/aarch64-simd.md
21246 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
21247 mnemonics.
21248 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
21249 mnemonics.
21250
21251 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21252
21253 PR tree-optimization/85989
21254 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
21255 variable.
21256 (backprop::intersect_uses): Check it when deciding whether this
21257 is a backedge reference.
21258 (backprop::process_block): Add each phi to m_visited_phis
21259 after visiting it, then clear it at the end.
21260
21261 2018-06-01 Richard Biener <rguenther@suse.de>
21262
21263 * tree-vectorizer.h (vect_dr_stmt): New function.
21264 (vect_get_load_cost): Adjust.
21265 (vect_get_store_cost): Likewise.
21266 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
21267 Use vect_dr_stmt instead of DR_SMTT.
21268 (vect_record_base_alignments): Likewise.
21269 (vect_calculate_target_alignment): Likewise.
21270 (vect_compute_data_ref_alignment): Likewise and make static.
21271 (vect_update_misalignment_for_peel): Likewise.
21272 (vect_verify_datarefs_alignment): Likewise.
21273 (vector_alignment_reachable_p): Likewise.
21274 (vect_get_data_access_cost): Likewise. Pass down
21275 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
21276 (vect_get_peeling_costs_all_drs): Likewise.
21277 (vect_peeling_hash_get_lowest_cost): Likewise.
21278 (vect_enhance_data_refs_alignment): Likewise.
21279 (vect_find_same_alignment_drs): Likewise.
21280 (vect_analyze_data_refs_alignment): Likewise.
21281 (vect_analyze_group_access_1): Likewise.
21282 (vect_analyze_group_access): Likewise.
21283 (vect_analyze_data_ref_access): Likewise.
21284 (vect_analyze_data_ref_accesses): Likewise.
21285 (vect_vfa_segment_size): Likewise.
21286 (vect_small_gap_p): Likewise.
21287 (vectorizable_with_step_bound_p): Likewise.
21288 (vect_prune_runtime_alias_test_list): Likewise.
21289 (vect_analyze_data_refs): Likewise.
21290 (vect_supportable_dr_alignment): Likewise.
21291 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
21292 (vect_gen_prolog_loop_niters): Likewise.
21293 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
21294 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
21295 modify DR_STMT.
21296 (vect_recog_mask_conversion_pattern): Likewise.
21297 (vect_try_gather_scatter_pattern): Likewise.
21298 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
21299 to vect_get_store_cost.
21300 (vect_get_store_cost): Get stmt_info instead of DR.
21301 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
21302 (vect_get_load_cost): Get stmt_info instead of DR.
21303
21304 2018-06-01 Richard Biener <rguenther@suse.de>
21305
21306 PR middle-end/86017
21307 * gimple-fold.c (var_decl_component_p): Also allow offsetted
21308 vars wrapped in MEM_REFs.
21309
21310 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21311
21312 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21313 Fix subreg tests so that we only return a choice between
21314 GENERAL_REGS and FP_REGS if the original classes included both.
21315
21316 2018-06-01 Richard Biener <rguenther@suse.de>
21317
21318 PR ipa/85960
21319 * tree-ssa-structalias.c (get_function_part_constraint):
21320 Handle NULL fi->decl.
21321 (find_func_aliases_for_call): Properly handle indirect
21322 fi from direct call.
21323 (find_func_clobbers): Likewise.
21324 (ipa_pta_execute): Likewise.
21325 (create_variable_info_for): For functions that are ifunc_resolver
21326 resolve to a varinfo that contains the result of the resolver call.
21327 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
21328 aliases.
21329
21330 2018-05-31 Michael Collison <michael.collison@arm.com>
21331
21332 * config/aarch64/aarch64.md:
21333 (*fix_to_zero_extenddfdi2): New pattern.
21334 * gcc.target/aarch64/fix_extend1.c: New testcase.
21335
21336 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
21337
21338 PR middle-end/78809
21339 PR middle-end/83026
21340 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
21341 and BUILT_IN_STRNCMP_EQ.
21342 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
21343 BUILT_IN_STRNCMP_EQ.
21344 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
21345 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21346 (gimple_fold_builtin): Likewise.
21347 * tree-ssa-strlen.c (compute_string_length): New function.
21348 (determine_min_obsize): New function.
21349 (handle_builtin_string_cmp): New function to handle calls to
21350 string compare functions.
21351 (strlen_optimize_stmt): Add handling to builtin string compare
21352 calls.
21353 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
21354 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21355 * tree.c (build_common_builtin_nodes): Add new defines of
21356 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
21357
21358 2018-05-31 Jakub Jelinek <jakub@redhat.com>
21359
21360 PR target/85984
21361 * bb-reorder.c (pass_partition_blocks::gate): Return false for
21362 functions with naked attribute.
21363
21364 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
21365
21366 * config/i386/sse.md (avx_vec_concat<mode>):
21367 Substitute concat_tg_mode mode attribute with xtg_mode.
21368 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
21369 (concat_tg_mode): Remove mode attribute.
21370
21371 2018-05-31 Martin Sebor <msebor@redhat.com>
21372
21373 PR c/82063
21374 * calls.c (alloc_max_size): Correct a logic error/typo.
21375 Treat excessive arguments as infinite. Warn for invalid arguments.
21376 * doc/invoke.texi (-Walloc-size-larger-than): Update.
21377
21378 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
21379
21380 PR target/85829
21381 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
21382 and movx for Haswell.
21383
21384 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
21385 Cesar Philippidis <cesar@codesourcery.com>
21386
21387 PR middle-end/85879
21388 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
21389 when emitting error on private/firstprivate reductions.
21390 * omp-low.c (lower_omp_target): Avoid reference-type processing
21391 on pointers for firstprivate clause.
21392
21393 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21394
21395 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
21396 (st1x2): Likewise.
21397 (st1x3): Likewise.
21398 * config/aarch64/aarch64-simd.md
21399 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
21400 (aarch64_ld1_x3_<mode>): Likewise
21401 (aarch64_st1x2<VALLDIF:mode>): Likewise
21402 (aarch64_st1_x2_<mode>): Likewise
21403 (aarch64_st1x3<VALLDIF:mode>): Likewise
21404 (aarch64_st1_x3_<mode>): Likewise
21405 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
21406 (vld1_s8_x3): Likewise.
21407 (vld1_u16_x3): Likewise.
21408 (vld1_s16_x3): Likewise.
21409 (vld1_u32_x3): Likewise.
21410 (vld1_s32_x3): Likewise.
21411 (vld1_u64_x3): Likewise.
21412 (vld1_s64_x3): Likewise.
21413 (vld1_f16_x3): Likewise.
21414 (vld1_f32_x3): Likewise.
21415 (vld1_f64_x3): Likewise.
21416 (vld1_p8_x3): Likewise.
21417 (vld1_p16_x3): Likewise.
21418 (vld1_p64_x3): Likewise.
21419 (vld1q_u8_x3): Likewise.
21420 (vld1q_s8_x3): Likewise.
21421 (vld1q_u16_x3): Likewise.
21422 (vld1q_s16_x3): Likewise.
21423 (vld1q_u32_x3): Likewise.
21424 (vld1q_s32_x3): Likewise.
21425 (vld1q_u64_x3): Likewise.
21426 (vld1q_s64_x3): Likewise.
21427 (vld1q_f16_x3): Likewise.
21428 (vld1q_f32_x3): Likewise.
21429 (vld1q_f64_x3): Likewise.
21430 (vld1q_p8_x3): Likewise.
21431 (vld1q_p16_x3): Likewise.
21432 (vld1q_p64_x3): Likewise.
21433 (vst1_s64_x2): Likewise.
21434 (vst1_u64_x2): Likewise.
21435 (vst1_f64_x2): Likewise.
21436 (vst1_s8_x2): Likewise.
21437 (vst1_p8_x2): Likewise.
21438 (vst1_s16_x2): Likewise.
21439 (vst1_p16_x2): Likewise.
21440 (vst1_s32_x2): Likewise.
21441 (vst1_u8_x2): Likewise.
21442 (vst1_u16_x2): Likewise.
21443 (vst1_u32_x2): Likewise.
21444 (vst1_f16_x2): Likewise.
21445 (vst1_f32_x2): Likewise.
21446 (vst1_p64_x2): Likewise.
21447 (vst1q_s8_x2): Likewise.
21448 (vst1q_p8_x2): Likewise.
21449 (vst1q_s16_x2): Likewise.
21450 (vst1q_p16_x2): Likewise.
21451 (vst1q_s32_x2): Likewise.
21452 (vst1q_s64_x2): Likewise.
21453 (vst1q_u8_x2): Likewise.
21454 (vst1q_u16_x2): Likewise.
21455 (vst1q_u32_x2): Likewise.
21456 (vst1q_u64_x2): Likewise.
21457 (vst1q_f16_x2): Likewise.
21458 (vst1q_f32_x2): Likewise.
21459 (vst1q_f64_x2): Likewise.
21460 (vst1q_p64_x2): Likewise.
21461 (vst1_s64_x3): Likewise.
21462 (vst1_u64_x3): Likewise.
21463 (vst1_f64_x3): Likewise.
21464 (vst1_s8_x3): Likewise.
21465 (vst1_p8_x3): Likewise.
21466 (vst1_s16_x3): Likewise.
21467 (vst1_p16_x3): Likewise.
21468 (vst1_s32_x3): Likewise.
21469 (vst1_u8_x3): Likewise.
21470 (vst1_u16_x3): Likewise.
21471 (vst1_u32_x3): Likewise.
21472 (vst1_f16_x3): Likewise.
21473 (vst1_f32_x3): Likewise.
21474 (vst1_p64_x3): Likewise.
21475 (vst1q_s8_x3): Likewise.
21476 (vst1q_p8_x3): Likewise.
21477 (vst1q_s16_x3): Likewise.
21478 (vst1q_p16_x3): Likewise.
21479 (vst1q_s32_x3): Likewise.
21480 (vst1q_s64_x3): Likewise.
21481 (vst1q_u8_x3): Likewise.
21482 (vst1q_u16_x3): Likewise.
21483 (vst1q_u32_x3): Likewise.
21484 (vst1q_u64_x3): Likewise.
21485 (vst1q_f16_x3): Likewise.
21486 (vst1q_f32_x3): Likewise.
21487 (vst1q_f64_x3): Likewise.
21488 (vst1q_p64_x3): Likewise.
21489
21490 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
21491
21492 * config/msp430/msp430.c (msp430_output_labelref): Prepend
21493 user_label_prefix to name.
21494
21495 * tree-core.h: Update comment about the format of NAME string
21496 passed to handler in attribute_spec.
21497
21498 * config/msp430/msp430.md: Remove erroneous subreg expression from
21499 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
21500 zero_extend{q,h}isi2.
21501
21502 2018-05-30 Borislav Petkov <bp@suse.de>
21503
21504 * doc/extend.texi: Document some architecture specific
21505 constraints and sort entries.
21506
21507 2018-05-30 Martin Sebor <msebor@redhat.com>
21508
21509 PR middle-end/85369
21510 * builtins.c (expand_builtin_stpcpy_1): New function.
21511 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
21512 only if the former succeeds.
21513
21514 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21515
21516 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
21517 in saphira.
21518
21519 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21520
21521 * doc/invoke.texi (-flinker-output): Document
21522
21523 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21524
21525 * passes.c (ipa_write_summaries): Only modify statements if body
21526 is in memory.
21527 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
21528 incrementally linking.
21529 (ipa_passes): Likewise.
21530 * lto-cgraph.c (lto_output_node): When incrementally linking do not
21531 pass down resolution info.
21532 * common.opt (flag_incremental_link): Update info.
21533 * gcc.c (plugin specs): Turn flinker-output=* to
21534 -plugin-opt=-linker-output-known
21535 * toplev.c (compile_file): Also cut compilation when doing incremental
21536 link.
21537 * flag-types. (enum lto_partition_model): Add
21538 LTO_LINKER_OUTPUT_NOLTOREL.
21539 (invoke.texi): Add -flinker-output docs.
21540 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
21541 link same way as WPA; do not stream in dead initializers.
21542
21543 * dwarf2out.c (dwarf2out_die_ref_for_decl,
21544 darf2out_register_external_decl): Support incremental link.
21545
21546 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21547
21548 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
21549
21550 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21551
21552 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
21553 it down to simple_object_copy_lto_debug_sections.
21554 (run_gcc): Determine incremental LTO link time and configure
21555 lto1 into non-wpa mode, disable renaming of debug sections.
21556
21557 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
21558
21559 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
21560 descriptions of various incorrectly documented functions.
21561
21562 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
21563
21564 Revert:
21565 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
21566 address check not strict.
21567
21568 2018-05-30 Richard Biener <rguenther@suse.de>
21569
21570 PR tree-optimization/85964
21571 * tracer.c (better_p): Drop initialized count check, we only
21572 call the function with initialized counts now.
21573 (find_best_successor): Do find a best edge if one
21574 has uninitialized count.
21575 (find_best_predecessor): Likewise. Do BB frequency check only
21576 if count is initialized.
21577
21578 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
21579
21580 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
21581 (aarch64_ldrstr_offset_compare): New.
21582 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
21583 load/store orderings.
21584 (aarch64_gen_adjusted_ldpstp): Likewise.
21585
21586 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
21587
21588 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21589 Check for subset of GENERAL_REGS and FP_REGS.
21590 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
21591 r=w alternative.
21592
21593 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
21594
21595 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
21596 and wi::to_poly_offset. Add the current offset and then check
21597 whether the sum fits, rather than using an unchecked addition of
21598 a checked term. Check for a shwi rather than a uhwi.
21599 * expr.c (get_bit_range): Use tree_to_poly_uint64.
21600 (store_constructor): Use poly_int_tree_p.
21601 (expand_expr_real_1): Likewise.
21602 * function.c (assign_temp): Likewise.
21603 * fold-const.c (const_binop): Use poly_int_tree_p and
21604 wi::to_poly_offset.
21605 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
21606 division.
21607 * ipa-icf-gimple.c (func_checker::compare_operand): Use
21608 to_poly_offset for MEM offsets.
21609 * ipa-icf.c (sem_variable::equals): Likewise.
21610 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
21611 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
21612 wi::to_poly_offset for BIT_FIELD_REF offsets.
21613 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
21614 wi::to_poly_offset.
21615 * var-tracking.c (emit_note_insn_var_location): Use
21616 tree_to_poly_uint64.
21617
21618 2018-05-29 Jim Wilson <jimw@sifive.com>
21619
21620 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
21621
21622 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
21623
21624 PR target/85950
21625 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
21626 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
21627 sequence.
21628 (sse4_1_round<mode>2): Use nonimmediate_operand
21629 for operand 1 predicate.
21630
21631 2018-05-29 Martin Sebor <msebor@redhat.com>
21632 Richard Biener <rguenther@suse.de>
21633
21634 PR testsuite/85888
21635 * calls.c (get_size_range): Call determine_value_range instead
21636 of get_value_range..
21637 * tree-vrp.h (determine_value_range): Declared new function.
21638 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
21639
21640 2018-05-29 Richard Biener <rguenther@suse.de>
21641
21642 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
21643 sure to use non-pattern stmts for get_earlier_stmt arguments.
21644 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
21645 called on pattern stmts.
21646 (get_later_stmt): Likewise.
21647
21648 2018-05-29 Martin Liska <mliska@suse.cz>
21649
21650 PR gcov-profile/85759
21651 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
21652 env variables.
21653
21654 2018-05-29 Jakub Jelinek <jakub@redhat.com>
21655
21656 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
21657 VEC_UNPACK_*_EXPR.
21658 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
21659 VEC_PACK_*_EXPR.
21660
21661 PR target/85918
21662 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21663 VEC_PACK_FLOAT_EXPR): New tree codes.
21664 * tree-pretty-print.c (op_code_prio): Handle
21665 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21666 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21667 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21668 * tree-inline.c (estimate_operator_cost): Likewise.
21669 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
21670 * fold-const.c (const_binop): Likewise.
21671 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
21672 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21673 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
21674 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
21675 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21676 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21677 * expr.c (expand_expr_real_2): Likewise.
21678 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
21679 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
21680 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
21681 optabs.
21682 * optabs.c (expand_widen_pattern_expr): For
21683 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
21684 sign from result type rather than operand's type.
21685 (expand_binop_directly): For vec_packu_float_optab and
21686 vec_packs_float_optab allow result type to be different from operand's
21687 type.
21688 * optabs-tree.c (optab_for_tree_code): Handle
21689 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21690 VEC_PACK_FLOAT_EXPR. Formatting fixes.
21691 * tree-vect-generic.c (expand_vector_operations_1): Handle
21692 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21693 VEC_PACK_FLOAT_EXPR.
21694 * tree-vect-stmts.c (supportable_widening_operation): Handle
21695 FIX_TRUNC_EXPR.
21696 (supportable_narrowing_operation): Handle FLOAT_EXPR.
21697 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
21698 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
21699 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
21700 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
21701 mode attributes.
21702 (vec_pack<floatprefix>_float_<mode>): New expander.
21703 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
21704 attributes.
21705 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
21706 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
21707 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
21708 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
21709 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
21710 Document.
21711 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
21712 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
21713 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21714 VEC_PACK_FLOAT_EXPR): Document.
21715
21716 2018-05-29 Richard Biener <rguenther@suse.de>
21717
21718 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
21719 member.
21720 (stmt_vec_info_vec): Make pointer.
21721 (init_stmt_vec_info_vec): Remove.
21722 (free_stmt_vec_info_vec): Likewise.
21723 (set_stmt_vec_info_vec): New function.
21724 (free_stmt_vec_infos): Likewise.
21725 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
21726 (set_vinfo_for_stmt): Likewise.
21727 (get_earlier_stmt): Likewise.
21728 (get_later_stmt): Likewise.
21729 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
21730 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
21731 (vec_info::~vec_info): Free stmt_vec_infos.
21732 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
21733 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
21734 (pass_slp_vectorize::execute): Likewise.
21735 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
21736 (free_stmt_vec_info_vec): Likewise.
21737 (set_stmt_vec_info_vec): New function.
21738 (free_stmt_vec_infos): Likewise.
21739 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
21740 the global stmt_vec_info_vec.
21741 * tree-parloops.c (gather_scalar_reductions): Use
21742 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
21743 vector.
21744
21745 2018-05-29 Richard Biener <rguenther@suse.de>
21746
21747 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
21748
21749 2018-05-29 Martin Liska <mliska@suse.cz>
21750 David Malcolm <dmalcolm@redhat.com>
21751
21752 * vec.c (test_reverse): New.
21753 (vec_c_tests): Add new test.
21754 * vec.h (vl_ptr>::reverse): New function.
21755
21756 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
21757
21758 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
21759
21760 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
21761 and later.
21762
21763 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
21764
21765 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
21766
21767 2018-05-28 Richard Biener <rguenther@suse.de>
21768
21769 PR tree-optimization/85933
21770 * tree-vect-data-refs.c (vect_record_base_alignments): Only
21771 look at stmts marked as vectorizable.
21772
21773 2018-05-28 Richard Biener <rguenther@suse.de>
21774
21775 PR tree-optimization/85934
21776 * tree-vect-generic.c (expand_vector_operations_1): Hoist
21777 vector boolean check before scalar optimization.
21778
21779 2018-05-28 Jakub Jelinek <jakub@redhat.com>
21780
21781 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
21782 for armv5te.
21783
21784 2018-05-28 Mark Wielaard <mark@klomp.org>
21785
21786 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
21787 if it is an expression containing a minus sign.
21788
21789 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
21790
21791 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
21792
21793 2018-05-27 Paul Koning <ni1d@arrl.net>
21794
21795 * config/pdp11/pdp11.md (truncsihi2): Remove.
21796
21797 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
21798 Chung-Ju Wu <jasonwucj@gmail.com>
21799
21800 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
21801 implementation.
21802 (unaligned_store_dw): Ditto.
21803 * config/nds32/nds32-memory-manipulation.c
21804 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
21805 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
21806 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
21807 (emit_setmem_word_loop): Rename to ...
21808 (emit_setmem_doubleword_loop): ... this.
21809 (nds32_gen_dup_4_byte_to_word_value): New function.
21810 (nds32_gen_dup_8_byte_to_double_word_value): New function.
21811 (nds32_expand_setmem_loop): Refine implementation.
21812 (nds32_expand_setmem_loop_v3m): Ditto.
21813 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
21814 pattern.
21815
21816 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21817
21818 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
21819
21820 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21821
21822 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
21823 (nds32_init_machine_status): Initialize machine->attr_naked_p and
21824 machine->attr_no_prologue_p.
21825 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
21826 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
21827 (nds32_expand_epilogue): Consider attr_naked_p.
21828 (nds32_expand_epilogue_v3pop): Likewise.
21829 (nds32_can_use_return_insn): Likewise.
21830 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
21831 attr_no_prologue_p fields.
21832 * config/nds32/nds32.opt (mret-in-naked-func): New option.
21833
21834 2018-05-27 Jakub Jelinek <jakub@redhat.com>
21835
21836 PR target/85918
21837 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
21838 attributes.
21839 * config/i386/sse.md
21840 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
21841 Rename to ...
21842 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
21843 ... this.
21844 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
21845 Rename to ...
21846 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
21847 ... this.
21848 (*<floatsuffix>floatv2div2sf2): Rename to ...
21849 (*float<floatunssuffix>v2div2sf2): ... this.
21850 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
21851 (float<floatunssuffix>v2div2sf2_mask): ... this.
21852 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
21853 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
21854 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
21855 to ...
21856 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
21857 ... this.
21858 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21859 Rename to ...
21860 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21861 ... this.
21862 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21863 Rename to ...
21864 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21865 ... this.
21866 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
21867 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
21868 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
21869 gen_ufix_truncv8dfv8si2.
21870 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
21871 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
21872 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
21873 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
21874 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
21875 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
21876 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
21877 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
21878
21879 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
21880
21881 PR target/85900
21882 PR target/85345
21883 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
21884
21885 2018-05-25 Jim Wilson <jimw@sifive.com>
21886
21887 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
21888 * config/riscv/riscv.c (struct machine_function): Add
21889 interrupt_handler_p and attribute_checked_p fields.
21890 (riscv_attribute_table): Add interrupt.
21891 (riscv_interrupt_type_p): New.
21892 (riscv_save_reg_p): Save extra regs for interrupt handler.
21893 (riscv_use_save_libcall): Return false for interrupt handler.
21894 (riscv_first_stack_step): Add forward declaration.
21895 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
21896 for interrupt handler with large frame. Use it for saved reg list.
21897 (riscv_expand_prologue): Move flag_stack_usage_info support to
21898 eliminate duplication.
21899 (riscv_expand_epilogue): Generate mret for interrupt handler.
21900 (riscv_epilogue_uses): New.
21901 (riscv_can_use_return_insn): Return false for interrupt handler.
21902 (riscv_function_ok_for_sibcall): Likewise.
21903 (riscv_set_current_function): Add interrupt handler support.
21904 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
21905 * config/riscv/riscv.md (UNSPECV_MRET): New.
21906 (GP_REGNUM): New.
21907 (riscv_frflags, riscv_fsflags): Use tab after opcode.
21908 (riscv_mret): New.
21909 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
21910
21911 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
21912
21913 PR tree-optimization/85712
21914 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
21915 this candidate has already been replaced in-situ by a copy.
21916
21917 2018-05-25 Jason Merrill <jason@redhat.com>
21918
21919 PR c++/80485 - inline function non-zero address.
21920 * symtab.c (nonzero_address): Check DECL_COMDAT.
21921
21922 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
21923
21924 PR target/83628
21925 * config/alpha/alpha.md (ashlsi3): New insn pattern.
21926 (*ashlsi_se): Rename from *ashldi_se. Define as sign
21927 extension of SImode operation. Use const123_operand predicate.
21928 (*saddsi_1): Remove.
21929 (*saddl_se_1): Ditto.
21930 (*ssubsi_1): Ditto.
21931 (*ssubl_se_1): Ditto.
21932 * config/alpha/predicates.md (const123_operand): New predicate.
21933 * config/alpha/constraints.md (P): Use IN_RANGE.
21934
21935 2018-05-25 Richard Biener <rguenther@suse.de>
21936
21937 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
21938 defaulted to true.
21939 (ref_maybe_used_by_stmt_p): Likewise.
21940 (stmt_may_clobber_ref_p): Likewise.
21941 (stmt_may_clobber_ref_p_1): Likewise.
21942 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
21943 and pass it along.
21944 (ref_maybe_used_by_stmt_p): Likewise.
21945 (stmt_may_clobber_ref_p): Likewise.
21946 (stmt_may_clobber_ref_p_1): Likewise.
21947 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
21948 the alias oracle to disambiguate DRs with stmts DR analysis
21949 couldn't handle.
21950 (vect_analyze_data_refs): Do not give up on not analyzable
21951 DRs for BB vectorization. Remove code truncating the dataref
21952 vector.
21953
21954 2018-05-25 Jakub Jelinek <jakub@redhat.com>
21955
21956 PR target/85832
21957 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
21958 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
21959 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
21960
21961 2018-05-25 Richard Biener <rguenther@suse.de>
21962
21963 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
21964 function, combining stmt data ref gathering and fatal analysis
21965 parts.
21966 (vect_analyze_data_refs): Remove now redudnant code and simplify.
21967 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
21968 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
21969 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
21970 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
21971
21972 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21973
21974 PR tree-optimization/85720
21975 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
21976 SCC if all partitions are builtins.
21977 (version_loop_by_alias_check): New parameter. Generate cancelable
21978 runtime alias check if all partitions are builtins.
21979 (distribute_loop): Update call to above function.
21980
21981 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21982
21983 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
21984 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
21985 (parm_default_def_partition_arg): Ditto.
21986 (set_parm_default_def_partition): Ditto.
21987 (get_parm_default_def_partitions): Ditto and make it static.
21988 (get_undefined_value_partitions): Ditto and make it static.
21989 (remove_ssa_form): Refactor call to init_var_map here.
21990 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
21991 computation for loop region.
21992 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
21993 (register_default_def): Delete.
21994 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
21995 (parm_default_def_partition_arg): Ditto.
21996 (set_parm_default_def_partition): Ditto.
21997 (get_parm_default_def_partitions): Ditto and make it static.
21998 (get_undefined_value_partitions): Ditto and make it static.
21999 (coalesce_with_default, coalesce_with_default): Update comment.
22000 (create_coalesce_list_for_region): New func factored out from
22001 create_outofssa_var_map.
22002 (populate_coalesce_list_for_outofssa): New func factored out from
22003 create_outofssa_var_map and coalesce_ssa_name.
22004 (create_outofssa_var_map): Delete.
22005 (coalesce_ssa_name): Refactor to support live range computation.
22006 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
22007 (get_parm_default_def_partitions): Delete.
22008 (get_undefined_value_partitions): Ditto.
22009 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
22010 computation for loop region.
22011 (new_tree_live_info, loe_visit_block): Ditto.
22012 (live_worklist, set_var_live_on_entry): Ditto.
22013 (calculate_live_on_exit, verify_live_on_entry): Ditto.
22014 * tree-ssa-live.h (struct _var_map): New fields.
22015 (init_var_map): Change decl.
22016 (region_contains_p): New.
22017
22018 2018-05-25 Bin Cheng <bin.cheng@arm.com>
22019
22020 * tree-ssa-live.h (live_merge_and_clear): Delete.
22021
22022 2018-05-25 Richard Biener <rguenther@suse.de>
22023
22024 PR c++/85912
22025 * tree-dump.c (dequeue_and_dump): Remove access to removed
22026 operand 2 of a SWITCH_EXPR.
22027
22028 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22029
22030 * doc/sourcebuild.texi (vect_double_cond_arith): Include
22031 multiplication and division.
22032 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
22033 (cond_udiv@var{m}, cond_umod@var{m}): Document.
22034 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
22035 (cond_udiv_optab, cond_umod_optab): New optabs.
22036 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
22037 (IFN_COND_RDIV): New internal functions.
22038 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
22039 TRUNC_MOD_EXPR and RDIV_EXPR.
22040 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
22041 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
22042 New unspecs.
22043 (SVE_INT_BINARY): Include mult.
22044 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
22045 (optab, sve_int_op): Handle mult.
22046 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
22047 UNSPEC_COND_DIV.
22048 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
22049 for SVE_INT_BINARY_SD.
22050
22051 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22052
22053 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
22054 (optab, sve_int_op): Handle div and udiv.
22055 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
22056 for SVE_INT_BINARY_SD.
22057 (*<optab><mode>3): New insn for the same.
22058
22059 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22060
22061 * tree-vect-patterns.c: Include predict.h.
22062 (vect_recog_divmod_pattern): Restrict check for division support
22063 to when optimizing for size.
22064
22065 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22066
22067 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
22068 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
22069 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
22070 (gimple_match_op::set_op): Likewise.
22071 (gimple_resimplify4): Declare.
22072 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
22073 (expr::gen_transform): Likewise.
22074 (decision_tree::gen): Generate a simplification routine for 4 operands.
22075 * gimple-match-head.c (gimple_simplify): Add an overload for
22076 4 operands. In the top-level function, handle up to 4 call
22077 arguments and call gimple_resimplify4.
22078 (gimple_resimplify4): New function.
22079 (build_call_internal): Pass a fourth operand.
22080 (maybe_push_to_seq): Likewise.
22081 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
22082 Fold VEC_COND_EXPRs of an operation and a default value into
22083 an IFN_COND_* function if possible.
22084 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
22085 New unspecs.
22086 (SVE_COND_FP_BINARY): Include them.
22087 (optab, sve_fp_op): Handle them.
22088 (SVE_INT_BINARY_REV): New code iterator.
22089 (SVE_COND_FP_BINARY_REV): New int iterator.
22090 (commutative): New int attribute.
22091 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
22092 Declare.
22093 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
22094 function.
22095 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
22096 (*cond_<optab><mode>): New patterns for reversed operands.
22097
22098 2018-05-25 Richard Biener <rguenther@suse.de>
22099
22100 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
22101 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
22102 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
22103 (STMT_VINFO_GROUPED_ACCESS): Adjust.
22104 * tree-vect-data-refs.c (everywhere): Adjust users.
22105 * tree-vect-loop.c (everywhere): Likewise.
22106 * tree-vect-slp.c (everywhere): Likewise.
22107 * tree-vect-stmts.c (everywhere): Likewise.
22108 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
22109
22110 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22111
22112 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
22113 Rename to...
22114 (gcc_cv_as_section_exclude): ... this.
22115 Try Solaris as #exclude syntax.
22116 * configure: Regenerate.
22117 * config.in: Regenerate.
22118 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
22119 SECTION_EXCLUDE.
22120 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
22121 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
22122
22123 * varasm.c (default_elf_asm_named_section): Don't check if
22124 HAVE_GAS_SECTION_EXCLUDE is defined.
22125
22126 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22127
22128 * doc/md.texi: Update the documentation of the cond_* optabs
22129 to mention the new final operand. Fix GET_MODE_NUNITS call.
22130 Describe the scalar case too.
22131 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
22132 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
22133 instead of 2.
22134 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
22135 (get_conditional_internal_fn): Update comment.
22136 * tree-vect-loop.c (vectorizable_reduction): Pass the original
22137 accumulator value as a final argument to conditional functions.
22138 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
22139 a define_expand and add an "else" operand. Assert for now that
22140 the else operand is equal to operand 2. Use SVE_INT_BINARY and
22141 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
22142 (*cond_<optab><mode>): New patterns.
22143 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
22144 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22145 (UNSPEC_COND_EOR): Delete.
22146 (optab): Remove associated mappings.
22147 (SVE_INT_BINARY): New code iterator.
22148 (sve_int_op): Remove int attribute and add "minus" to the code
22149 attribute.
22150 (SVE_COND_INT_OP): Delete.
22151 (SVE_COND_FP_OP): Rename to...
22152 (SVE_COND_FP_BINARY): ...this.
22153
22154 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22155
22156 * optabs.c (can_reuse_operands_p): New function.
22157 (maybe_legitimize_operands): Try to reuse the results for
22158 earlier operands.
22159
22160 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
22161
22162 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
22163 Add {q} suffix to insn mnemonic.
22164
22165 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
22166
22167 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
22168 (msp430_warn_func_return): New.
22169
22170 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
22171
22172 * fold-const.c (tree_nonzero_bits): New function.
22173 * fold-const.h (tree_nonzero_bits): Likewise.
22174 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
22175 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
22176
22177 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
22178
22179 PR target/85900
22180 PR target/85345
22181 * varasm.c (assemble_alias): Check ifunc_resolver only on
22182 FUNCTION_DECL.
22183
22184 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
22185
22186 PR target/85903
22187 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
22188 when memory input operand is handled.
22189
22190 2018-05-24 Luis Machado <luis.machado@linaro.org>
22191
22192 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
22193 global.
22194 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
22195
22196 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22197
22198 * match.pd: Delay FMA folds until after vectorization.
22199
22200 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
22201
22202 PR target/83009
22203 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
22204 address check not strict.
22205
22206 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22207
22208 * gimple-match.h (gimple_match_op): New class.
22209 (mprts_hook): Replace parameters with a gimple_match_op *.
22210 (maybe_build_generic_op): Likewise.
22211 (gimple_simplified_result_is_gimple_val): Replace parameters with
22212 a const gimple_match_op *.
22213 (gimple_simplify): Replace code_helper * and tree * parameters with
22214 a gimple_match_op * parameter.
22215 (gimple_resimplify1): Replace code_helper *, tree and tree *
22216 parameters with a gimple_match_op * parameter.
22217 (gimple_resimplify2): Likewise.
22218 (gimple_resimplify3): Likewise.
22219 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
22220 parameters with a gimple_match_op * parameter.
22221 * gimple-match-head.c (gimple_simplify): Change prototypes of
22222 auto-generated functions to take a gimple_match_op * instead of
22223 separate code_helper * and tree * parameters. Make the same
22224 change in the top-level overload and update calls to the
22225 gimple_resimplify routines. Update calls to the auto-generated
22226 functions and to maybe_push_res_to_seq in the publicly-facing
22227 operation-specific gimple_simplify overloads.
22228 (gimple_match_op::MAX_NUM_OPS): Define.
22229 (gimple_resimplify1): Replace rcode and ops with a single res_op
22230 parameter. Update call to gimple_simplify.
22231 (gimple_resimplify2): Likewise.
22232 (gimple_resimplify3): Likewise.
22233 (mprts_hook): Replace parameters with a gimple_match_op *.
22234 (maybe_build_generic_op): Likewise.
22235 (build_call_internal): Replace type, nargs and ops with
22236 a gimple_match_op *.
22237 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
22238 with a single gimple_match_op *. Update calls to mprts_hook,
22239 build_call_internal and gimple_simplified_result_is_gimple_val.
22240 Factor out code that is common to the tree_code and combined_fn cases.
22241 * genmatch.c (expr::gen_transform): Replace tem_code and
22242 tem_ops with a gimple_match_op called tem_op. Update calls
22243 to the gimple_resimplify functions and maybe_push_res_to_seq.
22244 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
22245 res_ops. Update call to the gimple_resimplify functions.
22246 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
22247 (decision_tree::gen): Make the functions take a gimple_match_op *
22248 called res_op instead of separate res_code and res_ops parameters.
22249 Update call accordingly.
22250 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
22251 and ops with a single res_op parameter. Update calls to
22252 maybe_build_generic_op and maybe_push_res_to_seq.
22253 (fold_stmt_1): Update calls to gimple_simplify and
22254 replace_stmt_with_simplification.
22255 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
22256 and gimple_simplified_result_is_gimple_val.
22257 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
22258 gimple_simplify.
22259 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
22260 with a gimple_match_op *.
22261 (vn_nary_build_or_lookup): Likewise. Update call to
22262 vn_nary_build_or_lookup_1.
22263 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
22264 gimple_match_op *. Update calls to the gimple_resimplify routines
22265 and to gimple_simplified_result_is_gimple_val.
22266 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
22267 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
22268 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
22269 (visit_nary_op): Likewise.
22270 (visit_reference_op_load): Likewise.
22271
22272 2018-05-23 Luis Machado <luis.machado@linaro.org>
22273
22274 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
22275 modifier for printing the step amount.
22276
22277 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
22278
22279 PR target/78849
22280 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
22281 types.
22282
22283 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
22284
22285 * doc/sourcebuild.texi (Endianness): New subsubsection.
22286
22287 2018-05-23 Luis Machado <luis.machado@linaro.org>
22288
22289 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22290 <prefetch_dynamic_strides>: New const bool field.
22291 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22292 prefetch_dynamic_strides.
22293 (exynosm1_prefetch_tune): Likewise.
22294 (thunderxt88_prefetch_tune): Likewise.
22295 (thunderx_prefetch_tune): Likewise.
22296 (thunderx2t99_prefetch_tune): Likewise.
22297 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
22298 false.
22299 (aarch64_override_options_internal): Update to set
22300 PARAM_PREFETCH_DYNAMIC_STRIDES.
22301 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22302 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22303 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22304 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22305 prefetch-dynamic-strides setting.
22306
22307 2018-05-23 Luis Machado <luis.machado@linaro.org>
22308
22309 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22310 <minimum_stride>: New const int field.
22311 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22312 minimum_stride field defaulting to -1.
22313 (exynosm1_prefetch_tune): Likewise.
22314 (thunderxt88_prefetch_tune): Likewise.
22315 (thunderx_prefetch_tune): Likewise.
22316 (thunderx2t99_prefetch_tune): Likewise.
22317 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
22318 <default_opt_level>: Set to 3.
22319 (aarch64_override_options_internal): Update to set
22320 PARAM_PREFETCH_MINIMUM_STRIDE.
22321 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22322 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22323 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22324 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22325 stride is constant and is below the minimum stride threshold.
22326
22327 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22328
22329 * config/arm/arm-cpus.in (mode26): Delete.
22330 (armv4): Delete mode26 reference.
22331 * config/arm/arm.c (arm_configure_build_target): Delete use of
22332 isa_bit_mode26.
22333
22334 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22335
22336 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
22337 New insn pattern.
22338 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
22339 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
22340 for non-SSE modes.
22341 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
22342 (floatunsdidf2): Ditto.
22343
22344 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22345
22346 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
22347 (fixuns_trunc<mode>si2_avx512f): Ditto.
22348 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
22349 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
22350 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
22351
22352 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22353
22354 PR rtl-optimization/79985
22355 * df-scan.c (df_insn_refs_collect): Remove special case for
22356 global registers and asm statements.
22357
22358 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22359
22360 * extend.texi (Global Register Variables): Rewrite the bullet list.
22361 Note that the register is available for allocation. Note that access
22362 via inline asm must use constraints. Add note about async-signal
22363 handlers. Remove paragraph about automagic register selection.
22364
22365 2018-05-23 Richard Biener <rguenther@suse.de>
22366
22367 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
22368 of fixed offset from memset VN.
22369
22370 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
22371
22372 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
22373 first_interp field.
22374 (alloc_cand_and_find_basis): Initialize first_interp field.
22375 (slsr_process_mul): Modify first_interp field.
22376 (slsr_process_add): Likewise.
22377 (slsr_process_cast): Modify first_interp field for each new
22378 interpretation.
22379 (slsr_process_copy): Likewise.
22380 (dump_candidate): Dump first_interp field.
22381 (replace_mult_candidate): Process all interpretations, not just
22382 subsequent ones.
22383 (replace_rhs_if_not_dup): Likewise.
22384 (replace_one_candidate): Likewise.
22385
22386 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
22387
22388 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
22389 Add new boolean.
22390 (aarch64_needs_frame_chain): New function.
22391 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
22392
22393 2018-05-23 Sudakshina Das <sudi.das@arm.com>
22394
22395 PR target/84882
22396 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
22397 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
22398 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
22399 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
22400 as true for strict-align.
22401 (aarch64_can_inline_p): Perform checks even when callee has no
22402 attributes to check for strict alignment.
22403 * doc/extend.texi (AArch64 Function Attributes): Document
22404 no-strict-align.
22405 * doc/invoke.texi: (AArch64 Options): Likewise.
22406
22407 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
22408
22409 PR tree-optimization/85853
22410 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
22411 the handling of the root of the node to...
22412 (vect_slp_analyze_node_operations_1): ...this new function,
22413 and run the whole thing with the child nodes' def types
22414 set according to their SLP node's def type.
22415
22416 2018-05-23 Richard Biener <rguenther@suse.de>
22417
22418 PR middle-end/85874
22419 * tree-data-ref.c (create_runtime_alias_checks): Defer
22420 and ignore overflow warnings.
22421
22422 2018-05-23 Yury Gribov <tetra2005@gmail.com>
22423
22424 PR tree-optimization/85822
22425 * tree-vrp.c (is_masked_range_test): Fix handling of negative
22426 constants.
22427
22428 2018-05-23 Richard Biener <rguenther@suse.de>
22429
22430 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
22431 memset constants via native_interpret_expr.
22432
22433 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
22434
22435 PR target/85345
22436 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
22437 attribute.
22438 (cgraph_node::create_alias): Likewise.
22439 (cgraph_node::get_availability): Check ifunc_resolver instead
22440 of looking up ifunc attribute.
22441 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
22442 * varasm.c (do_assemble_alias): Likewise.
22443 (assemble_alias): Likewise.
22444 (default_binds_local_p_3): Likewise.
22445 * cgraph.h (cgraph_node): Add ifunc_resolver.
22446 (cgraph_node::only_called_directly_or_aliased_p): Return false
22447 for IFUNC resolver.
22448 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
22449 attribute.
22450 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
22451 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
22452 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
22453 instead of looking up ifunc attribute.
22454
22455 2018-05-22 Luis Machado <luis.machado@linaro.org>
22456
22457 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
22458
22459 2018-05-22 Martin Sebor <msebor@redhat.com>
22460
22461 PR middle-end/85359
22462 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
22463 only when expasion succeeds.
22464 (expand_builtin_strcmp): Same.
22465 (expand_builtin_strncmp): Same.
22466
22467 2018-05-22 Martin Sebor <msebor@redhat.com>
22468
22469 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
22470
22471 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22472 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22473
22474 * config/aarch64/aarch64-ldpstp.md: Replace uses of
22475 aarch64_mem_pair_operand with memory_operand and delete operand swapping
22476 code.
22477 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22478 Add check for legitimate_address.
22479 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
22480 (aarch64_swap_ldrstr_operands): New.
22481 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
22482 Define prototype.
22483
22484 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22485 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22486
22487 * config/aarch64/aarch64.md: New patterns to generate stp
22488 and ldp.
22489 (store_pair_sw, store_pair_dw): New patterns to generate stp for
22490 single words and double words.
22491 (load_pair_sw, load_pair_dw): Likewise.
22492 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
22493 Delete.
22494 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
22495 Delete.
22496 * config/aarch64/aarch64-ldpstp.md: Modify peephole
22497 for different mode ldpstp and add peephole for merged zero stores.
22498 Likewise for loads.
22499 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22500 Add size check.
22501 (aarch64_gen_store_pair): Rename calls to match new patterns.
22502 (aarch64_gen_load_pair): Rename calls to match new patterns.
22503 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
22504 (load_pair<DREG:mode><DREG2:mode>): ... This.
22505 (store_pair<mode>): Rename to...
22506 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
22507 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
22508 New mode iterators.
22509 (V_INT_EQUIV): Handle SImode.
22510 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
22511 New predicate.
22512
22513 2018-05-22 Martin Sebor <msebor@redhat.com>
22514
22515 PR c/85623
22516 * calls.c (maybe_warn_nonstring_arg): Use string length to set
22517 or ajust the presumed bound on an operation to avoid unnecessary
22518 warnings.
22519
22520 2018-05-22 Martin Sebor <msebor@redhat.com>
22521
22522 PR tree-optimization/85826
22523 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
22524 assuming that a DECL necesarily has a constant size.
22525
22526 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
22527
22528 PR middle-end/85862
22529 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
22530
22531 2018-05-22 Richard Biener <rguenther@suse.de>
22532
22533 PR tree-optimization/85834
22534 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
22535 non-constant and non-zero memset arguments.
22536
22537 2018-05-22 Martin Liska <mliska@suse.cz>
22538
22539 PR ipa/85607
22540 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
22541
22542 2018-05-22 Richard Biener <rguenther@suse.de>
22543
22544 PR tree-optimization/85863
22545 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
22546 comparisons when vectype is specified.
22547 (vectorizable_condition): Do not specify vectype for
22548 vect_is_simple_cond when SLP vectorizing.
22549
22550 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
22551
22552 PR target/85657
22553 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
22554 define __ibm128 as long double.
22555 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
22556 as a distinct type when IEEE 128-bit support is enabled.
22557 (init_float128_ieee): Fix up conversions between IFmode and IEEE
22558 128-bit types to use the correct functions.
22559 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
22560 convert between 128-bit floating point types that have different
22561 modes but the same representation, instead of using gen_lowpart to
22562 makean alias.
22563 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
22564 KFmode.
22565 (IFKF_reg): New attributes to give the register constraints for
22566 IFmode and KFmode.
22567 (extend<mode>tf2_internal): New insns to mark an explicit
22568 conversion between 128-bit floating point types that have a
22569 different mode but share the same representation.
22570
22571 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
22572
22573 PR tree-optimization/85814
22574 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
22575 a null return from get_strinfo when unsharing the next
22576 strinfo in the chain.
22577
22578 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22579
22580 PR gcc/84923
22581 * varasm.c (weak_finish): Clean up weak_decls.
22582
22583 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22584
22585 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
22586 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
22587 UNSPEC_UADALP values.
22588 * config/aarch64/iterators.md (ABAL): New int iterator.
22589 (ABDL2): Likewise.
22590 (ADALP): Likewise.
22591 (sur): Add mappings for the above.
22592 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
22593 New define_insn.
22594 (aarch64_<sur>abal<mode>_4): Likewise.
22595 (aarch64_<sur>adalp<mode>_3): Likewise.
22596 (<sur>sadv16qi): New define_expand.
22597
22598 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
22599
22600 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
22601 (*movdf_internal): Ditto.
22602 (*rcpsf2_sse): Ditto.
22603 (*rsqrtsf2_sse): Ditto.
22604 (*sqrt<mode>2_sse): Ditto.
22605
22606 2018-05-21 Tamar Christina <tamar.christina@arm.com>
22607
22608 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
22609 eor3q<mode>4.
22610 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
22611 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
22612 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
22613 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
22614 vbcaxq_s64): New.
22615 * config/aarch64/arm_neon.h: Likewise.
22616 * config/aarch64/iterators.md (VQ_I): New.
22617
22618 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
22619
22620 * config.gcc: Add arc/t-multilib-linux to tmake_file for
22621 arc*-*-linux*.
22622 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
22623 MULTILIB_DIRNAMES
22624
22625 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22626
22627 * config/nds32/constraints.md (S): New constraint.
22628 * config/nds32/nds32.md (call_internal): Use constraint S.
22629 (call_value_internal): Likewise.
22630 (sibcall_internal): Likewise.
22631 (sibcall_value_internal): Likewise.
22632
22633 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22634 Chung-Ju Wu <jasonwucj@gmail.com>
22635
22636 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
22637 into consideration.
22638
22639 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22640 Chung-Ju Wu <jasonwucj@gmail.com>
22641
22642 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
22643 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
22644 (nds32_rtx_costs_impl): Simplify.
22645 (nds32_address_cost_impl): Simplify.
22646 (nds32_init_rtx_costs): New function.
22647 (nds32_rtx_costs_speed_prefer): Likewise.
22648 (nds32_rtx_costs_size_prefer): Likewise.
22649 (nds32_address_cost_speed_prefer): Likewise.
22650 (nds32_address_cost_speed_fwprop): Likewise.
22651 (nds32_address_cost_size_prefer): Likewise.
22652 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
22653 * config/nds32/nds32.c (nds32_option_override): Use
22654 nds32_init_rtx_costs function.
22655
22656 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22657
22658 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
22659 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
22660 (TARGET_PIPELINE_N8): Likewise.
22661 (TARGET_PIPELINE_N10): Likewise.
22662 (TARGET_PIPELINE_N13): Likewise.
22663 (TARGET_PIPELINE_GRAYWOLF): Likewise.
22664
22665 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
22666
22667 * config/nds32/nds32-fpu.md: Update copyright year.
22668
22669 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22670
22671 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
22672
22673 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22674
22675 * config/nds32/nds32.c
22676 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
22677 * config/nds32/nds32.opt (minline-asm-r15): New option.
22678
22679 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22680
22681 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
22682 MASK_HW_ABS.
22683 * config/nds32/nds32.md (abssi2): New pattern.
22684
22685 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
22686
22687 * config/i386/i386.md (rex64namesuffix): New mode attribute.
22688 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
22689 Merge insn pattern from sse_cvtsi2ss<round_name> and
22690 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
22691 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
22692 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
22693 using SWI48 mode iterator.
22694 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
22695 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
22696 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
22697 pattern from sse_cvttss2si<round_saeonly_name>
22698 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
22699 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
22700 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
22701 using SWI48 mode iterator.
22702 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
22703 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
22704 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
22705 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
22706 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
22707 using SWI48 mode iterator.
22708 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
22709 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
22710 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
22711 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
22712 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
22713 SWI48 mode iterator.
22714 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
22715 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
22716 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
22717 pattern from sse_cvttsd2si<round_saeonly_name>
22718 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
22719
22720 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22721
22722 * config/nds32/nds32-md-auxiliary.c
22723 (nds32_valid_smw_lwm_base_p): Refine.
22724 (nds32_output_smw_single_word): Refine.
22725 (nds32_output_smw_double_word): New.
22726 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
22727
22728 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22729
22730 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
22731 (nds32_output_stack_pop): Refine.
22732 (nds32_expand_unaligned_load): Refine.
22733 (nds32_expand_unaligned_store): Refine.
22734
22735 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22736 Chung-Ju Wu <jasonwucj@gmail.com>
22737
22738 * config/nds32/constants.md: Add TP_REGNUM constant.
22739 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
22740 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
22741 UNSPEC_ADD32.
22742 * config/nds32/nds32-doubleword.md: Consider flag_pic.
22743 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
22744 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
22745 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
22746 and PIC code generation.
22747 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
22748 code generation.
22749 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
22750 optimization.
22751 * config/nds32/nds32.md: Support TLS and PIC.
22752 * config/nds32/nds32.c: Support TLS and PIC.
22753 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
22754 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
22755 predicate.
22756
22757 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22758
22759 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
22760 mode with E_ prefix.
22761
22762 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22763 Chung-Ju Wu <jasonwucj@gmail.com>
22764
22765 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
22766 * config/nds32/nds32-md-auxiliary.c
22767 (symbolic_reference_mentioned_p): New.
22768 (nds32_legitimize_ict_address): New.
22769 (nds32_expand_ict_move): New.
22770 (nds32_indirect_call_referenced_p): New.
22771 (nds32_symbol_binds_local_p): Delete.
22772 (nds32_long_call_p): Modify.
22773 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
22774 * config/nds32/nds32-protos.h
22775 (symbolic_reference_mentioned_p): Declare.
22776 (nds32_legitimize_ict_address): Declare.
22777 (nds32_expand_ict_move): Declare.
22778 (nds32_indirect_call_referenced_p): Declare.
22779 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
22780 (nds32_relax_group): Use nds32_ict_const_p as condition.
22781 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
22782 (nds32_asm_file_start): Output ict_model directive in asm code.
22783 (nds32_legitimate_address_p): Consider indirect call.
22784 (nds32_print_operand): Consider indirect call.
22785 (nds32_print_operand_address): Consider indirect call.
22786 (nds32_insert_attributes): Handle "indirect_call" attribute.
22787 (TARGET_LEGITIMATE_ADDRESS_P): Define.
22788 (TARGET_LEGITIMATE_CONSTANT_P): Define.
22789 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
22790 (TARGET_DELEGITIMIZE_ADDRESS): Define.
22791 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
22792 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
22793 (TARGET_ICT_MODEL_SMALL): Define.
22794 (TARGET_ICT_MODEL_LARGE): Define.
22795 * config/nds32/nds32.md (movsi): Consider ict model.
22796 (call, call_value): Consider ict model.
22797 (sibcall, sibcall_value): Consider ict model.
22798 * config/nds32/nds32.opt (mict-model): New option.
22799 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
22800 model.
22801
22802 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
22803 Monk Chiang <sh.chiang04@gmail.com>
22804 Jim Wilson <jimw@sifive.com>
22805
22806 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
22807 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
22808 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
22809 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
22810 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
22811 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
22812 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
22813 compute save_libcall_adjustment properly.
22814 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
22815 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
22816 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
22817 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
22818 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
22819 (ABI_SPEC): Handle mabi=ilp32e.
22820 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
22821 (RVE): Add RVE mask.
22822 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
22823 <-march>: Add rv32e as an example.
22824
22825 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
22826
22827 PR c++/82899
22828 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
22829 (intra_create_variable_infos): Handle C++ constructors.
22830
22831 2018-05-18 Martin Liska <mliska@suse.cz>
22832
22833 * passes.def: Remove a redundant pass.
22834
22835 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
22836
22837 PR bootstrap/85838
22838 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
22839
22840 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22841
22842 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
22843 (ARMv4): Update.
22844 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
22845 (ARMv6m): Update.
22846 (armv2, armv2a, armv3, armv3m): Delete architectures.
22847 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
22848 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
22849 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
22850 Delete cpus.
22851 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
22852 (*mulsidi3adddi): Likewise.
22853 (mulsidi3): Likewise.
22854 (*mulsidi3_nov6): Likewise.
22855 (umulsidi3): Likewise.
22856 (umulsidi3_nov6): Likewise.
22857 (umaddsidi4): Likewise.
22858 (*umulsidi3adddi): Likewise.
22859 (smulsi3_highpart): Likewise.
22860 (*smulsi3_highpart_nov6): Likewise.
22861 (umulsi3_highpart): Likewise.
22862 (*umulsi3_highpart_nov6): Likewise.
22863 * config/arm/arm.h (arm_arch3m): Delete.
22864 * config/arm/arm.c (arm_arch3m): Delete.
22865 (arm_option_override_internal): Update armv3-related comment.
22866 (arm_configure_build_target): Delete use of isa_bit_mode32.
22867 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
22868 (arm_rtx_costs_internal): Delete check of arm_arch3m.
22869 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
22870 (mulsa3): Likewise.
22871 (mulusa3): Likewise.
22872 * config/arm/arm-protos.h (arm_arch3m): Delete.
22873 * config/arm/arm-tables.opt: Regenerate.
22874 * config/arm/arm-tune.md: Likewise.
22875 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
22876 deleted architectures.
22877
22878 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22879
22880 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
22881 (armv5t, armv5te): New features.
22882 (ARMv5, ARMv5e): Delete fgroups.
22883 (ARMv5t, ARMv5te): Adjust for above changes.
22884 (ARMv6m): Likewise.
22885 (armv5, armv5e): Delete arches.
22886 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
22887 arm_arch5.
22888 (*call_reg_arm): Likewise.
22889 (*call_value_reg_armv5): Likewise.
22890 (*call_value_reg_arm): Likewise.
22891 (*call_symbol): Likewise.
22892 (*call_value_symbol): Likewise.
22893 (*sibcall_insn): Likewise.
22894 (*sibcall_value_insn): Likewise.
22895 (clzsi2): Likewise.
22896 (prefetch): Likewise.
22897 (define_split and define_peephole2 dependent on arm_arch5):
22898 Likewise.
22899 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
22900 arm_arch5e.
22901 (TARGET_ARM_QBIT): Likewise.
22902 (TARGET_DSP_MULTIPLY): Likewise.
22903 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
22904 (arm_arch5, arm_arch5e): Delete.
22905 (arm_arch5t, arm_arch5te): Declare.
22906 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
22907 (arm_arch5t): Declare.
22908 (arm_option_reconfigure_globals): Update for the above.
22909 (arm_options_perform_arch_sanity_checks): Update comment, replace
22910 use of arm_arch5 with arm_arch5t.
22911 (use_return_insn): Likewise.
22912 (arm_emit_call_insn): Likewise.
22913 (output_return_instruction): Likewise.
22914 (arm_final_prescan_insn): Likewise.
22915 (arm_coproc_builtin_available): Likewise.
22916 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
22917 arm_arch5e with arm_arch5t and arm_arch5te.
22918 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
22919 (arm_arch5t, arm_arch5te): Declare.
22920 * config/arm/arm-tables.opt: Regenerate.
22921 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
22922 * config/arm/t-multilib: Likewise.
22923 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
22924 instead of arm_arch5.
22925 (*call_reg_thumb1): Likewise.
22926 (*call_value_reg_thumb1_v5): Likewise.
22927 (*call_value_reg_thumb1): Likewise.
22928 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
22929 unreachable path.
22930 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
22931
22932 2018-05-18 Martin Liska <mliska@suse.cz>
22933
22934 PR gcov-profile/84846
22935 * doc/gcov.texi: Document -t option of gcov tool.
22936
22937 2018-05-18 Martin Liska <mliska@suse.cz>
22938
22939 PR gcov-profile/84846
22940 * gcov.c (print_usage): Add new -t option.
22941 (process_args): Handle the option.
22942 (generate_results): Use stdout as output when requested by
22943 the option.
22944
22945 2018-05-18 Martin Liska <mliska@suse.cz>
22946
22947 PR gcov-profile/84846
22948 * coverage.c (coverage_init): Write PWD to .gcno file.
22949 * doc/gcov.texi: Document how working directory is printed.
22950 * gcov-dump.c (dump_gcov_file): Print PWD.
22951 * gcov.c (output_intermediate_file): Likewise.
22952 (read_graph_file): Read PWD string.
22953 (output_lines): Print PWD.
22954
22955 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22956
22957 PR middle-end/85817
22958 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
22959 for retval and return false if all args to phi are zero.
22960
22961 2018-05-18 Richard Biener <rguenther@suse.de>
22962
22963 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
22964 method.
22965 (evrp_dom_walker::before_dom_children): Call it.
22966
22967 2018-05-18 Richard Biener <rguenther@suse.de>
22968
22969 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
22970 results when processing array refs with variable index.
22971
22972 2018-05-18 Toon Moene <toon@moene.org>
22973
22974 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
22975 directly after that of -floop-interchange. Indicate that both
22976 options are enabled by default when specifying -O3.
22977
22978 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22979
22980 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
22981 iterator. Delete separate integer-mode vec_set<mode> expander.
22982 (aarch64_simd_vec_setv2di): Delete.
22983 (vec_setv2di): Delete.
22984 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
22985 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
22986 the "w, r" alternative.
22987
22988 2018-05-18 Martin Liska <mliska@suse.cz>
22989
22990 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
22991 * tree-pass.h (make_pass_lower_switch_O0): New function.
22992 * tree-switch-conversion.c (node_has_low_bound): Remove.
22993 (node_has_high_bound): Likewise.
22994 (node_is_bounded): Likewise.
22995 (class pass_lower_switch): Make it a template type and create
22996 two instances.
22997 (pass_lower_switch::execute): Add template argument.
22998 (make_pass_lower_switch): New function.
22999 (make_pass_lower_switch_O0): New function.
23000 (do_jump_if_equal): Remove.
23001 (emit_case_nodes): Simplify to just handle all 3 cases and leave
23002 all the hard work to tree optimization passes.
23003
23004 2018-05-18 Martin Liska <mliska@suse.cz>
23005
23006 * dbgcnt.c (limit_low): Renamed from limit.
23007 (limit_high): New variable.
23008 (dbg_cnt_is_enabled): Check for upper limit.
23009 (dbg_cnt): Adjust dumping.
23010 (dbg_cnt_set_limit_by_index): Add new argument for high
23011 value.
23012 (dbg_cnt_set_limit_by_name): Likewise.
23013 (dbg_cnt_process_single_pair): Parse new format.
23014 (dbg_cnt_process_opt): Use strtok.
23015 (dbg_cnt_list_all_counters): Remove 'value' and add
23016 'limit_high'.
23017 * doc/invoke.texi: Document changes.
23018
23019 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
23020
23021 * doc/sourcebuild.texi (scalar_all_fma): Document.
23022 * tree.def (FMA_EXPR): Delete.
23023 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
23024 * internal-fn.c (ternary_direct): New macro.
23025 (expand_ternary_optab_fn): Likewise.
23026 (direct_ternary_optab_supported_p): Likewise.
23027 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
23028 * builtins.c (fold_builtin_fma): Delete.
23029 (fold_builtin_3): Don't call it.
23030 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
23031 * expr.c (expand_expr_real_2): Likewise.
23032 * fold-const.c (operand_equal_p): Likewise.
23033 (fold_ternary_loc): Likewise.
23034 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
23035 * gimple.c (DEFTREECODE): Likewise.
23036 * gimplify.c (gimplify_expr): Likewise.
23037 * optabs-tree.c (optab_for_tree_code): Likewise.
23038 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
23039 * tree-eh.c (operation_could_trap_p): Likewise.
23040 (stmt_could_throw_1_p): Likewise.
23041 * tree-inline.c (estimate_operator_cost): Likewise.
23042 * tree-pretty-print.c (dump_generic_node): Likewise.
23043 (op_code_prio): Likewise.
23044 * tree-ssa-loop-im.c (stmt_cost): Likewise.
23045 * tree-ssa-operands.c (get_expr_operands): Likewise.
23046 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
23047 * fold-const-call.h (fold_fma): Delete.
23048 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
23049 CFN_FNMA and CFN_FNMS.
23050 (fold_fma): Delete.
23051 * genmatch.c (combined_fn): New enum.
23052 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
23053 (commutative_op): New function.
23054 (commutate): Use it. Handle more than 2 operands.
23055 (dt_operand::gen_gimple_expr): Use commutative_op.
23056 (parser::parse_expr): Allow :c to be used with non-binary
23057 operators if the commutative operand is known.
23058 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
23059 CFN_FMS, CFN_FNMA and CFN_FNMS.
23060 (backprop::process_assign_use): Remove FMA_EXPR handling.
23061 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
23062 (gen_hsa_fma): New function.
23063 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
23064 IFN_FNMA and IFN_FNMS.
23065 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
23066 * gimple-fold.h (follow_all_ssa_edges): Declare.
23067 * gimple-fold.c (follow_all_ssa_edges): New function.
23068 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
23069 gimple_build interface and use follow_all_ssa_edges to fold the result.
23070 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
23071 instead of checking for optabs directly.
23072 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
23073 rather than FMA_EXPRs.
23074 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
23075 call to IFN_FMA instead of an FMA_EXPR.
23076
23077 2018-05-17 Jim Wilson <jimw@sifive.com>
23078
23079 * expr.c (do_tablejump): When converting index to Pmode, if we have a
23080 sign extended promoted subreg, and the range does not have the sign bit
23081 set, then do a sign extend.
23082
23083 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
23084 test, check for sign extended subreg and/or constant operands, and
23085 do a sign extend in that case.
23086
23087 2018-05-17 Steve Ellcey <sellcey@cavium.com>
23088
23089 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
23090 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
23091 Add untyped.
23092 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
23093 Change logics_shift_reg to logics_shift_imm.
23094 (thunderx2t99_fp_loadpair_basic): Delete.
23095 (thunderx2t99_fp_storepair_basic): Delete.
23096 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
23097 (thunderx2t99_asimd_polynomial): Delete.
23098 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
23099 and neon_fp_mul_d_scalar_q.
23100 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
23101 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
23102 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
23103 (thunderx2t99_asimd_lut): Add missing tbl types.
23104 (thunderx2t99_asimd_ext): Delete.
23105 (thunderx2t99_asimd_load1_1_mult): Delete.
23106 (thunderx2t99_asimd_load1_2_mult): Delete.
23107 (thunderx2t99_asimd_load1_ldp): New.
23108 (thunderx2t99_asimd_load1): New.
23109 (thunderx2t99_asimd_load2): Add missing *load2* types.
23110 (thunderx2t99_asimd_load3): New.
23111 (thunderx2t99_asimd_load4): New.
23112 (thunderx2t99_asimd_store1_1_mult): Delete.
23113 (thunderx2t99_asimd_store1_2_mult): Delete.
23114 (thunderx2t99_asimd_store2_mult): Delete.
23115 (thunderx2t99_asimd_store2_onelane): Delete.
23116 (thunderx2t99_asimd_store_stp): New.
23117 (thunderx2t99_asimd_store1): New.
23118 (thunderx2t99_asimd_store2): New.
23119 (thunderx2t99_asimd_store3): New.
23120 (thunderx2t99_asimd_store4): New.
23121
23122 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
23123
23124 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
23125 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
23126
23127 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
23128 Segher Boessenkool <segher@kernel.crashing.org>
23129
23130 PR target/85698
23131 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
23132 operand.
23133
23134 2018-05-17 Richard Biener <rguenther@suse.de>
23135
23136 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
23137 for pruning loop and prune defs feeding only already visited PHIs.
23138
23139 2018-05-17 Richard Biener <rguenther@suse.de>
23140
23141 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
23142
23143 2018-05-17 Bin Cheng <bin.cheng@arm.com>
23144 Richard Biener <rguenther@suse.de>
23145
23146 PR tree-optimization/85793
23147 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
23148 for VMAT_ELEMENTWISE.
23149
23150 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
23151
23152 * internal-fn.h (lookup_internal_fn): Declare
23153 * internal-fn.c (lookup_internal_fn): New function.
23154 * gimple.c (gimple_build_call_from_tree): Handle calls to
23155 internal functions.
23156 * gimple-pretty-print.c (dump_gimple_call): Print "." before
23157 internal function names.
23158 * tree-pretty-print.c (dump_generic_node): Likewise.
23159 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
23160
23161 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
23162
23163 * gimple-fold.h (gimple_build): Make the function forms take
23164 combined_fn rather than built_in_function.
23165 (gimple_simplify): Likewise.
23166 * gimple-match-head.c (gimple_simplify): Likewise.
23167 * gimple-fold.c (gimple_build): Likewise.
23168 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
23169 rather than gimple_build_call_internal.
23170 (get_initial_defs_for_reduction): Likewise.
23171 (vect_create_epilog_for_reduction): Likewise.
23172 (vectorizable_live_operation): Likewise.
23173
23174 2018-05-17 Martin Liska <mliska@suse.cz>
23175
23176 * gimple-ssa-sprintf.c (format_directive): Do not use
23177 space in between 'G_' and '('.
23178
23179 2018-05-17 Jakub Jelinek <jakub@redhat.com>
23180
23181 PR target/85323
23182 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
23183 even if the mask is not all ones.
23184
23185 PR target/85323
23186 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
23187 vector.
23188 (ix86_gimple_fold_builtin): Likewise.
23189
23190 PR target/85323
23191 * config/i386/i386.c: Include tree-vector-builder.h.
23192 (ix86_vector_shift_count): New function.
23193 (ix86_fold_builtin): Fold shift builtins by scalar count.
23194 (ix86_gimple_fold_builtin): Likewise.
23195
23196 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
23197 _mm512_setzero): New intrinsics.
23198
23199 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
23200 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23201
23202 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
23203 code generation for cases where splatting a value is not useful.
23204 * simplify-rtx.c (simplify_ternary_operation): Simplify
23205 vec_merge across a vec_duplicate and a paradoxical subreg forming
23206 a vector mode to a vec_concat.
23207
23208 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
23209
23210 * config.gcc: Support "goldmont-plus".
23211 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23212 "goldmont-plus".
23213 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23214 PROCESSOR_GOLDMONT_PLUS.
23215 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
23216 (processor_target_table): Add "goldmont-plus".
23217 (PTA_GOLDMONT_PLUS): Define.
23218 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
23219 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
23220 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
23221 (fold_builtin_cpu): Add "goldmont-plus".
23222 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
23223 (ix86_option_override_internal): Add "goldmont-plus".
23224 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
23225 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
23226 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
23227 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
23228
23229 2018-05-17 Richard Biener <rguenther@suse.de>
23230
23231 PR tree-optimization/85757
23232 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
23233 remove defs that only feed that PHI from further processing.
23234
23235 2018-05-16 Jim Wilson <jimw@sifive.com>
23236
23237 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
23238 asterisk to name.
23239 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
23240
23241 2018-05-16 Mark Wielaard <mark@klomp.org>
23242
23243 * dwarf2out.c (count_index_strings): New function.
23244 (output_indirect_strings): Call count_index_strings and generate
23245 header for dwarf_version >= 5.
23246
23247 2018-05-16 Mark Wielaard <mark@klomp.org>
23248
23249 * dwarf2out.c (dwarf_FORM): New function.
23250 (set_indirect_string): Use dwarf_FORM.
23251 (reset_indirect_string): Likewise.
23252 (size_of_die): Likewise.
23253 (value_format): Likewise.
23254 (output_die): Likewise.
23255 (add_skeleton_AT_string): Likewise.
23256 (output_macinfo_op): Likewise.
23257 (index_string): Likewise.
23258 (output_index_string_offset): Likewise.
23259 (output_index_string): Likewise.
23260 (count_index_strings): Likewise.
23261
23262 2018-05-16 Carl Love <cel@us.ibm.com>
23263
23264 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23265 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
23266
23267 2018-05-16 Martin Jambor <mjambor@suse.cz>
23268
23269 * ipa-prop.c (ipa_free_all_edge_args): Remove.
23270 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
23271
23272 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
23273
23274 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
23275 (fnma<mode>4): Likewise.
23276 (fms<mode>4): Likewise.
23277 (fnms<mode>4): Likewise.
23278 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
23279 (aarch64_fnma<mode>4): Likewise.
23280 (aarch64_fms<mode>4): Likewise.
23281 (aarch64_fnms<mode>4): Likewise.
23282 (aarch64_fnmadd<mode>4): Likewise.
23283
23284 2018-05-16 Jason Merrill <jason@redhat.com>
23285
23286 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
23287
23288 2018-05-16 Richard Biener <rguenther@suse.de>
23289
23290 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
23291 (dump_stmt_cost): Declare.
23292 (add_stmt_cost): Dump cost we add.
23293 (add_stmt_costs): New function.
23294 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
23295 No longer exported.
23296 (vect_analyze_stmt): Adjust prototype.
23297 (vectorizable_condition): Likewise.
23298 (vectorizable_live_operation): Likewise.
23299 (vectorizable_reduction): Likewise.
23300 (vectorizable_induction): Likewise.
23301 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
23302 cost vector to pass to vectorizable_ and record afterwards.
23303 (vect_model_reduction_cost): Take cost vector argument and adjust.
23304 (vect_model_induction_cost): Likewise.
23305 (vectorizable_reduction): Likewise.
23306 (vectorizable_induction): Likewise.
23307 (vectorizable_live_operation): Likewise.
23308 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
23309 SLP_TREE_NUMBER_OF_VEC_STMTS.
23310 (vect_analyze_slp_cost_1): Remove.
23311 (vect_analyze_slp_cost): Likewise.
23312 (vect_slp_analyze_node_operations): Take visited args and
23313 a target cost vector. Avoid processing already visited stmt sets.
23314 (vect_slp_analyze_operations): Use a local cost vector to gather
23315 costs and register those of non-discarded instances.
23316 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
23317 (vect_schedule_slp_instance): Remove copying of
23318 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
23319 zero.
23320 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
23321 adding cost. Record cost entry location.
23322 (vect_prologue_cost_for_slp_op): Function to compute cost of
23323 a constant or invariant generated for SLP vect in the prologue,
23324 split out from vect_analyze_slp_cost_1.
23325 (vect_model_simple_cost): Make static. Adjust for SLP costing.
23326 (vect_model_promotion_demotion_cost): Likewise.
23327 (vect_model_store_cost): Likewise, make static.
23328 (vect_model_load_cost): Likewise.
23329 (vectorizable_bswap): Add cost vector arg and adjust.
23330 (vectorizable_call): Likewise.
23331 (vectorizable_simd_clone_call): Likewise.
23332 (vectorizable_conversion): Likewise.
23333 (vectorizable_assignment): Likewise.
23334 (vectorizable_shift): Likewise.
23335 (vectorizable_operation): Likewise.
23336 (vectorizable_store): Likewise.
23337 (vectorizable_load): Likewise.
23338 (vectorizable_condition): Likewise.
23339 (vectorizable_comparison): Likewise.
23340 (can_vectorize_live_stmts): Likewise.
23341 (vect_analyze_stmt): Likewise.
23342 (vect_transform_stmt): Adjust calls to vectorizable_*.
23343 * tree-vectorizer.c: Include gimple-pretty-print.h.
23344 (dump_stmt_cost): New function.
23345
23346 2018-05-16 Richard Biener <rguenther@suse.de>
23347
23348 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
23349 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
23350 * tree-ssa-dse.c: Include tree-ssa-loop.h.
23351 (check_name): New callback.
23352 (dse_classify_store): Track cycles via a visited bitmap of PHI
23353 defs and simplify handling of in-loop and across loop dead stores
23354 and properly fail for loop-variant refs. Handle byte-tracking with
23355 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
23356 limiting the walk.
23357
23358 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
23359
23360 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
23361 (vect_get_mask_type_for_stmt): Likewise.
23362 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
23363 split out from...
23364 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
23365 to determine the statement's vector type and the vector type that
23366 should be used for calculating nunits. Deal with cases in which
23367 the type has to be deferred.
23368 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
23369 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
23370 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
23371 (vect_determine_vf_for_stmt): New functions, split out from...
23372 (vect_determine_vectorization_factor): ...here.
23373 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
23374 (vect_get_mask_type_for_stmt): New functions, split out from
23375 vect_determine_vectorization_factor.
23376
23377 2018-05-16 Richard Biener <rguenther@suse.de>
23378
23379 * tree-cfg.c (verify_gimple_assign_ternary): Properly
23380 verify the [VEC_]COND_EXPR embedded comparison.
23381
23382 2018-05-15 Martin Sebor <msebor@redhat.com>
23383
23384 PR tree-optimization/85753
23385 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
23386 RECORD_TYPE in addition to ARRAY_TYPE.
23387
23388 2018-05-15 Martin Sebor <msebor@redhat.com>
23389
23390 PR middle-end/85643
23391 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
23392
23393 2018-05-15 Richard Biener <rguenther@suse.de>
23394
23395 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
23396 add by_clobber_p one. Change algorithm to collect all defs
23397 representing uses we need to walk and try reducing them to
23398 a single one before failing.
23399 (dse_dom_walker::dse_optimize_stmt): Adjust.
23400
23401 2018-05-13 Mark Wielaard <mark@klomp.org>
23402
23403 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
23404 (size_of_loc_descr): Likewise.
23405 (output_loc_operands): Likewise.
23406 (output_loc_operands_raw): Likewise.
23407 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
23408 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
23409 (hash_loc_operands): Likewise.
23410 (compare_loc_operands): Likewise.
23411
23412 2018-05-14 Mark Wielaard <mark@klomp.org>
23413
23414 * dwarf2out.c (count_index_addrs): New function.
23415 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
23416
23417 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23418
23419 PR tree-optimization/83648
23420 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
23421 return value as malloc candidate.
23422
23423 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23424
23425 PR ipa/85734
23426 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
23427 param as true in call to suggest_attribute.
23428
23429 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
23430
23431 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
23432 -mreadonly-in-sdata.
23433
23434 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23435
23436 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
23437 New pattern.
23438 (aarch64_crypto_aesd_fused): Likewise.
23439
23440 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
23441
23442 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
23443 (movsi_aarch64): Likewise.
23444 (load_pairsi): Likewise.
23445 (load_pairdi): Likewise.
23446 (store_pairsi): Likewise.
23447 (store_pairdi): Likewise.
23448 (load_pairsf): Likewise.
23449 (load_pairdf): Likewise.
23450 (store_pairsf): Likewise.
23451 (store_pairdf): Likewise.
23452 (zero_extend): Likewise.
23453 (trunc): Swap alternatives.
23454 (fcvt_target): Add '?' to prefer w over r.
23455
23456 2018-05-14 Jakub Jelinek <jakub@redhat.com>
23457
23458 PR target/85756
23459 * config/i386/i386.md: Disallow non-commutative arithmetics in
23460 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
23461 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
23462 in the peephole2 before it.
23463
23464 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
23465
23466 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
23467 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
23468 (ix86_handle_option): Handle -mcldemote.
23469 * config.gcc: New header.
23470 * config/i386/cldemoteintrin.h: New file.
23471 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
23472 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23473 -mcldemote.
23474 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23475 OPTION_MASK_ISA_CLDEMOTE.
23476 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
23477 (ix86_valid_target_attribute_inner_p): Ditto.
23478 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
23479 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
23480 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
23481 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
23482 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
23483 (cldemote): New.
23484 * config/i386/i386.opt: Add -mcldemote.
23485 * config/i386/x86intrin.h: New header.
23486 * doc/invoke.texi: Add -mcldemote.
23487
23488 2018-05-14 Richard Biener <rguenther@suse.de>
23489
23490 * doc/match-and-simplify.texi: Adjust :s documentation.
23491
23492 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
23493
23494 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
23495 intended memcpy size.
23496 (REORDER_45): Likewise.
23497
23498 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
23499
23500 * sort.cc: New file.
23501 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
23502 * vec.c (qsort_chk): Use gcc_qsort.
23503 * Makefile.in (OBJS-libcommon): Add sort.o.
23504 (build/sort.o): New target. Use it...
23505 (BUILD_RTL): ... here, and...
23506 (build/gencfn-macros): ... here, and...
23507 (build/genmatch): ... here.
23508
23509 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23510 Chung-Ju Wu <jasonwucj@gmail.com>
23511
23512 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
23513 * config/nds32/nds32-graywolf.md: New file.
23514 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
23515 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
23516 pipeline.
23517 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
23518 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
23519 * config/nds32/nds32.md (pipeline_model): Add graywolf.
23520 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
23521 * config/nds32/pipelines.md: Include n15 settings.
23522
23523 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23524 Chung-Ju Wu <jasonwucj@gmail.com>
23525
23526 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
23527 * config/nds32/nds32-n13.md: New file.
23528 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
23529 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
23530 pipeline.
23531 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
23532 * config/nds32/nds32.md (pipeline_model): Add n13.
23533 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
23534 * config/nds32/pipelines.md: Include n13 settings.
23535
23536 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23537 Chung-Ju Wu <jasonwucj@gmail.com>
23538
23539 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
23540 * config/nds32/nds32-n10.md: New file.
23541 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
23542 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
23543 pipeline.
23544 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
23545 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
23546 * config/nds32/nds32.md (pipeline_model): Add n10.
23547 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
23548 * config/nds32/pipelines.md: Include n10 settings.
23549
23550 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
23551 Kito Cheng <kito.cheng@gmail.com>
23552 Chung-Ju Wu <jasonwucj@gmail.com>
23553
23554 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
23555 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23556 Add enum values for DSP extension instructions.
23557 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
23558 New constraints.
23559 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
23560 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
23561 New code iterators.
23562 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
23563 * config/nds32/nds32-dspext.md: New file for DSP implementation.
23564 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
23565 * config/nds32/nds32-intrinsic.md: Likewise.
23566 * config/nds32/nds32_intrinsic.h: Likewise.
23567 * config/nds32/nds32-md-auxiliary.c: Likewise.
23568 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
23569 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
23570 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
23571 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
23572 * config/nds32/nds32-protos.h: New declarations for DSP extension.
23573 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
23574 TYPE_DMAC in switch statement.
23575 * config/nds32/nds32.c: New checking and implementation for DSP
23576 extension instructions.
23577 * config/nds32/nds32.h: Likewise.
23578 * config/nds32/nds32.md: Likewise.
23579 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
23580 * config/nds32/predicates.md: Implement new predicates for DSP
23581 extension.
23582
23583 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23584
23585 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
23586 Reformat alternatives and attributes so it is easier to identify
23587 which constraints/attributes go with which instruction.
23588 (mov<mode>_hardfloat32, FMOVE64): Likewise.
23589 (mov<mode>_softfloat32, FMOVE64): Likewise.
23590 (mov<mode>_hardfloat64, FMOVE64): Likewise.
23591 (mov<mode>_softfloat64, FMOVE64): Likewise.
23592
23593 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
23594
23595 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23596 subsection.
23597 (Basic PowerPC Built-in Functions): The new name of the
23598 subsection previously known as "PowerPC Built-in Functions".
23599 (Basic PowerPC Built-in Functions Available on all Configurations):
23600 New subsubsection.
23601 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
23602 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
23603 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
23604 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
23605
23606 2018-05-11 Martin Jambor <mjambor@suse.cz>
23607
23608 PR ipa/85655
23609 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
23610 single const.
23611
23612 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23613
23614 PR target/85733
23615 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
23616
23617 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
23618
23619 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
23620 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
23621 (ix86_handle_option): Handle -mwaitpkg.
23622 * config.gcc: New header.
23623 * config/i386/cpuid.h (bit_WAITPKG): New bit.
23624 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
23625 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
23626 function type.
23627 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23628 OPTION_MASK_ISA_WAITPKG.
23629 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
23630 (ix86_option_override_internal): Add PTA_WAITPKG.
23631 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
23632 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
23633 IX86_BUILTIN_TPAUSE.
23634 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
23635 __builtin_ia32_umwait and __builtin_ia32_tpause.
23636 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
23637 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
23638 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
23639 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
23640 UNSPECV_TPAUSE): New.
23641 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
23642 * config/i386/i386.opt: Add -mwaitpkg.
23643 * config/i386/waitpkgintrin.h: New file.
23644 * config/i386/x86intrin.h: New header.
23645 * doc/invoke.texi: Add -mwaitpkg.
23646
23647 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23648
23649 PR target/85606
23650 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
23651 equivalent.
23652 (cortex-m0): Use armv6s-m isa.
23653 (cortex-m0plus): Likewise.
23654 (cortex-m1): Likewise.
23655 (cortex-m0.small-multiply): Likewise.
23656 (cortex-m0plus.small-multiply): Likewise.
23657 (cortex-m1.small-multiply): Likewise.
23658
23659 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
23660 Jakub Jelinek <jakub@redhat.com>
23661
23662 PR tree-optimization/85692
23663 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
23664 source permute as well.
23665
23666 2018-05-11 Martin Liska <mliska@suse.cz>
23667
23668 PR sanitizer/85556
23669 * doc/extend.texi: Document LLVM style format for no_sanitize
23670 attribute.
23671
23672 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23673
23674 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
23675 mode_supports_vsx_dform_quad to mode_supports_dq_form.
23676 (mode_supports_vsx_dform_quad): Likewise.
23677 (mode_supports_vmx_dform): Move these functions to be next to the
23678 other mode_supports functions.
23679 (mode_supports_dq_form): Likewise.
23680 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
23681 mode_supports_dq_form.
23682 (reg_offset_addressing_ok_p): Likewise.
23683 (offsettable_ok_by_alignment): Likewise.
23684 (rs6000_legitimate_offset_address_p): Likewise.
23685 (legitimate_lo_sum_address_p): Likewise.
23686 (rs6000_legitimize_address): Likewise.
23687 (rs6000_legitimize_reload_address): Likewise.
23688 (rs6000_secondary_reload_inner): Likewise.
23689 (rs6000_preferred_reload_class): Likewise.
23690 (rs6000_output_move_128bit): Likewise.
23691
23692 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23693
23694 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
23695 Generate SImode target register for null target.
23696 <case IX86_BUILTIN_XGETBV>: Ditto.
23697 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
23698 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
23699
23700 2018-05-10 Carl Love <cel@us.ibm.com>
23701
23702 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23703 dcbtt and dcbtstt if operands[2] is 0.
23704
23705 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23706
23707 PR target/85693
23708 * config/i386/sse.md (usadv64qi): New expander.
23709
23710 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
23711
23712 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
23713 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
23714 -maltivec=be support.
23715 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
23716 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
23717 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
23718 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
23719 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
23720 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
23721 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
23722 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
23723 altivec_vsumsws): Adjust.
23724 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
23725 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
23726 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
23727 support.
23728 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
23729 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
23730 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
23731 (altivec_lve<VI_char>x): Delete expand.
23732 (*altivec_lve<VI_char>x_internal): Rename to...
23733 (altivec_lve<VI_char>x): ... this.
23734 (altivec_lvxl_<mode>): Delete expand.
23735 (*altivec_lvxl_<mode>_internal): Rename to ...
23736 (altivec_lvxl_<mode>): ... this.
23737 (altivec_stvxl_<mode>): Delete expand.
23738 (*altivec_stvxl_<mode>_internal): Rename to ...
23739 (altivec_stvxl_<mode>): ... this.
23740 (altivec_stve<VI_char>x): Delete expand.
23741 (*altivec_stve<VI_char>x_internal): Rename to ...
23742 (altivec_stve<VI_char>x): ... this.
23743 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
23744 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
23745 reduc_plus_scal_<mode>): Adjust.
23746 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
23747 comment.
23748 (rs6000_cpu_cpp_builtins): Adjust.
23749 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
23750 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
23751 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
23752 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
23753 -maltivec=be support.
23754 (rs6000_split_vec_extract_var): Adjust.
23755 (rs6000_split_v4si_init): Adjust.
23756 (swap_selector_for_mode): Delete.
23757 (altivec_expand_lvx_be, altivec_expand_stvx_be,
23758 altivec_expand_stvex_be): Delete.
23759 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
23760 -maltivec=be support.
23761 (rs6000_gimple_fold_builtin): Ditto.
23762 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
23763 Adjust.
23764 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
23765 (TARGET_DIRECT_MOVE_64BIT): Adjust.
23766 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
23767 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
23768 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
23769 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
23770 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
23771 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
23772 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
23773 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
23774 anonymous split): Adjust.
23775 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
23776 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
23777
23778 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
23779
23780 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
23781 when --with-gxx-include-dir is also specified.
23782 * configure: Regenerate.
23783
23784 2018-05-09 Jim Wilson <jimw@sifive.com>
23785
23786 PR target/84797
23787 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
23788 * config/riscv/t-withmultilib: New.
23789 * config/riscv/withmultilib.h: New.
23790 * doc/install.texi: Document RISC-V --with-multilib-list support.
23791
23792 2018-05-09 Richard Biener <rguenther@suse.de>
23793
23794 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
23795 vector.
23796 (vect_bb_vectorization_profitable_p): Adjust. Compute
23797 actual scalar cost using the cost vector and the add_stmt_cost
23798 machinery.
23799
23800 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23801
23802 PR rtl-optimization/85645
23803 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
23804 in the REG_CFA_REGISTER note for LR, don't leave it empty.
23805
23806 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23807
23808 PR rtl-optimization/85645
23809 * shrink-wrap.c (spread_components): Return a boolean saying if
23810 anything was changed.
23811 (try_shrink_wrapping_separate): Iterate spread_components until
23812 nothing changes anymore.
23813
23814 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23815
23816 PR rtl-optimization/85645
23817 * regrename.c (build_def_use): Also kill the chains that include the
23818 destination of a REG_CFA_REGISTER note.
23819
23820 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23821
23822 PR rtl-optimization/85645
23823 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
23824 insn that has a REG_CFA_REGISTER note.
23825
23826 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
23827
23828 * cfgexpand.c (expand_clobber): New function.
23829 (expand_gimple_stmt_1): Use it.
23830 * tree-vect-stmts.c (vect_clobber_variable): New function,
23831 split out from...
23832 (vectorizable_simd_clone_call): ...here.
23833 (vectorizable_store): Emit a clobber either side of an
23834 IFN_STORE_LANES sequence.
23835 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
23836
23837 2018-05-09 Tom de Vries <tom@codesourcery.com>
23838
23839 PR target/85626
23840 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
23841 (define_insn "trap_if_false"): Add exit after trap.
23842
23843 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
23844
23845 PR rtl-optimization/85638
23846 * bb-reorder.c: Include common/common-target.h.
23847 (create_forwarder_block): New function extracted from...
23848 (fix_up_crossing_landing_pad): ...here. Rename into...
23849 (dw2_fix_up_crossing_landing_pad): ...this.
23850 (sjlj_fix_up_crossing_landing_pad): New function.
23851 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
23852 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
23853 from both partitions and exit the loop after one iteration.
23854
23855 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23856
23857 Revert:
23858 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23859 subsection.
23860 (Basic PowerPC Built-in Functions): The new name of the
23861 subsection previously known as "PowerPC Built-in Functions".
23862 (Basic PowerPC Built-in Functions Available on all Configurations):
23863 New subsubsection.
23864 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23865 subsubsection.
23866 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23867 subsubsection.
23868 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23869 subsubsection.
23870 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23871 subsubsection.
23872
23873 2018-05-08 Jim Wilson <jimw@sifive.com>
23874
23875 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
23876 (LD_EMUL_SUFFIX): New.
23877 (LINK_SPEC): Use it.
23878
23879 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23880
23881 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23882 subsection.
23883 (Basic PowerPC Built-in Functions): The new name of the
23884 subsection previously known as "PowerPC Built-in Functions".
23885 (Basic PowerPC Built-in Functions Available on all Configurations):
23886 New subsubsection.
23887 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23888 subsubsection.
23889 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23890 subsubsection.
23891 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23892 subsubsection.
23893 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23894 subsubsection.
23895
23896 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23897
23898 PR target/85683
23899 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
23900 after cmpelim optimization.
23901
23902 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
23903
23904 * config.gcc: Support "goldmont".
23905 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
23906 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23907 PROCESSOR_GOLDMONT.
23908 * config/i386/i386.c (m_GOLDMONT): Define.
23909 (processor_target_table): Add "goldmont".
23910 (PTA_GOLDMONT): Define.
23911 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
23912 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
23913 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
23914 (fold_builtin_cpu): Add "goldmont".
23915 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
23916 (ix86_option_override_internal): Add "goldmont".
23917 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
23918 (processor_type): Add PROCESSOR_GOLDMONT.
23919 * config/i386/i386.md: Add CPU "glm".
23920 * config/i386/glm.md: New file.
23921 * config/i386/x86-tune.def: Add m_GOLDMONT.
23922 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
23923
23924 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23925
23926 PR target/85572
23927 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
23928 E_V4DImode.
23929 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
23930 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
23931 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
23932
23933 PR target/85317
23934 * config/i386/i386.c (ix86_fold_builtin): Handle
23935 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
23936
23937 PR target/85480
23938 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
23939 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
23940
23941 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
23942
23943 PR target/85658
23944 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
23945 (check_arch): Likewise.
23946 (check_fpu): Return the result rather than printing it.
23947 (end arch): Fix operator precedence.
23948 (end cpu): Likewise.
23949 (END): Print the result from check_fpu.
23950
23951 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23952 Alan Hayward <alan.hayward@arm.com>
23953 David Sherwood <david.sherwood@arm.com>
23954
23955 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
23956 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
23957 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
23958 (*fcmuo<mode>_and): New patterns.
23959
23960 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23961
23962 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
23963 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
23964 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
23965 (cmp_op, sve_imm_con): New code attributes.
23966 (SVE_COND_INT_CMP, imm_con): Delete.
23967 (cmp_op): Remove above unspecs from int attribute.
23968 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
23969 to...
23970 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
23971 comparison-specific unspecs.
23972 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
23973 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
23974 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
23975 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
23976 (*vec_fcm<cmp_op><mode>): Rename to...
23977 (*fcm<cmp_op><mode>): ...this and adjust likewise.
23978 (*vec_fcmuo<mode>): Rename to...
23979 (*fcmuo<mode>): ...this and adjust likewise.
23980 (*pred_fcm<cmp_op><mode>): New pattern.
23981 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
23982 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
23983 functions.
23984 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
23985 and UNORDERED.
23986 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
23987 (aarch64_emit_sve_predicated_cond): New function.
23988 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
23989 (aarch64_emit_unspec_cond_or): Replace with...
23990 (aarch64_emit_sve_or_conds): ...this new function. Use
23991 aarch64_emit_sve_ptrue_op for the individual comparisons and
23992 aarch64_emit_binop to OR them together.
23993 (aarch64_emit_inverted_unspec_cond): Replace with...
23994 (aarch64_emit_sve_inverted_cond): ...this new function. Use
23995 aarch64_emit_sve_ptrue_op for the comparison and
23996 aarch64_emit_unop to invert the result.
23997 (aarch64_expand_sve_vec_cmp_float): Update after the above
23998 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
23999
24000 2018-05-07 Nathan Sidwell <nathan@acm.org>
24001
24002 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
24003 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
24004 (Backwards Compatibility): Likewise.
24005
24006 2018-05-07 Luis Machado <luis.machado@linaro.org>
24007
24008 PR bootstrap/85681
24009 Revert:
24010 2018-05-07 Luis Machado <luis.machado@linaro.org>
24011
24012 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24013 <prefetch_dynamic_strides>: New const bool field.
24014 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24015 prefetch_dynamic_strides.
24016 (exynosm1_prefetch_tune): Likewise.
24017 (thunderxt88_prefetch_tune): Likewise.
24018 (thunderx_prefetch_tune): Likewise.
24019 (thunderx2t99_prefetch_tune): Likewise.
24020 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
24021 to false.
24022 (aarch64_override_options_internal): Update to set
24023 PARAM_PREFETCH_DYNAMIC_STRIDES.
24024 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
24025 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
24026 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
24027 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
24028 prefetch-dynamic-strides setting.
24029
24030 2018-05-07 Luis Machado <luis.machado@linaro.org>
24031
24032 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24033 <minimum_stride>: New const int field.
24034 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24035 minimum_stride field.
24036 (exynosm1_prefetch_tune): Likewise.
24037 (thunderxt88_prefetch_tune): Likewise.
24038 (thunderx_prefetch_tune): Likewise.
24039 (thunderx2t99_prefetch_tune): Likewise.
24040 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
24041 (aarch64_override_options_internal): Update to set
24042 PARAM_PREFETCH_MINIMUM_STRIDE.
24043 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
24044 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
24045 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
24046 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
24047 stride is constant and is below the minimum stride threshold.
24048
24049 2018-05-07 Luis Machado <luis.machado@linaro.org>
24050
24051 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
24052 to 512.
24053
24054 2018-05-07 Luis Machado <luis.machado@linaro.org>
24055
24056 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24057 <prefetch_dynamic_strides>: New const bool field.
24058 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24059 prefetch_dynamic_strides.
24060 (exynosm1_prefetch_tune): Likewise.
24061 (thunderxt88_prefetch_tune): Likewise.
24062 (thunderx_prefetch_tune): Likewise.
24063 (thunderx2t99_prefetch_tune): Likewise.
24064 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
24065 to false.
24066 (aarch64_override_options_internal): Update to set
24067 PARAM_PREFETCH_DYNAMIC_STRIDES.
24068 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
24069 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
24070 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
24071 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
24072 prefetch-dynamic-strides setting.
24073
24074 2018-05-07 Luis Machado <luis.machado@linaro.org>
24075
24076 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
24077 <minimum_stride>: New const int field.
24078 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
24079 minimum_stride field.
24080 (exynosm1_prefetch_tune): Likewise.
24081 (thunderxt88_prefetch_tune): Likewise.
24082 (thunderx_prefetch_tune): Likewise.
24083 (thunderx2t99_prefetch_tune): Likewise.
24084 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
24085 (aarch64_override_options_internal): Update to set
24086 PARAM_PREFETCH_MINIMUM_STRIDE.
24087 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
24088 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
24089 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
24090 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
24091 stride is constant and is below the minimum stride threshold.
24092
24093 2018-05-06 Jakub Jelinek <jakub@redhat.com>
24094
24095 PR c++/85659
24096 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
24097 the type is addressable. Don't force op into register if it has
24098 BLKmode.
24099
24100 2018-05-05 Roland McGrath <mcgrathr@google.com>
24101
24102 PR other/77609
24103 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
24104 any section for which we don't know a specific type it should have,
24105 regardless of name. Previously this was done only for the exact
24106 names ".init_array", ".fini_array", and ".preinit_array".
24107 (default_elf_asm_named_section): Add comment about
24108 relationship with default_section_type_flags and SECTION_NOTYPE.
24109 (get_section): Don't consider it a type conflict if one side has
24110 SECTION_NOTYPE and the other doesn't, as long as neither has the
24111 SECTION_BSS et al used in the default_section_type_flags logic.
24112
24113 2018-05-05 Tom de Vries <tom@codesourcery.com>
24114
24115 PR target/85653
24116 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
24117 (workaround_barsyncs): New function.
24118 (nvptx_reorg): Use workaround_barsyncs.
24119 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
24120 (define_expand "nvptx_membar_cta"): New define_expand.
24121 (define_insn "*nvptx_membar_cta"): New insn.
24122
24123 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
24124
24125 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
24126 To improve optimization opportunities.
24127 * builtin-types.def: The new needed builtin types for the above.
24128
24129 2018-05-04 Richard Biener <rguenther@suse.de>
24130
24131 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
24132 * gimple-ssa-store-merging.c
24133 (imm_store_chain_info::output_merged_store): Remove redundant create,
24134 release split_store vector contents on failure.
24135 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
24136 scalar stmt vector on cache hit.
24137
24138 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
24139
24140 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
24141 Xilinx FP support.
24142 * config.gcc (powerpc-xilinx-eabi*): Remove.
24143 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
24144 support.
24145 (fusion_addis_mem_combo_load): Ditto.
24146 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
24147 FP support.
24148 (rs6000_cpu_cpp_builtins): Ditto.
24149 * config/rs6000/rs6000-linux.c
24150 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
24151 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
24152 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
24153 support.
24154 (rs6000_setup_reg_addr_masks): Ditto.
24155 (rs6000_init_hard_regno_mode_ok): Ditto.
24156 (rs6000_option_override_internal): Ditto.
24157 (legitimate_lo_sum_address_p): Ditto.
24158 (rs6000_legitimize_address): Ditto.
24159 (rs6000_legitimize_reload_address): Ditto.
24160 (rs6000_legitimate_address_p): Ditto.
24161 (abi_v4_pass_in_fpr): Ditto.
24162 (setup_incoming_varargs): Ditto.
24163 (rs6000_gimplify_va_arg): Ditto.
24164 (rs6000_split_multireg_move): Ditto.
24165 (rs6000_savres_strategy): Ditto.
24166 (rs6000_emit_prologue_components): Ditto.
24167 (rs6000_emit_epilogue_components): Ditto.
24168 (rs6000_emit_prologue): Ditto.
24169 (rs6000_emit_epilogue): Ditto.
24170 (rs6000_elf_file_end): Ditto.
24171 (rs6000_function_value): Ditto.
24172 (rs6000_libcall_value): Ditto.
24173 * config/rs6000/rs6000.h: Ditto.
24174 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
24175 (TARGET_MINMAX): ... this. New.
24176 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
24177 * config/rs6000/rs6000.md: Remove Xilinx FP support.
24178 (*movsi_internal1_single): Delete.
24179 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
24180 mfpu=, mxilinx-fpu): Delete.
24181 * config/rs6000/singlefp.h: Delete.
24182 * config/rs6000/sysv4.h: Remove Xilinx FP support.
24183 * config/rs6000/t-rs6000: Ditto.
24184 * config/rs6000/t-xilinx: Delete.
24185 * config/rs6000/titan.md: Adjust for fp_type removal.
24186 * config/rs6000/vsx.md: Remove Xilinx FP support.
24187 (VStype_simple): Delete.
24188 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
24189 * config/rs6000/xfpu.h: Delete.
24190 * config/rs6000/xfpu.md: Delete.
24191 * config/rs6000/xilinx.h: Delete.
24192 * config/rs6000/xilinx.opt: Delete.
24193 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
24194 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
24195
24196 2018-05-04 Tom de Vries <tom@codesourcery.com>
24197
24198 PR libgomp/85639
24199 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
24200 if ignore == 0.
24201
24202 2018-05-04 Richard Biener <rguenther@suse.de>
24203
24204 PR middle-end/85627
24205 * tree-complex.c (update_complex_assignment): We are always in SSA form.
24206 (expand_complex_div_wide): Likewise.
24207 (expand_complex_operations_1): Likewise.
24208 (expand_complex_libcall): Preserve EH info of the original stmt.
24209 (tree_lower_complex): Handle removed blocks.
24210 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
24211 on complex multiplication and division libcall builtins.
24212
24213 2018-05-04 Richard Biener <rguenther@suse.de>
24214
24215 PR middle-end/85574
24216 * fold-const.c (negate_expr_p): Restrict negation of operand
24217 zero of a division to when we know that can happen without
24218 overflow.
24219 (fold_negate_expr_1): Likewise.
24220
24221 2018-05-04 Jakub Jelinek <jakub@redhat.com>
24222
24223 PR libstdc++/85466
24224 * real.h (real_nextafter): Declare.
24225 * real.c (real_nextafter): New function.
24226 * fold-const-call.c (fold_const_nextafter): New function.
24227 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
24228 CASE_CFN_NEXTTOWARD.
24229 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
24230 even when arg1_mode is different from arg0_mode.
24231
24232 2018-05-03 Nathan Sidwell <nathan@acm.org>
24233
24234 * doc/extend.texi (Deprecated Features): Remove
24235 -ffriend-injection.
24236 (Backwards Compatibility): Likewise.
24237 * doc/invoke.texi (C++ Language Options): Likewise.
24238 (C++ Dialect Options): Likewise.
24239
24240 2018-05-03 Jakub Jelinek <jakub@redhat.com>
24241
24242 PR target/85530
24243 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
24244 _mm512_mask_mullox_epi64): New intrinsics.
24245
24246 2018-05-03 Tom de Vries <tom@codesourcery.com>
24247
24248 PR testsuite/85106
24249 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24250 dump files): Add offload-tree.
24251
24252 2018-05-03 Richard Biener <rguenther@suse.de>
24253
24254 PR tree-optimization/85615
24255 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
24256 to loops not nested in BBs loop father to avoid creating multi-entry
24257 loops.
24258
24259 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24260
24261 PR tree-optimization/70291
24262 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
24263 arguments. Change return type to tree. Emit libcall as a new
24264 statement rather than replacing existing one when inplace_p is true.
24265 (expand_complex_multiplication_components): New function.
24266 (expand_complex_multiplication): Expand floating-point complex
24267 multiplication using the above.
24268 (expand_complex_division): Rename inner_type parameter to type.
24269 Update expand_complex_libcall call-site.
24270 (expand_complex_operations_1): Update expand_complex_multiplication
24271 and expand_complex_division call-sites.
24272
24273 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24274
24275 PR target/85582
24276 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24277 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24278 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
24279 the highest significant bit of the shift count mask is clear. In
24280 check whether and[sq]i3 is needed verify that all significant bits
24281 of the shift count other than the highest are set.
24282
24283 2018-05-02 Tom de Vries <tom@codesourcery.com>
24284
24285 PR libgomp/82428
24286 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
24287 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
24288 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
24289 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
24290 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
24291 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
24292 __builtin_goacc_parlevel_size.
24293
24294 2018-05-02 Richard Biener <rguenther@suse.de>
24295
24296 PR tree-optimization/85597
24297 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
24298 do not use split vect_get_vec_defs call but call vect_get_slp_defs
24299 directly.
24300
24301 2018-05-02 Tom de Vries <tom@codesourcery.com>
24302
24303 PR testsuite/85106
24304 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24305 dump files): Add ltrans-tree.
24306
24307 2018-05-02 Tom de Vries <tom@codesourcery.com>
24308
24309 PR testsuite/85106
24310 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24311 dump files): Add wpa-ipa.
24312
24313 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
24314
24315 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
24316 powerpc*-*-linux*paired* target.
24317 * config/rs6000/750cl.h: Delete.
24318 * config/rs6000/paired.h: Delete.
24319 * config/rs6000/paired.md: Delete.
24320 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
24321 float support.
24322 * config/rs6000/rs6000-builtin.def: Remove paired float support.
24323 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
24324 comment. Remove paired float support.
24325 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
24326 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
24327 VECTOR_PAIRED.
24328 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
24329 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
24330 declarations.
24331 * config/rs6000/rs6000.c: Remove paired float support.
24332 (paired_expand_vector_init, paired_expand_vector_move,
24333 paired_emit_vector_compare, paired_emit_vector_cond_expr,
24334 (paired_expand_lv_builtin, paired_expand_stv_builtin,
24335 paired_expand_builtin, paired_expand_predicate_builtin,
24336 paired_init_builtins): Delete.
24337 * config/rs6000/rs6000.h: Remove paired float support.
24338 * config/rs6000/rs6000.md: Remove paired float support.
24339 (move_from_CR_ov_bit): Delete.
24340 * config/rs6000/rs6000.opt (mpaired): Delete.
24341 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
24342 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
24343
24344 2018-05-02 Richard Biener <rguenther@suse.de>
24345
24346 PR middle-end/85567
24347 * gimplify.c (gimplify_save_expr): When in SSA form allow
24348 SAVE_EXPRs to compute to SSA vars.
24349
24350 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24351
24352 PR target/85582
24353 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24354 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24355 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
24356 clobber operands[2], instead use a new pseudo. Formatting fixes.
24357
24358 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
24359
24360 PR tree-optimization/85586
24361 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
24362 exit early for statements in the same group if the accesses are
24363 not strided.
24364
24365 2018-05-02 Tom de Vries <tom@codesourcery.com>
24366
24367 PR lto/85451
24368 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
24369 error message.
24370
24371 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
24372
24373 PR tree-optimization/85143
24374 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
24375
24376 2018-05-01 Tom de Vries <tom@codesourcery.com>
24377
24378 PR lto/85451
24379 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
24380 not found" error message.
24381
24382 2018-05-01 Tom de Vries <tom@codesourcery.com>
24383
24384 PR other/83786
24385 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
24386 * vec.c (test_ordered_remove_if): New function.
24387 (vec_c_tests): Call test_ordered_remove_if.
24388 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
24389 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
24390 * tree-vect-patterns.c (vect_pattern_recog_1): Use
24391 VEC_ORDERED_REMOVE_IF.
24392
24393 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24394
24395 PR tree-optimization/82665
24396 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
24397 pointer subtraction where arguments come from a memchr call.
24398
24399 2018-05-01 Jakub Jelinek <jakub@redhat.com>
24400
24401 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
24402 --push-state --as-needed and --pop-state instead of --as-needed and
24403 --no-as-needed if ld supports it.
24404 * configure: Regenerated.
24405
24406 PR web/85578
24407 * doc/install.texi2html: Replace _002d with - and _002a with * in
24408 generated html files using sed.
24409
24410 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24411
24412 PR c++/85523
24413 * gcc-rich-location.c (blank_line_before_p): New function.
24414 (use_new_line): New function.
24415 (gcc_rich_location::add_fixit_insert_formatted): New function.
24416 * gcc-rich-location.h
24417 (gcc_rich_location::add_fixit_insert_formatted): New function.
24418
24419 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24420
24421 * selftest.c (assert_streq): Rename "expected" and "actual" to
24422 "val1" and "val2". Extend NULL-handling to cover both inputs
24423 symmetrically, while still requiring both to be non-NULL for a pass.
24424 * selftest.h (assert_streq): Rename "expected" and "actual" to
24425 "val1" and "val2".
24426 (ASSERT_EQ): Likewise.
24427 (ASSERT_EQ_AT): Likewise.
24428 (ASSERT_KNOWN_EQ): Likewise.
24429 (ASSERT_KNOWN_EQ_AT): Likewise.
24430 (ASSERT_NE): Likewise.
24431 (ASSERT_MAYBE_NE): Likewise.
24432 (ASSERT_MAYBE_NE_AT): Likewise.
24433 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
24434 the assertion to pass.
24435 (ASSERT_STREQ_AT): Likewise.
24436
24437 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24438
24439 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
24440 interaction with -pie.
24441
24442 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24443
24444 * selftest.h: Fix alphabetization of per-source-file selftest
24445 declarations.
24446
24447 2018-04-30 Jason Merrill <jason@redhat.com>
24448
24449 PR c++/61982 - dead stores to destroyed objects.
24450 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
24451 of clobber.
24452
24453 2018-04-30 Jason Merrill <jason@redhat.com>
24454
24455 * tree.c (build_clobber): New.
24456 * tree.h: Declare it.
24457 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
24458
24459 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24460
24461 * diagnostic-show-locus.c (layout::layout): Update for
24462 location_get_source_line returning a char_span.
24463 (struct char_span): Move to input.h.
24464 (struct correction): Update for fields in char_span becoming
24465 private.
24466 (struct source_line): Update for location_get_source_line
24467 returning a char_span.
24468 (layout::print_line): Likewise.
24469 * edit-context.c (edited_file::print_content): Likewise.
24470 (edited_file::print_diff_hunk): Likewise.
24471 (edited_file::print_run_of_changed_lines): Likewise.
24472 (edited_file::get_num_lines): Likewise.
24473 (edited_line::edited_line): Likewise.
24474 * final.c (asm_show_source): Likewise.
24475 * input.c (location_get_source_line): Convert return type
24476 from const char * to char_span, losing the final "line_len"
24477 param.
24478 (dump_location_info): Update for the above.
24479 (get_substring_ranges_for_loc): Likewise. Use a char_span
24480 when handling the literal within the line.
24481 (test_reading_source_line): Update for location_get_source_line
24482 returning a char_span.
24483 * input.h (class char_span): Move here from
24484 diagnostic-show-locus.c, converting from a struct to a class.
24485 Make data members private.
24486 (char_span::operator bool): New.
24487 (char_span::length): New.
24488 (char_span::get_buffer): New.
24489 (char_span::operator[]): New.
24490 (char_span::subspan): Make const.
24491 (char_span::xstrdup): New.
24492 (location_get_source_line): Convert return type from const char *
24493 to char_span, losing the final "line_size" param.
24494
24495 2018-04-30 Jan Hubicka <jh@suse.cz>
24496
24497 * lto-wrapper.c (ltrans_priorities): New static var.
24498 (cmp_priority): New.
24499 (run_gcc): Read priorities and if doing parallel build order
24500 the Makefile by them.
24501
24502 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24503
24504 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
24505
24506 2018-04-30 Richard Biener <rguenther@suse.de>
24507
24508 * tree-cfg.c (verify_address): Remove base argument, add
24509 flag whether to check TREE_ADDRESSABLE and do that.
24510 (verify_expr): Remove.
24511 (verify_types_in_gimple_reference): Add pieces from verify_expr.
24512 (verify_gimple_assign_single): Likewise.
24513 (verify_gimple_switch): Likewise.
24514 (verify_expr_location_1): Dereference tp once. Add (disabled)
24515 piece from verify_expr.
24516 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
24517
24518 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24519
24520 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
24521
24522 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24523
24524 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
24525 (small_data_pattern): Likewise.
24526 (arc_rewrite_small_data): Likewise.
24527 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
24528 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
24529 (get_symbol_alignment): New function.
24530 (legitimate_small_data_address_p): Likewise.
24531 (legitimate_scaled_address): Update, call
24532 legitimate_small_data_address_p.
24533 (output_sdata): New static variable.
24534 (arc_print_operand): Update how we handle small data operands.
24535 (arc_print_operand_address): Likewise.
24536 (arc_legitimate_address_p): Update, use
24537 legitimate_small_data_address_p.
24538 (arc_rewrite_small_data_p): Remove.
24539 (arc_rewrite_small_data_1): Likewise.
24540 (arc_rewrite_small_data): Likewise.
24541 (small_data_pattern): Likewise.
24542 (compact_sda_memory_operand): Update to use
24543 legitimate_small_data_address_p and get_symbol_alignment.
24544 (prepare_move_operands): Don't rewite sdata pattern.
24545 (prepare_extend_operands): Remove.
24546 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
24547 pattern.
24548 (zero_extendqisi2): Likewise.
24549 (zero_extendhisi2): Likewise.
24550 (extendqihi2): Likewise.
24551 (extendqisi2): Likewise.
24552 (extendhisi2): Likewise.
24553 (addsi3): Likewise.
24554 (subsi3): Likewise.
24555 (andsi3): Likewise.
24556 * config/arc/constraints.md (Usd): Change it to memory constraint.
24557
24558 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24559
24560 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
24561 as source of std instructions.
24562 * config/arc/arc.md (movsi_insn): Update pattern predicate to
24563 allow 6-bit constants as source for store instructions.
24564 (movdi_insn): Update instruction pattern to allow 6-bit constants
24565 as source for store instructions.
24566
24567 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24568
24569 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
24570
24571 2018-04-30 Nathan Sidwell <nathan@acm.org>
24572 Sandra Loosemore <sandra@codesourcery.com>
24573
24574 * dumpfile.c (dump_open): Allow '-' for stdout.
24575 * doc/invoke.texi (Developer Options): Document dump filename
24576 determination early. Document stdin/stdout selection.
24577
24578 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
24579
24580 Microblaze Target: PIC data text relative
24581
24582 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
24583 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
24584 Add declaration.
24585 * config/microblaze/microblaze.h (microblaze_constant_address_p):
24586 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
24587 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
24588 New addressing mode for data-text relative position indepenedent code.
24589 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
24590 'ADDRESS_SYMBOLIC_TXT_REL'.
24591 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
24592 (microblaze_legitimate_pic_operand): Exclude function calls from
24593 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
24594 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
24595 addresses cases.
24596 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24597 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24598 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
24599 for 'address + offset'.
24600 (microblaze_expand_prologue): Add new function prologue call for
24601 'r20' assignation.
24602 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
24603 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
24604 table in case of TARGET_PIC_DATA_TEXT_REL.
24605 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
24606 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
24607 Add new macros 'UNSPEC_TEXT',
24608 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
24609 + exclude function calls from 'UNSPEC_PLT' in case of data text
24610 relative mode.
24611 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24612 new target hook for generating address diff vector tables in case of
24613 flag_pic.
24614 * doc/tm.texi : Regenerate.
24615 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
24616 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
24617 of addr diff vector generation.
24618 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24619 target hook definition.
24620 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
24621 Add default function for generate_pic_addr_diff_vec -> flag_pic.
24622 * doc/invoke.texi (Add new pic option): Add new microblaze pic
24623 option for data text relative.
24624
24625 2018-04-30 Richard Biener <rguenther@suse.de>
24626
24627 * tree-chrec.h (evolution_function_is_constant_p): Remove
24628 redundant check.
24629 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
24630
24631 2018-04-30 Richard Biener <rguenther@suse.de>
24632
24633 PR bootstrap/85571
24634 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
24635
24636 2018-04-30 Richard Biener <rguenther@suse.de>
24637
24638 PR tree-optimization/28364
24639 PR tree-optimization/85275
24640 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
24641 copying first exit test.
24642
24643 2018-04-28 Mark Wielaard <mark@klomp.org>
24644
24645 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
24646 dwarf_version >= 5.
24647 (dwarf_AT): Handle DW_AT_addr_base.
24648 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
24649
24650 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
24651
24652 PR target/84431
24653 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
24654 (*ashl<dwi>3_doubleword_mask_1): Ditto.
24655 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
24656 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
24657
24658 2018-04-28 Richard Biener <rguenther@suse.de>
24659
24660 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
24661 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
24662 to reflect use. Only add interesting stmts.
24663
24664 2018-04-27 Martin Jambor <mjambor@suse.cz>
24665
24666 PR ipa/85549
24667 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
24668 the jump function allows for passing through aggregate values.
24669
24670 2018-04-27 David Malcolm <dmalcolm@redhat.com>
24671
24672 * input.h (in_system_header_at): Convert from macro to inline
24673 function.
24674 (from_macro_expansion_at): Likewise.
24675 (from_macro_definition_at): Likewise.
24676
24677 2018-04-27 Jeff Law <law@redhat.com>
24678
24679 * config.gcc: Mark tile* targets as deprecated/obsolete.
24680
24681 2018-04-27 Richard Biener <rguenther@suse.de>
24682
24683 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
24684 fix for ILP32.
24685
24686 2018-04-27 Richard Biener <rguenther@suse.de>
24687
24688 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
24689
24690 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
24691
24692 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
24693 with Yd constraint. Set "preferred_for_speed" attribute from
24694 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
24695 with Yd constraint.
24696 (*movdi_internal): Ditto.
24697 (movti_interunit splitters): Remove
24698 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
24699 (movdi_interunit splitters): Ditto.
24700 * config/i386/constraints.md (Ye): Remove.
24701 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
24702
24703 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24704
24705 PR target/85512
24706 * config/aarch64/constraints.md (Usg): Limit to 31.
24707 (Usj): Limit to 63.
24708
24709 2018-04-27 Jakub Jelinek <jakub@redhat.com>
24710
24711 PR tree-optimization/85529
24712 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
24713 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
24714 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
24715 zero extension or masking of the MSB bit.
24716 (optimize_range_tests): Add FIRST_BB argument, pass it through
24717 to optimize_range_tests_var_bound.
24718 (maybe_optimize_range_tests, reassociate_bb): Adjust
24719 optimize_range_tests callers.
24720
24721 2018-04-26 Richard Biener <rguenther@suse.de>
24722 Jakub Jelinek <jakub@redhat.com>
24723
24724 * cgraph.h (symbol_table): Just declare debug method here.
24725 * symtab.c (symbol_table::debug): Define.
24726
24727 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
24728
24729 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
24730
24731 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
24732
24733 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
24734 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
24735 (*movdi_internal): Substitute Yi and Yj constraint with x
24736 and Ym and Yn constraint with y constraint. Update "isa"
24737 attribute and set "preferred_for_speed" attribute from
24738 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
24739 (*movsi_internal): Ditto.
24740 (*movdf_internal): Ditto.
24741 (*movsf_internal): Ditto.
24742 (*zero_extendsidi2): Ditto.
24743 * config/i386/sse.md (vec_set<mode>_0): Ditto.
24744 (sse2_loadld): Ditto.
24745 (*vec_extract<ssevecmodelower>_0): Ditto.
24746 (*vec_extractv4si_0_zext_sse4): Ditto.
24747 (vec_concatv2di): Ditto.
24748 (*vec_dup<mode>): Ditto.
24749 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
24750 * config/i386/constraints.md (Yi): Remove.
24751 (Yj): Remove.
24752 (Ym): Remove.
24753 (Yn): Remove.
24754
24755 2018-04-26 Nathan Sidwell <nathan@acm.org>
24756
24757 * dumpfile.c (dump_open): New.
24758 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
24759 (dump_finish): Detect stdio/stderr by value not name.
24760
24761 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
24762
24763 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
24764
24765 2018-04-26 Tom de Vries <tom@codesourcery.com>
24766
24767 PR target/84952
24768 * config/nvptx/nvptx.c (verify_neutering_jumps)
24769 (verify_neutering_labels): New function
24770 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
24771
24772 2018-04-26 Tom de Vries <tom@codesourcery.com>
24773
24774 PR target/84025
24775 * config/nvptx/nvptx.c (needs_neutering_p): New function.
24776 (nvptx_single): Use needs_neutering_p to skip over insns that do not
24777 need neutering.
24778
24779 2018-04-26 Richard Biener <rguenther@suse.de>
24780 Tom de Vries <tom@codesourcery.com>
24781
24782 PR lto/85422
24783 * lto-streamer-out.c (output_function): Fixup loops if required to match
24784 discovery done in the reader.
24785
24786 2018-04-26 Richard Biener <rguenther@suse.de>
24787
24788 PR tree-optimization/85116
24789 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
24790 have a loop exit from the single latch predecessor. Remove
24791 case of header with just condition.
24792 (ch_base::copy_headers): Exclude infinite loops from any
24793 processing.
24794 (pass_ch::execute): Record exits.
24795
24796 2018-04-26 Richard Biener <rguenther@suse.de>
24797
24798 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
24799 prologue cost vector and pass it to vect_get_load_cost.
24800 (vect_get_peeling_costs_all_drs): Likewise.
24801 (vect_peeling_hash_get_lowest_cost): Likewise.
24802 (vect_enhance_data_refs_alignment): Likewise.
24803
24804 2018-04-26 Richard Biener <rguenther@suse.de>
24805
24806 PR middle-end/85450
24807 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
24808 checking of integer<->pointer conversions.
24809 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
24810 sign-/zero-extending pointer types.
24811 (expand_omp_for_static_chunk): Likewise.
24812
24813 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
24814 Jean Lee <xiaoyur347@gmail.com>
24815
24816 * config/mips/mips.c (mips_asan_shadow_offset): New function.
24817 (TARGET_ASAN_SHADOW_OFFSET): Define.
24818 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
24819 true for -fsanitize=address.
24820
24821 2018-04-25 Mark Wielaard <mark@klomp.org>
24822
24823 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
24824 shorter ones.
24825
24826 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24827
24828 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
24829 than "alu", remove explicit "memory" and "imm_disp" attributes.
24830 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
24831
24832 PR middle-end/85414
24833 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
24834 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
24835 gen_lowpart_no_emit.
24836
24837 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
24838
24839 PR target/85473
24840 * config/i386/i386.c (ix86_expand_builtin): Change memory
24841 operand to XI, extend p0 to Pmode.
24842 * config/i386/i386.md: Change unspec volatile and operand
24843 1 mode to XI, change operand 0 mode to P.
24844
24845 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24846
24847 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
24848 GET_MODE_MASK before any checking.
24849 (nds32_can_use_bset_p): Likewise.
24850 (nds32_can_use_btgl_p): Likewise.
24851
24852 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24853
24854 * config/nds32/nds32-doubleword.md: New define_split pattern for
24855 illegal register number.
24856
24857 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24858
24859 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
24860
24861 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24862
24863 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
24864
24865 2018-04-25 Richard Biener <rguenther@suse.de>
24866
24867 * lto-streamer.h (LTO_major_version): Bump to 8.
24868
24869 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24870
24871 * BASE-VER: Set to 9.0.0.
24872
24873 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
24874
24875 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
24876 in __abskf2 and __powikf2.
24877
24878 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24879
24880 PR target/85512
24881 * config/aarch64/constraints.md (Usg, Usj): New constraints.
24882 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
24883 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
24884 Use the above on operand 2. Reindent.
24885 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
24886
24887 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24888
24889 PR target/85485
24890 * common/config/i386/i386-common.c (ix86_handle_option): Don't
24891 handle OPT_mcet.
24892 * config/i386/i386.opt (mcet): Removed.
24893 * doc/install.texi: Remove -mcet documentation.
24894 * doc/invoke.texi: Likewise.
24895
24896 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24897
24898 PR target/85485
24899 * doc/install.texi: Remove -mcet from bootstrap-cet.
24900
24901 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24902
24903 PR target/85511
24904 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
24905 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
24906 if TARGET_64BIT.
24907
24908 PR target/85503
24909 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
24910 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
24911 containing a CONST_VECTOR.
24912
24913 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
24914
24915 * doc/install.texi: Update newlib dependency for nvptx.
24916
24917 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24918
24919 PR target/85508
24920 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
24921 instead of INTVAL when shifting x left.
24922
24923 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
24924
24925 PR tree-optimization/85478
24926 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
24927 vect_grouped_store_supported for single element vectors.
24928
24929 2018-04-24 Richard Biener <rguenther@suse.de>
24930
24931 PR target/85491
24932 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
24933 load cost increase to the case of non-constant step.
24934
24935 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24936
24937 PR target/84828
24938 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
24939 destination if any_malformed_asm.
24940
24941 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
24942
24943 PR middle-end/85496
24944 * expr.c (store_field): In the bitfield case, if the value comes from
24945 a function call and is returned in registers by means of a PARALLEL,
24946 do not change the mode of the temporary unless BLKmode and VOIDmode.
24947
24948 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
24949
24950 PR rtl-optimization/85423
24951 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
24952 dependencies to debug insns when the previous insn is non-debug.
24953
24954 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24955
24956 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
24957 enums into a single definition.
24958 (fls): Fix predicates and printing.
24959 (seti): Likewise.
24960
24961 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24962
24963 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
24964 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
24965 and short u6 immediate.
24966 (check_if_valid_sleep_operand): Remove.
24967 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
24968
24969 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24970
24971 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
24972 flag_always_save_lp condition.
24973 * config/nds32/nds32.opt (malways-save-lp): New option.
24974
24975 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24976
24977 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
24978 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
24979 * config/nds32/nds32.h
24980 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
24981 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
24982
24983 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24984
24985 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
24986 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
24987
24988 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24989 Chung-Ju Wu <jasonwucj@gmail.com>
24990
24991 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
24992 Declare.
24993 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
24994 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
24995
24996 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24997
24998 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
24999
25000 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
25001
25002 * config/nds32/nds32-protos.h (nds32_data_alignment,
25003 nds32_local_alignment): Declare.
25004 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
25005 nds32_local_alignment): New functions.
25006 (TARGET_CONSTANT_ALIGNMENT): Define.
25007 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
25008
25009 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
25010
25011 * config/nds32/nds32.c
25012 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
25013 (TARGET_MODES_TIEABLE_P): Likewise.
25014
25015 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
25016
25017 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
25018 level Ofast and Og.
25019
25020 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
25021 Chung-Ju Wu <jasonwucj@gmail.com>
25022
25023 * config/nds32/constants.md (unspec_volatile_element): Add enum values
25024 for unaligned access.
25025 * config/nds32/nds32-intrinsic.c: Implementation of expanding
25026 unaligned access.
25027 * config/nds32/nds32-intrinsic.md: Likewise.
25028 * config/nds32/nds32_intrinsic.h: Likewise.
25029 * config/nds32/nds32.h (nds32_builtins): Likewise.
25030 * config/nds32/nds32.opt (munaligned-access): New option.
25031 * config/nds32/nds32.c (nds32_asm_file_start): Display
25032 flag_unaligned_access status.
25033
25034 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
25035
25036 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
25037 -mno-relax is present.
25038 * config/riscv/linux.h (LINK_SPEC): Ditto.
25039
25040 2018-04-20 Martin Sebor <msebor@redhat.com>
25041
25042 PR c/85365
25043 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
25044 for null pointers.
25045 (gimple_fold_builtin_stxcpy_chk): Same.
25046 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
25047
25048 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
25049
25050 PR target/85456
25051 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
25052 __powikf2 when long double is IEEE 128-bit.
25053
25054 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
25055
25056 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
25057 step to make sure stack always aligned.
25058
25059 2018-04-20 Carl Love <cel@us.ibm.com>
25060
25061 PR target/83402
25062 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
25063 size check for arg0.
25064
25065 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
25066 Tom de Vries <tom@codesourcery.com>
25067
25068 PR target/85445
25069 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
25070 Emit insns for calls too.
25071 (nvptx_find_par): Always look for worker-level predecessor insn.
25072 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
25073 calls.
25074 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
25075 (nvptx_process_pars): Propagate frames for calls.
25076
25077 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
25078
25079 PR target/85469
25080 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
25081 Removed.
25082 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
25083 (ix86_handle_option): Don't handle OPT_mibt.
25084 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
25085 __SHSTK__.
25086 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
25087 has_ibt and ibt.
25088 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
25089 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
25090 (ix86_target_macros): Define __CET__ with flag_cf_protection
25091 for -fcf-protection.
25092 * config/i386/i386.c (isa2_opts): Remove -mibt.
25093 * config/i386/i386.h (TARGET_IBT): Removed.
25094 (TARGET_IBT_P): Likewise.
25095 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
25096 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
25097 * config/i386/i386.opt (mcet): Update help message.
25098 (mshstk): Likewise.
25099 (mibt): Removed.
25100 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
25101 -mcet as an alias for -mshstk.
25102
25103 2018-04-20 Richard Biener <rguenther@suse.de>
25104
25105 PR middle-end/85475
25106 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
25107 complexity by forcing a single use of the multiply operand.
25108
25109 2018-04-20 Martin Jambor <mjambor@suse.cz>
25110
25111 ipa/85449
25112 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
25113 recursion dependency to only apply to non-clones.
25114
25115 2018-04-20 Martin Jambor <mjambor@suse.cz>
25116
25117 ipa/85447
25118 * ipa-cp.c (create_specialized_node): Check that clones of
25119 self-recursive edges exist during IPA-CP.
25120
25121 2018-04-19 Toon Moene <toon@moene.org>
25122
25123 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
25124 by -O3.
25125
25126 2018-04-19 Jakub Jelinek <jakub@redhat.com>
25127
25128 PR tree-optimization/85467
25129 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
25130 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
25131 VECTOR_CST element to type.
25132
25133 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25134
25135 PR target/85397
25136 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
25137 * config/i386/i386.md (builtin_setjmp_setup): Removed.
25138 (builtin_longjmp): Likewise.
25139 (save_stack_nonlocal): New pattern.
25140 (restore_stack_nonlocal): Likewise.
25141
25142 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25143
25144 PR target/85404
25145 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
25146 Replace ASM_OUTPUT_LABEL with fprintf.
25147
25148 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25149
25150 PR target/85417
25151 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
25152 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
25153 * config/i386/i386-c.c (ix86_target_macros_internal): Also
25154 define __IBT__ and __SHSTK__ for -fcf-protection.
25155 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
25156 TARGET_IBT.
25157 (ix86_trampoline_init): Likewise.
25158 (x86_output_mi_thunk): Likewise.
25159 (ix86_notrack_prefixed_insn_p): Likewise.
25160 (ix86_option_override_internal): Don't disallow -fcf-protection.
25161 * config/i386/i386.md (rdssp<mode>): Also enable for
25162 -fcf-protection.
25163 (incssp<mode>): Likewise.
25164 (nop_endbr): Likewise.
25165 * config/i386/i386.opt (mcet): Change help message to built-in
25166 functions only.
25167 (mibt): Likewise.
25168 (mshstk): Likewise.
25169 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
25170 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
25171 enable CET built-in functions.
25172
25173 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
25174
25175 * common/config/i386/i386-common.c
25176 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
25177 OPTION_MASK_ISA_MOVDIRI_UNSET,
25178 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
25179 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
25180 * config.gcc (movdirintrin.h): New header.
25181 * config/i386/cpuid.h (bit_MOVDIRI,
25182 bit_MOVDIR64B): New bits.
25183 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
25184 and -mmvodir64b.
25185 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
25186 (VOID, PVOID, PCVOID)): New function types.
25187 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
25188 __builtin_ia32_directstoreu_u64,
25189 __builtin_ia32_movdir64b): New builtins.
25190 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
25191 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
25192 and -mmovdiri.
25193 (ix86_valid_target_attribute_inner_p): Ditto.
25194 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
25195 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
25196 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
25197 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
25198 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
25199 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
25200 (movdiri<mode>, movdir64b_<mode>): New.
25201 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
25202 * config/i386/immintrin.h: Include movdirintrin.h.
25203 * config/i386/movdirintrin.h: New file.
25204 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
25205
25206 2018-04-19 Richard Biener <rguenther@suse.de>
25207
25208 PR middle-end/85455
25209 * cfg.c (clear_bb_flags): When loop state says we have
25210 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
25211
25212 2018-04-19 Richard Biener <rguenther@suse.de>
25213
25214 PR tree-optimization/84737
25215 * tree-vect-data-refs.c (vect_copy_ref_info): New function
25216 copying restrict info.
25217 (vect_setup_realignment): Use it.
25218 * tree-vectorizer.h (vect_copy_ref_info): Declare.
25219 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
25220 the first DR to all generated stores.
25221 (vectorizable_load): Likewise for loads.
25222
25223 2018-04-19 Jakub Jelinek <jakub@redhat.com>
25224
25225 PR tree-optimization/85446
25226 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
25227 the integral and pointer types to have the same precision.
25228
25229 * doc/install.texi: Document --disable-cet being the default and
25230 --enable-cet=auto.
25231
25232 2018-04-18 Martin Liska <mliska@suse.cz>
25233
25234 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
25235 style.
25236
25237 2018-04-18 Martin Liska <mliska@suse.cz>
25238
25239 Revert
25240 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25241
25242 PR ipa/83983
25243 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25244 arguments if they are comparable.
25245
25246 2018-04-18 Martin Liska <mliska@suse.cz>
25247
25248 Revert
25249 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
25250
25251 PR lto/84805
25252 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25253 incomplete types.
25254
25255 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
25256
25257 PR target/85388
25258 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
25259 ENDBR after calling __morestack.
25260
25261 2018-04-18 David Malcolm <dmalcolm@redhat.com>
25262
25263 PR jit/85384
25264 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
25265 by using gcc_base_ver to generate a gcc_driver_version, and use
25266 it when generating GCC_DRIVER_NAME.
25267 * configure: Regenerate.
25268
25269 2018-04-18 Jakub Jelinek <jakub@redhat.com>
25270
25271 PR target/81084
25272 * config.gcc: Obsolete powerpc*-*-*spe*.
25273
25274 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25275
25276 PR debug/84637
25277 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
25278 (stabstr_D): Change type of unum from unsigned int to
25279 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
25280 type.
25281
25282 2018-04-17 Jim Wilson <jimw@sifive.com>
25283
25284 PR 84856
25285 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
25286 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
25287 Set arg_pointer_offset after using pretend_args_size.
25288
25289 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25290
25291 PR rtl-optimization/85431
25292 * dse.c (record_store): Ignore zero width stores.
25293
25294 PR sanitizer/85230
25295 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
25296 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
25297 __builtin_stack_restore rather than after it.
25298 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
25299 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
25300 argument instead of virtual_dynamic_stack_rtx.
25301
25302 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
25303
25304 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
25305 New prototype.
25306 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
25307 Add note to error message to explain internal mapping of overloaded
25308 built-in function name to non-overloaded built-in function name.
25309 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
25310 function.
25311
25312 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25313
25314 PR target/85424
25315 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
25316 where the inputs overlap with the output.
25317
25318 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25319
25320 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
25321 (=v, v) alternative and explicit "memory" attribute.
25322 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
25323 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25324 attributes.
25325 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
25326 "sselog1" type instead of "sselog".
25327 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
25328 "sselog". Remove explicit "memory" attribute.
25329 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
25330 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25331 attributes.
25332 (vec_extract_hi_v32hi): Merge all alternatives into one, use
25333 "sselog1" type instead of "sselog". Remove explicit "memory"
25334 attribute.
25335 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
25336 use "sselog1" type instead of "sselog". Remove explicit "memory"
25337 attribute.
25338 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
25339 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25340 attributes.
25341 (vec_extract_hi_v64qi): Merge all alternatives into one, use
25342 "sselog1" type instead of "sselog". Remove explicit "memory"
25343 attribute.
25344 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
25345 use "sselog1" type instead of "sselog". Remove explicit "memory"
25346 attribute.
25347
25348 PR target/85430
25349 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
25350
25351 PR middle-end/85414
25352 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
25353 on a SUBREG.
25354
25355 2018-04-17 Martin Jambor <mjambor@suse.cz>
25356
25357 PR ipa/85421
25358 * ipa-cp.c (create_specialized_node): Call
25359 expand_all_artificial_thunks if necessary.
25360
25361 2018-04-17 Martin Liska <mliska@suse.cz>
25362
25363 PR lto/85405
25364 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
25365 in message, remote space in between '_G' and '('.
25366
25367 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25368
25369 PR target/85281
25370 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
25371 avx512f_vmcmp<mode>3<round_saeonly_name>,
25372 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
25373 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
25374 avx512f_rndscale<mode><round_saeonly_name>,
25375 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
25376 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
25377 Use %<iptr>2 instead of %2 for -masm=intel.
25378 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
25379 avx512f_vcvttss2usi<round_saeonly_name>,
25380 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
25381 -masm=intel.
25382 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
25383 avx512f_vcvttsd2usi<round_saeonly_name>,
25384 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
25385 Use %q1 instead of %1 for -masm=intel.
25386 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
25387 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
25388 of %3 for -masm=intel.
25389 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
25390 -masm=intel.
25391 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
25392 -masm=intel.
25393 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
25394 -masm=intel.
25395 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
25396 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
25397 %g1.
25398 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
25399 -masm=intel.
25400 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
25401 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
25402 %g1 and one with %0 and %1.
25403 (avx512er_vmrcp28<mode><round_saeonly_name>,
25404 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
25405 %1 for -masm=intel.
25406 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
25407 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
25408 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
25409 of %0 and %{%4%} for -masm=intel.
25410 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
25411 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
25412 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
25413 order of %0 and %{%5%}%{z%} for -masm=intel.
25414
25415 2018-04-17 Jan Hubicka <jh@suse.cz>
25416
25417 PR lto/85405
25418 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
25419
25420 2018-04-17 Martin Liska <mliska@suse.cz>
25421
25422 PR ipa/85329
25423 * multiple_target.c (create_dispatcher_calls): Set apostrophes
25424 for target_clone error message. Make default implementation
25425 clone to be a local declaration.
25426 (separate_attrs): Add new argument and check for an empty
25427 string.
25428 (expand_target_clones): Handle it.
25429 (ipa_target_clone): Make redirection just for target_clones
25430 functions.
25431
25432 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
25433 Tom de Vries <tom@codesourcery.com>
25434
25435 PR middle-end/84955
25436 * omp-expand.c (expand_oacc_for): Add dummy false branch for
25437 tiled basic blocks without omp continue statements.
25438
25439 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
25440
25441 PR target/83660
25442 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
25443 vec_extract expression as having side effects to make sure it gets
25444 a cleanup point.
25445
25446 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
25447
25448 PR target/85403
25449 * config/i386/i386.c (get_builtin_code_for_version): Check
25450 error_mark_node.
25451
25452 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
25453
25454 PR target/84331
25455 * config.gcc: Support "skylake".
25456 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
25457 PROCESSOR_SKYLAKE.
25458 * config/i386/i386.c (m_SKYLAKE): Define.
25459 (processor_target_table): Add "skylake".
25460 (ix86_option_override_internal): Add "skylake".
25461 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
25462 PROCESSOR_CANNONLAKE.
25463 (get_builtin_code_for_version): Fix priority for
25464 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
25465 PROCESSOR_SKYLAKE-AVX512.
25466 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
25467 (processor_type): Add PROCESSOR_SKYLAKE.
25468
25469 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
25470 Jason Merrill <jason@redhat.com>
25471
25472 PR c++/85112
25473 * convert.c (convert_to_integer_1): Use direct recursion for
25474 enumeral types and types with a precision less than the number
25475 of bits in their mode.
25476
25477 2018-04-16 Julia Koval <julia.koval@intel.com>
25478
25479 PR target/84413
25480 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
25481 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
25482
25483 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
25484
25485 PR target/85293
25486 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
25487 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
25488 and -mno-direct-move.
25489
25490 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
25491
25492 PR target/83402
25493 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
25494 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
25495 Ensure negative shifts result in {0}.
25496
25497 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
25498
25499 PR rtl-optimization/79916
25500 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
25501 regs (if any) to define how to gnerate SD moves when LRA is in
25502 progress.
25503
25504 2018-04-13 Jakub Jelinek <jakub@redhat.com>
25505
25506 PR rtl-optimization/85393
25507 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
25508 * except.c (expand_dw2_landing_pad_for_region): Make static.
25509 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
25510 a label and unconditional jump to old_bb, rather than
25511 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
25512 basic block.
25513
25514 PR rtl-optimization/85376
25515 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
25516 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
25517 instead of a specific value.
25518
25519 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25520 Bin Cheng <bin.cheng@arm.com>
25521
25522 PR tree-optimization/82965
25523 PR tree-optimization/83991
25524 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
25525 by_profile_only parameter.
25526 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
25527 information if the loop was predicted to iterate too many times.
25528 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
25529
25530 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25531
25532 PR lto/71991
25533 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
25534 always inline.
25535
25536 2018-04-13 Martin Liska <mliska@suse.cz>
25537 Jakub Jelinek <jakub@redhat.com>
25538
25539 PR middle-end/81657
25540 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
25541 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
25542 * builtins.c (expand_builtin_memory_copy_args): Use
25543 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
25544 handle dest_addr == pc_rtx.
25545
25546 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
25547
25548 PR target/85291
25549 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
25550 asked to not generate direct moves.
25551 (fix_trunc<mode>si2_stfiwx): Similar.
25552 (fix_trunc<mode>si2_internal): Similar.
25553
25554 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25555
25556 PR debug/83157
25557 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
25558 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
25559 lookup if dest in some wider mode is known to be const0_rtx and
25560 if so, record permanent equivalence for it to be ZERO_EXTEND of
25561 the narrower mode destination.
25562
25563 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25564
25565 * lto-streamer-out.c (output_function): Revert 259346.
25566 * omp-expand.c (expand_oacc_for): Likewise.
25567
25568 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
25569
25570 PR rtl-optimization/85354
25571 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
25572 * sel-sched.c (sel_global_init): ... here.
25573
25574 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
25575
25576 PR target/85238
25577 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
25578 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
25579 mode for PE-COFF targets.
25580 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
25581 (i386_pe_asm_lto_end): Likewise.
25582 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
25583 (TARGET_ASM_LTO_END): Likewise.
25584 * config/i386/winnt.c (saved_debug_info_level): New static variable.
25585 (i386_pe_asm_lto_start): New function.
25586 (i386_pe_asm_lto_end): Likewise.
25587
25588 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25589 Richard Biener <rguenther@suse.de>
25590
25591 PR middle-end/84955
25592 * lto-streamer-out.c (output_function): Fix CFG loop state before
25593 streaming out.
25594 * omp-expand.c (expand_oacc_for): Handle calls to internal
25595 functions like regular functions.
25596
25597 2018-04-12 Richard Biener <rguenther@suse.de>
25598
25599 PR lto/85371
25600 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
25601 for the early LTO debug to properly generate references to it
25602 during DIE emission. Do not re-use that for the skeleton for
25603 split-dwarf.
25604 (dwarf2out_early_finish): Likewise.
25605
25606 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25607
25608 PR target/85328
25609 * config/i386/sse.md
25610 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
25611 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
25612 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
25613 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
25614 and output is a reg, avoid creating invalid lowpart subreg, but
25615 instead split into a 512-bit move. Don't split if not AVX512VL,
25616 input is xmm16+ reg and output is a mem.
25617 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
25618 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
25619 xmm16+ reg and output is a mem.
25620
25621 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25622
25623 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
25624 also for flag_dwarf2_cfi_asm.
25625
25626 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25627
25628 PR rtl-optimization/85342
25629 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
25630 a bool scalar var inside of the loop instead. Don't try to update
25631 recog_data.operand after failed apply_change_group.
25632
25633 2018-04-12 Tom de Vries <tom@codesourcery.com>
25634
25635 PR target/85296
25636 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
25637 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
25638 array with flexible array member as array without given dimension.
25639 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
25640 argument for undefined param to true.
25641
25642 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
25643
25644 PR target/85321
25645 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25646 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
25647 from PowerPC section.
25648 * config/rs6000/sysv4.opt (mcall-): Improve help text.
25649 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
25650 help text that is too long.
25651 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
25652 help text that is too long.
25653 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
25654 help text that is too long.
25655
25656 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
25657
25658 * config/alpha/alpha.md (stack_probe_internal): Rename
25659 from "probe_stack". Update all callers.
25660
25661 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25662
25663 PR rtl-optimization/84566
25664 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
25665 sched_macro_fuse_insns.
25666
25667 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25668
25669 PR target/84301
25670 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
25671 (compute_block_dependences): ... from here.
25672
25673 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25674
25675 PR tree-optimization/85331
25676 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
25677 from int to HOST_WIDE_INT.
25678
25679 2018-04-11 Martin Jambor <mjambor@suse.cz>
25680
25681 PR ipa/84149
25682 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
25683 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
25684 not the same as the source val.
25685 (cgraph_edge_brings_value_p): New parameter.
25686 (gather_edges_for_value): Pass destination value to
25687 cgraph_edge_brings_value_p.
25688 (perhaps_add_new_callers): Likewise.
25689 (get_info_about_necessary_edges): Likewise and exclude values brought
25690 only by self-recursive edges.
25691 (create_specialized_node): Redirect only clones of self-calling edges.
25692 (+self_recursive_pass_through_p): New function.
25693 (find_more_scalar_values_for_callers_subset): Use it.
25694 (find_aggregate_values_for_callers_subset): Likewise.
25695 (known_aggs_to_agg_replacement_list): Removed.
25696 (decide_whether_version_node): Re-calculate known constants for all
25697 remaining context clones.
25698
25699 2018-04-11 Richard Biener <rguenther@suse.de>
25700
25701 PR lto/85339
25702 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
25703 from early DWARF output.
25704 (dwarf2out_early_finish): Output line info unconditionally into
25705 early DWARF and add reference to it.
25706
25707 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25708
25709 PR target/85281
25710 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
25711 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
25712 other than V2DFmode using iptr mode attribute.
25713 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
25714
25715 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25716
25717 PR rtl-optimization/84659
25718 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
25719
25720 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25721
25722 PR debug/85302
25723 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
25724 SIZEP is NULL.
25725 (output_loc_list): Pass address of a dummy size variable even in the
25726 locview handling loop.
25727 (index_location_lists): Add comment on why skip_loc_list_entry can't
25728 call size_of_locs.
25729
25730 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
25731
25732 PR target/85261
25733 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
25734 into register.
25735
25736 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
25737
25738 PR target/85321
25739 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25740 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
25741 and -mstring-compare-inline-limit.
25742
25743 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25744
25745 PR target/85287
25746 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
25747 for stack clash protection in a register whenever we need it to be in
25748 a register.
25749
25750 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25751
25752 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
25753 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
25754
25755 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25756
25757 PR target/85321
25758 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
25759 the help text.
25760 (mlong-double-): Ditto.
25761 * config/rs6000/sysv4.opt (msdata=): Ditto.
25762 (mtls-size=): Ditto.
25763
25764 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25765
25766 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
25767 erroneous entries for
25768 "vector int vec_ldl (int, long int *)", and
25769 "vector unsigned int vec_ldl (int, unsigned long int *)".
25770 Add comments and entries for
25771 "vector bool char vec_ldl (int, bool char *)",
25772 "vector bool short vec_ldl (int, bool short *)",
25773 "vector bool int vec_ldl (int, bool int *)",
25774 "vector bool long long vec_ldl (int, bool long long *)",
25775 "vector pixel vec_ldl (int, pixel *)",
25776 "vector long long vec_ldl (int, long long *)",
25777 "vector unsigned long long vec_ldl (int, unsigned long long *)".
25778 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
25779 type tree bool_long_long_type_node and correct definition of
25780 bool_V2DI_type_node to make reference to this new type tree.
25781 (rs6000_mangle_type): Replace erroneous reference to
25782 bool_long_type_node with bool_long_long_type_node.
25783 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
25784 comments to emphasize sign distinctions for char and int types and
25785 replace RS6000_BTI_bool_long constant with
25786 RS6000_BTI_bool_long_long constant. Also add comment to restrict
25787 use of RS6000_BTI_pixel.
25788 (bool_long_type_node): Remove this macro definition.
25789 (bool_long_long_type_node): New macro definition
25790
25791 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25792
25793 PR rtl-optimization/85300
25794 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
25795 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
25796 simplify_unary_operation fails.
25797
25798 2018-04-10 Martin Liska <mliska@suse.cz>
25799
25800 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
25801 cgraph_edge and ipa_ref.
25802
25803 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25804
25805 PR target/85177
25806 PR target/85255
25807 * config/i386/sse.md
25808 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
25809 computation of the VEC_MERGE selector from mask.
25810 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
25811 Fix decoding of the VEC_MERGE selector into mask.
25812
25813 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25814
25815 PR tree-optimization/85286
25816 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
25817
25818 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25819
25820 * final.c (final_1): Set insn_last_address as well as
25821 insn_current_address.
25822
25823 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25824
25825 PR target/85173
25826 * explow.c (emit_stack_probe): Call validize_mem on memory location
25827 before passing it to gen_probe_stack. Create address operand and
25828 legitimize it for the probe_stack_address case.
25829
25830 2018-04-09 Jan Hubicka <jh@suse.cz>
25831
25832 PR lto/85078
25833 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
25834 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
25835 * tree.c (free_lang_data_in_type): Fix handling of binfos;
25836 walk basetypes.
25837 (free_lang_data): Rebuild type inheritance graph.
25838
25839 2018-04-09 Martin Sebor <msebor@redhat.com>
25840
25841 * invoke.texi (-finline-small-functions): Mention other optimization
25842 options.
25843 (-findirect-inlining, -fpartial-inlining): Same.
25844 (-finline-functions-called-once): Same.
25845 (-freorder-blocks-and-partition): Same.
25846
25847 2018-04-09 Jan Hubicka <jh@suse.cz>
25848
25849 PR rtl/84058
25850 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
25851 jumps; choose last target that matches the criteria (i.e.
25852 no partition changes for non-crossing jumps).
25853 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
25854 support for redirecting crossing jumps to non-crossing.
25855
25856 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
25857
25858 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
25859 also for naked functions.
25860
25861 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
25862
25863 * config/arc/arc.md (add_shift): New pattern.
25864 (add_shift2): Likewise.
25865 (sub_shift): Likewise.
25866 (sub_shift_cmp0_noout): Likewise.
25867 (compare_si_ashiftsi): Likewise.
25868 (xbfu_cmp0_noout): New combine pattern.
25869 (xbfu_cmp0"): Likewise.
25870 (movsi_set_cc_insn): Place the predicable variant first.
25871 (commutative_binary_cmp0_noout): Remove clobber.
25872 (commutative_binary_cmp0): New pattern.
25873 (noncommutative_binary_cmp0): Likewise.
25874 (noncommutative_binary_cmp0_noout): Likewise.
25875 (noncommutative_binary_comparison_result_used): Removed.
25876 (rsub_cmp0): New pattern.
25877 (rsub_cmp0_noout): Likewise.
25878 (extzvsi): Changed, keep only meaningful variants.
25879 (SQH, SEZ): New iterators.
25880 (SQH_postfix): New mode attribute.
25881 (SEZ_prefix): New code attribute.
25882 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
25883 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
25884 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
25885 of numerical value.
25886 (noncommutative_operator): Check the availability of barrel
25887 shifter option.
25888
25889 2018-04-09 Richard Biener <rguenther@suse.de>
25890
25891 PR tree-optimization/85284
25892 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
25893 Only use the niter constraining form of simple_iv when the exit
25894 is always executed.
25895
25896 2018-04-09 Tom de Vries <tom@codesourcery.com>
25897
25898 PR target/84041
25899 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
25900 (define_expand "*memory_barrier"): New define_expand.
25901 (define_insn "memory_barrier"): New insn.
25902
25903 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25904
25905 PR rtl-optimization/80463
25906 PR rtl-optimization/83972
25907 PR rtl-optimization/83480
25908
25909 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
25910 correct producer for the insn.
25911 (tidy_control_flow): Fixup seqnos in case of debug insns.
25912
25913 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25914
25915 PR rtl-optimization/83913
25916
25917 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
25918 different sched-times when merging exprs.
25919
25920 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25921
25922 PR rtl-optimization/83962
25923
25924 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
25925 tidy_fallthru_edge and tidy_control_flow.
25926
25927 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25928
25929 PR rtl-optimization/83530
25930
25931 * sel-sched.c (force_next_insn): New global variable.
25932 (remove_insn_for_debug): When force_next_insn is true, also leave only
25933 next insn in the ready list.
25934 (sel_sched_region): When the region wasn't scheduled, make another pass
25935 over it with force_next_insn set to 1.
25936
25937 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
25938
25939 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
25940 into tm_file.
25941 * config/nds32/constants.md (unspec_volatile_element): Add enum values
25942 for interrupt control.
25943 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
25944 functions for interrupt control.
25945 * config/nds32/nds32-intrinsic.md: Likewise.
25946 * config/nds32/nds32_intrinsic.h: Likewise.
25947 * config/nds32/nds32.h (nds32_builtins): Likewise.
25948
25949 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
25950
25951 * config/nds32/nds32.c (nds32_init_machine_status,
25952 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
25953 strict_aligned_p field.
25954 (nds32_expand_to_rtl_hook): New function.
25955 (TARGET_EXPAND_TO_RTL_HOOK): Define.
25956 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
25957
25958 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25959 Chung-Ju Wu <jasonwucj@gmail.com>
25960
25961 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
25962 * config/nds32/nds32-n7.md: New file.
25963 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
25964 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
25965 pipeline.
25966 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
25967 * config/nds32/nds32.md (pipeline_model): Add n7.
25968 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
25969 * config/nds32/pipelines.md: Include n7 settings.
25970
25971 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25972 Chung-Ju Wu <jasonwucj@gmail.com>
25973
25974 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
25975 * config/nds32/nds32-e8.md: New file.
25976 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
25977 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
25978 pipeline.
25979 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
25980 * config/nds32/nds32.md (pipeline_model): Add e8.
25981 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
25982 * config/nds32/pipelines.md: Include e8 settings.
25983
25984 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25985 Chung-Ju Wu <jasonwucj@gmail.com>
25986
25987 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
25988 * config/nds32/nds32-n8.md: New file.
25989 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
25990 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
25991 pipeline.
25992 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
25993 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
25994 * config/nds32/nds32.md (pipeline_model): Add n8.
25995 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
25996 * config/nds32/pipelines.md: Include n8 settings.
25997
25998 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25999 Chung-Ju Wu <jasonwucj@gmail.com>
26000
26001 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
26002 * config/nds32/nds32-n9-2r1w.md: New file.
26003 * config/nds32/nds32-n9-3r2w.md: New file.
26004 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
26005 nds32_register_ports): New or modify for cpu n9.
26006 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
26007 pipeline.
26008 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
26009 * config/nds32/nds32-utils.c: New file.
26010 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
26011 TARGET_MUL_SLOW): Define.
26012 * config/nds32/nds32.md (pipeline_model): New attribute.
26013 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
26014 New options that support cpu n9.
26015 * config/nds32/pipelines.md: Include n9 settings.
26016 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
26017
26018 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
26019
26020 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
26021 information if necessary.
26022 (output_cond_branch_compare_zero): Likewise.
26023 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
26024 (nds32_target_alignment): Refine for alignment.
26025 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
26026 (FUNCTION_BOUNDARY): Modify.
26027 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
26028 align case.
26029 * config/nds32/nds32.opt (malways-align, malign-functions): New.
26030
26031 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
26032
26033 * config/nds32/constants.md (unspec_volatile_element): Add values for
26034 TLB operation and data prefetch.
26035 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
26036 functions for TLB operation and data prefetch.
26037 * config/nds32/nds32-intrinsic.md: Likewise.
26038 * config/nds32/nds32_intrinsic.h: Likewise.
26039 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
26040 (nds32_print_operand): Likewise.
26041 * config/nds32/nds32.h (nds32_builtins): Likewise.
26042
26043 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
26044 Andrew Pinski <pinsika@gcc.gnu.org>
26045
26046 PR middle-end/82976
26047 * match.pd: Use constant_boolean_node of correct type instead of
26048 boolean_true_node or boolean_false_node for simplifying
26049 pointer comparisons to zero.
26050
26051 2018-04-07 Jakub Jelinek <jakub@redhat.com>
26052
26053 PR tree-optimization/80021
26054 * tree.c (verify_type_variant): Make error call in verify_variant_match
26055 translatable and remove final full stop.
26056
26057 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26058
26059 * config/nds32/constants.md (unspec_volatile_element): Add
26060 UNSPEC_VOLATILE_EH_RETURN.
26061 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
26062 nds32_output_stack_pop): Support dwarf exception handling process.
26063 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
26064 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
26065 exception handling process.
26066 (nds32_compute_stack_frame): Likewise.
26067 (nds32_return_addr_rtx): Likewise.
26068 (nds32_initial_elimination_offset): Likewise.
26069 (nds32_expand_prologue): Likewise.
26070 (nds32_expand_epilogue): Likewise.
26071 (nds32_dynamic_chain_address): New function.
26072 * config/nds32/nds32.h (machine_function): Add fields for dwarf
26073 exception handling.
26074 (DYNAMIC_CHAIN_ADDRESS): Define.
26075 (EH_RETURN_DATA_REGNO): Define.
26076 (EH_RETURN_STACKADJ_RTX): Define.
26077 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
26078 patterns for dwarf exception handling.
26079
26080 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26081
26082 * config/nds32/nds32.h: Clean up obsolete macros.
26083
26084 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26085
26086 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
26087 Add enum values for particular instructions.
26088 * config/nds32/nds32-intrinsic.c: Implementation of expanding
26089 particular intrinsic functions.
26090 * config/nds32/nds32-intrinsic.md: Likewise.
26091 * config/nds32/nds32_intrinsic.h: Likewise.
26092 * config/nds32/nds32.h (nds32_builtins): Likewise.
26093 * config/nds32/nds32.md (type): Add pbsad and pbsada.
26094 (btst, ave): New patterns for particular instructions.
26095
26096 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26097
26098 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
26099 Add enum values for atomic load/store and memory sync.
26100 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
26101 and memory sync.
26102 * config/nds32/nds32-intrinsic.md: Likewise.
26103 * config/nds32/nds32_intrinsic.h: Likewise.
26104 * config/nds32/nds32.h (nds32_builtins): Likewise.
26105
26106 2018-04-07 Jakub Jelinek <jakub@redhat.com>
26107
26108 PR tree-optimization/85257
26109 * fold-const.c (native_encode_vector): If not all elts could fit
26110 and off is -1, return 0 rather than offset.
26111 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
26112 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
26113 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
26114 adjust buffer in native_interpret_expr call.
26115
26116 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26117
26118 * config/nds32/constants.md (unspec_volatile_element): Add cache
26119 control enum values.
26120 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
26121 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
26122 * config/nds32/nds32.c (nds32_cctl_names): New.
26123 (nds32_print_operand): Handle cache control register names.
26124 * config/nds32/nds32.h (nds32_builtins): New enum values.
26125 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
26126 macros.
26127 * config/nds32/nds32.md (type): Add mmu.
26128 * config/nds32/pipelines.md (simple_insn): Add mmu.
26129
26130 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26131
26132 * config/nds32/nds32.md (type): Remove call.
26133 * config/nds32/pipelines.md (simple_insn): Likewise.
26134
26135 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26136
26137 * config/nds32/constants.md (unspec_volatile_element): Add
26138 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
26139 UNSPEC_VOLATILE_FMFCFG.
26140 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
26141 description for fmfcfg and fmfcsr.
26142 (bdesc_1arg): Add fmtcsr.
26143 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
26144 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
26145 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
26146 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
26147 unspec_fmfcfg): New patterns.
26148 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
26149 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
26150 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
26151 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
26152 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
26153 __nds32__fmfcfg): Define.
26154
26155 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26156
26157 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
26158 intrinsic register names.
26159 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
26160 intrinsic register enum values and macros.
26161
26162 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26163
26164 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
26165 for load/store addressing form.
26166 (nds32_print_operand_address): Likewise.
26167
26168 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
26169
26170 PR target/85196
26171 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
26172 based on LABEL_REF. Remove useless assertion.
26173 (pic_address_needs_scratch): Fix formatting.
26174 (sparc_legitimize_pic_address): Minor tweaks.
26175 (sparc_delegitimize_address): Adjust assertion accordingly.
26176 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
26177 into symbolic_operand.
26178 (movsi_high_pic_label_ref): Likewise.
26179 (movsi_lo_sum_pic_label_ref): Likewise.
26180 (movdi_pic_label_ref): Likewise.
26181 (movdi_high_pic_label_ref): Likewise.
26182 (movdi_lo_sum_pic_label_ref): Likewise.
26183
26184 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
26185
26186 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
26187 custom LIB_SPEC setup.
26188
26189 2018-04-06 Ruslan Bukin <br@bsdpad.com>
26190 Kito Cheng <kito.cheng@gmail.com>
26191
26192 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
26193 * config/riscv/freebsd.h: New.
26194
26195 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26196
26197 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
26198 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
26199 file.
26200
26201 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26202 Kito Cheng <kito.cheng@gmail.com>
26203
26204 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
26205 nds32_output_call, nds32_symbol_binds_local_p): New functions.
26206 * config/nds32/nds32-protos.h (nds32_output_call,
26207 nds32_output_return): Declare.
26208 * config/nds32/nds32.md: Refine all the call and return patterns.
26209
26210 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26211
26212 PR debug/85252
26213 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
26214 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
26215
26216 PR rtl-optimization/84872
26217 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
26218 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
26219 EDGE_CROSSING edge.
26220
26221 2018-04-06 Tamar Christina <tamar.christina@arm.com>
26222
26223 * expr.c (copy_blkmode_to_reg): Revert 254862.
26224 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
26225
26226 2018-04-06 Richard Biener <rguenther@suse.de>
26227
26228 PR middle-end/85244
26229 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
26230 after seeing a component reference with an adjacent field. Treat
26231 refs to arrays at struct end of external decls similar to
26232 refs to unconstrained commons.
26233
26234 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26235
26236 PR sanitizer/85213
26237 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
26238 look through SAVE_EXPRs with non-side-effects argument. Adjust
26239 recursive calls.
26240 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
26241 save_p here.
26242
26243 2018-04-06 Richard Biener <rguenther@suse.de>
26244
26245 PR middle-end/85180
26246 * alias.c (find_base_term): New wrapper around find_base_term
26247 unwinding CSELIB_VAL_PTR changes.
26248 (find_base_term): Do not restore CSELIB_VAL_PTR during the
26249 recursion.
26250
26251 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26252
26253 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
26254 instructions.
26255 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
26256 constant definitions.
26257 ("nop"): lr 0,0 -> nopr r0
26258 ("nop_lr0", "nop_lr1"): New insn definitions.
26259
26260 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26261
26262 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
26263 NDS32_V3PUSH_AVAILABLE_P macro.
26264
26265 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
26266 Chung-Ju Wu <jasonwucj@gmail.com>
26267
26268 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
26269 (nds32*-*-*): Add float and fpu_config into supported_defaults.
26270 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
26271 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
26272 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
26273 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
26274 * config/nds32/constraints.md: New constraints and checking for hard
26275 float configuration.
26276 * config/nds32/iterators.md: New mode iterator and attribute for hard
26277 float configuration.
26278 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
26279 patterns.
26280 * config/nds32/nds32-fpu.md: New file.
26281 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
26282 deal with hard float code generation.
26283 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
26284 ARCH_V3S.
26285 (abi_type, float_reg_number): New enum type.
26286 * config/nds32/nds32-predicates.c: New predicates for hard float.
26287 * config/nds32/nds32-protos.h: Declare functions for hard float.
26288 * config/nds32/nds32.c: Implementation for hard float configuration.
26289 * config/nds32/nds32.h: Definitions for hard float configuration.
26290 * config/nds32/nds32.md: Include hard float machine description and
26291 modify patterns for hard float configuration.
26292 * config/nds32/nds32.opt: New options for hard float configuration.
26293 * config/nds32/predicates.md: New predicates for hard float
26294 configuration.
26295
26296 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26297
26298 * common/config/nds32/nds32-common.c
26299 (nds32_option_optimization_table): Enable -mreleax-hint by default.
26300
26301 2018-04-05 Jakub Jelinek <jakub@redhat.com>
26302
26303 PR middle-end/85195
26304 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
26305 CONSTRUCTOR_ELT (ctor, ...)->value.
26306
26307 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
26308
26309 PR target/85193
26310 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
26311
26312 2018-04-05 Tom de Vries <tom@codesourcery.com>
26313
26314 PR target/85204
26315 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
26316 cond jump.
26317
26318 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26319 Kito Cheng <kito.cheng@gmail.com>
26320
26321 * config/nds32/constraints.md (U33): Fine-tune checking condition.
26322 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
26323 * config/nds32/nds32.h (nds32_16bit_address_type): Add
26324 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
26325
26326 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26327 Kito Cheng <kito.cheng@gmail.com>
26328
26329 * config/nds32/constraints.md (Ufe): New memory constraint.
26330 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
26331 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
26332 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
26333 operands.
26334 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
26335 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
26336
26337 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26338
26339 * config/nds32/nds32.md: Use optimize_size in the condition for
26340 alu-shift instructions.
26341
26342 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26343
26344 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
26345
26346 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26347
26348 * config/nds32/nds32.md (negsi2): Refine pattern.
26349
26350 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26351 Chung-Ju Wu <jasonwucj@gmail.com>
26352
26353 * config/nds32/iterators.md (shift_rotate): New code iterator.
26354 (shift): New code attribute.
26355 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
26356 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
26357 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
26358 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
26359 bit-wise operations.
26360 (andsi3, *andsi3): Ditto.
26361 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
26362 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
26363 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
26364 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
26365 nds32_ior_operand, nds32_xor_operand): New predicates.
26366
26367 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26368
26369 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
26370 (addsi3, subsi3): ... this.
26371
26372 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26373
26374 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
26375
26376 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26377
26378 * config/nds32/nds32.md: Adjust indention.
26379
26380 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26381
26382 * config/nds32/nds32.md (feature): New attribute.
26383
26384 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26385
26386 * config/nds32/nds32.md (subtype): New attribute.
26387
26388 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
26389
26390 PR target/85203
26391 * config/arm/arm-builtins.c (arm_expand_builtin): Change
26392 expansion to perform a bitwise AND of the argument followed by a
26393 boolean negation of the result.
26394
26395 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
26396
26397 PR rtl-optimization/84878
26398 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
26399 the basic block. Assert the use reference is not artificial and that
26400 it has an associated insn.
26401
26402 2018-04-04 Michael Matz <matz@suse.de>
26403
26404 * builtins.c (compute_objsize): Pass correct operand
26405 to array_at_struct_end_p.
26406
26407 2018-04-04 Richard Biener <rguenther@suse.de>
26408
26409 PR lto/85176
26410 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
26411 from contexts for DINFO_LEVEL_TERSE and below.
26412
26413 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26414
26415 * config/nds32/nds32-doubleword.md (move_<mode>): Require
26416 resiter_operand condition.
26417 * config/nds32/nds32.md (*move<mode>): Ditto.
26418
26419 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26420 Monk Chiang <sh.chiang04@gmail.com>
26421
26422 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
26423
26424 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26425
26426 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
26427
26428 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26429 Kito Cheng <kito.cheng@gmail.com>
26430
26431 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
26432 nds32_cond_code_str, output_cond_branch,
26433 output_cond_branch_compare_zero, nds32_expand_cbranch,
26434 nds32_expand_cstore, nds32_expand_movcc,
26435 nds32_output_cbranchsi4_equality_zero,
26436 nds32_output_cbranchsi4_equality_reg,
26437 nds32_output_cbranchsi4_equality_reg_or_const_int,
26438 nds32_output_cbranchsi4_greater_less_zero: New functions.
26439 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
26440 nds32_expand_cstore, nds32_expand_movcc,
26441 nds32_output_cbranchsi4_equality_zero,
26442 nds32_output_cbranchsi4_equality_reg,
26443 nds32_output_cbranchsi4_equality_reg_or_const_int,
26444 nds32_output_cbranchsi4_greater_less_zero): Declare.
26445 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
26446 nds32_rimm11s_operand): New predicates.
26447 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
26448 * config/nds32/nds32.md: Rewrite all the branch and conditional move
26449 patterns.
26450
26451 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26452
26453 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
26454 * config/nds32/nds32.md: Ditto.
26455 * config/nds32/pipelines.md: Ditto.
26456
26457 2018-04-04 Richard Biener <rguenther@suse.de>
26458
26459 PR tree-optimization/85168
26460 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
26461 propagating abnormals.
26462
26463 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26464
26465 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
26466
26467 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26468 Kito Cheng <kito.cheng@gmail.com>
26469
26470 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
26471 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
26472 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
26473 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
26474 * config/nds32/nds32.md (sibcall_internal): New.
26475 (sibcall_register): Remove.
26476 (sibcall_immediate): Remove.
26477 (sibcall_value_internal): New.
26478 (sibcall_value_register): Remove.
26479 (sibcall_value_immediate): Remove.
26480 * config/nds32/predicates.md (nds32_general_register_operand): New.
26481 (nds32_call_address_operand): New.
26482
26483 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26484
26485 PR rtl-optimization/85167
26486 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
26487 bb_defs if *split_p, instead preinitialize it to NULL.
26488
26489 PR tree-optimization/85156
26490 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
26491 evaluating the argument multiple times.
26492
26493 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
26494
26495 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
26496 than vector.
26497 (_mm_cvtpd_ps): Likewise.
26498 (_mm_cvttpd_epi32): Likewise.
26499 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
26500 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
26501 vector, pixel, and bool following altivec.h include.
26502
26503 2018-04-03 Martin Sebor <msebor@redhat.com>
26504
26505 * doc/extend.texi (Common Function Attributes): Clarify.
26506 (const attribute): Likewise.
26507 (pure attribute): Likewise.
26508
26509 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26510
26511 PR target/85169
26512 * config/i386/i386.c (ix86_expand_vector_set): Use
26513 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
26514
26515 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
26516
26517 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
26518 instructions when changing rounding bits to preserve precision bits
26519 in the x87 control word.
26520
26521 2018-04-03 Martin Liska <mliska@suse.cz>
26522
26523 PR tree-optimization/82491
26524 * rtl.h (strip_offset_and_add): Replace += suboffset with
26525 poly_uint64 () + suboffset.
26526
26527 2018-03-29 Martin Liska <mliska@suse.cz>
26528 Martin Jambor <mjambor@suse.cz>
26529
26530 PR ipa/84947
26531 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
26532 param_type is not an integral or pointer type.
26533
26534 2018-04-03 Richard Biener <rguenther@suse.de>
26535
26536 * sese.h (recompute_all_dominators): Remove.
26537
26538 2018-04-02 Martin Sebor <msebor@redhat.com>
26539
26540 * doc/invoke.texi (-Wrestrict): Fix typos.
26541
26542 2018-04-02 Jim Wilson <jimw@sifive.com>
26543
26544 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
26545 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
26546 (<optab>di3, <optab>si3_extend): Likewise.
26547 (<optab>si3_mask, <optab>si3_mask_1): New.
26548 (<optab>di3_mask, <optab>di3_mask_1): New.
26549 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
26550 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
26551 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
26552
26553 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
26554
26555 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
26556 example.
26557
26558 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
26559
26560 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
26561 (nds32_canonicalize_comparison): New function.
26562
26563 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26564 Kito Cheng <kito.cheng@gmail.com>
26565 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26566
26567 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
26568 * config/nds32/constants.md (unspec_volatile_element): Add
26569 UNSPEC_VOLATILE_RELAX_GROUP.
26570 * config/nds32/nds32-relax-opt.c: New file.
26571 * config/nds32/nds32-predicates.c
26572 (nds32_symbol_load_store_p): New function.
26573 * config/nds32/nds32-protos.h
26574 (nds32_symbol_load_store_p): Declare function.
26575 (make_pass_nds32_relax_opt): Declare new rtl pass function.
26576 * config/nds32/nds32.c
26577 (nds32_register_pass): New function to register pass.
26578 (nds32_register_passes): New function to register passes.
26579 * config/nds32/nds32.md (relax_group): New pattern.
26580 * config/nds32/nds32.opt (mrelax-hint): New option.
26581 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
26582
26583 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
26584
26585 * config/nds32/t-nds32: Modify files dependency.
26586
26587 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26588
26589 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
26590 (PROFILE_HOOK): Define its implementation.
26591
26592 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26593
26594 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
26595 type and 32-bit size.
26596
26597 2018-04-01 Jakub Jelinek <jakub@redhat.com>
26598
26599 PR middle-end/85090
26600 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
26601 (V_128_256): New mode iterator.
26602 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
26603 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
26604 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
26605 of V.
26606 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
26607 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
26608
26609 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
26610
26611 PR target/83315
26612 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
26613 NaN inputs correctly.
26614
26615 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
26616
26617 PR target/80546
26618 * config/rs6000/vsx.md (??r): New mode attribute.
26619 (*vsx_mov<mode>_64bit): Use it.
26620 (*vsx_mov<mode>_32bit): Likewise.
26621
26622 2018-03-30 Martin Sebor <msebor@redhat.com>
26623
26624 PR tree-optimization/84818
26625 * builtins.c (check_access): Use warning_n.
26626
26627 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26628
26629 PR target/83822
26630 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
26631 condition.
26632 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
26633 condition.
26634
26635 2018-03-30 Julia Koval <julia.koval@intel.com>
26636
26637 PR target/84413
26638 * x86-tune.def (movx, partial_reg_dependency): Enable for
26639 m_SKYLAKE_AVX512.
26640
26641 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
26642
26643 PR inline-asm/84985
26644 * lra-constraints.c (process_alt_operands): Move setting
26645 this_alternative_matches below.
26646
26647 2018-03-29 Martin Liska <mliska@suse.cz>
26648
26649 PR lto/84995.
26650 * doc/invoke.texi: Document how LTO works with debug info.
26651 Describe auto-load support of binutils. Mention 'x86-64'
26652 as valid option value of -march option.
26653
26654 2018-03-29 Jakub Jelinek <jakub@redhat.com>
26655
26656 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
26657
26658 PR c/85094
26659 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
26660 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
26661 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
26662 checking.
26663
26664 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26665
26666 PR target/84912
26667 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
26668 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
26669 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
26670 for RS6000_BTM_POWERPC64.
26671 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
26672 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
26673 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
26674 definition.
26675 (DIVDE): Use it.
26676 (DIVDEU): Likewise.
26677
26678 2018-03-28 Carl Love <cel@us.ibm.com>
26679
26680 Revert
26681 2017-09-27 Carl Love <cel@us.ibm.com>
26682
26683 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
26684 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
26685 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
26686 fctiw instruction.
26687
26688 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26689
26690 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
26691 instead of __vector bool.
26692 (_mm_max_pu8): Likewise.
26693 (_mm_min_pi16): Likewise.
26694
26695 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26696
26697 PR target/84912
26698 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
26699 (DIVWEUO): Likewise.
26700 (DIVDEO): Likewise.
26701 (DIVDEUO): Likewise.
26702 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
26703 DIVWEUO and DIVDEUO.
26704 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
26705 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
26706 (div_extend): Likewise.
26707 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
26708 builtin function.
26709 (__builtin_divweuo): Likewise.
26710 (__builtin_divdeo): Likewise.
26711 (__builtin_divdeuo): Likewise.
26712
26713 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26714
26715 PR target/85095
26716 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
26717 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
26718
26719 PR tree-optimization/82004
26720 * gimple-match-head.c (optimize_pow_to_exp): New function.
26721 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
26722 Don't fold to exp if optimize_pow_to_exp is false.
26723
26724 2018-03-28 Martin Liska <mliska@suse.cz>
26725
26726 PR other/84819
26727 * calls.c (initialize_argument_information): Fix trailing space.
26728 * common.opt: Fix typo and provide better explanation for
26729 -fsanitize-coverage option.
26730 * config/i386/i386.opt: Fix typo.
26731
26732 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26733 Martin Liska <mliska@suse.cz>
26734
26735 PR sanitizer/85081
26736 * gimplify.c (asan_poison_variable): Don't do the check for
26737 gimplify_omp_ctxp here.
26738 (gimplify_decl_expr): Do it here.
26739 (gimplify_target_expr): Likewise.
26740
26741 2018-03-28 Martin Liska <mliska@suse.cz>
26742
26743 PR target/84988
26744 * config/i386/i386.c (ix86_function_arg_advance): Do not call
26745 chkp_type_bounds_count if MPX is not enabled.
26746
26747 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
26748
26749 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
26750
26751 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
26752
26753 PR target/84914
26754 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
26755 function to create the function decl for complex long double
26756 multiply and divide for -mabi=ieeelongdouble.
26757 (init_float128_ieee): Call it.
26758
26759 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
26760
26761 PR target/85044
26762 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
26763 -fcf-protection=branch -mibt.
26764 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
26765
26766 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26767
26768 PR target/81863
26769 * config/arm/arm.c (arm_valid_symbolic_address): Handle
26770 arm_word_relocations.
26771
26772 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
26773
26774 PR target/85056
26775 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
26776 extern array declarations.
26777
26778 2018-03-27 Richard Biener <rguenther@suse.de>
26779
26780 PR middle-end/84067
26781 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
26782 explicit single_use checks.
26783
26784 2018-03-27 Richard Biener <rguenther@suse.de>
26785
26786 PR tree-optimization/85082
26787 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
26788 Valueize the VUSE.
26789
26790 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26791
26792 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
26793 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
26794 Turn on fasynchronous-unwind-tables and funwind-tables.
26795
26796 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
26797
26798 PR target/85073
26799 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
26800 (*bmi_blsr_<mode>_ccz): Ditto.
26801
26802 2018-03-26 Tom de Vries <tom@codesourcery.com>
26803
26804 PR tree-optimization/85063
26805 * omp-general.c (offloading_function_p): New function. Factor out
26806 of ...
26807 * omp-offload.c (pass_omp_target_link::gate): ... here.
26808 * omp-general.h (offloading_function_p): Declare.
26809 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
26810 with attribute omp declare target for offloading functions.
26811
26812 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
26813
26814 PR tree-optimization/84005
26815 * tree-data-ref.h (get_base_for_alignment): Declare.
26816 * tree-data-ref.c (get_base_for_alignment_1): New function.
26817 (get_base_for_alignment): Likewise.
26818 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
26819 get_base_for_alignment to find a suitable base object, instead
26820 of always using drb->base_address.
26821
26822 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26823
26824 PR inline-asm/85022
26825 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
26826 known size by default.
26827
26828 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
26829
26830 PR inline-asm/85030
26831 * lra-constraints.c (process_alt_operands): Don't match BLKmode
26832 and non BLKmode operands.
26833
26834 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26835
26836 PR target/85026
26837 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
26838 Clean up attributes.
26839
26840 2018-03-23 Richard Biener <rguenther@suse.de>
26841
26842 PR debug/85020
26843 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
26844 we are going to emit early debug for LTO.
26845
26846 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26847
26848 PR inline-asm/85034
26849 * function.c (match_asm_constraints_1): Don't optimize if input
26850 doesn't satisfy general_operand predicate for output's mode.
26851
26852 PR inline-asm/85022
26853 * alias.c (write_dependence_p): Don't require for x_canonicalized
26854 non-VOIDmode if x has VOIDmode.
26855
26856 PR sanitizer/85029
26857 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
26858 just don't try to optimize it rather than assert it never happens.
26859
26860 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26861
26862 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
26863 macro expansions for definition of ST_INTERNAL_<mode> and
26864 LD_INTERNAL_<mode> builtins.
26865 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
26866 Remove prototype.
26867 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
26868 function.
26869 (altivec_expand_st_builtin): Likewise.
26870 (altivec_expand_builtin): Remove calls to deleted functions.
26871 (rs6000_address_for_altivec): Delete this function.
26872 * config/rs6000/vector.md: Remove expands for
26873 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
26874
26875 2018-03-22 Sudakshina Das <sudi.das@arm.com>
26876
26877 PR target/84826
26878 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
26879 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
26880 re-computing once computed.
26881 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
26882 (arm_init_machine_status): Initialize
26883 machine->static_chain_stack_bytes.
26884
26885 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26886
26887 PR target/84760
26888 * doc/extend.texi: Add four new prototypes for vec_ld.
26889 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
26890 definitions for more logical presentation.
26891 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
26892 entries for V1TI variants of __builtin_altivec_ld builtin.
26893 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
26894 handling of V1TI variant of LVX icode pattern.
26895 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
26896 (rs6000_gimple_fold_builtin): Likewise.
26897 (altivec_init_builtins): Add code to define
26898 __builtin_altivec_lvx_v1ti function.
26899
26900 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26901
26902 PR inline-asm/84941
26903 * function.c (match_asm_constraints_1): Don't do the optimization
26904 if input isn't a REG, SUBREG, MEM or constant.
26905
26906 2018-03-22 Tom de Vries <tom@codesourcery.com>
26907
26908 PR tree-optimization/84956
26909 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
26910 bb_has_abnormal_pred.
26911
26912 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26913
26914 PR sanitizer/85018
26915 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
26916 DECL_INITIAL (decl) to decl at the end.
26917 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
26918 adjust the comment.
26919
26920 2018-03-21 Joseph Myers <joseph@codesourcery.com>
26921
26922 * doc/extend.texi (__builtin_tgmath): Document when complex
26923 integer types are treated as _Complex _Float64.
26924
26925 2018-03-21 Tom de Vries <tom@codesourcery.com>
26926
26927 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
26928
26929 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26930
26931 PR tree-optimization/84960
26932 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
26933 if it is ENTRY block, move them into single succ of ENTRY in that case.
26934
26935 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
26936
26937 PR tree-optimization/84811
26938 * poly-int.h (poly_span_traits): Remove the T3 parameter and
26939 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
26940 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
26941 (known_subrange_p): Update accordingly. Cast each value involved
26942 in the size comparison, rather than casting the result of the
26943 subtraction.
26944
26945 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26946
26947 PR tree-optimization/84982
26948 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
26949 by flipping the least significant bit rather than all bits from
26950 bitpos to bitpos + bitsize - 1.
26951
26952 2018-03-21 Nathan Sidwell <nathan@acm.org>
26953
26954 * doc/extend.texi (Deprecated Features): Remove mention of
26955 long-deleted deprecations.
26956
26957 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26958
26959 PR jit/84288
26960 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
26961 * configure: Regenerate.
26962
26963 2018-03-21 Tom de Vries <tom@codesourcery.com>
26964
26965 PR tree-optimization/83126
26966 * tree-parloops.c (num_phis): New function.
26967 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
26968
26969 2018-03-21 Nathan Sidwell <nathan@acm.org>
26970
26971 * doc/extend.texi (Deprecated Features): Update deprecated flags,
26972 mention anon-struct/union members and trailing attributes.
26973
26974 2018-03-21 Bin Cheng <bin.cheng@arm.com>
26975
26976 PR tree-optimization/84969
26977 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
26978 builtin memset partitions if they set different rhs values.
26979
26980 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26981
26982 PR rtl-optimization/84989
26983 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
26984 VEC_DUPLICATE with scalar result mode.
26985
26986 2018-03-21 Martin Liska <mliska@suse.cz>
26987
26988 PR ipa/84963
26989 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
26990 not intended return statement.
26991
26992 2018-03-21 Martin Liska <mliska@suse.cz>
26993
26994 PR target/84988
26995 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
26996 (chkp_find_bound_slots_1): Limit number of iterations.
26997
26998 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
26999
27000 PR target/84838
27001 * Minor grammar fixes for x86 options.
27002
27003 2018-03-20 Jakub Jelinek <jakub@redhat.com>
27004
27005 PR debug/84875
27006 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
27007 holding REG_CFA_RESTORE notes, instead turn them into a USE.
27008
27009 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
27010
27011 PR target/83789
27012 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
27013 (altivec_lvx_<mode>_1op): Likewise.
27014 (altivec_stvx_<mode>_2op): Likewise.
27015 (altivec_stvx_<mode>_1op): Likewise.
27016 (altivec_lvx_<VM2:mode>): New define_expand.
27017 (altivec_stvx_<VM2:mode>): Likewise.
27018 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
27019 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
27020 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
27021 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
27022 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
27023 (rs6000_gen_lvx): Likewise.
27024 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
27025 (altivec_expand_stv_builtin): Likewise.
27026 (altivec_expand_builtin): Likewise.
27027 * config/rs6000/vector.md: Likewise.
27028
27029 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27030
27031 PR target/82518
27032 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
27033 BYTES_BIG_ENDIAN.
27034
27035 2018-03-20 Richard Biener <rguenther@suse.de>
27036
27037 PR target/84986
27038 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
27039 sign-conversions as zero, fall back to standard scalar_stmt
27040 cost for the rest.
27041
27042 2018-03-20 Martin Liska <mliska@suse.cz>
27043
27044 PR ipa/84825
27045 * predict.c (rebuild_frequencies): Handle case when we have
27046 PROFILE_ABSENT, but flag_guess_branch_prob is false.
27047
27048 2018-03-20 Jakub Jelinek <jakub@redhat.com>
27049
27050 PR target/84990
27051 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
27052 flag_section_anchors.
27053 * varasm.c (use_blocks_for_decl_p): Remove hack for
27054 dw2_force_const_mem.
27055
27056 PR target/84845
27057 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
27058 to ...
27059 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
27060 be created, use lowpart_subreg of operands[0] rather than operands[0]
27061 itself.
27062 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
27063 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
27064 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
27065 and n constraint instead of aarch64_shift_imm_di and Usd.
27066 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
27067 (*aarch64_<optab>_reg_minus<mode>3): ... this.
27068
27069 2018-03-20 Sudakshina Das <sudi.das@arm.com>
27070
27071 PR target/82989
27072 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
27073 to favor GPR over NEON registers.
27074 (<shift>di3_neon): Likewise.
27075
27076 2018-03-20 Tom de Vries <tom@codesourcery.com>
27077
27078 PR target/84952
27079 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
27080 (nvptx_process_pars): Emit bar.sync asap and alap.
27081
27082 2018-03-20 Tom de Vries <tom@codesourcery.com>
27083
27084 PR target/84954
27085 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
27086 seen_label if seen_label is already set.
27087
27088 2018-03-20 Jakub Jelinek <jakub@redhat.com>
27089
27090 PR target/84945
27091 * config/i386/i386.c (fold_builtin_cpu): For features above 31
27092 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
27093 Use 1U instead of 1. Formatting fixes.
27094
27095 PR c/84953
27096 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
27097 instead of TREE_TYPE (s1) for the return value.
27098
27099 2018-03-19 Jakub Jelinek <jakub@redhat.com>
27100
27101 PR tree-optimization/84946
27102 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
27103 bitsize + bitsize in poly_uint64 rather than poly_int64.
27104
27105 PR sanitizer/78651
27106 * dwarf2asm.c: Include fold-const.c.
27107 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
27108 of decl rather than decl itself.
27109
27110 PR rtl-optimization/84643
27111 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
27112
27113 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
27114
27115 PR sanitizer/78651
27116 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
27117 calling assemble_variable.
27118
27119 2018-03-19 Sudakshina Das <sudi.das@arm.com>
27120
27121 PR target/81647
27122 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
27123 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
27124
27125 2018-03-19 Jim Wilson <jimw@sifive.com>
27126
27127 PR bootstrap/84856
27128 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
27129 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
27130 (riscv_first_stack_step): Likewise.
27131 (riscv_option_override): Use STACK_BOUNDARY instead of
27132 MIN_STACK_BOUNDARY.
27133 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
27134 MIN_STACK_BOUNDARY.
27135 (BIGGEST_ALIGNMENT): Set to 128.
27136 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
27137 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
27138 STACK_BOUNDARY.
27139
27140 2018-03-19 Richard Biener <rguenther@suse.de>
27141
27142 PR tree-optimization/84933
27143 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
27144 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
27145
27146 2018-03-19 Richard Biener <rguenther@suse.de>
27147
27148 PR tree-optimization/84859
27149 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
27150 (cond_if_else_store_replacement): Perform sinking operation on
27151 single-store BBs regardless of MAX_STORES_TO_SINK setting.
27152 Generalize what a BB with a single eligible store is.
27153
27154 2018-03-19 Richard Biener <rguenther@suse.de>
27155
27156 PR tree-optimization/84929
27157 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
27158 chrec_is_positive against non-chrec arg.
27159
27160 2018-03-19 Tamar Christina <tamar.christina@arm.com>
27161
27162 PR target/84711
27163 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
27164
27165 2018-03-18 Martin Liska <mliska@suse.cz>
27166
27167 PR rtl-optimization/84635
27168 * regrename.c (build_def_use): Use matches_mode only when
27169 matches >= 0.
27170
27171 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
27172
27173 PR tree-optimization/84913
27174 * tree-vect-loop.c (vectorizable_reduction): Don't try to
27175 vectorize chains of COND_EXPRs.
27176
27177 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27178
27179 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
27180
27181 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27182
27183 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
27184
27185 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27186
27187 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
27188
27189 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27190 Kito Cheng <kito.cheng@gmail.com>
27191
27192 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
27193 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
27194 (nds32_adjust_reg_alloc_order): New function.
27195 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
27196
27197 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
27198
27199 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
27200 nds32_print_operand, nds32_print_operand_address): Use
27201 HOST_WIDE_INT_PRINT_DEC instead.
27202
27203 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27204
27205 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
27206
27207 2018-03-17 Jakub Jelinek <jakub@redhat.com>
27208
27209 PR target/84902
27210 * config/i386/i386.c (initial_ix86_tune_features,
27211 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
27212 unsigned long long.
27213 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
27214 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
27215 rather than 1u << ix86_tune. Formatting fix.
27216 (ix86_option_override_internal): Change ix86_arch_mask from
27217 unsigned int to unsigned HOST_WIDE_INT, initialize to
27218 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
27219 (ix86_function_specific_restore): Likewise.
27220
27221 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27222
27223 PR target/84899
27224 * postreload.c (reload_combine_recognize_pattern): Perform
27225 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
27226 truncate_int_for_mode the result for the destination's mode.
27227
27228 PR c/84909
27229 * hsa-gen.c (mem_type_for_type): Fix comment typo.
27230 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
27231 Likewise.
27232 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27233 Likewise.
27234
27235 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
27236
27237 PR target/84876
27238 * lra-assigns.c (lra_split_hard_reg_for): Don't use
27239 regno_allocno_class_array and sorted_pseudos.
27240 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
27241 insns where regno is used.
27242
27243 2018-03-16 Martin Liska <mliska@suse.cz>
27244
27245 PR ipa/84833
27246 * multiple_target.c (create_dispatcher_calls): Redirect
27247 reference in the symbol table.
27248
27249 2018-03-16 Martin Liska <mliska@suse.cz>
27250
27251 PR ipa/84722
27252 * multiple_target.c (create_dispatcher_calls): Redirect also
27253 an alias.
27254
27255 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27256
27257 PR c++/79937
27258 PR c++/82410
27259 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
27260 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
27261 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
27262
27263 2018-03-16 Julia Koval <julia.koval@intel.com>
27264
27265 * doc/invoke.texi (Skylake Server): Add CLWB.
27266 Cannonlake): Remove CLWB.
27267
27268 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27269
27270 PR tree-optimization/84841
27271 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
27272 1 << 3.
27273 (FLOAT_ONE_CONST_TYPE): Define.
27274 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
27275 (sort_by_operand_rank): Put entries with higher constant_type last
27276 rather than first to match comments.
27277
27278 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
27279
27280 * config/nios2/nios2.md (movsi_internal): Fix thinko in
27281 split predicate.
27282
27283 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27284
27285 PR c++/79085
27286 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
27287 check and use address of target always.
27288
27289 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
27290
27291 PR target/84574
27292 * config/i386/i386.c (indirect_thunk_needed): Update comments.
27293 (indirect_thunk_bnd_needed): Likewise.
27294 (indirect_thunks_used): Likewise.
27295 (indirect_thunks_bnd_used): Likewise.
27296 (indirect_return_needed): New.
27297 (indirect_return_bnd_needed): Likewise.
27298 (output_indirect_thunk_function): Add a bool argument for
27299 function return.
27300 (output_indirect_thunk_function): Don't generate alias for
27301 function return thunk.
27302 (ix86_code_end): Call output_indirect_thunk_function to generate
27303 function return thunks.
27304 (ix86_output_function_return): Set indirect_return_bnd_needed
27305 and indirect_return_needed instead of indirect_thunk_bnd_needed
27306 and indirect_thunk_needed.
27307
27308 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
27309
27310 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
27311 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
27312 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
27313
27314 2018-03-15 David Malcolm <dmalcolm@redhat.com>
27315 Paul Hua <paul.hua.gm@gmail.com>
27316
27317 PR c/84852
27318 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
27319
27320 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
27321
27322 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
27323 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
27324 resp. SFmode cases.
27325
27326 2018-03-15 Tamar Christina <tamar.christina@arm.com>
27327
27328 PR target/84711
27329 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
27330 instead of GET_MODE_SIZE when comparing Units.
27331
27332 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
27333
27334 PR target/68256
27335 * varasm.c (hash_section): Return an unchangeble hash value
27336 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
27337 Return !aarch64_can_use_per_function_literal_pools_p ().
27338
27339 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27340
27341 PR target/84860
27342 * optabs.c (emit_conditional_move): Pass address of cmode's copy
27343 rather than address of cmode as last argument to prepare_cmp_insn.
27344
27345 2018-03-15 Julia Koval <julia.koval@intel.com>
27346
27347 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
27348 F_AVX512VNNI, F_AVX512BITALG): New.
27349
27350 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
27351
27352 PR target/83451
27353 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
27354 insn for floating-point loads and stores.
27355
27356 2018-03-14 Carl Love <cel@us.ibm.com>
27357
27358 * config/rs6000/rs6000-c.c: Add macro definitions for
27359 ALTIVEC_BUILTIN_VEC_PERMXOR.
27360 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
27361 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
27362 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
27363 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
27364 UNSPEC_VPERMXOR.
27365 * config/doc/extend.texi: Add prototypes for vec_permxor.
27366
27367 2018-03-14 David Malcolm <dmalcolm@redhat.com>
27368
27369 PR c/84852
27370 * diagnostic-show-locus.c (class layout_point): Convert m_line
27371 from int to linenum_type.
27372 (line_span::comparator): Use linenum "compare" function when
27373 comparing line numbers.
27374 (test_line_span): New function.
27375 (layout_range::contains_point): Convert param "row" from int to
27376 linenum_type.
27377 (layout_range::intersects_line_p): Likewise.
27378 (layout::will_show_line_p): Likewise.
27379 (layout::print_source_line): Likewise.
27380 (layout::should_print_annotation_line_p): Likewise.
27381 (layout::print_annotation_line): Likewise.
27382 (layout::print_leading_fixits): Likewise.
27383 (layout::annotation_line_showed_range_p): Likewise.
27384 (struct line_corrections): Likewise for field m_row.
27385 (line_corrections::line_corrections): Likewise for param "row".
27386 (layout::print_trailing_fixits): Likewise.
27387 (layout::get_state_at_point): Likewise.
27388 (layout::get_x_bound_for_row): Likewise.
27389 (layout::print_line): Likewise.
27390 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
27391 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
27392 * input.c (selftest::test_linenum_comparisons): New function.
27393 (selftest::input_c_tests): Call it.
27394 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
27395 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
27396 * selftest.h (ASSERT_GT): New macro.
27397 (ASSERT_GT_AT): New macro.
27398 (ASSERT_LT): New macro.
27399 (ASSERT_LT_AT): New macro.
27400
27401 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
27402
27403 PR rtl-optimization/84780
27404 * combine.c (distribute_links): Don't make a link based on pc_rtx.
27405
27406 2018-03-14 Martin Liska <mliska@suse.cz>
27407
27408 * tree.c (record_node_allocation_statistics): Use
27409 get_stats_node_kind.
27410 (get_stats_node_kind): New function extracted from
27411 record_node_allocation_statistics.
27412 (free_node): Use get_stats_node_kind.
27413
27414 2018-03-14 Richard Biener <rguenther@suse.de>
27415
27416 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
27417 that the value-set of ANTIC_IN doesn't grow.
27418
27419 Revert
27420 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
27421 member.
27422 (BB_VISITED_WITH_VISITED_SUCCS): New define.
27423 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
27424
27425 2018-03-14 Julia Koval <julia.koval@intel.com>
27426
27427 * config.gcc (icelake-client, icelake-server): New.
27428 (icelake): Remove.
27429 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
27430 (initial_ix86_arch_features): Ditto.
27431 (PTA_SKYLAKE): Add SGX.
27432 (PTA_ICELAKE): Remove.
27433 (PTA_ICELAKE_CLIENT): New.
27434 (PTA_ICELAKE_SERVER): New.
27435 (ix86_option_override_internal): Split up icelake on icelake client and
27436 icelake server.
27437 (get_builtin_code_for_version): Ditto.
27438 (fold_builtin_cpu): Ditto.
27439 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
27440 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
27441 * config/i386/i386.h (processor_type): Ditto.
27442 * doc/invoke.texi: Ditto.
27443
27444 2018-03-14 Jakub Jelinek <jakub@redhat.com>
27445
27446 PR sanitizer/83392
27447 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
27448 INTEGER_CST offset, add it together with bitpos / 8 and
27449 sign extend based on POINTER_SIZE.
27450
27451 PR target/84844
27452 Revert
27453 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
27454
27455 PR target/78090
27456 * config/i386/constraints.md (Yc): New register constraint.
27457 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
27458 Use Yc constraint for alternative 2 of operand 0. Remove
27459 preferred_for_speed attribute.
27460
27461 2018-03-14 Richard Biener <rguenther@suse.de>
27462
27463 PR tree-optimization/84830
27464 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
27465 with the old one to avoid oscillations.
27466
27467 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
27468
27469 PR target/83712
27470 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
27471 pseudos.
27472 (assign_by_spills): Return a flag of reload assignment failure.
27473 Do not process the reload assignment failures. Do not spill other
27474 reload pseudos if they has the same reg class. Update n if
27475 necessary.
27476 (lra_assign): Add a return arg. Set up from the result of
27477 assign_by_spills call.
27478 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27479 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27480 usage_insns if it is not NULL.
27481 (spill_hard_reg_in_range): New function.
27482 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27483 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27484 function prototypes.
27485 (lra_assign): Change prototype.
27486 * lra.c (lra): Add code to deal with fails by splitting hard reg
27487 live ranges.
27488
27489 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
27490
27491 * config/riscv/riscv.opt (mrelax): New option.
27492 * config/riscv/riscv.c (riscv_file_start): Emit ".option
27493 "norelax" when riscv_mrelax is disabled.
27494 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
27495
27496 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27497
27498 PR target/84743
27499 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
27500 reassociation for int modes.
27501
27502 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27503
27504 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
27505 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
27506 for big-endian.
27507 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
27508 * config/aarch64/aarch64-sve.md
27509 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
27510 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
27511 (*extend<mode><Vwide>2): Rename to...
27512 (aarch64_sve_extend<mode><Vwide>2): ...this.
27513 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
27514 renaming the old pattern to...
27515 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
27516 unsigned packs.
27517 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
27518 define_expand, renaming the old pattern to...
27519 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
27520 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
27521 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
27522 account when deciding which SVE instruction the optab should use.
27523 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
27524
27525 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27526
27527 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
27528 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
27529 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
27530 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
27531 (tlsdesc_small_<mode>): Turn a define_expand and use
27532 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
27533 (tlsdesc_small_advsimd_<mode>): ...this.
27534 (tlsdesc_small_sve_<mode>): New pattern.
27535
27536 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27537
27538 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
27539 (UNSPEC_UMUL_HIGHPART): New constants.
27540 (MUL_HIGHPART): New int iteraor.
27541 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
27542 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
27543 define_expand.
27544 (*<su>mul<mode>3_highpart): New define_insn.
27545
27546 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
27547
27548 PR lto/84805
27549 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
27550 incomplete types.
27551
27552 2018-03-13 Martin Liska <mliska@suse.cz>
27553
27554 PR ipa/84658.
27555 * (sem_item_optimizer::sem_item_optimizer): Initialize new
27556 vector.
27557 (sem_item_optimizer::~sem_item_optimizer): Release it.
27558 (sem_item_optimizer::merge_classes): Register variable aliases.
27559 (sem_item_optimizer::fixup_pt_set): New function.
27560 (sem_item_optimizer::fixup_points_to_sets): Likewise.
27561 * ipa-icf.h: Declare new variables and functions.
27562
27563 2018-03-13 Jakub Jelinek <jakub@redhat.com>
27564
27565 PR middle-end/84834
27566 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
27567 integer_pow2p@2 and test integer_pow2p in condition.
27568 (A < 0 ? C : 0): Similarly for @1.
27569
27570 PR middle-end/84831
27571 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
27572 characters starting at p contain '\0' character, don't look beyond
27573 that.
27574
27575 PR target/84827
27576 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
27577 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
27578
27579 PR target/84828
27580 * reg-stack.c (change_stack): Change update_end var from int to
27581 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
27582 also call set_block_for_insn on the newly added insns and rescan.
27583
27584 PR target/84786
27585 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
27586 on the last operand.
27587
27588 PR c++/84704
27589 * tree.c (stabilize_reference_1): Return save_expr (e) for
27590 STATEMENT_LIST even if it doesn't have side-effects.
27591
27592 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
27593
27594 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
27595
27596 2018-03-12 Renlin Li <renlin.li@arm.com>
27597
27598 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
27599 aarch64_output_scalar_simd_mov_immediate.
27600
27601 2018-03-12 Martin Sebor <msebor@redhat.com>
27602
27603 PR tree-optimization/83456
27604 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
27605 for perfectly overlapping calls to memcpy.
27606 (gimple_fold_builtin_memory_chk): Same.
27607 (gimple_fold_builtin_strcpy): Handle no-warning.
27608 (gimple_fold_builtin_stxcpy_chk): Same.
27609 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
27610
27611 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27612
27613 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
27614 parameter. Use it for SFmode.
27615 (rs6000_function_arg_advance_1): Adjust.
27616 (rs6000_function_arg): Adjust.
27617 (rs6000_gimplify_va_arg): Pass false for that new parameter.
27618
27619 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27620
27621 PR rtl-optimization/84169
27622 PR rtl-optimization/84780
27623 * combine.c (can_combine_p): Check for a 2-insn combination whether
27624 the destination register is used between the two insns, too.
27625
27626 2018-03-12 Richard Biener <rguenther@suse.de>
27627
27628 PR tree-optimization/84803
27629 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
27630 for refs DR analysis didn't process.
27631
27632 2018-03-12 Richard Biener <rguenther@suse.de>
27633
27634 PR tree-optimization/84777
27635 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
27636 force-vectorize loops ignore whether we are optimizing for size.
27637
27638 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
27639
27640 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
27641 (TARGET_MD_ASM_ADJUST): Define.
27642
27643 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
27644 Kito Cheng <kito.cheng@gmail.com>
27645 Chung-Ju Wu <jasonwucj@gmail.com>
27646
27647 * config/nds32/nds32.c (nds32_compute_stack_frame,
27648 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
27649 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
27650 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
27651 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
27652 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
27653 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
27654 * config/nds32/nds32.md (prologue, epilogue): Use macro
27655 NDS32_V3PUSH_AVAILABLE_P to do checking.
27656
27657 2018-03-11 Jakub Jelinek <jakub@redhat.com>
27658
27659 PR debug/58150
27660 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
27661 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
27662 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
27663 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
27664 addition of most attributes on !orig_type_die or the attribute not
27665 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
27666
27667 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27668 Chung-Ju Wu <jasonwucj@gmail.com>
27669
27670 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
27671 __NDS32_VH__ macro.
27672 * config/nds32/nds32.opt (mvh): New option.
27673
27674 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27675 Chung-Ju Wu <jasonwucj@gmail.com>
27676
27677 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
27678 function.
27679 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
27680 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
27681 definition.
27682
27683 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27684 Chung-Ju Wu <jasonwucj@gmail.com>
27685
27686 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
27687 function.
27688 * config/nds32/nds32-multiple.md (strlensi): New pattern.
27689 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
27690
27691 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
27692 Kito Cheng <kito.cheng@gmail.com>
27693 Chung-Ju Wu <jasonwucj@gmail.com>
27694
27695 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
27696 UNSPEC_FFMISM and UNSPEC_FLMISM.
27697 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
27698 for ffb, ffmism and flmism.
27699 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
27700 (unspec_ffmism): Ditto.
27701 (unspec_flmism): Ditto.
27702 (nds32_expand_builtin_impl): Check if string extension is available.
27703 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
27704 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
27705
27706 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
27707
27708 Reverting patch:
27709 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27710
27711 PR target/83712
27712 * lra-assigns.c (assign_by_spills): Return a flag of reload
27713 assignment failure. Do not process the reload assignment
27714 failures. Do not spill other reload pseudos if they has the same
27715 reg class.
27716 (lra_assign): Add a return arg. Set up from the result of
27717 assign_by_spills call.
27718 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27719 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27720 usage_insns if it is not NULL.
27721 (spill_hard_reg_in_range): New function.
27722 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27723 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27724 function prototypes.
27725 (lra_assign): Change prototype.
27726 * lra.c (lra): Add code to deal with fails by splitting hard reg
27727 live ranges.
27728
27729 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
27730
27731 PR target/84807
27732 * config/i386/i386.opt: Replace Enforcment with Enforcement.
27733
27734 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
27735
27736 PR debug/84620
27737 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
27738 (dw_val_node): Add val_symbolic_view.
27739 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
27740 (symview_upper_bound): New.
27741 (new_line_info_table): Initialize symviews_since_reset.
27742 (dwarf2out_source_line): Count symviews_since_reset and set
27743 symview_upper_bound.
27744 (dw_val_equal_p): Handle symview.
27745 (add_AT_symview): New.
27746 (print_dw_val): Handle symview.
27747 (attr_checksum, attr_checksum_ordered): Likewise.
27748 (same_dw_val_p, size_of_die): Likewise.
27749 (value_format, output_die): Likewise.
27750 (add_high_low_attributes): Use add_AT_symview for entry_view.
27751 (dwarf2out_finish): Reset symview_upper_bound, clear
27752 zero_view_p.
27753
27754 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
27755
27756 PR target/83969
27757 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
27758 Add strict argument and use it.
27759 (rs6000_split_multireg_move): Update for new strict argument.
27760 (mem_operand_gpr): Disallow all non-offsettable addresses.
27761 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
27762
27763 2018-03-09 Jakub Jelinek <jakub@redhat.com>
27764
27765 PR target/84772
27766 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
27767 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
27768 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
27769
27770 PR c++/84767
27771 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
27772 decl, use remap_type if we want to use the type.
27773
27774 2018-03-09 Martin Sebor <msebor@redhat.com>
27775
27776 PR tree-optimization/84526
27777 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27778 Remove dead code.
27779 (builtin_access::generic_overlap): Be prepared to handle non-array
27780 base objects.
27781
27782 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
27783
27784 PR rtl-optimization/84682
27785 * lra-constraints.c (process_address_1): Check is_address flag
27786 for address constraints.
27787 (process_alt_operands): Likewise.
27788 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
27789 preprocess_constraints.
27790 * recog.h (preprocess_constraints): Add oploc parameter.
27791 Adjust callers.
27792 * recog.c (preprocess_constraints): Test address_operand for
27793 CT_ADDRESS constraints.
27794
27795 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27796
27797 PR target/83712
27798 * lra-assigns.c (assign_by_spills): Return a flag of reload
27799 assignment failure. Do not process the reload assignment
27800 failures. Do not spill other reload pseudos if they has the same
27801 reg class.
27802 (lra_assign): Add a return arg. Set up from the result of
27803 assign_by_spills call.
27804 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27805 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27806 usage_insns if it is not NULL.
27807 (spill_hard_reg_in_range): New function.
27808 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27809 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27810 function prototypes.
27811 (lra_assign): Change prototype.
27812 * lra.c (lra): Add code to deal with fails by splitting hard reg
27813 live ranges.
27814
27815 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27816
27817 PR target/83193
27818 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
27819 Accept complain bool parameter. Only emit errors if it is true.
27820 (arm_parse_cpu_option_name): Likewise.
27821 (arm_target_thumb_only): Adjust callers of the above.
27822 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
27823 prototype to take a default true bool parameter.
27824 (arm_parse_arch_option_name): Likewise.
27825
27826 2018-03-09 David Malcolm <dmalcolm@redhat.com>
27827 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
27828
27829 PR jit/64089
27830 PR jit/84288
27831 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
27832 * configure: Regenerate.
27833 * configure.ac ("linker --version-script option"): New.
27834 ("linker soname option"): New.
27835
27836 2018-03-09 Richard Biener <rguenther@suse.de>
27837
27838 PR tree-optimization/84775
27839 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
27840 immediate uses of predicate stmts and mark them modified.
27841
27842 Revert
27843 PR tree-optimization/84178
27844 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27845 to caller.
27846 (version_loop_for_if_conversion): Delay update_ssa call.
27847 (tree_if_conversion): Delay update_ssa until after predicate
27848 insertion.
27849
27850 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
27851
27852 PR target/84763
27853 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
27854 when the function accesses prior frames.
27855
27856 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27857
27858 PR debug/84456
27859 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
27860 gen_llsym, otherwise call maybe_gen_llsym.
27861
27862 PR inline-asm/84742
27863 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
27864 has ',' character inside of it.
27865
27866 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27867
27868 PR target/84748
27869 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
27870 as clobbering CC_REGNUM.
27871
27872 2018-03-08 Richard Biener <rguenther@suse.de>
27873
27874 PR middle-end/84552
27875 * tree-scalar-evolution.c: Include tree-into-ssa.h.
27876 (follow_copies_to_constant): Do not follow SSA names registered
27877 for update.
27878
27879 2018-03-08 Richard Biener <rguenther@suse.de>
27880
27881 PR tree-optimization/84178
27882 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27883 to caller.
27884 (version_loop_for_if_conversion): Delay update_ssa call.
27885 (tree_if_conversion): Delay update_ssa until after predicate
27886 insertion.
27887
27888 2018-03-08 David Malcolm <dmalcolm@redhat.com>
27889
27890 PR tree-optimization/84178
27891 * tree-if-conv.c (release_bb_predicate): Remove the
27892 the assertion that the stmts have NULL use_ops.
27893 Discard the statements, asserting that they haven't
27894 yet been added to a BB.
27895
27896 2018-03-08 Richard Biener <rguenther@suse.de>
27897
27898 PR tree-optimization/84746
27899 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
27900 (phi_translate): Pass in destination ANTIC_OUT set.
27901 (phi_translate_1): Likewise. For a simplified result lookup
27902 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
27903 (phi_translate_set): Adjust.
27904 (do_pre_regular_insertion): Likewise.
27905 (do_pre_partial_partial_insertion): Likewise.
27906
27907 2018-03-08 Martin Liska <mliska@suse.cz>
27908
27909 PR gcov-profile/84735
27910 * doc/gcov.texi: Document usage of profile files.
27911 * gcov-io.h: Document changes in the format.
27912
27913 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
27914
27915 PR debug/84404
27916 PR debug/84408
27917 * dwarf2out.c (struct dw_line_info_table): Update comments for
27918 view == -1.
27919 (FORCE_RESET_NEXT_VIEW): New.
27920 (FORCE_RESETTING_VIEW_P): New.
27921 (RESETTING_VIEW_P): Check for -1 too.
27922 (ZERO_VIEW_P): Likewise.
27923 (new_line_info_table): Force-reset next view.
27924 (dwarf2out_begin_function): Likewise.
27925 (dwarf2out_source_line): Simplify zero_view_p initialization.
27926 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
27927 view directly. Omit view when omitting .loc at line 0.
27928
27929 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27930
27931 PR tree-optimization/84740
27932 * tree-switch-conversion.c (process_switch): Call build_constructors
27933 only if info.phi_count is non-zero.
27934
27935 PR tree-optimization/84739
27936 * tree-tailcall.c (find_tail_calls): Check call arguments against
27937 DECL_ARGUMENTS (current_function_decl) rather than
27938 DECL_ARGUMENTS (func) when checking for tail recursion.
27939
27940 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27941
27942 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
27943 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
27944 Volker Reichelt's entry and add entries for people that perform
27945 GCC fuzzy testing and report numerous bugs.
27946
27947 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
27948
27949 PR target/82411
27950 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
27951 readonly data in sdata, if that is disabled.
27952 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
27953 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
27954 -mreadonly-in-sdata option.
27955
27956 2018-03-07 Martin Sebor <msebor@redhat.com>
27957
27958 PR tree-optimization/84468
27959 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
27960 basic block when looking for nul assignment.
27961
27962 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
27963
27964 PR target/84277
27965 * except.h (output_function_exception_table): Adjust prototype.
27966 * except.c (output_function_exception_table): Remove FNNAME parameter
27967 and add SECTION parameter. Ouput one part of the table at a time.
27968 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
27969 the first part of the exception table and emit unwind directives.
27970 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
27971 (i386_pe_seh_cold_init): Likewise.
27972 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
27973 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
27974 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
27975 (ix86_output_call_insn): Emit a nop in one more case for SEH.
27976 * config/i386/winnt.c: Include except.h.
27977 (struct seh_frame_state): Add reg_offset, after_prologue and
27978 in_cold_section fields.
27979 (i386_pe_seh_end_prologue): Set seh->after_prologue.
27980 (i386_pe_seh_cold_init): New function.
27981 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
27982 to seh->in_cold_section.
27983 (seh_emit_push): Record the offset of the push.
27984 (seh_emit_save): Record the offet of the save.
27985 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
27986 Test seh->after_prologue to disregard the epilogue.
27987 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
27988 (i386_pe_end_cold_function): New function.
27989
27990 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27991
27992 PR fortran/84565
27993 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
27994 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
27995
27996 PR c++/84704
27997 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
27998 on tmp_var.
27999 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
28000 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
28001
28002 PR middle-end/84723
28003 * multiple_target.c: Include tree-inline.h and intl.h.
28004 (expand_target_clones): Diagnose and fail if node->definition and
28005 !tree_versionable_function_p (node->decl).
28006
28007 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
28008
28009 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
28010 sprint_ul.
28011 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
28012 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
28013 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
28014
28015 2018-03-06 Jakub Jelinek <jakub@redhat.com>
28016
28017 PR target/84710
28018 * combine.c (try_combine): Use reg_or_subregno instead of handling
28019 just paradoxical SUBREGs and REGs.
28020
28021 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
28022
28023 * config/arc/arc.c (arc_finalize_pic): Remove function.
28024 (arc_must_save_register): We use single base PIC register, remove
28025 checks to save/restore the PIC register.
28026 (arc_expand_prologue): Likewise.
28027 * config/arc/arc-protos.h (arc_set_default_type_attributes):
28028 Remove.
28029 (arc_verify_short): Likewise.
28030 (arc_attr_type): Likewise.
28031 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
28032 (walk_stores): Likewise.
28033 (arc_address_cost): Make it static.
28034 (arc_verify_short): Likewise.
28035 (branch_dest): Likewise.
28036 (arc_attr_type): Likewise.
28037 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
28038 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
28039 (arc_final_prescan_insn): Remove inserting the nops due to
28040 hardware hazards. It is done in reorg step.
28041 (insn_length_variant_t): Remove.
28042 (insn_length_parameters_t): Likewise.
28043 (arc_insn_length_parameters): Likewise.
28044 (arc_get_insn_variants): Likewise.
28045 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
28046
28047 2018-03-06 Jakub Jelinek <jakub@redhat.com>
28048
28049 PR inline-asm/84683
28050 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
28051 assertion failure.
28052
28053 PR tree-optimization/84687
28054 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
28055 on new_node->decl.
28056 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
28057
28058 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28059
28060 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
28061 Rename to ppc_speculation_barrier.
28062 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
28063 __builtin_ppc_speculation_barrier.
28064
28065 2018-03-05 Jakub Jelinek <jakub@redhat.com>
28066
28067 PR target/84700
28068 * combine.c (combine_simplify_rtx): Don't try to simplify if
28069 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
28070 are equal to x.
28071
28072 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
28073
28074 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
28075 to 32 bytes when compiling for POWER9.
28076
28077 2018-03-05 Jakub Jelinek <jakub@redhat.com>
28078
28079 PR target/84564
28080 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
28081 regparm >= 3 with no arg reg available also for calls with
28082 flag_force_indirect_call. Pass decl to ix86_function_regparm.
28083
28084 PR target/84524
28085 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
28086 orig,vex.
28087 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
28088
28089 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
28090
28091 PR target/84264
28092 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
28093
28094 2018-03-05 Richard Biener <rguenther@suse.de>
28095
28096 PR tree-optimization/84486
28097 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
28098 When inserting a __builtin_assume_aligned call set the LHS
28099 SSA name alignment info accordingly.
28100
28101 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
28102
28103 PR tree-optimization/84114
28104 * config/aarch64/aarch64.c (aarch64_reassociation_width)
28105 Avoid reassociation of FLOAT_MODE addition.
28106
28107 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
28108
28109 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
28110 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
28111 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
28112 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
28113 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
28114 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
28115 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
28116 and -mwbnoinvd.
28117 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
28118 __builtin_ia32_wbinvd): New builtins.
28119 (SPECIAL_ARGS2): New.
28120 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
28121 (SPECIAL_ARGS2): New.
28122 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
28123 (ix86_valid_target_attribute_inner_p): Ditto.
28124 (ix86_init_mmx_sse_builtins): Add special_args2.
28125 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
28126 TARGET_WBNOINVD_P): New.
28127 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
28128 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
28129 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
28130 * config/i386/immintrin.h (_wbinvd): New intrinsic.
28131 * config/i386/pconfigintrin.h: New file.
28132 * config/i386/wbnoinvdintrin.h: Ditto.
28133 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
28134 wbnoinvdintrin.h.
28135 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
28136
28137 2018-03-05 Richard Biener <rguenther@suse.de>
28138
28139 PR tree-optimization/84670
28140 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
28141 member.
28142 (BB_VISITED_WITH_VISITED_SUCCS): New define.
28143 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
28144 (compute_antic_aux): Only assert the number of values in ANTIC_IN
28145 doesn't grow if all successors (recursively) were visited at least
28146 once.
28147
28148 2018-03-05 Richard Biener <rguenther@suse.de>
28149
28150 PR tree-optimization/84650
28151 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
28152 if executed in the loop pipeline.
28153
28154 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
28155
28156 * doc/configfiles.texi (Configuration Files): Move info about
28157 conditionalizing $target-protos.h to...
28158 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
28159 differs from $target-protos.h.
28160
28161 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
28162 Chung-Ju Wu <jasonwucj@gmail.com>
28163
28164 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
28165 * config/nds32/nds32-multiple.md (setmemsi): Define.
28166 * config/nds32/nds32-memory-manipulation.c
28167 (nds32_gen_dup_4_byte_to_word_value): New.
28168 (emit_setmem_word_loop): New.
28169 (emit_setmem_byte_loop): New.
28170 (nds32_expand_setmem_loop): New.
28171 (nds32_expand_setmem_loop_v3m): New.
28172 (nds32_expand_setmem_unroll): New.
28173 (nds32_expand_setmem): New.
28174
28175 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28176 Chung-Ju Wu <jasonwucj@gmail.com>
28177
28178 * config/nds32/nds32-memory-manipulation.c
28179 (nds32_emit_load_store): New.
28180 (nds32_emit_post_inc_load_store): New.
28181 (nds32_emit_mem_move): New.
28182 (nds32_emit_mem_move_block): New.
28183 (nds32_expand_movmemsi_loop_unknown_size): New.
28184 (nds32_expand_movmemsi_loop_known_size): New.
28185 (nds32_expand_movmemsi_loop): New.
28186 (nds32_expand_movmemsi_unroll): New.
28187 (nds32_expand_movmemqi): Rename ...
28188 (nds32_expand_movmemsi): ... to this.
28189 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
28190 (movmemsi): ... to this.
28191 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
28192 (nds32_expand_movmemsi): ... to this.
28193
28194 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28195 Monk Chiang <sh.chiang04@gmail.com>
28196 Chung-Ju Wu <jasonwucj@gmail.com>
28197
28198 * config/nds32/nds32-protos.h
28199 (nds32_expand_load_multiple): New arguments.
28200 (nds32_expand_store_multiple): Ditto.
28201 (nds32_valid_multiple_load_store): Rename ...
28202 (nds32_valid_multiple_load_store_p): ... to this.
28203 * config/nds32/nds32-memory-manipulation.c
28204 (nds32_expand_load_multiple): Refine implementation.
28205 (nds32_expand_store_multiple): Ditto.
28206 * config/nds32/nds32-multiple.md
28207 (load_multiple): Update nds32_expand_load_multiple interface.
28208 (store_multiple): Update nds32_expand_store_multiple interface.
28209 * config/nds32/nds32-predicates.c
28210 (nds32_valid_multiple_load_store): Rename ...
28211 (nds32_valid_multiple_load_store_p): ... to this and refine
28212 implementation.
28213 * config/nds32/predicates.md
28214 (nds32_load_multiple_and_update_address_operation): New predicate.
28215 (nds32_store_multiple_and_update_address_operation): New predicate.
28216
28217 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28218 Chung-Ju Wu <jasonwucj@gmail.com>
28219
28220 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
28221 (combo): New attribute.
28222 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
28223
28224 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
28225
28226 * config/nds32/nds32.opt: Change -mcmodel= default value.
28227
28228 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
28229 Monk Chiang <sh.chiang04@gmail.com>
28230 Chung-Ju Wu <jasonwucj@gmail.com>
28231
28232 * config/nds32/constants.md (unspec_element): New enum.
28233 * config/nds32/constraints.md (Umw): New constraint.
28234 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
28235 * config/nds32/nds32-intrinsic.md: Likewise.
28236 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
28237 (nds32_valid_smw_lwm_base_p): New.
28238 (nds32_output_smw_single_word): New.
28239 (nds32_output_lmw_single_word): New.
28240 (nds32_expand_unaligned_load): New.
28241 (nds32_expand_unaligned_store): New.
28242 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
28243 (nds32_output_smw_single_word): Declare.
28244 (nds32_output_lmw_single_word): Declare.
28245 (nds32_expand_unaligned_load): Declare.
28246 (nds32_expand_unaligned_store): Declare.
28247 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
28248 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
28249 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
28250 NDS32_BUILTIN_UASTORE_DW.
28251 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
28252 predicate.
28253
28254 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
28255 Kito Cheng <kito.cheng@gmail.com>
28256 Chung-Ju Wu <jasonwucj@gmail.com>
28257
28258 * config/nds32/nds32-intrinsic.c
28259 (nds32_expand_builtin_null_ftype_reg): Delete.
28260 (nds32_expand_builtin_reg_ftype_imm): Ditto.
28261 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
28262 (nds32_read_argument): New.
28263 (nds32_legitimize_target): Ditto.
28264 (nds32_legitimize_argument): Ditto.
28265 (nds32_check_constant_argument): Ditto.
28266 (nds32_expand_unop_builtin): Ditto.
28267 (nds32_expand_unopimm_builtin): Ditto.
28268 (nds32_expand_binop_builtin): Ditto.
28269 (nds32_builtin_decl_impl): Ditto.
28270 (builtin_description): Ditto.
28271 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
28272 (nds32_init_builtins_impl): Ditto.
28273 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
28274 (nds32_builtin_decl): New.
28275 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
28276 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
28277
28278 2018-03-02 Jeff Law <law@redhat.com>
28279
28280 * reorg.c (stop_search_p): Handle DEBUG_INSN.
28281 (redundant_insn, fill_simple_delay_slots): Likewise.
28282 (fill_slots_from_thread): Likewise.
28283 * resource.c (mark_referenced_resources): Likewise.
28284 (mark_set_resources, find_dead_or_set_registers): Likewise.
28285
28286 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28287
28288 * substring-locations.h (format_warning_va): Formatting fix for
28289 ATTRIBUTE_GCC_DIAG.
28290 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
28291 argument.
28292 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
28293 * substring-locations.c: Include intl.h.
28294 (format_warning_va): Turned into small wrapper around
28295 format_warning_n_va, renamed to ...
28296 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
28297 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
28298 use ngettext.
28299 (format_warning_at_substring_n): New function.
28300 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
28301 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
28302 format_warning_at_substring with just a shorter name instead of
28303 const function pointer.
28304 (fmtwarn_n): New function.
28305 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
28306 appropriate, get rid of all the fmtstr temporaries, move conditionals
28307 with G_() wrapped string literals directly into fmtwarn arguments,
28308 cast dir.len to (int), formatting fixes.
28309
28310 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
28311
28312 * doc/invoke.texi: Remove "Cilk Plus" references.
28313
28314 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28315 Richard Biener <rguenther@suse.de>
28316
28317 PR ipa/84628
28318 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
28319 for error or warning attributes if CALL_FROM_THUNK_P is set.
28320 Formatting fixes.
28321
28322 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28323
28324 PR target/56540
28325 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
28326 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
28327
28328 PR target/56540
28329 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
28330 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
28331
28332 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
28333 instead of -1U in last predictors element's probability member.
28334
28335 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
28336
28337 PR ipa/83983
28338 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
28339 arguments if they are comparable.
28340
28341 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28342
28343 PR tree-optimization/84634
28344 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
28345 masks and masked_loop_p with a single loop_masks, making sure it's
28346 null for bb vectorization.
28347
28348 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28349
28350 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
28351 (vect_analyze_data_ref_access): Use loop->safe_len rather than
28352 loop->force_vectorize to check whether there is no alias.
28353
28354 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28355
28356 PR target/84614
28357 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
28358 prototypes.
28359 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
28360 comments.
28361 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
28362 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
28363 instead of a loop around prev_real_insn.
28364 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
28365 prev_real_insn.
28366
28367 PR inline-asm/84625
28368 * config/i386/i386.c (ix86_print_operand): Use conditional
28369 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
28370 zero vector.
28371
28372 2018-03-02 Richard Biener <rguenther@suse.de>
28373
28374 PR tree-optimization/84427
28375 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
28376 (bitmap_set_subtract_values): Rewrite to handle multiple
28377 exprs per value.
28378 (clean): Likewise.
28379 (prune_clobbered_mems): Likewise.
28380 (phi_translate): Take edge instead of pred/phiblock.
28381 (phi_translate_1): Likewise.
28382 (phi_translate_set): Likewise. Insert all translated
28383 exprs for a value into the set, keeping possibly multiple
28384 expressions per value.
28385 (compute_antic_aux): Adjust for phi_translate changes.
28386 When intersecting union the expressions and prune those
28387 not in the final value set, keeping possibly multiple
28388 expressions per value. Do not use value-insertion
28389 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
28390 all expressions. Add verification that the value-sets
28391 only shrink during iteration.
28392 (compute_partial_antic_aux): Adjust for the phi_translate changes.
28393 (do_pre_regular_insertion): Likewise.
28394 (do_pre_partial_partial_insertion): Likewise.
28395
28396 2018-03-02 Richard Biener <rguenther@suse.de>
28397
28398 PR target/82005
28399 * config/darwin.c (saved_debug_info_level): New static global.
28400 (darwin_asm_lto_start): Disable debug info generation for LTO out.
28401 (darwin_asm_lto_end): Restore debug info generation settings.
28402
28403 2018-03-01 Martin Liska <mliska@suse.cz>
28404
28405 PR sanitizer/82484
28406 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
28407 volatile arguments.
28408
28409 2018-03-01 Richard Biener <rguenther@suse.de>
28410
28411 PR debug/84645
28412 * dwarf2out.c (gen_variable_die): Properly handle late VLA
28413 type annotation with LTO when debug was disabled at compile-time.
28414
28415 2018-03-01 Matthew Fortune <mfortune@gmail.com>
28416
28417 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
28418 XINT with INTVAL.
28419 (mips_final_postscan_insn): Likewise.
28420
28421 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
28422
28423 PR rtl-optimization/84528
28424 * alias.c (init_alias_target): Add commentary.
28425 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
28426 a unique base value if the frame pointer is not eliminated
28427 to the stack pointer.
28428
28429 2018-03-01 Tom de Vries <tom@codesourcery.com>
28430
28431 PR rtl-optimization/83327
28432 * lra-int.h (hard_regs_spilled_into): Declare.
28433 * lra.c (hard_regs_spilled_into): Define.
28434 (init_reg_info): Init hard_regs_spilled_into.
28435 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
28436 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
28437 (process_bb_lives): Handle hard_regs_spilled_into.
28438 (lra_create_live_ranges_1): Before doing liveness propagation, clear
28439 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
28440
28441 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
28442
28443 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
28444 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
28445 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
28446 * config/rs6000/aix72.h: New file.
28447
28448 2018-02-28 Jakub Jelinek <jakub@redhat.com>
28449
28450 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
28451 instead of warning_at with conditional singular and plural messages
28452 where possible.
28453
28454 PR target/52991
28455 * stor-layout.c (update_alignment_for_field): For
28456 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
28457 && !DECL_PACKED (field), do the alignment update, just use
28458 only desired_align instead of MAX (type_align, desired_align)
28459 as the alignment.
28460 (place_field): Don't do known_align < desired_align handling
28461 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
28462 is non-NULL, instead do it after rli->prev_field handling and
28463 only if not within a bitfield word. For DECL_PACKED (field)
28464 use type_align of BITS_PER_UNIT.
28465
28466 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
28467
28468 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
28469 superfluous parentheses and trailing spaces.
28470
28471 2018-02-28 Richard Biener <rguenther@suse.de>
28472
28473 PR tree-optimization/84584
28474 * graphite-scop-detection.c (scop_detection::add_scop): Discard
28475 SCoPs with fake exit edge.
28476
28477 2018-02-28 Martin Liska <mliska@suse.cz>
28478
28479 PR testsuite/84597
28480 * timevar.c (timer::print): Fix format to properly print 100%
28481 values.
28482
28483 2018-02-28 Richard Biener <rguenther@suse.de>
28484
28485 PR middle-end/84607
28486 * genmatch.c (capture_info::walk_match): Do not mark
28487 captured expressions without operands as expr_p given
28488 they act more like predicates and should be subject to
28489 "lost tail" side-effect preserving.
28490
28491 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
28492
28493 PR rtl-optimization/81611
28494 * auto-inc-dec.c (attempt_change): Move dead note from
28495 mem_insn if it's the next use of regno
28496 (find_address): Take address use of reg holding
28497 non-incremented value. Add parm to limit search to the named
28498 reg only.
28499 (merge_in_block): Attempt to use a mem insn that is the next
28500 use of the original regno.
28501
28502 2018-02-27 Martin Sebor <msebor@redhat.com>
28503
28504 PR c++/83871
28505 * doc/invoke.texi (-Wmissing-attributes): New option.
28506 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
28507
28508 2018-02-27 Martin Sebor <msebor@redhat.com>
28509
28510 PR translation/84207
28511 * diagnostic-core.h (warning_n, error_n, inform_n): Change
28512 n argument to unsigned HOST_WIDE_INT.
28513 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
28514 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
28515 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
28516 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
28517
28518 2018-02-27 Richard Biener <rguenther@suse.de>
28519
28520 PR tree-optimization/84512
28521 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
28522 Do not use the estimate returned from record_stmt_cost for
28523 the scalar iteration cost but sum properly using add_stmt_cost.
28524
28525 2018-02-27 Richard Biener <rguenther@suse.de>
28526
28527 PR tree-optimization/84466
28528 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
28529 Adjust last change to less strictly validate use operands.
28530
28531 2018-02-27 Martin Liska <mliska@suse.cz>
28532
28533 PR gcov-profile/84548
28534 * gcov.c (process_file): Allow partial overlap and consider it
28535 also as group functions.
28536 (output_lines): Properly calculate range of lines for a group.
28537
28538 2018-02-27 Martin Liska <mliska@suse.cz>
28539
28540 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
28541 'ggc' suffixes. Change first column width.
28542 (timer::print): Fix formatting of the column.
28543
28544 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
28545
28546 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
28547 preserve inline entry blocks for the sake of debug inline
28548 entry point markers alone.
28549 (remove_unused_locals): Suggest in comments a better place to
28550 force the preservation of inline entry blocks that are
28551 otherwise unused, but do not preserve them.
28552
28553 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28554
28555 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
28556
28557 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28558
28559 PR target/84039
28560 * config/i386/constraints.md (Bs): Replace
28561 ix86_indirect_branch_register with
28562 TARGET_INDIRECT_BRANCH_REGISTER.
28563 (Bw): Likewise.
28564 * config/i386/i386.md (indirect_jump): Likewise.
28565 (tablejump): Likewise.
28566 (*sibcall_memory): Likewise.
28567 (*sibcall_value_memory): Likewise.
28568 Peepholes of indirect call and jump via memory: Likewise.
28569 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
28570 (*sibcall_value_GOT_32): Likewise.
28571 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28572 (GOT_memory_operand): Likewise.
28573 (call_insn_operand): Likewise.
28574 (sibcall_insn_operand): Likewise.
28575 (GOT32_symbol_operand): Likewise.
28576 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
28577
28578 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28579
28580 PR rtl-optimization/83496
28581 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
28582 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
28583 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
28584 redundant insn, if any.
28585 (relax_delay_slots): Likewise.
28586 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
28587
28588 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
28589
28590 PR tree-optimization/83965
28591 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
28592 that grouped statements are part of a reduction chain. Return
28593 true if the statement is not marked as a reduction itself but
28594 is part of a group.
28595 (vect_recog_dot_prod_pattern): Don't check whether the statement
28596 is part of a group here.
28597 (vect_recog_sad_pattern): Likewise.
28598 (vect_recog_widen_sum_pattern): Likewise.
28599
28600 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28601
28602 PR debug/84545
28603 * final.c (rest_of_clean_state): Also look for calls inside sequences.
28604
28605 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28606
28607 PR target/84530
28608 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
28609 the bool argument.
28610 (ix86_output_indirect_function_return): New prototype.
28611 (ix86_split_simple_return_pop_internal): Likewise.
28612 * config/i386/i386.c (indirect_return_via_cx): New.
28613 (indirect_return_via_cx_bnd): Likewise.
28614 (indirect_thunk_name): Handle return va CX_REG.
28615 (output_indirect_thunk_function): Create alias for
28616 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
28617 (ix86_output_indirect_jmp): Remove the bool argument.
28618 (ix86_output_indirect_function_return): New function.
28619 (ix86_split_simple_return_pop_internal): Likewise.
28620 * config/i386/i386.md (*indirect_jump): Don't pass false
28621 to ix86_output_indirect_jmp.
28622 (*tablejump_1): Likewise.
28623 (simple_return_pop_internal): Change it to define_insn_and_split.
28624 Call ix86_split_simple_return_pop_internal to split it for
28625 -mfunction-return=.
28626 (simple_return_indirect_internal): Call
28627 ix86_output_indirect_function_return instead of
28628 ix86_output_indirect_jmp.
28629
28630 2018-02-26 Jakub Jelinek <jakub@redhat.com>
28631
28632 PR bootstrap/84405
28633 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
28634 memset and value initialization afterwards.
28635
28636 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
28637
28638 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
28639
28640 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
28641
28642 PR target/84521
28643 * common/config/aarch64/aarch64-common.c
28644 (aarch_option_optimization_table[]): Switch
28645 off fomit-frame-pointer
28646
28647 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28648 Chung-Ju Wu <jasonwucj@gmail.com>
28649
28650 * config/nds32/nds32-multiple.md (load_multiple): Disallow
28651 volatile memory.
28652 (store_multiple): Ditto.
28653
28654 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28655
28656 * config.gcc: Add --with-cpu support for nds32 target.
28657 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
28658 * config/nds32/nds32.opt: Add -mcpu= option.
28659
28660 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
28661
28662 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
28663 isel=yes): Warn for these deprecated options.
28664
28665 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
28666
28667 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
28668 ISA_2_5_MASKS_EMBEDDED.
28669
28670 2018-02-23 Jakub Jelinek <jakub@redhat.com>
28671
28672 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
28673 p->max as pointers rather than using iterative_hash_expr.
28674
28675 2018-02-23 Carl Love <cel@us.ibm.com>
28676
28677 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
28678 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
28679 BU_P8V_OVERLOAD_2.
28680 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
28681 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
28682 P8V_BUILTIN_VEC_VUNSIGNED2.
28683
28684 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
28685
28686 PR target/81572
28687 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
28688 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
28689 LRA_UNKNOWN_ALT.
28690 * lra-constraints.c (curr_insn_transform): Set up
28691 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
28692 LRA_UNKNOWN_ALT.
28693 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
28694 * lra-eliminations.c (spill_pseudos): Ditto.
28695 (process_insn_for_elimination): Ditto.
28696 * lra-lives.c (reg_early_clobber_p): Use the new macros.
28697 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
28698 LRA_NON_CLOBBERED_ALT.
28699
28700 2018-02-22 Martin Sebor <msebor@redhat.com>
28701
28702 PR tree-optimization/84480
28703 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
28704 to maybe_diag_stxncpy_trunc. Call it.
28705 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
28706 from gimple_fold_builtin_strcpy. Print inlining stack.
28707 (handle_builtin_stxncpy): Print inlining stack.
28708 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
28709
28710 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
28711
28712 PR target/84176
28713 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
28714 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
28715 and -fcheck-pointer-bounds are used together.
28716 (indirect_thunk_prefix): New enum.
28717 (indirect_thunk_need_prefix): New function.
28718 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
28719 "_nt" instead of "_bnd" for NOTRACK prefix.
28720 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
28721 (output_indirect_thunk_function): Likewise.
28722 (): Likewise.
28723 (ix86_code_end): Update output_indirect_thunk_function calls.
28724 (ix86_output_indirect_branch_via_reg): Replace
28725 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
28726 (ix86_output_indirect_branch_via_push): Likewise.
28727 (ix86_output_function_return): Likewise.
28728 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
28729 incompatible with -fcf-protection=branch and
28730 -fcheck-pointer-bounds.
28731
28732 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28733
28734 PR target/83335
28735 * config/aarch64/aarch64.c (aarch64_print_address_internal):
28736 Change gcc_assert call to output_operand_lossage.
28737
28738 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28739
28740 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
28741
28742 2018-02-22 DJ Delorie <dj@redhat.com>
28743 Sebastian Perta <sebastian.perta@renesas.com>
28744 Oleg Endo <olegendo@gcc.gnu.org>
28745
28746 * config/rx/rx.c (rx_rtx_costs): New function.
28747 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
28748
28749 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
28750
28751 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
28752
28753 2018-02-22 Martin Liska <mliska@suse.cz>
28754
28755 PR driver/83193
28756 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
28757 Add "native" as a possible value.
28758
28759 2018-02-22 Martin Liska <mliska@suse.cz>
28760
28761 PR driver/83193
28762 * config/i386/i386.c (ix86_option_override_internal):
28763 Add "native" as a possible value for -march and -mtune.
28764
28765 2018-02-22 Jakub Jelinek <jakub@redhat.com>
28766
28767 PR target/84502
28768 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
28769 to all type variants.
28770
28771 PR tree-optimization/84503
28772 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
28773 width as info->bitpos + info->bitsize - start.
28774 (merged_store_group::merge_overlapping): Simplify width computation.
28775 (check_no_overlap): New function.
28776 (imm_store_chain_info::try_coalesce_bswap): Compute expected
28777 start + width and last_order of the group, fail if check_no_overlap
28778 fails.
28779 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
28780 to group if check_no_overlap fails.
28781
28782 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28783
28784 * config/rs6000/altivec.md: Delete contraint arguments to
28785 define_expand, define_split, and define_peephole2, and in
28786 define_insn_and_split if always unused.
28787 * config/rs6000/darwin.md: Ditto.
28788 * config/rs6000/dfp.md: Ditto.
28789 * config/rs6000/rs6000.md: Ditto.
28790 * config/rs6000/sync.md: Ditto.
28791 * config/rs6000/vector.md: Ditto.
28792 * config/rs6000/vsx.md: Ditto.
28793
28794 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28795
28796 * config/rs6000/altivec.md: Write output control strings as braced
28797 blocks instead of double-quoted strings.
28798 * config/rs6000/darwin.md: Ditto.
28799 * config/rs6000/rs6000.md: Ditto.
28800 * config/rs6000/vector.md: Ditto.
28801 * config/rs6000/vsx.md: Ditto.
28802
28803 2018-02-21 Jason Merrill <jason@redhat.com>
28804
28805 PR c++/84314 - ICE with templates and fastcall attribute.
28806 * attribs.c (build_type_attribute_qual_variant): Remove assert.
28807
28808 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28809
28810 * ipa-cp.c (determine_versionability): Fix comment typos.
28811
28812 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28813
28814 PR c/84229
28815 * ipa-cp.c (determine_versionability): Do not version functions caling
28816 va_arg_pack.
28817
28818 2018-02-21 Martin Liska <mliska@suse.cz>
28819
28820 PR driver/83193
28821 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
28822 Add "native" as a possible value.
28823 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
28824 the macro when native cpu detection is available.
28825
28826 2018-02-21 Martin Liska <mliska@suse.cz>
28827
28828 PR driver/83193
28829 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
28830 Add "native" as a possible value.
28831 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
28832 when native cpu detection is available.
28833
28834 2018-02-21 Jakub Jelinek <jakub@redhat.com>
28835 Martin Sebor <msebor@redhat.com>
28836
28837 PR tree-optimization/84478
28838 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
28839 false.
28840 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
28841 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
28842 support which is conservatively correct, for 2 only stay conservative
28843 for maxlen. Formatting and comment capitalization fixes. Add STRICT
28844 argument to the 2 argument get_range_strlen, adjust 6 arg
28845 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
28846 false.
28847 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
28848 (gimple_fold_builtin_strlen): Pass true as last argument to
28849 get_range_strlen.
28850
28851 2018-02-20 Martin Sebor <msebor@redhat.com>
28852
28853 PR middle-end/84095
28854 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
28855 (builtin_memref::set_base_and_offset): Same. Handle inner references.
28856 (builtin_memref::builtin_memref): Factor out parts into
28857 set_base_and_offset and call it.
28858
28859 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28860
28861 PR middle-end/84406
28862 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
28863 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
28864 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
28865 search at the associated MODE_INT.
28866
28867 2018-02-20 Jeff Law <law@redhat.com>
28868
28869 PR middle-end/82123
28870 PR tree-optimization/81592
28871 PR middle-end/79257
28872 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
28873 for range data rather than using global data.
28874 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
28875 range data rather than using global data.
28876 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
28877 pass it to children as needed.
28878 (struct directive::fmtresult): Similarly.
28879 (struct directive::set_width): Similarly.
28880 (struct directive::set_precision): Similarly.
28881 (format_integer, format_directive, parse_directive): Similarly.
28882 (format_none): Accept unnamed vr_values parameter.
28883 (format_percent, format_floating, format_character): Similarly.
28884 (format_string, format_plain): Similarly.
28885 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
28886 the EVRP range analyzer for range data rather than using global data.
28887 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
28888 gimple-ssa-evrp-analyze.h
28889 (class sprintf_dom_walker): Add after_dom_children member function.
28890 Add evrp_range_analyzer member.
28891 (sprintf_dom_walker::before_dom_children): Call into the EVRP
28892 range analyzer as needed.
28893 (sprintf_dom_walker::after_dom_children): New member function.
28894 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
28895 if not optimizing.
28896 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
28897 (evrp_range_analyzer::pop_to_marker): Likewise.
28898
28899 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28900
28901 PR tree-optimization/84419
28902 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
28903 with the required type if its current type is compatible but
28904 different.
28905
28906 2018-02-20 Jakub Jelinek <jakub@redhat.com>
28907
28908 PR middle-end/82004
28909 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
28910 after vectorization.
28911
28912 2018-02-20 Martin Liska <mliska@suse.cz>
28913
28914 PR driver/83193
28915 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
28916 possible values if we don't have a hint.
28917
28918 2018-02-20 Martin Liska <mliska@suse.cz>
28919
28920 PR c/84310
28921 PR target/79747
28922 * final.c (shorten_branches): Build align_tab array with one
28923 more element.
28924 * opts.c (finish_options): Add alignment option limit check.
28925 (MAX_CODE_ALIGN): Likewise.
28926 (MAX_CODE_ALIGN_VALUE): Likewise.
28927 * doc/invoke.texi: Document maximum allowed option value for
28928 all -falign-* options.
28929
28930 2018-02-19 Jakub Jelinek <jakub@redhat.com>
28931
28932 PR target/84146
28933 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
28934 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
28935 * var-tracking.c (emit_note_insn_var_location): Remove all references
28936 to NOTE_INSN_CALL_ARG_LOCATION.
28937 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
28938 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
28939 Use copy_rtx_if_shared.
28940 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
28941 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
28942 (dwarf2out_var_location): Remove handling of
28943 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
28944 on call_insn.
28945 * final.c (final_scan_insn): Remove all references to
28946 NOTE_INSN_CALL_ARG_LOCATION.
28947 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
28948 before dumping final insns.
28949 * except.c (emit_note_eh_region_end): Remove all references to
28950 NOTE_INSN_CALL_ARG_LOCATION.
28951 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
28952 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
28953 * config/arc/arc.c (hwloop_optimize): Likewise.
28954 * config/arm/arm.c (create_fix_barrier): Likewise.
28955 * config/s390/s390.c (s390_chunkify_start): Likewise.
28956 * config/sh/sh.c (find_barrier): Likewise.
28957 * config/i386/i386.c (rest_of_insert_endbranch,
28958 ix86_seh_fixup_eh_fallthru): Likewise.
28959 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
28960 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
28961 * config/frv/frv.c (frv_function_prologue): Likewise.
28962 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
28963 reg note.
28964 (note_outside_basic_block_p): Remove all references to
28965 NOTE_INSN_CALL_ARG_LOCATION.
28966 * gengtype.c (adjust_field_rtx_def): Likewise.
28967 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
28968 Likewise.
28969 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
28970 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
28971
28972 PR c++/84444
28973 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
28974 is ADDR_EXPR.
28975
28976 PR tree-optimization/84452
28977 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
28978 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
28979 is NULL.
28980
28981 2018-02-19 Martin Liska <mliska@suse.cz>
28982
28983 PR sanitizer/82183
28984 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
28985
28986 2018-02-19 Martin Liska <mliska@suse.cz>
28987 Richard Sandiford <richard.sandiford@linaro.org>
28988
28989 PR tree-optimization/82491
28990 * gimple-fold.c (get_base_constructor): Make earlier bail out
28991 to prevent ubsan.
28992
28993 2018-02-19 Carl Love <cel@us.ibm.com>
28994
28995 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
28996 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
28997 BU_P8V_OVERLOAD_1.
28998 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
28999 P8V_BUILTIN_VEC_NEG.
29000
29001 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
29002
29003 * config/rl78/rl78.md (movdf): New define expand.
29004
29005 2018-02-19 Martin Liska <mliska@suse.cz>
29006
29007 PR other/80589
29008 * doc/invoke.texi: Fix typo.
29009 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
29010
29011 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
29012
29013 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
29014 handle rs6000_single_float and rs6000_double_float specially for
29015 e500 family CPUs.
29016
29017 2018-02-16 Jeff Law <law@redhat.com>
29018
29019 * config/rx/rx.c (add_pop_cfi_notes): New function.;
29020 (pop_regs): Use it.
29021
29022 2018-02-16 Jakub Jelinek <jakub@redhat.com>
29023
29024 PR ipa/84425
29025 * ipa-inline.c (inline_small_functions): Fix a typo.
29026
29027 2018-02-16 Nathan Sidwell <nathan@acm.org>
29028
29029 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
29030
29031 2018-02-16 Carl Love <cel@us.ibm.com>
29032
29033 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
29034 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
29035 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
29036 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
29037 expansion to P8V_BUILTIN_VEC_FLOAT2.
29038
29039 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
29040
29041 PR rtl-optimization/70023
29042 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
29043 src_regno into account.
29044
29045 2018-02-16 Carl Love <cel@us.ibm.com>
29046
29047 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
29048 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
29049 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
29050 * config/rs6000/rs6000.c: Remove case statements for
29051 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
29052 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
29053 and P9V_BUILTIN_VEC_VINSERT4B.
29054 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
29055 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
29056 * config/rs6000/vsx.md:
29057 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
29058 vec_insert4b.
29059
29060 2018-02-16 Carl Love <cel@us.ibm.com>
29061
29062 * config/rs6000/altivec.h: Add builtin names vec_extract4b
29063 vec_insert4b.
29064 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
29065 definitions.
29066 * config/rs6000/rs6000-c.c: Add the definitions for
29067 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
29068 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
29069 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
29070 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
29071 definition for insert4b and define insn *insert3b_internal.
29072 * doc/extend.texi: Add documentation for vec_extract4b.
29073
29074 2018-02-16 Nathan Sidwell <nathan@acm.org>
29075
29076 * doc/extend.texi (Backwards Compatibility): Mention friend
29077 injection. Note for-scope is deprecated.
29078 * doc/invoke.texi (-ffriend-injection): Deprecate.
29079
29080 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
29081
29082 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
29083 that moved to I2, also allow destinations that are a paradoxical
29084 subreg (instead of a normal reg).
29085
29086 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
29087
29088 PR target/83831
29089 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
29090 to QImode.
29091
29092 2018-02-16 Richard Biener <rguenther@suse.de>
29093
29094 PR tree-optimization/84037
29095 PR tree-optimization/84016
29096 PR target/82862
29097 * config/i386/i386.c (ix86_builtin_vectorization_cost):
29098 Adjust vec_construct for the fact we need additional higher latency
29099 128bit inserts for AVX256 and AVX512 vector builds.
29100 (ix86_add_stmt_cost): Scale vector construction cost for
29101 elementwise loads.
29102
29103 2018-02-16 Richard Biener <rguenther@suse.de>
29104
29105 PR tree-optimization/84417
29106 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
29107 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
29108 (non_rewritable_lvalue_p): Likewise, use poly-ints.
29109
29110 2018-02-16 Martin Liska <mliska@suse.cz>
29111
29112 PR sanitizer/84307
29113 * internal-fn.def (ASAN_CHECK): Set proper flags.
29114 (ASAN_MARK): Likewise.
29115
29116 2018-02-16 Julia Koval <julia.koval@intel.com>
29117
29118 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
29119 from PTA_CANNONLAKE.
29120
29121 2018-02-16 Jakub Jelinek <jakub@redhat.com>
29122
29123 PR target/84272
29124 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
29125 Use ++iter rather than iter++ for std::list iterators.
29126 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
29127 defer deleting them until all nodes in the forest are processed. Do
29128 free even leaf nodes. Change to_process into auto_vec.
29129
29130 PR bootstrap/84405
29131 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
29132 * vec.h (vec_default_construct): Use memset instead of placement new
29133 if BROKEN_VALUE_INITIALIZATION is defined.
29134 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
29135 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
29136 is defined.
29137
29138 PR rtl-optimization/83723
29139 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
29140 * lra.c (lra_substitute_pseudo): Likewise. If true, use
29141 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
29142 recursive calls.
29143 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
29144 callers.
29145 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
29146
29147 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
29148
29149 PR rtl-optimization/81443
29150 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
29151 from inner REGs to paradoxical SUBREGs.
29152
29153 2018-02-16 Richard Biener <rguenther@suse.de>
29154
29155 PR tree-optimization/84399
29156 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
29157 For operands we can analyze at their definition make sure we can
29158 analyze them at each use as well.
29159
29160 2018-02-16 Richard Biener <rguenther@suse.de>
29161
29162 PR tree-optimization/84190
29163 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
29164 volatile accesses if the decl isn't volatile.
29165
29166 2018-02-15 Jason Merrill <jason@redhat.com>
29167
29168 PR c++/84314 - ICE with templates and fastcall attribute.
29169 * attribs.c (build_type_attribute_qual_variant): Don't clobber
29170 TYPE_CANONICAL on an existing type.
29171
29172 2018-02-15 Jakub Jelinek <jakub@redhat.com>
29173
29174 PR tree-optimization/84383
29175 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
29176 dstoff nor call operand_equal_p if dstbase is NULL.
29177
29178 PR tree-optimization/84334
29179 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
29180 also a CONSTANT_CLASS_P, punt.
29181
29182 2018-02-14 Jim Wilson <jimw@sifive.com>
29183
29184 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
29185 first SMALL_OPERAND check. New local min_second_step. Move assert
29186 to where locals are set. Add TARGET_RVC support.
29187 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
29188
29189 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
29190
29191 * doc/invoke.texi: Correct -Wformat-overflow code sample.
29192
29193 2018-02-14 Martin Sebor <msebor@redhat.com>
29194
29195 PR tree-optimization/83698
29196 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
29197 arrays constrain the offset range to their bounds.
29198 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
29199 (builtin_access::overlap): Avoid setting the size of overlap if it's
29200 already been set.
29201 (maybe_diag_overlap): Also consider arrays when deciding what values
29202 of offsets to include in diagnostics.
29203
29204 2018-02-14 Martin Sebor <msebor@redhat.com>
29205
29206 PR c/84108
29207 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
29208 that correspond to the kind of a declaration.
29209
29210 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
29211
29212 PR target/83984
29213 * config/pa/pa.md: Load address of PIC label using the linkage table
29214 if the label is nonlocal.
29215
29216 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
29217
29218 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
29219 warning message if user requests -maltivec=be.
29220 * doc/invoke.texi: Document deprecation of -maltivec=be.
29221
29222 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
29223
29224 PR target/84220
29225 * config/rs6000/rs6000-c.c: Update definitions for
29226 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
29227 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
29228
29229 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
29230
29231 PR target/84239
29232 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
29233 add _get_ssp intrinsics. Remove argument from
29234 __builtin_ia32_rdssp[d|q].
29235 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
29236 * config/i386/i386-builtin.def: Remove argument from
29237 __builtin_ia32_rdssp[d|q].
29238 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
29239 ix86_expand_special_args_builtin for _rdssp[d|q].
29240 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
29241 Clear register before usage.
29242 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
29243 Add documentation for new _get_ssp and _inc_ssp intrinsics.
29244
29245 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
29246
29247 PR tree-optimization/84357
29248 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
29249 operand 1 of an ARRAY_REF too.
29250
29251 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
29252
29253 PR target/83831
29254 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
29255 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29256 declarations.
29257 (set_of_reg): New struct.
29258 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
29259 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
29260 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29261 functions.
29262 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
29263 Split into bitclr, bitset, bitinvert patterns if appropriate.
29264 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
29265 use rx_fuse_in_memory_bitop.
29266 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
29267 to named insn, correct maximum insn length.
29268
29269 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
29270
29271 PR target/79242
29272 * machmode.def: Define a complex mode for PARTIAL_INT.
29273 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
29274 MODE_PARTIAL_INT.
29275 * doc/rtl.texi: Document CSPImode.
29276 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
29277 handling.
29278 (msp430_hard_regno_nregs_with_padding): Likewise.
29279
29280 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
29281
29282 PR target/84279
29283 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
29284
29285 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
29286
29287 PR rtl-optimization/84169
29288 * combine.c (try_combine): New variable split_i2i3. Set it to true if
29289 we generated a parallel as new i3 and we split that to new i2 and i3
29290 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
29291 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
29292 those to i2, not i1. Partially rewrite this scan code.
29293
29294 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29295
29296 PR c/82210
29297 * stor-layout.c (place_field): For variable length fields, adjust
29298 offset_align afterwards not just based on the field's alignment,
29299 but also on the size.
29300
29301 PR middle-end/84309
29302 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
29303 of exps and logs in the use_exp2 case.
29304
29305 2018-02-13 Jeff Law <law@redhat.com>
29306
29307 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
29308 entry for "vector".
29309
29310 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
29311 ARGS as unused.
29312
29313 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
29314
29315 PR debug/84342
29316 PR debug/84319
29317 * common.opt (gas-loc-support, gas-locview-support): New.
29318 (ginline-points, ginternal-reset-location-views): New.
29319 * doc/invoke.texi: Document them. Use @itemx where intended.
29320 (gvariable-location-views): Adjust.
29321 * target.def (reset_location_view): New.
29322 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
29323 (TARGET_RESET_LOCATION_VIEW): New.
29324 * doc/tm.texi: Rebuilt.
29325 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
29326 (dwarf2out_default_as_locview_support): New.
29327 (output_asm_line_debug_info): Use option variables.
29328 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
29329 (output_loc_list): Likewise.
29330 (add_high_low_attributes): Check option variables.
29331 Don't output entry view attribute in strict mode.
29332 (gen_inlined_subroutine_die): Check option variables.
29333 (dwarf2out_inline_entry): Likewise.
29334 (init_sections_and_labels): Likewise.
29335 (dwarf2out_early_finish): Likewise.
29336 (maybe_reset_location_view): New, from...
29337 (dwarf2out_var_location): ... here. Call it.
29338 * debug.h (dwarf2out_default_as_loc_support): Declare.
29339 (dwarf2out_default_as_locview_support): Declare.
29340 * hooks.c (hook_int_rtx_insn_0): New.
29341 * hooks.h (hook_int_rtx_insn_0): Declare.
29342 * toplev.c (process_options): Take -gas-loc-support and
29343 -gas-locview-support from dwarf2out. Enable
29344 -gvariable-location-views by default only with locview
29345 assembler support. Enable -ginternal-reset-location-views by
29346 default only if the target defines the corresponding hook.
29347 Enable -ginline-points by default if location views are
29348 enabled; force it disabled if statement frontiers are
29349 disabled.
29350 * tree-inline.c (expand_call_inline): Check option variables.
29351 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
29352
29353 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
29354
29355 PR tree-optimization/84321
29356 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
29357 handling. Also check whether the anti-range contains any values
29358 that satisfy the mask; switch to a VR_RANGE if not.
29359
29360 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
29361
29362 PR sanitizer/84340
29363 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
29364
29365 2018-02-13 Martin Jambor <mjambor@suse.cz>
29366
29367 PR c++/83990
29368 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
29369 of call statements, also set location of a load to a temporary.
29370
29371 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
29372
29373 * config/rl78/rl78.c (add_vector_labels): New function.
29374 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
29375 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
29376 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
29377 which checks that no arguments are passed.
29378 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
29379 * doc/extend.texi: Documentation for the new attribute.
29380
29381 2018-02-13 Andreas Schwab <schwab@suse.de>
29382
29383 * config/riscv/linux.h (CPP_SPEC): Define.
29384
29385 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29386
29387 PR target/84335
29388 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
29389 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
29390 OPTION_MASK_ISA_AES as first argument to def_builtin_const
29391 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
29392 instead of OPTION_MASK_ISA_PCLMUL as first argument to
29393 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
29394 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
29395 temporarily for AES and PCLMUL builtins.
29396
29397 PR tree-optimization/84339
29398 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
29399 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
29400 Formatting fixes.
29401
29402 PR middle-end/84309
29403 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
29404 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
29405 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
29406 inline function.
29407 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
29408 inline function.
29409 * omp-simd-clone.h: New file.
29410 * omp-simd-clone.c: Include omp-simd-clone.h.
29411 (expand_simd_clones): No longer static.
29412 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
29413 cgraph.h and omp-simd-clone.h.
29414 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
29415 (vect_recog_widen_shift_pattern): Formatting fix.
29416 (vect_pattern_recog_1): Don't check optab for calls.
29417
29418 PR target/84336
29419 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
29420 operands[2] into a REG before using gen_lowpart on it.
29421
29422 2018-02-12 Jeff Law <law@redhat.com>
29423
29424 PR target/83760
29425 * config/sh/sh.c (find_barrier): Consider a sibling call
29426 a barrier as well.
29427
29428 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
29429 successfully back substituting a reg.
29430
29431 2018-02-12 Richard Biener <rguenther@suse.de>
29432
29433 PR tree-optimization/84037
29434 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
29435 parameter, move visited init to caller.
29436 (vect_slp_analyze_operations): Separate cost from validity
29437 check, initialize visited once for all instances.
29438 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
29439 for all instances.
29440 * tree-vect-stmts.c (vect_model_simple_cost): Make early
29441 out an assert.
29442 (vect_model_promotion_demotion_cost): Likewise.
29443 (vectorizable_bswap): Guard cost modeling with !slp_node
29444 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
29445 SLP stmts.
29446 (vectorizable_call): Likewise.
29447 (vectorizable_conversion): Likewise.
29448 (vectorizable_assignment): Likewise.
29449 (vectorizable_shift): Likewise.
29450 (vectorizable_operation): Likewise.
29451 (vectorizable_store): Likewise.
29452 (vectorizable_load): Likewise.
29453 (vectorizable_condition): Likewise.
29454 (vectorizable_comparison): Likewise.
29455
29456 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
29457
29458 PR sanitizer/84307
29459 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
29460 (ASAN_MARK): Fix fnspec to account for return value, change pointer
29461 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
29462
29463 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29464
29465 PR middle-end/83665
29466 * params.def (inline-min-speedup): Increase from 8 to 15.
29467 (max-inline-insns-auto): Decrease from 40 to 30.
29468 * ipa-split.c (consider_split): Add some buffer for function to
29469 be considered inlining candidate.
29470 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
29471 default values.
29472
29473 2018-02-12 Richard Biener <rguenther@suse.de>
29474
29475 PR tree-optimization/84037
29476 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
29477 matched stmts if we cannot swap the non-matched ones.
29478
29479 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29480
29481 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
29482 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
29483 _mm_maskz_scalef_round_ss): New intrinsics.
29484 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
29485 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
29486 __builtin_ia32_scalefss_round): Remove.
29487 (__builtin_ia32_scalefsd_mask_round,
29488 __builtin_ia32_scalefss_mask_round): New intrinsics.
29489 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
29490 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
29491 ((match_operand:VF_128 2 "<round_nimm_predicate>"
29492 "<round_constraint>")): Changed to ...
29493 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
29494 "<round_scalar_constraint>")): ... this.
29495 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
29496 %0, %1, %2<round_op3>}"): Changed to ...
29497 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
29498 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
29499 %2<round_scalar_mask_op3>}"): ... this.
29500 * config/i386/subst.md (round_scalar_nimm_predicate): New.
29501
29502 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29503
29504 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
29505 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
29506 (_mm_maskz_sqrt_round_ss): New intrinsics.
29507 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
29508 (__builtin_ia32_sqrtsd_mask_round)
29509 (__builtin_ia32_sqrtss_mask_round): New builtins.
29510 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
29511 (__builtin_ia32_sqrtss_round): Remove.
29512 (__builtin_ia32_sqrtsd_mask_round)
29513 (__builtin_ia32_sqrtss_mask_round): New builtins.
29514 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
29515 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
29516 ((match_operand:VF_128 1 "vector_operand"
29517 "xBm,<round_constraint>")): Changed to ...
29518 ((match_operand:VF_128 1 "vector_operand"
29519 "xBm,<round_scalar_constraint>")): ... this.
29520 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
29521 %0, %2, %<iptr>1<round_op3>}): Changed to ...
29522 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
29523 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
29524 %<iptr>1<round_scalar_mask_op3>}): ... this.
29525 ((set_attr "prefix" "<round_prefix>")): Changed to ...
29526 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
29527
29528 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
29529
29530 PR target/84266
29531 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
29532 Cast vec_cmpeq result to correct type.
29533 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
29534 Cast vec_cmpgt result to correct type.
29535
29536 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
29537
29538 * final.c (final_scan_insn_1): Renamed from...
29539 (final_scan_insn): ... this. New wrapper, to recover
29540 seen from the outermost call in recursive ones.
29541 * config/sparc/sparc.c (output_return): Drop seen from call.
29542 (output_sibcall): Likewise.
29543 * config/visium/visium.c (output_branch): Likewise.
29544
29545 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
29546
29547 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
29548 function label.
29549
29550 2018-02-10 Alan Modra <amodra@gmail.com>
29551
29552 PR target/84300
29553 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
29554 Specify LR as an input.
29555
29556 2018-02-10 Jakub Jelinek <jakub@redhat.com>
29557
29558 PR sanitizer/83987
29559 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
29560 remove_member_access_dummy_vars): New functions.
29561 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
29562 lower_omp_1, execute_lower_omp): Use them.
29563
29564 PR rtl-optimization/84308
29565 * shrink-wrap.c (spread_components): Release todo vector.
29566
29567 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
29568
29569 PR rtl-optimization/57193
29570 * ira-color.c (struct allocno_color_data): Add member
29571 conflict_allocno_hard_prefs.
29572 (update_conflict_allocno_hard_prefs): New.
29573 (bucket_allocno_compare_func): Add a preference based on
29574 conflict_allocno_hard_prefs.
29575 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
29576 (color_allocnos): Remove a dead code. Initiate
29577 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
29578
29579 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29580
29581 PR target/84226
29582 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
29583 constraint from =wa to wa. Avoid a subreg on the output operand,
29584 instead use a pseudo and subreg it in a move.
29585 (p9_xxbrd_<mode>): Changed to ...
29586 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
29587 (p9_xxbrd_v2df): New expander.
29588 (p9_xxbrw_<mode>): Changed to ...
29589 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
29590 (p9_xxbrw_v4sf): New expander.
29591
29592 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29593
29594 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
29595
29596 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
29597
29598 PR target/83926
29599 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
29600 multiply in 32-bit mode.
29601 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
29602 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
29603 mode.
29604
29605 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29606
29607 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
29608 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
29609 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
29610 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
29611
29612 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
29613
29614 PR lto/84213
29615 * dwarf2out.c (is_trivial_indirect_ref): New function.
29616 (dwarf2out_late_global_decl): Do not generate a location
29617 attribute for variables that have a non-trivial DECL_VALUE_EXPR
29618 and that are not defined in the current unit.
29619
29620 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29621
29622 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
29623 instead of a libcall for UNORDERED.
29624
29625 2018-02-09 Tamar Christina <tamar.christina@arm.com>
29626
29627 PR target/82641
29628 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
29629 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
29630
29631 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29632
29633 PR target/PR84295
29634 * config/s390/s390.c (s390_set_current_function): Invoke
29635 s390_indirect_branch_settings also if fndecl didn't change.
29636
29637 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29638
29639 * config/rs6000/rs6000.md (blockage): Set length to zero.
29640
29641 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29642
29643 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
29644
29645 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29646
29647 PR sanitizer/84285
29648 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
29649 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
29650 -static-lib*san.
29651
29652 PR debug/84252
29653 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
29654 PARALLEL incoming that failed vt_get_decl_and_offset check.
29655
29656 PR middle-end/84237
29657 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
29658 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
29659 TREE_READONLY bit.
29660 (get_variable_section): For decls in named .bss* sections pass true as
29661 second argument to bss_initializer_p.
29662
29663 2018-02-09 Marek Polacek <polacek@redhat.com>
29664 Jakub Jelinek <jakub@redhat.com>
29665
29666 PR c++/83659
29667 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
29668 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
29669 Sync some changes from cxx_fold_indirect_ref.
29670
29671 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29672
29673 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
29674 markers.
29675 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
29676 (BLOCK_INLINE_ENTRY_LABEL): New.
29677 (dwarf2out_var_location): Disregard inline entry markers.
29678 (inline_entry_data): New struct.
29679 (inline_entry_data_hasher): New hashtable type.
29680 (inline_entry_data_hasher::hash): New.
29681 (inline_entry_data_hasher::equal): New.
29682 (inline_entry_data_table): New variable.
29683 (add_high_low_attributes): Add DW_AT_entry_pc and
29684 DW_AT_GNU_entry_view attributes if a pending entry is found
29685 in inline_entry_data_table. Add old entry_pc attribute only
29686 if debug nonbinding markers are disabled.
29687 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
29688 markers are enabled.
29689 (block_within_block_p, dwarf2out_inline_entry): New.
29690 (dwarf2out_finish): Check that no entries remained in
29691 inline_entry_data_table.
29692 * final.c (reemit_insn_block_notes): Handle inline entry notes.
29693 (final_scan_insn, notice_source_line): Likewise.
29694 (rest_of_clean_state): Skip inline entry markers.
29695 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
29696 markers.
29697 * gimple.c (gimple_build_debug_inline_entry): New.
29698 * gimple.h (enum gimple_debug_subcode): Add
29699 GIMPLE_DEBUG_INLINE_ENTRY.
29700 (gimple_build_debug_inline_entry): Declare.
29701 (gimple_debug_inline_entry_p): New.
29702 (gimple_debug_nonbind_marker_p): Adjust.
29703 * insn-notes.def (INLINE_ENTRY): New.
29704 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
29705 inline entry marker notes.
29706 (print_insn): Likewise.
29707 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
29708 (INSN_DEBUG_MARKER_KIND): Likewise.
29709 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
29710 * tree-inline.c (expand_call_inline): Build and insert
29711 debug_inline_entry stmt.
29712 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
29713 inline entry blocks early, if nonbind markers are enabled.
29714 (dump_scope_block): Dump fragment info.
29715 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
29716 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
29717 (gimple_build_debug_inline_entry): New.
29718 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
29719 Enable/disable inline entry points too.
29720 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
29721 (DEBUG_INSN): Describe inline entry markers.
29722
29723 * common.opt (gvariable-location-views): New.
29724 (gvariable-location-views=incompat5): New.
29725 * config.in: Rebuilt.
29726 * configure: Rebuilt.
29727 * configure.ac: Test assembler for view support.
29728 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
29729 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
29730 * dwarf2out.c (var_loc_view): New typedef.
29731 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
29732 (dwarf2out_locviews_in_attribute): New.
29733 (dwarf2out_locviews_in_loclist): New.
29734 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
29735 (enum dw_line_info_opcode): Add LI_adv_address.
29736 (struct dw_line_info_table): Add view.
29737 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
29738 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
29739 (zero_view_p): New variable.
29740 (ZERO_VIEW_P): New macro.
29741 (output_asm_line_debug_info): New.
29742 (struct var_loc_node): Add view.
29743 (add_AT_view_list, AT_loc_list): New.
29744 (add_var_loc_to_decl): Add view param. Test it against last.
29745 (new_loc_list): Add view params. Record them.
29746 (AT_loc_list_ptr): Handle loc and view lists.
29747 (view_list_to_loc_list_val_node): New.
29748 (print_dw_val): Handle dw_val_class_view_list.
29749 (size_of_die): Likewise.
29750 (value_format): Likewise.
29751 (loc_list_has_views): New.
29752 (gen_llsym): Set vl_symbol too.
29753 (maybe_gen_llsym, skip_loc_list_entry): New.
29754 (dwarf2out_maybe_output_loclist_view_pair): New.
29755 (output_loc_list): Output view list or entries too.
29756 (output_view_list_offset): New.
29757 (output_die): Handle dw_val_class_view_list.
29758 (output_dwarf_version): New.
29759 (output_compilation_unit_header): Use it.
29760 (output_skeleton_debug_sections): Likewise.
29761 (output_rnglists, output_line_info): Likewise.
29762 (output_pubnames, output_aranges): Update version comments.
29763 (output_one_line_info_table): Output view numbers in asm comments.
29764 (dw_loc_list): Determine current endview, pass it to new_loc_list.
29765 Call maybe_gen_llsym.
29766 (loc_list_from_tree_1): Adjust.
29767 (add_AT_location_description): Create view list attribute if
29768 needed, check it's absent otherwise.
29769 (convert_cfa_to_fb_loc_list): Adjust.
29770 (maybe_emit_file): Call output_asm_line_debug_info for test.
29771 (dwarf2out_var_location): Reset views as needed. Precompute
29772 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
29773 attribute. Set view.
29774 (new_line_info_table): Reset next view.
29775 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
29776 (dwarf2out_source_line): Likewise. Output view resets and labels to
29777 the assembler, or select appropriate line info opcodes.
29778 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
29779 (optimize_string_length): Catch it. Adjust.
29780 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
29781 dw_val_class_view_list, and remove it if no longer needed.
29782 (hash_loc_list): Hash view numbers.
29783 (loc_list_hasher::equal): Compare them.
29784 (optimize_location_lists): Check whether a view list symbol is
29785 needed, and whether the locview attribute is present, and
29786 whether they match. Remove the locview attribute if no longer
29787 needed.
29788 (index_location_lists): Call skip_loc_list_entry for test.
29789 (dwarf2out_finish): Call output_asm_line_debug_info for test.
29790 Use output_dwarf_version.
29791 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
29792 (struct dw_val_node): Add val_view_list.
29793 * final.c (SEEN_NEXT_VIEW): New.
29794 (set_next_view_needed): New.
29795 (clear_next_view_needed): New.
29796 (maybe_output_next_view): New.
29797 (final_start_function): Rename to...
29798 (final_start_function_1): ... this. Take pointer to FIRST,
29799 add SEEN parameter. Emit param bindings in the initial view.
29800 (final_start_function): Reintroduce SEEN-less interface.
29801 (final): Rename to...
29802 (final_1): ... this. Take SEEN parameter. Output final pending
29803 next view at the end.
29804 (final): Reintroduce seen-less interface.
29805 (final_scan_insn): Output pending next view before switching
29806 sections or ending a block. Mark the next view as needed when
29807 outputting variable locations. Notify debug backend of section
29808 changes, and of location view changes.
29809 (rest_of_handle_final): Adjust.
29810 * toplev.c (process_options): Autodetect value for debug variable
29811 location views option. Warn on incompat5 without -gdwarf-5.
29812 * doc/invoke.texi (gvariable-location-views): New.
29813 (gvariable-location-views=incompat5): New.
29814 (gno-variable-location-views): New.
29815
29816 2018-02-08 David Malcolm <dmalcolm@redhat.com>
29817
29818 PR tree-optimization/84136
29819 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
29820 that the result of find_edge is non-NULL.
29821
29822 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29823
29824 PR target/83008
29825 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
29826 storing integer register in SImode. Fix cost of 256 and 512
29827 byte aligned SSE register store.
29828
29829 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29830
29831 * config/i386/i386.c (ix86_multiplication_cost): Fix
29832 multiplication cost for TARGET_AVX512DQ.
29833
29834 2018-02-08 Marek Polacek <polacek@redhat.com>
29835
29836 PR tree-optimization/84238
29837 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
29838 get_range_strlen.
29839
29840 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29841
29842 PR tree-optimization/84265
29843 * tree-vect-stmts.c (vectorizable_store): Don't treat
29844 VMAT_CONTIGUOUS accesses as grouped.
29845 (vectorizable_load): Likewise.
29846
29847 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29848
29849 PR tree-optimization/81635
29850 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
29851 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
29852 (test_round_for_mask): New functions.
29853 (wide_int_cc_tests): Call test_round_for_mask.
29854 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
29855 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
29856 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
29857 range returned by get_range_info.
29858
29859 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29860
29861 PR ipa/81360
29862 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
29863 * symtab.c: Include builtins.h
29864 (symtab_node::output_to_lto_symbol_table_p): Move here
29865 from lto-streamer-out.c:output_symbol_p.
29866 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
29867 (output_symbol_p): Move all logic to symtab.c
29868 (produce_symtab): Update.
29869
29870 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29871
29872 * config/s390/s390-opts.h (enum indirect_branch): Define.
29873 * config/s390/s390-protos.h (s390_return_addr_from_memory)
29874 (s390_indirect_branch_via_thunk)
29875 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
29876 (enum s390_indirect_branch_type): Define.
29877 * config/s390/s390.c (struct s390_frame_layout, struct
29878 machine_function): Remove.
29879 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
29880 (indirect_branch_table_label_no, indirect_branch_table_name):
29881 Define variables.
29882 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
29883 (enum s390_indirect_branch_option): Define.
29884 (s390_return_addr_from_memory): New function.
29885 (s390_handle_string_attribute): New function.
29886 (s390_attribute_table): Add new attribute handler.
29887 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
29888 (s390_indirect_branch_via_thunk): New function.
29889 (s390_indirect_branch_via_inline_thunk): New function.
29890 (s390_function_ok_for_sibcall): When jumping via thunk disallow
29891 sibling call optimization for non z10 compiles.
29892 (s390_emit_call): Force indirect branch target to be a single
29893 register. Add r1 clobber for non-z10 compiles.
29894 (s390_emit_epilogue): Emit return jump via return_use expander.
29895 (s390_reorg): Handle JUMP_INSNs as execute targets.
29896 (s390_option_override_internal): Perform validity checks for the
29897 new command line options.
29898 (s390_indirect_branch_attrvalue): New function.
29899 (s390_indirect_branch_settings): New function.
29900 (s390_set_current_function): Invoke s390_indirect_branch_settings.
29901 (s390_output_indirect_thunk_function): New function.
29902 (s390_code_end): Implement target hook.
29903 (s390_case_values_threshold): Implement target hook.
29904 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
29905 macros.
29906 * config/s390/s390.h (struct s390_frame_layout)
29907 (struct machine_function): Move here from s390.c.
29908 (TARGET_INDIRECT_BRANCH_NOBP_RET)
29909 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
29910 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
29911 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
29912 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
29913 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
29914 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
29915 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
29916 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
29917 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
29918 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
29919 (mnemonic attribute): Add values which aren't recognized
29920 automatically.
29921 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
29922 pattern for branch conversion. Fix mnemonic attribute.
29923 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
29924 indirect branch via thunk if requested.
29925 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
29926 ("*indirect_jump"): Disable for branch conversion using out of
29927 line thunks.
29928 ("indirect_jump_via_thunk<mode>_z10")
29929 ("indirect_jump_via_thunk<mode>")
29930 ("indirect_jump_via_inlinethunk<mode>_z10")
29931 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
29932 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
29933 ("casesi_jump_via_inlinethunk<mode>_z10")
29934 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
29935 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
29936 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
29937 ("*indirect2_jump"): Disable for branch conversion.
29938 ("casesi_jump"): Turn into expander and expand patterns for branch
29939 conversion.
29940 ("return_use"): New expander.
29941 ("*return"): Emit return via thunk and rename it to ...
29942 ("*return<mode>"): ... this one.
29943 * config/s390/s390.opt: Add new options and and enum for the
29944 option values.
29945
29946 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29947
29948 * lra-constraints.c (match_reload): Unconditionally use
29949 gen_lowpart_SUBREG, rather than selecting between that
29950 and equivalent gen_rtx_SUBREG code.
29951
29952 2018-02-08 Richard Biener <rguenther@suse.de>
29953
29954 PR tree-optimization/84233
29955 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
29956 changed flag instead of boguously re-using phi_inserted.
29957
29958 2018-02-08 Martin Jambor <mjambor@suse.cz>
29959
29960 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
29961 static local variables.
29962
29963 2018-02-08 Richard Biener <rguenther@suse.de>
29964
29965 PR tree-optimization/84278
29966 * tree-vect-stmts.c (vectorizable_store): When looking for
29967 smaller vector types to perform grouped strided loads/stores
29968 make sure the mode is supported by the target.
29969 (vectorizable_load): Likewise.
29970
29971 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29972
29973 * config/aarch64/aarch64.c (aarch64_components_for_bb):
29974 Increase LDP/STP opportunities by adding adjacent callee-saves.
29975
29976 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29977
29978 PR rtl-optimization/84068
29979 PR rtl-optimization/83459
29980 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
29981
29982 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
29983
29984 PR tree-optimization/84224
29985 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
29986 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
29987 non-zero arguments.
29988
29989 2018-02-07 Iain Sandoe <iain@codesourcery.com>
29990
29991 PR target/84113
29992 * config/rs6000/altivec.md (*restore_world): Remove LR use.
29993 * config/rs6000/predicates.md (restore_world_operation): Adjust op
29994 count, remove one USE.
29995
29996 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
29997
29998 * doc/install.texi (Configuration): Document the
29999 --with-long-double-format={ibm,ieee} PowerPC configuration
30000 options.
30001
30002 PR target/84154
30003 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
30004 Convert from define_expand to be define_insn_and_split. Rework
30005 float/double/_Float128 conversions to QI/HI/SImode to work with
30006 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
30007 conversions to QI/HImode types did a store and then a load to
30008 truncate the value. For conversions to VSX registers, don't split
30009 the insn, instead emit the code directly. Use the code iterator
30010 any_fix to combine signed and unsigned conversions.
30011 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
30012 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
30013 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
30014 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
30015 (fix_<mode>di2_hw): Likewise.
30016 (fixuns_<mode>di2_hw): Likewise.
30017 (fix_<mode>si2_hw): Likewise.
30018 (fixuns_<mode>si2_hw): Likewise.
30019 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
30020 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
30021 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
30022 fix<uns>_trunc<SFDF:mode>si2_p8.
30023 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
30024 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
30025 (fix<uns>_<mode>_mem): Likewise.
30026 (fctiw<u>z_<mode>_mem): Likewise.
30027 (fix<uns>_<mode>_mem): Likewise.
30028 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
30029 the register allocator from doing a direct move to the GPRs to do
30030 a store, and instead use the ISA 3.0 store byte/half-word from
30031 vector register instruction. For IEEE 128-bit floating point,
30032 also optimize stores of 32-bit ints.
30033 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
30034
30035 2018-02-07 Alan Hayward <alan.hayward@arm.com>
30036
30037 * genextract.c (push_pathstr_operand): New function to support
30038 [a-zA-Z].
30039 (walk_rtx): Call push_pathstr_operand.
30040 (print_path): Support [a-zA-Z].
30041
30042 2018-02-07 Richard Biener <rguenther@suse.de>
30043
30044 PR tree-optimization/84037
30045 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
30046 (cse_and_gimplify_to_preheader): Declare.
30047 (vect_get_place_in_interleaving_chain): Likewise.
30048 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30049 ivexpr_map.
30050 (_loop_vec_info::~_loop_vec_info): Delete it.
30051 (cse_and_gimplify_to_preheader): New function.
30052 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
30053 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
30054 (vectorizable_load): Likewise. For grouped stores always base
30055 the IV on the first element.
30056 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
30057 condition before gimplifying.
30058
30059 2018-02-07 Jakub Jelinek <jakub@redhat.com>
30060
30061 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
30062 *DIV_EXPR and *MOD_EXPR.
30063
30064 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
30065
30066 PR target/84248
30067 * config/i386/i386.c (ix86_option_override_internal): Mask out
30068 the CF_SET bit when checking -fcf-protection.
30069
30070 2018-02-07 Tom de Vries <tom@codesourcery.com>
30071
30072 PR libgomp/84217
30073 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
30074 enough.
30075
30076 2018-02-07 Richard Biener <rguenther@suse.de>
30077
30078 PR tree-optimization/84204
30079 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
30080 this place.
30081
30082 PR tree-optimization/84205
30083 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
30084 special-case isl_ast_op_zdiv_r.
30085
30086 PR tree-optimization/84223
30087 * graphite-scop-detection.c (gather_bbs::before_dom_children):
30088 Only add conditions from within the region.
30089 (gather_bbs::after_dom_children): Adjust.
30090
30091 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
30092
30093 PR target/84209
30094 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
30095 * config/avr/avr.md: Only post-reload split REG-REG moves if
30096 either register is GENERAL_REG_P.
30097
30098 2018-02-07 Jakub Jelinek <jakub@redhat.com>
30099
30100 PR tree-optimization/84235
30101 * tree-ssa-scopedtables.c
30102 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
30103 if the subtraction is performed in floating point type where NaNs are
30104 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
30105 build 1. Formatting fix.
30106
30107 2018-02-06 Jakub Jelinek <jakub@redhat.com>
30108
30109 PR target/84146
30110 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
30111 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
30112 and skip it regardless of bb boundaries. Use CALL_P macro,
30113 don't test INSN_P (insn) together with CALL_P or JUMP_P check
30114 unnecessarily, formatting fix.
30115
30116 2018-02-06 Michael Collison <michael.collison@arm.com>
30117
30118 * config/arm/thumb2.md:
30119 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
30120 (*thumb_mov_notscc): Ditto.
30121
30122 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
30123
30124 PR target/84154
30125 * config/rs6000/rs6000.md (su code attribute): Use "u" for
30126 unsigned_fix, not "s".
30127
30128 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30129
30130 * configure.ac (gcc_fn_eh_frame_ro): New function.
30131 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
30132 correct .eh_frame permissions.
30133 * configure: Regenerate.
30134
30135 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
30136
30137 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
30138 irrelevant options.
30139
30140 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30141
30142 * config/rs6000/rs6000.c (rs6000_option_override_internal):
30143 Display warning message for -mno-speculate-indirect-jumps.
30144
30145 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
30146
30147 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
30148 Undocumented.
30149 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
30150
30151 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
30152
30153 PR tree-optimization/84225
30154 * tree-eh.c (find_trapping_overflow): Only call
30155 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
30156
30157 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
30158
30159 PR target/84145
30160 * config/i386/i386.c: Reimplement the check of possible options
30161 -mibt/-mshstk conbination. Change error messages.
30162 * doc/invoke.texi: Fix a typo: remove extra '='.
30163
30164 2018-02-06 Marek Polacek <polacek@redhat.com>
30165
30166 PR tree-optimization/84228
30167 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
30168
30169 2018-02-06 Tamar Christina <tamar.christina@arm.com>
30170
30171 PR target/82641
30172 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
30173 emitted arch directives.
30174 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
30175 __ARM_FEATURE_COPROC before changing architectures.
30176
30177 2018-02-06 Richard Biener <rguenther@suse.de>
30178
30179 * config/i386/i386.c (print_reg): Fix typo.
30180 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
30181
30182 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
30183
30184 * configure: Regenerate.
30185
30186 2018-02-05 Martin Sebor <msebor@redhat.com>
30187
30188 PR tree-optimization/83369
30189 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
30190 inlining context.
30191
30192 2018-02-05 Martin Liska <mliska@suse.cz>
30193
30194 * doc/invoke.texi: Cherry-pick upstream r323995.
30195
30196 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
30197
30198 * ira.c (ira_init_register_move_cost): Adjust comment.
30199
30200 2018-02-05 Martin Liska <mliska@suse.cz>
30201
30202 PR gcov-profile/84137
30203 * doc/gcov.texi: Fix typo in documentation.
30204
30205 2018-02-05 Martin Liska <mliska@suse.cz>
30206
30207 PR gcov-profile/83879
30208 * doc/gcov.texi: Document necessity of --dynamic-list-data when
30209 using dlopen functionality.
30210
30211 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
30212
30213 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
30214 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
30215 _mm_maskz_range_ss, _mm_mask_range_round_ss,
30216 _mm_maskz_range_round_ss): New intrinsics.
30217 (__builtin_ia32_rangesd128_round)
30218 (__builtin_ia32_rangess128_round): Remove.
30219 (__builtin_ia32_rangesd128_mask_round,
30220 __builtin_ia32_rangess128_mask_round): New builtins.
30221 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
30222 __builtin_ia32_rangess128_round): Remove.
30223 (__builtin_ia32_rangesd128_mask_round,
30224 __builtin_ia32_rangess128_mask_round): New builtins.
30225 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
30226 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
30227 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
30228 "<round_saeonly_constraint>")): Changed to ...
30229 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
30230 "<round_saeonly_scalar_constraint>")): ... this.
30231 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
30232 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
30233 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
30234 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
30235 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
30236
30237 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
30238
30239 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
30240 options.
30241 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
30242 Remove all values except native, 8540 and 8548.
30243
30244 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
30245
30246 * config/i386/i386.c (ix86_output_function_return): Pass
30247 INVALID_REGNUM, instead of -1, as invalid register number to
30248 indirect_thunk_name and output_indirect_thunk.
30249
30250 2018-02-02 Julia Koval <julia.koval@intel.com>
30251
30252 * config.gcc: Add -march=icelake.
30253 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
30254 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
30255 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
30256 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
30257 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
30258 (processor_target_table): Add icelake.
30259 (ix86_option_override_internal): Handle new PTAs.
30260 (get_builtin_code_for_version): Handle icelake.
30261 (M_INTEL_COREI7_ICELAKE): New.
30262 (fold_builtin_cpu): Handle icelake.
30263 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
30264 * doc/invoke.texi: Add -march=icelake.
30265
30266 2018-02-02 Julia Koval <julia.koval@intel.com>
30267
30268 * config/i386/i386.c (ix86_option_override_internal): Change flags type
30269 to wide_int_bitmask.
30270 * wide-int-bitmask.h: New.
30271
30272 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
30273
30274 PR target/84066
30275 * config/i386/i386.md: Replace Pmode with word_mode in
30276 builtin_setjmp_setup and builtin_longjmp to support x32.
30277
30278 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
30279
30280 PR target/56010
30281 PR target/83743
30282 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
30283 #include "opts.h".
30284 (rs6000_supported_cpu_names): New static variable.
30285 (linux_cpu_translation_table): Likewise.
30286 (elf_platform) <cpu>: Define new static variable and use it.
30287 Translate kernel AT_PLATFORM name to canonical name if needed.
30288 Error if platform name is unknown.
30289
30290 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
30291
30292 PR target/84089
30293 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
30294
30295 2018-02-01 Jeff Law <law@redhat.com>
30296
30297 PR target/84128
30298 * config/i386/i386.c (release_scratch_register_on_entry): Add new
30299 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
30300 the scratch if RELEASE_VIA_POP is false.
30301 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
30302 If we have to save a temporary register, decrement SIZE appropriately.
30303 Pass new arguments to release_scratch_register_on_entry.
30304 (ix86_adjust_stack_and_probe): Likewise.
30305 (ix86_emit_probe_stack_range): Pass new arguments to
30306 release_scratch_register_on_entry.
30307
30308 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
30309
30310 PR rtl-optimization/84157
30311 * combine.c (change_zero_ext): Use REG_P predicate in
30312 front of HARD_REGISTER_P predicate.
30313
30314 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
30315
30316 * config/avr/avr.c (avr_option_override): Move disabling of
30317 -fdelete-null-pointer-checks to...
30318 * common/config/avr/avr-common.c (avr_option_optimization_table):
30319 ...here.
30320
30321 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30322
30323 PR tree-optimization/81635
30324 * tree-data-ref.c (split_constant_offset_1): For types that
30325 wrap on overflow, try to use range info to prove that wrapping
30326 cannot occur.
30327
30328 2018-02-01 Renlin Li <renlin.li@arm.com>
30329
30330 PR target/83370
30331 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
30332 TAILCALL_ADDR_REGS.
30333 (aarch64_register_move_cost): Likewise.
30334 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
30335 TAILCALL_ADDR_REGS.
30336 (REG_CLASS_NAMES): Likewise.
30337 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
30338 TAILCALL_ADDR_REGS. Remove IP registers.
30339 * config/aarch64/aarch64.md (Ucs): Update register constraint.
30340
30341 2018-02-01 Richard Biener <rguenther@suse.de>
30342
30343 * domwalk.h (dom_walker::dom_walker): Add additional constructor
30344 for specifying RPO order and allow NULL for that.
30345 * domwalk.c (dom_walker::dom_walker): Likewise.
30346 (dom_walker::walk): Handle NULL RPO order.
30347 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
30348 in RPO order.
30349 (rewrite_update_dom_walker): Likewise.
30350 (mark_def_dom_walker): Likewise.
30351
30352 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30353
30354 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
30355 (aarch64_maybe_expand_sve_subreg_move): Declare.
30356 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
30357 * config/aarch64/predicates.md (aarch64_any_register_operand): New
30358 predicate.
30359 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
30360 that are semantically a reverse operation.
30361 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
30362 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
30363 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
30364 functions.
30365 (aarch64_can_change_mode_class): For big-endian, forbid changes
30366 between two SVE modes if they have different element sizes.
30367
30368 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30369
30370 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
30371 the TImode handling for big-endian targets.
30372
30373 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30374
30375 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
30376 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
30377 not just bytes.
30378 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
30379 Remove BSWAP handing for big-endian targets and use the form of
30380 LD1RQ appropariate for the mode.
30381
30382 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30383
30384 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
30385 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
30386 duplicated element.
30387
30388 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30389
30390 PR tearget/83845
30391 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
30392 check for operands that need to go through aarch64_sve_reload_be.
30393
30394 2018-02-01 Jakub Jelinek <jakub@redhat.com>
30395
30396 PR tree-optimization/81661
30397 PR tree-optimization/84117
30398 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
30399 * tree-eh.c: Include gimplify.h.
30400 (find_trapping_overflow, replace_trapping_overflow,
30401 rewrite_to_non_trapping_overflow): New functions.
30402 * tree-vect-loop.c: Include tree-eh.h.
30403 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
30404 * tree-data-ref.c: Include tree-eh.h.
30405 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
30406
30407 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
30408
30409 PR rtl-optimization/84123
30410 * combine.c (change_zero_ext): Check if hard register satisfies
30411 can_change_dest_mode before calling gen_lowpart_SUBREG.
30412
30413 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
30414
30415 PR target/82444
30416 * ira.c (ira_init_register_move_cost): Remove assert.
30417
30418 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30419
30420 PR rtl-optimization/84071
30421 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
30422 * doc/tm.texi: Regenerate.
30423
30424 2018-01-31 Richard Biener <rguenther@suse.de>
30425
30426 PR tree-optimization/84132
30427 * tree-data-ref.c (analyze_miv_subscript): Properly
30428 check whether evolution_function_is_affine_multivariate_p
30429 before calling gcd_of_steps_may_divide_p.
30430
30431 2018-01-31 Julia Koval <julia.koval@intel.com>
30432
30433 PR target/83618
30434 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
30435 * config/i386/i386.md (rdpid_rex64) New.
30436 (rdpid): Make 32bit only.
30437
30438 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
30439
30440 PR lto/84105
30441 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
30442 an IDENTIFIER_NODE for FUNCTION_TYPE's.
30443
30444 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30445
30446 Revert
30447 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30448
30449 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30450
30451 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30452
30453 PR rtl-optimization/84071
30454 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
30455 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
30456
30457 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30458
30459 * config/arc/arc.c (arc_handle_aux_attribute): New function.
30460 (arc_attribute_table): Add 'aux' attribute.
30461 (arc_in_small_data_p): Consider aux like variables.
30462 (arc_is_aux_reg_p): New function.
30463 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
30464 (arc_get_aux_arg): New function.
30465 (prepare_move_operands): Handle aux-register access.
30466 (arc_handle_aux_attribute): New function.
30467 * doc/extend.texi (ARC Variable attributes): Add subsection.
30468
30469 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30470
30471 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
30472 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
30473 (arc_attribute_table): Add 'uncached' attribute.
30474 (arc_print_operand): Print '.di' flag for uncached memory
30475 accesses.
30476 (arc_in_small_data_p): Do not consider for small data the uncached
30477 types.
30478 (arc_is_uncached_mem_p): New function.
30479 * config/arc/predicates.md (compact_store_memory_operand): Check
30480 for uncached memory accesses.
30481 (nonvol_nonimm_operand): Likewise.
30482 * doc/extend.texi (ARC Type Attribute): New subsection.
30483
30484 2018-01-31 Jakub Jelinek <jakub@redhat.com>
30485
30486 PR c/84100
30487 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
30488 falign-loops=): Add Optimization flag.
30489
30490 2018-01-30 Jeff Law <law@redhat.com>
30491
30492 PR target/84064
30493 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
30494 INT_REGISTERS_SAVED. Check it prior to calling
30495 get_scratch_register_on_entry.
30496 (ix86_adjust_stack_and_probe): Similarly.
30497 (ix86_emit_probe_stack_range): Similarly.
30498 (ix86_expand_prologue): Corresponding changes.
30499
30500 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30501
30502 PR target/40411
30503 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
30504 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
30505
30506 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
30507
30508 PR target/84112
30509 * lra-constraints.c (curr_insn_transform): Process AND in the
30510 address.
30511
30512 2018-01-30 Jakub Jelinek <jakub@redhat.com>
30513
30514 PR rtl-optimization/83986
30515 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
30516 dependence against last_pending_memory_flush in addition to
30517 pending_jump_insns.
30518
30519 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
30520
30521 PR tree-optimization/81611
30522 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
30523 copies.
30524
30525 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30526
30527 PR target/83758
30528 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
30529 a reg rtx.
30530
30531 2018-01-30 Richard Biener <rguenther@suse.de>
30532 Jakub Jelinek <jakub@redhat.com>
30533
30534 PR tree-optimization/84111
30535 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
30536 inner loops added during recursion, as they don't have up-to-date
30537 SSA form.
30538
30539 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30540
30541 PR ipa/81360
30542 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
30543 (can_inline_edge_by_limits_p): ... here.
30544 (can_early_inline_edge_p, check_callers,
30545 update_caller_keys, update_callee_keys, recursive_inlining,
30546 add_new_edges_to_heap, speculation_useful_p,
30547 inline_small_functions,
30548 inline_small_functions, flatten_function,
30549 inline_to_all_callers_1): Update.
30550
30551 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30552
30553 * profile-count.c (profile_count::combine_with_ipa_count): Handle
30554 zeros correctly.
30555
30556 2018-01-30 Richard Biener <rguenther@suse.de>
30557
30558 PR tree-optimization/83008
30559 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
30560 invariant and constant vector uses in stmts when they need
30561 more than one stmt.
30562
30563 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30564
30565 PR bootstrap/84017
30566 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
30567 * configure: Regenerate.
30568
30569 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30570
30571 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
30572 pattern.
30573 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
30574 Use gen_rtx_REG rather than gen_lowpart.
30575
30576 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30577
30578 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
30579 rather than 0 when creating partial subregs.
30580
30581 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30582
30583 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
30584 of usage.
30585
30586 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
30587
30588 PR target/81550
30589 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
30590 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
30591 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
30592 flags. This restores the settings used before the 2017-07-24.
30593 Turning off pre increment/decrement/modify allows IVOPTS to
30594 optimize DF/SF loops where the index is an int.
30595
30596 2018-01-29 Richard Biener <rguenther@suse.de>
30597 Kelvin Nilsen <kelvin@gcc.gnu.org>
30598
30599 PR bootstrap/80867
30600 * tree-vect-stmts.c (vectorizable_call): Don't call
30601 targetm.vectorize_builtin_md_vectorized_function if callee is
30602 NULL.
30603
30604 2018-01-22 Carl Love <cel@us.ibm.com>
30605
30606 * doc/extend.tex: Fix typo in second arg in
30607 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
30608
30609 2018-01-29 Richard Biener <rguenther@suse.de>
30610
30611 PR tree-optimization/84086
30612 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
30613 (flush_ssaname_freelist): When SSA names were released reset
30614 the SCEV hash table.
30615
30616 2018-01-29 Richard Biener <rguenther@suse.de>
30617
30618 PR tree-optimization/84057
30619 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
30620 removed paths when removing edges.
30621
30622 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
30623
30624 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
30625 -mfunction-return=@var{choice}.
30626
30627 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
30628
30629 PR diagnostic/84034
30630 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
30631 Handle CR like TAB.
30632 (layout::print_source_line): Likewise.
30633 (test_get_line_width_without_trailing_whitespace): Add test cases.
30634
30635 2018-01-27 Jakub Jelinek <jakub@redhat.com>
30636
30637 PR middle-end/84040
30638 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
30639 debug insns.
30640
30641 2018-01-26 Jim Wilson <jimw@sifive.com>
30642
30643 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
30644
30645 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
30646 specified.
30647
30648 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30649
30650 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
30651 and CMP + SUB-immediate -> SUBS.
30652
30653 2018-01-26 Martin Sebor <msebor@redhat.com>
30654
30655 PR tree-optimization/83896
30656 * tree-ssa-strlen.c (get_string_len): Rename...
30657 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
30658 Avoid assuming length is constant.
30659 (handle_char_store): Use HOST_WIDE_INT for string length.
30660
30661 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
30662
30663 PR target/81763
30664 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
30665 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
30666
30667 2018-01-26 Richard Biener <rguenther@suse.de>
30668
30669 PR rtl-optimization/84003
30670 * dse.c (record_store): Only record redundant stores when
30671 the earlier store aliases at least all accesses the later one does.
30672
30673 2018-01-26 Jakub Jelinek <jakub@redhat.com>
30674
30675 PR rtl-optimization/83985
30676 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
30677 REG_CFA_RESTORE insns.
30678 (delete_unmarked_insns): Don't ignore separate shrink wrapping
30679 REG_CFA_RESTORE insns here.
30680
30681 PR c/83989
30682 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
30683 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
30684
30685 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30686
30687 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
30688 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
30689 (arc_init): Likewise.
30690 (arc_override_options): Likewise.
30691 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
30692 value.
30693 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
30694 support.
30695 * config/arc/arc.h (TARGET_DBNZ): Define.
30696 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
30697 properly set the tune attribute.
30698 (dbnz): Use TARGET_DBNZ guard.
30699 * config/arc/arc.opt (mtune): Add core3 option.
30700
30701 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30702
30703 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
30704 recognize new pic like addresses.
30705 (arc_delegitimize_address): Clean up.
30706
30707 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30708
30709 * config/arc/arc-arches.def: Option mrf16 valid for all
30710 architectures.
30711 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
30712 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
30713 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
30714 * config/arc/arc-tables.opt: Regenerate.
30715 * config/arc/arc.c (arc_conditional_register_usage): Handle
30716 reduced register file case.
30717 (arc_file_start): Set must have build attributes.
30718 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
30719 mrf16 option value.
30720 * config/arc/arc.opt (mrf16): Add new option.
30721 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
30722 * config/arc/genmultilib.awk: Handle new mrf16 option.
30723 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
30724 * config/arc/t-multilib: Regenerate.
30725 * doc/invoke.texi (ARC Options): Document mrf16 option.
30726
30727 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30728
30729 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
30730 * config/arc/arc.c (arc_handle_secure_attribute): New function.
30731 (arc_attribute_table): Add 'secure_call' attribute.
30732 (arc_print_operand): Print secure call operand.
30733 (arc_function_ok_for_sibcall): Don't optimize tail calls when
30734 secure.
30735 (arc_is_secure_call_p): New function. * config/arc/arc.md
30736 (call_i): Add support for sjli instruction.
30737 (call_value_i): Likewise.
30738 * config/arc/constraints.md (Csc): New constraint.
30739
30740 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30741 John Eric Martin <John.Martin@emmicro-us.com>
30742
30743 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
30744 * config/arc/arc.c (_arc_jli_section): New struct.
30745 (arc_jli_section): New type.
30746 (rc_jli_sections): New static variable.
30747 (arc_handle_jli_attribute): New function.
30748 (arc_attribute_table): Add jli_always and jli_fixed attribute.
30749 (arc_file_end): New function.
30750 (TARGET_ASM_FILE_END): Define.
30751 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
30752 (arc_add_jli_section): New function.
30753 (jli_call_scan): Likewise.
30754 (arc_reorg): Call jli_call_scan.
30755 (arc_output_addsi): Remove 'S' from printing asm operand.
30756 (arc_is_jli_call_p): New function.
30757 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
30758 operand.
30759 (movhi_insn): Likewise.
30760 (movsi_insn): Likewise.
30761 (movsi_set_cc_insn): Likewise.
30762 (loadqi_update): Likewise.
30763 (load_zeroextendqisi_update): Likewise.
30764 (load_signextendqisi_update): Likewise.
30765 (loadhi_update): Likewise.
30766 (load_zeroextendhisi_update): Likewise.
30767 (load_signextendhisi_update): Likewise.
30768 (loadsi_update): Likewise.
30769 (loadsf_update): Likewise.
30770 (movsicc_insn): Likewise.
30771 (bset_insn): Likewise.
30772 (bxor_insn): Likewise.
30773 (bclr_insn): Likewise.
30774 (bmsk_insn): Likewise.
30775 (bicsi3_insn): Likewise.
30776 (cmpsi_cc_c_insn): Likewise.
30777 (movsi_ne): Likewise.
30778 (movsi_cond_exec): Likewise.
30779 (clrsbsi2): Likewise.
30780 (norm_f): Likewise.
30781 (normw): Likewise.
30782 (swap): Likewise.
30783 (divaw): Likewise.
30784 (flag): Likewise.
30785 (sr): Likewise.
30786 (kflag): Likewise.
30787 (ffs): Likewise.
30788 (ffs_f): Likewise.
30789 (fls): Likewise.
30790 (call_i): Remove 'S' asm letter, add jli instruction.
30791 (call_value_i): Likewise.
30792 * config/arc/arc.op (mjli-always): New option.
30793 * config/arc/constraints.md (Cji): New constraint.
30794 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
30795 operand.
30796 (subsf3_fpx): Likewise.
30797 (mulsf3_fpx): Likewise.
30798 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
30799 asm operand.
30800 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
30801 function attrbutes.
30802 * doc/invoke.texi (ARC): Document mjli-always option.
30803
30804 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
30805
30806 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
30807 avoid addition with 0 and use incw and decw where possible.
30808
30809 2018-01-26 Richard Biener <rguenther@suse.de>
30810
30811 PR tree-optimization/81082
30812 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
30813 association if it requires casting to unsigned.
30814 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
30815 from fold_plusminus_mult_expr to catch important cases late when
30816 range info is available.
30817
30818 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30819
30820 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
30821 * configure.ac (hidden_linkonce): New test.
30822 * configure: Regenerate.
30823 * config.in: Regenerate.
30824
30825 2018-01-26 Julia Koval <julia.koval@intel.com>
30826
30827 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
30828 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
30829 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
30830 _mm_mask_bitshuffle_epi64_mask): Fix type.
30831 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
30832 USI_FTYPE_V4DI_V4DI_USI): Remove.
30833 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
30834 __builtin_ia32_vpshufbitqmb256_mask,
30835 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
30836 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
30837 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
30838
30839 2018-01-26 Alan Modra <amodra@gmail.com>
30840
30841 PR target/84033
30842 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
30843 UNSPEC_VBPERMQ. Sort other unspecs.
30844
30845 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
30846
30847 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
30848
30849 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
30850
30851 PR middle-end/83055
30852 * predict.c (drop_profile): Do not push/pop cfun; update also
30853 node->count.
30854 (handle_missing_profiles): Fix logic looking for zero profiles.
30855
30856 2018-01-25 Jakub Jelinek <jakub@redhat.com>
30857
30858 PR middle-end/83977
30859 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
30860 on functions with #pragma omp declare simd or functions with simd
30861 attribute.
30862 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
30863 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
30864 Remove trailing \n from warning_at calls.
30865
30866 2018-01-25 Tom de Vries <tom@codesourcery.com>
30867
30868 PR target/84028
30869 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30870 for neutered workers.
30871
30872 2018-01-24 Joseph Myers <joseph@codesourcery.com>
30873
30874 PR target/68467
30875 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
30876 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
30877
30878 2018-01-24 Jeff Law <law@redhat.com>
30879
30880 PR target/83994
30881 * i386.c (get_probe_interval): Move to earlier point.
30882 (ix86_compute_frame_layout): If -fstack-clash-protection and
30883 the frame is larger than the probe interval, then use pushes
30884 to save registers rather than reg->mem moves.
30885 (ix86_expand_prologue): Remove conditional for int_registers_saved
30886 assertion.
30887
30888 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
30889
30890 PR target/84014
30891 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
30892 min/max for never referenced object.
30893
30894 2018-01-24 Jakub Jelinek <jakub@redhat.com>
30895
30896 PR middle-end/83977
30897 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
30898 here.
30899 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
30900 attributes from DECL_ATTRIBUTES (decl) without affecting
30901 DECL_ATTRIBUTES (current_function_decl).
30902 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
30903 functions with non-NULL DECL_ABSTRACT_ORIGIN.
30904
30905 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
30906
30907 PR tree-optimization/83979
30908 * fold-const.c (fold_comparison): Use constant_boolean_node
30909 instead of boolean_{true,false}_node.
30910
30911 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
30912
30913 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
30914 with zero counts.
30915
30916 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30917
30918 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30919 Simplify the clause that sets the length attribute.
30920 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30921 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
30922 clause that sets the length attribute.
30923 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30924
30925 2018-01-24 Tom de Vries <tom@codesourcery.com>
30926
30927 PR target/83589
30928 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
30929 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
30930 Add strict parameter.
30931 (prevent_branch_around_nothing): Insert dummy insn between branch to
30932 label and label with no ptx insn inbetween.
30933 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
30934
30935 2018-01-24 Tom de Vries <tom@codesourcery.com>
30936
30937 PR target/81352
30938 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30939 for neutered threads in warp.
30940 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
30941
30942 2018-01-24 Richard Biener <rguenther@suse.de>
30943
30944 PR tree-optimization/83176
30945 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
30946 operands.
30947
30948 2018-01-24 Richard Biener <rguenther@suse.de>
30949
30950 PR tree-optimization/82819
30951 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
30952 code generating pluses that are no-ops in the target precision.
30953
30954 2018-01-24 Richard Biener <rguenther@suse.de>
30955
30956 PR middle-end/84000
30957 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
30958
30959 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30960
30961 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
30962 to merge probabilities.
30963 * predict.c (probably_never_executed): Also mark as cold functions
30964 with global 0 profile and guessed local profile.
30965 * profile-count.c (profile_probability::combine_with_count): New
30966 member function.
30967 * profile-count.h (profile_probability::operator*,
30968 profile_probability::operator*=, profile_probability::operator/,
30969 profile_probability::operator/=): Reduce precision to adjusted
30970 and set value to guessed on contradictory divisions.
30971 (profile_probability::combine_with_freq): Remove.
30972 (profile_probability::combine_wiht_count): Declare.
30973 (profile_count::force_nonzero):: Set to adjusted.
30974 (profile_count::probability_in):: Set quality to adjusted.
30975 * tree-ssa-tail-merge.c (replace_block_by): Use
30976 combine_with_count.
30977
30978 2018-01-23 Andrew Waterman <andrew@sifive.com>
30979 Jim Wilson <jimw@sifive.com>
30980
30981 * config/riscv/riscv.c (riscv_stack_boundary): New.
30982 (riscv_option_override): Set riscv_stack_boundary. Handle
30983 riscv_preferred_stack_boundary_arg.
30984 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
30985 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
30986 (STACK_BOUNDARY): Set to riscv_stack_boundary.
30987 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
30988 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
30989 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
30990
30991 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
30992
30993 PR target/83905
30994 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
30995 of struct ix86_frame.
30996 (ix86_expand_epilogue): Likewise. Add a local variable for
30997 the reg_save_offset field in struct ix86_frame.
30998
30999 2018-01-23 Bin Cheng <bin.cheng@arm.com>
31000
31001 PR tree-optimization/82604
31002 * tree-loop-distribution.c (enum partition_kind): New enum item
31003 PKIND_PARTIAL_MEMSET.
31004 (partition_builtin_p): Support above new enum item.
31005 (generate_code_for_partition): Ditto.
31006 (compute_access_range): Differentiate cases that equality can be
31007 proven at all loops, the innermost loops or no loops.
31008 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
31009 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
31010 (finalize_partitions, distribute_loop): Don't fuse partition of
31011 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
31012 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
31013 parloop is enabled.
31014
31015 2018-01-23 Martin Liska <mliska@suse.cz>
31016
31017 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
31018 order to ignore the predictor.
31019 (PRED_POLYMORPHIC_CALL): Likewise.
31020 (PRED_RECURSIVE_CALL): Likewise.
31021
31022 2018-01-23 Martin Liska <mliska@suse.cz>
31023
31024 * tree-profile.c (tree_profiling): Print function header to
31025 aware reader which function we are working on.
31026 * value-prof.c (gimple_find_values_to_profile): Do not print
31027 not interesting value histograms.
31028
31029 2018-01-23 Martin Liska <mliska@suse.cz>
31030
31031 * profile-count.h (enum profile_quality): Add
31032 profile_uninitialized as the first value. Do not number values
31033 as they are zero based.
31034 (profile_count::verify): Update sanity check.
31035 (profile_probability::verify): Likewise.
31036
31037 2018-01-23 Nathan Sidwell <nathan@acm.org>
31038
31039 * doc/invoke.texi (ffor-scope): Deprecate.
31040
31041 2018-01-23 David Malcolm <dmalcolm@redhat.com>
31042
31043 PR tree-optimization/83510
31044 * domwalk.c (set_all_edges_as_executable): New function.
31045 (dom_walker::dom_walker): Convert bool param
31046 "skip_unreachable_blocks" to enum reachability. Move setup of
31047 edge flags to set_all_edges_as_executable and only do it when
31048 reachability is REACHABLE_BLOCKS.
31049 * domwalk.h (enum dom_walker::reachability): New enum.
31050 (dom_walker::dom_walker): Convert bool param
31051 "skip_unreachable_blocks" to enum reachability.
31052 (set_all_edges_as_executable): New decl.
31053 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
31054 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
31055 "reachability".
31056 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
31057 but converting true to REACHABLE_BLOCKS.
31058 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
31059 * tree-vrp.c
31060 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
31061 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
31062 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
31063 REACHABLE_BLOCKS.
31064 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
31065 if check_all_array_refs will be called.
31066
31067 2018-01-23 David Malcolm <dmalcolm@redhat.com>
31068
31069 * tree.c (selftest::test_location_wrappers): Add more test
31070 coverage.
31071
31072 2018-01-23 David Malcolm <dmalcolm@redhat.com>
31073
31074 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
31075 (selftest::test_bit_in_range): Likewise.
31076
31077 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
31078
31079 PR testsuite/83888
31080 * doc/sourcebuild.texi (vect_float): Say that the selector
31081 only describes the situation when -funsafe-math-optimizations is on.
31082 (vect_float_strict): Document.
31083
31084 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
31085
31086 PR tree-optimization/83965
31087 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
31088 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
31089 instead of checking only for a reduction.
31090 (vect_recog_widen_sum_pattern): Likewise.
31091
31092 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
31093
31094 * predict.c (probably_never_executed): Only use precise profile info.
31095 (compute_function_frequency): Skip after inlining hack since we now
31096 have quality checking.
31097
31098 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
31099
31100 * profile-count.h (profile_probability::very_unlikely,
31101 profile_probability::unlikely, profile_probability::even): Set
31102 precision to guessed.
31103
31104 2018-01-23 Richard Biener <rguenther@suse.de>
31105
31106 PR tree-optimization/83963
31107 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
31108 Properly terminate dominator walk when crossing the exit edge not
31109 when visiting its source block.
31110
31111 2018-01-23 Jakub Jelinek <jakub@redhat.com>
31112
31113 PR c++/83918
31114 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
31115 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
31116
31117 2018-01-22 Jakub Jelinek <jakub@redhat.com>
31118
31119 PR tree-optimization/83957
31120 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
31121 semicolon after for body surrounded by braces.
31122
31123 PR tree-optimization/83081
31124 * profile-count.h (profile_probability::split): New method.
31125 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
31126 Use profile_probability::split.
31127 (do_compare_rtx_and_jump): Fix adjustment of probabilities
31128 when splitting a single conditional jump into 2.
31129
31130 2018-01-22 David Malcolm <dmalcolm@redhat.com>
31131
31132 PR tree-optimization/69452
31133 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
31134 decl.
31135
31136 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31137
31138 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
31139 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
31140 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
31141
31142 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31143
31144 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
31145 declaration.
31146 * config/rl78/rl78.md (movdi): New define_expand.
31147 * config/rl78/rl78.c (rl78_split_movdi): New function.
31148
31149 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
31150
31151 PR target/83862
31152 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
31153 no longer used.
31154 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
31155 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
31156 128-bit to produce an UNSPEC move to get the double word with the
31157 signbit and then a shift directly to do signbit.
31158 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
31159 implementation with a new version that just does either a direct
31160 move or a regular move. Move memory interface to separate insns.
31161 Move insns so they are next to the expander.
31162 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
31163 with signbit move. Split big and little endian case.
31164 (signbit<mode>2_dm_mem_le): Likewise.
31165 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
31166 (signbit<mode>2_dm2): Likewise.
31167
31168 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31169
31170 * config/rl78/rl78.md (anddi3): New define_expand.
31171
31172 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31173
31174 * config/rl78/rl78.md (umindi3): New define_expand.
31175
31176 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31177
31178 * config/rl78/rl78.md (smindi3): New define_expand.
31179
31180 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31181
31182 * config/rl78/rl78.md (smaxdi3): New define_expand.
31183
31184 2018-01-22 Carl Love <cel@us.ibm.com>
31185
31186 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
31187 LVX_V1TI): Add macro expansion.
31188 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
31189 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
31190 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
31191 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
31192 Change check to determine if the instruction is a byte reversing
31193 entry. Fix typo in comment.
31194 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
31195 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
31196 Add def_builtin calls for new builtins.
31197 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
31198 Add define_insn expansion.
31199
31200 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31201
31202 * config/rl78/rl78.md (umaxdi3): New define_expand.
31203
31204 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31205
31206 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
31207 for non-QImode registers.
31208
31209 2018-01-22 Richard Biener <rguenther@suse.de>
31210
31211 PR tree-optimization/83963
31212 * graphite-scop-detection.c (scop_detection::get_sese): Delay
31213 including the loop exit block.
31214 (scop_detection::merge_sese): Likewise.
31215 (scop_detection::add_scop): Do it here instead.
31216
31217 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31218
31219 * doc/sourcebuild.texi (arm_softfloat): Document.
31220
31221 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
31222
31223 PR gcc/77734
31224 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
31225 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
31226 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
31227
31228 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31229 David Edelsohn <dje.gcc@gmail.com>
31230
31231 PR target/83946
31232 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31233 Change "crset eq" to "crset 2".
31234 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31235 (*call_indirect_aix<mode>_nospec): Likewise.
31236 (*call_value_indirect_aix<mode>_nospec): Likewise.
31237 (*call_indirect_elfv2<mode>_nospec): Likewise.
31238 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
31239 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
31240 change assembly output from . to $.
31241 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31242 (indirect_jump<mode>_nospec): Change assembly output from . to $.
31243 (*tablejump<mode>_internal1_nospec): Likewise.
31244
31245 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
31246
31247 PR target/80870
31248 * config/sh/sh_optimize_sett_clrt.cc:
31249 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
31250
31251 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
31252
31253 PR tree-optimization/83940
31254 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
31255 offset_dt to vect_constant_def rather than vect_unknown_def_type.
31256 (vect_check_load_store_mask): Add a mask_dt_out parameter and
31257 use it to pass back the definition type.
31258 (vect_check_store_rhs): Likewise rhs_dt_out.
31259 (vect_build_gather_load_calls): Add a mask_dt argument and use
31260 it instead of a call to vect_is_simple_use.
31261 (vectorizable_store): Update calls to vect_check_load_store_mask
31262 and vect_check_store_rhs. Use the dt returned by the latter instead
31263 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
31264 instead of calls to vect_is_simple_use. Pass the scalar rather
31265 than the vector operand to vect_is_simple_use when handling
31266 second and subsequent copies of an rhs value.
31267 (vectorizable_load): Update calls to vect_check_load_store_mask
31268 and vect_build_gather_load_calls. Use the cached mask_dt and
31269 gs_info.offset_dt instead of calls to vect_is_simple_use.
31270
31271 2018-01-20 Jakub Jelinek <jakub@redhat.com>
31272
31273 PR middle-end/83945
31274 * tree-emutls.c: Include gimplify.h.
31275 (lower_emutls_2): New function.
31276 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
31277 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
31278 it before further processing.
31279
31280 PR target/83930
31281 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
31282 UINTVAL (trueop1) instead of INTVAL (op1).
31283
31284 2018-01-19 Jakub Jelinek <jakub@redhat.com>
31285
31286 PR debug/81570
31287 PR debug/83728
31288 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
31289 INCOMING_FRAME_SP_OFFSET if not defined.
31290 (scan_trace): Add ENTRY argument. If true and
31291 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
31292 emit a note to adjust the CFA offset.
31293 (create_cfi_notes): Adjust scan_trace callers.
31294 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
31295 INCOMING_FRAME_SP_OFFSET in the CIE.
31296 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
31297 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
31298 Likewise.
31299 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
31300 * doc/tm.texi: Regenerated.
31301
31302 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
31303
31304 PR rtl-optimization/83147
31305 * lra-constraints.c (remove_inheritance_pseudos): Use
31306 lra_substitute_pseudo_within_insn.
31307
31308 2018-01-19 Tom de Vries <tom@codesourcery.com>
31309 Cesar Philippidis <cesar@codesourcery.com>
31310
31311 PR target/83920
31312 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
31313
31314 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
31315
31316 PR target/83790
31317 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
31318 spaces for function labels.
31319
31320 2018-01-19 Martin Liska <mliska@suse.cz>
31321
31322 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
31323 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
31324 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
31325 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
31326 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
31327 (PRED_CONST_RETURN): Change from 69 to 65.
31328 (PRED_NULL_RETURN): Change from 91 to 71.
31329 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
31330 (PRED_LOOP_GUARD): Change from 66 to 73.
31331
31332 2018-01-19 Martin Liska <mliska@suse.cz>
31333
31334 * predict.c (predict_insn_def): Add new assert.
31335 (struct branch_predictor): Change type to signed integer.
31336 (test_prediction_value_range): Amend test to cover
31337 PROB_UNINITIALIZED.
31338 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
31339 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
31340 (PRED_LOOP_ITERATIONS_MAX): Likewise.
31341 (PRED_LOOP_IV_COMPARE): Likewise.
31342 * predict.h (PROB_UNINITIALIZED): Define new constant.
31343
31344 2018-01-19 Martin Liska <mliska@suse.cz>
31345
31346 * predict.c (dump_prediction): Add new format for
31347 analyze_brprob.py script which is enabled with -details
31348 suboption.
31349 * profile-count.h (precise_p): New function.
31350
31351 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31352
31353 PR tree-optimization/83922
31354 * tree-vect-loop.c (vect_verify_full_masking): Return false if
31355 there are no statements that need masking.
31356 (vect_active_double_reduction_p): New function.
31357 (vect_analyze_loop_operations): Use it when handling phis that
31358 are not in the loop header.
31359
31360 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31361
31362 PR tree-optimization/83914
31363 * tree-vect-loop.c (vectorizable_induction): Don't convert
31364 init_expr or apply the peeling adjustment for inductions
31365 that are nested within the vectorized loop.
31366
31367 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31368
31369 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
31370 instead of NEG.
31371
31372 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31373
31374 PR sanitizer/81715
31375 PR testsuite/83882
31376 * function.h (gimplify_parameters): Add gimple_seq * argument.
31377 * function.c: Include gimple.h and options.h.
31378 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
31379 for the added local temporaries if needed.
31380 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
31381 if there are any parameter cleanups, wrap whole body into a
31382 try/finally with the cleanups.
31383
31384 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
31385
31386 PR target/82964
31387 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
31388 Use GET_MODE_CLASS for scalar floating point.
31389
31390 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31391
31392 PR ipa/82256
31393 patch by PaX Team
31394 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
31395 Fix call of call_cgraph_insertion_hooks.
31396
31397 2018-01-18 Martin Sebor <msebor@redhat.com>
31398
31399 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
31400
31401 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31402
31403 PR ipa/83619
31404 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
31405 frequencies.
31406
31407 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
31408
31409 PR other/70268
31410 * common.opt: (-ffile-prefix-map): New option.
31411 * opts.c (common_handle_option): Defer it.
31412 * opts-global.c (handle_common_deferred_options): Handle it.
31413 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
31414 * file-prefix-map.h: New file.
31415 (remap_debug_filename, add_debug_prefix_map): ...here.
31416 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
31417 * final.c (debug_prefix_map, add_debug_prefix_map
31418 remap_debug_filename): Move to...
31419 * file-prefix-map.c: New file.
31420 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
31421 generalize, get rid of alloca(), use strrchr() instead of strchr().
31422 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
31423 Implement in terms of add_prefix_map().
31424 (remap_macro_filename, remap_debug_filename): Implement in term of
31425 remap_filename().
31426 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
31427 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
31428 * dbxout.c: Include file-prefix-map.h.
31429 * varasm.c: Likewise.
31430 * vmsdbgout.c: Likewise.
31431 * xcoffout.c: Likewise.
31432 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
31433 * doc/cppopts.texi (-fmacro-prefix-map): Document.
31434 * doc/invoke.texi (-ffile-prefix-map): Document.
31435 (-fdebug-prefix-map): Update description.
31436
31437 2018-01-18 Martin Liska <mliska@suse.cz>
31438
31439 * config/i386/i386.c (indirect_thunk_name): Document that also
31440 lfence is emitted.
31441 (output_indirect_thunk): Document why both instructions
31442 (pause and lfence) are generated.
31443
31444 2018-01-18 Richard Biener <rguenther@suse.de>
31445
31446 PR tree-optimization/83887
31447 * graphite-scop-detection.c
31448 (scop_detection::get_nearest_dom_with_single_entry): Remove.
31449 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
31450 (scop_detection::merge_sese): Re-implement with a flood-fill
31451 algorithm that properly finds a SESE region if it exists.
31452
31453 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31454
31455 PR c/61240
31456 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
31457 pointer_diff optimizations use view_convert instead of convert.
31458
31459 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31460
31461 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31462 Generate different code for -mno-speculate-indirect-jumps.
31463 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31464 (*call_indirect_aix<mode>): Disable for
31465 -mno-speculate-indirect-jumps.
31466 (*call_indirect_aix<mode>_nospec): New define_insn.
31467 (*call_value_indirect_aix<mode>): Disable for
31468 -mno-speculate-indirect-jumps.
31469 (*call_value_indirect_aix<mode>_nospec): New define_insn.
31470 (*sibcall_nonlocal_sysv<mode>): Generate different code for
31471 -mno-speculate-indirect-jumps.
31472 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31473
31474 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
31475
31476 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
31477 long double type, set the flags for noting the default long double
31478 type, even if we don't pass or return a long double type.
31479
31480 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
31481
31482 PR ipa/83051
31483 * ipa-inline.c (flatten_function): Do not overwrite final inlining
31484 failure.
31485
31486 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
31487
31488 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
31489 support for merge[hl].
31490 (fold_mergehl_helper): New helper function.
31491 (tree-vector-builder.h): New #include for tree_vector_builder usage.
31492 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
31493 (altivec_vmrglw_direct): Add xxmrglw insn.
31494
31495 2018-01-17 Andrew Waterman <andrew@sifive.com>
31496
31497 * config/riscv/riscv.c (riscv_conditional_register_usage): If
31498 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
31499
31500 2018-01-17 David Malcolm <dmalcolm@redhat.com>
31501
31502 PR lto/83121
31503 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
31504 call the lto_location_cache before reading the
31505 DECL_SOURCE_LOCATION of the types.
31506
31507 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
31508 Richard Sandiford <richard.sandiford@linaro.org>
31509
31510 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
31511 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
31512 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
31513 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
31514 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
31515 Add declaration.
31516 * config/aarch64/constraints.md (aarch64_movti_operand):
31517 Limit immediates.
31518 * config/aarch64/predicates.md (Uti): Add new constraint.
31519
31520 2018-01-17 Carl Love <cel@us.ibm.com>
31521
31522 * config/rs6000/vsx.md (define_expand xl_len_r,
31523 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
31524 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
31525 lxvll.
31526 (define_expand, define_insn): Move the shift left from the
31527 define_insn to the define_expand for lxvl and stxvl instructions.
31528 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
31529 and XL_LEN_R definitions to PURE.
31530
31531 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
31532
31533 * config/i386/i386.c (indirect_thunk_name): Declare regno
31534 as unsigned int. Compare regno with INVALID_REGNUM.
31535 (output_indirect_thunk): Ditto.
31536 (output_indirect_thunk_function): Ditto.
31537 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
31538 in the call to output_indirect_thunk_function.
31539
31540 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
31541
31542 PR middle-end/83884
31543 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
31544 rather than the size of inner_type to determine the stack slot size
31545 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
31546
31547 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
31548
31549 PR target/83546
31550 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
31551 to PTA_SILVERMONT.
31552
31553 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
31554
31555 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
31556 endian Linux systems to optionally enable multilibs for selecting
31557 the long double type if the user configured an explicit type.
31558 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
31559 have no long double multilibs if not defined.
31560 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
31561 warn if the user used -mabi={ieee,ibm}longdouble and we built
31562 multilibs for long double.
31563 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
31564 appropriate multilib option.
31565 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
31566 multilib options.
31567 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
31568 for building long double multilibs.
31569 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
31570
31571 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
31572
31573 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
31574 copies.
31575
31576 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
31577 64 bits.
31578 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
31579 128 bits.
31580
31581 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
31582 variables.
31583
31584 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
31585 return value.
31586
31587 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31588
31589 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
31590 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
31591
31592 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
31593
31594 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
31595 different rtl trees depending on TARGET_64BIT.
31596 (rs6000_gen_lvx): Likewise.
31597
31598 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31599
31600 * config/visium/visium.md (nop): Tweak comment.
31601 (hazard_nop): Likewise.
31602
31603 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31604
31605 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
31606 -mspeculate-indirect-jumps.
31607 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
31608 for -mno-speculate-indirect-jumps.
31609 (*call_indirect_elfv2<mode>_nospec): New define_insn.
31610 (*call_value_indirect_elfv2<mode>): Disable for
31611 -mno-speculate-indirect-jumps.
31612 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
31613 (indirect_jump): Emit different RTL for
31614 -mno-speculate-indirect-jumps.
31615 (*indirect_jump<mode>): Disable for
31616 -mno-speculate-indirect-jumps.
31617 (*indirect_jump<mode>_nospec): New define_insn.
31618 (tablejump): Emit different RTL for
31619 -mno-speculate-indirect-jumps.
31620 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
31621 (tablejumpsi_nospec): New define_expand.
31622 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
31623 (tablejumpdi_nospec): New define_expand.
31624 (*tablejump<mode>_internal1): Disable for
31625 -mno-speculate-indirect-jumps.
31626 (*tablejump<mode>_internal1_nospec): New define_insn.
31627 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
31628 option.
31629
31630 2018-01-16 Artyom Skrobov tyomitch@gmail.com
31631
31632 * caller-save.c (insert_save): Drop unnecessary parameter. All
31633 callers updated.
31634
31635 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31636 Richard Biener <rguenth@suse.de>
31637
31638 PR libgomp/83590
31639 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
31640 return early, inline manually is_gimple_sizepos. Make sure if we
31641 call gimplify_expr we don't end up with a gimple constant.
31642 * tree.c (variably_modified_type_p): Don't return true for
31643 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
31644 * gimplify.h (is_gimple_sizepos): Remove.
31645
31646 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31647
31648 PR tree-optimization/83857
31649 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
31650 vectorizable_live_operation for pure SLP statements.
31651 (vectorizable_live_operation): Handle PHIs.
31652
31653 2018-01-16 Richard Biener <rguenther@suse.de>
31654
31655 PR tree-optimization/83867
31656 * tree-vect-stmts.c (vect_transform_stmt): Precompute
31657 nested_in_vect_loop_p since the scalar stmt may get invalidated.
31658
31659 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31660
31661 PR c/83844
31662 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
31663 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
31664 If off is not INTEGER_CST, issue a may not be aligned warning
31665 rather than isn't aligned. Use isn%'t rather than isn't.
31666 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
31667 into MULT_EXPR.
31668 <case MULT_EXPR>: Improve the case when bottom and one of the
31669 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
31670 operand, in that case check if the other operand is multiple of
31671 bottom divided by the INTEGER_CST operand.
31672
31673 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31674
31675 PR target/83858
31676 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
31677 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
31678 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
31679 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
31680 * config/pa/pa.c (pa_function_arg_advance): Likewise.
31681 (pa_function_arg, pa_arg_partial_bytes): Likewise.
31682 (pa_function_arg_size): New function.
31683
31684 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31685
31686 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
31687 in a separate statement.
31688
31689 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31690
31691 PR tree-optimization/83847
31692 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
31693 group gathers and scatters.
31694
31695 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31696
31697 PR rtl-optimization/86620
31698 * params.def (max-sched-ready-insns): Bump minimum value to 1.
31699
31700 PR rtl-optimization/83213
31701 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
31702 to last if both are JUMP_INSNs.
31703
31704 PR tree-optimization/83843
31705 * gimple-ssa-store-merging.c
31706 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
31707 store_immediate_info for bswap/nop orig_stores.
31708
31709 2018-01-15 Andrew Waterman <andrew@sifive.com>
31710
31711 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
31712 !TARGET_MUL.
31713 <UDIV>: Increase cost if !TARGET_DIV.
31714
31715 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
31716
31717 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
31718 (define_attr "cr_logical_3op"): New.
31719 (cceq_ior_compare): Adjust.
31720 (cceq_ior_compare_complement): Adjust.
31721 (*cceq_rev_compare): Adjust.
31722 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
31723 (is_cracked_insn): Adjust.
31724 (insn_must_be_first_in_group): Adjust.
31725 * config/rs6000/40x.md: Adjust.
31726 * config/rs6000/440.md: Adjust.
31727 * config/rs6000/476.md: Adjust.
31728 * config/rs6000/601.md: Adjust.
31729 * config/rs6000/603.md: Adjust.
31730 * config/rs6000/6xx.md: Adjust.
31731 * config/rs6000/7450.md: Adjust.
31732 * config/rs6000/7xx.md: Adjust.
31733 * config/rs6000/8540.md: Adjust.
31734 * config/rs6000/cell.md: Adjust.
31735 * config/rs6000/e300c2c3.md: Adjust.
31736 * config/rs6000/e500mc.md: Adjust.
31737 * config/rs6000/e500mc64.md: Adjust.
31738 * config/rs6000/e5500.md: Adjust.
31739 * config/rs6000/e6500.md: Adjust.
31740 * config/rs6000/mpc.md: Adjust.
31741 * config/rs6000/power4.md: Adjust.
31742 * config/rs6000/power5.md: Adjust.
31743 * config/rs6000/power6.md: Adjust.
31744 * config/rs6000/power7.md: Adjust.
31745 * config/rs6000/power8.md: Adjust.
31746 * config/rs6000/power9.md: Adjust.
31747 * config/rs6000/rs64.md: Adjust.
31748 * config/rs6000/titan.md: Adjust.
31749
31750 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31751
31752 * config/i386/predicates.md (indirect_branch_operand): Rewrite
31753 ix86_indirect_branch_register logic.
31754
31755 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31756
31757 * config/i386/constraints.md (Bs): Update
31758 ix86_indirect_branch_register check. Don't check
31759 ix86_indirect_branch_register with GOT_memory_operand.
31760 (Bw): Likewise.
31761 * config/i386/predicates.md (GOT_memory_operand): Don't check
31762 ix86_indirect_branch_register here.
31763 (GOT32_symbol_operand): Likewise.
31764
31765 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31766
31767 * config/i386/predicates.md (constant_call_address_operand):
31768 Rewrite ix86_indirect_branch_register logic.
31769 (sibcall_insn_operand): Likewise.
31770
31771 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31772
31773 * config/i386/constraints.md (Bs): Replace
31774 ix86_indirect_branch_thunk_register with
31775 ix86_indirect_branch_register.
31776 (Bw): Likewise.
31777 * config/i386/i386.md (indirect_jump): Likewise.
31778 (tablejump): Likewise.
31779 (*sibcall_memory): Likewise.
31780 (*sibcall_value_memory): Likewise.
31781 Peepholes of indirect call and jump via memory: Likewise.
31782 * config/i386/i386.opt: Likewise.
31783 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31784 (GOT_memory_operand): Likewise.
31785 (call_insn_operand): Likewise.
31786 (sibcall_insn_operand): Likewise.
31787 (GOT32_symbol_operand): Likewise.
31788
31789 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31790
31791 PR middle-end/83837
31792 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
31793 type rather than type addr's type points to.
31794 (expand_omp_atomic_mutex): Likewise.
31795 (expand_omp_atomic): Likewise.
31796
31797 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31798
31799 PR target/83839
31800 * config/i386/i386.c (output_indirect_thunk_function): Use
31801 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
31802 for __x86_return_thunk.
31803
31804 2018-01-15 Richard Biener <rguenther@suse.de>
31805
31806 PR middle-end/83850
31807 * expmed.c (extract_bit_field_1): Fix typo.
31808
31809 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31810
31811 PR target/83687
31812 * config/arm/iterators.md (VF): New mode iterator.
31813 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
31814 Remove integer-related logic from pattern.
31815 (neon_vabd<mode>_3): Likewise.
31816
31817 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31818
31819 PR middle-end/82694
31820 * common.opt (fstrict-overflow): No longer an alias.
31821 (fwrapv-pointer): New option.
31822 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
31823 also for pointer types based on flag_wrapv_pointer.
31824 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
31825 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
31826 opts->x_flag_wrapv got set.
31827 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
31828 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
31829 POINTER_TYPE_OVERFLOW_UNDEFINED.
31830 * match.pd: Likewise in address comparison pattern.
31831 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
31832
31833 2018-01-15 Richard Biener <rguenther@suse.de>
31834
31835 PR lto/83804
31836 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
31837 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
31838 Reset type names to their identifier if their TYPE_DECL doesn't
31839 have linkage (and thus is used for ODR and devirt).
31840 (save_debug_info_for_decl): Remove.
31841 (save_debug_info_for_type): Likewise.
31842 (add_tree_to_fld_list): Adjust.
31843 * tree-pretty-print.c (dump_generic_node): Make dumping of
31844 type names more robust.
31845
31846 2018-01-15 Richard Biener <rguenther@suse.de>
31847
31848 * BASE-VER: Bump to 8.0.1.
31849
31850 2018-01-14 Martin Sebor <msebor@redhat.com>
31851
31852 PR other/83508
31853 * builtins.c (check_access): Avoid warning when the no-warning bit
31854 is set.
31855
31856 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
31857
31858 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
31859 * ira-color (allocno_hard_regs_compare): Likewise.
31860
31861 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
31862
31863 PR target/83013
31864 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
31865 Use .pushsection/.popsection.
31866
31867 2018-01-14 Martin Sebor <msebor@redhat.com>
31868
31869 PR c++/81327
31870 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
31871
31872 2018-01-14 Jakub Jelinek <jakub@redhat.com>
31873
31874 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
31875 entry from extra_headers.
31876 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
31877 extra_headers, make the list bitwise identical to the i?86-*-* one.
31878
31879 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31880
31881 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
31882 -mcmodel=large with -mindirect-branch=thunk,
31883 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
31884 -mfunction-return=thunk-extern.
31885 * doc/invoke.texi: Document -mcmodel=large is incompatible with
31886 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
31887 -mfunction-return=thunk and -mfunction-return=thunk-extern.
31888
31889 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31890
31891 * config/i386/i386.c (print_reg): Print the name of the full
31892 integer register without '%'.
31893 (ix86_print_operand): Handle 'V'.
31894 * doc/extend.texi: Document 'V' modifier.
31895
31896 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31897
31898 * config/i386/constraints.md (Bs): Disallow memory operand for
31899 -mindirect-branch-register.
31900 (Bw): Likewise.
31901 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31902 (GOT_memory_operand): Likewise.
31903 (call_insn_operand): Likewise.
31904 (sibcall_insn_operand): Likewise.
31905 (GOT32_symbol_operand): Likewise.
31906 * config/i386/i386.md (indirect_jump): Call convert_memory_address
31907 for -mindirect-branch-register.
31908 (tablejump): Likewise.
31909 (*sibcall_memory): Likewise.
31910 (*sibcall_value_memory): Likewise.
31911 Disallow peepholes of indirect call and jump via memory for
31912 -mindirect-branch-register.
31913 (*call_pop): Replace m with Bw.
31914 (*call_value_pop): Likewise.
31915 (*sibcall_pop_memory): Replace m with Bs.
31916 * config/i386/i386.opt (mindirect-branch-register): New option.
31917 * doc/invoke.texi: Document -mindirect-branch-register option.
31918
31919 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31920
31921 * config/i386/i386-protos.h (ix86_output_function_return): New.
31922 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
31923 set function_return_type.
31924 (indirect_thunk_name): Add ret_p to indicate thunk for function
31925 return.
31926 (output_indirect_thunk_function): Pass false to
31927 indirect_thunk_name.
31928 (ix86_output_indirect_branch_via_reg): Likewise.
31929 (ix86_output_indirect_branch_via_push): Likewise.
31930 (output_indirect_thunk_function): Create alias for function
31931 return thunk if regno < 0.
31932 (ix86_output_function_return): New function.
31933 (ix86_handle_fndecl_attribute): Handle function_return.
31934 (ix86_attribute_table): Add function_return.
31935 * config/i386/i386.h (machine_function): Add
31936 function_return_type.
31937 * config/i386/i386.md (simple_return_internal): Use
31938 ix86_output_function_return.
31939 (simple_return_internal_long): Likewise.
31940 * config/i386/i386.opt (mfunction-return=): New option.
31941 (indirect_branch): Mention -mfunction-return=.
31942 * doc/extend.texi: Document function_return function attribute.
31943 * doc/invoke.texi: Document -mfunction-return= option.
31944
31945 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31946
31947 * config/i386/i386-opts.h (indirect_branch): New.
31948 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
31949 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
31950 with local indirect jump when converting indirect call and jump.
31951 (ix86_set_indirect_branch_type): New.
31952 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
31953 (indirectlabelno): New.
31954 (indirect_thunk_needed): Likewise.
31955 (indirect_thunk_bnd_needed): Likewise.
31956 (indirect_thunks_used): Likewise.
31957 (indirect_thunks_bnd_used): Likewise.
31958 (INDIRECT_LABEL): Likewise.
31959 (indirect_thunk_name): Likewise.
31960 (output_indirect_thunk): Likewise.
31961 (output_indirect_thunk_function): Likewise.
31962 (ix86_output_indirect_branch_via_reg): Likewise.
31963 (ix86_output_indirect_branch_via_push): Likewise.
31964 (ix86_output_indirect_branch): Likewise.
31965 (ix86_output_indirect_jmp): Likewise.
31966 (ix86_code_end): Call output_indirect_thunk_function if needed.
31967 (ix86_output_call_insn): Call ix86_output_indirect_branch if
31968 needed.
31969 (ix86_handle_fndecl_attribute): Handle indirect_branch.
31970 (ix86_attribute_table): Add indirect_branch.
31971 * config/i386/i386.h (machine_function): Add indirect_branch_type
31972 and has_local_indirect_jump.
31973 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
31974 to true.
31975 (tablejump): Likewise.
31976 (*indirect_jump): Use ix86_output_indirect_jmp.
31977 (*tablejump_1): Likewise.
31978 (simple_return_indirect_internal): Likewise.
31979 * config/i386/i386.opt (mindirect-branch=): New option.
31980 (indirect_branch): New.
31981 (keep): Likewise.
31982 (thunk): Likewise.
31983 (thunk-inline): Likewise.
31984 (thunk-extern): Likewise.
31985 * doc/extend.texi: Document indirect_branch function attribute.
31986 * doc/invoke.texi: Document -mindirect-branch= option.
31987
31988 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
31989
31990 PR ipa/83051
31991 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
31992
31993 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
31994
31995 * ipa-inline.c (want_inline_small_function_p): Return false if
31996 inlining has already failed with CIF_FINAL_ERROR.
31997 (update_caller_keys): Call want_inline_small_function_p before
31998 can_inline_edge_p.
31999 (update_callee_keys): Likewise.
32000
32001 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
32002
32003 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
32004 New function.
32005 (rs6000_quadword_masked_address_p): Likewise.
32006 (quad_aligned_load_p): Likewise.
32007 (quad_aligned_store_p): Likewise.
32008 (const_load_sequence_p): Add comment to describe the outer-most loop.
32009 (mimic_memory_attributes_and_flags): New function.
32010 (rs6000_gen_stvx): Likewise.
32011 (replace_swapped_aligned_store): Likewise.
32012 (rs6000_gen_lvx): Likewise.
32013 (replace_swapped_aligned_load): Likewise.
32014 (replace_swapped_load_constant): Capitalize argument name in
32015 comment describing this function.
32016 (rs6000_analyze_swaps): Add a third pass to search for vector loads
32017 and stores that access quad-word aligned addresses and replace
32018 with stvx or lvx instructions when appropriate.
32019 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
32020 New function prototype.
32021 (rs6000_quadword_masked_address_p): Likewise.
32022 (rs6000_gen_lvx): Likewise.
32023 (rs6000_gen_stvx): Likewise.
32024 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
32025 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
32026 when memory address is aligned.
32027 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
32028 this split to select lvx instruction when memory address is aligned.
32029 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
32030 instruction when memory address is aligned.
32031 (*vsx_le_perm_load_v16qi): Likewise.
32032 (four unnamed splitters): Modify to select the stvx instruction
32033 when memory is aligned.
32034
32035 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
32036
32037 * predict.c (determine_unlikely_bbs): Handle correctly BBs
32038 which appears in the queue multiple times.
32039
32040 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32041 Alan Hayward <alan.hayward@arm.com>
32042 David Sherwood <david.sherwood@arm.com>
32043
32044 * tree-vectorizer.h (vec_lower_bound): New structure.
32045 (_loop_vec_info): Add check_nonzero and lower_bounds.
32046 (LOOP_VINFO_CHECK_NONZERO): New macro.
32047 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
32048 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
32049 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
32050 fields. Make seg_len the distance travelled, not including the
32051 access size.
32052 (dr_direction_indicator): Declare.
32053 (dr_zero_step_indicator): Likewise.
32054 (dr_known_forward_stride_p): Likewise.
32055 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
32056 tree-ssanames.h.
32057 (runtime_alias_check_p): Allow runtime alias checks with
32058 variable strides.
32059 (operator ==): Compare access_size and align.
32060 (prune_runtime_alias_test_list): Rework for new distinction between
32061 the access_size and seg_len.
32062 (create_intersect_range_checks_index): Likewise. Cope with polynomial
32063 segment lengths.
32064 (get_segment_min_max): New function.
32065 (create_intersect_range_checks): Use it.
32066 (dr_step_indicator): New function.
32067 (dr_direction_indicator): Likewise.
32068 (dr_zero_step_indicator): Likewise.
32069 (dr_known_forward_stride_p): Likewise.
32070 * tree-loop-distribution.c (data_ref_segment_size): Return
32071 DR_STEP * (niters - 1).
32072 (compute_alias_check_pairs): Update call to the dr_with_seg_len
32073 constructor.
32074 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
32075 (vect_preserves_scalar_order_p): New function, split out from...
32076 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
32077 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
32078 (vect_vfa_access_size): New function.
32079 (vect_vfa_align): Likewise.
32080 (vect_compile_time_alias): Take access_size_a and access_b arguments.
32081 (dump_lower_bound): New function.
32082 (vect_check_lower_bound): Likewise.
32083 (vect_small_gap_p): Likewise.
32084 (vectorizable_with_step_bound_p): Likewise.
32085 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
32086 depencies if the vectorization factor is 1. Convert the checks
32087 for nonzero steps into checks on the bounds of DR_STEP. Try using
32088 a bunds check for variable steps if the minimum required step is
32089 relatively small. Update calls to the dr_with_seg_len
32090 constructor and to vect_compile_time_alias.
32091 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
32092 function.
32093 (vect_loop_versioning): Call it.
32094 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
32095 when retrying.
32096 (vect_estimate_min_profitable_iters): Account for any bounds checks.
32097
32098 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32099 Alan Hayward <alan.hayward@arm.com>
32100 David Sherwood <david.sherwood@arm.com>
32101
32102 * doc/sourcebuild.texi (vect_scatter_store): Document.
32103 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
32104 optabs.
32105 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
32106 Document.
32107 * genopinit.c (main): Add supports_vec_scatter_store and
32108 supports_vec_scatter_store_cached to target_optabs.
32109 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
32110 IFN_MASK_SCATTER_STORE.
32111 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
32112 functions.
32113 * internal-fn.h (internal_store_fn_p): Declare.
32114 (internal_fn_stored_value_index): Likewise.
32115 * internal-fn.c (scatter_store_direct): New macro.
32116 (expand_scatter_store_optab_fn): New function.
32117 (direct_scatter_store_optab_supported_p): New macro.
32118 (internal_store_fn_p): New function.
32119 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
32120 IFN_MASK_SCATTER_STORE.
32121 (internal_fn_mask_index): Likewise.
32122 (internal_fn_stored_value_index): New function.
32123 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
32124 for scatter stores.
32125 * optabs-query.h (supports_vec_scatter_store_p): Declare.
32126 * optabs-query.c (supports_vec_scatter_store_p): New function.
32127 * tree-vectorizer.h (vect_get_store_rhs): Declare.
32128 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
32129 true for scatter stores.
32130 (vect_gather_scatter_fn_p): Handle scatter stores too.
32131 (vect_check_gather_scatter): Consider using scatter stores if
32132 supports_vec_scatter_store_p.
32133 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
32134 scatter stores too.
32135 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
32136 internal_fn_stored_value_index.
32137 (check_load_store_masking): Handle scatter stores too.
32138 (vect_get_store_rhs): Make public.
32139 (vectorizable_call): Use internal_store_fn_p.
32140 (vectorizable_store): Handle scatter store internal functions.
32141 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
32142 when deciding whether the end of the group has been reached.
32143 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
32144 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
32145 (mask_scatter_store<mode>): New insns.
32146
32147 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32148 Alan Hayward <alan.hayward@arm.com>
32149 David Sherwood <david.sherwood@arm.com>
32150
32151 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
32152 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
32153 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
32154 function.
32155 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
32156 Use vect_truncate_gather_scatter_offset if we can't treat the
32157 operation as a normal gather load or scatter store.
32158 (get_group_load_store_type): Take the gather_scatter_info
32159 as argument. Try using a gather load or scatter store for
32160 single-element groups.
32161 (get_load_store_type): Update calls to get_group_load_store_type
32162 and vect_use_strided_gather_scatters_p.
32163
32164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32165 Alan Hayward <alan.hayward@arm.com>
32166 David Sherwood <david.sherwood@arm.com>
32167
32168 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
32169 optional tree argument.
32170 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
32171 null target hooks.
32172 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
32173 but continue to use the current value as a fallback.
32174 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
32175 to compare the updates.
32176 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
32177 (get_load_store_type): Use it when handling a strided access.
32178 (vect_get_strided_load_store_ops): New function.
32179 (vect_get_data_ptr_increment): Likewise.
32180 (vectorizable_load): Handle strided gather loads. Always pass
32181 a step to vect_create_data_ref_ptr and bump_vector_ptr.
32182
32183 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32184 Alan Hayward <alan.hayward@arm.com>
32185 David Sherwood <david.sherwood@arm.com>
32186
32187 * doc/md.texi (gather_load@var{m}): Document.
32188 (mask_gather_load@var{m}): Likewise.
32189 * genopinit.c (main): Add supports_vec_gather_load and
32190 supports_vec_gather_load_cached to target_optabs.
32191 * optabs-tree.c (init_tree_optimization_optabs): Use
32192 ggc_cleared_alloc to allocate target_optabs.
32193 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
32194 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
32195 functions.
32196 * internal-fn.h (internal_load_fn_p): Declare.
32197 (internal_gather_scatter_fn_p): Likewise.
32198 (internal_fn_mask_index): Likewise.
32199 (internal_gather_scatter_fn_supported_p): Likewise.
32200 * internal-fn.c (gather_load_direct): New macro.
32201 (expand_gather_load_optab_fn): New function.
32202 (direct_gather_load_optab_supported_p): New macro.
32203 (direct_internal_fn_optab): New function.
32204 (internal_load_fn_p): Likewise.
32205 (internal_gather_scatter_fn_p): Likewise.
32206 (internal_fn_mask_index): Likewise.
32207 (internal_gather_scatter_fn_supported_p): Likewise.
32208 * optabs-query.c (supports_at_least_one_mode_p): New function.
32209 (supports_vec_gather_load_p): Likewise.
32210 * optabs-query.h (supports_vec_gather_load_p): Declare.
32211 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
32212 and memory_type field.
32213 (NUM_PATTERNS): Bump to 15.
32214 * tree-vect-data-refs.c: Include internal-fn.h.
32215 (vect_gather_scatter_fn_p): New function.
32216 (vect_describe_gather_scatter_call): Likewise.
32217 (vect_check_gather_scatter): Try using internal functions for
32218 gather loads. Recognize existing calls to a gather load function.
32219 (vect_analyze_data_refs): Consider using gather loads if
32220 supports_vec_gather_load_p.
32221 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
32222 (vect_get_gather_scatter_offset_type): Likewise.
32223 (vect_convert_mask_for_vectype): Likewise.
32224 (vect_add_conversion_to_patterm): Likewise.
32225 (vect_try_gather_scatter_pattern): Likewise.
32226 (vect_recog_gather_scatter_pattern): New pattern recognizer.
32227 (vect_vect_recog_func_ptrs): Add it.
32228 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
32229 internal_fn_mask_index and internal_gather_scatter_fn_p.
32230 (check_load_store_masking): Take the gather_scatter_info as an
32231 argument and handle gather loads.
32232 (vect_get_gather_scatter_ops): New function.
32233 (vectorizable_call): Check internal_load_fn_p.
32234 (vectorizable_load): Likewise. Handle gather load internal
32235 functions.
32236 (vectorizable_store): Update call to check_load_store_masking.
32237 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
32238 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
32239 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
32240 (aarch64_gather_scale_operand_d): New predicates.
32241 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
32242 (mask_gather_load<mode>): New insns.
32243
32244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32245 Alan Hayward <alan.hayward@arm.com>
32246 David Sherwood <david.sherwood@arm.com>
32247
32248 * optabs.def (fold_left_plus_optab): New optab.
32249 * doc/md.texi (fold_left_plus_@var{m}): Document.
32250 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
32251 * internal-fn.c (fold_left_direct): Define.
32252 (expand_fold_left_optab_fn): Likewise.
32253 (direct_fold_left_optab_supported_p): Likewise.
32254 * fold-const-call.c (fold_const_fold_left): New function.
32255 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
32256 * tree-parloops.c (valid_reduction_p): New function.
32257 (gather_scalar_reductions): Use it.
32258 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
32259 (vect_finish_replace_stmt): Declare.
32260 * tree-vect-loop.c (fold_left_reduction_fn): New function.
32261 (needs_fold_left_reduction_p): New function, split out from...
32262 (vect_is_simple_reduction): ...here. Accept reductions that
32263 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
32264 (vect_force_simple_reduction): Also store the reduction type in
32265 the assignment's STMT_VINFO_REDUC_TYPE.
32266 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
32267 (merge_with_identity): New function.
32268 (vect_expand_fold_left): Likewise.
32269 (vectorize_fold_left_reduction): Likewise.
32270 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
32271 scalar phi in place for it. Check for target support and reject
32272 cases that would reassociate the operation. Defer the transform
32273 phase to vectorize_fold_left_reduction.
32274 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
32275 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
32276 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
32277
32278 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32279
32280 * tree-if-conv.c (predicate_mem_writes): Remove redundant
32281 call to ifc_temp_var.
32282
32283 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32284 Alan Hayward <alan.hayward@arm.com>
32285 David Sherwood <david.sherwood@arm.com>
32286
32287 * target.def (legitimize_address_displacement): Take the original
32288 offset as a poly_int.
32289 * targhooks.h (default_legitimize_address_displacement): Update
32290 accordingly.
32291 * targhooks.c (default_legitimize_address_displacement): Likewise.
32292 * doc/tm.texi: Regenerate.
32293 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
32294 as an argument, moving assert of ad->disp == ad->disp_term to...
32295 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
32296 Try calling targetm.legitimize_address_displacement before expanding
32297 the address rather than afterwards, and adjust for the new interface.
32298 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
32299 Match the new hook interface. Handle SVE addresses.
32300 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
32301 new hook interface.
32302
32303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32304
32305 * Makefile.in (OBJS): Add early-remat.o.
32306 * target.def (select_early_remat_modes): New hook.
32307 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
32308 * doc/tm.texi: Regenerate.
32309 * targhooks.h (default_select_early_remat_modes): Declare.
32310 * targhooks.c (default_select_early_remat_modes): New function.
32311 * timevar.def (TV_EARLY_REMAT): New timevar.
32312 * passes.def (pass_early_remat): New pass.
32313 * tree-pass.h (make_pass_early_remat): Declare.
32314 * early-remat.c: New file.
32315 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
32316 function.
32317 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
32318
32319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32320 Alan Hayward <alan.hayward@arm.com>
32321 David Sherwood <david.sherwood@arm.com>
32322
32323 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
32324 vfm1 with a bound_epilog parameter.
32325 (vect_do_peeling): Update calls accordingly, and move the prologue
32326 call earlier in the function. Treat the base bound_epilog as 0 for
32327 fully-masked loops and retain vf - 1 for other loops. Add 1 to
32328 this base when peeling for gaps.
32329 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
32330 with fully-masked loops.
32331 (vect_estimate_min_profitable_iters): Handle the single peeled
32332 iteration in that case.
32333
32334 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32335 Alan Hayward <alan.hayward@arm.com>
32336 David Sherwood <david.sherwood@arm.com>
32337
32338 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
32339 single-element interleaving even if the size is not a power of 2.
32340 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
32341 accesses for single-element interleaving if the group size is
32342 not a power of 2.
32343
32344 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32345 Alan Hayward <alan.hayward@arm.com>
32346 David Sherwood <david.sherwood@arm.com>
32347
32348 * doc/md.texi (fold_extract_last_@var{m}): Document.
32349 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
32350 * optabs.def (fold_extract_last_optab): New optab.
32351 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
32352 * internal-fn.c (fold_extract_direct): New macro.
32353 (expand_fold_extract_optab_fn): Likewise.
32354 (direct_fold_extract_optab_supported_p): Likewise.
32355 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
32356 * tree-vect-loop.c (vect_model_reduction_cost): Handle
32357 EXTRACT_LAST_REDUCTION.
32358 (get_initial_def_for_reduction): Do not create an initial vector
32359 for EXTRACT_LAST_REDUCTION reductions.
32360 (vectorizable_reduction): Leave the scalar phi in place for
32361 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
32362 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
32363 epilogue code for EXTRACT_LAST_REDUCTION and defer the
32364 transform phase to vectorizable_condition.
32365 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
32366 split out from...
32367 (vect_finish_stmt_generation): ...here.
32368 (vect_finish_replace_stmt): New function.
32369 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
32370 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
32371 pattern.
32372 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
32373
32374 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32375 Alan Hayward <alan.hayward@arm.com>
32376 David Sherwood <david.sherwood@arm.com>
32377
32378 * doc/md.texi (extract_last_@var{m}): Document.
32379 * optabs.def (extract_last_optab): New optab.
32380 * internal-fn.def (EXTRACT_LAST): New internal function.
32381 * internal-fn.c (cond_unary_direct): New macro.
32382 (expand_cond_unary_optab_fn): Likewise.
32383 (direct_cond_unary_optab_supported_p): Likewise.
32384 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
32385 loops using EXTRACT_LAST.
32386 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
32387 (extract_last_<mode>): ...this optab.
32388 (vec_extract<mode><Vel>): Update accordingly.
32389
32390 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32391 Alan Hayward <alan.hayward@arm.com>
32392 David Sherwood <david.sherwood@arm.com>
32393
32394 * target.def (empty_mask_is_expensive): New hook.
32395 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
32396 * doc/tm.texi: Regenerate.
32397 * targhooks.h (default_empty_mask_is_expensive): Declare.
32398 * targhooks.c (default_empty_mask_is_expensive): New function.
32399 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
32400 if the target says that empty masks are expensive.
32401 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
32402 New function.
32403 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
32404
32405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32406 Alan Hayward <alan.hayward@arm.com>
32407 David Sherwood <david.sherwood@arm.com>
32408
32409 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
32410 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
32411 (vect_use_loop_mask_for_alignment_p): New function.
32412 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
32413 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
32414 niters_skip argument. Make sure that the first niters_skip elements
32415 of the first iteration are inactive.
32416 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
32417 Update call to vect_set_loop_masks_directly.
32418 (get_misalign_in_elems): New function, split out from...
32419 (vect_gen_prolog_loop_niters): ...here.
32420 (vect_update_init_of_dr): Take a code argument that specifies whether
32421 the adjustment should be added or subtracted.
32422 (vect_update_init_of_drs): Likewise.
32423 (vect_prepare_for_masked_peels): New function.
32424 (vect_do_peeling): Skip prologue peeling if we're using a mask
32425 instead. Update call to vect_update_inits_of_drs.
32426 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32427 mask_skip_niters.
32428 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
32429 alignment. Do not include the number of peeled iterations in
32430 the minimum threshold in that case.
32431 (vectorizable_induction): Adjust the start value down by
32432 LOOP_VINFO_MASK_SKIP_NITERS iterations.
32433 (vect_transform_loop): Call vect_prepare_for_masked_peels.
32434 Take the number of skipped iterations into account when calculating
32435 the loop bounds.
32436 * tree-vect-stmts.c (vect_gen_while_not): New function.
32437
32438 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32439 Alan Hayward <alan.hayward@arm.com>
32440 David Sherwood <david.sherwood@arm.com>
32441
32442 * doc/sourcebuild.texi (vect_fully_masked): Document.
32443 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
32444 default value to 0.
32445 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
32446 split out from...
32447 (vect_analyze_loop_2): ...here. Don't check the vectorization
32448 factor against the number of loop iterations if the loop is
32449 fully-masked.
32450
32451 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32452 Alan Hayward <alan.hayward@arm.com>
32453 David Sherwood <david.sherwood@arm.com>
32454
32455 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
32456 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
32457 (dump_groups): Update accordingly.
32458 (iv_use::mem_type): New member variable.
32459 (address_p): New function.
32460 (record_use): Add a mem_type argument and initialize the new
32461 mem_type field.
32462 (record_group_use): Add a mem_type argument. Use address_p.
32463 Remove obsolete null checks of base_object. Update call to record_use.
32464 (find_interesting_uses_op): Update call to record_group_use.
32465 (find_interesting_uses_cond): Likewise.
32466 (find_interesting_uses_address): Likewise.
32467 (get_mem_type_for_internal_fn): New function.
32468 (find_address_like_use): Likewise.
32469 (find_interesting_uses_stmt): Try find_address_like_use before
32470 calling find_interesting_uses_op.
32471 (addr_offset_valid_p): Use the iv mem_type field as the type
32472 of the addressed memory.
32473 (add_autoinc_candidates): Likewise.
32474 (get_address_cost): Likewise.
32475 (split_small_address_groups_p): Use address_p.
32476 (split_address_groups): Likewise.
32477 (add_iv_candidate_for_use): Likewise.
32478 (autoinc_possible_for_pair): Likewise.
32479 (rewrite_groups): Likewise.
32480 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
32481 (determine_group_iv_cost): Update after split of USE_ADDRESS.
32482 (get_alias_ptr_type_for_ptr_address): New function.
32483 (rewrite_use_address): Rewrite address uses in calls that were
32484 identified by find_address_like_use.
32485
32486 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32487 Alan Hayward <alan.hayward@arm.com>
32488 David Sherwood <david.sherwood@arm.com>
32489
32490 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
32491 TARGET_MEM_REFs.
32492 * gimple-expr.h (is_gimple_addressable: Likewise.
32493 * gimple-expr.c (is_gimple_address): Likewise.
32494 * internal-fn.c (expand_call_mem_ref): New function.
32495 (expand_mask_load_optab_fn): Use it.
32496 (expand_mask_store_optab_fn): Likewise.
32497
32498 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32499 Alan Hayward <alan.hayward@arm.com>
32500 David Sherwood <david.sherwood@arm.com>
32501
32502 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
32503 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
32504 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
32505 (cond_umax@var{mode}): Document.
32506 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
32507 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
32508 (cond_umin_optab, cond_umax_optab): New optabs.
32509 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
32510 (COND_IOR, COND_XOR): New internal functions.
32511 * internal-fn.h (get_conditional_internal_fn): Declare.
32512 * internal-fn.c (cond_binary_direct): New macro.
32513 (expand_cond_binary_optab_fn): Likewise.
32514 (direct_cond_binary_optab_supported_p): Likewise.
32515 (get_conditional_internal_fn): New function.
32516 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
32517 Cope with reduction statements that are vectorized as calls rather
32518 than assignments.
32519 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
32520 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
32521 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
32522 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
32523 (UNSPEC_COND_EOR): New unspecs.
32524 (optab): Add mappings for them.
32525 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
32526 (sve_int_op, sve_fp_op): New int attributes.
32527
32528 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32529 Alan Hayward <alan.hayward@arm.com>
32530 David Sherwood <david.sherwood@arm.com>
32531
32532 * optabs.def (while_ult_optab): New optab.
32533 * doc/md.texi (while_ult@var{m}@var{n}): Document.
32534 * internal-fn.def (WHILE_ULT): New internal function.
32535 * internal-fn.h (direct_internal_fn_supported_p): New override
32536 that takes two types as argument.
32537 * internal-fn.c (while_direct): New macro.
32538 (expand_while_optab_fn): New function.
32539 (convert_optab_supported_p): Likewise.
32540 (direct_while_optab_supported_p): New macro.
32541 * wide-int.h (wi::udiv_ceil): New function.
32542 * tree-vectorizer.h (rgroup_masks): New structure.
32543 (vec_loop_masks): New typedef.
32544 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
32545 and fully_masked_p.
32546 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
32547 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
32548 (vect_max_vf): New function.
32549 (slpeel_make_loop_iterate_ntimes): Delete.
32550 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
32551 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
32552 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
32553 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
32554 internal-fn.h, stor-layout.h and optabs-query.h.
32555 (vect_set_loop_mask): New function.
32556 (add_preheader_seq): Likewise.
32557 (add_header_seq): Likewise.
32558 (interleave_supported_p): Likewise.
32559 (vect_maybe_permute_loop_masks): Likewise.
32560 (vect_set_loop_masks_directly): Likewise.
32561 (vect_set_loop_condition_masked): Likewise.
32562 (vect_set_loop_condition_unmasked): New function, split out from
32563 slpeel_make_loop_iterate_ntimes.
32564 (slpeel_make_loop_iterate_ntimes): Rename to..
32565 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
32566 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
32567 (vect_do_peeling): Update call accordingly.
32568 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
32569 loops.
32570 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32571 mask_compare_type, can_fully_mask_p and fully_masked_p.
32572 (release_vec_loop_masks): New function.
32573 (_loop_vec_info): Use it to free the loop masks.
32574 (can_produce_all_loop_masks_p): New function.
32575 (vect_get_max_nscalars_per_iter): Likewise.
32576 (vect_verify_full_masking): Likewise.
32577 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
32578 retries, and free the mask rgroups before retrying. Check loop-wide
32579 reasons for disallowing fully-masked loops. Make the final decision
32580 about whether use a fully-masked loop or not.
32581 (vect_estimate_min_profitable_iters): Do not assume that peeling
32582 for the number of iterations will be needed for fully-masked loops.
32583 (vectorizable_reduction): Disable fully-masked loops.
32584 (vectorizable_live_operation): Likewise.
32585 (vect_halve_mask_nunits): New function.
32586 (vect_double_mask_nunits): Likewise.
32587 (vect_record_loop_mask): Likewise.
32588 (vect_get_loop_mask): Likewise.
32589 (vect_transform_loop): Handle the case in which the final loop
32590 iteration might handle a partial vector. Call vect_set_loop_condition
32591 instead of slpeel_make_loop_iterate_ntimes.
32592 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
32593 (check_load_store_masking): New function.
32594 (prepare_load_store_mask): Likewise.
32595 (vectorizable_store): Handle fully-masked loops.
32596 (vectorizable_load): Likewise.
32597 (supportable_widening_operation): Use vect_halve_mask_nunits for
32598 booleans.
32599 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
32600 (vect_gen_while): New function.
32601 * config/aarch64/aarch64.md (umax<mode>3): New expander.
32602 (aarch64_uqdec<mode>): New insn.
32603
32604 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32605 Alan Hayward <alan.hayward@arm.com>
32606 David Sherwood <david.sherwood@arm.com>
32607
32608 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
32609 (reduc_xor_scal_optab): New optabs.
32610 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
32611 (reduc_xor_scal_@var{m}): Document.
32612 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
32613 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
32614 internal functions.
32615 * fold-const-call.c (fold_const_call): Handle them.
32616 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
32617 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
32618 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
32619 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
32620 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
32621 (UNSPEC_XORV): New unspecs.
32622 (optab): Add entries for them.
32623 (BITWISEV): New int iterator.
32624 (bit_reduc_op): New int attributes.
32625
32626 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32627 Alan Hayward <alan.hayward@arm.com>
32628 David Sherwood <david.sherwood@arm.com>
32629
32630 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
32631 * internal-fn.def (VEC_SHL_INSERT): New internal function.
32632 * optabs.def (vec_shl_insert_optab): New optab.
32633 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
32634 (duplicate_and_interleave): Likewise.
32635 * tree-vect-loop.c: Include internal-fn.h.
32636 (neutral_op_for_slp_reduction): New function, split out from
32637 get_initial_defs_for_reduction.
32638 (get_initial_def_for_reduction): Handle option 2 for variable-length
32639 vectors by loading the neutral value into a vector and then shifting
32640 the initial value into element 0.
32641 (get_initial_defs_for_reduction): Replace the code argument with
32642 the neutral value calculated by neutral_op_for_slp_reduction.
32643 Use gimple_build_vector for constant-length vectors.
32644 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
32645 but the first group_size elements have a neutral value.
32646 Use duplicate_and_interleave otherwise.
32647 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
32648 Update call to get_initial_defs_for_reduction. Handle SLP
32649 reductions for variable-length vectors by creating one vector
32650 result for each scalar result, with the elements associated
32651 with other scalar results stubbed out with the neutral value.
32652 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
32653 Require IFN_VEC_SHL_INSERT for double reductions on
32654 variable-length vectors, or SLP reductions that have
32655 a neutral value. Require can_duplicate_and_interleave_p
32656 support for variable-length unchained SLP reductions if there
32657 is no neutral value, such as for MIN/MAX reductions. Also require
32658 the number of vector elements to be a multiple of the number of
32659 SLP statements when doing variable-length unchained SLP reductions.
32660 Update call to vect_create_epilog_for_reduction.
32661 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
32662 and remove initial values.
32663 (duplicate_and_interleave): Make public.
32664 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
32665 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
32666
32667 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32668 Alan Hayward <alan.hayward@arm.com>
32669 David Sherwood <david.sherwood@arm.com>
32670
32671 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
32672 (can_duplicate_and_interleave_p): New function.
32673 (vect_get_and_check_slp_defs): Take the vector of statements
32674 rather than just the current one. Remove excess parentheses.
32675 Restriction rejectinon of vect_constant_def and vect_external_def
32676 for variable-length vectors to boolean types, or types for which
32677 can_duplicate_and_interleave_p is false.
32678 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
32679 (duplicate_and_interleave): New function.
32680 (vect_get_constant_vectors): Use gimple_build_vector for
32681 constant-length vectors and suitable variable-length constant
32682 vectors. Use duplicate_and_interleave for other variable-length
32683 vectors. Don't defer the update when inserting new statements.
32684
32685 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32686 Alan Hayward <alan.hayward@arm.com>
32687 David Sherwood <david.sherwood@arm.com>
32688
32689 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
32690 min_profitable_iters doesn't go negative.
32691
32692 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32693 Alan Hayward <alan.hayward@arm.com>
32694 David Sherwood <david.sherwood@arm.com>
32695
32696 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
32697 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
32698 * optabs.def (vec_mask_load_lanes_optab): New optab.
32699 (vec_mask_store_lanes_optab): Likewise.
32700 * internal-fn.def (MASK_LOAD_LANES): New internal function.
32701 (MASK_STORE_LANES): Likewise.
32702 * internal-fn.c (mask_load_lanes_direct): New macro.
32703 (mask_store_lanes_direct): Likewise.
32704 (expand_mask_load_optab_fn): Handle masked operations.
32705 (expand_mask_load_lanes_optab_fn): New macro.
32706 (expand_mask_store_optab_fn): Handle masked operations.
32707 (expand_mask_store_lanes_optab_fn): New macro.
32708 (direct_mask_load_lanes_optab_supported_p): Likewise.
32709 (direct_mask_store_lanes_optab_supported_p): Likewise.
32710 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
32711 parameter.
32712 (vect_load_lanes_supported): Likewise.
32713 * tree-vect-data-refs.c (strip_conversion): New function.
32714 (can_group_stmts_p): Likewise.
32715 (vect_analyze_data_ref_accesses): Use it instead of checking
32716 for a pair of assignments.
32717 (vect_store_lanes_supported): Take a masked_p parameter.
32718 (vect_load_lanes_supported): Likewise.
32719 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
32720 vect_store_lanes_supported and vect_load_lanes_supported.
32721 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
32722 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
32723 parameter. Don't allow gaps for masked accesses.
32724 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
32725 and vect_load_lanes_supported.
32726 (get_load_store_type): Take a masked_p parameter and update
32727 call to get_group_load_store_type.
32728 (vectorizable_store): Update call to get_load_store_type.
32729 Handle IFN_MASK_STORE_LANES.
32730 (vectorizable_load): Update call to get_load_store_type.
32731 Handle IFN_MASK_LOAD_LANES.
32732
32733 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32734 Alan Hayward <alan.hayward@arm.com>
32735 David Sherwood <david.sherwood@arm.com>
32736
32737 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
32738 modes for SVE.
32739 * config/aarch64/aarch64-protos.h
32740 (aarch64_sve_struct_memory_operand_p): Declare.
32741 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
32742 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
32743 (VPRED, vpred): Handle SVE structure modes.
32744 * config/aarch64/constraints.md (Utx): New constraint.
32745 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
32746 (aarch64_sve_struct_nonimmediate_operand): New predicates.
32747 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
32748 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
32749 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
32750 structure modes. Split into pieces after RA.
32751 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
32752 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
32753 New patterns.
32754 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
32755 SVE structure modes.
32756 (aarch64_classify_address): Likewise.
32757 (sizetochar): Move earlier in file.
32758 (aarch64_print_operand): Handle SVE register lists.
32759 (aarch64_array_mode): New function.
32760 (aarch64_sve_struct_memory_operand_p): Likewise.
32761 (TARGET_ARRAY_MODE): Redefine.
32762
32763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32764 Alan Hayward <alan.hayward@arm.com>
32765 David Sherwood <david.sherwood@arm.com>
32766
32767 * target.def (array_mode): New target hook.
32768 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
32769 * doc/tm.texi: Regenerate.
32770 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
32771 * hooks.c (hook_optmode_mode_uhwi_none): New function.
32772 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
32773 targetm.array_mode.
32774 * stor-layout.c (mode_for_array): Likewise. Support polynomial
32775 type sizes.
32776
32777 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32778 Alan Hayward <alan.hayward@arm.com>
32779 David Sherwood <david.sherwood@arm.com>
32780
32781 * fold-const.c (fold_binary_loc): Check the argument types
32782 rather than the result type when testing for a vector operation.
32783
32784 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32785
32786 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
32787 * doc/tm.texi: Regenerate.
32788
32789 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32790 Alan Hayward <alan.hayward@arm.com>
32791 David Sherwood <david.sherwood@arm.com>
32792
32793 * doc/invoke.texi (-msve-vector-bits=): Document new option.
32794 (sve): Document new AArch64 extension.
32795 * doc/md.texi (w): Extend the description of the AArch64
32796 constraint to include SVE vectors.
32797 (Upl, Upa): Document new AArch64 predicate constraints.
32798 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
32799 enum.
32800 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
32801 (msve-vector-bits=): New option.
32802 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
32803 SVE when these are disabled.
32804 (sve): New extension.
32805 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
32806 modes. Adjust their number of units based on aarch64_sve_vg.
32807 (MAX_BITSIZE_MODE_ANY_MODE): Define.
32808 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
32809 aarch64_addr_query_type.
32810 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
32811 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
32812 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
32813 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
32814 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
32815 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
32816 (aarch64_simd_imm_zero_p): Delete.
32817 (aarch64_check_zero_based_sve_index_immediate): Declare.
32818 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32819 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32820 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32821 (aarch64_sve_float_mul_immediate_p): Likewise.
32822 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32823 rather than an rtx.
32824 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
32825 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
32826 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
32827 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
32828 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
32829 (aarch64_regmode_natural_size): Likewise.
32830 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
32831 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
32832 left one place.
32833 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
32834 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
32835 for VG and the SVE predicate registers.
32836 (V_ALIASES): Add a "z"-prefixed alias.
32837 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
32838 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
32839 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
32840 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
32841 (REG_CLASS_NAMES): Add entries for them.
32842 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
32843 and the predicate registers.
32844 (aarch64_sve_vg): Declare.
32845 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
32846 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
32847 (REGMODE_NATURAL_SIZE): Define.
32848 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
32849 SVE macros.
32850 * config/aarch64/aarch64.c: Include cfgrtl.h.
32851 (simd_immediate_info): Add a constructor for series vectors,
32852 and an associated step field.
32853 (aarch64_sve_vg): New variable.
32854 (aarch64_dbx_register_number): Handle VG and the predicate registers.
32855 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
32856 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
32857 (VEC_ANY_DATA, VEC_STRUCT): New constants.
32858 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
32859 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
32860 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
32861 (aarch64_get_mask_mode): New functions.
32862 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
32863 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
32864 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
32865 predicate modes and predicate registers. Explicitly restrict
32866 GPRs to modes of 16 bytes or smaller. Only allow FP registers
32867 to store a vector mode if it is recognized by
32868 aarch64_classify_vector_mode.
32869 (aarch64_regmode_natural_size): New function.
32870 (aarch64_hard_regno_caller_save_mode): Return the original mode
32871 for predicates.
32872 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
32873 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
32874 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
32875 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
32876 functions.
32877 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
32878 does not overlap dest if the function is frame-related. Handle
32879 SVE constants.
32880 (aarch64_split_add_offset): New function.
32881 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
32882 them aarch64_add_offset.
32883 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
32884 and update call to aarch64_sub_sp.
32885 (aarch64_add_cfa_expression): New function.
32886 (aarch64_expand_prologue): Pass extra temporary registers to the
32887 functions above. Handle the case in which we need to emit new
32888 DW_CFA_expressions for registers that were originally saved
32889 relative to the stack pointer, but now have to be expressed
32890 relative to the frame pointer.
32891 (aarch64_output_mi_thunk): Pass extra temporary registers to the
32892 functions above.
32893 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
32894 IP0 and IP1 values for SVE frames.
32895 (aarch64_expand_vec_series): New function.
32896 (aarch64_expand_sve_widened_duplicate): Likewise.
32897 (aarch64_expand_sve_const_vector): Likewise.
32898 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
32899 Handle SVE constants. Use emit_move_insn to move a force_const_mem
32900 into the register, rather than emitting a SET directly.
32901 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
32902 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
32903 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
32904 (offset_9bit_signed_scaled_p): New functions.
32905 (aarch64_replicate_bitmask_imm): New function.
32906 (aarch64_bitmask_imm): Use it.
32907 (aarch64_cannot_force_const_mem): Reject expressions involving
32908 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
32909 (aarch64_classify_index): Handle SVE indices, by requiring
32910 a plain register index with a scale that matches the element size.
32911 (aarch64_classify_address): Handle SVE addresses. Assert that
32912 the mode of the address is VOIDmode or an integer mode.
32913 Update call to aarch64_classify_symbol.
32914 (aarch64_classify_symbolic_expression): Update call to
32915 aarch64_classify_symbol.
32916 (aarch64_const_vec_all_in_range_p): New function.
32917 (aarch64_print_vector_float_operand): Likewise.
32918 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
32919 "vN" for FP registers with SVE modes. Handle (const ...) vectors
32920 and the FP immediates 1.0 and 0.5.
32921 (aarch64_print_address_internal): Handle SVE addresses.
32922 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
32923 (aarch64_regno_regclass): Handle predicate registers.
32924 (aarch64_secondary_reload): Handle big-endian reloads of SVE
32925 data modes.
32926 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
32927 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
32928 (aarch64_convert_sve_vector_bits): New function.
32929 (aarch64_override_options): Use it to handle -msve-vector-bits=.
32930 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32931 rather than an rtx.
32932 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
32933 Handle SVE vector and predicate modes. Accept VL-based constants
32934 that need only one temporary register, and VL offsets that require
32935 no temporary registers.
32936 (aarch64_conditional_register_usage): Mark the predicate registers
32937 as fixed if SVE isn't available.
32938 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
32939 Return true for SVE vector and predicate modes.
32940 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
32941 rather than an unsigned int. Handle SVE modes.
32942 (aarch64_preferred_simd_mode): Update call accordingly. Handle
32943 SVE modes.
32944 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
32945 if SVE is enabled.
32946 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32947 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32948 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32949 (aarch64_sve_float_mul_immediate_p): New functions.
32950 (aarch64_sve_valid_immediate): New function.
32951 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
32952 Explicitly reject structure modes. Check for INDEX constants.
32953 Handle PTRUE and PFALSE constants.
32954 (aarch64_check_zero_based_sve_index_immediate): New function.
32955 (aarch64_simd_imm_zero_p): Delete.
32956 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
32957 vector modes. Accept constants in the range of CNT[BHWD].
32958 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
32959 ask for an Advanced SIMD mode.
32960 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
32961 (aarch64_simd_vector_alignment): Handle SVE predicates.
32962 (aarch64_vectorize_preferred_vector_alignment): New function.
32963 (aarch64_simd_vector_alignment_reachable): Use it instead of
32964 the vector size.
32965 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
32966 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
32967 functions.
32968 (MAX_VECT_LEN): Delete.
32969 (expand_vec_perm_d): Add a vec_flags field.
32970 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
32971 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
32972 (aarch64_evpc_ext): Don't apply a big-endian lane correction
32973 for SVE modes.
32974 (aarch64_evpc_rev): Rename to...
32975 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
32976 (aarch64_evpc_rev_global): New function.
32977 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
32978 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
32979 MAX_VECT_LEN.
32980 (aarch64_evpc_sve_tbl): New function.
32981 (aarch64_expand_vec_perm_const_1): Update after rename of
32982 aarch64_evpc_rev. Handle SVE permutes too, trying
32983 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
32984 than aarch64_evpc_tbl.
32985 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
32986 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
32987 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
32988 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
32989 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
32990 (aarch64_expand_sve_vcond): New functions.
32991 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
32992 of aarch64_vector_mode_p.
32993 (aarch64_dwarf_poly_indeterminate_value): New function.
32994 (aarch64_compute_pressure_classes): Likewise.
32995 (aarch64_can_change_mode_class): Likewise.
32996 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
32997 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
32998 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
32999 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
33000 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
33001 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
33002 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
33003 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
33004 constraints.
33005 (Dn, Dl, Dr): Accept const as well as const_vector.
33006 (Dz): Likewise. Compare against CONST0_RTX.
33007 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
33008 of "vector" where appropriate.
33009 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
33010 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
33011 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
33012 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
33013 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
33014 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
33015 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
33016 (v_int_equiv): Extend to SVE modes.
33017 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
33018 mode attributes.
33019 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
33020 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
33021 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
33022 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
33023 (SVE_COND_FP_CMP): New int iterators.
33024 (perm_hilo): Handle the new unpack unspecs.
33025 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
33026 attributes.
33027 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
33028 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
33029 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
33030 (aarch64_equality_operator, aarch64_constant_vector_operand)
33031 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
33032 (aarch64_sve_nonimmediate_operand): Likewise.
33033 (aarch64_sve_general_operand): Likewise.
33034 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
33035 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
33036 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
33037 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
33038 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
33039 (aarch64_sve_float_arith_immediate): Likewise.
33040 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
33041 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
33042 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
33043 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
33044 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
33045 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
33046 (aarch64_sve_float_arith_operand): Likewise.
33047 (aarch64_sve_float_arith_with_sub_operand): Likewise.
33048 (aarch64_sve_float_mul_operand): Likewise.
33049 (aarch64_sve_vec_perm_operand): Likewise.
33050 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
33051 (aarch64_mov_operand): Accept const_poly_int and const_vector.
33052 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
33053 as well as const_vector.
33054 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
33055 in file. Use CONST0_RTX and CONSTM1_RTX.
33056 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
33057 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
33058 Use aarch64_simd_imm_zero.
33059 * config/aarch64/aarch64-sve.md: New file.
33060 * config/aarch64/aarch64.md: Include it.
33061 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
33062 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
33063 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
33064 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
33065 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
33066 (sve): New attribute.
33067 (enabled): Disable instructions with the sve attribute unless
33068 TARGET_SVE.
33069 (movqi, movhi): Pass CONST_POLY_INT operaneds through
33070 aarch64_expand_mov_immediate.
33071 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
33072 CNT[BHSD] immediates.
33073 (movti): Split CONST_POLY_INT moves into two halves.
33074 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
33075 Split additions that need a temporary here if the destination
33076 is the stack pointer.
33077 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
33078 (*add<mode>3_poly_1): New instruction.
33079 (set_clobber_cc): New expander.
33080
33081 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
33082
33083 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
33084 parameter and use it instead of GET_MODE_SIZE (innermode). Use
33085 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
33086 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
33087 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
33088 Change innermode from fixed_mode_size to machine_mode.
33089 (simplify_subreg): Update call accordingly. Handle a constant-sized
33090 subreg of a variable-length CONST_VECTOR.
33091
33092 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
33093 Alan Hayward <alan.hayward@arm.com>
33094 David Sherwood <david.sherwood@arm.com>
33095
33096 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
33097 (add_offset_to_base): New function, split out from...
33098 (create_mem_ref): ...here. When handling a scale other than 1,
33099 check first whether the address is valid without the offset.
33100 Add it into the base if so, leaving the index and scale as-is.
33101
33102 2018-01-12 Jakub Jelinek <jakub@redhat.com>
33103
33104 PR c++/83778
33105 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
33106 fold_for_warn before checking if arg2 is INTEGER_CST.
33107
33108 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
33109
33110 * config/rs6000/predicates.md (load_multiple_operation): Delete.
33111 (store_multiple_operation): Delete.
33112 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
33113 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
33114 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
33115 guarded by TARGET_STRING.
33116 (rs6000_output_load_multiple): Delete.
33117 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
33118 OPTION_MASK_STRING / TARGET_STRING handling.
33119 (print_operand) <'N', 'O'>: Add comment that these are unused now.
33120 (const rs6000_opt_masks) <"string">: Change mask to 0.
33121 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
33122 (MASK_STRING): Delete.
33123 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
33124 parts. Simplify.
33125 (load_multiple): Delete.
33126 (*ldmsi8): Delete.
33127 (*ldmsi7): Delete.
33128 (*ldmsi6): Delete.
33129 (*ldmsi5): Delete.
33130 (*ldmsi4): Delete.
33131 (*ldmsi3): Delete.
33132 (store_multiple): Delete.
33133 (*stmsi8): Delete.
33134 (*stmsi7): Delete.
33135 (*stmsi6): Delete.
33136 (*stmsi5): Delete.
33137 (*stmsi4): Delete.
33138 (*stmsi3): Delete.
33139 (movmemsi_8reg): Delete.
33140 (corresponding unnamed define_insn): Delete.
33141 (movmemsi_6reg): Delete.
33142 (corresponding unnamed define_insn): Delete.
33143 (movmemsi_4reg): Delete.
33144 (corresponding unnamed define_insn): Delete.
33145 (movmemsi_2reg): Delete.
33146 (corresponding unnamed define_insn): Delete.
33147 (movmemsi_1reg): Delete.
33148 (corresponding unnamed define_insn): Delete.
33149 * config/rs6000/rs6000.opt (mno-string): New.
33150 (mstring): Replace by deprecation warning stub.
33151 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
33152
33153 2018-01-12 Jakub Jelinek <jakub@redhat.com>
33154
33155 * regrename.c (regrename_do_replace): If replacing the same
33156 reg multiple times, try to reuse last created gen_raw_REG.
33157
33158 PR debug/81155
33159 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
33160 main to workaround a bug in GDB.
33161
33162 2018-01-12 Tom de Vries <tom@codesourcery.com>
33163
33164 PR target/83737
33165 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
33166
33167 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
33168
33169 PR rtl-optimization/80481
33170 * ira-color.c (get_cap_member): New function.
33171 (allocnos_conflict_by_live_ranges_p): Use it.
33172 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
33173 (setup_slot_coalesced_allocno_live_ranges): Ditto.
33174
33175 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
33176
33177 PR target/83628
33178 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
33179 (*saddl_se_1): Ditto.
33180 (*ssubsi_1): Ditto.
33181 (*ssubl_se_1): Ditto.
33182
33183 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33184
33185 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
33186 rather than wi::to_widest for DR_INITs.
33187 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
33188 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
33189 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
33190 INTEGER_CSTs.
33191 (vect_analyze_group_access_1): Note that here.
33192
33193 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33194
33195 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
33196 polynomial type sizes.
33197
33198 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33199
33200 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
33201 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
33202 (gimple_add_tmp_var): Likewise.
33203
33204 2018-01-12 Martin Liska <mliska@suse.cz>
33205
33206 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
33207 (gimple_alloc_sizes): Likewise.
33208 (dump_gimple_statistics): Use PRIu64 in printf format.
33209 * gimple.h: Change uint64_t to int.
33210
33211 2018-01-12 Martin Liska <mliska@suse.cz>
33212
33213 * tree-core.h: Use uint64_t instead of int.
33214 * tree.c (tree_node_counts): Likewise.
33215 (tree_node_sizes): Likewise.
33216 (dump_tree_statistics): Use PRIu64 in printf format.
33217
33218 2018-01-12 Martin Liska <mliska@suse.cz>
33219
33220 * Makefile.in: As qsort_chk is implemented in vec.c, add
33221 vec.o to linkage of gencfn-macros.
33222 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
33223 passing the info to record_node_allocation_statistics.
33224 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
33225 and pass the info.
33226 * ggc-common.c (struct ggc_usage): Add operator== and use
33227 it in operator< and compare function.
33228 * mem-stats.h (struct mem_usage): Likewise.
33229 * vec.c (struct vec_usage): Remove operator< and compare
33230 function. Can be simply inherited.
33231
33232 2018-01-12 Martin Jambor <mjambor@suse.cz>
33233
33234 PR target/81616
33235 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
33236 * tree-ssa-math-opts.c: Include domwalk.h.
33237 (convert_mult_to_fma_1): New function.
33238 (fma_transformation_info): New type.
33239 (fma_deferring_state): Likewise.
33240 (cancel_fma_deferring): New function.
33241 (result_of_phi): Likewise.
33242 (last_fma_candidate_feeds_initial_phi): Likewise.
33243 (convert_mult_to_fma): Added deferring logic, split actual
33244 transformation to convert_mult_to_fma_1.
33245 (math_opts_dom_walker): New type.
33246 (math_opts_dom_walker::after_dom_children): New method, body moved
33247 here from pass_optimize_widening_mul::execute, added deferring logic
33248 bits.
33249 (pass_optimize_widening_mul::execute): Moved most of code to
33250 math_opts_dom_walker::after_dom_children.
33251 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
33252 * config/i386/i386.c (ix86_option_override_internal): Added
33253 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
33254
33255 2018-01-12 Richard Biener <rguenther@suse.de>
33256
33257 PR debug/83157
33258 * dwarf2out.c (gen_variable_die): Do not reset old_die for
33259 inline instance vars.
33260
33261 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
33262
33263 PR target/81819
33264 * config/rx/rx.c (rx_is_restricted_memory_address):
33265 Handle SUBREG case.
33266
33267 2018-01-12 Richard Biener <rguenther@suse.de>
33268
33269 PR tree-optimization/80846
33270 * target.def (split_reduction): New target hook.
33271 * targhooks.c (default_split_reduction): New function.
33272 * targhooks.h (default_split_reduction): Declare.
33273 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
33274 target requests first reduce vectors by combining low and high
33275 parts.
33276 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
33277 (get_vectype_for_scalar_type_and_size): Export.
33278 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
33279 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
33280 * doc/tm.texi: Regenerate.
33281 * config/i386/i386.c (ix86_split_reduction): Implement
33282 TARGET_VECTORIZE_SPLIT_REDUCTION.
33283
33284 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33285
33286 PR target/83368
33287 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
33288 in PIC mode except for TARGET_VXWORKS_RTP.
33289 * config/sparc/sparc.c: Include cfgrtl.h.
33290 (TARGET_INIT_PIC_REG): Define.
33291 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
33292 (sparc_pic_register_p): New predicate.
33293 (sparc_legitimate_address_p): Use it.
33294 (sparc_legitimize_pic_address): Likewise.
33295 (sparc_delegitimize_address): Likewise.
33296 (sparc_mode_dependent_address_p): Likewise.
33297 (gen_load_pcrel_sym): Remove 4th parameter.
33298 (load_got_register): Adjust call to above. Remove obsolete stuff.
33299 (sparc_expand_prologue): Do not call load_got_register here.
33300 (sparc_flat_expand_prologue): Likewise.
33301 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
33302 (sparc_use_pseudo_pic_reg): New function.
33303 (sparc_init_pic_reg): Likewise.
33304 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
33305 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
33306
33307 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
33308
33309 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
33310 Add item for branch_cost.
33311
33312 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33313
33314 PR rtl-optimization/83565
33315 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
33316 not extend the result to a larger mode for rotate operations.
33317 (num_sign_bit_copies1): Likewise.
33318
33319 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
33320
33321 PR target/40411
33322 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
33323 -symbolic.
33324 Use values-Xc.o for -pedantic.
33325 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
33326
33327 2018-01-12 Martin Liska <mliska@suse.cz>
33328
33329 PR ipa/83054
33330 * ipa-devirt.c (final_warning_record::grow_type_warnings):
33331 New function.
33332 (possible_polymorphic_call_targets): Use it.
33333 (ipa_devirt): Likewise.
33334
33335 2018-01-12 Martin Liska <mliska@suse.cz>
33336
33337 * profile-count.h (enum profile_quality): Use 0 as invalid
33338 enum value of profile_quality.
33339
33340 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
33341
33342 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
33343 -mext-string options.
33344
33345 2018-01-12 Richard Biener <rguenther@suse.de>
33346
33347 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
33348 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
33349 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
33350 Likewise.
33351 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
33352
33353 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
33354
33355 * configure.ac (--with-long-double-format): Add support for the
33356 configuration option to change the default long double format on
33357 PowerPC systems.
33358 * config.gcc (powerpc*-linux*-*): Likewise.
33359 * configure: Regenerate.
33360 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
33361 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
33362 used without modification.
33363
33364 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
33365
33366 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
33367 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
33368 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
33369 MISC_BUILTIN_SPEC_BARRIER.
33370 (rs6000_init_builtins): Likewise.
33371 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
33372 enum value.
33373 (speculation_barrier): New define_insn.
33374 * doc/extend.texi: Document __builtin_speculation_barrier.
33375
33376 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33377
33378 PR target/83203
33379 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
33380 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
33381 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
33382 iterators.
33383 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
33384 integral modes instead of "ss" and "sd".
33385 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
33386 vectors with 32-bit and 64-bit elements.
33387 (vecdupssescalarmodesuffix): New mode attribute.
33388 (vec_dup<mode>): Use it.
33389
33390 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
33391
33392 PR target/83330
33393 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
33394 frame if argument is passed on stack.
33395
33396 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33397
33398 PR target/82682
33399 * ree.c (combine_reaching_defs): Optimize also
33400 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
33401 reg2=any_extend(exp); reg1=reg2;, formatting fix.
33402
33403 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33404
33405 PR middle-end/83189
33406 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
33407
33408 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33409
33410 PR middle-end/83718
33411 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
33412 after they are computed.
33413
33414 2018-01-11 Bin Cheng <bin.cheng@arm.com>
33415
33416 PR tree-optimization/83695
33417 * gimple-loop-linterchange.cc
33418 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
33419 reset cached scev information after interchange.
33420 (pass_linterchange::execute): Remove call to scev_reset_htab.
33421
33422 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33423
33424 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
33425 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
33426 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
33427 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
33428 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
33429 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
33430 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
33431 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
33432 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
33433 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
33434 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
33435 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
33436 (V_lane_reg): Likewise.
33437 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
33438 New define_expand.
33439 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
33440 (vfmal_lane_low<mode>_intrinsic,
33441 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
33442 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
33443 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
33444 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
33445 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
33446 vfmsl_lane_high<mode>_intrinsic): New define_insns.
33447
33448 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33449
33450 * config/arm/arm-cpus.in (fp16fml): New feature.
33451 (ALL_SIMD): Add fp16fml.
33452 (armv8.2-a): Add fp16fml as an option.
33453 (armv8.3-a): Likewise.
33454 (armv8.4-a): Add fp16fml as part of fp16.
33455 * config/arm/arm.h (TARGET_FP16FML): Define.
33456 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
33457 when appropriate.
33458 * config/arm/arm-modes.def (V2HF): Define.
33459 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
33460 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
33461 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
33462 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
33463 vfmsl_low, vfmsl_high): New set of builtins.
33464 * config/arm/iterators.md (PLUSMINUS): New code iterator.
33465 (vfml_op): New code attribute.
33466 (VFMLHALVES): New int iterator.
33467 (VFML, VFMLSEL): New mode attributes.
33468 (V_reg): Define mapping for V2HF.
33469 (V_hi, V_lo): New mode attributes.
33470 (VF_constraint): Likewise.
33471 (vfml_half, vfml_half_selector): New int attributes.
33472 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
33473 define_expand.
33474 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
33475 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
33476 New define_insn.
33477 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
33478 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
33479 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
33480 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
33481 documentation.
33482 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
33483 Document new effective target and option set.
33484
33485 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33486
33487 * config/arm/arm-cpus.in (armv8_4): New feature.
33488 (ARMv8_4a): New fgroup.
33489 (armv8.4-a): New arch.
33490 * config/arm/arm-tables.opt: Regenerate.
33491 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
33492 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
33493 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
33494 Add matching rules for -march=armv8.4-a and extensions.
33495 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
33496
33497 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
33498
33499 PR target/81821
33500 * config/rx/rx.md (BW): New mode attribute.
33501 (sync_lock_test_and_setsi): Add mode suffix to insn output.
33502
33503 2018-01-11 Richard Biener <rguenther@suse.de>
33504
33505 PR tree-optimization/83435
33506 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
33507 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
33508 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
33509
33510 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33511 Alan Hayward <alan.hayward@arm.com>
33512 David Sherwood <david.sherwood@arm.com>
33513
33514 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
33515 field.
33516 (aarch64_classify_address): Initialize it. Track polynomial offsets.
33517 (aarch64_print_address_internal): Use it to check for a zero offset.
33518
33519 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33520 Alan Hayward <alan.hayward@arm.com>
33521 David Sherwood <david.sherwood@arm.com>
33522
33523 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
33524 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
33525 Return a poly_int64 rather than a HOST_WIDE_INT.
33526 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
33527 rather than a HOST_WIDE_INT.
33528 * config/aarch64/aarch64.h (aarch64_frame): Protect with
33529 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
33530 hard_fp_offset, frame_size, initial_adjust, callee_offset and
33531 final_offset from HOST_WIDE_INT to poly_int64.
33532 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
33533 to_constant when getting the number of units in an Advanced SIMD
33534 mode.
33535 (aarch64_builtin_vectorized_function): Check for a constant number
33536 of units.
33537 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
33538 GET_MODE_SIZE.
33539 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
33540 attribute instead of GET_MODE_NUNITS.
33541 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
33542 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
33543 GET_MODE_SIZE for fixed-size registers.
33544 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
33545 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
33546 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
33547 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
33548 (aarch64_print_operand, aarch64_print_address_internal)
33549 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
33550 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
33551 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
33552 Handle polynomial GET_MODE_SIZE.
33553 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
33554 wider than SImode without modification.
33555 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
33556 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
33557 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
33558 passing and returning SVE modes.
33559 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
33560 rather than GEN_INT.
33561 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
33562 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
33563 (aarch64_allocate_and_probe_stack_space): Likewise.
33564 (aarch64_layout_frame): Cope with polynomial offsets.
33565 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
33566 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
33567 polynomial offsets.
33568 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
33569 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
33570 poly_int64 rather than a HOST_WIDE_INT.
33571 (aarch64_get_separate_components, aarch64_process_components)
33572 (aarch64_expand_prologue, aarch64_expand_epilogue)
33573 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
33574 (aarch64_anchor_offset): New function, split out from...
33575 (aarch64_legitimize_address): ...here.
33576 (aarch64_builtin_vectorization_cost): Handle polynomial
33577 TYPE_VECTOR_SUBPARTS.
33578 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
33579 GET_MODE_NUNITS.
33580 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
33581 number of elements from the PARALLEL rather than the mode.
33582 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
33583 rather than GET_MODE_BITSIZE.
33584 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
33585 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
33586 (aarch64_expand_vec_perm_const_1): Handle polynomial
33587 d->perm.length () and d->perm elements.
33588 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
33589 Apply to_constant to d->perm elements.
33590 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
33591 polynomial CONST_VECTOR_NUNITS.
33592 (aarch64_move_pointer): Take amount as a poly_int64 rather
33593 than an int.
33594 (aarch64_progress_pointer): Avoid temporary variable.
33595 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
33596 the mode attribute instead of GET_MODE.
33597
33598 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33599 Alan Hayward <alan.hayward@arm.com>
33600 David Sherwood <david.sherwood@arm.com>
33601
33602 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
33603 x exists before using it.
33604 (aarch64_add_constant_internal): Rename to...
33605 (aarch64_add_offset_1): ...this. Replace regnum with separate
33606 src and dest rtxes. Handle the case in which they're different,
33607 including when the offset is zero. Replace scratchreg with an rtx.
33608 Use 2 additions if there is no spare register into which we can
33609 move a 16-bit constant.
33610 (aarch64_add_constant): Delete.
33611 (aarch64_add_offset): Replace reg with separate src and dest
33612 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
33613 Use aarch64_add_offset_1.
33614 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
33615 an rtx rather than an int. Take the delta as a poly_int64
33616 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
33617 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
33618 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
33619 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
33620 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
33621 and aarch64_add_sp.
33622 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
33623 aarch64_add_constant.
33624
33625 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33626
33627 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
33628 Use scalar_float_mode.
33629
33630 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33631
33632 * config/aarch64/aarch64-simd.md
33633 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
33634 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
33635 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
33636 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
33637 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
33638 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
33639 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
33640 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
33641 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
33642 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
33643
33644 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33645
33646 PR target/83514
33647 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
33648 targ_options->x_arm_arch_string is non NULL.
33649
33650 2018-01-11 Tamar Christina <tamar.christina@arm.com>
33651
33652 * config/aarch64/aarch64.h
33653 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
33654
33655 2018-01-11 Sudakshina Das <sudi.das@arm.com>
33656
33657 PR target/82096
33658 * expmed.c (emit_store_flag_force): Swap if const op0
33659 and change VOIDmode to mode of op0.
33660
33661 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33662
33663 PR rtl-optimization/83761
33664 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
33665 than bytes to mode_for_size.
33666
33667 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33668
33669 PR middle-end/83189
33670 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
33671 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
33672 profile.
33673
33674 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33675
33676 PR middle-end/83575
33677 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
33678 when in layout mode.
33679 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
33680 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
33681 partition fixup.
33682
33683 2018-01-10 Michael Collison <michael.collison@arm.com>
33684
33685 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
33686 * config/aarch64/aarch64-option-extension.def: Add
33687 AARCH64_OPT_EXTENSION of 'fp16fml'.
33688 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33689 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
33690 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
33691 * config/aarch64/constraints.md (Ui7): New constraint.
33692 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
33693 (VFMLA_SEL_W): Ditto.
33694 (f16quad): Ditto.
33695 (f16mac1): Ditto.
33696 (VFMLA16_LOW): New int iterator.
33697 (VFMLA16_HIGH): Ditto.
33698 (UNSPEC_FMLAL): New unspec.
33699 (UNSPEC_FMLSL): Ditto.
33700 (UNSPEC_FMLAL2): Ditto.
33701 (UNSPEC_FMLSL2): Ditto.
33702 (f16mac): New code attribute.
33703 * config/aarch64/aarch64-simd-builtins.def
33704 (aarch64_fmlal_lowv2sf): Ditto.
33705 (aarch64_fmlsl_lowv2sf): Ditto.
33706 (aarch64_fmlalq_lowv4sf): Ditto.
33707 (aarch64_fmlslq_lowv4sf): Ditto.
33708 (aarch64_fmlal_highv2sf): Ditto.
33709 (aarch64_fmlsl_highv2sf): Ditto.
33710 (aarch64_fmlalq_highv4sf): Ditto.
33711 (aarch64_fmlslq_highv4sf): Ditto.
33712 (aarch64_fmlal_lane_lowv2sf): Ditto.
33713 (aarch64_fmlsl_lane_lowv2sf): Ditto.
33714 (aarch64_fmlal_laneq_lowv2sf): Ditto.
33715 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
33716 (aarch64_fmlalq_lane_lowv4sf): Ditto.
33717 (aarch64_fmlsl_lane_lowv4sf): Ditto.
33718 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
33719 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
33720 (aarch64_fmlal_lane_highv2sf): Ditto.
33721 (aarch64_fmlsl_lane_highv2sf): Ditto.
33722 (aarch64_fmlal_laneq_highv2sf): Ditto.
33723 (aarch64_fmlsl_laneq_highv2sf): Ditto.
33724 (aarch64_fmlalq_lane_highv4sf): Ditto.
33725 (aarch64_fmlsl_lane_highv4sf): Ditto.
33726 (aarch64_fmlalq_laneq_highv4sf): Ditto.
33727 (aarch64_fmlsl_laneq_highv4sf): Ditto.
33728 * config/aarch64/aarch64-simd.md:
33729 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
33730 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33731 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
33732 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33733 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
33734 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
33735 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
33736 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
33737 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
33738 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
33739 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
33740 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
33741 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
33742 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
33743 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
33744 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
33745 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
33746 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
33747 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
33748 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
33749 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
33750 (vfmlsl_low_u32): Ditto.
33751 (vfmlalq_low_u32): Ditto.
33752 (vfmlslq_low_u32): Ditto.
33753 (vfmlal_high_u32): Ditto.
33754 (vfmlsl_high_u32): Ditto.
33755 (vfmlalq_high_u32): Ditto.
33756 (vfmlslq_high_u32): Ditto.
33757 (vfmlal_lane_low_u32): Ditto.
33758 (vfmlsl_lane_low_u32): Ditto.
33759 (vfmlal_laneq_low_u32): Ditto.
33760 (vfmlsl_laneq_low_u32): Ditto.
33761 (vfmlalq_lane_low_u32): Ditto.
33762 (vfmlslq_lane_low_u32): Ditto.
33763 (vfmlalq_laneq_low_u32): Ditto.
33764 (vfmlslq_laneq_low_u32): Ditto.
33765 (vfmlal_lane_high_u32): Ditto.
33766 (vfmlsl_lane_high_u32): Ditto.
33767 (vfmlal_laneq_high_u32): Ditto.
33768 (vfmlsl_laneq_high_u32): Ditto.
33769 (vfmlalq_lane_high_u32): Ditto.
33770 (vfmlslq_lane_high_u32): Ditto.
33771 (vfmlalq_laneq_high_u32): Ditto.
33772 (vfmlslq_laneq_high_u32): Ditto.
33773 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
33774 (AARCH64_FL_FOR_ARCH8_4): New.
33775 (AARCH64_ISA_F16FML): New ISA flag.
33776 (TARGET_F16FML): New feature flag for fp16fml.
33777 (doc/invoke.texi): Document new fp16fml option.
33778
33779 2018-01-10 Michael Collison <michael.collison@arm.com>
33780
33781 * config/aarch64/aarch64-builtins.c:
33782 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
33783 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33784 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
33785 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
33786 (AARCH64_ISA_SHA3): New ISA flag.
33787 (TARGET_SHA3): New feature flag for sha3.
33788 * config/aarch64/iterators.md (sha512_op): New int attribute.
33789 (CRYPTO_SHA512): New int iterator.
33790 (UNSPEC_SHA512H): New unspec.
33791 (UNSPEC_SHA512H2): Ditto.
33792 (UNSPEC_SHA512SU0): Ditto.
33793 (UNSPEC_SHA512SU1): Ditto.
33794 * config/aarch64/aarch64-simd-builtins.def
33795 (aarch64_crypto_sha512hqv2di): New builtin.
33796 (aarch64_crypto_sha512h2qv2di): Ditto.
33797 (aarch64_crypto_sha512su0qv2di): Ditto.
33798 (aarch64_crypto_sha512su1qv2di): Ditto.
33799 (aarch64_eor3qv8hi): Ditto.
33800 (aarch64_rax1qv2di): Ditto.
33801 (aarch64_xarqv2di): Ditto.
33802 (aarch64_bcaxqv8hi): Ditto.
33803 * config/aarch64/aarch64-simd.md:
33804 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
33805 (aarch64_crypto_sha512su0qv2di): Ditto.
33806 (aarch64_crypto_sha512su1qv2di): Ditto.
33807 (aarch64_eor3qv8hi): Ditto.
33808 (aarch64_rax1qv2di): Ditto.
33809 (aarch64_xarqv2di): Ditto.
33810 (aarch64_bcaxqv8hi): Ditto.
33811 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
33812 (vsha512h2q_u64): Ditto.
33813 (vsha512su0q_u64): Ditto.
33814 (vsha512su1q_u64): Ditto.
33815 (veor3q_u16): Ditto.
33816 (vrax1q_u64): Ditto.
33817 (vxarq_u64): Ditto.
33818 (vbcaxq_u16): Ditto.
33819 * config/arm/types.md (crypto_sha512): New type attribute.
33820 (crypto_sha3): Ditto.
33821 (doc/invoke.texi): Document new sha3 option.
33822
33823 2018-01-10 Michael Collison <michael.collison@arm.com>
33824
33825 * config/aarch64/aarch64-builtins.c:
33826 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
33827 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33828 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
33829 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
33830 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
33831 (AARCH64_ISA_SM4): New ISA flag.
33832 (TARGET_SM4): New feature flag for sm4.
33833 * config/aarch64/aarch64-simd-builtins.def
33834 (aarch64_sm3ss1qv4si): Ditto.
33835 (aarch64_sm3tt1aq4si): Ditto.
33836 (aarch64_sm3tt1bq4si): Ditto.
33837 (aarch64_sm3tt2aq4si): Ditto.
33838 (aarch64_sm3tt2bq4si): Ditto.
33839 (aarch64_sm3partw1qv4si): Ditto.
33840 (aarch64_sm3partw2qv4si): Ditto.
33841 (aarch64_sm4eqv4si): Ditto.
33842 (aarch64_sm4ekeyqv4si): Ditto.
33843 * config/aarch64/aarch64-simd.md:
33844 (aarch64_sm3ss1qv4si): Ditto.
33845 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
33846 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
33847 (aarch64_sm4eqv4si): Ditto.
33848 (aarch64_sm4ekeyqv4si): Ditto.
33849 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
33850 (sm3part_op): Ditto.
33851 (CRYPTO_SM3TT): Ditto.
33852 (CRYPTO_SM3PART): Ditto.
33853 (UNSPEC_SM3SS1): New unspec.
33854 (UNSPEC_SM3TT1A): Ditto.
33855 (UNSPEC_SM3TT1B): Ditto.
33856 (UNSPEC_SM3TT2A): Ditto.
33857 (UNSPEC_SM3TT2B): Ditto.
33858 (UNSPEC_SM3PARTW1): Ditto.
33859 (UNSPEC_SM3PARTW2): Ditto.
33860 (UNSPEC_SM4E): Ditto.
33861 (UNSPEC_SM4EKEY): Ditto.
33862 * config/aarch64/constraints.md (Ui2): New constraint.
33863 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
33864 * config/arm/types.md (crypto_sm3): New type attribute.
33865 (crypto_sm4): Ditto.
33866 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
33867 (vsm3tt1aq_u32): Ditto.
33868 (vsm3tt1bq_u32): Ditto.
33869 (vsm3tt2aq_u32): Ditto.
33870 (vsm3tt2bq_u32): Ditto.
33871 (vsm3partw1q_u32): Ditto.
33872 (vsm3partw2q_u32): Ditto.
33873 (vsm4eq_u32): Ditto.
33874 (vsm4ekeyq_u32): Ditto.
33875 (doc/invoke.texi): Document new sm4 option.
33876
33877 2018-01-10 Michael Collison <michael.collison@arm.com>
33878
33879 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
33880 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
33881 (AARCH64_FL_FOR_ARCH8_4): New.
33882 (AARCH64_FL_V8_4): New flag.
33883 (doc/invoke.texi): Document new armv8.4-a option.
33884
33885 2018-01-10 Michael Collison <michael.collison@arm.com>
33886
33887 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33888 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
33889 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
33890 * config/aarch64/aarch64-option-extension.def: Add
33891 AARCH64_OPT_EXTENSION of 'sha2'.
33892 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
33893 (crypto): Disable sha2 and aes if crypto disabled.
33894 (crypto): Enable aes and sha2 if enabled.
33895 (simd): Disable sha2 and aes if simd disabled.
33896 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
33897 New flags.
33898 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
33899 (TARGET_SHA2): New feature flag for sha2.
33900 (TARGET_AES): New feature flag for aes.
33901 * config/aarch64/aarch64-simd.md:
33902 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
33903 conditional on TARGET_AES.
33904 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
33905 (aarch64_crypto_sha1hsi): Make pattern conditional
33906 on TARGET_SHA2.
33907 (aarch64_crypto_sha1hv4si): Ditto.
33908 (aarch64_be_crypto_sha1hv4si): Ditto.
33909 (aarch64_crypto_sha1su1v4si): Ditto.
33910 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
33911 (aarch64_crypto_sha1su0v4si): Ditto.
33912 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
33913 (aarch64_crypto_sha256su0v4si): Ditto.
33914 (aarch64_crypto_sha256su1v4si): Ditto.
33915 (doc/invoke.texi): Document new aes and sha2 options.
33916
33917 2018-01-10 Martin Sebor <msebor@redhat.com>
33918
33919 PR tree-optimization/83781
33920 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
33921 as string arrays.
33922
33923 2018-01-11 Martin Sebor <msebor@gmail.com>
33924 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33925
33926 PR tree-optimization/83501
33927 PR tree-optimization/81703
33928
33929 * tree-ssa-strlen.c (get_string_cst): Rename...
33930 (get_string_len): ...to this. Handle global constants.
33931 (handle_char_store): Adjust.
33932
33933 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
33934 Jim Wilson <jimw@sifive.com>
33935
33936 * config/riscv/riscv-protos.h (riscv_output_return): New.
33937 * config/riscv/riscv.c (struct machine_function): New naked_p field.
33938 (riscv_attribute_table, riscv_output_return),
33939 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
33940 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
33941 (riscv_compute_frame_info): Only compute frame->mask if not a naked
33942 function.
33943 (riscv_expand_prologue): Add early return for naked function.
33944 (riscv_expand_epilogue): Likewise.
33945 (riscv_function_ok_for_sibcall): Return false for naked function.
33946 (riscv_set_current_function): New.
33947 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
33948 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
33949 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
33950 * doc/extend.texi (RISC-V Function Attributes): New.
33951
33952 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
33953
33954 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
33955 check for 128-bit long double before checking TCmode.
33956 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
33957 128-bit long doubles before checking TFmode or TCmode.
33958 (FLOAT128_IBM_P): Likewise.
33959
33960 2018-01-10 Martin Sebor <msebor@redhat.com>
33961
33962 PR tree-optimization/83671
33963 * builtins.c (c_strlen): Unconditionally return zero for the empty
33964 string.
33965 Use -Warray-bounds for warnings.
33966 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
33967 for non-constant array indices with COMPONENT_REF, arrays of
33968 arrays, and pointers to arrays.
33969 (gimple_fold_builtin_strlen): Determine and set length range for
33970 non-constant character arrays.
33971
33972 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
33973
33974 PR middle-end/81897
33975 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
33976 empty blocks.
33977
33978 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
33979
33980 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
33981
33982 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33983
33984 PR target/83399
33985 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
33986 VECTOR_MEM_ALTIVEC_OR_VSX_P.
33987 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
33988 indexed_or_indirect_operand predicate.
33989 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
33990 (*vsx_le_perm_load_v8hi): Likewise.
33991 (*vsx_le_perm_load_v16qi): Likewise.
33992 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
33993 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
33994 (*vsx_le_perm_store_v8hi): Likewise.
33995 (*vsx_le_perm_store_v16qi): Likewise.
33996 (eight unnamed splitters): Likewise.
33997
33998 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33999
34000 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
34001 * config/rs6000/emmintrin.h: Likewise.
34002 * config/rs6000/mmintrin.h: Likewise.
34003 * config/rs6000/xmmintrin.h: Likewise.
34004
34005 2018-01-10 David Malcolm <dmalcolm@redhat.com>
34006
34007 PR c++/43486
34008 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
34009 "public_flag".
34010 * tree.c (tree_nop_conversion): Return true for location wrapper
34011 nodes.
34012 (maybe_wrap_with_location): New function.
34013 (selftest::check_strip_nops): New function.
34014 (selftest::test_location_wrappers): New function.
34015 (selftest::tree_c_tests): Call it.
34016 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
34017 (maybe_wrap_with_location): New decl.
34018 (EXPR_LOCATION_WRAPPER_P): New macro.
34019 (location_wrapper_p): New inline function.
34020 (tree_strip_any_location_wrapper): New inline function.
34021
34022 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
34023
34024 PR target/83735
34025 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
34026 stack_realign_offset for the largest alignment of stack slot
34027 actually used.
34028 (ix86_find_max_used_stack_alignment): New function.
34029 (ix86_finalize_stack_frame_flags): Use it. Set
34030 max_used_stack_alignment if we don't realign stack.
34031 * config/i386/i386.h (machine_function): Add
34032 max_used_stack_alignment.
34033
34034 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
34035
34036 * config/arm/arm.opt (-mbranch-cost): New option.
34037 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
34038 account.
34039
34040 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
34041
34042 PR target/83629
34043 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
34044 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
34045
34046 2018-01-10 Richard Biener <rguenther@suse.de>
34047
34048 PR debug/83765
34049 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
34050 early out so it also covers the case where we have a non-NULL
34051 origin.
34052
34053 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
34054
34055 PR tree-optimization/83753
34056 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
34057 for non-strided grouped accesses if the number of elements is 1.
34058
34059 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
34060
34061 PR target/81616
34062 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
34063 * i386.h (TARGET_USE_GATHER): Define.
34064 * x86-tune.def (X86_TUNE_USE_GATHER): New.
34065
34066 2018-01-10 Martin Liska <mliska@suse.cz>
34067
34068 PR bootstrap/82831
34069 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
34070 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
34071 partitioning.
34072 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
34073 CLEANUP_NO_PARTITIONING is not set.
34074
34075 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
34076
34077 * doc/rtl.texi: Remove documentation of (const ...) wrappers
34078 for vectors, as a partial revert of r254296.
34079 * rtl.h (const_vec_p): Delete.
34080 (const_vec_duplicate_p): Don't test for vector CONSTs.
34081 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
34082 * expmed.c (make_tree): Likewise.
34083
34084 Revert:
34085 * common.md (E, F): Use CONSTANT_P instead of checking for
34086 CONST_VECTOR.
34087 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
34088 checking for CONST_VECTOR.
34089
34090 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34091
34092 PR middle-end/83575
34093 * predict.c (force_edge_cold): Handle in more sane way edges
34094 with no prediction.
34095
34096 2018-01-09 Carl Love <cel@us.ibm.com>
34097
34098 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
34099 V4SI, V4SF types.
34100 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
34101 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
34102 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
34103 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
34104 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
34105 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
34106 * config/rs6000/rs6000-protos.h: Add extern defition for
34107 rs6000_generate_float2_double_code.
34108 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
34109 function.
34110 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
34111 (float2_v2df): Add define_expand.
34112
34113 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
34114
34115 PR target/83628
34116 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
34117 op_mode in the force_to_mode call.
34118
34119 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34120
34121 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
34122 instead of checking each element individually.
34123 (aarch64_evpc_uzp): Likewise.
34124 (aarch64_evpc_zip): Likewise.
34125 (aarch64_evpc_ext): Likewise.
34126 (aarch64_evpc_rev): Likewise.
34127 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
34128 instead of checking each element individually. Return true without
34129 generating rtl if
34130 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
34131 whether all selected elements come from the same input, instead of
34132 checking each element individually. Remove calls to gen_rtx_REG,
34133 start_sequence and end_sequence and instead assert that no rtl is
34134 generated.
34135
34136 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34137
34138 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
34139 order of HIGH and CONST checks.
34140
34141 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34142
34143 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
34144 if the destination isn't an SSA_NAME.
34145
34146 2018-01-09 Richard Biener <rguenther@suse.de>
34147
34148 PR tree-optimization/83668
34149 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
34150 move prologue...
34151 (canonicalize_loop_form): ... here, renamed from ...
34152 (canonicalize_loop_closed_ssa_form): ... this and amended to
34153 swap successor edges for loop exit blocks to make us use
34154 the RPO order we need for initial schedule generation.
34155
34156 2018-01-09 Joseph Myers <joseph@codesourcery.com>
34157
34158 PR tree-optimization/64811
34159 * match.pd: When optimizing comparisons with Inf, avoid
34160 introducing or losing exceptions from comparisons with NaN.
34161
34162 2018-01-09 Martin Liska <mliska@suse.cz>
34163
34164 PR sanitizer/82517
34165 * asan.c (shadow_mem_size): Add gcc_assert.
34166
34167 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
34168
34169 Don't save registers in main().
34170
34171 PR target/83738
34172 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
34173 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
34174 * config/avr/avr.c (avr_set_current_function): Don't error if
34175 naked, OS_task or OS_main are specified at the same time.
34176 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
34177 OS_main.
34178 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
34179 attribute.
34180 * common/config/avr/avr-common.c (avr_option_optimization_table):
34181 Switch on -mmain-is-OS_task for optimizing compilations.
34182
34183 2018-01-09 Richard Biener <rguenther@suse.de>
34184
34185 PR tree-optimization/83572
34186 * graphite.c: Include cfganal.h.
34187 (graphite_transform_loops): Connect infinite loops to exit
34188 and remove fake edges at the end.
34189
34190 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34191
34192 * ipa-inline.c (edge_badness): Revert accidental checkin.
34193
34194 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34195
34196 PR ipa/80763
34197 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
34198 symbols; not inline clones.
34199
34200 2018-01-09 Jakub Jelinek <jakub@redhat.com>
34201
34202 PR target/83507
34203 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
34204 hard registers. Formatting fixes.
34205
34206 PR preprocessor/83722
34207 * gcc.c (try_generate_repro): Pass
34208 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
34209 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
34210 do_report_bug.
34211
34212 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
34213 Kito Cheng <kito.cheng@gmail.com>
34214
34215 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
34216 (riscv_leaf_function_p): Delete.
34217 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
34218
34219 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34220
34221 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
34222 function.
34223 (do_ifelse): New function.
34224 (do_isel): New function.
34225 (do_sub3): New function.
34226 (do_add3): New function.
34227 (do_load_mask_compare): New function.
34228 (do_overlap_load_compare): New function.
34229 (expand_compare_loop): New function.
34230 (expand_block_compare): Call expand_compare_loop() when appropriate.
34231 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
34232 option description.
34233 (-mblock-compare-inline-loop-limit): New option.
34234
34235 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
34236
34237 PR target/83677
34238 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
34239 Reverse order of second and third operands in first alternative.
34240 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
34241 of first and second elements in UNSPEC_VPERMR vector.
34242 (altivec_expand_vec_perm_le): Likewise.
34243
34244 2018-01-08 Jeff Law <law@redhat.com>
34245
34246 PR rtl-optimizatin/81308
34247 * tree-switch-conversion.c (cfg_altered): New file scoped static.
34248 (process_switch): If group_case_labels makes a change, then set
34249 cfg_altered.
34250 (pass_convert_switch::execute): If a switch is converted, then
34251 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
34252
34253 PR rtl-optimization/81308
34254 * recog.c (split_all_insns): Conditionally cleanup the CFG after
34255 splitting insns.
34256
34257 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
34258
34259 PR target/83663 - Revert r255946
34260 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
34261 generation for cases where splatting a value is not useful.
34262 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
34263 across a vec_duplicate and a paradoxical subreg forming a vector
34264 mode to a vec_concat.
34265
34266 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
34267
34268 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
34269 -march=armv8.3-a variants.
34270 * config/arm/t-multilib: Likewise.
34271 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
34272
34273 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34274
34275 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
34276 to generate rtl.
34277 (cceq_ior_compare_complement): Give it a name so I can use it, and
34278 change boolean_or_operator predicate to boolean_operator so it can
34279 be used to generate a crand.
34280 (eqne): New code iterator.
34281 (bd/bd_neg): New code_attrs.
34282 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
34283 a single define_insn.
34284 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
34285 decrement (bdnzt/bdnzf/bdzt/bdzf).
34286 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
34287 with the new names of the branch decrement patterns, and added the
34288 names of the branch decrement conditional patterns.
34289
34290 2018-01-08 Richard Biener <rguenther@suse.de>
34291
34292 PR tree-optimization/83563
34293 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
34294 cache.
34295
34296 2018-01-08 Richard Biener <rguenther@suse.de>
34297
34298 PR middle-end/83713
34299 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
34300
34301 2018-01-08 Richard Biener <rguenther@suse.de>
34302
34303 PR tree-optimization/83685
34304 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
34305 references to abnormals.
34306
34307 2018-01-08 Richard Biener <rguenther@suse.de>
34308
34309 PR lto/83719
34310 * dwarf2out.c (output_indirect_strings): Handle empty
34311 skeleton_debug_str_hash.
34312 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
34313
34314 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34315
34316 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
34317 (emit_store_direct): Likewise.
34318 (arc_trampoline_adjust_address): Likewise.
34319 (arc_asm_trampoline_template): New function.
34320 (arc_initialize_trampoline): Use asm_trampoline_template.
34321 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
34322 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
34323 * config/arc/arc.md (flush_icache): Delete pattern.
34324
34325 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34326
34327 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
34328 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
34329 munaligned-access.
34330
34331 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34332
34333 PR target/83681
34334 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
34335 by not USED_FOR_TARGET.
34336 (make_pass_resolve_sw_modes): Likewise.
34337
34338 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34339
34340 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
34341 USED_FOR_TARGET.
34342
34343 2018-01-08 Richard Biener <rguenther@suse.de>
34344
34345 PR middle-end/83580
34346 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
34347
34348 2018-01-08 Richard Biener <rguenther@suse.de>
34349
34350 PR middle-end/83517
34351 * match.pd ((t * 2) / 2) -> t): Add missing :c.
34352
34353 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
34354
34355 PR middle-end/81897
34356 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
34357 basic blocks with a small number of successors.
34358 (convert_control_dep_chain_into_preds): Improve handling of
34359 forwarder blocks.
34360 (dump_predicates): Split apart into...
34361 (dump_pred_chain): ...here...
34362 (dump_pred_info): ...and here.
34363 (can_one_predicate_be_invalidated_p): Add debugging printfs.
34364 (can_chain_union_be_invalidated_p): Improve check for invalidation
34365 of paths.
34366 (uninit_uses_cannot_happen): Avoid unnecessary if
34367 convert_control_dep_chain_into_preds yielded nothing.
34368
34369 2018-01-06 Martin Sebor <msebor@redhat.com>
34370
34371 PR tree-optimization/83640
34372 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
34373 subtracting negative offset from size.
34374 (builtin_access::overlap): Adjust offset bounds of the access to fall
34375 within the size of the object if possible.
34376
34377 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
34378
34379 PR rtl-optimization/83699
34380 * expmed.c (extract_bit_field_1): Restrict the vector usage of
34381 extract_bit_field_as_subreg to cases in which the extracted
34382 value is also a vector.
34383
34384 * lra-constraints.c (process_alt_operands): Test for the equivalence
34385 substitutions when detecting a possible reload cycle.
34386
34387 2018-01-06 Jakub Jelinek <jakub@redhat.com>
34388
34389 PR debug/83480
34390 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
34391 by default if flag_selective_schedling{,2}. Formatting fixes.
34392
34393 PR rtl-optimization/83682
34394 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
34395 if it has non-VECTOR_MODE element mode.
34396 (vec_duplicate_p): Likewise.
34397
34398 PR middle-end/83694
34399 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
34400 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
34401
34402 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34403
34404 PR target/83604
34405 * config/i386/i386-builtin.def
34406 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
34407 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
34408 Require also OPTION_MASK_ISA_AVX512F in addition to
34409 OPTION_MASK_ISA_GFNI.
34410 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
34411 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
34412 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
34413 to OPTION_MASK_ISA_GFNI.
34414 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
34415 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
34416 OPTION_MASK_ISA_AVX512BW.
34417 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
34418 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
34419 addition to OPTION_MASK_ISA_GFNI.
34420 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
34421 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
34422 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
34423 to OPTION_MASK_ISA_GFNI.
34424 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
34425 a requirement for all ISAs rather than any of them with a few
34426 exceptions.
34427 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
34428 processing.
34429 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
34430 bitmasks to be enabled with 3 exceptions, instead of requiring any
34431 enabled ISA with lots of exceptions.
34432 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
34433 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
34434 Change avx512bw in isa attribute to avx512f.
34435 * config/i386/sgxintrin.h: Add license boilerplate.
34436 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
34437 to __AVX512F__ and __AVX512VL to __AVX512VL__.
34438 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
34439 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
34440 defined.
34441 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
34442 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
34443 temporarily sse2 rather than sse if not enabled already.
34444
34445 PR target/83604
34446 * config/i386/sse.md (VI248_VLBW): Rename to ...
34447 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
34448 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
34449 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
34450 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
34451 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
34452 mode iterator instead of VI248_VLBW.
34453
34454 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
34455
34456 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
34457 (record_modified): Skip clobbers; add debug output.
34458 (param_change_prob): Use sreal frequencies.
34459
34460 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34461
34462 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
34463 punt for user-aligned variables.
34464
34465 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34466
34467 * tree-chrec.c (chrec_contains_symbols): Return true for
34468 POLY_INT_CST.
34469
34470 2018-01-05 Sudakshina Das <sudi.das@arm.com>
34471
34472 PR target/82439
34473 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
34474 of (x|y) == x for BICS pattern.
34475
34476 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34477
34478 PR tree-optimization/83605
34479 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
34480 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
34481 can throw.
34482
34483 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
34484
34485 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
34486 * config/epiphany/rtems.h: New file.
34487
34488 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34489 Uros Bizjak <ubizjak@gmail.com>
34490
34491 PR target/83554
34492 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
34493 QIreg_operand instead of register_operand predicate.
34494 * config/i386/i386.c (ix86_rop_should_change_byte_p,
34495 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
34496 comments instead of -fmitigate[-_]rop.
34497
34498 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
34499
34500 PR bootstrap/81926
34501 * cgraphunit.c (symbol_table::compile): Switch to text_section
34502 before calling assembly_start debug hook.
34503 * run-rtl-passes.c (run_rtl_passes): Likewise.
34504 Include output.h.
34505
34506 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34507
34508 * tree-vrp.c (extract_range_from_binary_expr_1): Check
34509 range_int_cst_p rather than !symbolic_range_p before calling
34510 extract_range_from_multiplicative_op_1.
34511
34512 2018-01-04 Jeff Law <law@redhat.com>
34513
34514 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
34515 redundant test in assertion.
34516
34517 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34518
34519 * doc/rtl.texi: Document machine_mode wrapper classes.
34520
34521 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34522
34523 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
34524 using tree_to_uhwi.
34525
34526 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34527
34528 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
34529 the VEC_PERM_EXPR fold to fail.
34530
34531 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34532
34533 PR debug/83585
34534 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
34535 to switched_sections.
34536
34537 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34538
34539 PR target/83680
34540 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
34541 test for d.testing.
34542
34543 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
34544
34545 PR target/83387
34546 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
34547 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
34548
34549 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34550
34551 PR debug/83666
34552 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
34553 is BLKmode and bitpos not zero or mode change is needed.
34554
34555 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34556
34557 PR target/83675
34558 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
34559 TARGET_VIS2.
34560
34561 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
34562
34563 PR target/83628
34564 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
34565 instead of MULT rtx. Update all corresponding splitters.
34566 (*saddl_se): Ditto.
34567 (*ssub<modesuffix>): Ditto.
34568 (*ssubl_se): Ditto.
34569 (*cmp_sadd_di): Update split patterns.
34570 (*cmp_sadd_si): Ditto.
34571 (*cmp_sadd_sidi): Ditto.
34572 (*cmp_ssub_di): Ditto.
34573 (*cmp_ssub_si): Ditto.
34574 (*cmp_ssub_sidi): Ditto.
34575 * config/alpha/predicates.md (const23_operand): New predicate.
34576 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
34577 Look for ASHIFT, not MULT inner operand.
34578 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
34579
34580 2018-01-04 Martin Liska <mliska@suse.cz>
34581
34582 PR gcov-profile/83669
34583 * gcov.c (output_intermediate_file): Add version to intermediate
34584 gcov file.
34585 * doc/gcov.texi: Document new field 'version' in intermediate
34586 file format. Fix location of '-k' option of gcov command.
34587
34588 2018-01-04 Martin Liska <mliska@suse.cz>
34589
34590 PR ipa/82352
34591 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
34592
34593 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34594
34595 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
34596
34597 2018-01-03 Martin Sebor <msebor@redhat.com>
34598
34599 PR tree-optimization/83655
34600 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
34601 checking calls with invalid arguments.
34602
34603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34604
34605 * tree-vect-stmts.c (vect_get_store_rhs): New function.
34606 (vectorizable_mask_load_store): Delete.
34607 (vectorizable_call): Return false for masked loads and stores.
34608 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
34609 instead of gimple_assign_rhs1.
34610 (vectorizable_load): Handle IFN_MASK_LOAD.
34611 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
34612
34613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34614
34615 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
34616 split out from..,
34617 (vectorizable_mask_load_store): ...here.
34618 (vectorizable_load): ...and here.
34619
34620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34621
34622 * tree-vect-stmts.c (vect_build_all_ones_mask)
34623 (vect_build_zero_merge_argument): New functions, split out from...
34624 (vectorizable_load): ...here.
34625
34626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34627
34628 * tree-vect-stmts.c (vect_check_store_rhs): New function,
34629 split out from...
34630 (vectorizable_mask_load_store): ...here.
34631 (vectorizable_store): ...and here.
34632
34633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34634
34635 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
34636 split out from...
34637 (vectorizable_mask_load_store): ...here.
34638
34639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34640
34641 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
34642 (vect_model_store_cost): Take a vec_load_store_type instead of a
34643 vect_def_type.
34644 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
34645 (vect_model_store_cost): Take a vec_load_store_type instead of a
34646 vect_def_type.
34647 (vectorizable_mask_load_store): Update accordingly.
34648 (vectorizable_store): Likewise.
34649 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
34650
34651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34652
34653 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
34654 IFN_MASK_LOAD calls here rather than...
34655 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
34656
34657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34658 Alan Hayward <alan.hayward@arm.com>
34659 David Sherwood <david.sherwood@arm.com>
34660
34661 * expmed.c (extract_bit_field_1): For vector extracts,
34662 fall back to extract_bit_field_as_subreg if vec_extract
34663 isn't available.
34664
34665 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34666 Alan Hayward <alan.hayward@arm.com>
34667 David Sherwood <david.sherwood@arm.com>
34668
34669 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
34670 they are variable or constant sized.
34671 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
34672 slots for constant-sized data.
34673
34674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34675 Alan Hayward <alan.hayward@arm.com>
34676 David Sherwood <david.sherwood@arm.com>
34677
34678 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
34679 handling COND_EXPRs with boolean comparisons, try to find a better
34680 basis for the mask type than the boolean itself.
34681
34682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34683
34684 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
34685 is calculated and how it can be overridden.
34686 * genmodes.c (max_bitsize_mode_any_mode): New variable.
34687 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
34688 if defined.
34689 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
34690 if nonzero.
34691
34692 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34693 Alan Hayward <alan.hayward@arm.com>
34694 David Sherwood <david.sherwood@arm.com>
34695
34696 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
34697 Remove the mode argument.
34698 (aarch64_simd_valid_immediate): Remove the mode and inverse
34699 arguments.
34700 * config/aarch64/iterators.md (bitsize): New iterator.
34701 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
34702 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
34703 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
34704 aarch64_simd_valid_immediate.
34705 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
34706 (aarch64_reg_or_bic_imm): Likewise.
34707 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
34708 with an insn_type enum and msl with a modifier_type enum.
34709 Replace element_width with a scalar_mode. Change the shift
34710 to unsigned int. Add constructors for scalar_float_mode and
34711 scalar_int_mode elements.
34712 (aarch64_vect_float_const_representable_p): Delete.
34713 (aarch64_can_const_movi_rtx_p)
34714 (aarch64_simd_scalar_immediate_valid_for_move)
34715 (aarch64_simd_make_constant): Update call to
34716 aarch64_simd_valid_immediate.
34717 (aarch64_advsimd_valid_immediate_hs): New function.
34718 (aarch64_advsimd_valid_immediate): Likewise.
34719 (aarch64_simd_valid_immediate): Remove mode and inverse
34720 arguments. Rewrite to use the above. Use const_vec_duplicate_p
34721 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
34722 and aarch64_float_const_representable_p on the result.
34723 (aarch64_output_simd_mov_immediate): Remove mode argument.
34724 Update call to aarch64_simd_valid_immediate and use of
34725 simd_immediate_info.
34726 (aarch64_output_scalar_simd_mov_immediate): Update call
34727 accordingly.
34728
34729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34730 Alan Hayward <alan.hayward@arm.com>
34731 David Sherwood <david.sherwood@arm.com>
34732
34733 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
34734 (mode_nunits): Likewise CONST_MODE_NUNITS.
34735 * machmode.def (ADJUST_NUNITS): Document.
34736 * genmodes.c (mode_data::need_nunits_adj): New field.
34737 (blank_mode): Update accordingly.
34738 (adj_nunits): New variable.
34739 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
34740 parameter.
34741 (emit_mode_size_inline): Set need_bytesize_adj for all modes
34742 listed in adj_nunits.
34743 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
34744 listed in adj_nunits. Don't emit case statements for such modes.
34745 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
34746 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
34747 nothing if adj_nunits is nonnull.
34748 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
34749 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
34750 (emit_mode_fbit): Update use of print_maybe_const_decl.
34751 (emit_move_size): Likewise. Treat the array as non-const
34752 if adj_nunits.
34753 (emit_mode_adjustments): Handle adj_nunits.
34754
34755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34756
34757 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
34758 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
34759 (VECTOR_MODES): Use it.
34760 (make_vector_modes): Take the prefix as an argument.
34761
34762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34763 Alan Hayward <alan.hayward@arm.com>
34764 David Sherwood <david.sherwood@arm.com>
34765
34766 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
34767 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
34768 for MODE_VECTOR_BOOL.
34769 * machmode.def (VECTOR_BOOL_MODE): Document.
34770 * genmodes.c (VECTOR_BOOL_MODE): New macro.
34771 (make_vector_bool_mode): New function.
34772 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
34773 MODE_VECTOR_BOOL.
34774 * lto-streamer-in.c (lto_input_mode_table): Likewise.
34775 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
34776 Likewise.
34777 * stor-layout.c (int_mode_for_mode): Likewise.
34778 * tree.c (build_vector_type_for_mode): Likewise.
34779 * varasm.c (output_constant_pool_2): Likewise.
34780 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
34781 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
34782 for MODE_VECTOR_BOOL.
34783 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
34784 of mode class checks.
34785 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
34786 instead of a list of mode class checks.
34787 (expand_vector_scalar_condition): Likewise.
34788 (type_for_widest_vector_mode): Handle BImode as an inner mode.
34789
34790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34791 Alan Hayward <alan.hayward@arm.com>
34792 David Sherwood <david.sherwood@arm.com>
34793
34794 * machmode.h (mode_size): Change from unsigned short to
34795 poly_uint16_pod.
34796 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
34797 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34798 or if measurement_type is not polynomial.
34799 (fixed_size_mode::includes_p): Check for constant-sized modes.
34800 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
34801 return a poly_uint16 rather than an unsigned short.
34802 (emit_mode_size): Change the type of mode_size from unsigned short
34803 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
34804 (emit_mode_adjustments): Cope with polynomial vector sizes.
34805 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34806 for GET_MODE_SIZE.
34807 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34808 for GET_MODE_SIZE.
34809 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
34810 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
34811 * caller-save.c (setup_save_areas): Likewise.
34812 (replace_reg_with_saved_mem): Likewise.
34813 * calls.c (emit_library_call_value_1): Likewise.
34814 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
34815 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
34816 (gen_lowpart_for_combine): Likewise.
34817 * convert.c (convert_to_integer_1): Likewise.
34818 * cse.c (equiv_constant, cse_insn): Likewise.
34819 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
34820 (cselib_subst_to_values): Likewise.
34821 * dce.c (word_dce_process_block): Likewise.
34822 * df-problems.c (df_word_lr_mark_ref): Likewise.
34823 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
34824 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
34825 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
34826 (rtl_for_decl_location): Likewise.
34827 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
34828 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
34829 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
34830 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
34831 (expand_expr_real_1): Likewise.
34832 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
34833 (pad_below): Likewise.
34834 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34835 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
34836 * ira.c (get_subreg_tracking_sizes): Likewise.
34837 * ira-build.c (ira_create_allocno_objects): Likewise.
34838 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
34839 (ira_sort_regnos_for_alter_reg): Likewise.
34840 * ira-costs.c (record_operand_costs): Likewise.
34841 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
34842 (resolve_simple_move): Likewise.
34843 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
34844 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
34845 (lra_constraints): Likewise.
34846 (CONST_POOL_OK_P): Reject variable-sized modes.
34847 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
34848 (add_pseudo_to_slot, lra_spill): Likewise.
34849 * omp-low.c (omp_clause_aligned_alignment): Likewise.
34850 * optabs-query.c (get_best_extraction_insn): Likewise.
34851 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
34852 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
34853 (expand_mult_highpart, valid_multiword_target_p): Likewise.
34854 * recog.c (offsettable_address_addr_space_p): Likewise.
34855 * regcprop.c (maybe_mode_change): Likewise.
34856 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
34857 * regrename.c (build_def_use): Likewise.
34858 * regstat.c (dump_reg_info): Likewise.
34859 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
34860 (find_reloads, find_reloads_subreg_address): Likewise.
34861 * reload1.c (eliminate_regs_1): Likewise.
34862 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
34863 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
34864 (simplify_binary_operation_1, simplify_subreg): Likewise.
34865 * targhooks.c (default_function_arg_padding): Likewise.
34866 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
34867 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
34868 (verify_gimple_assign_ternary): Likewise.
34869 * tree-inline.c (estimate_move_cost): Likewise.
34870 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34871 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
34872 (get_address_cost_ainc): Likewise.
34873 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
34874 (vect_supportable_dr_alignment): Likewise.
34875 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
34876 (vectorizable_reduction): Likewise.
34877 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
34878 (vectorizable_operation, vectorizable_load): Likewise.
34879 * tree.c (build_same_sized_truth_vector_type): Likewise.
34880 * valtrack.c (cleanup_auto_inc_dec): Likewise.
34881 * var-tracking.c (emit_note_insn_var_location): Likewise.
34882 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
34883 (ADDR_VEC_ALIGN): Likewise.
34884
34885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34886 Alan Hayward <alan.hayward@arm.com>
34887 David Sherwood <david.sherwood@arm.com>
34888
34889 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
34890 unsigned short.
34891 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34892 or if measurement_type is polynomial.
34893 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
34894 * combine.c (make_extraction): Likewise.
34895 * dse.c (find_shift_sequence): Likewise.
34896 * dwarf2out.c (mem_loc_descriptor): Likewise.
34897 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
34898 (extract_bit_field, extract_low_bits): Likewise.
34899 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
34900 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
34901 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
34902 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
34903 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34904 * reload.c (find_reloads): Likewise.
34905 * reload1.c (alter_reg): Likewise.
34906 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
34907 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
34908 * tree-if-conv.c (predicate_mem_writes): Likewise.
34909 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
34910 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
34911 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
34912 * valtrack.c (dead_debug_insert_temp): Likewise.
34913 * varasm.c (mergeable_constant_section): Likewise.
34914 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
34915
34916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34917 Alan Hayward <alan.hayward@arm.com>
34918 David Sherwood <david.sherwood@arm.com>
34919
34920 * expr.c (expand_assignment): Cope with polynomial mode sizes
34921 when assigning to a CONCAT.
34922
34923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34924 Alan Hayward <alan.hayward@arm.com>
34925 David Sherwood <david.sherwood@arm.com>
34926
34927 * machmode.h (mode_precision): Change from unsigned short to
34928 poly_uint16_pod.
34929 (mode_to_precision): Return a poly_uint16 rather than an unsigned
34930 short.
34931 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
34932 or if measurement_type is not polynomial.
34933 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
34934 in which the mode is already known to be a scalar_int_mode.
34935 * genmodes.c (emit_mode_precision): Change the type of mode_precision
34936 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
34937 initializer.
34938 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34939 for GET_MODE_PRECISION.
34940 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34941 for GET_MODE_PRECISION.
34942 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
34943 as polynomial.
34944 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
34945 (expand_field_assignment, make_extraction): Likewise.
34946 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
34947 (get_last_value): Likewise.
34948 * convert.c (convert_to_integer_1): Likewise.
34949 * cse.c (cse_insn): Likewise.
34950 * expr.c (expand_expr_real_1): Likewise.
34951 * lra-constraints.c (simplify_operand_subreg): Likewise.
34952 * optabs-query.c (can_atomic_load_p): Likewise.
34953 * optabs.c (expand_atomic_load): Likewise.
34954 (expand_atomic_store): Likewise.
34955 * ree.c (combine_reaching_defs): Likewise.
34956 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
34957 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
34958 * tree.h (type_has_mode_precision_p): Likewise.
34959 * ubsan.c (instrument_si_overflow): Likewise.
34960
34961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34962 Alan Hayward <alan.hayward@arm.com>
34963 David Sherwood <david.sherwood@arm.com>
34964
34965 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
34966 polynomial numbers of units.
34967 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
34968 (valid_vector_subparts_p): New function.
34969 (build_vector_type): Remove temporary shim and take the number
34970 of units as a poly_uint64 rather than an int.
34971 (build_opaque_vector_type): Take the number of units as a
34972 poly_uint64 rather than an int.
34973 * tree.c (build_vector_from_ctor): Handle polynomial
34974 TYPE_VECTOR_SUBPARTS.
34975 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
34976 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
34977 (build_vector_from_val): If the number of units is variable,
34978 use build_vec_duplicate_cst for constant operands and
34979 VEC_DUPLICATE_EXPR otherwise.
34980 (make_vector_type): Remove temporary is_constant ().
34981 (build_vector_type, build_opaque_vector_type): Take the number of
34982 units as a poly_uint64 rather than an int.
34983 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
34984 VECTOR_CST_NELTS.
34985 * cfgexpand.c (expand_debug_expr): Likewise.
34986 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
34987 (store_constructor, expand_expr_real_1): Likewise.
34988 (const_scalar_mask_from_tree): Likewise.
34989 * fold-const-call.c (fold_const_reduction): Likewise.
34990 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
34991 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
34992 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
34993 (fold_relational_const): Likewise.
34994 (native_interpret_vector): Likewise. Change the size from an
34995 int to an unsigned int.
34996 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
34997 TYPE_VECTOR_SUBPARTS.
34998 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
34999 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
35000 duplicating a non-constant operand into a variable-length vector.
35001 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
35002 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
35003 * ipa-icf.c (sem_variable::equals): Likewise.
35004 * match.pd: Likewise.
35005 * omp-simd-clone.c (simd_clone_subparts): Likewise.
35006 * print-tree.c (print_node): Likewise.
35007 * stor-layout.c (layout_type): Likewise.
35008 * targhooks.c (default_builtin_vectorization_cost): Likewise.
35009 * tree-cfg.c (verify_gimple_comparison): Likewise.
35010 (verify_gimple_assign_binary): Likewise.
35011 (verify_gimple_assign_ternary): Likewise.
35012 (verify_gimple_assign_single): Likewise.
35013 * tree-pretty-print.c (dump_generic_node): Likewise.
35014 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35015 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
35016 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
35017 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
35018 (vect_shift_permute_load_chain): Likewise.
35019 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
35020 (expand_vector_condition, optimize_vector_constructor): Likewise.
35021 (lower_vec_perm, get_compute_type): Likewise.
35022 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
35023 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
35024 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
35025 (vect_recog_mask_conversion_pattern): Likewise.
35026 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
35027 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
35028 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35029 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
35030 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
35031 (vectorizable_shift, vectorizable_operation, vectorizable_store)
35032 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
35033 (supportable_widening_operation): Likewise.
35034 (supportable_narrowing_operation): Likewise.
35035 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
35036 Likewise.
35037 * varasm.c (output_constant): Likewise.
35038
35039 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35040 Alan Hayward <alan.hayward@arm.com>
35041 David Sherwood <david.sherwood@arm.com>
35042
35043 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
35044 so that both the length == 3 and length != 3 cases set up their
35045 own permute vectors. Add comments explaining why we know the
35046 number of elements is constant.
35047 (vect_permute_load_chain): Likewise.
35048
35049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35050 Alan Hayward <alan.hayward@arm.com>
35051 David Sherwood <david.sherwood@arm.com>
35052
35053 * machmode.h (mode_nunits): Change from unsigned char to
35054 poly_uint16_pod.
35055 (ONLY_FIXED_SIZE_MODES): New macro.
35056 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
35057 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
35058 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
35059 New typedefs.
35060 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
35061 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
35062 or if measurement_type is not polynomial.
35063 * genmodes.c (ZERO_COEFFS): New macro.
35064 (emit_mode_nunits_inline): Make mode_nunits_inline return a
35065 poly_uint16.
35066 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
35067 Use ZERO_COEFFS when emitting initializers.
35068 * data-streamer.h (bp_pack_poly_value): New function.
35069 (bp_unpack_poly_value): Likewise.
35070 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
35071 for GET_MODE_NUNITS.
35072 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
35073 for GET_MODE_NUNITS.
35074 * tree.c (make_vector_type): Remove temporary shim and make
35075 the real function take the number of units as a poly_uint64
35076 rather than an int.
35077 (build_vector_type_for_mode): Handle polynomial nunits.
35078 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
35079 * emit-rtl.c (const_vec_series_p_1): Likewise.
35080 (gen_rtx_CONST_VECTOR): Likewise.
35081 * fold-const.c (test_vec_duplicate_folding): Likewise.
35082 * genrecog.c (validate_pattern): Likewise.
35083 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
35084 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
35085 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
35086 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
35087 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
35088 * rtlanal.c (subreg_get_info): Likewise.
35089 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35090 (vect_grouped_load_supported): Likewise.
35091 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
35092 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
35093 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
35094 (simplify_const_unary_operation, simplify_binary_operation_1)
35095 (simplify_const_binary_operation, simplify_ternary_operation)
35096 (test_vector_ops_duplicate, test_vector_ops): Likewise.
35097 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
35098 instead of CONST_VECTOR_NUNITS.
35099 * varasm.c (output_constant_pool_2): Likewise.
35100 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
35101 explicit-encoded elements in the XVEC for variable-length vectors.
35102
35103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35104
35105 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
35106
35107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35108 Alan Hayward <alan.hayward@arm.com>
35109 David Sherwood <david.sherwood@arm.com>
35110
35111 * coretypes.h (fixed_size_mode): Declare.
35112 (fixed_size_mode_pod): New typedef.
35113 * builtins.h (target_builtins::x_apply_args_mode)
35114 (target_builtins::x_apply_result_mode): Change type to
35115 fixed_size_mode_pod.
35116 * builtins.c (apply_args_size, apply_result_size, result_vector)
35117 (expand_builtin_apply_args_1, expand_builtin_apply)
35118 (expand_builtin_return): Update accordingly.
35119
35120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35121
35122 * cse.c (hash_rtx_cb): Hash only the encoded elements.
35123 * cselib.c (cselib_hash_rtx): Likewise.
35124 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
35125 CONST_VECTOR encoding.
35126
35127 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35128 Jeff Law <law@redhat.com>
35129
35130 PR target/83641
35131 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
35132 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
35133 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
35134 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
35135
35136 PR target/83641
35137 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
35138 explicitly probe *sp in a noreturn function if there were any callee
35139 register saves or frame pointer is needed.
35140
35141 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35142
35143 PR debug/83621
35144 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
35145 BLKmode for ternary, binary or unary expressions.
35146
35147 PR debug/83645
35148 * var-tracking.c (delete_vta_debug_insn): New inline function.
35149 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
35150 insns from get_insns () to NULL instead of each bb separately.
35151 Use delete_vta_debug_insn. No longer static.
35152 (vt_debug_insns_local, variable_tracking_main_1): Adjust
35153 delete_vta_debug_insns callers.
35154 * rtl.h (delete_vta_debug_insns): Declare.
35155 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
35156 instead of variable_tracking_main.
35157
35158 2018-01-03 Martin Sebor <msebor@redhat.com>
35159
35160 PR tree-optimization/83603
35161 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
35162 arguments past the endof the argument list in functions declared
35163 without a prototype.
35164 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
35165 Avoid checking when arguments are null.
35166
35167 2018-01-03 Martin Sebor <msebor@redhat.com>
35168
35169 PR c/83559
35170 * doc/extend.texi (attribute const): Fix a typo.
35171 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
35172 issuing -Wsuggest-attribute for void functions.
35173
35174 2018-01-03 Martin Sebor <msebor@redhat.com>
35175
35176 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
35177 offset_int::from instead of wide_int::to_shwi.
35178 (maybe_diag_overlap): Remove assertion.
35179 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
35180 * gimple-ssa-sprintf.c (format_directive): Same.
35181 (parse_directive): Same.
35182 (sprintf_dom_walker::compute_format_length): Same.
35183 (try_substitute_return_value): Same.
35184
35185 2018-01-03 Jeff Law <law@redhat.com>
35186
35187 PR middle-end/83654
35188 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
35189 non-constant residual for zero at runtime and avoid probing in
35190 that case. Reorganize code for trailing problem to mirror handling
35191 of the residual.
35192
35193 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
35194
35195 PR tree-optimization/83501
35196 * tree-ssa-strlen.c (get_string_cst): New.
35197 (handle_char_store): Call get_string_cst.
35198
35199 2018-01-03 Martin Liska <mliska@suse.cz>
35200
35201 PR tree-optimization/83593
35202 * tree-ssa-strlen.c: Include tree-cfg.h.
35203 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
35204 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
35205 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
35206 to false.
35207 (strlen_dom_walker::before_dom_children): Call
35208 gimple_purge_dead_eh_edges. Dump tranformation with details
35209 dump flags.
35210 (strlen_dom_walker::before_dom_children): Update call by adding
35211 new argument cleanup_eh.
35212 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
35213
35214 2018-01-03 Martin Liska <mliska@suse.cz>
35215
35216 PR ipa/83549
35217 * cif-code.def (VARIADIC_THUNK): New enum value.
35218 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
35219 thunks.
35220
35221 2018-01-03 Jan Beulich <jbeulich@suse.com>
35222
35223 * sse.md (mov<mode>_internal): Tighten condition for when to use
35224 vmovdqu<ssescalarsize> for TI and OI modes.
35225
35226 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35227
35228 Update copyright years.
35229
35230 2018-01-03 Martin Liska <mliska@suse.cz>
35231
35232 PR ipa/83594
35233 * ipa-visibility.c (function_and_variable_visibility): Skip
35234 functions with noipa attribure.
35235
35236 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35237
35238 * gcc.c (process_command): Update copyright notice dates.
35239 * gcov-dump.c (print_version): Ditto.
35240 * gcov.c (print_version): Ditto.
35241 * gcov-tool.c (print_version): Ditto.
35242 * gengtype.c (create_file): Ditto.
35243 * doc/cpp.texi: Bump @copying's copyright year.
35244 * doc/cppinternals.texi: Ditto.
35245 * doc/gcc.texi: Ditto.
35246 * doc/gccint.texi: Ditto.
35247 * doc/gcov.texi: Ditto.
35248 * doc/install.texi: Ditto.
35249 * doc/invoke.texi: Ditto.
35250
35251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35252
35253 * vector-builder.h (vector_builder::m_full_nelts): Change from
35254 unsigned int to poly_uint64.
35255 (vector_builder::full_nelts): Update prototype accordingly.
35256 (vector_builder::new_vector): Likewise.
35257 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
35258 (vector_builder::operator ==): Likewise.
35259 (vector_builder::finalize): Likewise.
35260 * int-vector-builder.h (int_vector_builder::int_vector_builder):
35261 Take the number of elements as a poly_uint64 rather than an
35262 unsigned int.
35263 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
35264 from unsigned int to poly_uint64.
35265 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
35266 (vec_perm_indices::new_vector): Likewise.
35267 (vec_perm_indices::length): Likewise.
35268 (vec_perm_indices::nelts_per_input): Likewise.
35269 (vec_perm_indices::input_nelts): Likewise.
35270 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
35271 number of elements per input as a poly_uint64 rather than an
35272 unsigned int. Use the original encoding for variable-length
35273 vectors, rather than clamping each individual element.
35274 For the second and subsequent elements in each pattern,
35275 clamp the step and base before clamping their sum.
35276 (vec_perm_indices::series_p): Handle polynomial element counts.
35277 (vec_perm_indices::all_in_range_p): Likewise.
35278 (vec_perm_indices_to_tree): Likewise.
35279 (vec_perm_indices_to_rtx): Likewise.
35280 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
35281 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
35282 (tree_vector_builder::new_binary_operation): Handle polynomial
35283 element counts. Return false if we need to know the number
35284 of elements at compile time.
35285 * fold-const.c (fold_vec_perm): Punt if the number of elements
35286 isn't known at compile time.
35287
35288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35289
35290 * vec-perm-indices.h (vec_perm_builder): Change element type
35291 from HOST_WIDE_INT to poly_int64.
35292 (vec_perm_indices::element_type): Update accordingly.
35293 (vec_perm_indices::clamp): Handle polynomial element_types.
35294 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35295 (vec_perm_indices::all_in_range_p): Likewise.
35296 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
35297 than shwi trees.
35298 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
35299 polynomial vec_perm_indices element types.
35300 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
35301 * fold-const.c (fold_vec_perm): Likewise.
35302 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
35303 * tree-vect-generic.c (lower_vec_perm): Likewise.
35304 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35305 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
35306 element type to HOST_WIDE_INT.
35307
35308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35309 Alan Hayward <alan.hayward@arm.com>
35310 David Sherwood <david.sherwood@arm.com>
35311
35312 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
35313 rather than an int. Use plus_constant.
35314 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
35315 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
35316
35317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35318 Alan Hayward <alan.hayward@arm.com>
35319 David Sherwood <david.sherwood@arm.com>
35320
35321 * calls.c (emit_call_1, expand_call): Change struct_value_size from
35322 a HOST_WIDE_INT to a poly_int64.
35323
35324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35325 Alan Hayward <alan.hayward@arm.com>
35326 David Sherwood <david.sherwood@arm.com>
35327
35328 * calls.c (load_register_parameters): Cope with polynomial
35329 mode sizes. Require a constant size for BLKmode parameters
35330 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
35331 forces a parameter to be padded at the lsb end in order to
35332 fill a complete number of words, require the parameter size
35333 to be ordered wrt UNITS_PER_WORD.
35334
35335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35336 Alan Hayward <alan.hayward@arm.com>
35337 David Sherwood <david.sherwood@arm.com>
35338
35339 * reload1.c (spill_stack_slot_width): Change element type
35340 from unsigned int to poly_uint64_pod.
35341 (alter_reg): Treat mode sizes as polynomial.
35342
35343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35344 Alan Hayward <alan.hayward@arm.com>
35345 David Sherwood <david.sherwood@arm.com>
35346
35347 * reload.c (complex_word_subreg_p): New function.
35348 (reload_inner_reg_of_subreg, push_reload): Use it.
35349
35350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35351 Alan Hayward <alan.hayward@arm.com>
35352 David Sherwood <david.sherwood@arm.com>
35353
35354 * lra-constraints.c (process_alt_operands): Reject matched
35355 operands whose sizes aren't ordered.
35356 (match_reload): Refer to this check here.
35357
35358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35359 Alan Hayward <alan.hayward@arm.com>
35360 David Sherwood <david.sherwood@arm.com>
35361
35362 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
35363 that the mode size is in the set {1, 2, 4, 8, 16}.
35364
35365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35366 Alan Hayward <alan.hayward@arm.com>
35367 David Sherwood <david.sherwood@arm.com>
35368
35369 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
35370 Use plus_constant instead of gen_rtx_PLUS.
35371
35372 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35373 Alan Hayward <alan.hayward@arm.com>
35374 David Sherwood <david.sherwood@arm.com>
35375
35376 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
35377 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
35378 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
35379 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
35380 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
35381 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
35382 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
35383 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
35384 * config/i386/i386.c (ix86_push_rounding): ...this new function.
35385 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
35386 a poly_int64.
35387 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
35388 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
35389 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
35390 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
35391 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
35392 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
35393 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
35394 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
35395 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
35396 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
35397 function.
35398 * expr.c (emit_move_resolve_push): Treat the input and result
35399 of PUSH_ROUNDING as a poly_int64.
35400 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
35401 (emit_push_insn): Likewise.
35402 * lra-eliminations.c (mark_not_eliminable): Likewise.
35403 * recog.c (push_operand): Likewise.
35404 * reload1.c (elimination_effects): Likewise.
35405 * rtlanal.c (nonzero_bits1): Likewise.
35406 * calls.c (store_one_arg): Likewise. Require the padding to be
35407 known at compile time.
35408
35409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35410 Alan Hayward <alan.hayward@arm.com>
35411 David Sherwood <david.sherwood@arm.com>
35412
35413 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
35414 Use plus_constant instead of gen_rtx_PLUS.
35415
35416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35417 Alan Hayward <alan.hayward@arm.com>
35418 David Sherwood <david.sherwood@arm.com>
35419
35420 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
35421 rather than an int.
35422
35423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35424 Alan Hayward <alan.hayward@arm.com>
35425 David Sherwood <david.sherwood@arm.com>
35426
35427 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
35428 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
35429 via stack temporaries. Treat the mode size as polynomial too.
35430
35431 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35432 Alan Hayward <alan.hayward@arm.com>
35433 David Sherwood <david.sherwood@arm.com>
35434
35435 * expr.c (expand_expr_real_2): When handling conversions involving
35436 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
35437 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
35438 as a poly_uint64 too.
35439
35440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35441 Alan Hayward <alan.hayward@arm.com>
35442 David Sherwood <david.sherwood@arm.com>
35443
35444 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
35445
35446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35447 Alan Hayward <alan.hayward@arm.com>
35448 David Sherwood <david.sherwood@arm.com>
35449
35450 * combine.c (can_change_dest_mode): Handle polynomial
35451 REGMODE_NATURAL_SIZE.
35452 * expmed.c (store_bit_field_1): Likewise.
35453 * expr.c (store_constructor): Likewise.
35454 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
35455 and polynomial REGMODE_NATURAL_SIZE.
35456 (gen_lowpart_common): Likewise.
35457 * reginfo.c (record_subregs_of_mode): Likewise.
35458 * rtlanal.c (read_modify_subreg_p): Likewise.
35459
35460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35461 Alan Hayward <alan.hayward@arm.com>
35462 David Sherwood <david.sherwood@arm.com>
35463
35464 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
35465 numbers of elements.
35466
35467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35468 Alan Hayward <alan.hayward@arm.com>
35469 David Sherwood <david.sherwood@arm.com>
35470
35471 * match.pd: Cope with polynomial numbers of vector elements.
35472
35473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35474 Alan Hayward <alan.hayward@arm.com>
35475 David Sherwood <david.sherwood@arm.com>
35476
35477 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
35478 in a POINTER_PLUS_EXPR.
35479
35480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35481 Alan Hayward <alan.hayward@arm.com>
35482 David Sherwood <david.sherwood@arm.com>
35483
35484 * omp-simd-clone.c (simd_clone_subparts): New function.
35485 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
35486 (ipa_simd_modify_function_body): Likewise.
35487
35488 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35489 Alan Hayward <alan.hayward@arm.com>
35490 David Sherwood <david.sherwood@arm.com>
35491
35492 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
35493 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
35494 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
35495 (expand_vector_condition, vector_element): Likewise.
35496 (subparts_gt): New function.
35497 (get_compute_type): Use subparts_gt.
35498 (count_type_subparts): Delete.
35499 (expand_vector_operations_1): Use subparts_gt instead of
35500 count_type_subparts.
35501
35502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35503 Alan Hayward <alan.hayward@arm.com>
35504 David Sherwood <david.sherwood@arm.com>
35505
35506 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
35507 (vect_compile_time_alias): ...this new function. Do the calculation
35508 on poly_ints rather than trees.
35509 (vect_prune_runtime_alias_test_list): Update call accordingly.
35510
35511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35512 Alan Hayward <alan.hayward@arm.com>
35513 David Sherwood <david.sherwood@arm.com>
35514
35515 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
35516 numbers of units.
35517 (vect_schedule_slp_instance): Likewise.
35518
35519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35520 Alan Hayward <alan.hayward@arm.com>
35521 David Sherwood <david.sherwood@arm.com>
35522
35523 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
35524 constant and extern definitions for variable-length vectors.
35525 (vect_get_constant_vectors): Note that the number of units
35526 is known to be constant.
35527
35528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35529 Alan Hayward <alan.hayward@arm.com>
35530 David Sherwood <david.sherwood@arm.com>
35531
35532 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
35533 of units as polynomial. Choose between WIDE and NARROW based
35534 on multiple_p.
35535
35536 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35537 Alan Hayward <alan.hayward@arm.com>
35538 David Sherwood <david.sherwood@arm.com>
35539
35540 * tree-vect-stmts.c (simd_clone_subparts): New function.
35541 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
35542
35543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35544 Alan Hayward <alan.hayward@arm.com>
35545 David Sherwood <david.sherwood@arm.com>
35546
35547 * tree-vect-stmts.c (vectorizable_call): Treat the number of
35548 vectors as polynomial. Use build_index_vector for
35549 IFN_GOMP_SIMD_LANE.
35550
35551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35552 Alan Hayward <alan.hayward@arm.com>
35553 David Sherwood <david.sherwood@arm.com>
35554
35555 * tree-vect-stmts.c (get_load_store_type): Treat the number of
35556 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
35557 for variable-length vectors.
35558 (vectorizable_mask_load_store): Treat the number of units as
35559 polynomial, asserting that it is constant if the condition has
35560 already been enforced.
35561 (vectorizable_store, vectorizable_load): Likewise.
35562
35563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35564 Alan Hayward <alan.hayward@arm.com>
35565 David Sherwood <david.sherwood@arm.com>
35566
35567 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
35568 of units as polynomial. Punt if we can't tell at compile time
35569 which vector contains the final result.
35570
35571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35572 Alan Hayward <alan.hayward@arm.com>
35573 David Sherwood <david.sherwood@arm.com>
35574
35575 * tree-vect-loop.c (vectorizable_induction): Treat the number
35576 of units as polynomial. Punt on SLP inductions. Use an integer
35577 VEC_SERIES_EXPR for variable-length integer reductions. Use a
35578 cast of such a series for variable-length floating-point
35579 reductions.
35580
35581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35582 Alan Hayward <alan.hayward@arm.com>
35583 David Sherwood <david.sherwood@arm.com>
35584
35585 * tree.h (build_index_vector): Declare.
35586 * tree.c (build_index_vector): New function.
35587 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
35588 of units as polynomial, forcibly converting it to a constant if
35589 vectorizable_reduction has already enforced the condition.
35590 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
35591 to create a {1,2,3,...} vector.
35592 (vectorizable_reduction): Treat the number of units as polynomial.
35593 Choose vectype_in based on the largest scalar element size rather
35594 than the smallest number of units. Enforce the restrictions
35595 relied on above.
35596
35597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35598 Alan Hayward <alan.hayward@arm.com>
35599 David Sherwood <david.sherwood@arm.com>
35600
35601 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
35602 number of units as polynomial.
35603
35604 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35605 Alan Hayward <alan.hayward@arm.com>
35606 David Sherwood <david.sherwood@arm.com>
35607
35608 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
35609 * target.def (autovectorize_vector_sizes): Return the vector sizes
35610 by pointer, using vector_sizes rather than a bitmask.
35611 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
35612 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
35613 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
35614 Likewise.
35615 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
35616 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
35617 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
35618 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
35619 * omp-general.c (omp_max_vf): Likewise.
35620 * omp-low.c (omp_clause_aligned_alignment): Likewise.
35621 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
35622 * tree-vect-loop.c (vect_analyze_loop): Likewise.
35623 * tree-vect-slp.c (vect_slp_bb): Likewise.
35624 * doc/tm.texi: Regenerate.
35625 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
35626 to a poly_uint64.
35627 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
35628 the vector size as a poly_uint64 rather than an unsigned int.
35629 (current_vector_size): Change from an unsigned int to a poly_uint64.
35630 (get_vectype_for_scalar_type): Update accordingly.
35631 * tree.h (build_truth_vector_type): Take the size and number of
35632 units as a poly_uint64 rather than an unsigned int.
35633 (build_vector_type): Add a temporary overload that takes
35634 the number of units as a poly_uint64 rather than an unsigned int.
35635 * tree.c (make_vector_type): Likewise.
35636 (build_truth_vector_type): Take the number of units as a poly_uint64
35637 rather than an unsigned int.
35638
35639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35640 Alan Hayward <alan.hayward@arm.com>
35641 David Sherwood <david.sherwood@arm.com>
35642
35643 * target.def (get_mask_mode): Take the number of units and length
35644 as poly_uint64s rather than unsigned ints.
35645 * targhooks.h (default_get_mask_mode): Update accordingly.
35646 * targhooks.c (default_get_mask_mode): Likewise.
35647 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
35648 * doc/tm.texi: Regenerate.
35649
35650 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35651 Alan Hayward <alan.hayward@arm.com>
35652 David Sherwood <david.sherwood@arm.com>
35653
35654 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
35655 * omp-general.c (omp_max_vf): Likewise.
35656 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
35657 (expand_omp_simd): Handle polynomial safelen.
35658 * omp-low.c (omplow_simd_context): Add a default constructor.
35659 (omplow_simd_context::max_vf): Change from int to poly_uint64.
35660 (lower_rec_simd_input_clauses): Update accordingly.
35661 (lower_rec_input_clauses): Likewise.
35662
35663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35664 Alan Hayward <alan.hayward@arm.com>
35665 David Sherwood <david.sherwood@arm.com>
35666
35667 * tree-vectorizer.h (vect_nunits_for_cost): New function.
35668 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
35669 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
35670 (vect_analyze_slp_cost): Likewise.
35671 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
35672 (vect_model_load_cost): Likewise.
35673
35674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35675 Alan Hayward <alan.hayward@arm.com>
35676 David Sherwood <david.sherwood@arm.com>
35677
35678 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
35679 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
35680 from an unsigned int * to a poly_uint64_pod *.
35681 (calculate_unrolling_factor): New function.
35682 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
35683
35684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35685 Alan Hayward <alan.hayward@arm.com>
35686 David Sherwood <david.sherwood@arm.com>
35687
35688 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
35689 from an unsigned int to a poly_uint64.
35690 (_loop_vec_info::slp_unrolling_factor): Likewise.
35691 (_loop_vec_info::vectorization_factor): Change from an int
35692 to a poly_uint64.
35693 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
35694 (vect_get_num_vectors): New function.
35695 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
35696 (vect_get_num_copies): Use vect_get_num_vectors.
35697 (vect_analyze_data_ref_dependences): Change max_vf from an int *
35698 to an unsigned int *.
35699 (vect_analyze_data_refs): Change min_vf from an int * to a
35700 poly_uint64 *.
35701 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35702 than an unsigned HOST_WIDE_INT.
35703 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
35704 (vect_analyze_data_ref_dependence): Change max_vf from an int *
35705 to an unsigned int *.
35706 (vect_analyze_data_ref_dependences): Likewise.
35707 (vect_compute_data_ref_alignment): Handle polynomial vf.
35708 (vect_enhance_data_refs_alignment): Likewise.
35709 (vect_prune_runtime_alias_test_list): Likewise.
35710 (vect_shift_permute_load_chain): Likewise.
35711 (vect_supportable_dr_alignment): Likewise.
35712 (dependence_distance_ge_vf): Take the vectorization factor as a
35713 poly_uint64 rather than an unsigned HOST_WIDE_INT.
35714 (vect_analyze_data_refs): Change min_vf from an int * to a
35715 poly_uint64 *.
35716 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
35717 vfm1 as a poly_uint64 rather than an int. Make the same change
35718 for the returned bound_scalar.
35719 (vect_gen_vector_loop_niters): Handle polynomial vf.
35720 (vect_do_peeling): Likewise. Update call to
35721 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
35722 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
35723 be constant.
35724 * tree-vect-loop.c (vect_determine_vectorization_factor)
35725 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
35726 (vect_get_known_peeling_cost): Likewise.
35727 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
35728 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
35729 (vect_transform_loop): Likewise. Use the lowest possible VF when
35730 updating the upper bounds of the loop.
35731 (vect_min_worthwhile_factor): Make static. Return an unsigned int
35732 rather than an int.
35733 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
35734 polynomial unroll factors.
35735 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
35736 (vect_make_slp_decision): Likewise.
35737 (vect_supported_load_permutation_p): Likewise, and polynomial
35738 vf too.
35739 (vect_analyze_slp_cost): Handle polynomial vf.
35740 (vect_slp_analyze_node_operations): Likewise.
35741 (vect_slp_analyze_bb_1): Likewise.
35742 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35743 than an unsigned HOST_WIDE_INT.
35744 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
35745 (vectorizable_load): Handle polynomial vf.
35746 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
35747 a poly_uint64.
35748 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
35749
35750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35751 Alan Hayward <alan.hayward@arm.com>
35752 David Sherwood <david.sherwood@arm.com>
35753
35754 * match.pd: Handle bit operations involving three constants
35755 and try to fold one pair.
35756
35757 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35758
35759 * tree-vect-loop-manip.c: Include gimple-fold.h.
35760 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
35761 niters_maybe_zero parameters. Handle other cases besides a step of 1.
35762 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
35763 Add a path that uses a step of VF instead of 1, but disable it
35764 for now.
35765 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
35766 and niters_no_overflow parameters. Update calls to
35767 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
35768 Create a new SSA name if the latter choses to use a ste other
35769 than zero, and return it via niters_vector_mult_vf_var.
35770 * tree-vect-loop.c (vect_transform_loop): Update calls to
35771 vect_do_peeling, vect_gen_vector_loop_niters and
35772 slpeel_make_loop_iterate_ntimes.
35773 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
35774 (vect_gen_vector_loop_niters): Update declarations after above changes.
35775
35776 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
35777
35778 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
35779 128-bit round to integer instructions.
35780 (ceil<mode>2): Likewise.
35781 (btrunc<mode>2): Likewise.
35782 (round<mode>2): Likewise.
35783
35784 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
35785
35786 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
35787 unaligned VSX load/store on P8/P9.
35788 (expand_block_clear): Allow the use of unaligned VSX
35789 load/store on P8/P9.
35790
35791 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35792
35793 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
35794 New function.
35795 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
35796 swap associated with both a load and a store.
35797
35798 2018-01-02 Andrew Waterman <andrew@sifive.com>
35799
35800 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
35801 * config/riscv/riscv.md (clear_cache): Use it.
35802
35803 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
35804
35805 * web.c: Remove out-of-date comment.
35806
35807 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35808
35809 * expr.c (fixup_args_size_notes): Check that any existing
35810 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
35811 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
35812 (emit_single_push_insn): ...here.
35813
35814 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35815
35816 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
35817 (const_vector_encoded_nelts): New function.
35818 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
35819 (const_vector_int_elt, const_vector_elt): Declare.
35820 * emit-rtl.c (const_vector_int_elt_1): New function.
35821 (const_vector_elt): Likewise.
35822 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
35823 of CONST_VECTOR_ELT.
35824
35825 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35826
35827 * expr.c: Include rtx-vector-builder.h.
35828 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
35829 directly on the tree encoding.
35830 (const_vector_from_tree): Likewise.
35831 * optabs.c: Include rtx-vector-builder.h.
35832 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
35833 sequence of "u" values.
35834 * vec-perm-indices.c: Include rtx-vector-builder.h.
35835 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
35836 directly on the vec_perm_indices encoding.
35837
35838 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35839
35840 * doc/rtl.texi (const_vector): Describe new encoding scheme.
35841 * Makefile.in (OBJS): Add rtx-vector-builder.o.
35842 * rtx-vector-builder.h: New file.
35843 * rtx-vector-builder.c: Likewise.
35844 * rtl.h (rtx_def::u2): Add a const_vector field.
35845 (CONST_VECTOR_NPATTERNS): New macro.
35846 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
35847 (CONST_VECTOR_DUPLICATE_P): Likewise.
35848 (CONST_VECTOR_STEPPED_P): Likewise.
35849 (CONST_VECTOR_ENCODED_ELT): Likewise.
35850 (const_vec_duplicate_p): Check for a duplicated vector encoding.
35851 (unwrap_const_vec_duplicate): Likewise.
35852 (const_vec_series_p): Check for a non-duplicated vector encoding.
35853 Say that the function only returns true for integer vectors.
35854 * emit-rtl.c: Include rtx-vector-builder.h.
35855 (gen_const_vec_duplicate_1): Delete.
35856 (gen_const_vector): Call gen_const_vec_duplicate instead of
35857 gen_const_vec_duplicate_1.
35858 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
35859 (gen_const_vec_duplicate): Use rtx_vector_builder.
35860 (gen_const_vec_series): Likewise.
35861 (gen_rtx_CONST_VECTOR): Likewise.
35862 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
35863 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35864 Build a new vector rather than modifying a CONST_VECTOR in-place.
35865 (handle_special_swappables): Update call accordingly.
35866 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
35867 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35868 Build a new vector rather than modifying a CONST_VECTOR in-place.
35869 (handle_special_swappables): Update call accordingly.
35870
35871 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35872
35873 * simplify-rtx.c (simplify_const_binary_operation): Use
35874 CONST_VECTOR_ELT instead of XVECEXP.
35875
35876 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35877
35878 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
35879 the selector elements to be different from the data elements
35880 if the selector is a VECTOR_CST.
35881 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
35882 ssizetype for the selector.
35883
35884 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35885
35886 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
35887 before testing each element individually.
35888 * tree-vect-generic.c (lower_vec_perm): Likewise.
35889
35890 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35891
35892 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
35893 * selftest-run-tests.c (selftest::run_tests): Call it.
35894 * vector-builder.h (vector_builder::operator ==): New function.
35895 (vector_builder::operator !=): Likewise.
35896 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
35897 (vec_perm_indices::all_from_input_p): New function.
35898 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35899 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
35900 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
35901 instead of reading the VECTOR_CST directly. Detect whether both
35902 vector inputs are the same before constructing the vec_perm_indices,
35903 and update the number of inputs argument accordingly. Use the
35904 utility functions added above. Only construct sel2 if we need to.
35905
35906 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35907
35908 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
35909 the broadcast of the low byte.
35910 (expand_mult_highpart): Use an explicit encoding for the permutes.
35911 * optabs-query.c (can_mult_highpart_p): Likewise.
35912 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
35913 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35914 (vectorizable_bswap): Likewise.
35915 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
35916 explicit encoding for the power-of-2 permutes.
35917 (vect_permute_store_chain): Likewise.
35918 (vect_grouped_load_supported): Likewise.
35919 (vect_permute_load_chain): Likewise.
35920
35921 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35922
35923 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
35924 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
35925 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
35926 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35927 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
35928 (vect_gen_perm_mask_any): Likewise.
35929
35930 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35931
35932 * int-vector-builder.h: New file.
35933 * vec-perm-indices.h: Include int-vector-builder.h.
35934 (vec_perm_indices): Redefine as an int_vector_builder.
35935 (auto_vec_perm_indices): Delete.
35936 (vec_perm_builder): Redefine as a stand-alone class.
35937 (vec_perm_indices::vec_perm_indices): New function.
35938 (vec_perm_indices::clamp): Likewise.
35939 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
35940 (vec_perm_indices::new_vector): New function.
35941 (vec_perm_indices::new_expanded_vector): Update for new
35942 vec_perm_indices class.
35943 (vec_perm_indices::rotate_inputs): New function.
35944 (vec_perm_indices::all_in_range_p): Operate directly on the
35945 encoded form, without computing elided elements.
35946 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
35947 encoding. Update for new vec_perm_indices class.
35948 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
35949 the given vec_perm_builder.
35950 (expand_vec_perm_var): Update vec_perm_builder constructor.
35951 (expand_mult_highpart): Use vec_perm_builder instead of
35952 auto_vec_perm_indices.
35953 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
35954 vec_perm_indices instead of auto_vec_perm_indices. Use a single
35955 or double series encoding as appropriate.
35956 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
35957 vec_perm_indices instead of auto_vec_perm_indices.
35958 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35959 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35960 (vect_permute_store_chain): Likewise.
35961 (vect_grouped_load_supported): Likewise.
35962 (vect_permute_load_chain): Likewise.
35963 (vect_shift_permute_load_chain): Likewise.
35964 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
35965 (vect_transform_slp_perm_load): Likewise.
35966 (vect_schedule_slp_instance): Likewise.
35967 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35968 (vectorizable_mask_load_store): Likewise.
35969 (vectorizable_bswap): Likewise.
35970 (vectorizable_store): Likewise.
35971 (vectorizable_load): Likewise.
35972 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
35973 vec_perm_indices instead of auto_vec_perm_indices. Use
35974 tree_to_vec_perm_builder to read the vector from a tree.
35975 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
35976 vec_perm_builder instead of a vec_perm_indices.
35977 (have_whole_vector_shift): Use vec_perm_builder and
35978 vec_perm_indices instead of auto_vec_perm_indices. Leave the
35979 truncation to calc_vec_perm_mask_for_shift.
35980 (vect_create_epilog_for_reduction): Likewise.
35981 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
35982 from auto_vec_perm_indices to vec_perm_indices.
35983 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35984 instead of changing individual elements.
35985 (aarch64_vectorize_vec_perm_const): Use new_vector to install
35986 the vector in d.perm.
35987 * config/arm/arm.c (expand_vec_perm_d::perm): Change
35988 from auto_vec_perm_indices to vec_perm_indices.
35989 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35990 instead of changing individual elements.
35991 (arm_vectorize_vec_perm_const): Use new_vector to install
35992 the vector in d.perm.
35993 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
35994 Update vec_perm_builder constructor.
35995 (rs6000_expand_interleave): Likewise.
35996 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
35997 (rs6000_expand_interleave): Likewise.
35998
35999 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36000
36001 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
36002 to qimode could truncate the indices.
36003 * optabs.c (expand_vec_perm_var): Likewise.
36004
36005 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36006
36007 * Makefile.in (OBJS): Add vec-perm-indices.o.
36008 * vec-perm-indices.h: New file.
36009 * vec-perm-indices.c: Likewise.
36010 * target.h (vec_perm_indices): Replace with a forward class
36011 declaration.
36012 (auto_vec_perm_indices): Move to vec-perm-indices.h.
36013 * optabs.h: Include vec-perm-indices.h.
36014 (expand_vec_perm): Delete.
36015 (selector_fits_mode_p, expand_vec_perm_var): Declare.
36016 (expand_vec_perm_const): Declare.
36017 * target.def (vec_perm_const_ok): Replace with...
36018 (vec_perm_const): ...this new hook.
36019 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
36020 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
36021 * doc/tm.texi: Regenerate.
36022 * optabs.def (vec_perm_const): Delete.
36023 * doc/md.texi (vec_perm_const): Likewise.
36024 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
36025 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
36026 expand_vec_perm for constant permutation vectors. Assert that
36027 the mode of variable permutation vectors is the integer equivalent
36028 of the mode that is being permuted.
36029 * optabs-query.h (selector_fits_mode_p): Declare.
36030 * optabs-query.c: Include vec-perm-indices.h.
36031 (selector_fits_mode_p): New function.
36032 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
36033 is defined, instead of checking whether the vec_perm_const_optab
36034 exists. Use targetm.vectorize.vec_perm_const instead of
36035 targetm.vectorize.vec_perm_const_ok. Check whether the indices
36036 fit in the vector mode before using a variable permute.
36037 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
36038 vec_perm_indices instead of an rtx.
36039 (expand_vec_perm): Replace with...
36040 (expand_vec_perm_const): ...this new function. Take the selector
36041 as a vec_perm_indices rather than an rtx. Also take the mode of
36042 the selector. Update call to shift_amt_for_vec_perm_mask.
36043 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
36044 Use vec_perm_indices::new_expanded_vector to expand the original
36045 selector into bytes. Check whether the indices fit in the vector
36046 mode before using a variable permute.
36047 (expand_vec_perm_var): Make global.
36048 (expand_mult_highpart): Use expand_vec_perm_const.
36049 * fold-const.c: Includes vec-perm-indices.h.
36050 * tree-ssa-forwprop.c: Likewise.
36051 * tree-vect-data-refs.c: Likewise.
36052 * tree-vect-generic.c: Likewise.
36053 * tree-vect-loop.c: Likewise.
36054 * tree-vect-slp.c: Likewise.
36055 * tree-vect-stmts.c: Likewise.
36056 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
36057 Delete.
36058 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
36059 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
36060 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
36061 (aarch64_vectorize_vec_perm_const): ...this new function.
36062 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
36063 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36064 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
36065 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
36066 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
36067 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36068 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
36069 into...
36070 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
36071 check for NEON modes.
36072 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
36073 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
36074 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
36075 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
36076 into...
36077 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
36078 the old VEC_PERM_CONST conditions.
36079 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
36080 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
36081 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
36082 (ia64_vectorize_vec_perm_const_ok): Merge into...
36083 (ia64_vectorize_vec_perm_const): ...this new function.
36084 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
36085 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
36086 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
36087 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
36088 * config/mips/mips.c (mips_expand_vec_perm_const)
36089 (mips_vectorize_vec_perm_const_ok): Merge into...
36090 (mips_vectorize_vec_perm_const): ...this new function.
36091 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
36092 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
36093 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
36094 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
36095 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
36096 (rs6000_expand_vec_perm_const): Delete.
36097 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
36098 Delete.
36099 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36100 (altivec_expand_vec_perm_const_le): Take each operand individually.
36101 Operate on constant selectors rather than rtxes.
36102 (altivec_expand_vec_perm_const): Likewise. Update call to
36103 altivec_expand_vec_perm_const_le.
36104 (rs6000_expand_vec_perm_const): Delete.
36105 (rs6000_vectorize_vec_perm_const_ok): Delete.
36106 (rs6000_vectorize_vec_perm_const): New function.
36107 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
36108 an element count and rtx array.
36109 (rs6000_expand_extract_even): Update call accordingly.
36110 (rs6000_expand_interleave): Likewise.
36111 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
36112 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
36113 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
36114 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
36115 (rs6000_expand_vec_perm_const): Delete.
36116 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
36117 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36118 (altivec_expand_vec_perm_const_le): Take each operand individually.
36119 Operate on constant selectors rather than rtxes.
36120 (altivec_expand_vec_perm_const): Likewise. Update call to
36121 altivec_expand_vec_perm_const_le.
36122 (rs6000_expand_vec_perm_const): Delete.
36123 (rs6000_vectorize_vec_perm_const_ok): Delete.
36124 (rs6000_vectorize_vec_perm_const): New function. Remove stray
36125 reference to the SPE evmerge intructions.
36126 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
36127 an element count and rtx array.
36128 (rs6000_expand_extract_even): Update call accordingly.
36129 (rs6000_expand_interleave): Likewise.
36130 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
36131 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
36132 new function.
36133 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36134
36135 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36136
36137 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
36138 vector mode and that that mode matches the mode of the data
36139 being permuted.
36140 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
36141 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
36142 directly using expand_vec_perm_1 when forcing selectors into
36143 registers.
36144 (expand_vec_perm_var): New function, split out from expand_vec_perm.
36145
36146 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36147
36148 * optabs-query.h (can_vec_perm_p): Delete.
36149 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
36150 * optabs-query.c (can_vec_perm_p): Split into...
36151 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
36152 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
36153 particular selector is valid.
36154 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
36155 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
36156 (vect_grouped_load_supported): Likewise.
36157 (vect_shift_permute_load_chain): Likewise.
36158 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
36159 (vect_transform_slp_perm_load): Likewise.
36160 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
36161 (vectorizable_bswap): Likewise.
36162 (vect_gen_perm_mask_checked): Likewise.
36163 * fold-const.c (fold_ternary_loc): Likewise. Don't take
36164 implementations of variable permutation vectors into account
36165 when deciding which selector to use.
36166 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
36167 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
36168 with a false third argument.
36169 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
36170 to test whether the constant selector is valid and can_vec_perm_var_p
36171 to test whether a variable selector is valid.
36172
36173 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36174
36175 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
36176 * optabs-query.c (can_vec_perm_p): Likewise.
36177 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
36178 instead of vec_perm_indices.
36179 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
36180 (vect_gen_perm_mask_checked): Likewise,
36181 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
36182 (vect_gen_perm_mask_checked): Likewise,
36183
36184 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36185
36186 * optabs-query.h (qimode_for_vec_perm): Declare.
36187 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
36188 (qimode_for_vec_perm): ...this new function.
36189 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
36190
36191 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
36192
36193 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
36194 does not have a conditional at the top.
36195
36196 2018-01-02 Richard Biener <rguenther@suse.de>
36197
36198 * ipa-inline.c (big_speedup_p): Fix expression.
36199
36200 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36201
36202 PR target/81616
36203 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
36204 for generic 4->6.
36205
36206 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36207
36208 PR target/81616
36209 Generic tuning.
36210 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
36211 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
36212 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
36213 cond_taken_branch_cost 3->4.
36214
36215 2018-01-01 Jakub Jelinek <jakub@redhat.com>
36216
36217 PR tree-optimization/83581
36218 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
36219 TODO_cleanup_cfg if any changes have been made.
36220
36221 PR middle-end/83608
36222 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
36223 convert_modes if target mode has the right side, but different mode
36224 class.
36225
36226 PR middle-end/83609
36227 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
36228 last argument when extracting from CONCAT. If either from_real or
36229 from_imag is NULL, use expansion through memory. If result is not
36230 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
36231 the parts directly to inner mode, if even that fails, use expansion
36232 through memory.
36233
36234 PR middle-end/83623
36235 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
36236 check for bswap in mode rather than HImode and use that in expand_unop
36237 too.
36238 \f
36239 Copyright (C) 2018 Free Software Foundation, Inc.
36240
36241 Copying and distribution of this file, with or without modification,
36242 are permitted in any medium without royalty provided the copyright
36243 notice and this notice are preserved.